{"openapi":"3.1.0","info":{"title":"Management API","description":"API for managing companies and executing compliance and connectivity workflows on the ecosio platform.","contact":{"name":"ecosio GmbH","url":"https://ecosio.com/en","email":"support@ecosio.com"},"version":"1.3.0"},"servers":[{"url":"https://api.test.ecosio-hub.com","description":"TEST instance of ecosio management.api"}],"tags":[{"name":"Companies","description":"Methods for managing companies"},{"name":"Approval Request Status","description":"Methods for retrieving approval request statuses"},{"name":"Connectors","description":"Methods for managing messaging connectors"},{"name":"Scenarios","description":"Methods for managing scenarios"}],"paths":{"/api/v1/management/scenarios/{scenarioUuid}":{"get":{"tags":["Scenarios"],"summary":"Retrieve a scenario","description":"Retrieves the details of an applied scenario.","operationId":"getScenarioById","parameters":[{"name":"scenarioUuid","in":"path","description":"ID of the scenario to be retrieved.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScenarioResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"basicAuth":[]},{"X-APP-KEY":[]}]},"put":{"tags":["Scenarios"],"summary":"Update a scenario","description":"Updates an applied scenario.","operationId":"updateScenario","parameters":[{"name":"scenarioUuid","in":"path","description":"ID of the scenario to be updated.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BelgiumEInvoiceUpdateRequest"},{"$ref":"#/components/schemas/DenmarkEInvoiceUpdateRequest"},{"$ref":"#/components/schemas/EstoniaEInvoiceUpdateRequest"},{"$ref":"#/components/schemas/FinlandEInvoiceUpdateRequest"},{"$ref":"#/components/schemas/GermanyEInvoiceUpdateRequest"},{"$ref":"#/components/schemas/HungaryEInvoiceUpdateRequest"},{"$ref":"#/components/schemas/NetherlandsEInvoiceUpdateRequest"},{"$ref":"#/components/schemas/NorwayEInvoiceUpdateRequest"},{"$ref":"#/components/schemas/PolandEInvoiceUpdateRequest"},{"$ref":"#/components/schemas/RomaniaEInvoiceUpdateRequest"},{"$ref":"#/components/schemas/SwedenEInvoiceUpdateRequest"}]}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScenarioOperationResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"basicAuth":[]},{"X-APP-KEY":[]}]}},"/api/v1/management/connectors/{connectorUuid}":{"get":{"tags":["Connectors"],"summary":"Retrieve a connector","operationId":"getConnector","parameters":[{"name":"connectorUuid","in":"path","description":"ID of the connector to be retrieved. This can be the external or internal identifier.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorRetrievalResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Connector not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"basicAuth":[]},{"X-APP-KEY":[]}]},"put":{"tags":["Connectors"],"summary":"Update a connector","description":"Updates an existing connector.","operationId":"updateConnector","parameters":[{"name":"connectorUuid","in":"path","description":"ID of the connector to update. This can be the external or internal identifier.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/APIConnectorUpdateRequest"},{"$ref":"#/components/schemas/HTTPSConnectorUpdateRequest"}]}}},"required":true},"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorUpdateResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"basicAuth":[]},{"X-APP-KEY":[]}]}},"/api/v1/management/connectors/{connectorUuid}/companies":{"put":{"tags":["Connectors"],"summary":"Update a connector's companies","description":"Replaces the connector's companies. The response returns information about the updated connector.","operationId":"replaceCompanies","parameters":[{"name":"connectorUuid","in":"path","description":"ID of the connector to be updated. This can be the external or internal identifier.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorCompaniesRequest"}}},"required":true},"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorUpdateResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"basicAuth":[]},{"X-APP-KEY":[]}]}},"/api/v1/management/companies/{companyUuid}":{"get":{"tags":["Companies"],"summary":"Get a company","operationId":"getCompany","parameters":[{"name":"companyUuid","in":"path","description":"ID of the company to be retrieved. This can be the external or internal identifier.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyRetrievalResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"basicAuth":[]},{"X-APP-KEY":[]}]},"put":{"tags":["Companies"],"summary":"Update a company","operationId":"updateCompany","parameters":[{"name":"companyUuid","in":"path","description":"External ID of the company to be updated.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyOperationRequest"}}},"required":true},"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyOperationResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"basicAuth":[]},{"X-APP-KEY":[]}]}},"/api/v1/management/connectors":{"get":{"tags":["Connectors"],"summary":"List all connectors","operationId":"findConnectors","parameters":[{"name":"page","in":"query","description":"Page number to be retrieved (0-indexed). The size of the page is 50","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorRetrievalPageResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"basicAuth":[]},{"X-APP-KEY":[]}]},"post":{"tags":["Connectors"],"summary":"Create a connector","description":"Creates a new connector. The response returns information about the new connector.","operationId":"createConnector","parameters":[{"name":"usedForTestOnly","in":"query","description":"Marks the entity to be used only for testing purposes.","required":false,"schema":{"type":"boolean","default":false}}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/APIConnectorCreateRequest"},{"$ref":"#/components/schemas/HTTPSConnectorCreateRequest"}]}}},"required":true},"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorOperationResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"basicAuth":[]},{"X-APP-KEY":[]}]}},"/api/v1/management/connectors/{connectorUuid}/regenerateCredentials":{"post":{"tags":["Connectors"],"summary":"Regenerate a connector's credentials","operationId":"regenerateCredentials","parameters":[{"name":"connectorUuid","in":"path","description":"ID of the connector to update. This can be the external or internal identifier.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorOperationResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"basicAuth":[]},{"X-APP-KEY":[]}]}},"/api/v1/management/companies":{"get":{"tags":["Companies"],"summary":"Find companies","operationId":"findCompanies","parameters":[{"name":"page","in":"query","description":"Page number to be retrieved (0-indexed). The size of the page is 50","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyRetrievalPageResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"basicAuth":[]},{"X-APP-KEY":[]}]},"post":{"tags":["Companies"],"summary":"Create a company","operationId":"createCompany","parameters":[{"name":"usedForTestOnly","in":"query","description":"Marks the entity to be used only for testing purposes.","required":false,"schema":{"type":"boolean","default":false}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyOperationRequest"}}},"required":true},"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyOperationResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"basicAuth":[]},{"X-APP-KEY":[]}]}},"/api/v1/management/companies/{companyUuid}/scenarios":{"get":{"tags":["Scenarios"],"summary":"List company scenarios","description":"Lists the scenarios that are applied to a company.","operationId":"listAppliedScenarios","parameters":[{"name":"companyUuid","in":"path","description":"The ID of the company to which the scenario will be applied.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ScenarioResponse"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"basicAuth":[]},{"X-APP-KEY":[]}]},"post":{"tags":["Scenarios"],"summary":"Apply a scenario","description":"Applies a scenario to a company. The response returns information about the applied scenario.","operationId":"createScenario","parameters":[{"name":"companyUuid","in":"path","description":"The ID of the company to which the scenario will be applied.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"usedForTestOnly","in":"query","description":"Marks the entity to be used only for testing purposes.","required":false,"schema":{"type":"boolean","default":false}}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BelgiumEInvoiceCreateRequest"},{"$ref":"#/components/schemas/DenmarkEInvoiceCreateRequest"},{"$ref":"#/components/schemas/EstoniaEInvoiceCreateRequest"},{"$ref":"#/components/schemas/FinlandEInvoiceCreateRequest"},{"$ref":"#/components/schemas/GermanyEInvoiceCreateRequest"},{"$ref":"#/components/schemas/HungaryEInvoiceCreateRequest"},{"$ref":"#/components/schemas/NetherlandsEInvoiceCreateRequest"},{"$ref":"#/components/schemas/NorwayEInvoiceCreateRequest"},{"$ref":"#/components/schemas/PolandEInvoiceCreateRequest"},{"$ref":"#/components/schemas/RomaniaEInvoiceCreateRequest"},{"$ref":"#/components/schemas/SwedenEInvoiceCreateRequest"}]}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScenarioOperationResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"basicAuth":[]},{"X-APP-KEY":[]}]}},"/api/v1/management/scenarios":{"get":{"tags":["Scenarios"],"summary":"List all scenarios","description":"Lists all scenarios that can be applied to your companies. These scenarios must first be pre-configured by ecosio.","operationId":"listAvailableScenarios","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ScenarioName"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"basicAuth":[]},{"X-APP-KEY":[]}]}},"/api/v1/management/approvals/{approvalUuid}":{"get":{"tags":["Approval Request Status"],"summary":"Retrieve approval status","operationId":"getStatus","parameters":[{"name":"approvalUuid","in":"path","description":"ID of the approval request.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalStatusResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"basicAuth":[]},{"X-APP-KEY":[]}]}}},"components":{"schemas":{"Error":{"type":"object","description":"Describes an error item","properties":{"code":{"type":"string","description":"One of a server-defined set of error codes. ","example":"VALID_240"},"message":{"type":"string","description":"A human-readable representation of the error.","example":"Alias is not valid"},"target":{"type":"string","description":"The target of the error.","example":"Validation"},"details":{"type":"array","description":"Represent an array of related errors that occurred during the request.","items":{"$ref":"#/components/schemas/ErrorDetail"}}},"required":["code","message"]},"ErrorDetail":{"type":"object","description":"Represent a related error that occurred during the request","properties":{"code":{"type":"string","description":"One of a server-defined set of error codes. ","example":"VALID_110"},"message":{"type":"string","description":"A human-readable representation of the error.","example":"JSON is not valid"}},"required":["code","message"]},"ErrorResponse":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/Error","description":"Detailed Error description"}},"required":["error"]},"BelgiumEInvoiceUpdateRequest":{"allOf":[{"$ref":"#/components/schemas/ScenarioUpdateRequest"},{"type":"object","properties":{"peppolParticipantIds":{"type":"array","items":{"type":"string","description":"List of Peppol Participant Ids."},"minItems":1,"uniqueItems":true},"emailAddressesForValidationErrors":{"type":"array","description":"List of email addresses for validation errors.","items":{"type":"string","maxLength":320,"minLength":6},"uniqueItems":true},"direction":{"$ref":"#/components/schemas/ConnectorDirection","description":"Direction of the connector.","examples":["BOTH","DELIVERY","FORWARDER"]}}}],"description":"Belgium E-Invoice Update Request","required":["direction","name"]},"ConnectorDirection":{"type":"string","enum":["BOTH","DELIVERY","FETCH","FORWARDER"]},"DenmarkEInvoiceUpdateRequest":{"allOf":[{"$ref":"#/components/schemas/ScenarioUpdateRequest"},{"type":"object","properties":{"peppolParticipantIds":{"type":"array","items":{"type":"string","description":"List of Peppol Participant Ids."},"minItems":1,"uniqueItems":true},"emailAddressesForValidationErrors":{"type":"array","description":"List of email addresses for validation errors.","items":{"type":"string","maxLength":320,"minLength":6},"uniqueItems":true},"direction":{"$ref":"#/components/schemas/ConnectorDirection","description":"Direction of the connector.","examples":["BOTH","DELIVERY","FORWARDER"]}}}],"description":"Denmark E-Invoice Update Request","required":["direction","name"]},"EstoniaEInvoiceUpdateRequest":{"allOf":[{"$ref":"#/components/schemas/ScenarioUpdateRequest"},{"type":"object","properties":{"peppolParticipantIds":{"type":"array","items":{"type":"string","description":"List of Peppol Participant Ids."},"minItems":1,"uniqueItems":true},"emailAddressesForValidationErrors":{"type":"array","description":"List of email addresses for validation errors.","items":{"type":"string","maxLength":320,"minLength":6},"uniqueItems":true},"direction":{"$ref":"#/components/schemas/ConnectorDirection","description":"Direction of the connector.","examples":["BOTH","DELIVERY","FORWARDER"]}}}],"description":"Estonia E-Invoice Update Request","required":["direction","name"]},"FinlandEInvoiceUpdateRequest":{"allOf":[{"$ref":"#/components/schemas/ScenarioUpdateRequest"},{"type":"object","properties":{"peppolParticipantIds":{"type":"array","items":{"type":"string","description":"List of Peppol Participant Ids."},"minItems":1,"uniqueItems":true},"emailAddressesForValidationErrors":{"type":"array","description":"List of email addresses for validation errors.","items":{"type":"string","maxLength":320,"minLength":6},"uniqueItems":true},"direction":{"$ref":"#/components/schemas/ConnectorDirection","description":"Direction of the connector.","examples":["BOTH","DELIVERY","FORWARDER"]}}}],"description":"Finland E-Invoice Update Request","required":["direction","name"]},"GermanyEInvoiceUpdateRequest":{"allOf":[{"$ref":"#/components/schemas/ScenarioUpdateRequest"},{"type":"object","properties":{"peppolParticipantIds":{"type":"array","items":{"type":"string","description":"List of Peppol Participant Ids."},"minItems":1,"uniqueItems":true},"emailAddressesForValidationErrors":{"type":"array","description":"List of email addresses for validation errors.","items":{"type":"string","maxLength":320,"minLength":6},"uniqueItems":true},"direction":{"$ref":"#/components/schemas/ConnectorDirection","description":"Direction of the connector.","examples":["BOTH","DELIVERY","FORWARDER"]}}}],"description":"Germany E-Invoice Update Request","required":["direction","name"]},"HungaryEInvoiceUpdateRequest":{"allOf":[{"$ref":"#/components/schemas/ScenarioUpdateRequest"},{"type":"object","properties":{"taxNumber":{"type":"string","description":"The first 8 digits of the tax number belonging to the taxpayer that registered and owns the Technical User Account for the NAV Online Invoice System.","examples":["12345678"]},"username":{"type":"string","description":"The username of the Technical User Account registered with the NAV Online Invoice System.","examples":["my_nav_tech_user"]},"password":{"type":"string","format":"password","description":"The password for the Technical User Account registered with the NAV Online Invoice System."},"signatureKey":{"type":"string","format":"password","description":"The signature key generated within the NAV system that's associated with the Technical User Account."},"encryptionKey":{"type":"string","format":"password","description":"The encryption key generated within the NAV system that's associated with the Technical User Account."},"softwareId":{"type":"string","description":"The unique identifier of the software being used to connect to the NAV Online Invoice System. This ID must be registered by the taxpayer.","examples":["MY_CUSTOM_ERP_V1_2"]}}}],"description":"Hungary EInvoice Scenario UpdateRequest.","required":["encryptionKey","name","password","signatureKey","softwareId","taxNumber","username"]},"KeyStore":{"type":"object","properties":{"certificate":{"type":"string","format":"byte","description":"The PKCS12 certificate"},"privateKey":{"$ref":"#/components/schemas/PrivateKey","description":"The Private Key and Passphrase for the Certificate"}},"required":["certificate","privateKey"]},"NetherlandsEInvoiceUpdateRequest":{"allOf":[{"$ref":"#/components/schemas/ScenarioUpdateRequest"},{"type":"object","properties":{"peppolParticipantIds":{"type":"array","items":{"type":"string","description":"List of Peppol Participant Ids."},"minItems":1,"uniqueItems":true},"emailAddressesForValidationErrors":{"type":"array","description":"List of email addresses for validation errors.","items":{"type":"string","maxLength":320,"minLength":6},"uniqueItems":true},"direction":{"$ref":"#/components/schemas/ConnectorDirection","description":"Direction of the connector.","examples":["BOTH","DELIVERY","FORWARDER"]}}}],"description":"Netherlands E-Invoice Update Request","required":["direction","name"]},"NorwayEInvoiceUpdateRequest":{"allOf":[{"$ref":"#/components/schemas/ScenarioUpdateRequest"},{"type":"object","properties":{"peppolParticipantIds":{"type":"array","items":{"type":"string","description":"List of Peppol Participant Ids."},"minItems":1,"uniqueItems":true},"emailAddressesForValidationErrors":{"type":"array","description":"List of email addresses for validation errors.","items":{"type":"string","maxLength":320,"minLength":6},"uniqueItems":true},"direction":{"$ref":"#/components/schemas/ConnectorDirection","description":"Direction of the connector.","examples":["BOTH","DELIVERY","FORWARDER"]}}}],"description":"Norway E-Invoice Update Request","required":["direction","name"]},"PolandEInvoiceUpdateRequest":{"allOf":[{"$ref":"#/components/schemas/ScenarioUpdateRequest"},{"type":"object","properties":{"taxNumber":{"type":"string","description":"The company's unique tax identifier, without 'PL' prefix.","examples":["1900101223"],"pattern":"^\\d{10}$"},"ksefToken":{"type":"string","description":"KSeF token ","examples":["1900101223"]},"digitalCertificate":{"$ref":"#/components/schemas/KeyStore","description":"The Digital Certificate and the corresponding Private Key"},"offlineDigitalCertificate":{"$ref":"#/components/schemas/KeyStore","description":"The offline Digital Certificate and the corresponding Private Key"}}}],"description":"Poland EInvoice Scenario UpdateRequest.","required":["name","taxNumber"]},"PrivateKey":{"type":"object","properties":{"key":{"type":"string","format":"byte","description":"The Private Key"},"passphrase":{"type":"string","description":"The Passphrase","minLength":1}},"required":["key","passphrase"]},"RomaniaEInvoiceUpdateRequest":{"allOf":[{"$ref":"#/components/schemas/ScenarioUpdateRequest"},{"type":"object","properties":{"taxNumber":{"type":"string","description":"The company's unique Romanian fiscal registration code (Codul Fiscal or CUI).","examples":["1900101223457"]},"clientId":{"type":"string","description":"The client ID issued to your application by ANAF.","examples":["your_spv_client_id"]},"clientSecret":{"type":"string","format":"password","description":"The client secret issued to your application by ANAF."},"accessToken":{"type":"string","format":"password","description":"The OAuth 2.0 access token used to authorise all API calls to ANAF."},"accessTokenExpiry":{"type":"string","format":"date-time","description":"The expiration date and time of the access token, specified ISO 8601 format with a timezone offset. For example, 2025-01-09T10:00:00+02:00, where +02:00 is the time zone offset.","examples":["2024-12-10T10:30:00+02:00"]},"refreshToken":{"type":"string","format":"password","description":"The OAuth 2.0 refresh token used to automatically obtain a new access token from ANAF before the current one expires."},"refreshTokenExpiry":{"type":"string","format":"date-time","description":"The expiration date and time of the refresh token, specified ISO 8601 format with a timezone offset. For example, 2025-01-09T10:00:00+02:00, where +02:00 is the time zone offset.","examples":["2025-01-09T10:00:00+02:00"]}}}],"description":"Romania EInvoice Scenario UpdateRequest.","required":["accessToken","accessTokenExpiry","clientId","clientSecret","name","refreshToken","refreshTokenExpiry","taxNumber"]},"ScenarioName":{"type":"string","enum":["HUNGARY_EINVOICE","ROMANIA_EINVOICE","POLAND_EINVOICE","BELGIUM_EINVOICE","DENMARK_EINVOICE","NETHERLANDS_EINVOICE","NORWAY_EINVOICE","SWEDEN_EINVOICE","ESTONIA_EINVOICE","FINLAND_EINVOICE","GERMANY_EINVOICE"]},"ScenarioUpdateRequest":{"type":"object","description":"Object to update a scenario.","discriminator":{"propertyName":"name","mapping":{"ROMANIA_EINVOICE":"#/components/schemas/RomaniaEInvoiceUpdateRequest","HUNGARY_EINVOICE":"#/components/schemas/HungaryEInvoiceUpdateRequest","POLAND_EINVOICE":"#/components/schemas/PolandEInvoiceUpdateRequest","BELGIUM_EINVOICE":"#/components/schemas/BelgiumEInvoiceUpdateRequest","DENMARK_EINVOICE":"#/components/schemas/DenmarkEInvoiceUpdateRequest","NETHERLANDS_EINVOICE":"#/components/schemas/NetherlandsEInvoiceUpdateRequest","NORWAY_EINVOICE":"#/components/schemas/NorwayEInvoiceUpdateRequest","SWEDEN_EINVOICE":"#/components/schemas/SwedenEInvoiceUpdateRequest","ESTONIA_EINVOICE":"#/components/schemas/EstoniaEInvoiceUpdateRequest","FINLAND_EINVOICE":"#/components/schemas/FinlandEInvoiceUpdateRequest","GERMANY_EINVOICE":"#/components/schemas/GermanyEInvoiceUpdateRequest"}},"properties":{"name":{"$ref":"#/components/schemas/ScenarioName","description":"The unique name of the scenario type."}},"required":["name"]},"SwedenEInvoiceUpdateRequest":{"allOf":[{"$ref":"#/components/schemas/ScenarioUpdateRequest"},{"type":"object","properties":{"peppolParticipantIds":{"type":"array","items":{"type":"string","description":"List of Peppol Participant Ids."},"minItems":1,"uniqueItems":true},"emailAddressesForValidationErrors":{"type":"array","description":"List of email addresses for validation errors.","items":{"type":"string","maxLength":320,"minLength":6},"uniqueItems":true},"direction":{"$ref":"#/components/schemas/ConnectorDirection","description":"Direction of the connector.","examples":["BOTH","DELIVERY","FORWARDER"]}}}],"description":"Sweden E-Invoice Update Request","required":["direction","name"]},"ApprovalStatus":{"type":"string","enum":["PENDING","APPROVED","ERROR","REJECTED","FAILED","APPLIED"]},"ScenarioOperationResponse":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"The ID of the applied scenario.","example":"cd13fea0-2108-11f0-836c-d3d769f7e115"},"name":{"$ref":"#/components/schemas/ScenarioName"},"companyUuid":{"type":"string","format":"uuid","description":"The unique identifier of the company","example":"cd13fea0-2108-11f0-836c-d3d769f7e115"},"approvalUuid":{"type":"string","format":"uuid","description":"ID of this scenario request.","example":"cd13fea0-2108-11f0-836c-d3d769f7e115"},"approvalStatus":{"$ref":"#/components/schemas/ApprovalStatus","description":"The current status of the latest approval request.","examples":["PENDING","APPROVED","REJECTED"]},"rejectionReason":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["approvalUuid","createdAt","name","updatedAt"]},"APIConnectorUpdateRequest":{"allOf":[{"$ref":"#/components/schemas/ConnectorUpdateRequest"}],"description":"HTTPS Connector UpdateRequest.","required":["type"]},"BasicAuthRequest":{"type":"object","properties":{"username":{"type":"string"},"password":{"type":"string","format":"password"}},"required":["password","username"]},"ConnectorType":{"type":"string","enum":["MESSAGING_API","HTTPS"]},"ConnectorUpdateRequest":{"type":"object","discriminator":{"propertyName":"type","mapping":{"MESSAGING_API":"#/components/schemas/APIConnectorUpdateRequest","HTTPS":"#/components/schemas/HTTPSConnectorUpdateRequest"}},"properties":{"type":{"$ref":"#/components/schemas/ConnectorType","description":"Type of the connector.","enum":["MESSAGING_API","HTTPS"]}},"required":["type"]},"HTTPSConnectorUpdateRequest":{"allOf":[{"$ref":"#/components/schemas/ConnectorUpdateRequest"},{"type":"object","properties":{"url":{"type":"string","description":"HTTPS URL the connector communicates with."},"basicAuth":{"$ref":"#/components/schemas/BasicAuthRequest","description":"Credentials for basic HTTPS authentication."},"additionalHeaders":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional header properties for the fetching connector."},"oauth2":{"$ref":"#/components/schemas/Oauth2Request"}}}],"description":"HTTPS Connector UpdateRequest.","required":["type"]},"Oauth2Request":{"type":"object","properties":{"authorizationUrl":{"type":"string","minLength":1},"clientId":{"type":"string","minLength":1},"clientSecret":{"type":"string","format":"password"},"additionalParameters":{"type":"string"}},"required":["authorizationUrl","clientId","clientSecret"]},"ConnectorUpdateResponse":{"type":"object","properties":{"managedConnectorUuid":{"type":"string","format":"uuid","description":"External ID of the retrieved connector.","example":"cd13fea0-2108-11f0-836c-d3d769f7e115"},"connectorUuid":{"type":"string","format":"uuid","description":"Internal ID of the retrieved connector.","example":"cd13fea0-2108-11f0-836c-d3d769f7e115"},"type":{"$ref":"#/components/schemas/ConnectorType","description":"Type of the connector.","enum":["MESSAGING_API","HTTPS"]},"approvalUuid":{"type":"string","format":"uuid","description":"ID of this connector request.","example":"cd13fea0-2108-11f0-836c-d3d769f7e115"},"approvalStatus":{"$ref":"#/components/schemas/ApprovalStatus","description":"The current status of the latest approval request.","examples":["PENDING","APPROVED","REJECTED"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["approvalUuid","createdAt","type","updatedAt"]},"ConnectorCompaniesRequest":{"type":"object","properties":{"companyUuids":{"type":"array","description":"List of company IDs.","example":["7a7e8b6b-4e6f-4d2a-8b8c-1e2f3d4a5b6c","a1b2c3d4-e5f6-a7b8-c9d0-e1f2a3b4c5d6"],"items":{"type":"string"},"uniqueItems":true}}},"CompanyAlias":{"type":"object","properties":{"name":{"type":"string","description":"An alternate name or alias the company is known by. This value must be unique across all aliases.","maxLength":255,"minLength":9},"description":{"type":"string","description":"Description of the company alias.","maxLength":255,"minLength":0},"type":{"type":"string","description":"Type of the alias","enum":["GLN","EMAIL_INBOUND_PARTICIPANT_ID","PEPPOL_SENDER_PARTICIPANT_ID","PRIMARY"]}}},"CompanyOperationRequest":{"type":"object","properties":{"companyName":{"type":"string","description":"Name of the company.","example":"My Company Inc.","maxLength":255,"minLength":3},"email":{"type":"string","format":"email","description":"The email address of the company's main person of contact","example":"johndoe@example.com","maxLength":320,"minLength":6},"language":{"type":"string","description":"The language of the company's main person of contact, in ISO 639-1 format.","example":"en"},"aliases":{"type":"array","description":"Unique aliases to identify the company.","items":{"$ref":"#/components/schemas/CompanyAlias"},"minItems":1,"uniqueItems":true},"parentCompanyUuid":{"type":"string","format":"uuid","description":"ID of the parent company. This can be the external or internal identifier.","example":"cd13fea0-2108-11f0-836c-d3d769f7e115"}},"required":["aliases"]},"CompanyOperationResponse":{"type":"object","properties":{"managedCompanyUuid":{"type":"string","format":"uuid","description":"The external unique identifier for this company","example":"cd13fea0-2108-11f0-836c-d3d769f7e115"},"approvalUuid":{"type":"string","format":"uuid","description":"The unique identifier for this operation that needs to be approved","example":"cd13fea0-2108-11f0-836c-d3d769f7e115"}},"required":["approvalUuid","managedCompanyUuid"]},"APIConnectorCreateRequest":{"allOf":[{"$ref":"#/components/schemas/ConnectorCreateRequest"}],"description":"HTTPS Connector CreateRequest.","required":["direction","multiTenant","type"]},"ConnectorCreateRequest":{"type":"object","discriminator":{"propertyName":"type","mapping":{"MESSAGING_API":"#/components/schemas/APIConnectorCreateRequest","HTTPS":"#/components/schemas/HTTPSConnectorCreateRequest"}},"properties":{"type":{"$ref":"#/components/schemas/ConnectorType","description":"Type of the connector.","enum":["MESSAGING_API","HTTPS"]},"direction":{"$ref":"#/components/schemas/ConnectorDirection","description":"Direction of the connector.","examples":["BOTH","DELIVERY","FORWARDER"]},"companyUuids":{"type":"array","description":"List of company IDs separated by commas.","items":{"type":"string"},"uniqueItems":true},"multiTenant":{"type":"boolean","description":"If true, indicates the connector is multi-tenant."}},"required":["direction","multiTenant","type"]},"HTTPSConnectorCreateRequest":{"allOf":[{"$ref":"#/components/schemas/ConnectorCreateRequest"},{"type":"object","properties":{"url":{"type":"string","description":"HTTPS URL the connector communicates with."},"basicAuth":{"$ref":"#/components/schemas/BasicAuthRequest","description":"Credentials for basic HTTPS authentication."},"additionalHeaders":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional header properties for the forwarding connector."},"oauth2":{"$ref":"#/components/schemas/Oauth2Request"}}}],"description":"HTTPS Connector CreateRequest.","required":["direction","multiTenant","type"]},"APIConnectorOperationResponse":{"allOf":[{"$ref":"#/components/schemas/ConnectorOperationResponse"},{"type":"object","properties":{"userId":{"type":"string"},"userKey":{"type":"string","format":"password"}}}],"required":["approvalUuid","createdAt","type","updatedAt","userId","userKey"]},"BasicAuthOperationResponse":{"type":"object","properties":{"username":{"type":"string"},"password":{"type":"string","format":"password"}},"required":["password","username"]},"ConnectorOperationResponse":{"type":"object","description":"Base representation of a connector.","discriminator":{"propertyName":"type","mapping":{"MESSAGING_API":"#/components/schemas/APIConnectorOperationResponse","HTTPS":"#/components/schemas/HTTPSConnectorOperationResponse"}},"properties":{"managedConnectorUuid":{"type":"string","format":"uuid","description":"External ID of the retrieved connector.","example":"cd13fea0-2108-11f0-836c-d3d769f7e115"},"connectorUuid":{"type":"string","format":"uuid","description":"Internal ID of the retrieved connector.","example":"cd13fea0-2108-11f0-836c-d3d769f7e115"},"type":{"$ref":"#/components/schemas/ConnectorType","description":"Type of the connector.","enum":["MESSAGING_API","HTTPS"]},"approvalUuid":{"type":"string","format":"uuid","description":"ID of this connector request.","example":"cd13fea0-2108-11f0-836c-d3d769f7e115"},"approvalStatus":{"$ref":"#/components/schemas/ApprovalStatus","description":"The current status of the latest approval request.","examples":["PENDING","APPROVED","REJECTED"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["approvalUuid","createdAt","type","updatedAt"]},"HTTPSConnectorOperationResponse":{"allOf":[{"$ref":"#/components/schemas/ConnectorOperationResponse"},{"type":"object","properties":{"basicAuth":{"$ref":"#/components/schemas/BasicAuthOperationResponse"},"oAuth2":{"$ref":"#/components/schemas/Oauth2Response"}}}],"required":["approvalUuid","createdAt","type","updatedAt"]},"Oauth2Response":{"type":"object","properties":{"authorizationUrl":{"type":"string","minLength":1},"clientId":{"type":"string","minLength":1},"additionalParameters":{"type":"string"}},"required":["authorizationUrl","clientId"]},"BelgiumEInvoiceCreateRequest":{"allOf":[{"$ref":"#/components/schemas/ScenarioCreateRequest"},{"type":"object","properties":{"peppolParticipantIds":{"type":"array","items":{"type":"string","description":"List of Peppol Participant Ids."},"minItems":1,"uniqueItems":true},"emailAddressesForValidationErrors":{"type":"array","description":"List of email addresses for validation errors.","items":{"type":"string","maxLength":320,"minLength":6},"uniqueItems":true},"direction":{"$ref":"#/components/schemas/ConnectorDirection","description":"Direction of the connector.","examples":["BOTH","DELIVERY","FORWARDER"]}}}],"description":"Belgium E-Invoice Create Request","required":["direction","name"]},"DenmarkEInvoiceCreateRequest":{"allOf":[{"$ref":"#/components/schemas/ScenarioCreateRequest"},{"type":"object","properties":{"peppolParticipantIds":{"type":"array","items":{"type":"string","description":"List of Peppol Participant Ids."},"minItems":1,"uniqueItems":true},"emailAddressesForValidationErrors":{"type":"array","description":"List of email addresses for validation errors.","items":{"type":"string","maxLength":320,"minLength":6},"uniqueItems":true},"direction":{"$ref":"#/components/schemas/ConnectorDirection","description":"Direction of the connector.","examples":["BOTH","DELIVERY","FORWARDER"]}}}],"description":"Denmark E-Invoice Create Request","required":["direction","name"]},"EstoniaEInvoiceCreateRequest":{"allOf":[{"$ref":"#/components/schemas/ScenarioCreateRequest"},{"type":"object","properties":{"peppolParticipantIds":{"type":"array","items":{"type":"string","description":"List of Peppol Participant Ids."},"minItems":1,"uniqueItems":true},"emailAddressesForValidationErrors":{"type":"array","description":"List of email addresses for validation errors.","items":{"type":"string","maxLength":320,"minLength":6},"uniqueItems":true},"direction":{"$ref":"#/components/schemas/ConnectorDirection","description":"Direction of the connector.","examples":["BOTH","DELIVERY","FORWARDER"]}}}],"description":"Estonia E-Invoice Create Request","required":["direction","name"]},"FinlandEInvoiceCreateRequest":{"allOf":[{"$ref":"#/components/schemas/ScenarioCreateRequest"},{"type":"object","properties":{"peppolParticipantIds":{"type":"array","items":{"type":"string","description":"List of Peppol Participant Ids."},"minItems":1,"uniqueItems":true},"emailAddressesForValidationErrors":{"type":"array","description":"List of email addresses for validation errors.","items":{"type":"string","maxLength":320,"minLength":6},"uniqueItems":true},"direction":{"$ref":"#/components/schemas/ConnectorDirection","description":"Direction of the connector.","examples":["BOTH","DELIVERY","FORWARDER"]}}}],"description":"Finland E-Invoice Create Request","required":["direction","name"]},"GermanyEInvoiceCreateRequest":{"allOf":[{"$ref":"#/components/schemas/ScenarioCreateRequest"},{"type":"object","properties":{"peppolParticipantIds":{"type":"array","items":{"type":"string","description":"List of Peppol Participant Ids."},"minItems":1,"uniqueItems":true},"emailAddressesForValidationErrors":{"type":"array","description":"List of email addresses for validation errors.","items":{"type":"string","maxLength":320,"minLength":6},"uniqueItems":true},"direction":{"$ref":"#/components/schemas/ConnectorDirection","description":"Direction of the connector.","examples":["BOTH","DELIVERY","FORWARDER"]}}}],"description":"Germany E-Invoice Create Request","required":["direction","name"]},"HungaryEInvoiceCreateRequest":{"allOf":[{"$ref":"#/components/schemas/ScenarioCreateRequest"},{"type":"object","properties":{"taxNumber":{"type":"string","description":"The first 8 digits of the tax number belonging to the taxpayer that registered and owns the Technical User Account for the NAV Online Invoice System.","examples":["12345678"]},"username":{"type":"string","description":"The username of the Technical User Account registered with the NAV Online Invoice System.","examples":["my_nav_tech_user"]},"password":{"type":"string","format":"password","description":"The password for the Technical User Account registered with the NAV Online Invoice System."},"signatureKey":{"type":"string","format":"password","description":"The signature key generated within the NAV system that's associated with the Technical User Account."},"encryptionKey":{"type":"string","format":"password","description":"The encryption key generated within the NAV system that's associated with the Technical User Account."},"softwareId":{"type":"string","description":"The unique identifier of the software being used to connect to the NAV Online Invoice System. This ID must be registered by the taxpayer.","examples":["MY_CUSTOM_ERP_V1_2"]}}}],"description":"Hungary EInvoice Scenario CreateRequest.","required":["encryptionKey","name","password","signatureKey","softwareId","taxNumber","username"]},"NetherlandsEInvoiceCreateRequest":{"allOf":[{"$ref":"#/components/schemas/ScenarioCreateRequest"},{"type":"object","properties":{"peppolParticipantIds":{"type":"array","items":{"type":"string","description":"List of Peppol Participant Ids."},"minItems":1,"uniqueItems":true},"emailAddressesForValidationErrors":{"type":"array","description":"List of email addresses for validation errors.","items":{"type":"string","maxLength":320,"minLength":6},"uniqueItems":true},"direction":{"$ref":"#/components/schemas/ConnectorDirection","description":"Direction of the connector.","examples":["BOTH","DELIVERY","FORWARDER"]}}}],"description":"Netherlands E-Invoice Create Request","required":["direction","name"]},"NorwayEInvoiceCreateRequest":{"allOf":[{"$ref":"#/components/schemas/ScenarioCreateRequest"},{"type":"object","properties":{"peppolParticipantIds":{"type":"array","items":{"type":"string","description":"List of Peppol Participant Ids."},"minItems":1,"uniqueItems":true},"emailAddressesForValidationErrors":{"type":"array","description":"List of email addresses for validation errors.","items":{"type":"string","maxLength":320,"minLength":6},"uniqueItems":true},"direction":{"$ref":"#/components/schemas/ConnectorDirection","description":"Direction of the connector.","examples":["BOTH","DELIVERY","FORWARDER"]}}}],"description":"Norway E-Invoice Create Request","required":["direction","name"]},"PolandEInvoiceCreateRequest":{"allOf":[{"$ref":"#/components/schemas/ScenarioCreateRequest"},{"type":"object","properties":{"taxNumber":{"type":"string","description":"The company's unique tax identifier, without 'PL' prefix.","examples":["1900101223"],"pattern":"^\\d{10}$"},"ksefToken":{"type":"string","description":"KSeF token ","examples":["1900101223"]},"digitalCertificate":{"$ref":"#/components/schemas/KeyStore","description":"The Digital Certificate and the corresponding Private Key"},"offlineDigitalCertificate":{"$ref":"#/components/schemas/KeyStore","description":"The offline Digital Certificate and the corresponding Private Key"}}}],"description":"Poland EInvoice Scenario CreateRequest.","required":["name","taxNumber"]},"RomaniaEInvoiceCreateRequest":{"allOf":[{"$ref":"#/components/schemas/ScenarioCreateRequest"},{"type":"object","properties":{"taxNumber":{"type":"string","description":"The company's unique Romanian fiscal registration code (Codul Fiscal or CUI).","examples":["1900101223457"]},"clientId":{"type":"string","description":"The client ID issued to your application by ANAF.","examples":["your_spv_client_id"]},"clientSecret":{"type":"string","format":"password","description":"The client secret issued to your application by ANAF."},"accessToken":{"type":"string","format":"password","description":"The OAuth 2.0 access token used to authorise all API calls to ANAF."},"accessTokenExpiry":{"type":"string","format":"date-time","description":"The expiration date and time of the access token, specified ISO 8601 format with a timezone offset. For example, 2025-01-09T10:00:00+02:00, where +02:00 is the time zone offset.","examples":["2024-12-10T10:30:00+02:00"]},"refreshToken":{"type":"string","format":"password","description":"The OAuth 2.0 refresh token used to automatically obtain a new access token from ANAF before the current one expires."},"refreshTokenExpiry":{"type":"string","format":"date-time","description":"The expiration date and time of the refresh token, specified ISO 8601 format with a timezone offset. For example, 2025-01-09T10:00:00+02:00, where +02:00 is the time zone offset.","examples":["2025-01-09T10:00:00+02:00"]}}}],"description":"Romania EInvoice Scenario CreateRequest.","required":["accessToken","accessTokenExpiry","clientId","clientSecret","name","refreshToken","refreshTokenExpiry","taxNumber"]},"ScenarioCreateRequest":{"type":"object","description":"Base ScenarioCreateRequest.","discriminator":{"propertyName":"name","mapping":{"ROMANIA_EINVOICE":"#/components/schemas/RomaniaEInvoiceCreateRequest","HUNGARY_EINVOICE":"#/components/schemas/HungaryEInvoiceCreateRequest","POLAND_EINVOICE":"#/components/schemas/PolandEInvoiceCreateRequest","BELGIUM_EINVOICE":"#/components/schemas/BelgiumEInvoiceCreateRequest","DENMARK_EINVOICE":"#/components/schemas/DenmarkEInvoiceCreateRequest","NETHERLANDS_EINVOICE":"#/components/schemas/NetherlandsEInvoiceCreateRequest","NORWAY_EINVOICE":"#/components/schemas/NorwayEInvoiceCreateRequest","SWEDEN_EINVOICE":"#/components/schemas/SwedenEInvoiceCreateRequest","ESTONIA_EINVOICE":"#/components/schemas/EstoniaEInvoiceCreateRequest","FINLAND_EINVOICE":"#/components/schemas/FinlandEInvoiceCreateRequest","GERMANY_EINVOICE":"#/components/schemas/GermanyEInvoiceCreateRequest"}},"properties":{"name":{"$ref":"#/components/schemas/ScenarioName","description":"The unique name of the scenario type."}},"required":["name"]},"SwedenEInvoiceCreateRequest":{"allOf":[{"$ref":"#/components/schemas/ScenarioCreateRequest"},{"type":"object","properties":{"peppolParticipantIds":{"type":"array","items":{"type":"string","description":"List of Peppol Participant Ids."},"minItems":1,"uniqueItems":true},"emailAddressesForValidationErrors":{"type":"array","description":"List of email addresses for validation errors.","items":{"type":"string","maxLength":320,"minLength":6},"uniqueItems":true},"direction":{"$ref":"#/components/schemas/ConnectorDirection","description":"Direction of the connector.","examples":["BOTH","DELIVERY","FORWARDER"]}}}],"description":"Sweden E-Invoice Create Request","required":["direction","name"]},"CertificateResponse":{"type":"object","properties":{"expiry":{"type":"string","format":"date-time","description":"The expiration date of the Offline Digital Certificate","examples":["2025-01-09T10:00:00+02:00"],"minLength":1},"serialNumber":{"type":"string","minLength":1}},"required":["expiry","serialNumber"]},"HungaryEInvoiceRetrievalResponse":{"allOf":[{"$ref":"#/components/schemas/ScenarioResponse"},{"type":"object","properties":{"taxNumber":{"type":"string","description":"The first 8 digits of the tax number belonging to the taxpayer that registered and owns the Technical User Account for the NAV Online Invoice System.","examples":["12345678"]},"username":{"type":"string","description":"The username of the Technical User Account registered with the NAV Online Invoice System.","examples":["my_nav_tech_user"]},"softwareId":{"type":"string","description":"The unique identifier of the software being used to connect to the NAV Online Invoice System. This ID must be registered by the taxpayer.","examples":["MY_CUSTOM_ERP_V1_2"]}}}],"required":["approvalUuid","createdAt","name","softwareId","taxNumber","updatedAt","username"]},"PeppolCountryEInvoiceRetrievalResponse":{"allOf":[{"$ref":"#/components/schemas/ScenarioResponse"},{"type":"object","properties":{"peppolParticipantIds":{"type":"array","items":{"type":"string"}},"emailAddressesForValidationErrors":{"type":"array","items":{"type":"string"}},"direction":{"$ref":"#/components/schemas/ConnectorDirection"}}}],"required":["approvalUuid","createdAt","name","updatedAt"]},"PolandEInvoiceRetrievalResponse":{"allOf":[{"$ref":"#/components/schemas/ScenarioResponse"},{"type":"object","properties":{"taxNumber":{"type":"string","description":"The company's unique tax identifier, without 'PL' prefix.","examples":["1900101223"],"pattern":"^\\d{10}$"},"digitalCertificate":{"$ref":"#/components/schemas/CertificateResponse","description":"The details of the Digital Certificate"},"offlineDigitalCertificate":{"$ref":"#/components/schemas/CertificateResponse","description":"The details of the Offline Digital Certificate"}}}],"required":["approvalUuid","createdAt","name","taxNumber","updatedAt"]},"RomaniaEInvoiceRetrievalResponse":{"allOf":[{"$ref":"#/components/schemas/ScenarioResponse"},{"type":"object","properties":{"taxNumber":{"type":"string","description":"The company's unique Romanian fiscal registration code (Codul Fiscal or CUI).","examples":["1900101223457"]},"clientId":{"type":"string","description":"The client ID issued to your application by ANAF.","examples":["your_spv_client_id"]},"accessTokenExpiry":{"type":"string","format":"date-time","description":"The expiration date and time of the access token, specified ISO 8601 format with a timezone offset. For example, 2025-01-09T10:00:00+02:00, where +02:00 is the time zone offset.","examples":["2024-12-10T10:30:00+02:00"]},"refreshTokenExpiry":{"type":"string","format":"date-time","description":"The expiration date and time of the refresh token, specified ISO 8601 format with a timezone offset. For example, 2025-01-09T10:00:00+02:00, where +02:00 is the time zone offset.","examples":["2025-01-09T10:00:00+02:00"]}}}],"required":["accessTokenExpiry","approvalUuid","clientId","createdAt","name","refreshTokenExpiry","taxNumber","updatedAt"]},"ScenarioResponse":{"type":"object","description":"Base ScenarioResponse.","discriminator":{"propertyName":"name","mapping":{"ROMANIA_EINVOICE":"#/components/schemas/RomaniaEInvoiceRetrievalResponse","HUNGARY_EINVOICE":"#/components/schemas/HungaryEInvoiceRetrievalResponse","POLAND_EINVOICE":"#/components/schemas/PolandEInvoiceRetrievalResponse","BELGIUM_EINVOICE":"#/components/schemas/PeppolCountryEInvoiceRetrievalResponse","DENMARK_EINVOICE":"#/components/schemas/PeppolCountryEInvoiceRetrievalResponse","NETHERLANDS_EINVOICE":"#/components/schemas/PeppolCountryEInvoiceRetrievalResponse","NORWAY_EINVOICE":"#/components/schemas/PeppolCountryEInvoiceRetrievalResponse","SWEDEN_EINVOICE":"#/components/schemas/PeppolCountryEInvoiceRetrievalResponse","ESTONIA_EINVOICE":"#/components/schemas/PeppolCountryEInvoiceRetrievalResponse","FINLAND_EINVOICE":"#/components/schemas/PeppolCountryEInvoiceRetrievalResponse","GERMANY_EINVOICE":"#/components/schemas/PeppolCountryEInvoiceRetrievalResponse"}},"properties":{"uuid":{"type":"string","format":"uuid","description":"The ID of the applied scenario.","example":"cd13fea0-2108-11f0-836c-d3d769f7e115"},"name":{"$ref":"#/components/schemas/ScenarioName"},"companyUuid":{"type":"string","format":"uuid","description":"The unique identifier of the company","example":"cd13fea0-2108-11f0-836c-d3d769f7e115"},"approvalUuid":{"type":"string","format":"uuid","description":"ID of this scenario request.","example":"cd13fea0-2108-11f0-836c-d3d769f7e115"},"approvalStatus":{"$ref":"#/components/schemas/ApprovalStatus","description":"The current status of the latest approval request.","examples":["PENDING","APPROVED","REJECTED"]},"rejectionReason":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["approvalUuid","createdAt","name","updatedAt"]},"APIConnectorRetrievalResponse":{"allOf":[{"$ref":"#/components/schemas/ConnectorRetrievalResponse"},{"type":"object","properties":{"userId":{"type":"string"}}}],"required":["approvalUuid","createdAt","type","updatedAt"]},"BasicAuthResponse":{"type":"object","properties":{"username":{"type":"string"}},"required":["username"]},"ConnectorRetrievalPageResponse":{"type":"object","properties":{"content":{"type":"array","description":"List of items for the current page.","items":{"oneOf":[{"$ref":"#/components/schemas/APIConnectorRetrievalResponse"},{"$ref":"#/components/schemas/HTTPSConnectorRetrievalResponse"}]}},"totalPages":{"type":"integer","format":"int32","description":"Total number of pages.","example":2},"totalElements":{"type":"integer","format":"int64","description":"Total number of items in the entire collection.","example":62},"numberOfElements":{"type":"integer","format":"int32","description":"Number of items for the current page.","example":12},"pageSize":{"type":"integer","format":"int32","description":"Number of items requested per page.","example":50},"pageNumber":{"type":"integer","format":"int32","description":"Current page number (0-indexed). The first page is 0.","example":1}},"required":["content","numberOfElements","pageNumber","pageSize","totalElements","totalPages"]},"ConnectorRetrievalResponse":{"type":"object","description":"Base representation of a connector.","discriminator":{"propertyName":"type","mapping":{"MESSAGING_API":"#/components/schemas/APIConnectorRetrievalResponse","HTTPS":"#/components/schemas/HTTPSConnectorRetrievalResponse"}},"properties":{"managedConnectorUuid":{"type":"string","format":"uuid","description":"External ID of the retrieved connector.","example":"cd13fea0-2108-11f0-836c-d3d769f7e115"},"connectorUuid":{"type":"string","format":"uuid","description":"Internal ID of the retrieved connector.","example":"cd13fea0-2108-11f0-836c-d3d769f7e115"},"type":{"$ref":"#/components/schemas/ConnectorType","description":"Type of the connector.","enum":["MESSAGING_API","HTTPS"]},"approvalUuid":{"type":"string","format":"uuid","description":"ID of this connector request.","example":"cd13fea0-2108-11f0-836c-d3d769f7e115"},"approvalStatus":{"$ref":"#/components/schemas/ApprovalStatus","description":"The current status of the latest approval request.","examples":["PENDING","APPROVED","REJECTED"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"companyUuids":{"type":"array","description":"List of managed company IDs associated with this connector. For single-tenant connectors, this is a single ID.","items":{"type":"string"}},"direction":{"$ref":"#/components/schemas/ConnectorDirection","description":"Direction of the connector.","example":"BOTH"},"multiTenant":{"type":"boolean","description":"If true, indicates the connector is multi-tenant."}},"required":["approvalUuid","createdAt","type","updatedAt"]},"HTTPSConnectorRetrievalResponse":{"allOf":[{"$ref":"#/components/schemas/ConnectorRetrievalResponse"},{"type":"object","properties":{"url":{"type":"string"},"basicAuth":{"$ref":"#/components/schemas/BasicAuthResponse"},"additionalHeaders":{"type":"object","additionalProperties":{"type":"string"}},"oauth2":{"$ref":"#/components/schemas/Oauth2Response"}}}],"required":["approvalUuid","createdAt","type","updatedAt"]},"CompanyRetrievalPageResponse":{"type":"object","properties":{"content":{"type":"array","description":"List of items for the current page.","items":{"$ref":"#/components/schemas/CompanyRetrievalResponse"}},"totalPages":{"type":"integer","format":"int32","description":"Total number of pages.","example":2},"totalElements":{"type":"integer","format":"int64","description":"Total number of items in the entire collection.","example":62},"numberOfElements":{"type":"integer","format":"int32","description":"Number of items for the current page.","example":12},"pageSize":{"type":"integer","format":"int32","description":"Number of items requested per page.","example":50},"pageNumber":{"type":"integer","format":"int32","description":"Current page number (0-indexed). The first page is 0.","example":1}},"required":["content","numberOfElements","pageNumber","pageSize","totalElements","totalPages"]},"CompanyRetrievalResponse":{"type":"object","properties":{"managedCompanyUuid":{"type":"string","format":"uuid","description":"The external unique identifier of the retrieved company","example":"cd13fea0-2108-11f0-836c-d3d769f7e115"},"companyUuid":{"type":"string","format":"uuid","description":"The internal unique identifier of the retrieved company. Can be used in the ecosio monitor or in the ecosio API.","example":"cd13fea0-2108-11f0-836c-d3d769f7e115"},"companyName":{"type":"string","description":"The name of the company","example":"My Company Inc."},"email":{"type":"string","format":"email","description":"The email address of the company's main person of contact","example":"johndoe@example.com"},"language":{"type":"string","description":"The language of the company's main person of contact, in ISO 639-1 format","example":"en"},"aliases":{"type":"array","description":"Unique aliases to identify the company","items":{"$ref":"#/components/schemas/CompanyAlias"},"uniqueItems":true},"parentCompanyUuid":{"type":"string","format":"uuid","description":"The unique identifier of the parent company. If parent company is not yet approved, it can be the external identifier (Managed-Company-UUID), otherwise the internal identifier (Company-UUID)","example":"cd13fea0-2108-11f0-836c-d3d769f7e115"},"approvalUuid":{"type":"string","format":"uuid","description":"ID of this company request.","example":"cd13fea0-2108-11f0-836c-d3d769f7e115"},"approvalStatus":{"$ref":"#/components/schemas/ApprovalStatus","description":"The current status of the latest approval request.","examples":["PENDING","APPROVED","REJECTED"]}}},"ApprovalStatusResponse":{"type":"object","properties":{"approvalUuid":{"type":"string","format":"uuid","description":"ID of the connector request.","example":"cd13fea0-2108-11f0-836c-d3d769f7e115"},"status":{"type":"string","description":"Status of the connector request.\n\n<table>\n  <tr>\n    <th>Status</th>\n    <th>Final</th>\n    <th>Description</th>\n  </tr>\n  <tr>\n    <td>APPLIED</td>\n    <td>Yes</td>\n    <td>The changes have been successfully applied to the connector.</td>\n  </tr>\n  <tr>\n    <td>FAILED</td>\n    <td>Yes</td>\n    <td>The changes failed to process or apply to the connector./td>\n  </tr>\n  <tr>\n    <td>PENDING</td>\n    <td>No</td>\n    <td>The connector's changes are awaiting approval and processing.</td>\n  </tr>\n  <tr>\n    <td>REJECTED</td>\n    <td>Yes</td>\n    <td>The connector's changes were rejected. Check the reason for details.</td>\n  </tr>\n</table>\n","enum":["APPLIED","FAILED","PENDING","REJECTED"],"example":"PENDING"},"reason":{"type":"string","description":"The reason for the unapproved status","example":"Information provided is incomplete"},"submittedAt":{"type":"string","format":"date-time","description":"Date and time the connector changes were submitted, specified in ISO 8601 format.","example":"2010-10-12T13:54:23.505Z"},"lastUpdatedAt":{"type":"string","format":"date-time","description":"Date and time the connector was last updated, specified in ISO 8601 format.","example":"2010-10-12T13:54:23.505Z"}},"required":["approvalUuid","lastUpdatedAt","status","submittedAt"]}},"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"},"X-APP-KEY":{"type":"apiKey","name":"X-APP-KEY","in":"header"}}}}