{"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.21","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"}},{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchAccountingsAccountsRequestSchema"}}}},"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"}}}}}},"delete":{"tags":["AccountingAccounts"],"summary":"Delete accounting account","description":"Deletes an accounting account by `accountingCode`. The account is deactivated (`active` set to `false`) rather than permanently removed, and continues to appear in `GET`/list responses. Deleting an `accountingCode` that does not match any existing account still returns `200` without error.","operationId":"delete_accountings_account_accountingaccounts__companyId___accountingCode__delete","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/ModifyAccountingsAccountsResponseSchema"}}}},"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}/bulk":{"post":{"tags":["AccountingAccounts"],"summary":"Create accounting accounts in bulk","description":"Creates several accounting accounts in a single call, following the same rules as the single account creation endpoint. Entries sharing the same `accountingCode` within the request are deduplicated and only the first occurrence is processed.","operationId":"create_accountings_accounts_bulk_accountingaccounts__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/BulkPostAccountingsAccountsRequestSchema"}}}},"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"}}}}}}},"/attributes/{companyId}":{"get":{"tags":["Attributes"],"summary":"List attributes","description":"Returns all attributes configured for a company, including their `values` when the attribute is of type `list`.","operationId":"list_attributes_attributes__companyId__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAttributesResponseSchema"}}}},"401":{"description":"Unauthorized. The bearer token is missing, invalid or expired.","content":{"application/json":{"example":{"detail":"user not authorized"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found. The requested resource or `companyId` does not exist.","content":{"application/json":{"example":{"detail":"0021 companyId not found"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Attributes"],"summary":"Create attribute","description":"Creates an attribute. If `customId` is omitted, Embat auto-generates one. If an attribute with the given `customId` already exists, its fields are overwritten instead of raising a duplicate error — this endpoint behaves as an upsert. Sending `values` replaces the attribute's full value list, and **omitting `values` on an existing attribute removes all of its current values** — always resend the values you want to keep.","operationId":"create_attribute_attributes__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/PostAttributesRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertAttributesResponseSchema"}}}},"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 `parentCustomId` does not match an existing attribute.","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":["Attributes"],"summary":"Update attributes in bulk","description":"Updates several attributes in a single call, following the same rules as the single attribute update endpoint. Entries whose `customId` does not match any attribute are silently skipped — the call still returns `200` for the whole batch.","operationId":"update_attributes_bulk_attributes__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/BulkPatchAttributesRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpsertAttributesResponseSchema"}}}},"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 a `parentCustomId` does not match an existing attribute.","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":["Attributes"],"summary":"Delete attributes in bulk","description":"Deletes several attributes in a single call, following the same rules as the single attribute deletion endpoint. `customId` values that do not match any attribute still return `200` — no `404` is raised — and each returned `id` is derived from the requested `customId`, so an entry in the response does not confirm that an attribute existed or was removed.","operationId":"delete_attributes_bulk_attributes__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/BulkDeleteAttributesRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkModifyAttributesResponseSchema"}}}},"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"}}}}}}},"/attributes/{companyId}/{customId}":{"get":{"tags":["Attributes"],"summary":"Retrieve attribute","description":"Returns a single attribute by `customId`.","operationId":"retrieve_attribute_attributes__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/GetAttributesResponseSchema"}}}},"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 attribute 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":["Attributes"],"summary":"Update attribute","description":"Updates an attribute identified by `customId`. Only the fields sent in the request are changed; fields left out keep their current value. If `values` is sent, it **replaces** the attribute's full value list — any previously stored value not included is removed (omit `values` entirely to leave the current values untouched). Updating a `customId` that does not match any attribute returns `200` without applying any change — no `404` is raised.","operationId":"update_attribute_attributes__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/PatchAttributesRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertAttributesResponseSchema"}}}},"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 `parentCustomId` does not match an existing attribute.","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":["Attributes"],"summary":"Delete attribute","description":"Deletes an attribute by `customId`, together with all of its values, and clears the `parentId`/`parentCustomId` of any attribute nested under it. Deleting a `customId` that does not match any attribute still returns `200` — no `404` is raised — and the `id` returned in that case is derived from the requested `customId`, so it does not confirm that an attribute existed or was removed.","operationId":"delete_attribute_attributes__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/ModifyAttributesResponseSchema"}}}},"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"}}}}}}},"/attributes/{companyId}/bulk":{"post":{"tags":["Attributes"],"summary":"Create attributes in bulk","description":"Creates several attributes in a single call, following the same rules as the single attribute creation endpoint (upsert by `customId`; omitting `values` on an existing attribute removes all of its current values).","operationId":"create_attributes_bulk_attributes__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/BulkPostAttributesRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpsertAttributesResponseSchema"}}}},"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 a `parentCustomId` does not match an existing attribute.","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"}}}}}}},"/attributes/{companyId}/{customId}/values/bulk":{"post":{"tags":["Attributes"],"summary":"Add values to an attribute","description":"Adds values to an existing attribute, identified by `customId`, without affecting its other values. If a value with the same `customId` already exists on the attribute, it is replaced. This endpoint does not verify that the attribute exists beforehand.","operationId":"add_attribute_values_attributes__companyId___customId__values_bulk_post","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/BulkPostAttributesValuesRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpsertAttributesResponseSchema"}}}},"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"}}}}}}},"/attributes/{companyId}/{customId}/values":{"delete":{"tags":["Attributes"],"summary":"Remove values from an attribute","description":"Removes one or more values from an attribute, identified by `customId`. Values not found on the attribute are silently ignored — the call still returns `200`. The `id` returned for each entry is the value's `customId` echoed back, not a generated Embat ID.","operationId":"remove_attribute_values_attributes__companyId___customId__values_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"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteAttributesRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkModifyAttributesResponseSchema"}}}},"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"}}}}}}},"/banks/{companyId}":{"get":{"tags":["Banks"],"summary":"List banks","description":"Returns the company's bank relationships. A bank relationship with no products at all is silently excluded from the results. For each relationship, `bankProducts` only lists its active products — products marked inactive, or that Embat can no longer match to an account, are silently excluded from that array.","operationId":"list_banks_banks__companyId__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListBanksResponseSchema"}}}},"401":{"description":"Unauthorized. The bearer token is missing, invalid or expired.","content":{"application/json":{"example":{"detail":"user not authorized"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found. The requested resource or `companyId` does not exist.","content":{"application/json":{"example":{"detail":"0021 companyId not found"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/banks/{companyId}/{id}":{"get":{"tags":["Banks"],"summary":"Retrieve bank","description":"Returns a single bank relationship by its Embat `id`. Unlike the list endpoint, this always returns the relationship even when it currently has no active products, in which case `bankProducts` is an empty list.","operationId":"retrieve_bank_banks__companyId___id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}},{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBanksResponseSchema"}}}},"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 bank relationship matches the given `id`.","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"}}}}}}},"/balances/{companyId}":{"get":{"tags":["Balances"],"summary":"List balances","description":"Returns the end-of-day balances of a company's bank products (accounts), one entry per product per day. Results are paginated: use `limit` to control page size and pass the returned `nextPageToken` to fetch the next page. `startDate`/`endDate` filter by balance date; `startDate` is inclusive and `endDate` is exclusive, and when only one bound is given the range is capped at 90 days. If neither is given, all available balances are returned, paginated. Balances whose linked bank product no longer exists are excluded from the results.","operationId":"list_balances_balances__companyId__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}},{"name":"productId","in":"query","required":false,"schema":{"type":"string","description":"Filter balances of a single bank product (account) by its Embat product ID.","title":"Productid"},"description":"Filter balances of a single bank product (account) by its Embat product ID."},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Only return balances 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 balances 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 balances 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 balances 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":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"title":"Response length of objects limit","description":"Maximum number of objects to return in the response. Default 500, maximum 5000.","default":500},"description":"Maximum number of objects to return in the response. Default 500, maximum 5000."},{"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."},"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."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListBalancesResponseSchema"}}}},"400":{"description":"Invalid date range: when only a start bound (`startDate`) 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, unknown `nextPageToken`, or an invalid date range when both `startDate` and `endDate` 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"}}}}}}},"/balances/{companyId}/{id}":{"get":{"tags":["Balances"],"summary":"Retrieve balance","description":"Returns a single balance by its Embat `id`.","operationId":"retrieve_balance_balances__companyId___id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}},{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBalancesResponseSchema"}}}},"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, no balance matches the given `id`, or the balance's linked bank product no longer exists.","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"}}}}}}},"/companies":{"get":{"tags":["Companies"],"summary":"List user companies","description":"Returns the companies your credentials have access to. Use the returned `id` as the `companyId` path parameter required by every other endpoint in this API.","operationId":"list_companies_companies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCompaniesResponseSchema"}}}},"401":{"description":"Unauthorized. The bearer token is missing, invalid or expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"detail":"user not authorized"}}}}},"security":[{"HTTPBearer":[]}]}},"/companies/{companyId}":{"get":{"tags":["Companies"],"summary":"Retrieve company","description":"Returns the detail of a company: legal name, administrative contact, tags and configuration (e.g. accounting currency).","operationId":"retrieve_company_companies__companyId__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyResponseSchema"}}}},"401":{"description":"Unauthorized. The bearer token is missing, invalid or expired.","content":{"application/json":{"example":{"detail":"user not authorized"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found. The requested resource or `companyId` does not exist.","content":{"application/json":{"example":{"detail":"0021 companyId not found"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/companies/{companyId}/users":{"get":{"tags":["Companies"],"summary":"List company users","description":"Returns the users with access to the company identified by `companyId`. The returned `id` matches the `userId` recorded on entities created manually in Embat (e.g. payments).","operationId":"list_company_users_companies__companyId__users_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCompanyUsersResponseSchema"}}}},"401":{"description":"Unauthorized. The bearer token is missing, invalid or expired.","content":{"application/json":{"example":{"detail":"user not authorized"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found. The requested resource or `companyId` does not exist.","content":{"application/json":{"example":{"detail":"0021 companyId not found"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/categories/{companyId}":{"get":{"tags":["Categories"],"summary":"List categories","description":"Returns every category configured for the company, both top-level and child categories. The list is not paginated. Categories are created and managed in the Embat application; this API only reads them.","operationId":"list_categories_categories__companyId__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCategoriesResponseSchema"}}}},"401":{"description":"Unauthorized. The bearer token is missing, invalid or expired.","content":{"application/json":{"example":{"detail":"user not authorized"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found. The requested resource or `companyId` does not exist.","content":{"application/json":{"example":{"detail":"0021 companyId not found"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/categories/{companyId}/{id}":{"get":{"tags":["Categories"],"summary":"Retrieve category","description":"Returns a single category by its Embat `id`.","operationId":"get_category_categories__companyId___id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}},{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCategoriesResponseSchema"}}}},"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 category matches the given `id`.","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"}}}}}}},"/contacts/{companyId}":{"get":{"tags":["Contacts"],"summary":"List contacts","description":"Returns the contacts (clients/suppliers) of a company. Results are paginated: use `limit` to control page size and pass the returned `nextPageToken` to fetch the next page.","operationId":"list_contacts_contacts__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/ListContactsResponseSchema"}}}},"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":["Contacts"],"summary":"Create contact","description":"Creates a contact (client/supplier). If `customId` is omitted, Embat auto-generates one. Calling this endpoint again with a `customId` that already exists **updates** the existing contact instead of creating a duplicate or raising a conflict error; if the submitted data is identical to the stored contact, the call is a no-op.","operationId":"create_contact_contacts__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/PostContactsRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertContactsResponseSchema"}}}},"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":["Contacts"],"summary":"Update contacts in bulk","description":"Updates several contacts in a single call, identified by `customId`. Entries whose `customId` does not match any contact are silently skipped — the call returns `200` for the whole batch. Contacts sharing the same `customId` within the request are deduplicated and only the first occurrence is processed.","operationId":"update_contacts_bulk_contacts__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/BulkPatchContactsRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpsertContactsResponseSchema"}}}},"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":["Contacts"],"summary":"Delete contacts in bulk","description":"Deletes several contacts in a single call, identified by `customId`. Entries whose `customId` does not match any contact are silently skipped — no error is raised and the call still returns `200` for the whole batch.","operationId":"delete_contacts_bulk_contacts__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/BulkDeleteContactsRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkModifyContactsResponseSchema"}}}},"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"}}}}}}},"/contacts/{companyId}/{customId}":{"get":{"tags":["Contacts"],"summary":"Retrieve contact","description":"Returns a single contact by `customId`.","operationId":"retrieve_contact_contacts__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/GetContactsResponseSchema"}}}},"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 contact 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":["Contacts"],"summary":"Update contact","description":"Updates a contact identified by `customId`. Note that updating a `customId` that does not match any contact also returns `200` without applying any change — no `404` is raised.","operationId":"update_contact_contacts__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/PatchContactsRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertContactsResponseSchema"}}}},"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":["Contacts"],"summary":"Delete contact","description":"Deletes a contact by `customId`. If `customId` does not match any contact, no error is raised — the call still returns `200`.","operationId":"delete_contact_contacts__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/ModifyContactsResponseSchema"}}}},"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"}}}}}}},"/contacts/{companyId}/bulk":{"post":{"tags":["Contacts"],"summary":"Create contacts in bulk","description":"Creates several contacts in a single call, following the same rules as the single contact creation endpoint: a `customId` that already exists updates the existing contact rather than creating a duplicate. Contacts sharing the same `customId` within the request are deduplicated and only the first occurrence is processed.","operationId":"create_contacts_bulk_contacts__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/BulkPostContactsRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpsertContactsResponseSchema"}}}},"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"}}}}}}},"/debtscheduleconfigs/{companyId}":{"get":{"tags":["DebtScheduleConfigs"],"summary":"List debt schedule configs","description":"Returns the debt schedule configurations of a company. Results are ordered by last modification time, most recent first, and paginated: use `limit` to control page size and pass the returned `nextPageToken` to fetch the next page. `startUpdatedAt` (inclusive) and `endUpdatedAt` (exclusive) filter by last modification time, which is useful for incremental synchronization.","operationId":"list_debt_schedule_configs_debtscheduleconfigs__companyId__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}},{"name":"startUpdatedAt","in":"query","required":false,"schema":{"type":"string","format":"date-time","description":"Only return configurations last modified on or after this timestamp (inclusive).","title":"Startupdatedat"},"description":"Only return configurations last modified on or after this timestamp (inclusive)."},{"name":"endUpdatedAt","in":"query","required":false,"schema":{"type":"string","format":"date-time","description":"Only return configurations last modified before this timestamp (exclusive).","title":"Endupdatedat"},"description":"Only return configurations last modified before this timestamp (exclusive)."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"title":"Response length of objects limit","description":"Maximum number of objects to return in the response. Default 10, maximum 50.","default":10},"description":"Maximum number of objects to return in the response. Default 10, maximum 50."},{"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/ListDebtScheduleConfigsResponseSchema"}}}},"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"}}}}}}},"/debtscheduleconfigs/{companyId}/{id}":{"get":{"tags":["DebtScheduleConfigs"],"summary":"Retrieve debt schedule config","description":"Returns a single debt schedule configuration by its Embat `id`.","operationId":"retrieve_debt_schedule_config_debtscheduleconfigs__companyId___id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}},{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDebtScheduleConfigResponseSchema"}}}},"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 debt schedule configuration matches the given `id`.","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"}}}}}}},"/files/receptions":{"get":{"tags":["Files"],"summary":"List file receptions","description":"Returns the banking files received across every company accessible to the authenticated user (e.g. account statements or confirmation files sent by a bank). Results are paginated: use `limit` to control page size and pass the returned `nextPageToken` to fetch the next page. Download the content of a specific file with `GET /files/receptions/{fileId}`. Errors from the file service are reported with their original status code and message, so responses may include statuses other than the ones listed here.","operationId":"list_files_receptions_files_receptions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":2000,"title":"Response length of objects limit","description":"Maximum number of file receptions to return. Defaults to 500, up to 2000.","default":500},"description":"Maximum number of file receptions to return. Defaults to 500, up to 2000."},{"name":"nextPageToken","in":"query","required":false,"schema":{"type":"string","title":"Pagination token","description":"Token to fetch the next page of results, returned by a previous call to this endpoint."},"description":"Token to fetch the next page of results, returned by a previous call to this endpoint."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListFilesReceptionsResponseSchema"}}}},"401":{"description":"Unauthorized. The bearer token is missing, invalid or expired.","content":{"application/json":{"example":{"detail":"user not authorized"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/receptions/{fileId}":{"get":{"tags":["Files"],"summary":"Download file reception","description":"Downloads the raw content of a file reception by `fileId`. The response content type matches the original file (e.g. XML, TXT, PDF). The `Content-Disposition` header names the file after `fileId`, not its original file name; use `fileName` from `GET /files/receptions` if you need the original name. Errors are reported with the same status code and message that occurred while retrieving the file, which may include statuses other than the ones listed here.","operationId":"download_receptions_file_files_receptions__fileId__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"fileId","in":"path","required":true,"schema":{"type":"string","title":"Fileid"}}],"responses":{"200":{"description":"Binary file downloaded (content-type may vary: XML, TXT, PDF, etc.)","content":{"application/octet-stream":{}}},"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":"No file matches the given `fileId`.","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"}}}}}}},"/files/emissions":{"get":{"tags":["Files"],"summary":"List file emissions","description":"Returns the banking files submitted to banks (e.g. payment order files) across every company accessible to the authenticated user. Results are paginated: use `limit` to control page size and pass the returned `nextPageToken` to fetch the next page. Errors from the file service are reported with their original status code and message, so responses may include statuses other than the ones listed here.","operationId":"list_files_emissions_files_emissions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":2000,"title":"Response length of objects limit","description":"Maximum number of file emissions to return. Defaults to 500, up to 2000.","default":500},"description":"Maximum number of file emissions to return. Defaults to 500, up to 2000."},{"name":"nextPageToken","in":"query","required":false,"schema":{"type":"string","title":"Pagination token","description":"Token to fetch the next page of results, returned by a previous call to this endpoint."},"description":"Token to fetch the next page of results, returned by a previous call to this endpoint."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListFilesEmissionsResponseSchema"}}}},"401":{"description":"Unauthorized. The bearer token is missing, invalid or expired.","content":{"application/json":{"example":{"detail":"user not authorized"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/{companyId}/{bankId}":{"post":{"tags":["Files"],"summary":"Create file emission","description":"Submits a file to a bank (`bankId`) on behalf of a company, e.g. a payment order file. Returns the Embat ID of the created file emission; retrieve its status later with `GET /files/emissions`.","operationId":"create_file_emission_files__companyId___bankId__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}},{"name":"bankId","in":"path","required":true,"schema":{"type":"string","title":"Bankid"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_file_emission_files__companyId___bankId__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostFilesEmissionResponseSchema"}}}},"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"}}}}}}},"/forecasts/{companyId}":{"get":{"tags":["Forecasts"],"summary":"List forecasts","description":"Returns the treasury forecasts of a company. Results are paginated: use `limit` to control page size and pass the returned `nextPageToken` to fetch the next page. `startDate` is inclusive and `endDate` is exclusive; either bound can be used on its own to leave the other end of the range unbounded. Only forecasts linked to a scenario that is currently visible are returned.","operationId":"list_forecasts_forecasts__companyId__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}},{"name":"scenarioId","in":"query","required":false,"schema":{"type":"string","description":"Filter forecasts belonging to a given scenario, by its Embat scenario ID.","title":"Scenarioid"},"description":"Filter forecasts belonging to a given scenario, by its Embat scenario ID."},{"name":"sync","in":"query","required":false,"schema":{"type":"boolean","description":"Filter by synchronization status. `false` also matches forecasts where the value is not set.","title":"Sync"},"description":"Filter by synchronization status. `false` also matches forecasts where the value is not set."},{"name":"operations","in":"query","required":false,"schema":{"type":"boolean","description":"Reserved for future use; currently has no effect on the results.","default":false,"title":"Operations"},"description":"Reserved for future use; currently has no effect on the results."},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Only return forecasts dated on or after this date (inclusive).","title":"Startdate"},"description":"Only return forecasts dated on or after this date (inclusive)."},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Only return forecasts dated before this date (exclusive).","title":"Enddate"},"description":"Only return forecasts dated before this date (exclusive)."},{"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/ListForecastsResponseSchema"}}}},"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"}}}}}},"patch":{"tags":["Forecasts"],"summary":"Update forecasts in bulk","description":"Updates the synchronization status or additional info of several forecasts in a single call, identified by `id`. Follows the same rules as the single-forecast update endpoint: fields omitted from the request, or sent as `null`, are left unchanged, and entries whose `id` does not match any forecast are silently skipped — the call still returns `200` for the whole batch.","operationId":"update_forecasts_bulk_forecasts__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/BulkPatchForecastsRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkModifyForecastsResponseSchema"}}}},"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"}}}}}}},"/forecasts/{companyId}/{id}":{"get":{"tags":["Forecasts"],"summary":"Retrieve forecast","description":"Returns a single forecast by its Embat `id`. `accountingAmount` and `exchangeRate` are not computed for this endpoint and are returned as stored, typically `null` — use `GET /forecasts/{companyId}` to get them populated. If the forecast's scenario is no longer visible, this endpoint returns a response with every field set to `null` instead of the forecast data.","operationId":"retrieve_forecast_forecasts__companyId___id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}},{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetForecastsResponseSchema"}}}},"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 forecast matches the given id.","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":["Forecasts"],"summary":"Update forecast","description":"Updates the synchronization status or additional info of a forecast identified by `id`. Fields omitted from the request, or sent as `null`, are left unchanged. Updating an `id` that does not match any forecast also returns `200` without applying any change — no `404` is raised.","operationId":"update_forecast_forecasts__companyId___id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}},{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchForecastsRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModifyForecastsResponseSchema"}}}},"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"}}}}}}},"/foreignexchangerates":{"get":{"tags":["ForeignExchangeRates"],"summary":"List foreign exchange rates","description":"Returns the daily foreign exchange rates recorded in Embat, most recent first, recalculated to be expressed against `baseCurrency`. Results are paginated: use `limit` to control page size and pass the returned `nextPageToken` to fetch the next page. `startDate`/`endDate` filter by rate date: `startDate` is inclusive and `endDate` is exclusive. If only one of the two is given, the range is open-ended on the other side.","operationId":"list_foreign_exchange_rates_foreignexchangerates_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"baseCurrency","in":"query","required":true,"schema":{"$ref":"#/components/schemas/CurrencyEnum","description":"Currency all returned `rates` are expressed against.","examples":["EUR"]},"description":"Currency all returned `rates` are expressed against."},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Only return exchange rates dated on or after this date (inclusive).","title":"Startdate"},"description":"Only return exchange rates dated on or after this date (inclusive)."},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Only return exchange rates dated before this date (exclusive).","title":"Enddate"},"description":"Only return exchange rates dated before this date (exclusive)."},{"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/ListForeignExchangeRatesResponseSchema"}}}},"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":"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"}}}}}}},"/foreignexchangerates/{id}":{"get":{"tags":["ForeignExchangeRates"],"summary":"Retrieve foreign exchange rate","description":"Returns a single foreign exchange rate record by `id`, always expressed against EUR — the `baseCurrency` conversion available on the list endpoint does not apply here.","operationId":"retrieve_foreign_exchange_rate_foreignexchangerates__id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetForeignExchangeRatesResponseSchema"}}}},"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":"No foreign exchange rate record matches the given `id`.","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"}}}}}}},"/logs/{companyId}":{"post":{"tags":["Logs"],"summary":"Create log","description":"Reports a single execution event, warning or error observed by your integration while interacting with the Embat API, so Embat's support team can diagnose integration issues. Log delivery is best-effort: the endpoint returns `204` as soon as the request is accepted, and any failure while recording the log afterwards is not reported back to the caller.","operationId":"create_log_logs__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/PostLogRequestSchema"}}}},"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized. The bearer token is missing, invalid or expired.","content":{"application/json":{"example":{"detail":"user not authorized"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found. The requested resource or `companyId` does not exist.","content":{"application/json":{"example":{"detail":"0021 companyId not found"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/logs/{companyId}/bulk":{"post":{"tags":["Logs"],"summary":"Create logs in bulk","description":"Reports several log entries in a single call, following the same rules as the single log creation endpoint. Each entry is processed independently, so a failure recording one log does not affect the others. Log delivery is best-effort: the endpoint returns `204` as soon as the request is accepted, regardless of the outcome of recording any individual entry.","operationId":"create_logs_bulk_logs__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/BulkPostLogsRequestSchema"}}}},"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized. The bearer token is missing, invalid or expired.","content":{"application/json":{"example":{"detail":"user not authorized"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found. The requested resource or `companyId` does not exist.","content":{"application/json":{"example":{"detail":"0021 companyId not found"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/operations/{companyId}":{"get":{"tags":["Operations"],"summary":"List operations","description":"Returns the operations of a company. By default only the operations created through this API are returned (`generatedFrom` `erp` or `external`); use the `generatedFrom` filter to also list operations created by hand in Embat (`manual`) or generated by the debt module (`internal`) — these are read-only and cannot be created or modified through the API. Results are paginated: use `limit` to control page size and pass the returned `nextPageToken` to fetch the next page. `startIssuanceDate`/`endIssuanceDate` filter by issuance date and are inclusive on the start bound and exclusive on the end bound; the range cannot exceed 90 days.","operationId":"list_operations_operations__companyId__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}},{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/OperationStatusEnum","description":"Filter operations by their current status."},"description":"Filter operations by their current status."},{"name":"sync","in":"query","required":false,"schema":{"type":"boolean","description":"Filter by your own synchronization flag. `false` also matches operations where the value is not set.","title":"Sync"},"description":"Filter by your own synchronization flag. `false` also matches operations where the value is not set."},{"name":"generatedFrom","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/OperationGeneratedFromFilterEnum"},"description":"Filter by the origin of the operations; repeat the parameter to combine values. Defaults to `erp` and `external` (operations created through this API). `manual` returns operations created by hand in Embat (`documentType` `manual` or `recurringChild`) and `internal` the ones generated by the debt module (`documentType` `amortizationQuote`, `amortizationInterest`, `amortizationTax` or `amortizationQuoteDebt`); both are read-only through this API.","title":"Generatedfrom"},"description":"Filter by the origin of the operations; repeat the parameter to combine values. Defaults to `erp` and `external` (operations created through this API). `manual` returns operations created by hand in Embat (`documentType` `manual` or `recurringChild`) and `internal` the ones generated by the debt module (`documentType` `amortizationQuote`, `amortizationInterest`, `amortizationTax` or `amortizationQuoteDebt`); both are read-only through this API."},{"name":"startIssuanceDate","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Only return operations issued on or after this date (inclusive). The range cannot exceed 90 days: if `endIssuanceDate` is also given, the span between the two cannot exceed 90 days; if `endIssuanceDate` is omitted, `startIssuanceDate` cannot be more than 90 days in the past.","title":"Startissuancedate"},"description":"Only return operations issued on or after this date (inclusive). The range cannot exceed 90 days: if `endIssuanceDate` is also given, the span between the two cannot exceed 90 days; if `endIssuanceDate` is omitted, `startIssuanceDate` cannot be more than 90 days in the past."},{"name":"endIssuanceDate","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Only return operations issued before this date (exclusive). Combined with `startIssuanceDate`, the range cannot exceed 90 days. If used without `startIssuanceDate`, results start 90 days before this date.","title":"Endissuancedate"},"description":"Only return operations issued before this date (exclusive). Combined with `startIssuanceDate`, the range cannot exceed 90 days. If used without `startIssuanceDate`, results start 90 days before this date."},{"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/ListOperationsResponseSchema"}}}},"400":{"description":"Invalid date range: when only `startIssuanceDate` 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 `startIssuanceDate` and `endIssuanceDate` 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":["Operations"],"summary":"Create operation","description":"Creates an operation (invoice/bill) with an optional `customId`; if omitted, Embat auto-generates one. Sending an operation whose `customId` already exists updates it, except when the existing operation already has a payment recorded against it in Embat: in that case the request has **no effect** on most fields — only `dueDate` and/or `paymentDate` are applied, and only when the operation's current status is `pending` or `overdue`; any other field in the payload is silently discarded. An operation with `amount` equal to `0` is silently discarded and not created. While an operation belongs to an invoice group (remittance), resending it through this endpoint leaves it unchanged (`200` is still returned): its status is managed by the remittance that groups it — see the tag description for the remittance flow.","operationId":"create_operation_operations__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/PostOperationsRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertOperationsResponseSchema"}}}},"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":["Operations"],"summary":"Update operations in bulk","description":"Updates several operations in a single call, identified by `customId`. Entries whose `customId` does not match any existing operation are silently skipped — the call returns `200` for the whole batch. The same rules as the single update endpoint apply to operations that already have a payment recorded against them.","operationId":"update_operations_bulk_operations__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/BulkPatchOperationsRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpsertOperationsResponseSchema"}}}},"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":["Operations"],"summary":"Delete operations in bulk","description":"Cancels several operations in a single call, identified by `customId`, following the same rules as the single delete endpoint. Only the operations that exist and are in a deletable state are cancelled; the rest are silently skipped.","operationId":"delete_operations_bulk_operations__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/BulkDeleteOperationsRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkModifyOperationsResponseSchema"}}}},"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 none of the given `customId` values match a deletable operation.","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"}}}}}}},"/operations/{companyId}/{customId}":{"get":{"tags":["Operations"],"summary":"Retrieve operation","description":"Returns a single operation by `customId`.","operationId":"read_operation_operations__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/GetOperationsResponseSchema"}}}},"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 operation 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":["Operations"],"summary":"Update operation","description":"Updates an operation identified by `customId`. If the operation already has a payment recorded against it in Embat, the request has **no effect** on most fields — only `dueDate` and/or `paymentDate` are applied, and only when the operation's current status is `pending` or `overdue`; any other field in the payload is silently discarded. Updates to an operation that belongs to an invoice group (remittance) are silently ignored (`200` is still returned): its status is managed by the remittance that groups it — see the tag description for the remittance flow.","operationId":"update_operation_operations__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/PatchOperationsRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertOperationsResponseSchema"}}}},"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 operation matches the given `customId`.","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":["Operations"],"summary":"Delete operation","description":"Cancels an operation by `customId`: its `status` is set to `cancel` and its pending amounts to 0. Only operations whose current status is not `paid`, `cancel` or `payment_in_progress` can be deleted.","operationId":"delete_operation_operations__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/ModifyOperationsResponseSchema"}}}},"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, no operation matches the given `customId`, or the operation's status is `paid`, `cancel` or `payment_in_progress`.","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"}}}}}}},"/operations/{companyId}/bulk":{"post":{"tags":["Operations"],"summary":"Create operations in bulk","description":"Creates several operations in a single call, following the same rules as the single operation creation endpoint. Operations sharing the same `customId` within the request are deduplicated and only the first occurrence is processed; operations with `amount` equal to `0` are silently discarded. If none of the submitted operations are eligible, the call still returns `200` with an empty `data` list.","operationId":"create_operations_bulk_operations__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/BulkPostOperationsRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpsertOperationsResponseSchema"}}}},"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"}}}}}}},"/operations/{companyId}/attributes/bulk":{"post":{"tags":["Operations"],"summary":"Add internal attributes to operations in bulk","description":"Attaches internal attribute values to operations, identified by `customId`. These attributes are for internal use only and are not shared back with the ERP through the regular operation fields.","operationId":"add_attribute_values_operations__companyId__attributes_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/BulkPostOperationsAttributesRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpsertOperationsResponseSchema"}}}},"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":["Operations"],"summary":"Remove internal attributes from operations in bulk","description":"Removes internal attribute values from operations, identified by `customId`.","operationId":"delete_contacts_bulk_operations__companyId__attributes_bulk_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/BulkDeleteOperationsAttributesRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpsertOperationsResponseSchema"}}}},"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"}}}}}}},"/paymentorders/{companyId}":{"get":{"tags":["PaymentOrders"],"summary":"List payment orders","description":"Returns the payment orders of a company, ordered by execution date (most recent first). Results are paginated: use `limit` to control page size and pass the returned `nextPageToken` to fetch the next page; `nextPageToken` is `null` once the last page has been reached. `startPaymentDate`/`endPaymentDate` filter by execution date. If only one of the two is given, the other defaults: `endPaymentDate` defaults to now, and `startPaymentDate` defaults to 6 months before `endPaymentDate`. If neither is given, no date filter is applied. Explicit date ranges are not capped: any span is accepted.","operationId":"list_payment_orders_paymentorders__companyId__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}},{"name":"startPaymentDate","in":"query","required":false,"schema":{"type":"string","format":"date-time","description":"Only return payment orders executed on or after this date. If given without `endPaymentDate`, `endPaymentDate` defaults to now.","title":"Startpaymentdate"},"description":"Only return payment orders executed on or after this date. If given without `endPaymentDate`, `endPaymentDate` defaults to now."},{"name":"endPaymentDate","in":"query","required":false,"schema":{"type":"string","format":"date-time","description":"Only return payment orders executed up to this date. If given without `startPaymentDate`, `startPaymentDate` defaults to 6 months before `endPaymentDate`.","title":"Endpaymentdate"},"description":"Only return payment orders executed up to this date. If given without `startPaymentDate`, `startPaymentDate` defaults to 6 months before `endPaymentDate`."},{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PaymentOrderStatusEnum","description":"Filter by payment order execution status."},"description":"Filter by payment order execution status."},{"name":"beneficiaryLegalNameContains","in":"query","required":false,"schema":{"type":"string","description":"Filter payment orders whose beneficiary legal name contains this text.","title":"Beneficiarylegalnamecontains"},"description":"Filter payment orders whose beneficiary legal name contains this text."},{"name":"documentIdContains","in":"query","required":false,"schema":{"type":"string","description":"Filter payment orders whose `documentId` contains this text.","title":"Documentidcontains"},"description":"Filter payment orders whose `documentId` contains this text."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"title":"Response length of objects limit","description":"Maximum number of payment orders to return per page. Defaults to 200, which is also the maximum allowed value.","default":200},"description":"Maximum number of payment orders to return per page. Defaults to 200, which is also the maximum allowed value."},{"name":"nextPageToken","in":"query","required":false,"schema":{"type":"string","title":"Pagination token","description":"Token to fetch the next page of results, returned by a previous call to this endpoint. An invalid token returns a `404` error."},"description":"Token to fetch the next page of results, returned by a previous call to this endpoint. An invalid token returns a `404` error."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListPaymentOrdersResponseSchema"}}}},"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 `nextPageToken` is not a valid pagination token.","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"}}}}}}},"/paymentorders/{id}/receipt":{"get":{"tags":["PaymentOrders"],"summary":"Download payment order receipt","description":"Downloads the PDF receipt of a payment order by its Embat `id`. This endpoint is not scoped by `companyId`: authorization is checked per payment order, and callers without access to it receive a `403`. Errors are reported with the same status code and message returned while retrieving the receipt, which may include statuses other than the ones listed here.","operationId":"download_payment_order_receipt_paymentorders__id__receipt_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Payment order receipt document","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"You are not authorized to download this receipt","content":{"application/json":{"example":{"detail":"Forbidden: you are not authorized to download this receipt."},"schema":{"$ref":"#/components/schemas/ErrorDetailSchema"}}}},"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":"No payment order matches the given `id`.","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"}}}}}}},"/payments/{companyId}":{"get":{"tags":["Payments"],"summary":"List payments","description":"Returns the payments generated in Embat for a company. Payments you created through `POST /payments/{companyId}` are not included here — retrieve them by `customId` with `GET /payments/{companyId}/{customId}` instead. Results are paginated: use `limit` to control page size and pass the returned `nextPageToken` to fetch the next page. `startDate`/`endDate` filter by payment date, and `startUpdatedAt`/`endUpdatedAt` filter by last modification time, which is useful for incremental synchronization. `startDate`/`startUpdatedAt` are inclusive, `endDate`/`endUpdatedAt` are exclusive, and each date range spans at most 90 days. Payments missing required accounting, operation or contact information are excluded from the results.","operationId":"list_payments_payments__companyId__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}},{"name":"productId","in":"query","required":false,"schema":{"type":"string","description":"Filter payments linked to a given product (`productId`).","title":"Productid"},"description":"Filter payments linked to a given product (`productId`)."},{"name":"transactionId","in":"query","required":false,"schema":{"type":"string","description":"Filter payments linked to a given transaction (`transactionId`).","title":"Transactionid"},"description":"Filter payments linked to a given transaction (`transactionId`)."},{"name":"sync","in":"query","required":false,"schema":{"type":"boolean","description":"Filter by synchronization status with the accounting system. `false` also matches payments where the value is not set.","title":"Sync"},"description":"Filter by synchronization status with the accounting system. `false` also matches payments where the value is not set."},{"name":"registered","in":"query","required":false,"schema":{"type":"boolean","description":"Filter by registration status in the accounting system. `false` also matches payments where the value is not set.","title":"Registered"},"description":"Filter by registration status in the accounting system. `false` also matches payments where the value is not set."},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Only return payments 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 payments 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 payments 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 payments 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 payments 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 payments 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 payments 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 payments 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":"internalAttributes","in":"query","required":false,"schema":{"type":"boolean","description":"Include attributes flagged as internal in the response.","default":false,"title":"Internalattributes"},"description":"Include attributes flagged as internal in the response."},{"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/ListPaymentsResponseSchema"}}}},"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":["Payments"],"summary":"Create payment","description":"Creates a payment against one or more operations, recording that those operations (invoices/bills) have been settled in your ERP; each settled amount reduces the operation's pending amount in Embat. If `customId` is omitted, Embat auto-generates one.\n\nEach entry in `operations` is validated independently and **silently discarded** when: the referenced operation does not exist, the operation is already paid or canceled, a payment with the same `customId` was already notified for that operation (duplicates are ignored), or the operation already has payments created from Embat. Discarded entries produce no error: if only some operations are eligible the payment is created for those only, and if none are eligible the call still returns `200` with an `id` but **no payment is created**. When a payment covers an operation's full amount, the operation is automatically marked as paid.","operationId":"create_payment_payments__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/PostPaymentsRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModifyPaymentsResponseSchema"}}}},"400":{"description":"The payment service rejected the creation request; the response includes its explanation.","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":"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"}}}},"502":{"description":"The payment service returned an internal error. Retry later.","content":{"application/json":{"example":{"detail":"Payment creation service failed. Please try again later."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"The payment service is temporarily unavailable. Retry later.","content":{"application/json":{"example":{"detail":"Payment service is temporarily unavailable"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Payments"],"summary":"Update payments in bulk","description":"Updates the synchronization status, error message, registration status or additional info of several payments, identified by `customId`. Entries whose `customId` does not match any payment are silently skipped — the call returns `200` for the whole batch.","operationId":"update_payments_bulk_payments__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/BulkPatchPaymentsRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkModifyPaymentsResponseSchema"}}}},"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":["Payments"],"summary":"Delete payments in bulk","description":"Deletes several payments in a single call, identified by `customId`.","operationId":"delete_payments_bulk_payments__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/BulkDeletePaymentsRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkModifyPaymentsResponseSchema"}}}},"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 none of the given `customId` values match a payment.","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"}}}}}}},"/payments/{companyId}/{customId}":{"get":{"tags":["Payments"],"summary":"Retrieve payment","description":"Returns a single payment by `customId`. Payments missing required accounting, operation or contact information are not returned even if they exist.","operationId":"retrieve_payment_payments__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/GetPaymentsResponseSchema"}}}},"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 payment 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":["Payments"],"summary":"Update payment","description":"Updates the synchronization status, error message, registration status or additional info of a payment identified by `customId`. If none of the provided fields change the existing payment, the update is a no-op. Note that updating a `customId` that does not match any payment also returns `200` without applying any change — no `404` is raised. Setting `error` without `sync` marks the payment as synchronized with the error recorded.","operationId":"update_payment_payments__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/PatchPaymentsRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModifyPaymentsResponseSchema"}}}},"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":["Payments"],"summary":"Delete payment","description":"Deletes a payment by `customId`.","operationId":"delete_payment_payments__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/ModifyPaymentsResponseSchema"}}}},"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 payment matches the given `customId`.","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"}}}}}}},"/payments/{companyId}/bulk":{"post":{"tags":["Payments"],"summary":"Create payments in bulk","description":"Creates several payments in a single call, following the same rules as the single payment creation endpoint. Payments sharing the same `customId` within the request are deduplicated and only the first occurrence is processed.","operationId":"create_payments_bulk_payments__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/BulkPostPaymentsRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpsertPaymentsResponseSchema"}}}},"400":{"description":"The payment service rejected the creation request; the response includes its explanation.","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":"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"}}}},"502":{"description":"The payment service returned an internal error. Retry later.","content":{"application/json":{"example":{"detail":"Payment creation service failed. Please try again later."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"The payment service is temporarily unavailable. Retry later.","content":{"application/json":{"example":{"detail":"Payment service is temporarily unavailable"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/products/{companyId}":{"get":{"tags":["Products"],"summary":"List products","description":"Returns the active products (bank accounts, credit lines, cards or wallets) of a company, whether aggregated from a bank connection or added manually. Results are not paginated. Products not marked as visible in Embat are excluded.","operationId":"list_products_products__companyId__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}},{"name":"manual","in":"query","required":false,"schema":{"type":"boolean","description":"Filter by how the product was added: `true` for manually added products, `false` for products aggregated from a bank connection.","title":"Manual"},"description":"Filter by how the product was added: `true` for manually added products, `false` for products aggregated from a bank connection."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListProductsResponseSchema"}}}},"401":{"description":"Unauthorized. The bearer token is missing, invalid or expired.","content":{"application/json":{"example":{"detail":"user not authorized"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found. The requested resource or `companyId` does not exist.","content":{"application/json":{"example":{"detail":"0021 companyId not found"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Products"],"summary":"Update products in bulk","description":"Updates the accounting code and/or additional info of several products, identified by `id`. Entries whose `id` does not match any product are silently skipped — the call returns `200` for the whole batch. If the same `id` appears more than once, all entries are applied in order and the last one determines the final values.","operationId":"update_products_bulk_products__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/BulkPatchProductsRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkModifyProductsResponseSchema"}}}},"401":{"description":"Unauthorized. The bearer token is missing, invalid or expired.","content":{"application/json":{"example":{"detail":"user not authorized"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found. The requested resource or `companyId` does not exist.","content":{"application/json":{"example":{"detail":"0021 companyId not found"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/products/{companyId}/{id}":{"get":{"tags":["Products"],"summary":"Retrieve product","description":"Returns a single product by its Embat `id`.","operationId":"retrieve_product_products__companyId___id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}},{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProductsResponseSchema"}}}},"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 product matches the given `id`.","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":["Products"],"summary":"Update product","description":"Updates the accounting code and/or additional info of a product identified by `id`. Updating an `id` that does not match any product also returns `200` without applying any change — no `404` is raised.","operationId":"update_product_products__companyId___id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}},{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchProductsRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModifyProductsResponseSchema"}}}},"401":{"description":"Unauthorized. The bearer token is missing, invalid or expired.","content":{"application/json":{"example":{"detail":"user not authorized"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found. The requested resource or `companyId` does not exist.","content":{"application/json":{"example":{"detail":"0021 companyId not found"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reconcilingitems/{companyId}":{"get":{"tags":["ReconcilingItems"],"summary":"List reconciling items","description":"Returns the reconciling items of a company, ordered by `date` (most recent first). Results are paginated: use `limit` to control page size and pass the returned `nextPageToken` to fetch the next page.","operationId":"list_operations_reconcilingitems__companyId__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}},{"name":"reconcilingSourceCustomId","in":"query","required":false,"schema":{"type":"string","description":"Filter items belonging to a given reconciling source (`reconcilingSourceCustomId`).","title":"Reconcilingsourcecustomid"},"description":"Filter items belonging to a given reconciling source (`reconcilingSourceCustomId`)."},{"name":"reconciled","in":"query","required":false,"schema":{"type":"boolean","description":"Filter by reconciliation status. `false` also matches items where the value is not set.","title":"Reconciled"},"description":"Filter by reconciliation status. `false` also matches items where the value is not set."},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Only return items dated on or after this date (inclusive).","title":"Startdate"},"description":"Only return items dated on or after this date (inclusive)."},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Only return items dated before this date (exclusive).","title":"Enddate"},"description":"Only return items dated before this date (exclusive)."},{"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/ListReconcilingItemsResponseSchema"}}}},"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":["ReconcilingItems"],"summary":"Create reconciling item","description":"Creates a reconciling item under the given `reconcilingSourceCustomId`. Calling this again with the same `customId` updates the existing item instead of creating a duplicate — except once the item has been matched to a transaction, in which case the call still returns `200` and the item is not modified by this request.","operationId":"create_reconciling_item_reconcilingitems__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/PostReconcilingItemSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertReconcilingItemsResponseSchema"}}}},"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.","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":["ReconcilingItems"],"summary":"Update reconciling items in bulk","description":"Updates several reconciling items in a single call, identified by `customId`, following the same rules as the single item update endpoint. Entries whose `customId` does not match any existing item, or whose item has already been matched to a transaction, are silently skipped — the call returns `200` for the whole batch.","operationId":"update_reconciling_items_bulk_reconcilingitems__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/BulkPatchReconcilingItemsRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpsertReconcilingItemsResponseSchema"}}}},"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.","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"}}}}}},"delete":{"tags":["ReconcilingItems"],"summary":"Delete reconciling items in bulk","description":"Deletes several reconciling items in a single call, identified by `customId`. The call returns `200` listing every requested `customId` even if some (or all) do not match an existing item — deletion is idempotent and the response does not indicate which items were actually removed.","operationId":"delete_reconciling_items_bulk_reconcilingitems__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/BulkDeleteReconcilingItemsRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkModifyReconcilingItemsResponseSchema"}}}},"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.","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"}}}}}}},"/reconcilingitems/{companyId}/{customId}":{"get":{"tags":["ReconcilingItems"],"summary":"Retrieve reconciling item","description":"Returns a single reconciling item by `customId`.","operationId":"read_reconciling_item_reconcilingitems__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/GetReconcilingItemsResponseSchema"}}}},"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 reconciling item 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":["ReconcilingItems"],"summary":"Update reconciling item","description":"Updates the amount, currency, date, description, metadata or additional info of a reconciling item identified by `customId`. Only the fields sent are changed; omitted or `null` fields keep their current value. If `customId` does not match any existing item, or the item has already been matched to a transaction, the call still returns `200` without applying any change.","operationId":"update_reconciling_item_reconcilingitems__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/PatchReconcilingItemSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertReconcilingItemsResponseSchema"}}}},"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.","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"}}}}}},"delete":{"tags":["ReconcilingItems"],"summary":"Delete reconciling item","description":"Deletes a reconciling item by `customId`. The call returns `200` even if no item matches the given `customId` — deletion is idempotent and the response does not indicate whether an item was actually removed.","operationId":"delete_reconciling_item_reconcilingitems__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/ModifyReconcilingItemsResponseSchema"}}}},"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.","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"}}}}}}},"/reconcilingitems/{companyId}/bulk":{"post":{"tags":["ReconcilingItems"],"summary":"Create reconciling items in bulk","description":"Creates several reconciling items in a single call, following the same rules as the single item creation endpoint. Items sharing the same `customId` within the request are deduplicated and only the first occurrence is processed.","operationId":"create_reconciling_items_bulk_reconcilingitems__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/BulkPostReconcilingItemsRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpsertReconcilingItemsResponseSchema"}}}},"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.","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"}}}}}}},"/reconcilingsources/{companyId}":{"get":{"tags":["ReconcilingSources"],"summary":"List reconciling sources","description":"Returns all reconciling sources configured for the company. This endpoint is not paginated.","operationId":"list_reconciling_sources_reconcilingsources__companyId__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListReconcilingSourcesResponseSchema"}}}},"401":{"description":"Unauthorized. The bearer token is missing, invalid or expired.","content":{"application/json":{"example":{"detail":"user not authorized"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found. The requested resource or `companyId` does not exist.","content":{"application/json":{"example":{"detail":"0021 companyId not found"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["ReconcilingSources"],"summary":"Create reconciling source","description":"Creates a reconciling source identified by `customId`. Calling this endpoint again with a `customId` that already exists **updates** the existing reconciling source instead of creating a duplicate or raising a conflict error; only the fields sent are applied, and any field previously stored is kept unless a new value is sent.","operationId":"create_reconciling_source_reconcilingsources__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/PostReconcilingSourceSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModifyReconcilingSourceResponseSchema"}}}},"401":{"description":"Unauthorized. The bearer token is missing, invalid or expired.","content":{"application/json":{"example":{"detail":"user not authorized"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found. The requested resource or `companyId` does not exist.","content":{"application/json":{"example":{"detail":"0021 companyId not found"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reconcilingsources/{companyId}/{customId}":{"get":{"tags":["ReconcilingSources"],"summary":"Retrieve reconciling source","description":"Returns a single reconciling source by `customId`.","operationId":"retrieve_reconciling_source_reconcilingsources__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/GetReconcilingSourceResponseSchema"}}}},"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 reconciling source 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":["ReconcilingSources"],"summary":"Update reconciling source","description":"Updates a reconciling source identified by `customId`. Only the fields sent are changed. Note that updating a `customId` that does not match any reconciling source also returns `200` without applying any change — no `404` is raised.","operationId":"update_reconciling_source_reconcilingsources__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/PatchReconcilingSourceSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModifyReconcilingSourceResponseSchema"}}}},"401":{"description":"Unauthorized. The bearer token is missing, invalid or expired.","content":{"application/json":{"example":{"detail":"user not authorized"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found. The requested resource or `companyId` does not exist.","content":{"application/json":{"example":{"detail":"0021 companyId not found"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["ReconcilingSources"],"summary":"Delete reconciling source","description":"Deletes a reconciling source by `customId`. If `customId` does not match any reconciling source, no error is raised — the call still returns `200`.","operationId":"delete_reconciling_source_reconcilingsources__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/ModifyReconcilingSourceResponseSchema"}}}},"401":{"description":"Unauthorized. The bearer token is missing, invalid or expired.","content":{"application/json":{"example":{"detail":"user not authorized"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found. The requested resource or `companyId` does not exist.","content":{"application/json":{"example":{"detail":"0021 companyId not found"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/scenarios/{companyId}":{"get":{"tags":["Scenarios"],"summary":"List scenarios","description":"Returns the published forecasting scenarios of a company. Scenarios that have not been published are not included. Results are not paginated.","operationId":"list_scenarios_scenarios__companyId__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListScenariosResponseSchema"}}}},"401":{"description":"Unauthorized. The bearer token is missing, invalid or expired.","content":{"application/json":{"example":{"detail":"user not authorized"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found. The requested resource or `companyId` does not exist.","content":{"application/json":{"example":{"detail":"0021 companyId not found"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/scenarios/{companyId}/{id}":{"get":{"tags":["Scenarios"],"summary":"Retrieve scenario","description":"Returns a single forecasting scenario by its Embat ID.","operationId":"retrieve_scenario_scenarios__companyId___id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}},{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetScenarioResponseSchema"}}}},"401":{"description":"Unauthorized. The bearer token is missing, invalid or expired.","content":{"application/json":{"example":{"detail":"user not authorized"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Scenario or `companyId` not found.","content":{"application/json":{"example":{"detail":"0021 companyId not found"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/transactions/{companyId}":{"get":{"tags":["Transactions"],"summary":"List transactions","description":"Returns the bank transactions of a company. Results are paginated: use `limit` to control page size and pass the returned `nextPageToken` to fetch the next page. `startValueDate`/`endValueDate` filter by value date, `startOperationDate`/`endOperationDate` filter by the date the transaction was booked, and `startUpdatedAt`/`endUpdatedAt` filter by last modification time, which is useful for incremental synchronization. Each start bound is inclusive and each end bound is exclusive. Transactions marked as hidden, or whose product no longer exists, are excluded from the results.","operationId":"list_transactions_transactions__companyId__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}},{"name":"productId","in":"query","required":false,"schema":{"type":"string","description":"Filter transactions belonging to a given product (`productId`).","title":"Productid"},"description":"Filter transactions belonging to a given product (`productId`)."},{"name":"sync","in":"query","required":false,"schema":{"type":"boolean","description":"Filter by synchronization status with your ERP. `false` also matches transactions where the value is not set.","title":"Sync"},"description":"Filter by synchronization status with your ERP. `false` also matches transactions where the value is not set."},{"name":"startValueDate","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Only return transactions whose value date is on or after this date (inclusive). Cannot be later than `endValueDate`, and cannot be in the future when used without `endValueDate`.","title":"Startvaluedate"},"description":"Only return transactions whose value date is on or after this date (inclusive). Cannot be later than `endValueDate`, and cannot be in the future when used without `endValueDate`."},{"name":"endValueDate","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Only return transactions whose value date is before this date (exclusive).","title":"Endvaluedate"},"description":"Only return transactions whose value date is before this date (exclusive)."},{"name":"startOperationDate","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Only return transactions booked on or after this date (inclusive). Cannot be later than `endOperationDate`, and cannot be in the future when used without `endOperationDate`.","title":"Startoperationdate"},"description":"Only return transactions booked on or after this date (inclusive). Cannot be later than `endOperationDate`, and cannot be in the future when used without `endOperationDate`."},{"name":"endOperationDate","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Only return transactions booked before this date (exclusive).","title":"Endoperationdate"},"description":"Only return transactions booked before this date (exclusive)."},{"name":"startUpdatedAt","in":"query","required":false,"schema":{"type":"string","format":"date-time","description":"Only return transactions last modified on or after this timestamp (inclusive). Cannot be later than `endUpdatedAt`, and cannot be in the future when used without `endUpdatedAt`.","title":"Startupdatedat"},"description":"Only return transactions last modified on or after this timestamp (inclusive). Cannot be later than `endUpdatedAt`, and cannot be in the future when used without `endUpdatedAt`."},{"name":"endUpdatedAt","in":"query","required":false,"schema":{"type":"string","format":"date-time","description":"Only return transactions last modified before this timestamp (exclusive).","title":"Endupdatedat"},"description":"Only return transactions last modified before this timestamp (exclusive)."},{"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/ListTransactionsResponseSchema"}}}},"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, `nextPageToken` is not valid, or a start bound (`startValueDate`, `startOperationDate` or `startUpdatedAt`) is later than its paired end bound or, when used alone, later than today.","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":["Transactions"],"summary":"Update transactions in bulk","description":"Updates the synchronization status, additional info or custom attribute values of several transactions in a single call, identified by `id`. Only the fields you send are changed. Entries whose `id` does not match any transaction are silently skipped — the call still returns `200` for the whole batch.","operationId":"update_transactions_bulk_transactions__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/BulkPatchTransactionsRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkModifyTransactionsResponseSchema"}}}},"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"}}}}}}},"/transactions/{companyId}/{id}":{"get":{"tags":["Transactions"],"summary":"Retrieve transaction","description":"Returns a single transaction by its Embat `id`. If the transaction's product no longer exists, this endpoint returns `404` even though the transaction record exists.","operationId":"retrieve_transaction_transactions__companyId___id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}},{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTransactionsResponseSchema"}}}},"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, no transaction matches the given `id`, or the transaction's product no longer exists.","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":["Transactions"],"summary":"Update transaction","description":"Updates the synchronization status, additional info or custom attribute values of a transaction identified by `id`. Only the fields you send are changed. Note that updating an `id` that does not match any transaction also returns `200` without applying any change — no `404` is raised.","operationId":"update_transaction_transactions__companyId___id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}},{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchTransactionsRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModifyTransactionsResponseSchema"}}}},"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"}}}}}}},"/transactions/{companyId}/{productId}/bulk":{"post":{"tags":["Transactions"],"summary":"Create manual transactions in bulk","description":"Creates transactions for a company's product in a single call, grouped by day. Returns an empty response with status `201` on success.\n\n> **Manual products only.** This endpoint only works with products classified as \"Manual\". Using it with a `productId` that exists but is not classified as Manual returns a `400 Bad Request` error. If `productId` does not exist, or its associated bank record does not exist, a `404` is returned instead.\n\n> **Mirrors the Embat website.** This endpoint behaves like adding manual transactions from the Embat website: submitting transactions for a given day **permanently replaces** any transactions previously recorded for that same day on that product. Replaced transactions cannot be recovered.","operationId":"create_manual_transactions_bulk_transactions__companyId___productId__bulk_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","title":"Companyid"}},{"name":"productId","in":"path","required":true,"schema":{"type":"string","title":"Productid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkPostTransactionsRequestSchema"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"The product exists but is not classified as Manual.","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, the given `productId` does not exist, or its associated bank record 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"}}}}}}}},"components":{"schemas":{"AccountTypeEnum":{"type":"string","enum":["CHECKING","SAVINGS"],"title":"AccountTypeEnum"},"AccountingTypeEnum":{"type":"string","enum":["banks","analytics","accountings"],"title":"AccountingTypeEnum"},"AmortisingFrequencyEnum":{"type":"string","enum":["monthly","quarterly","semiannually","yearly"],"title":"AmortisingFrequencyEnum"},"AttributeValueRequestACCOUNTSchema":{"properties":{"customId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customid","description":"Custom ID of the attribute definition this value belongs to. Entries missing `customId` or `value` are silently discarded.","examples":["cost-center"]},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value","description":"Value assigned to the attribute.","examples":["Marketing"]},"valueCustomId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Valuecustomid","description":"Custom ID of the selected option, for list-type attributes.","examples":["cc-marketing"]}},"type":"object","title":"AttributeValueRequestACCOUNTSchema"},"AttributeValueRequestSchema":{"properties":{"customId":{"type":"string","title":"Customid","description":"Custom ID of the attribute (see the Attributes endpoints) being set.","examples":["cost-center"]},"value":{"type":"string","title":"Value","description":"Display text of the value being set on this entity.","examples":["Marketing"]},"valueCustomId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Valuecustomid","description":"Custom ID of one of the attribute's predefined `values`, when the attribute is of type `list`. Leave unset for free-form `string`/`number` attributes.","examples":["marketing"]},"parentCustomId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentcustomid","description":"Not used when attaching an attribute value to an entity."}},"type":"object","required":["customId","value"],"title":"AttributeValueRequestSchema","description":"Attaches an attribute value to another entity (payment, contact, operation,\ntransaction, accounting entry...)."},"AttributesRequestValuesSchema":{"properties":{"customId":{"type":"string","title":"Customid","description":"Your own unique ID for the value, unique within the attribute.","examples":["madrid"]},"name":{"type":"string","title":"Name","description":"Display name of the value.","examples":["Madrid"]},"parentCustomId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentcustomid","description":"Custom ID of the value of the parent attribute (see the attribute's `parentCustomId`) that this value is nested under. Ignored if the attribute has no `parentCustomId` or no value with this `customId` exists yet on the parent attribute.","examples":["spain"]}},"type":"object","required":["customId","name"],"title":"AttributesRequestValuesSchema"},"AttributesResponseValuesSchema":{"properties":{"customId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customid","description":"Your own unique ID for the value. If omitted, Embat auto-generates one.","examples":["madrid"]},"id":{"type":"string","title":"Id","description":"Embat ID of the value."},"name":{"type":"string","title":"Name","description":"Display name of the value.","examples":["Madrid"]},"parentCustomId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentcustomid","description":"Custom ID of the value, within the parent attribute (see the attribute's `parentCustomId`), that this value is nested under.","examples":["spain"]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentid","description":"Embat ID of the parent value. Only present when `parentCustomId` matched an existing value of the parent attribute at the time this value was saved."}},"type":"object","required":["id","name"],"title":"AttributesResponseValuesSchema"},"AttributesStatusEnum":{"type":"string","enum":["list","string","number"],"title":"AttributesStatusEnum"},"AuxBulkPatchAccountingEntriesRequestSchema":{"properties":{"accountingCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingcode","description":"Ledger account code the entry is posted to.","examples":["4300001"]},"counterpartAccountingCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Counterpartaccountingcode","description":"Ledger account code of the counterpart side of the entry, when applicable.","examples":["5720001"]},"accountingName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingname","description":"Display name of the ledger account (`accountingCode`).","examples":["Trade debtors"]},"assetAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Assetamount","description":"Outflow side of the entry, in `currency` (money leaving the account, e.g. a supplier payment). An entry always has both sides: if you set only `assetAmount` or only `liabilityAmount`, the other one defaults to 0. The sign is inverted on storage (0 always stays 0): a positive value you send is stored and returned as negative, following the convention that negative amounts are outflows.","examples":[1250.5]},"accountingAssetAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accountingassetamount","description":"Outflow side expressed in the company accounting currency (`accountingCurrency`). Subject to the same sign convention as `assetAmount`.","examples":[1250.5]},"balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Balance","description":"Running balance of the ledger account (`accountingCode`) after this entry, typically calculated by Embat rather than provided by you."},"liabilityAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Liabilityamount","description":"Inflow side of the entry, in `currency` (money entering the account, e.g. a customer collection), stored with the sign you send. An entry always has both sides: if you set only `assetAmount` or only `liabilityAmount`, the other one defaults to 0.","examples":[0.0]},"accountingLiabilityAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accountingliabilityamount","description":"Inflow side expressed in the company accounting currency (`accountingCurrency`).","examples":[0.0]},"currency":{"anyOf":[{"$ref":"#/components/schemas/CurrencyEnum"},{"type":"null"}],"description":"ISO currency code of `assetAmount`/`liabilityAmount`.","examples":["EUR"]},"accountingCurrency":{"anyOf":[{"$ref":"#/components/schemas/CurrencyEnum"},{"type":"null"}],"description":"ISO currency code of `accountingAssetAmount`/`accountingLiabilityAmount`.","examples":["EUR"]},"contactCustomId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contactcustomid","description":"Custom ID of the contact (client/supplier), used when `accountingCode` is a contacts ledger account.","examples":["contact-001"]},"exchangeRate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Exchangerate","description":"Exchange rate applied between `currency` and `accountingCurrency`.","examples":[1.0]},"additionalInfo":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additionalinfo","description":"Free-form key/value metadata to attach to the entry. Sending an empty object (`{}`) has no effect and does not clear previously stored metadata."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-text description of the entry. If omitted — on both creation and update — Embat sets (or resets) it to an auto-generated value: `\"Asiento \"` followed by `accountingEntryCode` if set, otherwise by `customId`. On `PATCH`, this means leaving `description` out overwrites any previously set custom description; resend the current value to keep it unchanged.","examples":["Invoice #2024-001 posting"]},"documentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Documentid","description":"Identifier of the source document (e.g. invoice) this entry relates to."},"transactionsIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Transactionsids","description":"Embat IDs of the bank transactions related to this entry."},"paymentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentid","description":"Embat ID of the payment related to this entry."},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date","description":"Accounting date of the entry. Send a plain date at midnight (e.g. `2024-01-15T00:00:00Z`) — sending a different time of day can shift the stored calendar date and is not fully normalized to midnight.","examples":["2024-01-15T00:00:00Z"]},"attributes":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttributeValueRequestSchema"},"type":"array"},{"type":"null"}],"title":"Attributes","description":"Custom attribute values to attach to the entry. Duplicate values and attributes flagged as internal-only are omitted when the entry is returned."},"customId":{"type":"string","title":"Customid","description":"Embat custom/auto-generated unique accounting entry ID. You can use it as your own custom ERP accounting entry ID.","examples":["erp-entry-2024-001"]}},"type":"object","required":["customId"],"title":"AuxBulkPatchAccountingEntriesRequestSchema"},"AuxBulkPatchAccountingsAccountsRequestSchema":{"properties":{"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active","description":"Whether the accounting account is active."},"type":{"anyOf":[{"$ref":"#/components/schemas/AccountingTypeEnum"},{"type":"null"}],"description":"Accounting account classification: `banks` or `accountings`. The value `analytics` is deprecated: it is still accepted for backwards compatibility but automatically stored as `accountings`. If omitted, it is inferred from `accountingCode`.Once an account exists, any `type` sent through the create endpoints is silently ignored — the value(inferred, overridden or explicit) only applies when the account is first created. Use the update endpoints to change the `type` of an existing account.","examples":["banks"]},"accountingName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingname","description":"Display name of the accounting account.","examples":["Bank account - Santander EUR"]},"collective":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Collective","description":"Whether this is a collective (grouping) accounting account rather than an individual one."},"additionalInfo":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additionalinfo","description":"Free-form key/value metadata to attach to the account. Sending an empty object leaves any previously stored metadata unchanged instead of clearing it."},"attributes":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttributeValueRequestACCOUNTSchema"},"type":"array"},{"type":"null"}],"title":"Attributes","description":"Custom attribute values to attach to the account. Entries with an empty or missing `customId` or `value` are silently discarded."},"accountingCode":{"type":"string","title":"Accountingcode","description":"Accounting code of the account to update.","examples":["430001"]}},"type":"object","required":["accountingCode"],"title":"AuxBulkPatchAccountingsAccountsRequestSchema"},"AuxBulkPatchAttributesRequestSchema":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Display name of the attribute."},"active":{"type":"boolean","title":"Active","description":"Whether the attribute is active. Omit to leave the current value unchanged.","default":true},"values":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttributesRequestValuesSchema"},"type":"array"},{"type":"null"}],"title":"Values","description":"Full list of values the attribute should have after this update. Sending `values` **replaces** the current list: any previously stored value whose `customId` is not included here is removed. Omit `values` entirely to leave the current values untouched. An attribute holds at most 5000 values; if the combined total would exceed the limit, the excess new values are silently discarded and existing ones already in the list are kept."},"parentCustomId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentcustomid","description":"Custom ID of the parent attribute, to nest this attribute under another one (e.g. a \"City\" attribute nested under \"Country\"). Must reference an existing attribute.","examples":["country"]},"customId":{"type":"string","title":"Customid","description":"Custom ID of the attribute to update.","examples":["cost-center"]}},"type":"object","required":["customId"],"title":"AuxBulkPatchAttributesRequestSchema"},"AuxBulkPatchContactsRequestSchema":{"properties":{"tradeName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tradename","description":"Commercial/trade name of the contact. Defaults to `legalName` when omitted or blank.","examples":["Acme Supplies"]},"legalName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legalname","description":"Legal (registered) name of the contact.","examples":["Acme Supplies S.L."]},"taxId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxid","description":"Tax identification number (CIF/NIF/VAT) of the contact. Spaces are removed before storage.","examples":["B12345678"]},"contact":{"anyOf":[{"$ref":"#/components/schemas/ContactSchema-Input"},{"type":"null"}],"description":"Contact person details (name, phone, email) for this contact."},"address":{"anyOf":[{"$ref":"#/components/schemas/ContactAddressSchema"},{"type":"null"}],"description":"Postal address of the contact."},"contactType":{"$ref":"#/components/schemas/ContactContactTypeEnum","description":"Whether the contact is a `company` or a `freelance` individual. Defaults to `company`.","default":"company"},"type":{"anyOf":[{"$ref":"#/components/schemas/ContactTypeEnum"},{"type":"null"}],"description":"Commercial relationship with the contact: `client`, `supplier` or `client-supplier`."},"accounts":{"anyOf":[{"items":{"$ref":"#/components/schemas/ContactAccounts"},"type":"array"},{"type":"null"}],"title":"Accounts","description":"Bank accounts of the contact. When omitted (or empty) and `paymentsAccounts` is provided, Embat derives one entry per payment account automatically: the derived `iban` holds the payment identifier resolved for the account's currency (an IBAN for IBAN-based currencies, otherwise the local account number), `swift` takes the account's `bic`, and `default` its `default` flag."},"paymentsAccounts":{"anyOf":[{"items":{"$ref":"#/components/schemas/ContactNewAccount"},"type":"array"},{"type":"null"}],"title":"Paymentsaccounts","description":"Bank accounts of the contact, one per currency/payment rail, with the identifiers required to pay it (IBAN, account number, routing number...). Each entry is validated independently and **silently discarded** when it has no usable account identifier for its `currency` (neither `iban` nor `accountNumber` set); format validity of the identifiers themselves is not enforced. Entries that resolve to the same account identifier are deduplicated, keeping only the first one."},"additionalInfo":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additionalinfo","description":"Free-form key/value metadata to attach to the contact."},"accountingCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingcode","description":"Accounting account code this contact is linked to.","examples":["4300001"]},"paymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentmethod","description":"Preferred payment method for this contact.","examples":["bank-transaction"]},"paymentTerms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Paymentterms","description":"Payment terms granted to the contact, in days.","examples":[30]},"attributes":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttributeValueRequestSchema"},"type":"array"},{"type":"null"}],"title":"Attributes","description":"Custom attribute values to attach to the contact."},"customId":{"type":"string","title":"Customid","description":"Embat custom/auto-generated unique contact ID. You can use it as your own custom ERP contact ID.","examples":["erp-contact-001"]}},"type":"object","required":["customId"],"title":"AuxBulkPatchContactsRequestSchema"},"AuxBulkPatchForecastsRequestSchema":{"properties":{"additionalInfo":{"additionalProperties":true,"type":"object","title":"Additionalinfo","description":"Free-form key/value metadata to attach to the forecast.","default":{}},"sync":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sync","description":"Marks the forecast as synchronized with your systems. Fields omitted from the request, or sent as `null`, are left unchanged.","examples":[true]},"id":{"type":"string","title":"Id","description":"Embat forecast ID to update.","examples":["fct_00123"]}},"type":"object","required":["id"],"title":"AuxBulkPatchForecastsRequestSchema"},"AuxBulkPatchOperationsRequestSchema":{"properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/OperationStatusEnum"},{"type":"null"}],"description":"Status of the operation: `pending`, `overdue`, `payment_in_progress`, `paid`, `cancel`, or the legacy values `paymentOrder` and `shipped` (avoid using them in new integrations). Setting `paid` also resets `pendingAmount` and `pendingAccountingAmount` to 0.","examples":["pending"]},"paymentDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paymentdate","description":"Date the operation is expected to be (or was) paid. Only the calendar date is meaningful; the time component is not preserved as sent."},"chargeAccount":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chargeaccount","description":"IBAN of your own bank account the operation is charged to."},"contactAccount":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contactaccount","description":"IBAN of the counterparty's (contact's) bank account."},"issuanceDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Issuancedate","description":"Issuance date of the operation's source document. Only the calendar date is meaningful; the time component is not preserved as sent."},"dueDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Duedate","description":"Due date of the operation. Only the calendar date is meaningful; the time component is not preserved as sent."},"accountingCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingcode","description":"Accounting account code the operation is posted to."},"accountingName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingname","description":"Accounting account name the operation is posted to."},"operationsCustomIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Operationscustomids","description":"Custom IDs of other operations grouped under this one, to represent an invoice group or remittance (typically combined with `documentType` set to `invoiceGroup`). Takes effect on `POST` (create or upsert): each referenced operation is marked `paid`, its `pendingAmount`/`pendingAccountingAmount` set to 0 and its payment date set to this operation's `paymentDate`. Resending the remittance without some previously grouped operations releases them: they return to `pending` with their full pending amount. Sending this field on a `PATCH` update has no effect."},"concept":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Concept","description":"Free-text description of the operation.","examples":["Invoice #2024-001"]},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount","description":"Total amount of the operation, in `currency`.","examples":[1250.5]},"accountingAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accountingamount","description":"Amount of the operation expressed in the company accounting currency.","examples":[1250.5]},"pendingAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pendingamount","description":"Amount still pending settlement, in `currency`.","examples":[1250.5]},"pendingAccountingAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pendingaccountingamount","description":"Amount still pending settlement, expressed in the accounting currency.","examples":[1250.5]},"currency":{"anyOf":[{"$ref":"#/components/schemas/CurrencyEnum"},{"type":"null"}],"description":"ISO currency code of `amount`.","examples":["EUR"]},"accountingCurrency":{"anyOf":[{"$ref":"#/components/schemas/CurrencyEnum"},{"type":"null"}],"description":"ISO currency code of `accountingAmount`.","examples":["EUR"]},"exchangeRate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Exchangerate","description":"Exchange rate applied between `currency` and `accountingCurrency`.","examples":[1.0]},"paymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentmethod","description":"Payment method associated with the operation (e.g. `bank-transaction`, `promissory-note`).","examples":["bank-transaction"]},"contact":{"anyOf":[{"$ref":"#/components/schemas/BaseContactSchema-Input"},{"type":"null"}],"description":"Contact (client/supplier) the operation is due from or to."},"additionalInfo":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additionalinfo","description":"Free-form key/value metadata to attach to the operation."},"invoiceGroupDocumentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoicegroupdocumentid","description":"Identifier of the invoice group this operation belongs to, if any."},"sync":{"type":"boolean","title":"Sync","description":"Marks the operation as synchronized on your side.","default":false},"documentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Documentid","description":"Identifier of the source document (e.g. invoice number)."},"attributes":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttributeValueRequestSchema"},"type":"array"},{"type":"null"}],"title":"Attributes","description":"Custom attribute values to attach to the operation."},"externalReference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Externalreference","description":"Free-form reference to this operation in an external system."},"customId":{"type":"string","title":"Customid","description":"Embat custom/auto-generated unique operation ID. You can use it as your own custom ERP operation ID."}},"type":"object","required":["customId"],"title":"AuxBulkPatchOperationsRequestSchema"},"AuxBulkPatchPaymentsRequestSchema":{"properties":{"sync":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sync","description":"Marks the payment as synchronized with the accounting system."},"additionalInfo":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additionalinfo","description":"Free-form key/value metadata to attach to the payment."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message to record against the payment. Sending an empty string clears a previously set error.","examples":["Missing account"]},"registered":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Registered","description":"Marks the payment as registered in the accounting system."},"customId":{"type":"string","title":"Customid","description":"Embat custom/auto-generated unique payment ID. You can use it as your own custom ERP payment ID."}},"type":"object","required":["customId"],"title":"AuxBulkPatchPaymentsRequestSchema"},"AuxBulkPatchProductsRequestSchema":{"properties":{"additionalInfo":{"additionalProperties":true,"type":"object","title":"Additionalinfo","description":"Free-form key/value metadata to attach to the product. Replaces the existing value entirely.","default":{}},"accountingCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingcode","description":"Accounting account code to link the product to.","examples":["5720001"]},"id":{"type":"string","title":"Id","description":"Embat product ID"}},"type":"object","required":["id"],"title":"AuxBulkPatchProductsRequestSchema"},"AuxBulkPatchReconcilingItemsRequestSchema":{"properties":{"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount","description":"Amount of the reconciling item, in `currency`. Omitted or `null` leaves the current amount unchanged.","examples":[199.9]},"currency":{"anyOf":[{"$ref":"#/components/schemas/CurrencyEnum"},{"type":"null"}],"description":"Currency of the reconciling item, in ISO 4217 format. Omitted or `null` leaves the current currency unchanged.","examples":["EUR"]},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date","description":"Date of the reconciling item. Omitted or `null` leaves the current date unchanged.","examples":["2024-01-15T00:00:00Z"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-text description of the reconciling item. Omitted or `null` leaves the current description unchanged.","examples":["Stripe order #4821"]},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Free-form key/value data associated with the reconciling item. When its reconciling source defines a `matchingMetadataKey`, the value stored under that key is used to automatically associate this item with a product transaction — only string, number or boolean values are usable for matching, other value types are ignored. An empty string is also accepted and treated as an empty object. Replaces the previously stored value entirely (not merged). Omitted or `null` leaves the current metadata unchanged.","examples":[{"orderId":"ORD-48213"}]},"additionalInfo":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additionalinfo","description":"Free-form key/value metadata to attach to the reconciling item. An empty string is also accepted and treated as an empty object. Replaces the previously stored value entirely (not merged). Omitted or `null` leaves the current metadata unchanged."},"customId":{"type":"string","title":"Customid","description":"Custom ID of the reconciling item to update.","examples":["stripe-order-4821"]}},"type":"object","required":["customId"],"title":"AuxBulkPatchReconcilingItemsRequestSchema"},"AuxBulkPatchTransactionsRequestSchema":{"properties":{"additionalInfo":{"additionalProperties":true,"type":"object","title":"Additionalinfo","description":"Free-form key/value metadata to attach to the transaction.","default":{}},"attributes":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttributeValueRequestSchema"},"type":"array"},{"type":"null"}],"title":"Attributes","description":"Custom attribute values to attach to the transaction."},"sync":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sync","description":"Marks the transaction as synchronized with your ERP."},"id":{"type":"string","title":"Id","description":"Embat transaction ID"}},"type":"object","required":["id"],"title":"AuxBulkPatchTransactionsRequestSchema"},"BankFileSchema":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Identifier of the bank associated with the file.","examples":["bank-001"]},"fullName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fullname","description":"Full name of the bank.","examples":["Banco Santander"]},"service":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service","description":"Banking service or channel used to exchange the file with the bank.","examples":["h2h"]},"countryCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Countrycode","description":"ISO country code of the bank.","examples":["ES"]}},"type":"object","title":"BankFileSchema"},"BankSchema":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Embat bank ID the payment order was executed through."},"fullName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fullname","description":"Full name of the bank.","examples":["Banco Santander"]}},"type":"object","title":"BankSchema"},"BaseContactSchema-Input":{"properties":{"tradeName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tradename","description":"Commercial/trade name of the contact. Defaults to `legalName` when omitted or blank.","examples":["Acme Supplies"]},"legalName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legalname","description":"Legal (registered) name of the contact.","examples":["Acme Supplies S.L."]},"taxId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxid","description":"Tax identification number (CIF/NIF/VAT) of the contact. Spaces are removed before storage.","examples":["B12345678"]},"contact":{"anyOf":[{"$ref":"#/components/schemas/ContactSchema-Input"},{"type":"null"}],"description":"Contact person details (name, phone, email) for this contact."},"address":{"anyOf":[{"$ref":"#/components/schemas/ContactAddressSchema"},{"type":"null"}],"description":"Postal address of the contact."},"contactType":{"$ref":"#/components/schemas/ContactContactTypeEnum","description":"Whether the contact is a `company` or a `freelance` individual. Defaults to `company`.","default":"company"},"type":{"anyOf":[{"$ref":"#/components/schemas/ContactTypeEnum"},{"type":"null"}],"description":"Commercial relationship with the contact: `client`, `supplier` or `client-supplier`."},"accounts":{"anyOf":[{"items":{"$ref":"#/components/schemas/ContactAccounts"},"type":"array"},{"type":"null"}],"title":"Accounts","description":"Bank accounts of the contact. When omitted (or empty) and `paymentsAccounts` is provided, Embat derives one entry per payment account automatically: the derived `iban` holds the payment identifier resolved for the account's currency (an IBAN for IBAN-based currencies, otherwise the local account number), `swift` takes the account's `bic`, and `default` its `default` flag."},"paymentsAccounts":{"anyOf":[{"items":{"$ref":"#/components/schemas/ContactNewAccount"},"type":"array"},{"type":"null"}],"title":"Paymentsaccounts","description":"Bank accounts of the contact, one per currency/payment rail, with the identifiers required to pay it (IBAN, account number, routing number...). Each entry is validated independently and **silently discarded** when it has no usable account identifier for its `currency` (neither `iban` nor `accountNumber` set); format validity of the identifiers themselves is not enforced. Entries that resolve to the same account identifier are deduplicated, keeping only the first one."},"additionalInfo":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additionalinfo","description":"Free-form key/value metadata to attach to the contact."},"accountingCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingcode","description":"Accounting account code this contact is linked to.","examples":["4300001"]},"paymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentmethod","description":"Preferred payment method for this contact.","examples":["bank-transaction"]},"paymentTerms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Paymentterms","description":"Payment terms granted to the contact, in days.","examples":[30]},"attributes":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttributeValueRequestSchema"},"type":"array"},{"type":"null"}],"title":"Attributes","description":"Custom attribute values to attach to the contact."},"customId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customid","description":"Your own unique ID for the contact. If omitted, Embat auto-generates one.","examples":["erp-contact-001"]}},"type":"object","title":"BaseContactSchema"},"BaseContactSchema-Output":{"properties":{"tradeName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tradename","description":"Commercial/trade name of the contact. Defaults to `legalName` when omitted or blank.","examples":["Acme Supplies"]},"legalName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legalname","description":"Legal (registered) name of the contact.","examples":["Acme Supplies S.L."]},"taxId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxid","description":"Tax identification number (CIF/NIF/VAT) of the contact. Spaces are removed before storage.","examples":["B12345678"]},"contact":{"anyOf":[{"$ref":"#/components/schemas/app__schemas__contacts__ContactSchema"},{"type":"null"}],"description":"Contact person details (name, phone, email) for this contact."},"address":{"anyOf":[{"$ref":"#/components/schemas/ContactAddressSchema"},{"type":"null"}],"description":"Postal address of the contact."},"contactType":{"$ref":"#/components/schemas/ContactContactTypeEnum","description":"Whether the contact is a `company` or a `freelance` individual. Defaults to `company`.","default":"company"},"type":{"anyOf":[{"$ref":"#/components/schemas/ContactTypeEnum"},{"type":"null"}],"description":"Commercial relationship with the contact: `client`, `supplier` or `client-supplier`."},"accounts":{"anyOf":[{"items":{"$ref":"#/components/schemas/ContactAccounts"},"type":"array"},{"type":"null"}],"title":"Accounts","description":"Bank accounts of the contact. When omitted (or empty) and `paymentsAccounts` is provided, Embat derives one entry per payment account automatically: the derived `iban` holds the payment identifier resolved for the account's currency (an IBAN for IBAN-based currencies, otherwise the local account number), `swift` takes the account's `bic`, and `default` its `default` flag."},"paymentsAccounts":{"anyOf":[{"items":{"$ref":"#/components/schemas/ContactNewAccount"},"type":"array"},{"type":"null"}],"title":"Paymentsaccounts","description":"Bank accounts of the contact, one per currency/payment rail, with the identifiers required to pay it (IBAN, account number, routing number...). Each entry is validated independently and **silently discarded** when it has no usable account identifier for its `currency` (neither `iban` nor `accountNumber` set); format validity of the identifiers themselves is not enforced. Entries that resolve to the same account identifier are deduplicated, keeping only the first one."},"additionalInfo":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additionalinfo","description":"Free-form key/value metadata to attach to the contact."},"accountingCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingcode","description":"Accounting account code this contact is linked to.","examples":["4300001"]},"paymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentmethod","description":"Preferred payment method for this contact.","examples":["bank-transaction"]},"paymentTerms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Paymentterms","description":"Payment terms granted to the contact, in days.","examples":[30]},"attributes":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttributeValueRequestSchema"},"type":"array"},{"type":"null"}],"title":"Attributes","description":"Custom attribute values to attach to the contact."},"customId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customid","description":"Your own unique ID for the contact. If omitted, Embat auto-generates one.","examples":["erp-contact-001"]}},"type":"object","title":"BaseContactSchema"},"BeneficiarySchema":{"properties":{"legalName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legalname","description":"Legal name of the payment order beneficiary.","examples":["Acme Supplies S.L."]}},"type":"object","title":"BeneficiarySchema"},"Body_create_file_emission_files__companyId___bankId__post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"Binary content of the file to submit to the bank. Set the part's `Content-Type` to match the format (e.g. `application/xml` for SEPA XML formats); if omitted, it is inferred from the file name extension."},"format":{"$ref":"#/components/schemas/FileFormatsEnum","description":"Format of the submitted file."}},"type":"object","required":["file","format"],"title":"Body_create_file_emission_files__companyId___bankId__post"},"BulkDeleteAccountingEntriesEntryCodeRequestSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DeleteAccountingEntriesEntryCodeRequestSchema"},"type":"array","title":"Data","description":"Entry codes to delete by."}},"type":"object","required":["data"],"title":"BulkDeleteAccountingEntriesEntryCodeRequestSchema"},"BulkDeleteAccountingEntriesRequestSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DeleteAccountingEntriesRequestSchema"},"type":"array","title":"Data","description":"Accounting entries to delete, identified by `customId`."}},"type":"object","required":["data"],"title":"BulkDeleteAccountingEntriesRequestSchema"},"BulkDeleteAccountingsAccountsRequestSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DeleteAccountingsAccountsRequestSchema"},"type":"array","title":"Data","description":"Accounting accounts to delete, identified by `accountingCode`."}},"type":"object","required":["data"],"title":"BulkDeleteAccountingsAccountsRequestSchema"},"BulkDeleteAttributesRequestSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DeleteAttributesRequestSchema"},"type":"array","title":"Data","description":"Attributes or values to remove, identified by `customId`."}},"type":"object","required":["data"],"title":"BulkDeleteAttributesRequestSchema"},"BulkDeleteContactsRequestSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DeleteContactsRequestSchema"},"type":"array","title":"Data","description":"Contacts to delete, identified by `customId`."}},"type":"object","required":["data"],"title":"BulkDeleteContactsRequestSchema"},"BulkDeleteOperationsAttributesRequestSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DeleteOperationsAttributesRequestSchema"},"type":"array","title":"Data","description":"Internal attributes to remove, grouped by operation."}},"type":"object","required":["data"],"title":"BulkDeleteOperationsAttributesRequestSchema"},"BulkDeleteOperationsRequestSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DeleteOperationsRequestSchema"},"type":"array","title":"Data","description":"Operations to delete, identified by `customId`."}},"type":"object","required":["data"],"title":"BulkDeleteOperationsRequestSchema"},"BulkDeletePaymentsRequestSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DeletePaymentsRequestSchema"},"type":"array","title":"Data","description":"Payments to delete, identified by `customId`."}},"type":"object","required":["data"],"title":"BulkDeletePaymentsRequestSchema"},"BulkDeleteReconcilingItemsRequestSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DeleteReconcilingItemsRequestSchema"},"type":"array","title":"Data","description":"Reconciling items to delete, identified by `customId`."}},"type":"object","required":["data"],"title":"BulkDeleteReconcilingItemsRequestSchema"},"BulkModifyAccountingEntriesResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ModifyAccountingEntriesResponseSchema"},"type":"array","title":"Data","description":"Result of the bulk operation, one entry per accounting entry."}},"type":"object","required":["data"],"title":"BulkModifyAccountingEntriesResponseSchema"},"BulkModifyAccountingsAccountsResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ModifyAccountingsAccountsResponseSchema"},"type":"array","title":"Data","description":"Result of the bulk deletion, one entry per requested `accountingCode`."}},"type":"object","required":["data"],"title":"BulkModifyAccountingsAccountsResponseSchema"},"BulkModifyAttributesResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ModifyAttributesResponseSchema"},"type":"array","title":"Data","description":"Result of the bulk operation, one entry per item."}},"type":"object","required":["data"],"title":"BulkModifyAttributesResponseSchema"},"BulkModifyContactsResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ModifyContactsResponseSchema"},"type":"array","title":"Data","description":"Result of the bulk operation, one entry per contact."}},"type":"object","required":["data"],"title":"BulkModifyContactsResponseSchema"},"BulkModifyForecastsResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ModifyForecastsResponseSchema"},"type":"array","title":"Data","description":"Result of the bulk update, one entry per forecast."}},"type":"object","required":["data"],"title":"BulkModifyForecastsResponseSchema"},"BulkModifyOperationsResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ModifyOperationsResponseSchema"},"type":"array","title":"Data","description":"Result of the bulk operation, one entry per operation."}},"type":"object","required":["data"],"title":"BulkModifyOperationsResponseSchema"},"BulkModifyPaymentsResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ModifyPaymentsResponseSchema"},"type":"array","title":"Data","description":"Result of the bulk operation, one entry per payment."}},"type":"object","required":["data"],"title":"BulkModifyPaymentsResponseSchema"},"BulkModifyProductsResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ModifyProductsResponseSchema"},"type":"array","title":"Data","description":"Result of the bulk operation, one entry per product."}},"type":"object","required":["data"],"title":"BulkModifyProductsResponseSchema"},"BulkModifyReconcilingItemsResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ModifyReconcilingItemsResponseSchema"},"type":"array","title":"Data","description":"Result of the bulk operation, one entry per reconciling item."}},"type":"object","required":["data"],"title":"BulkModifyReconcilingItemsResponseSchema"},"BulkModifyTransactionsResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ModifyTransactionsResponseSchema"},"type":"array","title":"Data","description":"Result of the bulk operation, one entry per transaction."}},"type":"object","required":["data"],"title":"BulkModifyTransactionsResponseSchema"},"BulkPatchAccountingEntriesRequestSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AuxBulkPatchAccountingEntriesRequestSchema"},"type":"array","title":"Data","description":"Accounting entries to update, identified by `customId`."}},"type":"object","required":["data"],"title":"BulkPatchAccountingEntriesRequestSchema"},"BulkPatchAccountingsAccountsRequestSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AuxBulkPatchAccountingsAccountsRequestSchema"},"type":"array","title":"Data","description":"Accounting accounts to update, identified by `accountingCode`."}},"type":"object","required":["data"],"title":"BulkPatchAccountingsAccountsRequestSchema"},"BulkPatchAttributesRequestSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AuxBulkPatchAttributesRequestSchema"},"type":"array","title":"Data","description":"Attributes to update, identified by `customId`."}},"type":"object","required":["data"],"title":"BulkPatchAttributesRequestSchema"},"BulkPatchContactsRequestSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AuxBulkPatchContactsRequestSchema"},"type":"array","title":"Data","description":"Contacts to update, identified by `customId`."}},"type":"object","required":["data"],"title":"BulkPatchContactsRequestSchema"},"BulkPatchForecastsRequestSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AuxBulkPatchForecastsRequestSchema"},"type":"array","title":"Data","description":"Forecasts to update, identified by `id`."}},"type":"object","required":["data"],"title":"BulkPatchForecastsRequestSchema"},"BulkPatchOperationsRequestSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AuxBulkPatchOperationsRequestSchema"},"type":"array","title":"Data","description":"Operations to update, identified by `customId`."}},"type":"object","required":["data"],"title":"BulkPatchOperationsRequestSchema"},"BulkPatchPaymentsRequestSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AuxBulkPatchPaymentsRequestSchema"},"type":"array","title":"Data","description":"Payments to update, identified by `customId`."}},"type":"object","required":["data"],"title":"BulkPatchPaymentsRequestSchema"},"BulkPatchProductsRequestSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AuxBulkPatchProductsRequestSchema"},"type":"array","title":"Data","description":"Products to update, identified by `id`."}},"type":"object","required":["data"],"title":"BulkPatchProductsRequestSchema"},"BulkPatchReconcilingItemsRequestSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AuxBulkPatchReconcilingItemsRequestSchema"},"type":"array","title":"Data","description":"Reconciling items to update, identified by `customId`."}},"type":"object","required":["data"],"title":"BulkPatchReconcilingItemsRequestSchema"},"BulkPatchTransactionsRequestSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AuxBulkPatchTransactionsRequestSchema"},"type":"array","title":"Data","description":"Transactions to update, identified by `id`."}},"type":"object","required":["data"],"title":"BulkPatchTransactionsRequestSchema"},"BulkPostAccountingEntriesRequestSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/PostAccountingEntriesRequestSchema"},"type":"array","title":"Data","description":"Accounting entries to create."}},"type":"object","required":["data"],"title":"BulkPostAccountingEntriesRequestSchema"},"BulkPostAccountingsAccountsRequestSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/PostAccountingsAccountsRequestSchema"},"type":"array","title":"Data","description":"Accounting accounts to create. Entries sharing the same `accountingCode` within the request are deduplicated and only the first occurrence is processed."}},"type":"object","required":["data"],"title":"BulkPostAccountingsAccountsRequestSchema"},"BulkPostAttributesRequestSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/PostAttributesRequestSchema"},"type":"array","title":"Data","description":"Attributes to create."}},"type":"object","required":["data"],"title":"BulkPostAttributesRequestSchema"},"BulkPostAttributesValuesRequestSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AttributesRequestValuesSchema"},"type":"array","title":"Data","description":"Values to add to the attribute."}},"type":"object","required":["data"],"title":"BulkPostAttributesValuesRequestSchema"},"BulkPostContactsRequestSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/PostContactsRequestSchema"},"type":"array","title":"Data","description":"Contacts to create."}},"type":"object","required":["data"],"title":"BulkPostContactsRequestSchema"},"BulkPostLogsRequestSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/PostLogRequestSchema"},"type":"array","title":"Data","description":"Logs to create."}},"type":"object","required":["data"],"title":"BulkPostLogsRequestSchema"},"BulkPostOperationsAttributesRequestSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/PostOperationsAttributesRequestSchema"},"type":"array","title":"Data","description":"Attribute values to add, grouped by operation."}},"type":"object","required":["data"],"title":"BulkPostOperationsAttributesRequestSchema"},"BulkPostOperationsRequestSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/PostOperationsRequestSchema"},"type":"array","title":"Data","description":"Operations to create."}},"type":"object","required":["data"],"title":"BulkPostOperationsRequestSchema"},"BulkPostPaymentsRequestSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/PostPaymentsRequestSchema"},"type":"array","title":"Data","description":"Payments to create."}},"type":"object","required":["data"],"title":"BulkPostPaymentsRequestSchema"},"BulkPostReconcilingItemsRequestSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/PostReconcilingItemSchema"},"type":"array","title":"Data","description":"Reconciling items to create."}},"type":"object","required":["data"],"title":"BulkPostReconcilingItemsRequestSchema"},"BulkPostTransactionsRequestSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/PostTransactionsRequestSchema"},"type":"array","title":"Data","description":"Transactions to create for a Manual product. For each day covered by this list, any transactions previously recorded for that same day on the product are permanently replaced — this cannot be undone."}},"type":"object","required":["data"],"title":"BulkPostTransactionsRequestSchema"},"BulkUpsertAccountingEntriesResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/UpsertAccountingEntriesResponseSchema"},"type":"array","title":"Data","description":"Result of the bulk creation/update, one entry per accounting entry."}},"type":"object","required":["data"],"title":"BulkUpsertAccountingEntriesResponseSchema"},"BulkUpsertAccountingsAccountsResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/UpsertAccountingsAccountsResponseSchema"},"type":"array","title":"Data","description":"Result of the bulk operation, one entry per account."}},"type":"object","required":["data"],"title":"BulkUpsertAccountingsAccountsResponseSchema"},"BulkUpsertAttributesResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/UpsertAttributesResponseSchema"},"type":"array","title":"Data","description":"Result of the bulk operation, one entry per attribute."}},"type":"object","required":["data"],"title":"BulkUpsertAttributesResponseSchema"},"BulkUpsertContactsResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/UpsertContactsResponseSchema"},"type":"array","title":"Data","description":"Result of the bulk operation, one entry per contact."}},"type":"object","required":["data"],"title":"BulkUpsertContactsResponseSchema"},"BulkUpsertOperationsResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/UpsertOperationsResponseSchema"},"type":"array","title":"Data","description":"Result of the bulk operation, one entry per operation."}},"type":"object","required":["data"],"title":"BulkUpsertOperationsResponseSchema"},"BulkUpsertPaymentsResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/UpsertPaymentsResponseSchema"},"type":"array","title":"Data","description":"Result of the bulk creation, one entry per payment."}},"type":"object","required":["data"],"title":"BulkUpsertPaymentsResponseSchema"},"BulkUpsertReconcilingItemsResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/UpsertReconcilingItemsResponseSchema"},"type":"array","title":"Data","description":"Result of the bulk creation, one entry per reconciling item."}},"type":"object","required":["data"],"title":"BulkUpsertReconcilingItemsResponseSchema"},"CompanyConfigSchema":{"properties":{"currency":{"$ref":"#/components/schemas/CurrencyEnum","description":"Company's accounting currency. Defaults to `EUR` when not configured.","default":"EUR","examples":["EUR"]}},"type":"object","title":"CompanyConfigSchema"},"CompanyResponseSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat company ID. Use it as `companyId` in the rest of the API.","examples":["company_5f2c1a"]},"legalName":{"type":"string","title":"Legalname","description":"Company legal name.","examples":["Acme Corporation S.L."]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updatedat","description":"Last updated date of the entity in the database"},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Createdat","description":"Created date of the entity in the database"},"contact":{"anyOf":[{"$ref":"#/components/schemas/app__schemas__companies__ContactSchema"},{"type":"null"}],"description":"Company's administrative contact."},"tags":{"anyOf":[{"items":{"$ref":"#/components/schemas/TagsSchema"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Tags assigned to the company, used for classification in Embat."},"config":{"anyOf":[{"$ref":"#/components/schemas/CompanyConfigSchema"},{"type":"null"}],"description":"Company-level configuration, such as the accounting currency."}},"type":"object","required":["id","legalName"],"title":"CompanyResponseSchema"},"CompanyUserSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat user ID.","examples":["user_8f3a1c"]},"email":{"type":"string","title":"Email","description":"User's email address.","examples":["laura.fernandez@acme.com"]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updatedat","description":"Last updated date of the entity in the database"},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Createdat","description":"Created date of the entity in the database"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User's first name.","examples":["Laura"]},"surname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Surname","description":"User's last name.","examples":["Fernández"]}},"type":"object","required":["id","email"],"title":"CompanyUserSchema"},"ContactAccounts":{"properties":{"swift":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Swift","description":"SWIFT/BIC code of the account.","examples":["BBVAESMMXXX"]},"iban":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iban","description":"Account identifier. Usually an IBAN, but for entries derived from `paymentsAccounts` in currencies that do not use IBAN (e.g. USD, CAD, JPY) it holds the resolved payment identifier for that currency, such as a local account number. Spaces are stripped before storage. An account with an empty `iban` is silently dropped when the contact is saved.","examples":["ES9121000418450200051332"]},"default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Default","description":"Marks this account as the contact's default one."}},"type":"object","title":"ContactAccounts"},"ContactAddressSchema":{"properties":{"postalCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postalcode","description":"Postal/ZIP code. Required by some payment rails (e.g. SEPA, SWIFT, ACH, Fedwire, BACS, CHAPS, Faster Payments, EFT) depending on the destination country and currency.","examples":["28001"]},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address","description":"Complete street address (street type, name, number, floor/flat...). Required by some payment rails depending on the destination country and currency.","examples":["Calle Mayor 10, 3B"]},"province":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Province","description":"Province, state or region. Required by some payment rails depending on the destination country and currency.","examples":["Madrid"]},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City","description":"City. Required by some payment rails depending on the destination country and currency.","examples":["Madrid"]},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","description":"Country name. Required by some payment rails depending on the destination country and currency.","examples":["Spain"]}},"type":"object","title":"ContactAddressSchema"},"ContactContactTypeEnum":{"type":"string","enum":["freelance","company"],"title":"ContactContactTypeEnum"},"ContactNewAccount":{"properties":{"default":{"type":"boolean","title":"Default","description":"Marks this account as the default one for its `currency`.","default":false},"currency":{"anyOf":[{"$ref":"#/components/schemas/CurrencyEnum"},{"type":"null"}],"description":"ISO currency code this account is used for. An empty string is treated the same as omitting this field.","examples":["EUR"]},"details":{"anyOf":[{"$ref":"#/components/schemas/ContactNewAccountDetails"},{"type":"null"}],"description":"Bank account identifiers. Which fields are required depends on the `currency` and the destination country: IBAN-based currencies expect `iban`, others expect `accountNumber` plus the identifiers of the applicable payment rail (e.g. `routingNumber` for US accounts, `sortCode` for UK accounts)."}},"type":"object","title":"ContactNewAccount"},"ContactNewAccountDetails":{"properties":{"iban":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iban","description":"International Bank Account Number. Used to identify accounts in IBAN-based rails (e.g. SEPA). Spaces are removed and the value is upper-cased before storage.","examples":["ES9121000418450200051332"]},"bic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bic","description":"Bank Identifier Code (BIC/SWIFT) of the account. Spaces are removed and the value is upper-cased before storage.","examples":["BBVAESMMXXX"]},"swift":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Swift","description":"Deprecated alias of `bic` kept for backward compatibility: when sent, its value overrides `bic`. Spaces are removed and the value is upper-cased before storage.","examples":["BBVAESMMXXX"]},"accountNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountnumber","description":"Local account number, used by non-IBAN rails (e.g. accounts in ARS, AUD, BRL, CAD, JPY...). Spaces are removed and the value is upper-cased before storage.","examples":["123456789"]},"accountType":{"anyOf":[{"$ref":"#/components/schemas/AccountTypeEnum"},{"type":"null"}],"description":"Type of the local account (`CHECKING` or `SAVINGS`). An empty string is treated the same as omitting this field."},"routingNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Routingnumber","description":"9-digit ABA routing number identifying the bank, used by US ACH/Fedwire transfers. Spaces are removed and the value is upper-cased before storage.","examples":["021000021"]},"sortCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sortcode","description":"6-digit sort code identifying the bank branch, used by UK BACS/CHAPS/Faster Payments transfers. Spaces are removed and the value is upper-cased before storage.","examples":["040004"]},"institutionNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Institutionnumber","description":"3-digit institution number identifying the bank, used together with `transitNumber` by Canadian EFT transfers. Spaces are removed and the value is upper-cased before storage.","examples":["001"]},"transitNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transitnumber","description":"5-digit transit number identifying the bank branch, used together with `institutionNumber` by Canadian EFT transfers. Spaces are removed and the value is upper-cased before storage.","examples":["12345"]},"bankCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bankcode","description":"Local bank identifier code, used by rails not covered by the other fields."},"branchCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branchcode","description":"Local bank branch code, used by rails not covered by the other fields."},"bsb":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bsb","description":"6-digit BSB code identifying the bank and branch, used by Australian bank transfers.","examples":["062-000"]},"bankCountryCode":{"anyOf":[{"$ref":"#/components/schemas/ISOCountryCodes"},{"type":"null"}],"description":"ISO 3166-1 alpha-2 country code of the bank holding this account. An empty string is treated the same as omitting this field.","examples":["ES"]}},"type":"object","title":"ContactNewAccountDetails"},"ContactSchema-Input":{"properties":{"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone","description":"Phone number of the contact person.","examples":["+34600000000"]},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"Email address of the contact person. Required to pay this contact by Interac e-Transfer in CAD.","examples":["billing@acme-supplies.com"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"First name of the contact person.","examples":["John"]},"surname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Surname","description":"Last name of the contact person.","examples":["Doe"]}},"type":"object","title":"ContactSchema"},"ContactTypeEnum":{"type":"string","enum":["supplier","client-supplier","client"],"title":"ContactTypeEnum"},"CurrencyEnum":{"type":"string","enum":["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BOV","BRL","BSD","BTC","BTN","BWP","BYN","BZD","CAD","CDF","CHE","CHF","CHW","CLF","CLP","CNH","CNY","COP","COU","CRC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EEK","EGP","ERN","ETB","ETH","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LTC","LTL","LVL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRU","MUR","MVR","MWK","MXN","MXV","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLE","SOS","SRD","SSP","STN","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","USN","UYI","UYU","UYW","UZS","VED","VEF","VES","VND","VUV","WST","XAF","XAG","XAU","XBA","XBB","XBC","XBD","XCD","XDR","XOF","XPD","XPF","XPT","XSU","XTS","XUA","XXX","YER","ZAR","ZMK","ZMW","ZWG","ZWL"],"title":"CurrencyEnum"},"DebtScheduleConfigSchema":{"properties":{"amortisingFrequency":{"$ref":"#/components/schemas/AmortisingFrequencyEnum","description":"Frequency at which principal is amortized: `monthly`, `quarterly`, `semiannually` or `yearly`."},"outstandingBalance":{"type":"number","title":"Outstandingbalance","description":"Balance still pending repayment, in the debt schedule `currency`.","examples":[100000.0]},"grantedBalance":{"type":"number","title":"Grantedbalance","description":"Original balance granted for this debt, in the debt schedule `currency`.","examples":[120000.0]},"totalPeriods":{"type":"integer","title":"Totalperiods","description":"Total number of payment periods in the schedule.","examples":[12]},"nextPaymentDate":{"type":"string","format":"date-time","title":"Nextpaymentdate","description":"Due date of the next scheduled payment."},"lastPaymentDate":{"type":"string","format":"date-time","title":"Lastpaymentdate","description":"Due date of the last scheduled payment (maturity date)."},"taxRate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Taxrate","description":"Tax rate applied to payments, if any. `null` when no tax applies.","examples":[0.02]},"annualInterestRateOrSpread":{"type":"number","title":"Annualinterestrateorspread","description":"Annual interest rate for `fixed` debt, or the spread applied over the reference rate for `variable` debt (see `interestType`).","examples":[0.045]},"interestType":{"$ref":"#/components/schemas/InterestTypeEnum","description":"Interest rate type: `fixed` or `variable`."}},"type":"object","required":["amortisingFrequency","outstandingBalance","grantedBalance","totalPeriods","nextPaymentDate","lastPaymentDate","annualInterestRateOrSpread","interestType"],"title":"DebtScheduleConfigSchema"},"DebtSchedulePaymentSchema":{"properties":{"period":{"type":"integer","title":"Period","description":"Period number in the amortization schedule, starting at 1.","examples":[1]},"date":{"type":"string","format":"date-time","title":"Date","description":"Due date of this scheduled payment."},"principalPayment":{"type":"number","title":"Principalpayment","description":"Principal portion of the payment, in the debt schedule `currency`.","examples":[8333.33]},"interestPayment":{"type":"number","title":"Interestpayment","description":"Interest portion of the payment, in the debt schedule `currency`.","examples":[416.67]},"taxPayment":{"type":"number","title":"Taxpayment","description":"Tax portion of the payment, in the debt schedule `currency`. `0` when no tax applies.","examples":[0.0]},"totalPayment":{"type":"number","title":"Totalpayment","description":"Total amount due for this period, in the debt schedule `currency` (`principalPayment` + `interestPayment` + `taxPayment`).","examples":[8750.0]}},"type":"object","required":["period","date","principalPayment","interestPayment","taxPayment","totalPayment"],"title":"DebtSchedulePaymentSchema"},"DeleteAccountingEntriesEntryCodeRequestSchema":{"properties":{"accountingEntryCode":{"type":"string","title":"Accountingentrycode","description":"Entry code to delete by. Matches entries whose `accountingEntryCode` or `accountingEntryCodeId` equals this value.","examples":["invoice-2024-001"]}},"type":"object","required":["accountingEntryCode"],"title":"DeleteAccountingEntriesEntryCodeRequestSchema"},"DeleteAccountingEntriesRequestSchema":{"properties":{"customId":{"type":"string","title":"Customid","description":"Custom ID of the accounting entry to delete."}},"type":"object","required":["customId"],"title":"DeleteAccountingEntriesRequestSchema"},"DeleteAccountingsAccountsRequestSchema":{"properties":{"accountingCode":{"type":"string","title":"Accountingcode","description":"Accounting code of the account to delete.","examples":["430001"]}},"type":"object","required":["accountingCode"],"title":"DeleteAccountingsAccountsRequestSchema"},"DeleteAttributesRequestSchema":{"properties":{"customId":{"type":"string","title":"Customid","description":"Custom ID to remove: the attribute's `customId` when deleting attributes, or a value's `customId` when removing values from an attribute."}},"type":"object","required":["customId"],"title":"DeleteAttributesRequestSchema"},"DeleteContactsRequestSchema":{"properties":{"customId":{"type":"string","title":"Customid","description":"Custom ID of the contact to delete."}},"type":"object","required":["customId"],"title":"DeleteContactsRequestSchema"},"DeleteOperationsAttributesRequestSchema":{"properties":{"customId":{"type":"string","title":"Customid","description":"Custom ID of the operation to remove attributes from."},"attributesCustomIds":{"items":{"type":"string"},"type":"array","title":"Attributescustomids","description":"Custom IDs of the internal attributes to remove from the operation."}},"type":"object","required":["customId","attributesCustomIds"],"title":"DeleteOperationsAttributesRequestSchema"},"DeleteOperationsRequestSchema":{"properties":{"customId":{"type":"string","title":"Customid","description":"Custom ID of the operation to delete."}},"type":"object","required":["customId"],"title":"DeleteOperationsRequestSchema"},"DeletePaymentsRequestSchema":{"properties":{"customId":{"type":"string","title":"Customid","description":"Custom ID of the payment to delete."}},"type":"object","required":["customId"],"title":"DeletePaymentsRequestSchema"},"DeleteReconcilingItemsRequestSchema":{"properties":{"customId":{"type":"string","title":"Customid","description":"Custom ID of the reconciling item to delete.","examples":["stripe-order-4821"]}},"type":"object","required":["customId"],"title":"DeleteReconcilingItemsRequestSchema"},"ErrorDetailSchema":{"properties":{"detail":{"type":"string","title":"Detail","description":"Human-readable explanation of the error.","examples":["Forbidden: you are not authorized to download this receipt."]}},"type":"object","required":["detail"],"title":"ErrorDetailSchema"},"ErrorResponse":{"properties":{"detail":{"type":"string","title":"Detail","description":"Human-readable explanation of the error.","examples":["user not authorized"]}},"type":"object","required":["detail"],"title":"ErrorResponse","description":"Error payload returned by the API (FastAPI `detail` convention)."},"ErspEnum":{"type":"string","enum":["netsuite","sageX3","odoo","businessCentral","navision","libra","distritoK","fo","zoho","holded","dynamicsAx","a3","businessOne","openbravo","sage200","sage50","r3","s4","ekon","m3Rosetta","sageIntacct","datev"],"title":"ErspEnum"},"FileFormatsEnum":{"type":"string","enum":["sepa34","sepa19","confir","dev019","n19_financiada","omfpag","rec019","sctdiv","sepint"],"title":"FileFormatsEnum"},"GetAccountingEntriesResponseSchema":{"properties":{"accountingCode":{"type":"string","minLength":1,"title":"Accountingcode","description":"Ledger account code the entry is posted to.","examples":["4300001"]},"counterpartAccountingCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Counterpartaccountingcode","description":"Ledger account code of the counterpart side of the entry, when applicable.","examples":["5720001"]},"accountingName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingname","description":"Display name of the ledger account (`accountingCode`).","examples":["Trade debtors"]},"assetAmount":{"type":"number","title":"Assetamount","description":"Outflow side of the entry, in `currency` (money leaving the account). An entry always has both sides: if you only send `liabilityAmount`, `assetAmount` defaults to 0. The sign is inverted on storage (0 always stays 0): a positive value you send is stored and returned as negative, following the convention that negative amounts are outflows.","examples":[1250.5]},"accountingAssetAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accountingassetamount","description":"Outflow side expressed in the company accounting currency (`accountingCurrency`). Subject to the same sign convention as `assetAmount`.","examples":[1250.5]},"balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Balance","description":"Running balance of the ledger account (`accountingCode`) after this entry, typically calculated by Embat rather than provided by you."},"liabilityAmount":{"type":"number","title":"Liabilityamount","description":"Inflow side of the entry, in `currency` (money entering the account), stored with the sign you send. An entry always has both sides: if you only send `assetAmount`, `liabilityAmount` defaults to 0.","examples":[0.0]},"accountingLiabilityAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accountingliabilityamount","description":"Inflow side expressed in the company accounting currency (`accountingCurrency`).","examples":[0.0]},"currency":{"anyOf":[{"$ref":"#/components/schemas/CurrencyEnum"},{"type":"null"}],"description":"ISO currency code of `assetAmount`/`liabilityAmount`.","examples":["EUR"]},"accountingCurrency":{"anyOf":[{"$ref":"#/components/schemas/CurrencyEnum"},{"type":"null"}],"description":"ISO currency code of `accountingAssetAmount`/`accountingLiabilityAmount`.","examples":["EUR"]},"contactCustomId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contactcustomid","description":"Custom ID of the contact (client/supplier), used when `accountingCode` is a contacts ledger account.","examples":["contact-001"]},"exchangeRate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Exchangerate","description":"Exchange rate applied between `currency` and `accountingCurrency`.","examples":[1.0]},"additionalInfo":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additionalinfo","description":"Free-form key/value metadata to attach to the entry. Sending an empty object (`{}`) has no effect and does not clear previously stored metadata."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-text description of the entry. If omitted, Embat generates one: `\"Asiento \"` followed by `accountingEntryCode` if set, otherwise by `customId`.","examples":["Invoice #2024-001 posting"]},"documentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Documentid","description":"Identifier of the source document (e.g. invoice) this entry relates to."},"transactionsIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Transactionsids","description":"Embat IDs of the bank transactions related to this entry."},"paymentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentid","description":"Embat ID of the payment related to this entry."},"date":{"type":"string","format":"date-time","title":"Date","description":"Accounting date of the entry. Send a plain date at midnight (e.g. `2024-01-15T00:00:00Z`) — sending a different time of day can shift the stored calendar date and is not fully normalized to midnight.","examples":["2024-01-15T00:00:00Z"]},"attributes":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttributeValueRequestSchema"},"type":"array"},{"type":"null"}],"title":"Attributes","description":"Custom attribute values to attach to the entry. Duplicate values and attributes flagged as internal-only are omitted when the entry is returned."},"customId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customid","description":"Your own unique ID for the entry, to use as your ERP accounting entry ID. If omitted, Embat auto-generates one.","examples":["erp-entry-2024-001"]},"accountingEntryCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingentrycode","description":"Your own ID grouping the entries that form a single journal/document (e.g. all lines of one invoice posting). Several entries can share the same `accountingEntryCode`.","examples":["invoice-2024-001"]},"accountingEntryCodeId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingentrycodeid","description":"Alternate grouping code for the entry. Bulk deletion by entry code (`DELETE /accountingentries/accountingentrycode/{companyId}`) matches entries by either `accountingEntryCode` or `accountingEntryCodeId`."},"id":{"type":"string","title":"Id","description":"Embat accounting entry ID"},"companyId":{"type":"string","title":"Companyid","description":"Embat company ID. You can get them from \"companies\" endpoints"},"updatedAt":{"type":"string","format":"date-time","title":"Updatedat","description":"Last updated date of the entity in the database"},"createdAt":{"type":"string","format":"date-time","title":"Createdat","description":"Created date of the entity in the database"},"type":{"anyOf":[{"$ref":"#/components/schemas/AccountingTypeEnum"},{"type":"null"}],"description":"Internal classification of the entry, assigned by Embat: `banks` or `accountings`. The value `analytics` is deprecated and no longer assigned; it may still appear on entries stored before its deprecation. Read-only: it cannot be set when creating or updating an entry.","examples":["accountings"]},"reconciled":{"type":"boolean","title":"Reconciled","description":"Whether the entry has been matched to a bank transaction through reconciliation. Entries dated before the ledger account's configured start date are excluded from reconciliation matching and never become `true`.","default":false},"reconciliationsIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Reconciliationsids","description":"Embat reconciliation IDs associated with this entry, when reconciled."}},"type":"object","required":["accountingCode","assetAmount","liabilityAmount","date","id","companyId","updatedAt","createdAt"],"title":"GetAccountingEntriesResponseSchema"},"GetAccountingsAccountsResponseSchema":{"properties":{"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active","description":"Whether the accounting account is active."},"type":{"anyOf":[{"$ref":"#/components/schemas/AccountingTypeEnum"},{"type":"null"}],"description":"Accounting account classification: `banks` or `accountings`. The value `analytics` is deprecated: it is still accepted for backwards compatibility but automatically stored as `accountings`. If omitted, it is inferred from `accountingCode`.Once an account exists, any `type` sent through the create endpoints is silently ignored — the value(inferred, overridden or explicit) only applies when the account is first created. Use the update endpoints to change the `type` of an existing account.","examples":["banks"]},"accountingName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingname","description":"Display name of the accounting account. Defaults to `accountingCode` when omitted.","examples":["Clients - Domestic"]},"collective":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Collective","description":"Whether this is a collective (grouping) accounting account rather than an individual one."},"additionalInfo":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additionalinfo","description":"Free-form key/value metadata to attach to the account. Sending an empty object leaves any previously stored metadata unchanged instead of clearing it."},"attributes":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttributeValueRequestACCOUNTSchema"},"type":"array"},{"type":"null"}],"title":"Attributes","description":"Custom attribute values to attach to the account. Entries with an empty or missing `customId` or `value` are silently discarded."},"accountingCode":{"type":"string","title":"Accountingcode","description":"Unique code identifying the accounting account in the company's chart of accounts.","examples":["430001"]},"companyId":{"type":"string","title":"Companyid","description":"Embat company ID. You can get them from \"companies\" endpoints"},"updatedAt":{"type":"string","format":"date-time","title":"Updatedat","description":"Last updated date of the entity in the database"},"createdAt":{"type":"string","format":"date-time","title":"Createdat","description":"Created date of the entity in the database"},"balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Balance","description":"Current balance of the accounting account.","examples":[15230.75]},"balanceDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Balancedate","description":"Date the balance was last calculated."}},"type":"object","required":["accountingCode","companyId","updatedAt","createdAt"],"title":"GetAccountingsAccountsResponseSchema"},"GetAttributesResponseSchema":{"properties":{"customId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customid","description":"Your own unique ID for the attribute. If omitted, Embat auto-generates one.","examples":["cost-center"]},"source":{"anyOf":[{"$ref":"#/components/schemas/SourceEnum"},{"type":"null"}],"description":"Origin of the attribute record. Defaults to `embat` when not stored on the record."},"active":{"type":"boolean","title":"Active","description":"Whether the attribute is active.","default":true},"name":{"type":"string","title":"Name","description":"Display name of the attribute.","examples":["Cost Center"]},"type":{"anyOf":[{"$ref":"#/components/schemas/AttributesStatusEnum"},{"type":"null"}],"description":"Data type of the attribute's values: `list`, `string` or `number`."},"required":{"type":"boolean","title":"Required","description":"Whether a value for this attribute should be mandatory wherever it is used. Informational only: this API does not enforce it.","default":false},"values":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttributesResponseValuesSchema"},"type":"array"},{"type":"null"}],"title":"Values","description":"Values available for this attribute."},"parentCustomId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentcustomid","description":"Custom ID of the parent attribute this attribute is nested under."},"id":{"type":"string","title":"Id","description":"Embat attribute ID."},"createdAt":{"type":"string","format":"date-time","title":"Createdat","description":"Creation date of the attribute."},"updatedAt":{"type":"string","format":"date-time","title":"Updatedat","description":"Last modification date of the attribute."},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentid","description":"Embat ID of the parent attribute. Only present when the attribute is nested under another one via `parentCustomId`."},"companyId":{"type":"string","title":"Companyid","description":"Embat company ID. You can get them from \"companies\" endpoints"}},"type":"object","required":["name","id","createdAt","updatedAt","companyId"],"title":"GetAttributesResponseSchema"},"GetBalancesResponseSchema":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Embat balance ID. Use it with `GET /balances/{companyId}/{id}` to retrieve this balance directly.","examples":["65a1f9c2e4b0a1b2c3d4e5f6"]},"balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Balance","description":"Balance of the bank product at the end of `date`, in the product's own currency.","examples":[125430.75]},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date","description":"Calendar day this end-of-day balance corresponds to."},"companyId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyid","description":"Embat company ID. You can get them from \"companies\" endpoints."},"product":{"anyOf":[{"$ref":"#/components/schemas/ProductBaseSchema"},{"type":"null"}],"description":"Bank product (account) this balance belongs to."},"accountingCurrency":{"anyOf":[{"$ref":"#/components/schemas/CurrencyEnum"},{"type":"null"}],"description":"Currency `accountingBalance` is expressed in. When not provided by the balance source, Embat computes it and defaults to `EUR`.","examples":["EUR"]},"accountingBalance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accountingbalance","description":"Balance converted to the company accounting currency. When not provided by the balance source, Embat computes it using the exchange rate as of `date`; it can be `null` if no exchange rate is available for that date and currency.","examples":[128500.2]},"exchangeRate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Exchangerate","description":"Exchange rate applied between the product currency and `accountingCurrency`. When not provided by the balance source, Embat computes it as of `date`; it can be `null` if no exchange rate is available for that date and currency.","examples":[1.0245]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Createdat","description":"Created date of the entity in the database."},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updatedat","description":"Last updated date of the entity in the database."}},"type":"object","title":"GetBalancesResponseSchema"},"GetBanksResponseSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat bank relationship ID.","examples":["bank_5f2c1a"]},"bankService":{"type":"string","title":"Bankservice","description":"Identifier of the banking connection or aggregation service backing this bank relationship.","examples":["bbva"]},"bankFullName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bankfullname","description":"Full legal name of the bank.","examples":["Banco Bilbao Vizcaya Argentaria"]},"lastAggregationOK":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Lastaggregationok","description":"Timestamp of the oldest successful data aggregation among this bank's active products (see `bankProducts`). `null` if none of its active products has ever aggregated successfully.","examples":["2024-01-15T08:30:00Z"]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updatedat","description":"Last time this bank relationship was updated in Embat."},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Createdat","description":"Date this bank relationship was created in Embat."},"companyId":{"type":"string","title":"Companyid","description":"Embat company ID. You can get them from \"companies\" endpoints."},"bankProducts":{"items":{"$ref":"#/components/schemas/app__schemas__banks__ProductSchema"},"type":"array","title":"Bankproducts","description":"Active products linked to this bank relationship. Products marked inactive, or that Embat can no longer match to an account, are silently excluded from this list."},"additionalInfo":{"additionalProperties":true,"type":"object","title":"Additionalinfo","description":"Free-form key/value metadata attached to the bank relationship.","default":{}}},"type":"object","required":["id","bankService","companyId","bankProducts"],"title":"GetBanksResponseSchema","description":"A bank relationship connected to the company, with the products (accounts, cards,\ncredit lines...) available under it."},"GetCategoriesResponseSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat category ID. Referenced as `categoryId` on transactions, forecasts and operations."},"companyId":{"type":"string","title":"Companyid","description":"Embat company ID. You can get them from \"companies\" endpoints"},"updatedAt":{"type":"string","format":"date-time","title":"Updatedat","description":"Last updated date of the entity in the database"},"createdAt":{"type":"string","format":"date-time","title":"Createdat","description":"Created date of the entity in the database"},"name":{"type":"string","title":"Name","description":"Category name.","examples":["Providers"]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentid","description":"Embat ID of the parent category. `null` for a top-level category."}},"type":"object","required":["id","companyId","updatedAt","createdAt","name"],"title":"GetCategoriesResponseSchema","description":"Category response data schema"},"GetContactsResponseSchema":{"properties":{"tradeName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tradename","description":"Commercial/trade name of the contact. Defaults to `legalName` when omitted or blank.","examples":["Acme Supplies"]},"legalName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legalname","description":"Legal (registered) name of the contact.","examples":["Acme Supplies S.L."]},"taxId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxid","description":"Tax identification number (CIF/NIF/VAT) of the contact. Spaces are removed before storage.","examples":["B12345678"]},"contact":{"anyOf":[{"$ref":"#/components/schemas/app__schemas__contacts__ContactSchema"},{"type":"null"}],"description":"Contact person details (name, phone, email) for this contact."},"address":{"anyOf":[{"$ref":"#/components/schemas/ContactAddressSchema"},{"type":"null"}],"description":"Postal address of the contact."},"contactType":{"$ref":"#/components/schemas/ContactContactTypeEnum","description":"Whether the contact is a `company` or a `freelance` individual. Defaults to `company`.","default":"company"},"type":{"$ref":"#/components/schemas/ContactTypeEnum","description":"Commercial relationship with the contact: `client`, `supplier` or `client-supplier`."},"accounts":{"anyOf":[{"items":{"$ref":"#/components/schemas/ContactAccounts"},"type":"array"},{"type":"null"}],"title":"Accounts","description":"Bank accounts of the contact. When omitted (or empty) and `paymentsAccounts` is provided, Embat derives one entry per payment account automatically: the derived `iban` holds the payment identifier resolved for the account's currency (an IBAN for IBAN-based currencies, otherwise the local account number), `swift` takes the account's `bic`, and `default` its `default` flag."},"paymentsAccounts":{"anyOf":[{"items":{"$ref":"#/components/schemas/ContactNewAccount"},"type":"array"},{"type":"null"}],"title":"Paymentsaccounts","description":"Bank accounts of the contact, one per currency/payment rail, with the identifiers required to pay it (IBAN, account number, routing number...). Each entry is validated independently and **silently discarded** when it has no usable account identifier for its `currency` (neither `iban` nor `accountNumber` set); format validity of the identifiers themselves is not enforced. Entries that resolve to the same account identifier are deduplicated, keeping only the first one."},"additionalInfo":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additionalinfo","description":"Free-form key/value metadata to attach to the contact."},"accountingCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingcode","description":"Accounting account code this contact is linked to.","examples":["4300001"]},"paymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentmethod","description":"Preferred payment method for this contact.","examples":["bank-transaction"]},"paymentTerms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Paymentterms","description":"Payment terms granted to the contact, in days.","examples":[30]},"attributes":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttributeValueRequestSchema"},"type":"array"},{"type":"null"}],"title":"Attributes","description":"Custom attribute values to attach to the contact."},"customId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customid","description":"Your own unique ID for the contact. If omitted, Embat auto-generates one.","examples":["erp-contact-001"]},"id":{"type":"string","title":"Id","description":"Embat contact ID."},"companyId":{"type":"string","title":"Companyid","description":"Embat company ID. You can get them from \"companies\" endpoints."},"updatedAt":{"type":"string","format":"date-time","title":"Updatedat","description":"Last updated date of the contact."},"createdAt":{"type":"string","format":"date-time","title":"Createdat","description":"Creation date of the contact."}},"type":"object","required":["type","id","companyId","updatedAt","createdAt"],"title":"GetContactsResponseSchema"},"GetDebtScheduleConfigResponseSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat debt schedule configuration ID."},"companyId":{"type":"string","title":"Companyid","description":"Embat company ID. You can get them from \"companies\" endpoints."},"currency":{"$ref":"#/components/schemas/CurrencyEnum","description":"ISO currency code of the amounts in this debt schedule.","examples":["EUR"]},"bankId":{"type":"string","title":"Bankid","description":"Embat ID of the bank relationship this debt is held with. You can get them from \"banks\" endpoints."},"debtProductId":{"type":"string","title":"Debtproductid","description":"Embat ID of the debt product this schedule is configured over. You can get them from \"products\" endpoints."},"settlementProductId":{"type":"string","title":"Settlementproductid","description":"Embat ID of the product used to pay this debt schedule (returned as `settlementProductId`). You can get them from \"products\" endpoints."},"config":{"$ref":"#/components/schemas/DebtScheduleConfigSchema","description":"Configuration of the debt schedule: frequency, balances, rates and period count."},"debtSchedulePaymentsCalendar":{"items":{"$ref":"#/components/schemas/DebtSchedulePaymentSchema"},"type":"array","title":"Debtschedulepaymentscalendar","description":"Full calendar of scheduled payments for this debt, one entry per period, with the principal, interest and tax breakdown."}},"type":"object","required":["id","companyId","currency","bankId","debtProductId","settlementProductId","config","debtSchedulePaymentsCalendar"],"title":"GetDebtScheduleConfigResponseSchema"},"GetFilesEmissionResponseSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat ID of the file emission."},"groupId":{"type":"string","title":"Groupid","description":"Embat group ID the file belongs to."},"companyId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyid","description":"Embat company ID the file was submitted for, if identified."},"fileName":{"type":"string","title":"Filename","description":"Name of the emitted file.","examples":["payment-order.xml"]},"bank":{"anyOf":[{"$ref":"#/components/schemas/BankFileSchema"},{"type":"null"}],"description":"Bank the file was submitted to, if identified."},"user":{"anyOf":[{"$ref":"#/components/schemas/UserFileSchema"},{"type":"null"}],"description":"User who requested the file emission, if it was created by a user rather than automatically."},"provider":{"type":"string","title":"Provider","description":"Channel or provider through which the file was submitted.","examples":["bank"]},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format","description":"Format of the emitted file.","examples":["sepa34"]},"emissionDate":{"type":"string","format":"date-time","title":"Emissiondate","description":"Date the file was submitted to the bank."},"createdAt":{"type":"string","format":"date-time","title":"Createdat","description":"Created date of the entity in the database"},"updatedAt":{"type":"string","format":"date-time","title":"Updatedat","description":"Last updated date of the entity in the database"}},"type":"object","required":["id","groupId","fileName","provider","emissionDate","createdAt","updatedAt"],"title":"GetFilesEmissionResponseSchema","description":"Files response data schema"},"GetFilesReceptionResponseSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat ID of the file reception."},"groupId":{"type":"string","title":"Groupid","description":"Embat group ID the file belongs to."},"companyId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyid","description":"Embat company ID the file was matched to, if identified."},"fileName":{"type":"string","title":"Filename","description":"Name of the file as received from the bank.","examples":["statement.xml"]},"bank":{"anyOf":[{"$ref":"#/components/schemas/BankFileSchema"},{"type":"null"}],"description":"Bank the file was received from, if identified."},"downloaded":{"type":"boolean","title":"Downloaded","description":"Whether the file has already been downloaded."},"provider":{"type":"string","title":"Provider","description":"Channel or provider through which the file was received.","examples":["bank"]},"receptionDate":{"type":"string","format":"date-time","title":"Receptiondate","description":"Date the file was received from the bank."},"createdAt":{"type":"string","format":"date-time","title":"Createdat","description":"Created date of the entity in the database"},"updatedAt":{"type":"string","format":"date-time","title":"Updatedat","description":"Last updated date of the entity in the database"}},"type":"object","required":["id","groupId","fileName","downloaded","provider","receptionDate","createdAt","updatedAt"],"title":"GetFilesReceptionResponseSchema","description":"Files response data schema"},"GetForecastsResponseSchema":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Embat forecast ID.","examples":["fct_00123"]},"companyId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyid","description":"Embat company ID. You can get them from \"companies\" endpoints."},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount","description":"Forecasted amount, in the scenario `currency`. Positive for inflows, negative for outflows.","examples":[15000.0]},"accountingAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accountingamount","description":"Forecasted amount converted to EUR using the exchange rate for the forecast `date`. `null` when the forecast is dated before 2021 or no exchange rate is yet available for that date. Only computed when listing forecasts with `GET /forecasts/{companyId}`; retrieving a single forecast by id returns this field as stored, typically `null`.","examples":[13850.25]},"accountingCurrency":{"anyOf":[{"$ref":"#/components/schemas/CurrencyEnum"},{"type":"null"}],"description":"Currency of `accountingAmount`. Currently always `EUR`.","examples":["EUR"]},"exchangeRate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Exchangerate","description":"Exchange rate applied to obtain `accountingAmount` from `amount`. Subject to the same conditions as `accountingAmount`.","examples":[1.083]},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date","description":"Date the forecast applies to."},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Createdat","description":"Creation date of the forecast."},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updatedat","description":"Last updated date of the forecast."},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Categoryid","description":"Embat ID of the category the forecast is classified under."},"scenario":{"anyOf":[{"$ref":"#/components/schemas/ScenarioSchema"},{"type":"null"}],"description":"Scenario the forecast belongs to."}},"type":"object","title":"GetForecastsResponseSchema","description":"Forecasts response data schema"},"GetForeignExchangeRatesResponseSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat ID of the exchange rate record.","examples":["fx-2024-01-15"]},"baseCurrency":{"$ref":"#/components/schemas/CurrencyEnum","description":"Currency all values in `rates` are expressed against. On `GET /foreignexchangerates` this reflects the `baseCurrency` query parameter of the request; on `GET /foreignexchangerates/{id}` it is always `EUR`.","examples":["EUR"]},"date":{"type":"string","format":"date-time","title":"Date","description":"Date the exchange rates apply to.","examples":["2024-01-15T00:00:00Z"]},"createdAt":{"type":"string","format":"date-time","title":"Createdat","description":"Created date of the entity in the database"},"updatedAt":{"type":"string","format":"date-time","title":"Updatedat","description":"Last updated date of the entity in the database"},"rates":{"additionalProperties":true,"type":"object","title":"Rates","description":"Exchange rate of each currency against `baseCurrency` on `date`, keyed by ISO currency code. `baseCurrency` itself is included with a rate of 1.0. Multiply an amount expressed in `baseCurrency` by a currency's rate to convert it into that currency.","examples":[{"EUR":1.0,"USD":1.086}]}},"type":"object","required":["id","baseCurrency","date","createdAt","updatedAt","rates"],"title":"GetForeignExchangeRatesResponseSchema","description":"Foreign exchange rates response data schema"},"GetOperationsResponseSchema":{"properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/OperationStatusEnum"},{"type":"null"}],"description":"Status of the operation: `pending`, `overdue`, `paymentOrder`, `payment_in_progress`, `paid`, `cancel` or `shipped` (legacy value)."},"paymentDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paymentdate","description":"Date the operation is expected to be (or was) paid. Only the calendar date is meaningful; the time component is not preserved as sent."},"chargeAccount":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chargeaccount","description":"IBAN of your own bank account the operation is charged to."},"contactAccount":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contactaccount","description":"IBAN of the counterparty's (contact's) bank account."},"issuanceDate":{"type":"string","format":"date-time","title":"Issuancedate","description":"Issuance date of the operation's source document. Only the calendar date is meaningful; the time component is not preserved as sent. If `dueDate` is omitted, it defaults to this date, and `paymentDate` in turn defaults to `dueDate`."},"dueDate":{"type":"string","format":"date-time","title":"Duedate","description":"Due date of the operation. Only the calendar date is meaningful; the time component is not preserved as sent. On creation, unless `status` is explicitly set to `paid`, `cancel` or `payment_in_progress`, the operation's status is computed from this date: `pending` if it is today or later, `overdue` otherwise."},"accountingCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingcode","description":"Accounting account code the operation is posted to."},"accountingName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingname","description":"Accounting account name the operation is posted to."},"operationsCustomIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Operationscustomids","description":"Custom IDs of other operations grouped under this one, to represent an invoice group or remittance (typically combined with `documentType` set to `invoiceGroup`). Takes effect on `POST` (create or upsert): each referenced operation is marked `paid`, its `pendingAmount`/`pendingAccountingAmount` set to 0 and its payment date set to this operation's `paymentDate`. Resending the remittance without some previously grouped operations releases them: they return to `pending` with their full pending amount. Sending this field on a `PATCH` update has no effect."},"concept":{"type":"string","title":"Concept","description":"Free-text description of the operation.","examples":["Invoice #2024-001"]},"amount":{"type":"number","title":"Amount","description":"Total amount of the operation, in `currency`.","examples":[1250.5]},"accountingAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accountingamount","description":"Amount of the operation expressed in the company accounting currency. If omitted, it defaults to `amount` (and `accountingCurrency` is reset to `currency`). Note: whenever the resulting `accountingCurrency` equals `currency`, this value is **forced to `amount`**, even if you explicitly sent a different value.","examples":[1250.5]},"pendingAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pendingamount","description":"Amount still pending settlement, in `currency`. Defaults to `amount` when not set.","examples":[1250.5]},"pendingAccountingAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pendingaccountingamount","description":"Amount still pending settlement, expressed in the accounting currency. If omitted, it is derived proportionally from `pendingAmount` and `accountingAmount`; it is 0 when `amount` or `accountingAmount` is 0.","examples":[1250.5]},"currency":{"anyOf":[{"$ref":"#/components/schemas/CurrencyEnum"},{"type":"null"}],"description":"ISO currency code of `amount`.","examples":["EUR"]},"accountingCurrency":{"anyOf":[{"$ref":"#/components/schemas/CurrencyEnum"},{"type":"null"}],"description":"ISO currency code of `accountingAmount`. Defaults to `currency` when omitted. Note: when `accountingAmount` is omitted, this field is also **reset to `currency`**, even if you explicitly sent a different value.","examples":["EUR"]},"exchangeRate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Exchangerate","description":"Exchange rate applied between `currency` and `accountingCurrency`. If omitted, it is derived from `amount`/`accountingAmount` (1.0 when `accountingAmount` is 0). Note: whenever `amount` equals `accountingAmount`, the value is **forced to 1.0**, even if you explicitly sent a different one; out-of-range or non-finite values are also silently reset to 1.0.","examples":[1.0]},"paymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentmethod","description":"Payment method associated with the operation (e.g. `bank-transaction`, `promissory-note`).","examples":["bank-transaction"]},"contact":{"anyOf":[{"$ref":"#/components/schemas/BaseContactSchema-Output"},{"type":"null"}],"description":"Contact (client/supplier) the operation is due from or to."},"additionalInfo":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additionalinfo","description":"Free-form key/value metadata to attach to the operation."},"invoiceGroupDocumentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoicegroupdocumentid","description":"Identifier of the invoice group this operation belongs to, if any."},"sync":{"type":"boolean","title":"Sync","description":"Marks the operation as synchronized on your side.","default":false},"documentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Documentid","description":"Identifier of the source document (e.g. invoice number)."},"attributes":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttributeValueRequestSchema"},"type":"array"},{"type":"null"}],"title":"Attributes","description":"Custom attribute values to attach to the operation."},"externalReference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Externalreference","description":"Free-form reference to this operation in an external system."},"customId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customid","description":"Your own unique ID for the operation. If omitted, Embat auto-generates one.","examples":["invoice-2024-001"]},"documentType":{"anyOf":[{"$ref":"#/components/schemas/OperationDocumentTypeResponseEnum"},{"type":"null"}],"description":"Type of the source document. Besides the values accepted on creation, operations created by hand in Embat (`generatedFrom` `manual`) expose `manual` or `recurringChild`, and operations generated by the debt module (`generatedFrom` `internal`) expose `amortizationQuote`, `amortizationInterest`, `amortizationTax` or `amortizationQuoteDebt`. These read-only types cannot be used when creating operations.","examples":["invoice"]},"generatedFrom":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generatedfrom","description":"Origin the operation was generated from: `erp` or `external` (created through this API), `manual` (created by hand in Embat) or `internal` (generated by the debt module). Only `erp` and `external` can be set when creating operations.","examples":["erp"]},"id":{"type":"string","title":"Id","description":"Embat operation ID."},"companyId":{"type":"string","title":"Companyid","description":"Embat company ID. You can get them from \"companies\" endpoints"},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updatedat","description":"Last updated date of the entity in the database"},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Createdat","description":"Created date of the entity in the database"},"tags":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Tags","description":"Tags attached to the operation."},"treasuryPendingAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Treasurypendingamount","description":"Amount still pending from the treasury point of view, in `currency`. Read-only: managed by Embat and not accepted on create or update.","examples":[1250.5]},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Categoryid","description":"Embat category ID used for reporting. Defaults to `998` when not set.","examples":["998"]},"comments":{"anyOf":[{"items":{},"type":"array"},{"type":"string"},{"type":"null"}],"title":"Comments","description":"Comments recorded on the operation."},"uploadedFiles":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Uploadedfiles","description":"Files attached to the operation."},"secondary":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Secondary","description":"Whether the operation is flagged as secondary."}},"type":"object","required":["issuanceDate","dueDate","concept","amount","id","companyId"],"title":"GetOperationsResponseSchema"},"GetPaymentsResponseSchema":{"properties":{"method":{"type":"string","title":"Method","description":"Payment method. Defaults to `bank-transaction` when not sent.","default":"bank-transaction","examples":["bank-transaction"]},"transactionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transactionid","description":"Embat ID of the bank transaction linked to this payment."},"operations":{"anyOf":[{"items":{"$ref":"#/components/schemas/OperationPaymentResponseSchema"},"type":"array"},{"type":"null"}],"title":"Operations","description":"Operations this payment is applied to."},"productId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Productid","description":"Embat product ID. You can get them from \"Products\" endpoints."},"contactCustomId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contactcustomid","description":"Custom ID of the contact (client/supplier) involved in the payment."},"date":{"type":"string","format":"date-time","title":"Date","description":"Date the payment was made or received."},"concept":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Concept","description":"Free-text description of the payment.","examples":["Invoice #2024-001 payment"]},"amount":{"type":"number","title":"Amount","description":"Payment amount in the payment `currency`. Positive for collections, negative for outgoing payments.","examples":[1250.5]},"accountingAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accountingamount","description":"Payment amount expressed in the company accounting currency. If omitted, it defaults to `amount`, `accountingCurrency` defaults to `currency` and `exchangeRate` is set to 1.0.","examples":[1250.5]},"currency":{"anyOf":[{"$ref":"#/components/schemas/CurrencyEnum"},{"type":"null"}],"description":"ISO currency code of `amount`. Defaults to `EUR` when omitted.","examples":["EUR"]},"accountingCurrency":{"anyOf":[{"$ref":"#/components/schemas/CurrencyEnum"},{"type":"null"}],"description":"ISO currency code of `accountingAmount`. Defaults to `currency` when omitted.","examples":["EUR"]},"exchangeRate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Exchangerate","description":"Exchange rate applied between `currency` and `accountingCurrency`. Defaults to 1.0 when omitted.","examples":[1.0]},"additionalInfo":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additionalinfo","description":"Free-form key/value metadata to attach to the payment."},"attributes":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttributeValueRequestSchema"},"type":"array"},{"type":"null"}],"title":"Attributes","description":"Custom attribute values to attach to the payment."},"id":{"type":"string","title":"Id","description":"Embat payment ID"},"customId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customid","description":"Your own unique ID for the payment. If the payment has none, it is auto-generated as `id` concatenated with `companyId`."},"type":{"anyOf":[{"$ref":"#/components/schemas/PaymentShortTypeEnum"},{"type":"null"}],"description":"Payment classification: `contacts`, `accountings`, `operations`, `banks` or `salesOrder`. Payments created through this API are always classified as `operations`."},"productAccountingCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Productaccountingcode","description":"Product accounting code"},"accountingCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingcode","description":"Accounting account code the payment is posted to."},"paymentSource":{"$ref":"#/components/schemas/SourceEnum","description":"Origin of the payment record.","default":"embat"},"companyId":{"type":"string","title":"Companyid","description":"Embat company ID. You can get them from \"companies\" endpoints"},"updatedAt":{"type":"string","format":"date-time","title":"Updatedat","description":"Last updated date of the entity in the database"},"createdAt":{"type":"string","format":"date-time","title":"Createdat","description":"Created date of the entity in the database"},"sync":{"type":"boolean","title":"Sync","description":"Whether the payment is synchronized with the accounting system.","default":false},"registered":{"type":"boolean","title":"Registered","description":"Whether the payment is registered in the accounting system.","default":false},"userId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Userid","description":"Embat ID of the user who created the payment, if created manually."},"transactionAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Transactionamount","description":"Total amount of the bank transaction linked to this payment."},"transactionAccountingAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Transactionaccountingamount","description":"Accounting amount of the bank transaction linked to this payment."},"multicurrency":{"type":"boolean","title":"Multicurrency","description":"True when the payment's operations use a currency different from the payment currency, indicating a currency exchange took place.","default":false},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message recorded against the payment, if any.","examples":["Missing account"]},"contact":{"anyOf":[{"$ref":"#/components/schemas/BaseContactSchema-Output"},{"type":"null"}],"description":"Contact (client/supplier) involved in the payment."},"intercompany":{"anyOf":[{"$ref":"#/components/schemas/IntercompanyPaymentSchema"},{"type":"null"}],"description":"Intercompany settlement details, when the payment is part of one."},"transactionAttributes":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttributeValueRequestSchema"},"type":"array"},{"type":"null"}],"title":"Transactionattributes","description":"Custom attribute values of the bank transaction linked to this payment."}},"type":"object","required":["date","amount","id","companyId","updatedAt","createdAt"],"title":"GetPaymentsResponseSchema"},"GetProductsResponseSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat product ID.","examples":["prod_8f3a1c"]},"bankId":{"type":"string","title":"Bankid","description":"Embat ID of the bank relationship this product belongs to. You can get them from \"banks\" endpoints."},"companyId":{"type":"string","title":"Companyid","description":"Embat company ID. You can get them from \"companies\" endpoints."},"accountingCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingcode","description":"Accounting account code this product is posted to, if it has been reconciled with one.","examples":["5720001"]},"balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Balance","description":"Current balance of the product, in its own `currency`.","examples":[15234.67]},"balanceCreditGranted":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Balancecreditgranted","description":"Total credit limit granted on the product (e.g. for lines of credit).","examples":[50000.0]},"countableBalance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Countablebalance","description":"Balance used for reporting purposes. Defaults to `balance` when the bank does not report a countable balance, or reports it as zero.","examples":[15234.67]},"arrangedBalance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Arrangedbalance","description":"Arranged balance of the product (e.g. amount drawn against a credit line), as reported by the bank.","examples":[10000.0]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updatedat","description":"Last time this product was updated in Embat."},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Createdat","description":"Date this product was created in Embat."},"currency":{"$ref":"#/components/schemas/CurrencyEnum","description":"ISO currency code of the product.","examples":["EUR"]},"product":{"type":"string","title":"Product","description":"Product name as reported by the bank.","examples":["Cuenta Corriente"]},"iban":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iban","description":"IBAN or account number identifying the product.","examples":["ES9121000418450200051332"]},"type":{"type":"string","title":"Type","description":"Product type reported by the bank, e.g. `checking`, `savings`, `card`, `loan`, `lineofcredit` or `wallet`.","examples":["checking"]},"alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Alias","description":"Custom alias given to the product in Embat, if any.","examples":["Main checking account"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the product as reported by the bank."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","description":"Notes attached to the product in Embat. Falls back to `description` when not set."},"bank":{"type":"string","title":"Bank","description":"Identifier of the bank providing this product.","examples":["bbva"]},"bankFullName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bankfullname","description":"Full legal name of the bank this product belongs to, if known.","examples":["Banco Bilbao Vizcaya Argentaria"]},"additionalInfo":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additionalinfo","description":"Free-form key/value metadata attached to the product."},"hasTransactions":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hastransactions","description":"Whether the product supports bank transactions. Always recomputed by Embat: `true` for `checking`, `lineofcredit`, `card` and `wallet` products, `false` otherwise."},"manual":{"type":"boolean","title":"Manual","description":"Whether the product was added manually, rather than aggregated from a bank connection.","default":false},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Custom tags assigned to the product in Embat."},"financialDetails":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Financialdetails","description":"Additional financial detail attributes reported for the product."},"reconciliation":{"anyOf":[{"$ref":"#/components/schemas/ReconciliationSchema"},{"type":"null"}],"description":"Reconciliation status of the accounting account linked to this product via `accountingCode`. `null` when the product has no `accountingCode` or when no accounting account matches it."}},"type":"object","required":["id","bankId","companyId","currency","product","type","bank"],"title":"GetProductsResponseSchema"},"GetReconcilingItemsResponseSchema":{"properties":{"amount":{"type":"number","title":"Amount","description":"Amount of the reconciling item, in `currency`.","examples":[199.9]},"currency":{"$ref":"#/components/schemas/CurrencyEnum","description":"Currency of the reconciling item, in ISO 4217 format.","examples":["EUR"]},"date":{"type":"string","format":"date-time","title":"Date","description":"Date of the reconciling item.","examples":["2024-01-15T00:00:00Z"]},"description":{"type":"string","title":"Description","description":"Free-text description of the reconciling item.","examples":["Stripe order #4821"]},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Free-form key/value data associated with the reconciling item. When its reconciling source defines a `matchingMetadataKey`, the value stored under that key is used to automatically associate this item with a product transaction — only string, number or boolean values are usable for matching, other value types are ignored. An empty string is also accepted and treated as an empty object. Replaces the previously stored value entirely (not merged). Omitted or `null` leaves the current metadata unchanged.","examples":[{"orderId":"ORD-48213"}]},"additionalInfo":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additionalinfo","description":"Free-form key/value metadata to attach to the reconciling item. An empty string is also accepted and treated as an empty object. Replaces the previously stored value entirely (not merged). Omitted or `null` leaves the current metadata unchanged."},"customId":{"type":"string","title":"Customid","description":"Your own unique ID for the reconciling item. You can use it as your internal reconciling item identifier.","examples":["stripe-order-4821"]},"reconcilingSourceCustomId":{"type":"string","title":"Reconcilingsourcecustomid","description":"Custom ID of the reconciling source this item belongs to. You can get them from \"Reconciling Sources\" endpoints. Not validated against existing reconciling sources: if it does not match one, the item is still created, but it is not automatically matched against transactions.","examples":["stripe-orders"]},"id":{"type":"string","title":"Id","description":"Embat ID of the reconciling item."},"companyId":{"type":"string","title":"Companyid","description":"Embat company ID. You can get them from \"companies\" endpoints."},"updatedAt":{"type":"string","format":"date-time","title":"Updatedat","description":"Last updated date of the entity in the database."},"createdAt":{"type":"string","format":"date-time","title":"Createdat","description":"Created date of the entity in the database."},"reconciled":{"type":"boolean","title":"Reconciled","description":"Whether this item has completed the reconciliation process against a transaction. Set by Embat; it cannot be set through this API.","default":false},"isMatched":{"type":"boolean","title":"Ismatched","description":"Whether this item has been matched to a transaction. Defaults to `false` when the item is created and is set by Embat afterwards; it cannot be set through this API.","default":false}},"type":"object","required":["amount","currency","date","description","customId","reconcilingSourceCustomId","id","companyId","updatedAt","createdAt"],"title":"GetReconcilingItemsResponseSchema"},"GetReconcilingSourceResponseSchema":{"properties":{"name":{"type":"string","title":"Name","description":"Name of the reconciling source.","examples":["Stripe orders feed"]},"additionalInfo":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additionalinfo","description":"Free-form key/value metadata to attach to the reconciling source. Replaces the previously stored value entirely (not merged). Omitted or `null` values leave the current metadata unchanged."},"matchingMetadataKey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matchingmetadatakey","description":"Key within a reconciling item's `metadata` used to associate it with a product transaction. Omitted or `null` values leave the current key unchanged.","examples":["orderId"]},"customId":{"type":"string","title":"Customid","description":"Your own unique ID for the reconciling source. You can use it as your internal reconciling source ID.","examples":["stripe-orders"]},"id":{"type":"string","title":"Id","description":"Embat ID of the reconciling source."},"companyId":{"type":"string","title":"Companyid","description":"Embat company ID. You can get them from \"companies\" endpoints"},"updatedAt":{"type":"string","format":"date-time","title":"Updatedat","description":"Last updated date of the entity in the database"},"createdAt":{"type":"string","format":"date-time","title":"Createdat","description":"Created date of the entity in the database"}},"type":"object","required":["name","customId","id","companyId","updatedAt","createdAt"],"title":"GetReconcilingSourceResponseSchema"},"GetScenarioResponseSchema":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Embat scenario ID."},"companyId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyid","description":"Embat company ID. You can get them from \"companies\" endpoints."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the scenario.","examples":["FY2024 Base Case"]},"currency":{"anyOf":[{"$ref":"#/components/schemas/CurrencyEnum"},{"type":"null"}],"description":"Currency the scenario's forecasted amounts are expressed in.","examples":["EUR"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-text description of the scenario.","examples":["Baseline cash flow forecast for FY2024"]},"periodicity":{"anyOf":[{"$ref":"#/components/schemas/PeriodicityEnum"},{"type":"null"}],"description":"Time granularity of the scenario's forecasted periods."},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Createdat","description":"Created date of the entity."},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updatedat","description":"Last updated date of the entity."},"startPeriod":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Startperiod","description":"Numeric identifier of the first period covered by the scenario's forecast."},"endPeriod":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Endperiod","description":"Numeric identifier of the last period covered by the scenario's forecast."}},"type":"object","title":"GetScenarioResponseSchema"},"GetTransactionsResponseSchema":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Embat transaction ID."},"balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Balance","description":"Balance of the product (bank account) immediately after this transaction.","examples":[15234.67]},"operationDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Operationdate","description":"Date the transaction was recorded (booked) by the bank."},"valueDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Valuedate","description":"Value date of the transaction, used for balance calculations."},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updatedat","description":"Last time this transaction was updated in Embat."},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Createdat","description":"Date this transaction was created in Embat."},"companyId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyid","description":"Embat company ID. You can get them from \"companies\" endpoints."},"additionalInfo":{"additionalProperties":true,"type":"object","title":"Additionalinfo","description":"Free-form key/value metadata attached to the transaction. For some bank transactions, Embat automatically populates it with the bank-provided concept details (`ownConcept`, `commonConcept`), overriding any value previously set on this field.","default":{}},"bank":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bank","description":"Name of the bank holding the product this transaction belongs to."},"concept":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Concept","description":"Free-text description of the transaction, as reported by the bank. On `GET /transactions/{companyId}` (list), it is returned as an empty string when the value stored for the transaction is invalid.","examples":["Invoice #2024-001 payment"]},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount","description":"Amount of the transaction, in the product's `currency`.","examples":[1250.5]},"accountingAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accountingamount","description":"Transaction amount expressed in the company accounting currency.","examples":[1250.5]},"exchangeRate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Exchangerate","description":"Exchange rate applied between the transaction currency and `accountingCurrency`.","examples":[1.0]},"accountingCurrency":{"anyOf":[{"$ref":"#/components/schemas/CurrencyEnum"},{"type":"null"}],"description":"ISO currency code of `accountingAmount`.","examples":["EUR"]},"reconciled":{"type":"boolean","title":"Reconciled","description":"Whether the transaction has been fully reconciled against accounting entries.","default":false},"status":{"anyOf":[{"$ref":"#/components/schemas/StatusEnum"},{"type":"null"}],"description":"Booking status reported by the bank: `PENDING` while the transaction has not yet settled, `BOOKED` once confirmed. `null` when the bank reported no status or any other value."},"product":{"anyOf":[{"$ref":"#/components/schemas/ProductBaseSchema"},{"type":"null"}],"description":"Product (bank account) this transaction belongs to."},"sync":{"type":"boolean","title":"Sync","description":"Whether the transaction has been synchronized with your ERP. Use the `sync` filter on `GET /transactions/{companyId}` to fetch transactions still pending synchronization, then confirm them back with `PATCH`.","default":false},"attributes":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttributeValueRequestSchema"},"type":"array"},{"type":"null"}],"title":"Attributes","description":"Custom attribute values attached to the transaction."},"categories":{"anyOf":[{"items":{"$ref":"#/components/schemas/TransactionsAnalyticsSchema"},"type":"array"},{"type":"null"}],"title":"Categories","description":"Breakdown of the transaction amount across categories, for reporting."},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Free-form labels attached to the transaction. Omitted from the response when the stored value is not a list of labels."},"groupAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Groupamount","description":"Transaction amount converted to the company group's shared currency. Only calculated when the company belongs to a group with a shared currency configured, and an exchange rate is available for the transaction date.","examples":[1180.25]},"groupExchangeRate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Groupexchangerate","description":"Exchange rate applied to compute `groupAmount`.","examples":[1.06]},"groupCurrency":{"anyOf":[{"$ref":"#/components/schemas/CurrencyEnum"},{"type":"null"}],"description":"Company group's shared currency, when configured.","examples":["EUR"]},"currencyExchangeData":{"anyOf":[{"$ref":"#/components/schemas/TransactionCurrencyExchangeDataSchema"},{"type":"null"}],"description":"Currency conversion details, when the transaction involved one."},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment","description":"Free-text comment added to the transaction in Embat."},"reconciliationsIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Reconciliationsids","description":"Embat reconciliation IDs associated with this transaction, when reconciled."},"type":{"anyOf":[{"$ref":"#/components/schemas/TransactionTypeEnum"},{"type":"null"}],"description":"Embat's automatic classification of the transaction (e.g. `payment`, `fee`, `tax`, `collection`). `null` when the transaction could not be classified."}},"type":"object","title":"GetTransactionsResponseSchema","description":"Transactions response data schema"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ISOCountryCodes":{"type":"string","enum":["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","CV","KH","CM","CA","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","SZ","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","XK","YE","ZM","ZW"],"title":"ISOCountryCodes"},"IntercompanyPaymentSchema":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Embat ID of the intercompany process this payment belongs to.","examples":["proc-abc"]},"relatedPaymentPairs":{"anyOf":[{"items":{"items":{"type":"string"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Relatedpaymentpairs","description":"All hub/counterpart payment ID pairs of the intercompany process, as `[hubPaymentId, counterpartPaymentId]` pairs.","examples":[[["pay-hub-A","pay-sub-1"],["pay-hub-B","pay-sub-2"]]]},"relatedPaymentsIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Relatedpaymentsids","description":"Embat IDs of the payments directly paired with this one in the intercompany process (e.g. a subsidiary payment points back to its hub payment line).","examples":[["pay-hub-A"]]},"counterpartyContact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Counterpartycontact","description":"Custom ID of the counterparty contact involved in the intercompany settlement.","examples":["contact-sub-1"]}},"type":"object","title":"IntercompanyPaymentSchema"},"InterestTypeEnum":{"type":"string","enum":["fixed","variable"],"title":"InterestTypeEnum"},"ListAccountingEntriesResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/GetAccountingEntriesResponseSchema"},"type":"array","title":"Data","description":"Accounting entries matching the query."},"nextPageToken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextpagetoken","description":"Token to fetch the next page of results. `null` when there are no more pages."}},"type":"object","required":["data"],"title":"ListAccountingEntriesResponseSchema"},"ListAccountingsAccountsResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/GetAccountingsAccountsResponseSchema"},"type":"array","title":"Data","description":"Accounting accounts matching the query."},"nextPageToken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextpagetoken","description":"Token to fetch the next page of results. `null` when there are no more pages."}},"type":"object","required":["data"],"title":"ListAccountingsAccountsResponseSchema"},"ListAttributesResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/GetAttributesResponseSchema"},"type":"array","title":"Data","description":"All attributes of the company."}},"type":"object","required":["data"],"title":"ListAttributesResponseSchema"},"ListBalancesResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/GetBalancesResponseSchema"},"type":"array","title":"Data","description":"Balances matching the query."},"nextPageToken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextpagetoken","description":"Token to fetch the next page of results. `null` when there are no more pages."}},"type":"object","required":["data"],"title":"ListBalancesResponseSchema"},"ListBanksResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/GetBanksResponseSchema"},"type":"array","title":"Data","description":"Bank relationships of the company."}},"type":"object","required":["data"],"title":"ListBanksResponseSchema"},"ListCategoriesResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/GetCategoriesResponseSchema"},"type":"array","title":"Data","description":"Categories matching the query."}},"type":"object","required":["data"],"title":"ListCategoriesResponseSchema"},"ListCompaniesResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CompanyResponseSchema"},"type":"array","title":"Data","description":"Companies your credentials have access to."}},"type":"object","required":["data"],"title":"ListCompaniesResponseSchema"},"ListCompanyUsersResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CompanyUserSchema"},"type":"array","title":"Data","description":"Users with access to the company."}},"type":"object","required":["data"],"title":"ListCompanyUsersResponseSchema"},"ListContactsResponseSchema":{"properties":{"nextPageToken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextpagetoken","description":"Token to fetch the next page of results. `null` when there are no more pages."},"data":{"items":{"$ref":"#/components/schemas/GetContactsResponseSchema"},"type":"array","title":"Data","description":"Contacts matching the query."}},"type":"object","required":["data"],"title":"ListContactsResponseSchema"},"ListDebtScheduleConfigsResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/GetDebtScheduleConfigResponseSchema"},"type":"array","title":"Data","description":"Debt schedule configurations matching the query."},"nextPageToken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextpagetoken","description":"Token to fetch the next page of results. `null` when there are no more pages."}},"type":"object","required":["data"],"title":"ListDebtScheduleConfigsResponseSchema"},"ListFilesEmissionsResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/GetFilesEmissionResponseSchema"},"type":"array","title":"Data","description":"File emissions matching the query."},"nextPageToken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextpagetoken","description":"Token to fetch the next page of results. `null` when there are no more pages."}},"type":"object","required":["data"],"title":"ListFilesEmissionsResponseSchema"},"ListFilesReceptionsResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/GetFilesReceptionResponseSchema"},"type":"array","title":"Data","description":"File receptions matching the query."},"nextPageToken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextpagetoken","description":"Token to fetch the next page of results. `null` when there are no more pages."}},"type":"object","required":["data"],"title":"ListFilesReceptionsResponseSchema"},"ListForecastsResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/GetForecastsResponseSchema"},"type":"array","title":"Data","description":"Forecasts matching the query."},"nextPageToken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextpagetoken","description":"Token to fetch the next page of results. `null` when there are no more pages."}},"type":"object","required":["data"],"title":"ListForecastsResponseSchema"},"ListForeignExchangeRatesResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/GetForeignExchangeRatesResponseSchema"},"type":"array","title":"Data","description":"Exchange rate records matching the query, one per date, most recent first."},"nextPageToken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextpagetoken","description":"Token to fetch the next page of results. `null` when there are no more pages."}},"type":"object","required":["data"],"title":"ListForeignExchangeRatesResponseSchema"},"ListOperationsResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/GetOperationsResponseSchema"},"type":"array","title":"Data","description":"Operations matching the query."},"nextPageToken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextpagetoken","description":"Token to fetch the next page of results. `null` when there are no more pages."}},"type":"object","required":["data"],"title":"ListOperationsResponseSchema"},"ListPaymentOrdersResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/PaymentOrderSchema"},"type":"array","title":"Data","description":"Payment orders matching the query."},"nextPageToken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextpagetoken","description":"Token to fetch the next page of results. `null` when there are no more pages."}},"type":"object","required":["data"],"title":"ListPaymentOrdersResponseSchema"},"ListPaymentsResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/GetPaymentsResponseSchema"},"type":"array","title":"Data","description":"Payments matching the query."},"nextPageToken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextpagetoken","description":"Token to fetch the next page of results. `null` when there are no more pages."}},"type":"object","required":["data"],"title":"ListPaymentsResponseSchema"},"ListProductsResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/GetProductsResponseSchema"},"type":"array","title":"Data","description":"Products of the company."}},"type":"object","required":["data"],"title":"ListProductsResponseSchema"},"ListReconcilingItemsResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/GetReconcilingItemsResponseSchema"},"type":"array","title":"Data","description":"Reconciling items matching the query."},"nextPageToken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextpagetoken","description":"Token to fetch the next page of results. `null` when there are no more pages."}},"type":"object","required":["data"],"title":"ListReconcilingItemsResponseSchema"},"ListReconcilingSourcesResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/GetReconcilingSourceResponseSchema"},"type":"array","title":"Data","description":"Reconciling sources configured for the company."}},"type":"object","required":["data"],"title":"ListReconcilingSourcesResponseSchema"},"ListScenariosResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/GetScenarioResponseSchema"},"type":"array","title":"Data","description":"Published scenarios of the company."}},"type":"object","required":["data"],"title":"ListScenariosResponseSchema"},"ListTransactionsResponseSchema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/GetTransactionsResponseSchema"},"type":"array","title":"Data","description":"Transactions matching the query."},"nextPageToken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextpagetoken","description":"Token to fetch the next page of results. `null` when there are no more pages."}},"type":"object","required":["data"],"title":"ListTransactionsResponseSchema"},"LogsCodesEnum":{"type":"string","enum":["INFO","WARNING","ERROR","AUTHORIZATION_INFO","AUTHORIZATION_WARNING","AUTHORIZATION_ERROR","ACCOUNTINGS_ACCOUNTS_INFO","ACCOUNTINGS_ACCOUNTS_WARNING","ACCOUNTINGS_ACCOUNTS_ERROR","ACCOUNTINGS_ENTRIES_INFO","ACCOUNTINGS_ENTRIES_WARNING","ACCOUNTINGS_ENTRIES_ERROR","ATTRIBUTES_INFO","ATTRIBUTES_WARNING","ATTRIBUTES_ERROR","CONTACTS_INFO","CONTACTS_WARNING","CONTACTS_ERROR","OPERATIONS_INFO","OPERATIONS_WARNING","OPERATIONS_ERROR","PAYMENTS_INFO","PAYMENTS_WARNING","PAYMENTS_ERROR"],"title":"LogsCodesEnum"},"LogsLevelsEnum":{"type":"string","enum":["INFO","ERROR","WARNING"],"title":"LogsLevelsEnum"},"ModifyAccountingEntriesResponseSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat resource ID"}},"type":"object","required":["id"],"title":"ModifyAccountingEntriesResponseSchema"},"ModifyAccountingsAccountsResponseSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat resource ID"}},"type":"object","required":["id"],"title":"ModifyAccountingsAccountsResponseSchema"},"ModifyAttributesResponseSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat resource ID"}},"type":"object","required":["id"],"title":"ModifyAttributesResponseSchema"},"ModifyContactsResponseSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat resource ID"}},"type":"object","required":["id"],"title":"ModifyContactsResponseSchema"},"ModifyForecastsResponseSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat forecast ID.","examples":["fct_00123"]}},"type":"object","required":["id"],"title":"ModifyForecastsResponseSchema"},"ModifyOperationsResponseSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat resource ID"}},"type":"object","required":["id"],"title":"ModifyOperationsResponseSchema"},"ModifyPaymentsResponseSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat payment ID"}},"type":"object","required":["id"],"title":"ModifyPaymentsResponseSchema"},"ModifyProductsResponseSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat product ID"}},"type":"object","required":["id"],"title":"ModifyProductsResponseSchema"},"ModifyReconcilingItemsResponseSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat resource ID"}},"type":"object","required":["id"],"title":"ModifyReconcilingItemsResponseSchema"},"ModifyReconcilingSourceResponseSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat resource ID"}},"type":"object","required":["id"],"title":"ModifyReconcilingSourceResponseSchema"},"ModifyTransactionsResponseSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat transaction ID"}},"type":"object","required":["id"],"title":"ModifyTransactionsResponseSchema"},"OperationDocumentTypeEnum":{"type":"string","enum":["invoice","other","note","invoiceGroup","confirming","deposit","factoring","tax","amortizationQuote","amortizationInterest","amortizationTax","refund","paymentDocument","cheque","deliveryNote","purchaseOrder","employeeExpense"],"title":"OperationDocumentTypeEnum"},"OperationDocumentTypeResponseEnum":{"type":"string","enum":["invoice","other","note","invoiceGroup","confirming","deposit","factoring","tax","amortizationQuote","amortizationInterest","amortizationTax","refund","paymentDocument","cheque","deliveryNote","purchaseOrder","employeeExpense","recurringChild","amortizationQuoteDebt","manual"],"title":"OperationDocumentTypeResponseEnum"},"OperationGeneratedFromEnum":{"type":"string","enum":["erp","external"],"title":"OperationGeneratedFromEnum"},"OperationGeneratedFromFilterEnum":{"type":"string","enum":["erp","external","manual","internal"],"title":"OperationGeneratedFromFilterEnum"},"OperationPaymentRequestSchema":{"properties":{"amount":{"type":"number","title":"Amount","description":"Amount of the payment allocated to this operation, in the operation currency.","examples":[500.0]},"customId":{"type":"string","title":"Customid","description":"Custom ID of the operation this payment amount is applied to.","examples":["invoice-2024-001"]}},"type":"object","required":["amount","customId"],"title":"OperationPaymentRequestSchema"},"OperationPaymentResponseSchema":{"properties":{"amount":{"type":"number","title":"Amount","description":"Amount of the payment allocated to this operation.","examples":[500.0]},"customId":{"type":"string","title":"Customid","description":"Custom ID of the related operation.","examples":["invoice-2024-001"]},"currency":{"anyOf":[{"$ref":"#/components/schemas/CurrencyEnum"},{"type":"null"}],"description":"Currency of the related operation.","examples":["EUR"]},"paymentAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Paymentamount","description":"Total payment amount applied across all operations in this payment."},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Embat ID of the related operation."},"exchangeRate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Exchangerate","description":"Exchange rate applied between the operation currency and its accounting currency."},"invoiceGroupDocumentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoicegroupdocumentid","description":"Identifier of the invoice group the related operation belongs to, if any."},"documentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Documentid","description":"Identifier of the source document (e.g. invoice) of the related operation."},"issuanceDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Issuancedate","description":"Issuance date of the related operation's source document."},"documentType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Documenttype","description":"Type of the source document of the related operation."},"paymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentmethod","description":"Payment method configured on the related operation."},"operationPaymentAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Operationpaymentamount","description":"Amount of the related operation already covered by payments."}},"type":"object","required":["amount","customId"],"title":"OperationPaymentResponseSchema"},"OperationStatusEnum":{"type":"string","enum":["paymentOrder","cancel","paid","payment_in_progress","overdue","pending","shipped"],"title":"OperationStatusEnum"},"PatchAccountingEntriesRequestSchema":{"properties":{"accountingCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingcode","description":"Ledger account code the entry is posted to.","examples":["4300001"]},"counterpartAccountingCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Counterpartaccountingcode","description":"Ledger account code of the counterpart side of the entry, when applicable.","examples":["5720001"]},"accountingName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingname","description":"Display name of the ledger account (`accountingCode`).","examples":["Trade debtors"]},"assetAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Assetamount","description":"Outflow side of the entry, in `currency` (money leaving the account, e.g. a supplier payment). An entry always has both sides: if you set only `assetAmount` or only `liabilityAmount`, the other one defaults to 0. The sign is inverted on storage (0 always stays 0): a positive value you send is stored and returned as negative, following the convention that negative amounts are outflows.","examples":[1250.5]},"accountingAssetAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accountingassetamount","description":"Outflow side expressed in the company accounting currency (`accountingCurrency`). Subject to the same sign convention as `assetAmount`.","examples":[1250.5]},"balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Balance","description":"Running balance of the ledger account (`accountingCode`) after this entry, typically calculated by Embat rather than provided by you."},"liabilityAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Liabilityamount","description":"Inflow side of the entry, in `currency` (money entering the account, e.g. a customer collection), stored with the sign you send. An entry always has both sides: if you set only `assetAmount` or only `liabilityAmount`, the other one defaults to 0.","examples":[0.0]},"accountingLiabilityAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accountingliabilityamount","description":"Inflow side expressed in the company accounting currency (`accountingCurrency`).","examples":[0.0]},"currency":{"anyOf":[{"$ref":"#/components/schemas/CurrencyEnum"},{"type":"null"}],"description":"ISO currency code of `assetAmount`/`liabilityAmount`.","examples":["EUR"]},"accountingCurrency":{"anyOf":[{"$ref":"#/components/schemas/CurrencyEnum"},{"type":"null"}],"description":"ISO currency code of `accountingAssetAmount`/`accountingLiabilityAmount`.","examples":["EUR"]},"contactCustomId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contactcustomid","description":"Custom ID of the contact (client/supplier), used when `accountingCode` is a contacts ledger account.","examples":["contact-001"]},"exchangeRate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Exchangerate","description":"Exchange rate applied between `currency` and `accountingCurrency`.","examples":[1.0]},"additionalInfo":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additionalinfo","description":"Free-form key/value metadata to attach to the entry. Sending an empty object (`{}`) has no effect and does not clear previously stored metadata."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-text description of the entry. If omitted — on both creation and update — Embat sets (or resets) it to an auto-generated value: `\"Asiento \"` followed by `accountingEntryCode` if set, otherwise by `customId`. On `PATCH`, this means leaving `description` out overwrites any previously set custom description; resend the current value to keep it unchanged.","examples":["Invoice #2024-001 posting"]},"documentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Documentid","description":"Identifier of the source document (e.g. invoice) this entry relates to."},"transactionsIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Transactionsids","description":"Embat IDs of the bank transactions related to this entry."},"paymentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentid","description":"Embat ID of the payment related to this entry."},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date","description":"Accounting date of the entry. Send a plain date at midnight (e.g. `2024-01-15T00:00:00Z`) — sending a different time of day can shift the stored calendar date and is not fully normalized to midnight.","examples":["2024-01-15T00:00:00Z"]},"attributes":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttributeValueRequestSchema"},"type":"array"},{"type":"null"}],"title":"Attributes","description":"Custom attribute values to attach to the entry. Duplicate values and attributes flagged as internal-only are omitted when the entry is returned."}},"type":"object","title":"PatchAccountingEntriesRequestSchema"},"PatchAccountingsAccountsRequestSchema":{"properties":{"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active","description":"Whether the accounting account is active."},"type":{"anyOf":[{"$ref":"#/components/schemas/AccountingTypeEnum"},{"type":"null"}],"description":"Accounting account classification: `banks` or `accountings`. The value `analytics` is deprecated: it is still accepted for backwards compatibility but automatically stored as `accountings`. If omitted, it is inferred from `accountingCode`.Once an account exists, any `type` sent through the create endpoints is silently ignored — the value(inferred, overridden or explicit) only applies when the account is first created. Use the update endpoints to change the `type` of an existing account.","examples":["banks"]},"accountingName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingname","description":"Display name of the accounting account.","examples":["Bank account - Santander EUR"]},"collective":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Collective","description":"Whether this is a collective (grouping) accounting account rather than an individual one."},"additionalInfo":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additionalinfo","description":"Free-form key/value metadata to attach to the account. Sending an empty object leaves any previously stored metadata unchanged instead of clearing it."},"attributes":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttributeValueRequestACCOUNTSchema"},"type":"array"},{"type":"null"}],"title":"Attributes","description":"Custom attribute values to attach to the account. Entries with an empty or missing `customId` or `value` are silently discarded."}},"type":"object","title":"PatchAccountingsAccountsRequestSchema"},"PatchAttributesRequestSchema":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Display name of the attribute."},"active":{"type":"boolean","title":"Active","description":"Whether the attribute is active. Omit to leave the current value unchanged.","default":true},"values":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttributesRequestValuesSchema"},"type":"array"},{"type":"null"}],"title":"Values","description":"Full list of values the attribute should have after this update. Sending `values` **replaces** the current list: any previously stored value whose `customId` is not included here is removed. Omit `values` entirely to leave the current values untouched. An attribute holds at most 5000 values; if the combined total would exceed the limit, the excess new values are silently discarded and existing ones already in the list are kept."},"parentCustomId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentcustomid","description":"Custom ID of the parent attribute, to nest this attribute under another one (e.g. a \"City\" attribute nested under \"Country\"). Must reference an existing attribute.","examples":["country"]}},"type":"object","title":"PatchAttributesRequestSchema"},"PatchContactsRequestSchema":{"properties":{"tradeName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tradename","description":"Commercial/trade name of the contact. Defaults to `legalName` when omitted or blank.","examples":["Acme Supplies"]},"legalName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legalname","description":"Legal (registered) name of the contact.","examples":["Acme Supplies S.L."]},"taxId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxid","description":"Tax identification number (CIF/NIF/VAT) of the contact. Spaces are removed before storage.","examples":["B12345678"]},"contact":{"anyOf":[{"$ref":"#/components/schemas/ContactSchema-Input"},{"type":"null"}],"description":"Contact person details (name, phone, email) for this contact."},"address":{"anyOf":[{"$ref":"#/components/schemas/ContactAddressSchema"},{"type":"null"}],"description":"Postal address of the contact."},"contactType":{"$ref":"#/components/schemas/ContactContactTypeEnum","description":"Whether the contact is a `company` or a `freelance` individual. Defaults to `company`.","default":"company"},"type":{"anyOf":[{"$ref":"#/components/schemas/ContactTypeEnum"},{"type":"null"}],"description":"Commercial relationship with the contact: `client`, `supplier` or `client-supplier`."},"accounts":{"anyOf":[{"items":{"$ref":"#/components/schemas/ContactAccounts"},"type":"array"},{"type":"null"}],"title":"Accounts","description":"Bank accounts of the contact. When omitted (or empty) and `paymentsAccounts` is provided, Embat derives one entry per payment account automatically: the derived `iban` holds the payment identifier resolved for the account's currency (an IBAN for IBAN-based currencies, otherwise the local account number), `swift` takes the account's `bic`, and `default` its `default` flag."},"paymentsAccounts":{"anyOf":[{"items":{"$ref":"#/components/schemas/ContactNewAccount"},"type":"array"},{"type":"null"}],"title":"Paymentsaccounts","description":"Bank accounts of the contact, one per currency/payment rail, with the identifiers required to pay it (IBAN, account number, routing number...). Each entry is validated independently and **silently discarded** when it has no usable account identifier for its `currency` (neither `iban` nor `accountNumber` set); format validity of the identifiers themselves is not enforced. Entries that resolve to the same account identifier are deduplicated, keeping only the first one."},"additionalInfo":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additionalinfo","description":"Free-form key/value metadata to attach to the contact."},"accountingCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingcode","description":"Accounting account code this contact is linked to.","examples":["4300001"]},"paymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentmethod","description":"Preferred payment method for this contact.","examples":["bank-transaction"]},"paymentTerms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Paymentterms","description":"Payment terms granted to the contact, in days.","examples":[30]},"attributes":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttributeValueRequestSchema"},"type":"array"},{"type":"null"}],"title":"Attributes","description":"Custom attribute values to attach to the contact."}},"type":"object","title":"PatchContactsRequestSchema"},"PatchForecastsRequestSchema":{"properties":{"additionalInfo":{"additionalProperties":true,"type":"object","title":"Additionalinfo","description":"Free-form key/value metadata to attach to the forecast.","default":{}},"sync":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sync","description":"Marks the forecast as synchronized with your systems. Fields omitted from the request, or sent as `null`, are left unchanged.","examples":[true]}},"type":"object","title":"PatchForecastsRequestSchema"},"PatchOperationsRequestSchema":{"properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/OperationStatusEnum"},{"type":"null"}],"description":"Status of the operation: `pending`, `overdue`, `payment_in_progress`, `paid`, `cancel`, or the legacy values `paymentOrder` and `shipped` (avoid using them in new integrations). Setting `paid` also resets `pendingAmount` and `pendingAccountingAmount` to 0.","examples":["pending"]},"paymentDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paymentdate","description":"Date the operation is expected to be (or was) paid. Only the calendar date is meaningful; the time component is not preserved as sent."},"chargeAccount":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chargeaccount","description":"IBAN of your own bank account the operation is charged to."},"contactAccount":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contactaccount","description":"IBAN of the counterparty's (contact's) bank account."},"issuanceDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Issuancedate","description":"Issuance date of the operation's source document. Only the calendar date is meaningful; the time component is not preserved as sent."},"dueDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Duedate","description":"Due date of the operation. Only the calendar date is meaningful; the time component is not preserved as sent."},"accountingCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingcode","description":"Accounting account code the operation is posted to."},"accountingName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingname","description":"Accounting account name the operation is posted to."},"operationsCustomIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Operationscustomids","description":"Custom IDs of other operations grouped under this one, to represent an invoice group or remittance (typically combined with `documentType` set to `invoiceGroup`). Takes effect on `POST` (create or upsert): each referenced operation is marked `paid`, its `pendingAmount`/`pendingAccountingAmount` set to 0 and its payment date set to this operation's `paymentDate`. Resending the remittance without some previously grouped operations releases them: they return to `pending` with their full pending amount. Sending this field on a `PATCH` update has no effect."},"concept":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Concept","description":"Free-text description of the operation.","examples":["Invoice #2024-001"]},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount","description":"Total amount of the operation, in `currency`.","examples":[1250.5]},"accountingAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accountingamount","description":"Amount of the operation expressed in the company accounting currency.","examples":[1250.5]},"pendingAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pendingamount","description":"Amount still pending settlement, in `currency`.","examples":[1250.5]},"pendingAccountingAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pendingaccountingamount","description":"Amount still pending settlement, expressed in the accounting currency.","examples":[1250.5]},"currency":{"anyOf":[{"$ref":"#/components/schemas/CurrencyEnum"},{"type":"null"}],"description":"ISO currency code of `amount`.","examples":["EUR"]},"accountingCurrency":{"anyOf":[{"$ref":"#/components/schemas/CurrencyEnum"},{"type":"null"}],"description":"ISO currency code of `accountingAmount`.","examples":["EUR"]},"exchangeRate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Exchangerate","description":"Exchange rate applied between `currency` and `accountingCurrency`.","examples":[1.0]},"paymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentmethod","description":"Payment method associated with the operation (e.g. `bank-transaction`, `promissory-note`).","examples":["bank-transaction"]},"contact":{"anyOf":[{"$ref":"#/components/schemas/BaseContactSchema-Input"},{"type":"null"}],"description":"Contact (client/supplier) the operation is due from or to."},"additionalInfo":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additionalinfo","description":"Free-form key/value metadata to attach to the operation."},"invoiceGroupDocumentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoicegroupdocumentid","description":"Identifier of the invoice group this operation belongs to, if any."},"sync":{"type":"boolean","title":"Sync","description":"Marks the operation as synchronized on your side.","default":false},"documentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Documentid","description":"Identifier of the source document (e.g. invoice number)."},"attributes":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttributeValueRequestSchema"},"type":"array"},{"type":"null"}],"title":"Attributes","description":"Custom attribute values to attach to the operation."},"externalReference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Externalreference","description":"Free-form reference to this operation in an external system."}},"type":"object","title":"PatchOperationsRequestSchema"},"PatchPaymentsRequestSchema":{"properties":{"sync":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sync","description":"Marks the payment as synchronized with the accounting system."},"additionalInfo":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additionalinfo","description":"Free-form key/value metadata to attach to the payment."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message to record against the payment. Sending an empty string clears a previously set error.","examples":["Missing account"]},"registered":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Registered","description":"Marks the payment as registered in the accounting system."}},"type":"object","title":"PatchPaymentsRequestSchema"},"PatchProductsRequestSchema":{"properties":{"additionalInfo":{"additionalProperties":true,"type":"object","title":"Additionalinfo","description":"Free-form key/value metadata to attach to the product. Replaces the existing value entirely.","default":{}},"accountingCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingcode","description":"Accounting account code to link the product to.","examples":["5720001"]}},"type":"object","title":"PatchProductsRequestSchema"},"PatchReconcilingItemSchema":{"properties":{"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount","description":"Amount of the reconciling item, in `currency`. Omitted or `null` leaves the current amount unchanged.","examples":[199.9]},"currency":{"anyOf":[{"$ref":"#/components/schemas/CurrencyEnum"},{"type":"null"}],"description":"Currency of the reconciling item, in ISO 4217 format. Omitted or `null` leaves the current currency unchanged.","examples":["EUR"]},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date","description":"Date of the reconciling item. Omitted or `null` leaves the current date unchanged.","examples":["2024-01-15T00:00:00Z"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-text description of the reconciling item. Omitted or `null` leaves the current description unchanged.","examples":["Stripe order #4821"]},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Free-form key/value data associated with the reconciling item. When its reconciling source defines a `matchingMetadataKey`, the value stored under that key is used to automatically associate this item with a product transaction — only string, number or boolean values are usable for matching, other value types are ignored. An empty string is also accepted and treated as an empty object. Replaces the previously stored value entirely (not merged). Omitted or `null` leaves the current metadata unchanged.","examples":[{"orderId":"ORD-48213"}]},"additionalInfo":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additionalinfo","description":"Free-form key/value metadata to attach to the reconciling item. An empty string is also accepted and treated as an empty object. Replaces the previously stored value entirely (not merged). Omitted or `null` leaves the current metadata unchanged."}},"type":"object","title":"PatchReconcilingItemSchema"},"PatchReconcilingSourceSchema":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the reconciling source. Omitted or `null` values leave the current name unchanged.","examples":["Stripe orders feed"]},"additionalInfo":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additionalinfo","description":"Free-form key/value metadata to attach to the reconciling source. Replaces the previously stored value entirely (not merged). Omitted or `null` values leave the current metadata unchanged."},"matchingMetadataKey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matchingmetadatakey","description":"Key within a reconciling item's `metadata` used to associate it with a product transaction. Omitted or `null` values leave the current key unchanged.","examples":["orderId"]}},"type":"object","title":"PatchReconcilingSourceSchema"},"PatchTransactionsRequestSchema":{"properties":{"additionalInfo":{"additionalProperties":true,"type":"object","title":"Additionalinfo","description":"Free-form key/value metadata to attach to the transaction.","default":{}},"attributes":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttributeValueRequestSchema"},"type":"array"},{"type":"null"}],"title":"Attributes","description":"Custom attribute values to attach to the transaction."},"sync":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sync","description":"Marks the transaction as synchronized with your ERP."}},"type":"object","title":"PatchTransactionsRequestSchema"},"PaymentOrderSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat payment order ID.","examples":["po_8f2a1c9e"]},"companyId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyid","description":"Embat company ID. You can get them from \"companies\" endpoints."},"concept":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Concept","description":"Free-text description of the payment order.","examples":["Supplier invoice payment"]},"documentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Documentid","description":"Identifier of the source document (e.g. invoice) the payment order was created from, if any.","examples":["INV-2024-0456"]},"relatedCustomId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relatedcustomid","description":"Custom ID of the operation the payment order pays, when it was created from an operation. `null` otherwise.","examples":["invoice-2024-001"]},"status":{"anyOf":[{"$ref":"#/components/schemas/PaymentOrderStatusEnum"},{"type":"null"}],"description":"Execution status of the payment order: `IN_PROGRESS` while it is being processed, `COMPLETED` once executed, `REJECTED` if it was declined, or `ON_HOLD` while execution is paused."},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount","description":"Payment order amount, in `currency`.","examples":[1500.0]},"currency":{"anyOf":[{"$ref":"#/components/schemas/CurrencyEnum"},{"type":"null"}],"description":"ISO currency code of `amount`.","examples":["EUR"]},"beneficiary":{"anyOf":[{"$ref":"#/components/schemas/BeneficiarySchema"},{"type":"null"}],"description":"Beneficiary the payment order was sent to."},"product":{"anyOf":[{"$ref":"#/components/schemas/app__schemas__paymentOrders__ProductSchema"},{"type":"null"}],"description":"Product linked to the payment order, if any."},"bank":{"anyOf":[{"$ref":"#/components/schemas/BankSchema"},{"type":"null"}],"description":"Bank the payment order was executed through."},"paymentDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paymentdate","description":"Date the payment order was (or is scheduled to be) executed."},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Createdat","description":"Created date of the entity in the database"},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updatedat","description":"Last updated date of the entity in the database"}},"type":"object","required":["id"],"title":"PaymentOrderSchema"},"PaymentOrderStatusEnum":{"type":"string","enum":["COMPLETED","REJECTED","IN_PROGRESS","ON_HOLD"],"title":"PaymentOrderStatusEnum"},"PaymentShortTypeEnum":{"type":"string","enum":["contacts","accountings","operations","banks","salesOrder"],"title":"PaymentShortTypeEnum"},"PeriodicityEnum":{"type":"string","enum":["monthly","yearly","weekly","daily"],"title":"PeriodicityEnum"},"PostAccountingEntriesRequestSchema":{"properties":{"accountingCode":{"type":"string","minLength":1,"title":"Accountingcode","description":"Ledger account code the entry is posted to.","examples":["4300001"]},"counterpartAccountingCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Counterpartaccountingcode","description":"Ledger account code of the counterpart side of the entry, when applicable.","examples":["5720001"]},"accountingName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingname","description":"Display name of the ledger account (`accountingCode`).","examples":["Trade debtors"]},"assetAmount":{"type":"number","title":"Assetamount","description":"Outflow side of the entry, in `currency` (money leaving the account). An entry always has both sides: if you only send `liabilityAmount`, `assetAmount` defaults to 0. The sign is inverted on storage (0 always stays 0): a positive value you send is stored and returned as negative, following the convention that negative amounts are outflows.","examples":[1250.5]},"accountingAssetAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accountingassetamount","description":"Outflow side expressed in the company accounting currency (`accountingCurrency`). Subject to the same sign convention as `assetAmount`.","examples":[1250.5]},"balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Balance","description":"Running balance of the ledger account (`accountingCode`) after this entry, typically calculated by Embat rather than provided by you."},"liabilityAmount":{"type":"number","title":"Liabilityamount","description":"Inflow side of the entry, in `currency` (money entering the account), stored with the sign you send. An entry always has both sides: if you only send `assetAmount`, `liabilityAmount` defaults to 0.","examples":[0.0]},"accountingLiabilityAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accountingliabilityamount","description":"Inflow side expressed in the company accounting currency (`accountingCurrency`).","examples":[0.0]},"currency":{"anyOf":[{"$ref":"#/components/schemas/CurrencyEnum"},{"type":"null"}],"description":"ISO currency code of `assetAmount`/`liabilityAmount`.","examples":["EUR"]},"accountingCurrency":{"anyOf":[{"$ref":"#/components/schemas/CurrencyEnum"},{"type":"null"}],"description":"ISO currency code of `accountingAssetAmount`/`accountingLiabilityAmount`.","examples":["EUR"]},"contactCustomId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contactcustomid","description":"Custom ID of the contact (client/supplier), used when `accountingCode` is a contacts ledger account.","examples":["contact-001"]},"exchangeRate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Exchangerate","description":"Exchange rate applied between `currency` and `accountingCurrency`.","examples":[1.0]},"additionalInfo":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additionalinfo","description":"Free-form key/value metadata to attach to the entry. Sending an empty object (`{}`) has no effect and does not clear previously stored metadata."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-text description of the entry. If omitted, Embat generates one: `\"Asiento \"` followed by `accountingEntryCode` if set, otherwise by `customId`.","examples":["Invoice #2024-001 posting"]},"documentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Documentid","description":"Identifier of the source document (e.g. invoice) this entry relates to."},"transactionsIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Transactionsids","description":"Embat IDs of the bank transactions related to this entry."},"paymentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentid","description":"Embat ID of the payment related to this entry."},"date":{"type":"string","format":"date-time","title":"Date","description":"Accounting date of the entry. Send a plain date at midnight (e.g. `2024-01-15T00:00:00Z`) — sending a different time of day can shift the stored calendar date and is not fully normalized to midnight.","examples":["2024-01-15T00:00:00Z"]},"attributes":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttributeValueRequestSchema"},"type":"array"},{"type":"null"}],"title":"Attributes","description":"Custom attribute values to attach to the entry. Duplicate values and attributes flagged as internal-only are omitted when the entry is returned."},"customId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customid","description":"Your own unique ID for the entry, to use as your ERP accounting entry ID. If omitted, Embat auto-generates one.","examples":["erp-entry-2024-001"]},"accountingEntryCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingentrycode","description":"Your own ID grouping the entries that form a single journal/document (e.g. all lines of one invoice posting). Several entries can share the same `accountingEntryCode`.","examples":["invoice-2024-001"]},"accountingEntryCodeId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingentrycodeid","description":"Alternate grouping code for the entry. Bulk deletion by entry code (`DELETE /accountingentries/accountingentrycode/{companyId}`) matches entries by either `accountingEntryCode` or `accountingEntryCodeId`."}},"type":"object","required":["accountingCode","assetAmount","liabilityAmount","date"],"title":"PostAccountingEntriesRequestSchema"},"PostAccountingsAccountsRequestSchema":{"properties":{"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active","description":"Whether the accounting account is active."},"type":{"anyOf":[{"$ref":"#/components/schemas/AccountingTypeEnum"},{"type":"null"}],"description":"Accounting account classification: `banks` or `accountings`. The value `analytics` is deprecated: it is still accepted for backwards compatibility but automatically stored as `accountings`. If omitted, it is inferred from `accountingCode`.Once an account exists, any `type` sent through the create endpoints is silently ignored — the value(inferred, overridden or explicit) only applies when the account is first created. Use the update endpoints to change the `type` of an existing account.","examples":["banks"]},"accountingName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingname","description":"Display name of the accounting account. Defaults to `accountingCode` when omitted.","examples":["Clients - Domestic"]},"collective":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Collective","description":"Whether this is a collective (grouping) accounting account rather than an individual one."},"additionalInfo":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additionalinfo","description":"Free-form key/value metadata to attach to the account. Sending an empty object leaves any previously stored metadata unchanged instead of clearing it."},"attributes":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttributeValueRequestACCOUNTSchema"},"type":"array"},{"type":"null"}],"title":"Attributes","description":"Custom attribute values to attach to the account. Entries with an empty or missing `customId` or `value` are silently discarded."},"accountingCode":{"type":"string","title":"Accountingcode","description":"Unique code identifying the accounting account in the company's chart of accounts.","examples":["430001"]}},"type":"object","required":["accountingCode"],"title":"PostAccountingsAccountsRequestSchema"},"PostAttributesRequestSchema":{"properties":{"customId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customid","description":"Your own unique ID for the attribute. If omitted, Embat auto-generates one.","examples":["cost-center"]},"source":{"$ref":"#/components/schemas/SourceEnum","description":"Origin of the attribute record."},"active":{"type":"boolean","title":"Active","description":"Whether the attribute is active.","default":true},"name":{"type":"string","title":"Name","description":"Display name of the attribute.","examples":["Cost Center"]},"type":{"$ref":"#/components/schemas/AttributesStatusEnum","description":"Data type of the attribute's values: `list` (a fixed set of `values` to choose from), `string` or `number` (free-form value, no `values` needed)."},"required":{"type":"boolean","title":"Required","description":"Whether a value for this attribute should be mandatory wherever it is used. Informational only: this API does not enforce it.","default":false},"values":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttributesRequestValuesSchema"},"type":"array"},{"type":"null"}],"title":"Values","description":"Values available for this attribute (relevant when `type` is `list`). If an attribute with this `customId` already exists, sending `values` **replaces** its current list — any previously stored value not included here is removed. Omitting `values` when creating a new attribute with an existing `customId` also removes all of its current values. An attribute holds at most 5000 values; if the combined total would exceed the limit, the excess new values are silently discarded."},"parentCustomId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentcustomid","description":"Custom ID of the parent attribute, to nest this attribute under another one (e.g. a \"City\" attribute nested under \"Country\"). Must reference an existing attribute.","examples":["country"]}},"type":"object","required":["source","name","type"],"title":"PostAttributesRequestSchema"},"PostAuthenticationRequestSchema":{"properties":{"email":{"type":"string","title":"Email","description":"Email address of the Embat service user used to authenticate.","examples":["erp-integration@acme-corp.com"]},"password":{"type":"string","title":"Password","description":"Password of the Embat service user. Keep it secret.","examples":["your-service-password"]}},"type":"object","required":["email","password"],"title":"PostAuthenticationRequestSchema"},"PostAuthenticationResponseSchema":{"properties":{"idToken":{"type":"string","title":"Idtoken","description":"JWT bearer token. Send it as `Authorization: Bearer <idToken>` on every other request. It expires 60 minutes after issuance; call this endpoint again with the same credentials to obtain a new one.","examples":["eyJhbGciOiJSUzI1NiIsImtpZCI6IjE5YzY4In0..."]}},"type":"object","required":["idToken"],"title":"PostAuthenticationResponseSchema"},"PostContactsRequestSchema":{"properties":{"tradeName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tradename","description":"Commercial/trade name of the contact. Defaults to `legalName` when omitted or blank.","examples":["Acme Supplies"]},"legalName":{"type":"string","title":"Legalname","description":"Legal (registered) name of the contact.","examples":["Acme Supplies S.L."]},"taxId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxid","description":"Tax identification number (CIF/NIF/VAT) of the contact. Spaces are removed before storage.","examples":["B12345678"]},"contact":{"anyOf":[{"$ref":"#/components/schemas/ContactSchema-Input"},{"type":"null"}],"description":"Contact person details (name, phone, email) for this contact."},"address":{"anyOf":[{"$ref":"#/components/schemas/ContactAddressSchema"},{"type":"null"}],"description":"Postal address of the contact."},"contactType":{"$ref":"#/components/schemas/ContactContactTypeEnum","description":"Whether the contact is a `company` or a `freelance` individual. Defaults to `company`.","default":"company"},"type":{"$ref":"#/components/schemas/ContactTypeEnum","description":"Commercial relationship with the contact: `client`, `supplier` or `client-supplier`."},"accounts":{"anyOf":[{"items":{"$ref":"#/components/schemas/ContactAccounts"},"type":"array"},{"type":"null"}],"title":"Accounts","description":"Bank accounts of the contact. When omitted (or empty) and `paymentsAccounts` is provided, Embat derives one entry per payment account automatically: the derived `iban` holds the payment identifier resolved for the account's currency (an IBAN for IBAN-based currencies, otherwise the local account number), `swift` takes the account's `bic`, and `default` its `default` flag."},"paymentsAccounts":{"anyOf":[{"items":{"$ref":"#/components/schemas/ContactNewAccount"},"type":"array"},{"type":"null"}],"title":"Paymentsaccounts","description":"Bank accounts of the contact, one per currency/payment rail, with the identifiers required to pay it (IBAN, account number, routing number...). Each entry is validated independently and **silently discarded** when it has no usable account identifier for its `currency` (neither `iban` nor `accountNumber` set); format validity of the identifiers themselves is not enforced. Entries that resolve to the same account identifier are deduplicated, keeping only the first one."},"additionalInfo":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additionalinfo","description":"Free-form key/value metadata to attach to the contact."},"accountingCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingcode","description":"Accounting account code this contact is linked to.","examples":["4300001"]},"paymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentmethod","description":"Preferred payment method for this contact.","examples":["bank-transaction"]},"paymentTerms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Paymentterms","description":"Payment terms granted to the contact, in days.","examples":[30]},"attributes":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttributeValueRequestSchema"},"type":"array"},{"type":"null"}],"title":"Attributes","description":"Custom attribute values to attach to the contact."},"customId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customid","description":"Your own unique ID for the contact. If omitted, Embat auto-generates one.","examples":["erp-contact-001"]}},"type":"object","required":["legalName","type"],"title":"PostContactsRequestSchema"},"PostFilesEmissionResponseSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat ID of the created file emission."}},"type":"object","required":["id"],"title":"PostFilesEmissionResponseSchema"},"PostLogRequestSchema":{"properties":{"erp":{"$ref":"#/components/schemas/ErspEnum","description":"ERP system that originated the log.","examples":["netsuite"]},"erpVersion":{"type":"string","title":"Erpversion","description":"Version of the ERP system that originated the log.","examples":["2024.1"]},"connectorVersion":{"type":"string","title":"Connectorversion","description":"Version of the integration that reported the log.","examples":["1.4.2"]},"level":{"$ref":"#/components/schemas/LogsLevelsEnum","description":"Severity of the log entry.","examples":["ERROR"]},"code":{"$ref":"#/components/schemas/LogsCodesEnum","description":"Code classifying the log by severity and, where available, by the entity it relates to (e.g. `PAYMENTS_ERROR`, `AUTHORIZATION_WARNING`). Use the generic `INFO`, `WARNING` or `ERROR` codes for events not tied to one of those entities.","examples":["PAYMENTS_ERROR"]},"message":{"type":"string","title":"Message","description":"Free-text description of the event, warning or error being reported.","examples":["Failed to post payment: missing accounting account"]}},"type":"object","required":["erp","erpVersion","connectorVersion","level","code","message"],"title":"PostLogRequestSchema"},"PostOperationsAttributesRequestSchema":{"properties":{"customId":{"type":"string","title":"Customid","description":"Custom ID of the operation to attach attributes to."},"attributes":{"items":{"$ref":"#/components/schemas/AttributeValueRequestSchema"},"type":"array","title":"Attributes","description":"Internal attribute values to attach to the operation."}},"type":"object","required":["customId","attributes"],"title":"PostOperationsAttributesRequestSchema"},"PostOperationsRequestSchema":{"properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/OperationStatusEnum"},{"type":"null"}],"description":"Status of the operation. On creation, only `paid`, `cancel` and `payment_in_progress` are respected as sent (`paid`/`cancel` also reset `pendingAmount` and `pendingAccountingAmount` to 0). Any other value — including `paymentOrder` and `shipped` (legacy values, avoid using them in new integrations) — is **silently discarded** and recomputed from `dueDate`: `pending` if `dueDate` is today or later, `overdue` otherwise. The same recomputation applies when this field is omitted.","examples":["pending"]},"paymentDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paymentdate","description":"Date the operation is expected to be (or was) paid. Only the calendar date is meaningful; the time component is not preserved as sent."},"chargeAccount":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chargeaccount","description":"IBAN of your own bank account the operation is charged to."},"contactAccount":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contactaccount","description":"IBAN of the counterparty's (contact's) bank account."},"issuanceDate":{"type":"string","format":"date-time","title":"Issuancedate","description":"Issuance date of the operation's source document. Only the calendar date is meaningful; the time component is not preserved as sent. If `dueDate` is omitted, it defaults to this date, and `paymentDate` in turn defaults to `dueDate`."},"dueDate":{"type":"string","format":"date-time","title":"Duedate","description":"Due date of the operation. Only the calendar date is meaningful; the time component is not preserved as sent. On creation, unless `status` is explicitly set to `paid`, `cancel` or `payment_in_progress`, the operation's status is computed from this date: `pending` if it is today or later, `overdue` otherwise."},"accountingCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingcode","description":"Accounting account code the operation is posted to."},"accountingName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingname","description":"Accounting account name the operation is posted to."},"operationsCustomIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Operationscustomids","description":"Custom IDs of other operations grouped under this one, to represent an invoice group or remittance (typically combined with `documentType` set to `invoiceGroup`). Takes effect on `POST` (create or upsert): each referenced operation is marked `paid`, its `pendingAmount`/`pendingAccountingAmount` set to 0 and its payment date set to this operation's `paymentDate`. Resending the remittance without some previously grouped operations releases them: they return to `pending` with their full pending amount. Sending this field on a `PATCH` update has no effect."},"concept":{"type":"string","title":"Concept","description":"Free-text description of the operation.","examples":["Invoice #2024-001"]},"amount":{"type":"number","title":"Amount","description":"Total amount of the operation, in `currency`.","examples":[1250.5]},"accountingAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accountingamount","description":"Amount of the operation expressed in the company accounting currency. If omitted, it defaults to `amount` (and `accountingCurrency` is reset to `currency`). Note: whenever the resulting `accountingCurrency` equals `currency`, this value is **forced to `amount`**, even if you explicitly sent a different value.","examples":[1250.5]},"pendingAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pendingamount","description":"Amount still pending settlement, in `currency`. Defaults to `amount` when omitted.","examples":[1250.5]},"pendingAccountingAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pendingaccountingamount","description":"Amount still pending settlement, expressed in the accounting currency. If omitted, it is derived proportionally from `pendingAmount` and `accountingAmount`; it is 0 when `amount` or `accountingAmount` is 0.","examples":[1250.5]},"currency":{"$ref":"#/components/schemas/CurrencyEnum","description":"ISO currency code of `amount`.","examples":["EUR"]},"accountingCurrency":{"anyOf":[{"$ref":"#/components/schemas/CurrencyEnum"},{"type":"null"}],"description":"ISO currency code of `accountingAmount`. Defaults to `currency` when omitted. Note: when `accountingAmount` is omitted, this field is also **reset to `currency`**, even if you explicitly sent a different value.","examples":["EUR"]},"exchangeRate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Exchangerate","description":"Exchange rate applied between `currency` and `accountingCurrency`. If omitted, it is derived from `amount`/`accountingAmount` (1.0 when `accountingAmount` is 0). Note: whenever `amount` equals `accountingAmount`, the value is **forced to 1.0**, even if you explicitly sent a different one; out-of-range or non-finite values are also silently reset to 1.0.","examples":[1.0]},"paymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentmethod","description":"Payment method associated with the operation (e.g. `bank-transaction`, `promissory-note`).","examples":["bank-transaction"]},"contact":{"anyOf":[{"$ref":"#/components/schemas/BaseContactSchema-Input"},{"type":"null"}],"description":"Contact (client/supplier) the operation is due from or to."},"additionalInfo":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additionalinfo","description":"Free-form key/value metadata to attach to the operation."},"invoiceGroupDocumentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoicegroupdocumentid","description":"Identifier of the invoice group this operation belongs to, if any."},"sync":{"type":"boolean","title":"Sync","description":"Marks the operation as synchronized on your side.","default":false},"documentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Documentid","description":"Identifier of the source document (e.g. invoice number)."},"attributes":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttributeValueRequestSchema"},"type":"array"},{"type":"null"}],"title":"Attributes","description":"Custom attribute values to attach to the operation."},"externalReference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Externalreference","description":"Free-form reference to this operation in an external system."},"customId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customid","description":"Your own unique ID for the operation. If omitted, Embat auto-generates one.","examples":["invoice-2024-001"]},"documentType":{"anyOf":[{"$ref":"#/components/schemas/OperationDocumentTypeEnum"},{"type":"null"}],"description":"Type of the source document. Defaults to `invoice` when omitted.","examples":["invoice"]},"generatedFrom":{"anyOf":[{"$ref":"#/components/schemas/OperationGeneratedFromEnum"},{"type":"null"}],"description":"Origin of the operation: `erp` when it comes from your ERP (the default when omitted), or `external` when it comes from another external system.","default":"erp","examples":["erp"]}},"type":"object","required":["issuanceDate","dueDate","concept","amount","currency"],"title":"PostOperationsRequestSchema"},"PostPaymentsRequestSchema":{"properties":{"method":{"type":"string","title":"Method","description":"Payment method. Defaults to `bank-transaction` when not sent.","default":"bank-transaction","examples":["bank-transaction"]},"transactionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transactionid","description":"Embat ID of the bank transaction linked to this payment."},"operations":{"items":{"$ref":"#/components/schemas/OperationPaymentRequestSchema"},"type":"array","title":"Operations","description":"Operations this payment is applied to. Must contain at least one item. Each entry is validated independently and silently discarded if the operation does not exist, is already paid or canceled, already received a payment with this same `customId`, or already has payments created from Embat — see the endpoint description."},"productId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Productid","description":"Embat product ID. You can get them from \"Products\" endpoints."},"contactCustomId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contactcustomid","description":"Custom ID of the contact (client/supplier) involved in the payment."},"date":{"type":"string","format":"date-time","title":"Date","description":"Date the payment was made or received."},"concept":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Concept","description":"Free-text description of the payment.","examples":["Invoice #2024-001 payment"]},"amount":{"type":"number","title":"Amount","description":"Payment amount in the payment `currency`. Positive for collections, negative for outgoing payments.","examples":[1250.5]},"accountingAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accountingamount","description":"Payment amount expressed in the company accounting currency. If omitted, it defaults to `amount`, `accountingCurrency` defaults to `currency` and `exchangeRate` is set to 1.0.","examples":[1250.5]},"currency":{"anyOf":[{"$ref":"#/components/schemas/CurrencyEnum"},{"type":"null"}],"description":"ISO currency code of `amount`. Defaults to `EUR` when omitted.","examples":["EUR"]},"accountingCurrency":{"anyOf":[{"$ref":"#/components/schemas/CurrencyEnum"},{"type":"null"}],"description":"ISO currency code of `accountingAmount`. Defaults to `currency` when omitted.","examples":["EUR"]},"exchangeRate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Exchangerate","description":"Exchange rate applied between `currency` and `accountingCurrency`. Defaults to 1.0 when omitted.","examples":[1.0]},"additionalInfo":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additionalinfo","description":"Free-form key/value metadata to attach to the payment."},"attributes":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttributeValueRequestSchema"},"type":"array"},{"type":"null"}],"title":"Attributes","description":"Custom attribute values to attach to the payment."},"customId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customid","description":"Your own unique ID for the payment. If omitted, Embat auto-generates one.","examples":["erp-payment-001"]}},"type":"object","required":["operations","date","amount"],"title":"PostPaymentsRequestSchema"},"PostReconcilingItemSchema":{"properties":{"amount":{"type":"number","title":"Amount","description":"Amount of the reconciling item, in `currency`.","examples":[199.9]},"currency":{"$ref":"#/components/schemas/CurrencyEnum","description":"Currency of the reconciling item, in ISO 4217 format.","examples":["EUR"]},"date":{"type":"string","format":"date-time","title":"Date","description":"Date of the reconciling item.","examples":["2024-01-15T00:00:00Z"]},"description":{"type":"string","title":"Description","description":"Free-text description of the reconciling item.","examples":["Stripe order #4821"]},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Free-form key/value data associated with the reconciling item. When its reconciling source defines a `matchingMetadataKey`, the value stored under that key is used to automatically associate this item with a product transaction — only string, number or boolean values are usable for matching, other value types are ignored. An empty string is also accepted and treated as an empty object. Replaces the previously stored value entirely (not merged). Omitted or `null` leaves the current metadata unchanged.","examples":[{"orderId":"ORD-48213"}]},"additionalInfo":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additionalinfo","description":"Free-form key/value metadata to attach to the reconciling item. An empty string is also accepted and treated as an empty object. Replaces the previously stored value entirely (not merged). Omitted or `null` leaves the current metadata unchanged."},"customId":{"type":"string","title":"Customid","description":"Your own unique ID for the reconciling item. You can use it as your internal reconciling item identifier.","examples":["stripe-order-4821"]},"reconcilingSourceCustomId":{"type":"string","title":"Reconcilingsourcecustomid","description":"Custom ID of the reconciling source this item belongs to. You can get them from \"Reconciling Sources\" endpoints. Not validated against existing reconciling sources: if it does not match one, the item is still created, but it is not automatically matched against transactions.","examples":["stripe-orders"]}},"type":"object","required":["amount","currency","date","description","customId","reconcilingSourceCustomId"],"title":"PostReconcilingItemSchema"},"PostReconcilingSourceSchema":{"properties":{"name":{"type":"string","title":"Name","description":"Name of the reconciling source.","examples":["Stripe orders feed"]},"additionalInfo":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additionalinfo","description":"Free-form key/value metadata to attach to the reconciling source. Replaces the previously stored value entirely (not merged). Omitted or `null` values leave the current metadata unchanged."},"matchingMetadataKey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matchingmetadatakey","description":"Key within a reconciling item's `metadata` used to associate it with a product transaction. Omitted or `null` values leave the current key unchanged.","examples":["orderId"]},"customId":{"type":"string","title":"Customid","description":"Your own unique ID for the reconciling source. You can use it as your internal reconciling source ID.","examples":["stripe-orders"]}},"type":"object","required":["name","customId"],"title":"PostReconcilingSourceSchema"},"PostTransactionsRequestSchema":{"properties":{"operationDate":{"type":"string","format":"date","title":"Operationdate","description":"Date the transaction was recorded (booked)."},"valueDate":{"type":"string","format":"date","title":"Valuedate","description":"Value date of the transaction, used for the product's balance."},"concept":{"type":"string","title":"Concept","description":"Free-text description of the transaction.","examples":["Office supplies"]},"amount":{"type":"number","title":"Amount","description":"Amount of the transaction, in the product's currency.","examples":[-350.0]}},"type":"object","required":["operationDate","valueDate","concept","amount"],"title":"PostTransactionsRequestSchema","description":"Transactions request data schema"},"ProductBaseSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat product ID.","examples":["prod_8f3a1c"]},"currency":{"$ref":"#/components/schemas/CurrencyEnum","description":"ISO currency code of the product.","examples":["EUR"]},"product":{"type":"string","title":"Product","description":"Product name as reported by the bank.","examples":["Cuenta Corriente"]},"bankFullName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bankfullname","description":"Full legal name of the bank this product belongs to, if known.","examples":["Banco Bilbao Vizcaya Argentaria"]},"alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Alias","description":"Custom alias given to the product in Embat, if any.","examples":["Main checking account"]}},"type":"object","required":["id","currency","product"],"title":"ProductBaseSchema"},"ReconciliationSchema":{"properties":{"accountingCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountingcode","description":"Accounting account code this reconciliation status refers to.","examples":["5720001"]},"originalBalanceDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Originalbalancedate","description":"Date up to which the linked accounting account's opening balance has been established in Embat. `null` if the account has not been initialized with an opening balance.","examples":["2024-01-01T00:00:00Z"]}},"type":"object","title":"ReconciliationSchema"},"ScenarioSchema":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Embat scenario ID.","examples":["scn_00045"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Scenario name.","examples":["Base case"]},"currency":{"anyOf":[{"$ref":"#/components/schemas/CurrencyEnum"},{"type":"null"}],"description":"Currency the scenario's forecasted amounts are expressed in.","examples":["EUR"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-text description of the scenario.","examples":["Baseline treasury projection for FY2026"]},"periodicity":{"anyOf":[{"$ref":"#/components/schemas/PeriodicityEnum"},{"type":"null"}],"description":"Time granularity of the scenario's forecasted periods: `daily`, `weekly`, `monthly` or `yearly`.","examples":["monthly"]}},"type":"object","title":"ScenarioSchema"},"SourceEnum":{"type":"string","enum":["erp","api","embat"],"title":"SourceEnum"},"StatusEnum":{"type":"string","enum":["PENDING","BOOKED"],"title":"StatusEnum"},"TagsSchema":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Embat tag ID.","examples":["tag_4d2f1a"]},"updatedAt":{"type":"string","format":"date-time","title":"Updatedat","description":"Last updated date of the entity in the database"},"createdAt":{"type":"string","format":"date-time","title":"Createdat","description":"Created date of the entity in the database"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Tag name.","examples":["VIP"]}},"type":"object","required":["updatedAt","createdAt"],"title":"TagsSchema"},"TransactionCurrencyExchangeDataSchema":{"properties":{"originalAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Originalamount","description":"Transaction amount before currency conversion.","examples":[500.0]},"originalCurrency":{"anyOf":[{"$ref":"#/components/schemas/CurrencyEnum"},{"type":"null"}],"description":"Currency of `originalAmount`, before conversion.","examples":["USD"]},"grossAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Grossamount","description":"Transaction amount after currency conversion, before conversion fees.","examples":[460.25]},"fees":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fees","description":"Fees applied during the currency conversion.","examples":[3.5]}},"type":"object","title":"TransactionCurrencyExchangeDataSchema"},"TransactionTypeEnum":{"type":"string","enum":["payment","debt_repayment","fee","tax","utility","social_security","bulk_payment","cash_withdrawal","pos_withdrawal","collection","pos_settlement","cash_settlement","collection_refund","bulk_collection"],"title":"TransactionTypeEnum"},"TransactionsAnalyticsSchema":{"properties":{"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Categoryid","description":"Embat ID of the category this portion of the amount is allocated to."},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value","description":"Amount of the transaction allocated to this category.","examples":[150.0]}},"type":"object","title":"TransactionsAnalyticsSchema"},"UpsertAccountingEntriesResponseSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat resource ID"},"customId":{"type":"string","title":"Customid","description":"Client-provided custom ID"}},"type":"object","required":["id","customId"],"title":"UpsertAccountingEntriesResponseSchema"},"UpsertAccountingsAccountsResponseSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat resource ID"},"accountingCode":{"type":"string","title":"Accountingcode","description":"Client-provided accounting code.","examples":["430001"]}},"type":"object","required":["id","accountingCode"],"title":"UpsertAccountingsAccountsResponseSchema"},"UpsertAttributesResponseSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat resource ID"},"customId":{"type":"string","title":"Customid","description":"Client-provided custom ID"}},"type":"object","required":["id","customId"],"title":"UpsertAttributesResponseSchema"},"UpsertContactsResponseSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat resource ID"},"customId":{"type":"string","title":"Customid","description":"Client-provided custom ID"}},"type":"object","required":["id","customId"],"title":"UpsertContactsResponseSchema"},"UpsertOperationsResponseSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat resource ID"},"customId":{"type":"string","title":"Customid","description":"Client-provided custom ID"}},"type":"object","required":["id","customId"],"title":"UpsertOperationsResponseSchema"},"UpsertPaymentsResponseSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat payment ID"},"customId":{"type":"string","title":"Customid","description":"Client-provided custom ID"}},"type":"object","required":["id","customId"],"title":"UpsertPaymentsResponseSchema"},"UpsertReconcilingItemsResponseSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat resource ID"},"customId":{"type":"string","title":"Customid","description":"Client-provided custom ID"}},"type":"object","required":["id","customId"],"title":"UpsertReconcilingItemsResponseSchema"},"UserFileSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat ID of the user who requested the file emission."},"name":{"type":"string","title":"Name","description":"First name of the user.","examples":["Maria"]},"surname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Surname","description":"Last name of the user.","examples":["Garcia"]}},"type":"object","required":["id","name"],"title":"UserFileSchema"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"app__schemas__banks__ProductSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Embat product ID.","examples":["prod_8f3a1c"]},"currency":{"$ref":"#/components/schemas/CurrencyEnum","description":"ISO currency code of the product.","examples":["EUR"]},"product":{"type":"string","title":"Product","description":"Product name as reported by the bank.","examples":["Cuenta Corriente"]},"alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Alias","description":"Custom alias given to the product in Embat, if any.","examples":["Main checking account"]},"type":{"type":"string","title":"Type","description":"Product type reported by the bank, e.g. `checking`, `savings`, `card`, `loan`, `lineofcredit` or `wallet`.","examples":["checking"]},"balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Balance","description":"Current balance of the product. Defaults to `0` when no balance has been recorded.","examples":[15234.67]},"hasTransactions":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hastransactions","description":"Whether the product supports bank transactions. Always recomputed by Embat: `true` for `checking`, `lineofcredit`, `card` and `wallet` products, `false` otherwise."},"lastAggregationOK":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Lastaggregationok","description":"Timestamp of the last successful data aggregation for this product. Falls back to the bank relationship's own last successful aggregation when the product has none.","examples":["2024-01-15T08:30:00Z"]},"accountNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountnumber","description":"IBAN or account number identifying the product.","examples":["ES9121000418450200051332"]}},"type":"object","required":["id","currency","product","type"],"title":"ProductSchema"},"app__schemas__companies__ContactSchema":{"properties":{"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone","description":"Phone number of the company's administrative contact.","examples":["+34600123456"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"First name of the company's administrative contact.","examples":["Laura"]},"surname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Surname","description":"Last name of the company's administrative contact.","examples":["Fernández"]},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"Email address of the company's administrative contact.","examples":["laura.fernandez@acme.com"]}},"type":"object","title":"ContactSchema"},"app__schemas__contacts__ContactSchema":{"properties":{"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone","description":"Phone number of the contact person.","examples":["+34600000000"]},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"Email address of the contact person. Required to pay this contact by Interac e-Transfer in CAD.","examples":["billing@acme-supplies.com"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"First name of the contact person.","examples":["John"]},"surname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Surname","description":"Last name of the contact person.","examples":["Doe"]}},"type":"object","title":"ContactSchema"},"app__schemas__paymentOrders__ProductSchema":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Embat product ID linked to the payment order, if any."},"alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Alias","description":"Display alias of the linked product. `null` if the payment order has no product, or the product no longer exists.","examples":["Main disbursement account"]}},"type":"object","title":"ProductSchema"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}},"tags":[{"name":"Introduction","description":"The Embat API lets your ERP or any third-party system read and write financial data managed in Embat: bank transactions, payments, operations (invoices/bills), accounting entries, balances and related treasury entities. All information is scoped by the Embat company identifier `companyId`; you can obtain your companies' identifiers from the `/companies` endpoints.\n\nA user can belong to multiple companies, so a single API user may be authorized to access several `companyId` values.\n\nWhile testing the API, request **sandbox credentials** so you can integrate against non-production data before going live.\n\n##### Authentication\n\nEvery endpoint other than `POST /authentication/token` requires a bearer token. Exchange your `email`/`password` for one, then send it on every subsequent request:\n\n```json\nPOST /authentication/token\n{\n  \"email\": \"erp-integration@acme-corp.com\",\n  \"password\": \"your-service-password\"\n}\n```\n\n```json\n{ \"idToken\": \"eyJhbGciOiJSUzI1NiIsImtpZCI6IjE5YzY4In0...\" }\n```\n\n```\nAuthorization: Bearer <idToken>\n```\n\nThe token expires 60 minutes after issuance; call `/authentication/token` again with the same credentials to get a new one — there is no separate refresh endpoint. See the Authentication section for details (multi-factor accounts, HTTPS requirement).\n\n##### Custom identifiers\n\nThe entities in which Embat allows creation by a third party directly from the API have a custom identifier field, `customId`, so each client can manage its own reference. For example, if your `contacts` have a unique identifier in your ERP, create the contact with that value as `customId` so you can reference it consistently in later requests.\n\nIf you create an entity without `customId`, Embat auto-generates one so you can work with it the same way.\n\n##### Bulk operations\n\nYou can create, update, or delete multiple objects of the same entity in a single request through the endpoints ending in `/bulk`.\n\n##### Integration fields\n\nThe `sync` and `additionalInfo` fields help you keep your integration in sync with Embat.\n\n`sync` marks whether an entity has already been processed by your integration. Entities created in Embat (for example, transactions or payments generated from a bank connection) can be filtered by `sync` so you only read the ones pending on your side, and confirmed back once processed.\n\n`additionalInfo` is an open key/value object you can use to store your own identifiers or metadata on an entity, without restriction.\n\n##### Pagination\n\nMost list endpoints are paginated with two query params: `limit` (page size; each endpoint documents its own default and maximum) and `nextPageToken`. Some read-only reference lists (for example categories or scenarios) are returned in full — each endpoint's description states whether it is paginated. When a response is truncated because more results exist, it includes a `nextPageToken`; pass that value as the `nextPageToken` query param on your next request, keeping the same filters, to fetch the following page. Omit `nextPageToken` to fetch the first page. An invalid or malformed `nextPageToken` is rejected with `404`.\n\n##### Date-range filters\n\nMost list endpoints accept date-range filters (typically `startDate`/`endDate` for a business date, and `startUpdatedAt`/`endUpdatedAt` for last-modification time, useful for incremental synchronization). Unless an endpoint states otherwise, start bounds are inclusive and end bounds are exclusive, and a given date range cannot span more than **90 days**. If only a start bound is given, it cannot be more than 90 days in the past; if only an end bound is given, results start 90 days before it. Check each endpoint's description for its exact filters and any endpoint-specific limits.\n\n##### Errors\n\nErrors are returned as a JSON object with a single `detail` field describing the problem:\n\n```json\n{ \"detail\": \"user not authorized\" }\n```\n\n`401` (missing, invalid or expired bearer token) and `404` (unknown `companyId` or resource) are the common baseline across endpoints. `400` is used for requests that are well-formed but cannot be processed (for example, an invalid date range), and `422` is returned automatically when the request body or query params fail schema validation (wrong type, missing required field). Refer to each endpoint's documented responses for the specific conditions that trigger each code.\n"},{"name":"Authentication","description":"`Authentication` provides the credentials Embat issues to access the rest of the public API. Every other endpoint requires a JWT `idToken` in the `Authorization: Bearer <idToken>` header; requests with no token, or with an invalid or expired one, are rejected with `401`.\n\nAn `email`/`password` pair identifies a service user with access to a group of companies in Embat. Keep these credentials secret: never commit them to a repository, embed them in client-side code, or expose them in publicly accessible logs.\n\n**Typical flow:**\n\n1. Exchange your `email`/`password` for a bearer token:\n\n```json\nPOST /authentication/token\n{\n  \"email\": \"erp-integration@acme-corp.com\",\n  \"password\": \"your-service-password\"\n}\n```\n\nwhich returns:\n\n```json\n{ \"idToken\": \"eyJhbGciOiJSUzI1NiIsImtpZCI6IjE5YzY4In0...\" }\n```\n\n2. Send that token as `Authorization: Bearer <idToken>` on every subsequent request.\n3. The token expires **60 minutes** after issuance. Call `/authentication/token` again with the same credentials to get a new one; there is no separate refresh endpoint.\n4. Accounts with multi-factor authentication enabled cannot authenticate through this endpoint.\n5. If `email` or `password` is missing or malformed, the validation error response never echoes back the submitted values, so credentials are never reflected in error output.\n\nAll requests must be made over **HTTPS**.\n"},{"name":"AccountingAccounts","description":"`AccountingAccount` represents an account in the company's chart of accounts. `accountingCode` is the unique identifier of an account and is used as its ID; it also determines the account's default classification (`type`) when none is sent.\n\nAccounting accounts are the backbone Embat uses to classify money movements: `Payments` and accounting entries reference an account by `accountingCode` to record where a transaction is posted, and `Transactions` are reconciled against the account's `balance`.\n\n**Typical flow:** notify Embat of the accounts that exist in your ERP so that payments and reconciliations can reference them.\n\n1. **Create or update accounts.** Send each account from your chart of accounts with `POST /accountingaccounts/{companyId}` (or the bulk variant `POST /accountingaccounts/{companyId}/bulk`). Sending an `accountingCode` that already exists updates that account instead of creating a duplicate.\n2. **Keep accounts in sync.** As accounts change in your ERP (renamed, deactivated, reclassified), reflect those changes with `PATCH /accountingaccounts/{companyId}/{accountingCode}` (or the bulk variant `PATCH /accountingaccounts/{companyId}`), or simply resend the account with `POST` — creation is an upsert, so an existing `accountingCode` is updated instead of duplicated. Note that `type` can only be changed via `PATCH`.\n3. **Read accounts.** Use `GET /accountingaccounts/{companyId}` to list all accounts, or `GET /accountingaccounts/{companyId}/{accountingCode}` to retrieve a single one, including its current `balance`.\n4. **Delete accounts.** `DELETE /accountingaccounts/{companyId}/{accountingCode}` (or the bulk variant) deactivates an account rather than permanently removing it; deactivated accounts still appear in list/retrieve responses with `active: false`.\n"},{"name":"AccountingEntries","description":"`AccountingEntry` represents a single line of a company's general accounting journal — an outflow (`assetAmount`) or inflow (`liabilityAmount`) movement posted to a ledger account (`accountingCode`). `customId` is the unique identifier of an entry: set your own value to use as your ERP accounting entry ID, or let Embat auto-generate one. Entries that belong to the same journal document (e.g. all the lines of one invoice posting) can share the same `accountingEntryCode`.\n\nAccounting entries are the accounting side of Embat's reconciliation process with `Transactions` (bank movements): Embat matches entries against transactions and exposes the outcome here through `reconciled` and `reconciliationsIds`. An entry can also reference a `Contact` (client/supplier, via `contactCustomId`, when `accountingCode` is a contacts account), a `Payment` it relates to (`paymentId`), or a source document (`documentId`).\n\n**Typical flow:** accounting entries synchronize your general ledger in both directions between your ERP and Embat.\n\n1. **Notify Embat of entries posted in your ERP.** When a journal line is recorded in your ERP, create it in Embat with `POST /accountingentries/{companyId}` (or the bulk variant):\n\n```json\nPOST /accountingentries/{companyId}\n{\n  \"customId\": \"erp-entry-2024-001\",\n  \"accountingEntryCode\": \"invoice-2024-001\",\n  \"accountingCode\": \"4300001\",\n  \"accountingName\": \"Trade debtors\",\n  \"date\": \"2024-01-15T00:00:00Z\",\n  \"assetAmount\": 1250.50,\n  \"liabilityAmount\": 0,\n  \"currency\": \"EUR\"\n}\n```\n\n2. **Read entries and their reconciliation status.** Use `GET /accountingentries/{companyId}` with the `reconciled` filter and `startUpdatedAt`/`endUpdatedAt` for incremental reads since your last poll, or `GET /accountingentries/{companyId}/{customId}` to retrieve a single entry.\n3. **Correct or remove entries as your ledger changes.** Use `PATCH /accountingentries/{companyId}/{customId}` (or the bulk variant) to update fields — resend the current `description` if you want to keep it, since omitting it resets it to an auto-generated value. You can also resend the full entry with `POST`: creation is an upsert, so an existing `customId` is updated instead of duplicated. Use `DELETE` to remove entries individually or in bulk, by `customId` or by `accountingEntryCode`/`accountingEntryCodeId`.\n"},{"name":"Attributes","description":"`Attribute` represents a custom field that you can define once and then use to tag records across Embat, such as an ERP dimension, a cost center or any other analytic field you want available as a filter in tables, charts and reports. `customId` is the unique identifier of an attribute: set your own value to use as your ERP dimension ID, or let Embat auto-generate one.\n\nAn attribute has a `type` — `list` (a fixed set of `values` to choose from), `string` or `number` (free-form value) — and can optionally be nested under a parent attribute via `parentCustomId` to model hierarchies (e.g. a \"City\" attribute whose values are nested under a \"Country\" attribute's values).\n\nAttribute values are attached to other entities — `Payments`, `Contacts`, `Operations`, `Transactions` and `AccountingEntries` — by sending the attribute's `customId` together with the chosen `value`/`valueCustomId` in that entity's `attributes` field.\n\n**Typical flow:**\n\n1. **Create the attribute** with `POST /attributes/{companyId}`, defining its `type` and, for `list` attributes, its `values`:\n\n```json\nPOST /attributes/{companyId}\n{\n  \"customId\": \"cost-center\",\n  \"source\": \"erp\",\n  \"name\": \"Cost Center\",\n  \"type\": \"list\",\n  \"values\": [\n    { \"customId\": \"marketing\", \"name\": \"Marketing\" },\n    { \"customId\": \"sales\", \"name\": \"Sales\" }\n  ]\n}\n```\n\n2. **Tag other entities with the attribute.** When creating or updating a payment, contact, operation, transaction or accounting entry, reference the attribute in its `attributes` field:\n\n```json\n{\n  \"customId\": \"marketing\",\n  \"value\": \"Marketing\"\n}\n```\n\n3. **Maintain the value list** with `POST /attributes/{companyId}/{customId}/values/bulk` to add values without touching the rest of the attribute, or update the attribute directly to replace its full value list.\n"},{"name":"Balances","description":"`Balance` represents the end-of-day balance of a bank product (account) for a given calendar day. Embat records one balance per product per day, expressed both in the product's own currency (`balance`) and, when available, in the company accounting currency (`accountingBalance`, converted using the exchange rate as of that day).\n\nEach balance is linked to a `Product` (a bank account, credit line, card...) held at one of the company's connected `Banks`. Balances whose linked product no longer exists in Embat are not returned.\n\n**Typical flow:** use `GET /balances/{companyId}` to read the daily balance history of a company's bank products, filtering by `productId` and by date range, or `GET /balances/{companyId}/{id}` to retrieve a single balance you already know the `id` of — for example after obtaining it from a previous list call.\n"},{"name":"Banks","description":"`Bank` represents a banking relationship connected to your company in Embat — for example, an aggregated connection to a specific banking entity. Each bank relationship groups the `bankProducts` (checking accounts, credit lines, cards...) held at that entity, together with the oldest successful aggregation timestamp among them.\n\n`GET /banks/{companyId}` only returns relationships that have at least one product, and each relationship's `bankProducts` only lists its currently active products. Use `GET /banks/{companyId}/{id}` to retrieve a single relationship by its Embat `id` regardless of whether it currently has active products.\n\nTo read balances and transactions for a specific account, use the `id` of an entry in `bankProducts` with the `Products` and `Transactions` endpoints.\n"},{"name":"Categories","description":"`Category` represents a treasury or cashflow classification in Embat, used to group transactions, forecasts and operations for reporting (e.g. \"Providers\", \"Payroll\", \"Subscriptions\"). Categories are created and managed in the Embat application; this API only lists and retrieves them. `parentId` is the Embat ID of the parent category, letting you build a category tree such as:\n\n- Payments\n    - Providers\n        - Europe\n        - Latam\n    - Payroll\n\n- Collections\n    - Subscriptions\n\nA category has no `parentId` when it is a top-level category.\n\nCategories are referenced by `categoryId` on `Transactions`, `Forecasts` and `Operations` to classify each movement. In the Embat application you can also map an ERP ledger account to a category, so operations posted against that account are categorized automatically.\n\n**Typical flow:** look up the categories configured for a company with `GET /categories/{companyId}` (or a single one with `GET /categories/{companyId}/{id}`) and use their `id` as the `categoryId` when creating or reading transactions, forecasts or operations through the corresponding endpoints.\n"},{"name":"Companies","description":"A `Company` represents a legal entity configured in your Embat workspace. Its `id` is the `companyId` used throughout this API: almost every other endpoint is scoped by `companyId` and requires it as a path parameter.\n\n`Company` is the parent entity of the API: it has no dependency on any other entity, while every other entity (Payments, Operations, Transactions, Contacts, Accounting Accounts, etc.) belongs to one. A company also has `Users` with access to it, retrievable with `GET /companies/{companyId}/users`.\n\n**Typical flow:**\n\n1. **Resolve the `companyId`.** Call `GET /companies` to list the companies your credentials have access to and pick the `id` of the one you want to work with.\n2. **Use it everywhere.** Pass that `id` as `companyId` in the path of any other endpoint in this API.\n3. **Optionally inspect the company.** `GET /companies/{companyId}` returns its legal name, administrative contact, tags and configuration (e.g. accounting currency).\n"},{"name":"Contacts","description":"`Contact` represents a client or supplier your company transacts with. `customId` is the unique identifier of a contact: set your own value to use as your ERP contact ID, or let Embat auto-generate one.\n\nA contact is referenced from other entities to identify who is involved in a transaction: `Operations` (invoices/bills) are billed to or from a contact, `Payments` can record a collection or payment made to a contact, and `AccountingEntries` can be linked to a contact for reconciliation. A contact also carries the bank account details (`accounts`, `paymentsAccounts`) Embat uses to execute payments to it.\n\n**Typical flow:** contacts are usually kept in sync from your ERP, since they are the master data referenced when creating operations and payments.\n\n1. **Create or update a contact from your ERP.** Whenever a client or supplier is created or edited in your ERP, upsert it in Embat with its identification and, if relevant, bank account details:\n\n```json\nPOST /contacts/{companyId}\n{\n  \"customId\": \"erp-contact-001\",\n  \"legalName\": \"Acme Supplies S.L.\",\n  \"taxId\": \"B12345678\",\n  \"type\": \"supplier\",\n  \"paymentsAccounts\": [\n    { \"currency\": \"EUR\", \"default\": true, \"details\": { \"iban\": \"ES9121000418450200051332\" } }\n  ]\n}\n```\n\n2. **Reference the contact by `customId`.** Use the same `customId` in `Operations` and `Payments` to link them to this contact.\n3. **Keep it up to date.** Sending `POST /contacts/{companyId}` again with the same `customId` updates the existing contact instead of creating a duplicate; use `PATCH /contacts/{companyId}/{customId}` (or the bulk variant) to update specific fields only.\n"},{"name":"DebtScheduleConfigs","description":"<div style=\"background-color:#fff3cd; color:#856404; padding: 10px; border-left: 6px solid #ffeeba;\">\n<strong>⚠️ Warning:</strong> This API section is in BETA. It might undergo significant changes and may not be stable.\n</div>\n\n<code>Debt Schedule Config</code> represents the amortization schedule configured for a debt product: payment frequency, interest rate, outstanding and granted balances, and the full calendar of scheduled payments broken down into principal, interest and tax components.\n\nA debt schedule config is linked to the `Bank` relationship the debt is held with (`bankId`) and to two `Products`: the `debtProductId` being amortized and the product used to pay each installment (`settlementAccountId`, returned as `settlementProductId`).\n\n**Typical flow:** debt schedule configurations are read-only from this API — they are set up in Embat and exposed here for consumption.\n\n1. **List configurations** with `GET /debtscheduleconfigs/{companyId}`, optionally filtering by `startUpdatedAt`/`endUpdatedAt` to read only what changed since your last poll.\n2. **Retrieve a single configuration** with `GET /debtscheduleconfigs/{companyId}/{id}` to get its full payment calendar (`debtSchedulePaymentsCalendar`).\n"},{"name":"Files","description":"`File` represents a banking file exchanged between Embat and a bank: either a file **received** from a bank (a reception, e.g. an account statement or a confirmation file) or a file **submitted** to a bank (an emission, e.g. a payment order file). Files are identified by an Embat-generated `id` and, when the bank could be identified, carry the related `Bank`.\n\nFiles list endpoints are not scoped by `companyId`: they return the files across every company accessible to the authenticated user. `companyId` is only used when creating a file emission.\n\n**Typical flow:**\n\n1. **Discover new receptions.** Poll `GET /files/receptions` periodically; each entry reports whether it has already been `downloaded`. Use `nextPageToken` to page through results.\n2. **Download a reception's content.** Once you have identified a file of interest, fetch its raw content with `GET /files/receptions/{fileId}`.\n3. **Submit a file to a bank.** To send a file to a bank on behalf of a company (e.g. a payment order), call `POST /files/{companyId}/{bankId}` with the file content and its format.\n4. **Track emissions.** List the files you have submitted, and any submitted on your behalf, with `GET /files/emissions`.\n"},{"name":"Forecasts","description":"`Forecast` represents a treasury cash flow projection generated by Embat for a given date, classified under a `Category` and grouped into a `Scenario` (e.g. a base case or a stress scenario). Each scenario has its own currency and periodicity — `daily`, `weekly`, `monthly` or `yearly` — that determines how forecasted periods are spaced.\n\nForecasts are generated in Embat; this API does not support creating or deleting them. Use it to read forecasted cash flows and, optionally, to mark them as synchronized with your own systems.\n\n**Typical flow:**\n\n1. **Read forecasts.** Pull the forecasted amounts for a company with `GET /forecasts/{companyId}`, optionally filtered by `scenarioId`, a date range, or synchronization status (`sync`).\n2. **Confirm them as synchronized.** Once you have processed a forecast on your side, mark it as synchronized with `PATCH /forecasts/{companyId}/{id}` (or the bulk variant `PATCH /forecasts/{companyId}`):\n\n```json\nPATCH /forecasts/{companyId}/{id}\n{\n  \"sync\": true\n}\n```\n"},{"name":"ForeignExchangeRates","description":"`ForeignExchangeRate` records the daily exchange rates Embat uses to convert amounts between currencies for accounting purposes. Each record captures the rates observed on a given `date` for a set of currencies against a `baseCurrency` (EUR as stored).\n\nThese are the same rates Embat applies internally when it computes exchange rates and accounting amounts on entities such as `Payment`, `Balance` and `Transaction`. Foreign exchange rates are read-only reference data: this API does not support creating, updating or deleting them.\n\n**Typical flow:** look up the rate for a given day to reproduce or audit a currency conversion made elsewhere in Embat.\n\n1. List the rates for a date range, optionally expressed against a currency other than EUR:\n\n```\nGET /foreignexchangerates?baseCurrency=USD&startDate=2024-01-01&endDate=2024-01-31\n```\n\n2. Or retrieve a single record you already know the `id` of, always expressed against EUR:\n\n```\nGET /foreignexchangerates/{id}\n```\n"},{"name":"Logs","description":"`Logs` let your integration report execution events, warnings or errors observed while interacting with the Embat API, so Embat's support team can diagnose integration issues.\n\nLogs are write-only: there is no endpoint to list or retrieve the logs you send. Use `code` to classify the event by severity and, where available, by the entity it relates to (for example `PAYMENTS_ERROR` for an issue involving `Payments`, or `AUTHORIZATION_WARNING` for an authentication issue). Use the generic `INFO`, `WARNING` or `ERROR` codes for events not tied to one of those entities.\n\n**Typical flow:** report a log whenever your integration completes, skips or fails a step of its synchronization with Embat, for example after `POST /payments/{companyId}` returns an error:\n\n```json\nPOST /logs/{companyId}\n{\n  \"erp\": \"netsuite\",\n  \"erpVersion\": \"2024.1\",\n  \"connectorVersion\": \"1.4.2\",\n  \"level\": \"ERROR\",\n  \"code\": \"PAYMENTS_ERROR\",\n  \"message\": \"Failed to post payment: missing accounting account\"\n}\n```\n\nLog delivery is best-effort: both endpoints return `204` as soon as the request is accepted, and any failure while recording a log afterwards is not reported back to the caller. To send several logs at once, use `POST /logs/{companyId}/bulk`.\n"},{"name":"Operations","description":"`Operation` represents an accounting operation with a pending amount to settle — typically an invoice or bill due from or to a `Contact` (client or supplier). An invoice with several due dates is modeled as several operations, one per due date. `customId` is the unique identifier of an operation: set your own value to use as your ERP operation ID, or let Embat auto-generate one.\n\nOperations are the counterpart of `Payment`s: each payment created against an operation reduces its `pendingAmount`, and once the full amount is settled the operation's `status` automatically becomes `paid`. Operations can also be grouped into an invoice group or remittance (see `operationsCustomIds`), reference a `Contact`, be classified with a `Category`, and carry custom `attributes`.\n\n**Operation origins (`generatedFrom`).** Every operation carries a `generatedFrom` value that identifies its origin, and each origin uses its own set of `documentType` values:\n\n| `generatedFrom` | Origin | `documentType` values |\n|---|---|---|\n| `erp` / `external` | Created through this API | `invoice`, `invoiceGroup`, `confirming`, and the rest of the creatable types |\n| `manual` | Created by hand in Embat | `manual` (one-off forecasts), `recurringChild` (items of a recurring forecast) |\n| `internal` | Generated by the debt module | `amortizationQuote`, `amortizationInterest`, `amortizationTax`, `amortizationQuoteDebt` |\n\nBy default the list endpoint only returns `erp` and `external` operations; use its `generatedFrom` filter to also retrieve `manual` and `internal` ones. Those operations are **read-only**: they always include their `pendingAmount`, but they cannot be created, updated or deleted through this API.\n\n**Typical flow:**\n\n1. **Notify Embat of invoices/bills issued in your ERP.** Create the operation with its due date and amount:\n\n```json\nPOST /operations/{companyId}\n{\n  \"customId\": \"invoice-2024-001\",\n  \"issuanceDate\": \"2024-01-01T00:00:00Z\",\n  \"dueDate\": \"2024-01-31T00:00:00Z\",\n  \"currency\": \"EUR\",\n  \"concept\": \"Consulting services January\",\n  \"amount\": 1250.50\n}\n```\n\n2. **Track settlement.** As payments are recorded against the operation (see `Payments`), its `pendingAmount` decreases and `status` moves from `pending`/`overdue` to `paid`. Once an operation already has a payment recorded against it in Embat, most of its fields can no longer be updated — see the create/update endpoint descriptions for the exact rules.\n3. **Keep dates and status in sync.** Use `PATCH /operations/{companyId}/{customId}` (or the bulk variant) to correct `dueDate`/`paymentDate`, update `status`, or attach `attributes` — or resend the full operation with `POST`, since sending a `customId` that already exists updates the operation instead of duplicating it.\n4. **Group operations into a remittance (invoice group).** Create the individual operations as usual. When your ERP later groups and pays them together, send one more operation representing the remittance — `documentType: invoiceGroup`, the grouped total as `amount`, and the grouped operations' IDs in `operationsCustomIds`:\n\n```json\nPOST /operations/{companyId}\n{\n  \"customId\": \"remittance-2024-07\",\n  \"documentType\": \"invoiceGroup\",\n  \"amount\": 3750.0,\n  \"issuanceDate\": \"2024-07-01T00:00:00Z\",\n  \"dueDate\": \"2024-07-31T00:00:00Z\",\n  \"paymentDate\": \"2024-07-31T00:00:00Z\",\n  \"operationsCustomIds\": [\"invoice-2024-001\", \"invoice-2024-002\", \"invoice-2024-003\"]\n}\n```\n\nEmbat marks every grouped operation as `paid` with `pendingAmount: 0` and links it to the remittance. From then on, the grouped operations' lifecycle is managed through the remittance: updating them directly has no effect, and resending the remittance without some of them releases those operations back to `pending` with their full pending amount. Use `DELETE /operations/{companyId}/{customId}` to cancel an operation that no longer applies.\n"},{"name":"PaymentOrders","description":"<div style=\"background-color:#fff3cd; color:#856404; padding: 10px; border-left: 6px solid #ffeeba;\">\n<strong>⚠️ Warning:</strong> This API section is in BETA. It might undergo significant changes and may not be stable.\n</div>\n\nA <code>PaymentOrder</code> represents a payment executed through Embat, such as a wire transfer or SEPA payment sent to a bank on behalf of a company. It can reference a `documentId` identifying the invoice or operation it settles, a <code>Product</code> used to fund it, and the <code>Bank</code> it was executed through.\n\n**Typical flow:** poll `GET /paymentorders/{companyId}` to track the payment orders created in Embat and their execution `status` (`IN_PROGRESS`, `COMPLETED`, `REJECTED`, `ON_HOLD`). Once a payment order is executed, download its signed receipt with `GET /paymentorders/{id}/receipt`."},{"name":"Payments","description":"`Payment` represents money moving between a bank transaction and the operations (invoices, bills) or accounting entries it settles. `customId` is the unique identifier of a payment: set your own value to use as your ERP payment ID, or let Embat auto-generate one.\n\nA payment links the bank world and the accounting world in Embat: it can represent the relationship between a `Transaction` (the bank movement) and one or more `Operations` (the invoices/bills being paid), a cash movement posted directly to an accounting account, or a movement involving a `Contact` (client or supplier). Payments can also reference a `Product` to resolve the accounting code used for classification, and a `Category` for reporting.\n\n**Typical flow:** payments synchronize accounting in both directions between your ERP and Embat.\n\n1. **Notify Embat of payments posted in your ERP.** When a payment is recorded in your ERP, create it in Embat with the operations it settles — each settled amount reduces the pending amount of the corresponding operation (invoice/bill) in Embat:\n\n```json\nPOST /payments/{companyId}\n{\n  \"customId\": \"erp-payment-001\",\n  \"date\": \"2024-01-15T00:00:00Z\",\n  \"amount\": 1250.50,\n  \"currency\": \"EUR\",\n  \"operations\": [\n    { \"customId\": \"invoice-2024-001\", \"amount\": 1250.50 }\n  ]\n}\n```\n\n2. **Read payments created from Embat.** Periodically pull the payments generated in Embat that are pending on your side, using `GET /payments/{companyId}` with the `sync` filter (payments not yet synchronized) and `startUpdatedAt`/`endUpdatedAt` for incremental reads since your last poll. This endpoint never returns payments you created through `POST /payments/{companyId}` — retrieve those by `customId` with `GET /payments/{companyId}/{customId}`.\n3. **Confirm them back.** Once those payments are posted in your ERP, mark them as synchronized and registered (or record an `error`) with `PATCH /payments/{companyId}/{customId}` (or the bulk variant `PATCH /payments/{companyId}`).\n"},{"name":"Products","description":"`Product` represents a bank account, credit line, card or wallet held by the company — either aggregated automatically from a bank connection, or added manually in Embat. A product can optionally be linked to an accounting account via `accountingCode`, used to reconcile its balance against Embat's chart of accounts.\n\nProducts are grouped under a `Bank` relationship (`bankId`), hold the end-of-day snapshots reported by `Balances` and the movements reported by `Transactions`, and are referenced by `Payments` (`productId`) to resolve the accounting code used for classification.\n\n**Typical flow:** retrieve the products of a company with `GET /products/{companyId}` (or a single one with `GET /products/{companyId}/{id}`) to obtain the `id` values used across other endpoints — for example to filter `Transactions` or `Balances`, or to set `productId` on a `Payment`. Once a product's accounting account is known, set it with `PATCH /products/{companyId}/{id}` (or the bulk variant `PATCH /products/{companyId}`).\n"},{"name":"ReconcilingItems","description":"<div style=\"background-color:#fff3cd; color:#856404; padding: 10px; border-left: 6px solid #ffeeba;\">\n<strong>⚠️ Warning:</strong> This API section is in BETA. It might undergo significant changes and may not be stable.\n</div>\n\n<code>ReconcilingItem</code> represents a single financial record — for example a POS sale, an order, or a settlement — that needs to be matched against a product `transaction`. `customId` is the unique identifier of a reconciling item: set your own value to use as your internal identifier.\n\nEvery reconciling item belongs to a <code>ReconcilingSource</code>, referenced by `reconcilingSourceCustomId`, which identifies the origin system the item comes from (e.g. a POS, an internal system, or a CRM) and can define a `matchingMetadataKey`. When set, Embat uses the value stored under that key in the item's `metadata` to automatically associate the item with a transaction. `reconciled` and `isMatched` reflect the state of that process and are set by Embat — they cannot be updated through this API.\n\n**Typical flow:**\n\n1. **Register a reconciling source** (see <code>ReconcilingSources</code>) if one does not already exist for the origin system.\n2. **Notify Embat of records to reconcile.** Create a reconciling item for each record, including the metadata your reconciling source uses for matching:\n\n```json\nPOST /reconcilingitems/{companyId}\n{\n  \"customId\": \"stripe-order-4821\",\n  \"reconcilingSourceCustomId\": \"stripe-orders\",\n  \"amount\": 199.90,\n  \"currency\": \"EUR\",\n  \"date\": \"2024-01-15T00:00:00Z\",\n  \"description\": \"Stripe order #4821\",\n  \"metadata\": { \"orderId\": \"ORD-48213\" }\n}\n```\n\nCalling this again with the same `customId` updates the existing item instead of creating a duplicate, unless it has already been matched to a transaction.\n\n3. **Track reconciliation status.** Retrieve or list items with `GET /reconcilingitems/{companyId}/{customId}` or `GET /reconcilingitems/{companyId}` — filter by `reconcilingSourceCustomId` or `reconciled` and check `isMatched`/`reconciled` on each item to see whether Embat has matched and reconciled it.\n4. **Correct or remove items** while they are still unmatched: use `PATCH`/`DELETE /reconcilingitems/{companyId}/{customId}` (or their bulk variants), or resend the item with `POST` — creation is an upsert, so an existing `customId` is updated instead of duplicated.\n"},{"name":"ReconcilingSources","description":"<div style=\"background-color:#fff3cd; color:#856404; padding: 10px; border-left: 6px solid #ffeeba;\">\n<strong>⚠️ Warning:</strong> This API section is in BETA. It might undergo significant changes and may not be stable.\n</div>\n\n<code>ReconcilingSource</code> represents the origin of financial records that need to be matched against product transactions — for example a point-of-sale system, an internal financial system, or a CRM. <code>customId</code> is the unique identifier of a reconciling source: set your own value to use as your internal source ID.\n\nA reconciling source is the parent of one or more <code>ReconcilingItems</code>: each item references its source through <code>reconcilingSourceCustomId</code>. The source's <code>matchingMetadataKey</code> names the field within its items' <code>metadata</code> that Embat uses to associate each item with a product transaction. A reconciling source does not carry financial data itself — amounts, currencies and dates live on its <code>ReconcilingItems</code>.\n\n**Typical flow:**\n\n1. **Register a reconciling source.** Create one for each origin system you want to reconcile from, defining the metadata key used to match its items to transactions:\n\n```json\nPOST /reconcilingsources/{companyId}\n{\n  \"customId\": \"stripe-orders\",\n  \"name\": \"Stripe orders feed\",\n  \"matchingMetadataKey\": \"orderId\"\n}\n```\n\nCalling this again with the same `customId` updates the existing source instead of creating a duplicate.\n\n2. **Create the reconciling items** for that source (see <code>ReconcilingItems</code>), each carrying the metadata value that will later be matched against product transactions.\n3. **Retrieve or list sources** with `GET /reconcilingsources/{companyId}/{customId}` or `GET /reconcilingsources/{companyId}`.\n4. **Update or delete a source** as your origin systems change: use `PATCH`/`DELETE /reconcilingsources/{companyId}/{customId}`, or resend the source with `POST` — creation is an upsert, so an existing `customId` is updated instead of duplicated.\n"},{"name":"Scenarios","description":"A `Scenario` represents a forecasting hypothesis in Embat's treasury forecast: a named, currency-denominated projection covering a defined horizon (`startPeriod` to `endPeriod`) at a given time granularity (`periodicity`). Only published scenarios are returned when listing scenarios.\n\nScenarios are the grouping unit for `Forecasts`: each forecast belongs to one scenario, and its figures are only meaningful in the context of that scenario's currency, periodicity and horizon.\n\n**Typical flow:** list the company's published scenarios with `GET /scenarios/{companyId}` to discover which forecasting hypotheses are available, then use a scenario's `id` to retrieve its details with `GET /scenarios/{companyId}/{id}` or to filter the related `Forecasts` endpoints.\n"},{"name":"Transactions","description":"`Transaction` represents a movement recorded on one of your bank accounts (`Product`). Each transaction reports the balance of its product immediately after the movement, and can carry a classification (`type`), a breakdown across `Categories` for reporting, custom `Attributes`, and the IDs of any reconciliations it is part of.\n\nTransactions are the bank side of the money movements Embat tracks: `Payments` link a transaction to the `Operations` (invoices/bills) it settles, and accounting entries reconcile it against your ledger. Transactions are generated automatically as your bank accounts (`Products`) are connected to Embat; the only way to create transactions through this API is for products classified as \"Manual\" (accounts with no bank connection), via the bulk creation endpoint below.\n\n**Typical flow:** transactions synchronize in one direction, from Embat to your ERP.\n\n1. **Read transactions generated in Embat.** Periodically pull the transactions pending on your side with `GET /transactions/{companyId}`, using the `sync` filter (transactions not yet synchronized) and `startUpdatedAt`/`endUpdatedAt` for incremental reads since your last poll.\n2. **Confirm them back.** Once a transaction has been recorded in your ERP, mark it as synchronized with `PATCH /transactions/{companyId}/{id}` (or the bulk variant `PATCH /transactions/{companyId}`).\n3. **Manual accounts only.** For products classified as Manual, record their transactions yourself with `POST /transactions/{companyId}/{productId}/bulk`. See that endpoint's description for how it replaces same-day transactions.\n"}]}