openapi: 3.1.0 info: title: Embat AccountingAccounts Scenarios API description: Embat API enables connections between any third party application and Embat. Is organized around REST principles, using HTTP responses code and returning data in JSON format. While testing the API, you have to request **sandbox credentials**. contact: name: API Support url: https://embat.io/ email: tech@embat.io version: 2.120.3 x-logo: url: https://storage.googleapis.com/embat-production.appspot.com/assets/embat_dark.svg tags: - name: Scenarios description: 'A `Scenario` represents a forecasting hypothesis in Embat''s treasury forecast: a named, currency-denominated projection covering a defined horizon (`startPeriod` to `endPeriod`) at a given time granularity (`periodicity`). Only published scenarios are returned when listing scenarios. Scenarios are the grouping unit for `Forecasts`: each forecast belongs to one scenario, and its figures are only meaningful in the context of that scenario''s currency, periodicity and horizon. **Typical flow:** list the company''s published scenarios with `GET /scenarios/{companyId}` to discover which forecasting hypotheses are available, then use a scenario''s `id` to retrieve its details with `GET /scenarios/{companyId}/{id}` or to filter the related `Forecasts` endpoints. ' paths: /scenarios/{companyId}: get: tags: - Scenarios summary: List scenarios description: Returns the published forecasting scenarios of a company. Scenarios that have not been published are not included. Results are not paginated. operationId: list_scenarios_scenarios__companyId__get security: - HTTPBearer: [] parameters: - name: companyId in: path required: true schema: type: string title: Companyid responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ListScenariosResponseSchema' '401': description: Unauthorized. The bearer token is missing, invalid or expired. content: application/json: example: detail: user not authorized schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Not found. The requested resource or `companyId` does not exist. content: application/json: example: detail: 0021 companyId not found schema: $ref: '#/components/schemas/ErrorResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /scenarios/{companyId}/{id}: get: tags: - Scenarios summary: Retrieve scenario description: Returns a single forecasting scenario by its Embat ID. operationId: retrieve_scenario_scenarios__companyId___id__get security: - HTTPBearer: [] parameters: - name: id in: path required: true schema: type: string title: Id - name: companyId in: path required: true schema: type: string title: Companyid responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/GetScenarioResponseSchema' '401': description: Unauthorized. The bearer token is missing, invalid or expired. content: application/json: example: detail: user not authorized schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Scenario or `companyId` not found. content: application/json: example: detail: 0021 companyId not found schema: $ref: '#/components/schemas/ErrorResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: ListScenariosResponseSchema: properties: data: items: $ref: '#/components/schemas/GetScenarioResponseSchema' type: array title: Data description: Published scenarios of the company. type: object required: - data title: ListScenariosResponseSchema ErrorResponse: properties: detail: type: string title: Detail description: Human-readable explanation of the error. examples: - user not authorized type: object required: - detail title: ErrorResponse description: Error payload returned by the API (FastAPI `detail` convention). CurrencyEnum: type: string enum: - AED - AFN - ALL - AMD - ANG - AOA - ARS - AUD - AWG - AZN - BAM - BBD - BDT - BGN - BHD - BIF - BMD - BND - BOB - BOV - BRL - BSD - BTC - BTN - BWP - BYN - BZD - CAD - CDF - CHE - CHF - CHW - CLF - CLP - CNH - CNY - COP - COU - CRC - CUP - CVE - CZK - DJF - DKK - DOP - DZD - EEK - EGP - ERN - ETB - ETH - EUR - FJD - FKP - GBP - GEL - GHS - GIP - GMD - GNF - GTQ - GYD - HKD - HNL - HRK - HTG - HUF - IDR - ILS - INR - IQD - IRR - ISK - JMD - JOD - JPY - KES - KGS - KHR - KMF - KPW - KRW - KWD - KYD - KZT - LAK - LBP - LKR - LRD - LSL - LTC - LTL - LVL - LYD - MAD - MDL - MGA - MKD - MMK - MNT - MOP - MRU - MUR - MVR - MWK - MXN - MXV - MYR - MZN - NAD - NGN - NIO - NOK - NPR - NZD - OMR - PAB - PEN - PGK - PHP - PKR - PLN - PYG - QAR - RON - RSD - RUB - RWF - SAR - SBD - SCR - SDG - SEK - SGD - SHP - SLE - SOS - SRD - SSP - STN - SVC - SYP - SZL - THB - TJS - TMT - TND - TOP - TRY - TTD - TWD - TZS - UAH - UGX - USD - USN - UYI - UYU - UYW - UZS - VED - VEF - VES - VND - VUV - WST - XAF - XAG - XAU - XBA - XBB - XBC - XBD - XCD - XDR - XOF - XPD - XPF - XPT - XSU - XTS - XUA - XXX - YER - ZAR - ZMK - ZMW - ZWG - ZWL title: CurrencyEnum HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError PeriodicityEnum: type: string enum: - monthly - yearly - weekly - daily title: PeriodicityEnum GetScenarioResponseSchema: properties: id: anyOf: - type: string - type: 'null' title: Id description: Embat scenario ID. companyId: anyOf: - type: string - type: 'null' title: Companyid description: Embat company ID. You can get them from "companies" endpoints. name: anyOf: - type: string - type: 'null' title: Name description: Name of the scenario. examples: - FY2024 Base Case currency: anyOf: - $ref: '#/components/schemas/CurrencyEnum' - type: 'null' description: Currency the scenario's forecasted amounts are expressed in. examples: - EUR description: anyOf: - type: string - type: 'null' title: Description description: Free-text description of the scenario. examples: - Baseline cash flow forecast for FY2024 periodicity: anyOf: - $ref: '#/components/schemas/PeriodicityEnum' - type: 'null' description: Time granularity of the scenario's forecasted periods. createdAt: anyOf: - type: string format: date-time - type: 'null' title: Createdat description: Created date of the entity. updatedAt: anyOf: - type: string format: date-time - type: 'null' title: Updatedat description: Last updated date of the entity. startPeriod: anyOf: - type: integer - type: 'null' title: Startperiod description: Numeric identifier of the first period covered by the scenario's forecast. endPeriod: anyOf: - type: integer - type: 'null' title: Endperiod description: Numeric identifier of the last period covered by the scenario's forecast. type: object title: GetScenarioResponseSchema securitySchemes: HTTPBearer: type: http scheme: bearer