Embat API

Embat treasury management REST API. Manage bank connections, balances, transactions, payments, forecasts, accounting entries, contacts, and reconciliation, scoped per company.

OpenAPI Specification

embat-openapi-original.json Raw ↑
{"openapi":"3.1.0","info":{"title":"Embat 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"}},"paths":{"/authentication/token":{"post":{"tags":["Authentication"],"summary":"Generate access token","description":"Authenticates with `email`/`password` and returns a JWT `idToken` to use as a Bearer token in the `Authorization` header for every other request. The token expires 60 minutes after issuance; call this endpoint again with the same credentials to obtain a new one — there is no separate refresh endpoint. If `email` or `password` is missing or malformed, the validation error response never echoes back the submitted values.","operationId":"auth_token_authentication_token_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostAuthenticationRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostAuthenticationResponseSchema"}}}},"400":{"description":"The credentials could not be validated: unknown email, wrong password, disabled account, or too many failed attempts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"detail":"startDate is a date after endDate"}}}},"401":{"description":"The account has multi-factor authentication enabled, which this endpoint does not support.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"detail":"user not authorized"}}}},"500":{"description":"Unexpected error. Contact support if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"detail":"Internal server error"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accountingentries/{companyId}":{"get":{"tags":["AccountingEntries"],"summary":"List accounting entries","description":"Returns the accounting entries of a company, ordered by accounting date (most recent first). Results are paginated: use `limit` to control page size and pass the returned `nextPageToken` to fetch the next page. `startDate`/`endDate` filter by accounting date, and `startUpdatedAt`/`endUpdatedAt` filter by last modification time, useful for incremental synchronization. `startDate`/`startUpdatedAt` are inclusive, `endDate`/`endUpdatedAt` are exclusive, and each date range spans at most 90 days. If neither `startDate` nor `endDate` is given, only entries dated up to today are returned.","operationId":"list_accounting_entries_accountingentries__companyId__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}},{"name":"reconciled","in":"query","required":false,"schema":{"type":"boolean","description":"Filter by reconciliation status. `false` also matches entries that are not yet reconciled or have no status set.","title":"Reconciled"},"description":"Filter by reconciliation status. `false` also matches entries that are not yet reconciled or have no status set."},{"name":"accountingCode","in":"query","required":false,"schema":{"type":"string","description":"Filter by ledger account code (`accountingCode`).","title":"Accountingcode"},"description":"Filter by ledger account code (`accountingCode`)."},{"name":"accountingEntryCode","in":"query","required":false,"schema":{"type":"string","description":"Filter by `accountingEntryCode` (does not match `accountingEntryCodeId`).","title":"Accountingentrycode"},"description":"Filter by `accountingEntryCode` (does not match `accountingEntryCodeId`)."},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Only return entries dated on or after this date (inclusive). The range cannot exceed 90 days: if `endDate` is also given, the span between the two cannot exceed 90 days; if `endDate` is omitted, `startDate` cannot be more than 90 days in the past.","title":"Startdate"},"description":"Only return entries dated on or after this date (inclusive). The range cannot exceed 90 days: if `endDate` is also given, the span between the two cannot exceed 90 days; if `endDate` is omitted, `startDate` cannot be more than 90 days in the past."},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Only return entries dated before this date (exclusive). Combined with `startDate`, the range cannot exceed 90 days. If used without `startDate`, results start 90 days before this date.","title":"Enddate"},"description":"Only return entries dated before this date (exclusive). Combined with `startDate`, the range cannot exceed 90 days. If used without `startDate`, results start 90 days before this date."},{"name":"startUpdatedAt","in":"query","required":false,"schema":{"type":"string","format":"date-time","description":"Only return entries last modified on or after this timestamp (inclusive). The range cannot exceed 90 days: if `endUpdatedAt` is also given, the span between the two cannot exceed 90 days; if `endUpdatedAt` is omitted, `startUpdatedAt` cannot be more than 90 days in the past.","title":"Startupdatedat"},"description":"Only return entries last modified on or after this timestamp (inclusive). The range cannot exceed 90 days: if `endUpdatedAt` is also given, the span between the two cannot exceed 90 days; if `endUpdatedAt` is omitted, `startUpdatedAt` cannot be more than 90 days in the past."},{"name":"endUpdatedAt","in":"query","required":false,"schema":{"type":"string","format":"date-time","description":"Only return entries last modified before this timestamp (exclusive). Combined with `startUpdatedAt`, the range cannot exceed 90 days. If used without `startUpdatedAt`, results start 90 days before this timestamp.","title":"Endupdatedat"},"description":"Only return entries last modified before this timestamp (exclusive). Combined with `startUpdatedAt`, the range cannot exceed 90 days. If used without `startUpdatedAt`, results start 90 days before this timestamp."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":2000,"title":"Response length of objects limit","description":"Maximum number of objects to return in the response. Default 500, maximum 2000.","default":500},"description":"Maximum number of objects to return in the response. Default 500, maximum 2000."},{"name":"nextPageToken","in":"query","required":false,"schema":{"type":"string","title":"Pagination token","description":"Token to fetch the next page of results, taken from the `nextPageToken` returned by the previous request with the same filters. Omit it to fetch the first page. An invalid or malformed token is rejected with `404`."},"description":"Token to fetch the next page of results, taken from the `nextPageToken` returned by the previous request with the same filters. Omit it to fetch the first page. An invalid or malformed token is rejected with `404`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAccountingEntriesResponseSchema"}}}},"400":{"description":"Invalid date range: when only a start bound (`startDate` or `startUpdatedAt`) is given, it must not be in the future and cannot be more than 90 days in the past.","content":{"application/json":{"example":{"detail":"startDate is a date after endDate"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"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":"Company not found, invalid `nextPageToken`, or an invalid date range when both bounds are given (start after end, or a span of more than 90 days).","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"}}}}}},"post":{"tags":["AccountingEntries"],"summary":"Create accounting entry","description":"Creates a single accounting entry (one line of a general ledger journal). If `customId` is omitted, Embat auto-generates one; if the `customId` already exists, the entry is updated instead of duplicated (upsert). An entry always carries both an outflow side (`assetAmount`, stored with its sign inverted so negative means money out) and an inflow side (`liabilityAmount`, stored as sent); if you only send one, the other defaults to 0. If `description` is omitted, Embat generates one from the entry's identifier. Entries dated before the ledger account's configured start date are excluded from reconciliation matching.","operationId":"create_accounting_entry_accountingentries__companyId__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostAccountingEntriesRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertAccountingEntriesResponseSchema"}}}},"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"}}}},"500":{"description":"Unexpected error. Contact support if it persists.","content":{"application/json":{"example":{"detail":"Internal server error"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["AccountingEntries"],"summary":"Update accounting entries in bulk","description":"Updates one or more fields of several accounting entries, identified by `customId`, following the same rules as the single-entry update endpoint — including the `description` reset-when-omitted behavior. Entries whose `customId` does not match any existing entry are silently skipped; the call still returns `200` for the whole batch.","operationId":"update_accounting_entries_bulk_accountingentries__companyId__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkPatchAccountingEntriesRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpsertAccountingEntriesResponseSchema"}}}},"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"}}}},"500":{"description":"Unexpected error. Contact support if it persists.","content":{"application/json":{"example":{"detail":"Internal server error"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["AccountingEntries"],"summary":"Delete accounting entries in bulk","description":"Deletes several accounting entries in a single call, identified by `customId`. The call returns `200` immediately — even for `customId` values that do not match any existing entry — and entries may still briefly appear in `GET` results right after deletion.","operationId":"delete_accounting_entries_bulk_accountingentries__companyId__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteAccountingEntriesRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkModifyAccountingEntriesResponseSchema"}}}},"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"}}}},"500":{"description":"Unexpected error. Contact support if it persists.","content":{"application/json":{"example":{"detail":"Internal server error"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accountingentries/{companyId}/{customId}":{"get":{"tags":["AccountingEntries"],"summary":"Retrieve accounting entry","description":"Returns a single accounting entry by `customId`.","operationId":"retrieve_accounting_entry_accountingentries__companyId___customId__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"customId","in":"path","required":true,"schema":{"type":"string","title":"Customid"}},{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAccountingEntriesResponseSchema"}}}},"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":"Company not found, or no accounting entry matches the given `customId`.","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"}}}}}},"patch":{"tags":["AccountingEntries"],"summary":"Update accounting entry","description":"Updates one or more fields of an accounting entry identified by `customId`. Only the fields you send are changed — except `description`: if it is omitted, Embat resets it to an auto-generated value derived from the entry's identifier, overwriting any previously set custom description; resend the current value to keep it unchanged. Updating a `customId` that does not match any existing entry is a no-op: the call still returns `200` without creating or changing anything, and no `404` is raised.","operationId":"update_accounting_entry_accountingentries__companyId___customId__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"customId","in":"path","required":true,"schema":{"type":"string","title":"Customid"}},{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchAccountingEntriesRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertAccountingEntriesResponseSchema"}}}},"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"}}}},"500":{"description":"Unexpected error. Contact support if it persists.","content":{"application/json":{"example":{"detail":"Internal server error"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["AccountingEntries"],"summary":"Delete accounting entry","description":"Deletes an accounting entry by `customId`. The call returns `200` immediately — even if `customId` does not match any existing entry — and the entry may still briefly appear in `GET` results right after deletion.","operationId":"delete_accounting_entry_accountingentries__companyId___customId__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"customId","in":"path","required":true,"schema":{"type":"string","title":"Customid"}},{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModifyAccountingEntriesResponseSchema"}}}},"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"}}}},"500":{"description":"Unexpected error. Contact support if it persists.","content":{"application/json":{"example":{"detail":"Internal server error"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accountingentries/{companyId}/bulk":{"post":{"tags":["AccountingEntries"],"summary":"Create accounting entries in bulk","description":"Creates several accounting entries in a single call, following the same rules as the single entry creation endpoint. Entries sharing the same `customId` within the request are deduplicated and only the first occurrence is processed.","operationId":"create_accounting_entries_bulk_accountingentries__companyId__bulk_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkPostAccountingEntriesRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpsertAccountingEntriesResponseSchema"}}}},"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"}}}},"500":{"description":"Unexpected error. Contact support if it persists.","content":{"application/json":{"example":{"detail":"Internal server error"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accountingentries/accountingentrycode/{companyId}":{"delete":{"tags":["AccountingEntries"],"summary":"Delete accounting entries in bulk by entry code","description":"Deletes every accounting entry whose `accountingEntryCode` or `accountingEntryCodeId` matches one of the given codes. The call returns `200` immediately; matching entries may still briefly appear in `GET` results right after deletion.","operationId":"delete_accounting_entries_bulk_by_entry_code_accountingentries_accountingentrycode__companyId__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteAccountingEntriesEntryCodeRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkModifyAccountingEntriesResponseSchema"}}}},"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"}}}},"500":{"description":"Unexpected error. Contact support if it persists.","content":{"application/json":{"example":{"detail":"Internal server error"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accountingaccounts/{companyId}":{"get":{"tags":["AccountingAccounts"],"summary":"List accounting accounts","description":"Returns the accounting accounts (chart of accounts) of a company, including deactivated ones. Results are paginated: use `limit` to control page size and pass the returned `nextPageToken` to fetch the next page.","operationId":"list_accountings_accounts_accountingaccounts__companyId__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":2000,"title":"Response length of objects limit","description":"Maximum number of objects to return in the response. Default 500, maximum 2000.","default":500},"description":"Maximum number of objects to return in the response. Default 500, maximum 2000."},{"name":"nextPageToken","in":"query","required":false,"schema":{"type":"string","title":"Pagination token","description":"Token to fetch the next page of results, taken from the `nextPageToken` returned by the previous request with the same filters. Omit it to fetch the first page. An invalid or malformed token is rejected with `404`."},"description":"Token to fetch the next page of results, taken from the `nextPageToken` returned by the previous request with the same filters. Omit it to fetch the first page. An invalid or malformed token is rejected with `404`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAccountingsAccountsResponseSchema"}}}},"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":"Company not found, or invalid `nextPageToken`.","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"}}}}}},"post":{"tags":["AccountingAccounts"],"summary":"Create accounting account","description":"Creates an accounting account identified by `accountingCode`. If an account with the same `accountingCode` already exists, this call updates it instead of failing; if the submitted data is identical to the existing account, the call is a no-op. `accountingName` defaults to `accountingCode` when omitted. `type` is inferred from `accountingCode` when not sent, and an `accountingCode` starting with `572` is always classified as `banks` on creation regardless of the `type` sent — see the `type` field description. Once an account exists, `type` cannot be changed through this endpoint: any `type` sent for an existing account (including the `572` override) is silently ignored and only applies when the account is first created — use the update endpoints to change it. Recreating a previously deleted (deactivated) account does not reactivate it unless `active: true` is explicitly sent. Entries in `attributes` with an empty or missing `customId` or `value` are silently discarded.","operationId":"create_accountings_account_accountingaccounts__companyId__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostAccountingsAccountsRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertAccountingsAccountsResponseSchema"}}}},"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"}}}},"500":{"description":"Unexpected error. Contact support if it persists.","content":{"application/json":{"example":{"detail":"Internal server error"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["AccountingAccounts"],"summary":"Update accounting accounts in bulk","description":"Updates several accounting accounts in a single call, identified by `accountingCode`, following the same rules as the single update endpoint. Entries whose `accountingCode` does not match any existing account are silently skipped — the call returns `200` for the whole batch.","operationId":"update_accountings_accounts_bulk_accountingaccounts__companyId__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkPatchAccountingsAccountsRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpsertAccountingsAccountsResponseSchema"}}}},"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"}}}},"500":{"description":"Unexpected error. Contact support if it persists.","content":{"application/json":{"example":{"detail":"Internal server error"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["AccountingAccounts"],"summary":"Delete accounting accounts in bulk","description":"Deletes several accounting accounts in a single call, identified by `accountingCode`. Accounts are deactivated (`active` set to `false`) rather than permanently removed, and continue to appear in `GET`/list responses. The response includes an entry for every requested `accountingCode`, even ones that do not match an existing account — those are silently skipped with no error.","operationId":"delete_accountings_accounts_bulk_accountingaccounts__companyId__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteAccountingsAccountsRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkModifyAccountingsAccountsResponseSchema"}}}},"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"}}}},"500":{"description":"Unexpected error. Contact support if it persists.","content":{"application/json":{"example":{"detail":"Internal server error"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accountingaccounts/{companyId}/{accountingCode}":{"get":{"tags":["AccountingAccounts"],"summary":"Retrieve accounting account","description":"Returns a single accounting account by `accountingCode`, including deactivated accounts.","operationId":"retrieve_accountings_account_accountingaccounts__companyId___accountingCode__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"accountingCode","in":"path","required":true,"schema":{"type":"string","title":"Accountingcode"}},{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAccountingsAccountsResponseSchema"}}}},"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":"Company not found, or no accounting account matches the given `accountingCode`.","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"}}}}}},"patch":{"tags":["AccountingAccounts"],"summary":"Update accounting account","description":"Updates the active status, type, name, collective flag, additional info or attributes of an accounting account identified by `accountingCode`. Updating an `accountingCode` that does not match any existing account returns `200` without creating or changing anything — no `404` is raised. Sending an empty `additionalInfo` object leaves any previously stored metadata unchanged. Entries in `attributes` with an empty or missing `customId` or `value` are silently discarded.","operationId":"update_accountings_account_accountingaccounts__companyId___accountingCode__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"accountingCode","in":"path","required":true,"schema":{"type":"string","title":"Accountingcode"}},{"

# --- truncated at 32 KB (435 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/embat/refs/heads/main/openapi/embat-openapi-original.json