{"openapi":"3.0.1","info":{"title":"Light API","version":"1.0.0"},"paths":{"/oauth/token":{"post":{"tags":["Authorization"],"summary":"Create access token","description":"Exchanges an authorization code or refresh token for an access token","operationId":"getOAuthToken","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"client_id":{"type":"string"},"client_secret":{"type":"string"},"grant_type":{"type":"string"},"code":{"type":"string"},"redirect_uri":{"type":"string"},"refresh_token":{"type":"string"}}}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalOauthToken"}}}}}}},"/oauth/authorize":{"get":{"tags":["Authorization"],"summary":"Start authorization flow","description":"Redirects the user to the authorization page to start the OAuth V2 authorization flow","operationId":"startOAuthAuthorizationFlow","parameters":[{"name":"redirect_uri","in":"query","schema":{"type":"string"}},{"name":"state","in":"query","schema":{"type":"string"}},{"name":"client_id","in":"query","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}}},"/v1/accounting-documents/accounting-documents":{"get":{"tags":["v1 - Accounting Documents"],"summary":"List accounting documents","description":"Returns a paginated list of accounting documents","operationId":"listAccountingDocuments","parameters":[{"name":"sort","in":"query","schema":{"type":"string","description":"Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `companyEntityId`, `documentSequenceId`, `postingDate`, `valuationDate`, `documentDate`, `businessPartnerName`, `status`, `createdBy`, `createdAt`, `description`, `documentNumber`, `arDueDate`, `arOpenedAt`, `ctPerformedAt`, `ctStatus`, `ctAmount`, `ccAmount`.","example":"amount:desc,createdAt:asc"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `id`, `documentSequenceId`, `documentNumber`, `documentType`, `companyEntityId`, `ledgerName`, `businessPartnerName`, `businessPartnerId`, `status`, `currency`, `postingDate`, `documentDate`, `valuationDate`, `createdAt`, `updatedAt`, `createdBy`, `intercompanyDocumentId`, `apDueDate`, `apState`, `apVendorId`, `arContractId`, `arDueDate`, `arCustomerId`, `arInvoiceTemplateId`, `arPayeeBankAccountId`, `arOpenedAt`, `arState`, `ctCardId`, `ctCardBalanceAccountId`, `ctStatus`, `ctPerformedAt`, `cnToBeAdjustedAccDocType`, `intercompanyJournalEntryId`, `ycAccountingYearId`, `accountCode`, `accountLabel`, `hasWithholding`, `taxCode`.\n\nThese fields accept only a subset of the operators: `hasWithholding` (`eq`, `ne`).","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalAccountingDocumentWithAmountV1Model"}}}}}}},"/v1/accounting-release-templates/{templateId}/archive":{"post":{"tags":["v1 - Accounting Release Templates"],"summary":"Archive accounting release template","description":"Archives the given accounting release template so it can no longer be assigned to new documents. Releases already generated from it are unaffected","operationId":"archiveAccountingReleaseTemplate","parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalAccountingReleaseTemplateV1Model"}}}}}}},"/v1/accounting-release-templates":{"get":{"tags":["v1 - Accounting Release Templates"],"summary":"List accounting release templates","description":"Returns a list of accounting release templates","operationId":"listAccountingReleaseTemplates","parameters":[{"name":"sort","in":"query","schema":{"type":"string","description":"Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `name`, `method`, `type`, `deferralAccountId`, `createdAt`.","example":"amount:desc,createdAt:asc"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `id`, `companyId`, `name`, `method`, `type`, `deferralAccountId`, `initialAmountPercentage`, `residualAmountPercentage`, `status`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalAccountingReleaseTemplateV1Model"}}}}}},"post":{"tags":["v1 - Accounting Release Templates"],"summary":"Create accounting release template","description":"Creates a new accounting release template. The ledger accounts and `type` chosen here are fixed for the lifetime of the template","operationId":"createAccountingReleaseTemplate","requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreateAccountingReleaseTemplateRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalAccountingReleaseTemplateV1Model"}}}}}}},"/v1/accounting-release-templates/{templateId}":{"get":{"tags":["v1 - Accounting Release Templates"],"summary":"Get accounting release template","description":"Returns an accounting release template by ID","operationId":"getAccountingReleaseTemplateById","parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalAccountingReleaseTemplateV1Model"}}}}}},"patch":{"tags":["v1 - Accounting Release Templates"],"summary":"Update accounting release template","description":"Updates an existing accounting release template. Only the fields present in the request body are changed.\n\nThe ledger accounts and `type` are fixed at creation and cannot be updated. To use different ones, create a new template and archive this one.","operationId":"updateAccountingReleaseTemplate","parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUpdateAccountingReleaseTemplateRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalAccountingReleaseTemplateV1Model"}}}}}}},"/v1/activity-events":{"get":{"tags":["v1 - Activity Events"],"summary":"List company activity events","description":"Returns a paginated list of company activity events across supported record types, newest first by default. Use sort=createdAt:asc for oldest first or sort=createdAt:desc for newest first. Keep the same sort and filters when following a cursor. Requires COMPANY_ADMIN or AUDITOR with access to every entity. Supports filtering by record, action, actor, correlation ID and time.","operationId":"listActivityEvents","parameters":[{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `action`, `actorId`, `correlationId`, `createdAt`, `entityId`, `entityType`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"minimum":1,"type":"integer","format":"int32"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nOmit it, or provide `0`, for the initial request.\nFor subsequent requests, use `nextCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.\nThis endpoint paginates by cursor only and has no `offset` parameter.","schema":{"type":"string"}},{"name":"sort","in":"query","schema":{"type":"string","description":"Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `createdAt`.","example":"amount:desc,createdAt:asc"},"example":"createdAt:asc"}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCursorPaginatedResponseV1ModelExternalActivityEventV1Model"}}}}}}},"/v1/attachments":{"get":{"tags":["v1 - Attachments"],"summary":"List attachments","description":"Returns the attachments of a specific resource with the given `status`. Without `status`, only active attachments are returned; pass `status=ARCHIVED` for archived ones, or both values for all. Attachments and their files are kept indefinitely: a replaced file stays listed as a separate, archived attachment next to the one that replaced it.","operationId":"getAttachments","parameters":[{"name":"resourceId","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","description":"Statuses to return, repeatable. Defaults to ACTIVE.","schema":{"uniqueItems":true,"type":"array","items":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["ACTIVE","ARCHIVED"]}}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExternalAttachmentV1Model"}}}}}}},"post":{"tags":["v1 - Attachments"],"summary":"Create attachment","description":"Creates a new attachment record","operationId":"createAttachment","requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreateAttachmentRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalAttachmentV1Model"}}}}}}},"/v1/attachments/upload-url":{"post":{"tags":["v1 - Attachments"],"summary":"Generate attachment upload URL","description":"Generates a secure upload URL for attachment files","operationId":"createAttachmentUploadUrl","requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUploadAttachmentRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalAttachmentUploadUrlResponseV1Model"}}}}}}},"/v1/attachments/{attachmentId}":{"delete":{"tags":["v1 - Attachments"],"summary":"Delete attachment","description":"Archives an attachment. The attachment keeps its id, can still be listed with `status=ARCHIVED` and its file downloaded, and on records that have an activity log the archive is recorded there as `ARCHIVE_FILE`. An archived attachment can't be restored to its record; to replace a file, upload a new one, and both stay listed. Archived attachments don't count towards the resource's attachment limit. Attachments on posted, partially paid or paid documents can't be archived. Deleting an attachment that is already archived does nothing.","operationId":"deleteAttachment","parameters":[{"name":"attachmentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}}},"/v1/attachments/{attachmentId}/document":{"get":{"tags":["v1 - Attachments"],"summary":"Get attachment document","description":"Redirects to a temporary download link for the attachment's file, archived attachments included. The link is valid for 2 hours and can be opened by anyone who holds it, so don't store it: the attachment id is the permanent reference, and a new link can be requested with it at any time. Files are kept indefinitely.","operationId":"getAttachmentDocument","parameters":[{"name":"attachmentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}},"options":{"tags":["v1 - Attachments"],"summary":"Get attachment options","description":"Handles CORS preflight requests for attachment document access","operationId":"getAttachmentDocumentOptions","parameters":[{"name":"attachmentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/LightPrincipal"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}}},"/v1/bank-accounts":{"get":{"tags":["v1 - Bank Accounts"],"summary":"Get bank accounts of the company","description":"Returns all bank accounts of the company","operationId":"getBankAccountsForCompany","responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExternalBankAccountV1Model"}}}}}}},"post":{"tags":["v1 - Bank Accounts"],"summary":"Create bank account","description":"Creates a bank account along with its linked ledger (chart-of-accounts) entry in a single transaction. The ledger account code must be a unique 6-digit integer within the company's chart of accounts.","operationId":"createBankAccount","requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreateBankAccountRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalBankAccountV1Model"}}}}}}},"/v1/bank-accounts/{bankAccountId}/bank-transactions":{"get":{"tags":["v1 - Bank Accounts"],"summary":"List bank transactions","description":"Returns a paginated list of bank transactions for the specified bank account, including the balance","operationId":"listBankTransactions","parameters":[{"name":"bankAccountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"sort","in":"query","schema":{"type":"string","description":"Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `reconciliationStatus`, `dcSign`, `date`, `amount`, `name`, `memo`.","example":"amount:desc,createdAt:asc"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `reconciliationStatus`, `dcSign`, `date`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalGetAllResponseWithBalanceV1ModelExternalBankTransactionV1Model"}}}}}},"post":{"tags":["v1 - Bank Accounts"],"summary":"Create bank transactions","description":"Creates bank transactions in batch. Maximum 500 transactions per request. Duplicate transactions (same transactionId for the same bank account) are silently skipped.","operationId":"createBankTransactions","parameters":[{"name":"bankAccountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreateBankTransactionsRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExternalBankTransactionV1Model"}}}}}}}},"/v1/bank-accounts/{bankAccountId}/activity-events":{"get":{"tags":["v1 - Bank Accounts"],"summary":"List bank account activity events","description":"The bank account's activity timeline, newest first: who did what to it, when, and which fields changed. Requires permission to view this bank account. The `entityId` and `entityType` filters are fixed by the path here; passing them can only narrow the result.","operationId":"listBankAccountActivityEvents","parameters":[{"name":"bankAccountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `action`, `actorId`, `correlationId`, `createdAt`, `entityId`, `entityType`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"minimum":1,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalActivityEventV1Model"}}}}}}},"/v1/bank-accounts/{bankAccountId}/balance":{"get":{"tags":["v1 - Bank Accounts"],"summary":"Get bank account balance","description":"Returns the bank statement balance and ledger balance for a bank account as of the given date. If `asOf` is omitted, today's balance is returned. The bank balance is derived from the opening balance plus all bank transactions on or before `asOf`; the ledger balance is the sum of ledger transaction lines posted on or before `asOf` for the linked ledger account.","operationId":"getBankAccountBalance","parameters":[{"name":"bankAccountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"asOf","in":"query","description":"Date the balance is computed for (ISO-8601, e.g. `2026-05-07`). Defaults to today.","schema":{"$ref":"#/components/schemas/LocalDateParam"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalBankAccountBalanceAsOfV1Model"}}}}}},"put":{"tags":["v1 - Bank Accounts"],"summary":"Upsert bank account balance","description":"Creates or updates the opening balance for a bank account. Only one balance per bank account is allowed — subsequent calls update the existing balance.","operationId":"upsertBankAccountBalance","parameters":[{"name":"bankAccountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUpsertBankAccountBalanceRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalBankAccountBalanceV1Model"}}}}}}},"/v1/bank-accounts/{bankAccountId}/bank-transactions/{bankTransactionId}":{"get":{"tags":["v1 - Bank Accounts"],"summary":"Get bank transaction","description":"Returns a specific bank transaction by ID","operationId":"getBankTransaction","parameters":[{"name":"bankAccountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"bankTransactionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalBankTransactionV1Model"}}}}}}},"/v1/bff/invoice-payables":{"get":{"tags":["v1 - Invoice Payables"],"summary":"List invoice payables","description":"Deprecated. This route returns a front-end-shaped row and will be removed in a future release. Use `GET /v1/invoice-payables` instead. It is not a drop-in replacement: it returns a smaller, bill-shaped record and a narrower query vocabulary, so compare the two before migrating. The differences a schema comparison will not show: `createdAt` is named `invoiceCreatedAt`, the `documentNumber` filter is named `invoiceNumber`, and the embedded vendor details are reduced to `vendorId` and `vendorName` — resolve `vendorId` against `GET /v1/vendors/{vendorId}` for the rest.","operationId":"listInvoicePayables","parameters":[{"name":"sort","in":"query","schema":{"type":"string","description":"Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `amount`, `canceledAt`, `companyEntityName`, `description`, `dueDate`, `fromAccountName`, `createdAt`, `invoiceNumber`, `issuedDate`, `ocrCompletedAt`, `paymentAt`, `senderEmail`, `state`, `totalDue`, `vendorName`, `businessPartnerName`, `nextApproverName`.","example":"amount:desc,createdAt:asc"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `approverUserId`, `id`, `vendorId`, `userId`, `companyEntityId`, `senderBankAccountId`, `amount`, `description`, `documentNumber`, `documentStatus`, `dueDate`, `hasWithholding`, `issuedDate`, `paymentAt`, `createdAt`, `updatedAt`, `state`, `vendorName`, `userFirstName`, `userLastName`, `type`, `selfBilledEinvoiceDeadline`, `selfBilledEinvoiceStatus`.\n\nThese fields accept only a subset of the operators: `hasWithholding` (`eq`, `ne`).","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}},{"name":"include","in":"query","schema":{"uniqueItems":true,"type":"array","items":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["REIMBURSEMENT"]}}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalBffInvoicePayableV1Model"}}}}},"deprecated":true}},"/v1/card-balance-accounts/{accountId}/statement":{"get":{"tags":["v1 - Card Balance Accounts"],"summary":"Generate a card balance account statement","description":"Generates a statement for a card balance account over a period. Dates are interpreted as UTC day boundaries and all timestamps in the response are in UTC. Runs a fresh provider sync inline so the statement reflects the latest activity.","operationId":"generateCardBalanceAccountStatement","parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"from","in":"query","description":"Start of the statement period, inclusive. A UTC calendar date in `YYYY-MM-DD` format.","schema":{"type":"string","format":"date","example":"2026-01-01"}},{"name":"to","in":"query","description":"End of the statement period. A UTC calendar date in `YYYY-MM-DD` format; must be after `from`.","schema":{"type":"string","format":"date","example":"2026-01-31"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCardBalanceAccountStatementV1Model"}}}}}}},"/v1/card-balance-accounts/{accountId}":{"get":{"tags":["v1 - Card Balance Accounts"],"summary":"Get card balance account","description":"Returns a card balance account by ID, including balance details","operationId":"getCardBalanceAccount","parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCardBalanceAccountV1Model"}}}}}}},"/v1/card-balance-accounts":{"get":{"tags":["v1 - Card Balance Accounts"],"summary":"List card balance accounts","description":"Returns a list of card balance accounts","operationId":"listCardBalanceAccounts","parameters":[{"name":"sort","in":"query","schema":{"type":"string","description":"Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `companyEntityId`, `status`, `createdAt`.","example":"amount:desc,createdAt:asc"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `id`, `companyId`, `companyEntityId`, `currency`, `status`, `createdAt`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalCardBalanceAccountV1Model"}}}}}}},"/v1/card-balance-accounts/{accountId}/total-spend":{"get":{"tags":["v1 - Card Balance Accounts"],"summary":"Get total spend for a card balance account","description":"Returns the total spend for a card balance account within a date range","operationId":"getCardBalanceAccountTotalSpend","parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"from","in":"query","description":"Start of the spend window, inclusive. A UTC calendar date in `YYYY-MM-DD` format.","schema":{"type":"string","format":"date","example":"2026-01-01"}},{"name":"to","in":"query","description":"End of the spend window, inclusive. A UTC calendar date in `YYYY-MM-DD` format. Defaults to now if omitted.","schema":{"type":"string","format":"date","example":"2026-01-31"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCardBalanceAccountSpendV1Model"}}}}}}},"/v1/card-customers/public-key":{"get":{"tags":["v1 - Card Customers"],"summary":"Get card integration public key","description":"Returns the public key for the cards integration service","operationId":"getPublicKey","parameters":[{"name":"companyEntityId","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCardPublicKeyInfoV1Model"}}}}}}},"/v1/card-transactions/batch-update":{"patch":{"tags":["v1 - Card Transactions"],"summary":"Batch update card transactions","description":"Updates multiple card transactions in a single operation","operationId":"batchUpdateCardTransactions","requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExternalBatchUpdateCardTransactionRequestV1Model"}}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}}},"/v1/card-transactions/{transactionId}/lines":{"post":{"tags":["v1 - Card Transactions"],"summary":"Create card transaction line","description":"Adds a line to a card transaction","operationId":"createCardTransactionLine","parameters":[{"name":"transactionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreateCardTransactionLineRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCardTransactionLineV1Model"}}}}}}},"/v1/card-transactions/{transactionId}/lines/{transactionLineId}":{"delete":{"tags":["v1 - Card Transactions"],"summary":"Delete card transaction line","description":"Removes a line from a card transaction. The last remaining line cannot be removed","operationId":"deleteCardTransactionLine","parameters":[{"name":"transactionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"transactionLineId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}},"patch":{"tags":["v1 - Card Transactions"],"summary":"Update card transaction line","description":"Updates a specific card transaction line item","operationId":"updateCardTransactionLine","parameters":[{"name":"transactionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"transactionLineId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUpdateCardTransactionLineRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCardTransactionLineV1Model"}}}}}}},"/v1/card-transactions/{cardTransactionId}/receipt-upload-url":{"post":{"tags":["v1 - Card Transactions"],"summary":"Generate receipt upload URL","description":"Generates a secure upload URL for receipt documents","operationId":"generateUploadUrlForCardTransaction","parameters":[{"name":"cardTransactionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalTransactionReceiptUploadUrlRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCardTransactionReceiptUploadUrlResponseV1Model"}}}}}}},"/v1/card-transactions/{cardTransactionId}":{"get":{"tags":["v1 - Card Transactions"],"summary":"Get card transaction","description":"Returns a card transaction by ID","operationId":"getCardTransaction","parameters":[{"name":"cardTransactionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalBffCardTransactionV1Model"}}}}}}},"/v1/card-transactions/{cardTransactionId}/activity-events":{"get":{"tags":["v1 - Card Transactions"],"summary":"List card transaction activity events","description":"The card transaction's activity timeline, newest first: who did what to it, when, and which fields changed. Requires permission to view this card transaction. The `entityId` and `entityType` filters are fixed by the path here; passing them can only narrow the result.","operationId":"listCardTransactionActivityEvents","parameters":[{"name":"cardTransactionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `action`, `actorId`, `correlationId`, `createdAt`, `entityId`, `entityType`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"minimum":1,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalActivityEventV1Model"}}}}}}},"/v1/card-transactions/{transactionId}/receipt":{"get":{"tags":["v1 - Card Transactions"],"summary":"Get transaction receipt","description":"Returns the attached receipt document for a card transaction","operationId":"getAttachedCardTransactionReceiptDocument","parameters":[{"name":"transactionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/pdf":{}}}}},"delete":{"tags":["v1 - Card Transactions"],"summary":"Remove transaction receipt","description":"Removes the attached receipt document from a card transaction","operationId":"removeReceipt","parameters":[{"name":"transactionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}},"options":{"tags":["v1 - Card Transactions"],"operationId":"getCardTransactionReceiptOptions","parameters":[{"name":"transactionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/LightPrincipal"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}}},"/v1/card-transactions":{"get":{"tags":["v1 - Card Transactions"],"summary":"List card transactions","description":"Returns a paginated list of card transactions","operationId":"listCardTransactions","parameters":[{"name":"sort","in":"query","schema":{"type":"string","description":"Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `companyEntityId`, `status`, `performedAt`.","example":"amount:desc,createdAt:asc"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `transactionId`, `cardBalanceAccountId`, `companyEntityId`, `cardId`, `ownerId`, `status`, `amount`, `originalAmount`, `originalCurrency`, `performedAt`, `updatedAt`, `taxId`, `accountId`, `cardType`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}},{"name":"onlyPostable","in":"query","schema":{"type":"boolean"}},{"name":"missingData","in":"query","schema":{"type":"boolean"}},{"name":"includeParsedReceipt","in":"query","description":"If true, includes the AI-parsed receipt in the response. It is null when this parameter is not set, when no receipt scan is on file, and when the scan parsed something that is not a receipt","schema":{"type":"boolean"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalBffCardTransactionV1Model"}}}}}}},"/v1/card-transactions/import":{"post":{"tags":["v1 - Card Transactions"],"summary":"Import card transactions","description":"Imports a batch of up to 100 external card transactions. Each row is validated and created independently, so one bad row does not affect the others -- the response has one result per row, in the same order as the request. Larger batches are rejected as a whole. 'providerId' is the row's idempotency key: a row whose providerId was already imported comes back as SKIPPED_DUPLICATE with the existing transaction id. Always pass the issuer's own transaction id when you have one; when omitted, the key is derived from the row's card, amount, date and merchant, so re-sending the same rows is safe but two genuinely different transactions with identical content in one request are kept apart only by their order. Amounts are in minor units (cents). 'amount' and 'currency' are what settled on the card's balance account and must be in that account's currency; for a purchase made in another currency, pass the purchase-side amount as 'originalAmount' and 'originalCurrency'. Rules, each failing only that row: both or neither; the same currency must carry the same amount; both amounts are positive magnitudes and 'direction' carries the sign. When omitted they default to the settled amount. Each result echoes the row's index and providerId; a FAILED row carries the error as text and as a structured 'failure'.","operationId":"importCardTransactions","requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalImportCardTransactionsRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExternalImportCardTransactionResultV1Model"}}}}}}}},"/v1/card-transactions/{transactionId}/post":{"post":{"tags":["v1 - Card Transactions"],"summary":"Post card transaction","description":"Posts a card transaction to the ledger","operationId":"postCardTransaction","parameters":[{"name":"transactionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCardTransactionV1Model"}}}}}}},"/v1/card-transactions/{transactionId}/reset":{"post":{"tags":["v1 - Card Transactions"],"summary":"Reset card transaction","description":"Reverses a posted card transaction's ledger entries and returns it to an editable state","operationId":"resetCardTransaction","parameters":[{"name":"transactionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCardTransactionV1Model"}}}}}}},"/v1/card-transactions/{transactionId}":{"patch":{"tags":["v1 - Card Transactions"],"summary":"Update card transaction","description":"Updates an existing card transaction","operationId":"updateCardTransaction","parameters":[{"name":"transactionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUpdateCardTransactionRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCardTransactionV1Model"}}}}}}},"/v1/cards":{"get":{"tags":["v1 - Cards"],"summary":"List cards","description":"Returns a paginated list of cards","operationId":"listCards","parameters":[{"name":"sort","in":"query","schema":{"type":"string","description":"Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `accountId`, `status`, `createdAt`.","example":"amount:desc,createdAt:asc"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `id`, `cardBalanceAccountId`, `status`, `type`, `createdAt`, `updatedAt`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalBffCardV1Model"}}}}}},"post":{"tags":["v1 - Cards"],"summary":"Create card","description":"Creates a new card. Use metadata type 'VENDOR' for vendor cards or 'EMPLOYEE' for employee cards.","operationId":"createCard","parameters":[{"name":"X-Idempotency-Key","in":"header","schema":{"type":"string"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreateCardRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCardV1Model"}}}}}}},"/v1/cards/{cardId}/freeze":{"post":{"tags":["v1 - Cards"],"summary":"Freeze card","description":"Freezes a card to block transactions","operationId":"freezeCard","parameters":[{"name":"X-Idempotency-Key","in":"header","schema":{"type":"string"}},{"name":"cardId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCardV1Model"}}}}}}},"/v1/cards/{cardId}":{"get":{"tags":["v1 - Cards"],"summary":"Get card","description":"Returns a card by ID","operationId":"getCard","parameters":[{"name":"cardId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalBffCardV1Model"}}}}}}},"/v1/cards/{cardId}/activity-events":{"get":{"tags":["v1 - Cards"],"summary":"List card activity events","description":"The card's activity timeline, newest first: who did what to it, when, and which fields changed. Requires permission to view this card. The `entityId` and `entityType` filters are fixed by the path here; passing them can only narrow the result.","operationId":"listCardActivityEvents","parameters":[{"name":"cardId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `action`, `actorId`, `correlationId`, `createdAt`, `entityId`, `entityType`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"minimum":1,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalActivityEventV1Model"}}}}}}},"/v1/cards/{cardId}/unfreeze":{"post":{"tags":["v1 - Cards"],"summary":"Unfreeze card","description":"Unfreezes a card to allow transactions. For physical cards, this confirms the cardholder is in possession of the card.","operationId":"unfreezeCard","parameters":[{"name":"X-Idempotency-Key","in":"header","schema":{"type":"string"}},{"name":"cardId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCardV1Model"}}}}}}},"/v1/entities":{"get":{"tags":["v1 - Entities"],"summary":"List company entities","description":"Returns a paginated list of company entities","operationId":"getCompanyEntities","parameters":[{"name":"sort","in":"query","schema":{"type":"string","description":"Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `code`, `createdAt`, `displayName`, `localCurrency`, `name`, `sortPosition`, `status`, `vatNumber`.","example":"amount:desc,createdAt:asc"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `id`, `code`, `name`, `displayName`, `country`, `status`, `createdAt`, `updatedAt`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}},{"name":"includeCardCustomer","in":"query","schema":{"type":"boolean"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalCompanyEntityV1Model"}}}}}}},"/v1/companies/current":{"get":{"tags":["v1 - Companies"],"summary":"Get current company","description":"Returns the current company information","operationId":"getCurrentCompany","responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCompanyV1Model"}}}}}}},"/v1/contracts/{contractId}/begin-edit":{"post":{"tags":["v1 - Contracts"],"summary":"Begin editing contract","description":"Starts a working version for a published contract so its terms can be amended","operationId":"beginEditContract","parameters":[{"name":"contractId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalContractV1Model"}}}}}}},"/v1/contracts/{contractId}/cancel-edit":{"post":{"tags":["v1 - Contracts"],"summary":"Cancel contract edit","description":"Cancels an in-progress edit session, restoring the contract to its last published state","operationId":"cancelEditContract","parameters":[{"name":"contractId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalContractV1Model"}}}}}}},"/v1/contracts/{contractId}/cancel-termination":{"post":{"tags":["v1 - Contracts"],"summary":"Cancel scheduled termination","description":"Cancels a scheduled termination, returning the contract to active","operationId":"cancelContractTermination","parameters":[{"name":"X-Idempotency-Key","in":"header","schema":{"type":"string"}},{"name":"contractId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalContractV1Model"}}}}}}},"/v1/contracts":{"get":{"tags":["v1 - Contracts"],"summary":"List contracts","description":"Returns a paginated list of contracts","operationId":"listContracts","parameters":[{"name":"sort","in":"query","schema":{"type":"string","description":"Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `activatedAt`, `companyEntityId`, `companyEntityName`, `createdAt`, `customerId`, `customerName`, `description`, `endDate`, `estimatedAmount`, `renewalDate`, `startDate`, `state`, `terminatedAt`.","example":"amount:desc,createdAt:asc"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`).","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalContractV1Model"}}}}}},"post":{"tags":["v1 - Contracts"],"summary":"Create contract","description":"Creates a new contract","operationId":"createContract","parameters":[{"name":"X-Idempotency-Key","in":"header","schema":{"type":"string"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreateContractRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalContractV1Model"}}}}}}},"/v1/contracts/{contractId}/lines":{"post":{"tags":["v1 - Contracts"],"summary":"Create contract line","description":"Creates a new contract line item","operationId":"createContractLine","parameters":[{"name":"X-Idempotency-Key","in":"header","schema":{"type":"string"}},{"name":"contractId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreateContractLineRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalContractLineV1Model"}}}}}}},"/v1/contracts/{contractId}":{"get":{"tags":["v1 - Contracts"],"summary":"Get contract","description":"Returns a specific contract by ID","operationId":"getContract","parameters":[{"name":"contractId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalContractV1Model"}}}}}},"delete":{"tags":["v1 - Contracts"],"summary":"Delete contract","description":"Deletes a contract by ID","operationId":"deleteContract","parameters":[{"name":"X-Idempotency-Key","in":"header","schema":{"type":"string"}},{"name":"contractId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}},"patch":{"tags":["v1 - Contracts"],"summary":"Update contract","description":"Updates a contract","operationId":"updateContract","parameters":[{"name":"X-Idempotency-Key","in":"header","schema":{"type":"string"}},{"name":"contractId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUpdateContractRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalContractV1Model"}}}}}}},"/v1/contracts/{contractId}/lines/{lineId}":{"delete":{"tags":["v1 - Contracts"],"summary":"Delete contract line","description":"Deletes a contract line item","operationId":"deleteContractLine","parameters":[{"name":"X-Idempotency-Key","in":"header","schema":{"type":"string"}},{"name":"contractId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"lineId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}},"patch":{"tags":["v1 - Contracts"],"summary":"Update contract line","description":"Updates a contract line item","operationId":"updateContractLine","parameters":[{"name":"X-Idempotency-Key","in":"header","schema":{"type":"string"}},{"name":"contractId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"lineId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUpdateContractLineRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalContractLineV1Model"}}}}}}},"/v1/contracts/{contractId}/generate-document-upload-url":{"post":{"tags":["v1 - Contracts"],"summary":"Generate document upload URL","description":"Generates a pre-signed URL to upload the main contract document (PDF). After uploading to this URL, the document will appear in the contract's document preview.","operationId":"generateContractDocumentUploadUrl","parameters":[{"name":"contractId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalContractDocumentUploadRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalContractDocumentUploadUrlResponseV1Model"}}}}}}},"/v1/contracts/{contractId}/activity-events":{"get":{"tags":["v1 - Contracts"],"summary":"List contract activity events","description":"The contract's activity timeline, newest first: who did what to it, when, and which fields changed. Requires permission to view this contract. The `entityId` and `entityType` filters are fixed by the path here; passing them can only narrow the result.","operationId":"listContractActivityEvents","parameters":[{"name":"contractId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `action`, `actorId`, `correlationId`, `createdAt`, `entityId`, `entityType`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"minimum":1,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalActivityEventV1Model"}}}}}}},"/v1/contracts/{contractId}/publish":{"post":{"tags":["v1 - Contracts"],"summary":"Publish contract","description":"Publishes a contract, transitioning it to ACTIVE state","operationId":"publishContract","parameters":[{"name":"X-Idempotency-Key","in":"header","schema":{"type":"string"}},{"name":"contractId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalContractV1Model"}}}}}}},"/v1/contracts/{contractId}/renew":{"post":{"tags":["v1 - Contracts"],"summary":"Renew contract","description":"Renews a contract by extending its end date","operationId":"renewContract","parameters":[{"name":"X-Idempotency-Key","in":"header","schema":{"type":"string"}},{"name":"contractId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalRenewContractRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalContractV1Model"}}}}}}},"/v1/contracts/{contractId}/reset":{"post":{"tags":["v1 - Contracts"],"summary":"Reset contract","description":"Resets a contract to CREATED state","operationId":"resetContract","parameters":[{"name":"X-Idempotency-Key","in":"header","schema":{"type":"string"}},{"name":"contractId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalContractV1Model"}}}}}}},"/v1/contracts/{contractId}/terminate":{"post":{"tags":["v1 - Contracts"],"summary":"Terminate contract","description":"Terminates a contract","operationId":"terminateContract","parameters":[{"name":"X-Idempotency-Key","in":"header","schema":{"type":"string"}},{"name":"contractId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalTerminateContractRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalContractV1Model"}}}}}}},"/v1/credit-notes/{creditNoteId}/archive":{"post":{"tags":["v1 - Credit Notes"],"summary":"Archive credit note","description":"Archives the credit note. If the credit note has been posted, it will be reversed in the ledger. A credit note with active links to invoice payables cannot be archived — unlink first.","operationId":"archiveCreditNote","parameters":[{"name":"creditNoteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreditNoteV1Model"}}}}}}},"/v1/credit-notes":{"get":{"tags":["v1 - Credit Notes"],"summary":"List credit notes","description":"Returns a paginated list of credit notes","operationId":"listCreditNotes","parameters":[{"name":"sort","in":"query","schema":{"type":"string","description":"Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `amount`, `businessPartnerName`, `status`, `documentDate`.","example":"amount:desc,createdAt:asc"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `businessPartnerId`, `status`, `companyEntityId`, `documentDate`, `toBeAdjustedAccDocType`, `updatedAt`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalCreditNoteV1Model"}}}}}},"post":{"tags":["v1 - Credit Notes"],"summary":"Create credit note","description":"Creates a new credit note in draft status. The credit note can be created with or without line items. When `documentNumber` is provided, it is used for idempotency — retrying a create with the same `documentNumber` returns the existing credit note instead of creating a duplicate. The `areLinesWithTax` field controls whether line amounts include tax (true = gross, tax included) or exclude tax (false = net, tax added on top). A `businessPartnerId` (vendor) is required if the credit note will be linked to an invoice payable later. The posting date is automatically set to the `documentDate`.","operationId":"createCreditNote","parameters":[{"name":"X-Idempotency-Key","in":"header","schema":{"type":"string"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreateCreditNoteRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreditNoteV1Model"}}}}}}},"/v1/credit-notes/{creditNoteId}/lines":{"post":{"tags":["v1 - Credit Notes"],"summary":"Create credit note line","description":"Creates a new line item on a credit note in draft status.","operationId":"createCreditNoteLine","parameters":[{"name":"creditNoteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreateCreditNoteLineRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreditNoteLineV1Model"}}}}}}},"/v1/credit-notes/create-from-invoice-payable/{invoicePayableId}":{"post":{"tags":["v1 - Credit Notes"],"summary":"Create credit note from invoice payable","description":"Creates a credit note from an existing invoice payable","operationId":"createCreditNoteFromInvoicePayable","parameters":[{"name":"invoicePayableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreditNoteV1Model"}}}}}}},"/v1/credit-notes/{creditNoteId}/lines/{lineId}":{"delete":{"tags":["v1 - Credit Notes"],"summary":"Delete credit note line","description":"Deletes a line item from a credit note in draft status.","operationId":"deleteCreditNoteLine","parameters":[{"name":"creditNoteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"lineId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}},"patch":{"tags":["v1 - Credit Notes"],"summary":"Update credit note line","description":"Updates a line item on a credit note in draft status. Fields sent as `null` clear the value; omitted fields remain unchanged.","operationId":"updateCreditNoteLine","parameters":[{"name":"creditNoteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"lineId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUpdateCreditNoteLineRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreditNoteLineV1Model"}}}}}}},"/v1/credit-notes/{creditNoteId}":{"get":{"tags":["v1 - Credit Notes"],"summary":"Get credit note","description":"Returns a credit note by ID","operationId":"getCreditNote","parameters":[{"name":"creditNoteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreditNoteV1Model"}}}}}},"patch":{"tags":["v1 - Credit Notes"],"summary":"Update credit note","description":"Updates a credit note in draft status. Fields sent as `null` clear the value; omitted fields remain unchanged.","operationId":"updateCreditNote","parameters":[{"name":"creditNoteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUpdateCreditNoteRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreditNoteV1Model"}}}}}}},"/v1/credit-notes/{creditNoteId}/activity-events":{"get":{"tags":["v1 - Credit Notes"],"summary":"List credit note activity events","description":"The credit note's activity timeline, newest first: who did what to it, when, and which fields changed. Requires permission to view this credit note. The `entityId` and `entityType` filters are fixed by the path here; passing them can only narrow the result.","operationId":"listCreditNoteActivityEvents","parameters":[{"name":"creditNoteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `action`, `actorId`, `correlationId`, `createdAt`, `entityId`, `entityType`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"minimum":1,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalActivityEventV1Model"}}}}}}},"/v1/credit-notes/{creditNoteId}/document":{"get":{"tags":["v1 - Credit Notes"],"summary":"Get credit note document","description":"Redirects to a temporary download link for the credit note's PDF document. The link is valid for 30 minutes and can be opened by anyone who holds it; request a new one when you need the file.","operationId":"getAttachedDocument","parameters":[{"name":"creditNoteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/pdf":{}}}}}},"/v1/credit-notes/{creditNoteId}/invoice-payables":{"get":{"tags":["v1 - Credit Notes"],"summary":"Get linked invoice payables","description":"Returns all invoice payables linked to the credit note","operationId":"getLinkedInvoicePayables","parameters":[{"name":"creditNoteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExternalCreditNoteInvoicePayableV1Model"}}}}}}}},"/v1/credit-notes/{creditNoteId}/invoice-payables/{invoicePayableId}":{"post":{"tags":["v1 - Credit Notes"],"summary":"Link credit note to invoice payable","description":"Links a credit note to an invoice payable for clearing (offsetting balances). Because credit notes cannot be applied in the ledger until the invoice payable is posted, this creates a 'link' record that will be used during posting to automatically clear the credit note balance against the invoice payable balance. Requirements: credit note must be in POSTED status, both documents must belong to the same company entity, same vendor (businessPartnerId), same currency, and clearing amount cannot exceed available balance on either document.","operationId":"linkCreditNoteToInvoicePayable","parameters":[{"name":"creditNoteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"invoicePayableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreateCreditNoteInvoicePayableRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreditNoteInvoicePayableV1Model"}}}}}},"delete":{"tags":["v1 - Credit Notes"],"summary":"Unlink credit note from invoice payable","description":"Removes the link between a credit note and an invoice payable","operationId":"unlinkFromInvoicePayable","parameters":[{"name":"creditNoteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"invoicePayableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}},"patch":{"tags":["v1 - Credit Notes"],"summary":"Update clearing amount","description":"Updates the clearing amount of a linked invoice payable","operationId":"updateLinkedInvoicePayable","parameters":[{"name":"creditNoteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"invoicePayableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUpdateCreditNoteInvoicePayableAmountRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreditNoteInvoicePayableV1Model"}}}}}}},"/v1/credit-notes/{creditNoteId}/post":{"post":{"tags":["v1 - Credit Notes"],"summary":"Post credit note","description":"Posts the credit note to the ledger. The credit note must be in draft status with at least one line item. A valid `companyEntityId`, `businessPartnerId`, and `currency` are required. After posting, the credit note can be linked to invoice payables for balance clearing.","operationId":"postCreditNote","parameters":[{"name":"creditNoteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreditNoteV1Model"}}}}}}},"/v1/custom-properties/groups/{groupId}/values":{"get":{"tags":["v1 - Custom Properties"],"summary":"List custom property values","description":"Returns a paginated list of custom property values","operationId":"listPaginatedCustomPropertyValues","parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"sort","in":"query","schema":{"type":"string","description":"Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `label`, `value`, `createdAt`.","example":"amount:desc,createdAt:asc"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `id`, `label`, `value`, `createdAt`, `updatedAt`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalCustomPropertyValueV1Model"}}}}}},"post":{"tags":["v1 - Custom Properties"],"summary":"Create custom property value","description":"Creates a new custom property value in the specified group","operationId":"createCustomPropertyValue","parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreateCustomPropertyValueRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCustomPropertyValueV1Model"}}}}}}},"/v1/custom-properties/groups/{groupId}/values/{valueId}":{"get":{"tags":["v1 - Custom Properties"],"summary":"Get custom property value","description":"Returns a custom property value by ID","operationId":"getCustomPropertyValueById","parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"valueId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCustomPropertyValueV1Model"}}}}}},"delete":{"tags":["v1 - Custom Properties"],"summary":"Delete custom property value","description":"Deletes a custom property value by ID","operationId":"deleteCustomPropertyValue","parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"valueId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}},"patch":{"tags":["v1 - Custom Properties"],"summary":"Update custom property value","description":"Updates an existing custom property value","operationId":"updateCustomPropertyValue","parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"valueId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUpdateCustomPropertyValueRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCustomPropertyValueV1Model"}}}}}}},"/v1/custom-properties/groups/{groupId}":{"get":{"tags":["v1 - Custom Properties"],"summary":"Get custom property group","description":"Returns a custom property group by ID","operationId":"getCustomPropertyGroupById","parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCustomPropertyGroupV1Model"}}}}}}},"/v1/custom-properties/groups":{"get":{"tags":["v1 - Custom Properties"],"summary":"List custom property groups","description":"Returns a paginated list of custom property groups","operationId":"listPaginatedCustomPropertyGroups","parameters":[{"name":"sort","in":"query","schema":{"type":"string","description":"Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `label`, `createdAt`.","example":"amount:desc,createdAt:asc"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `id`, `internalName`, `label`, `objectLevel`, `objectType`, `objectTypeStatus`, `inputType`, `isRequired`, `isDeleted`, `createdAt`, `updatedAt`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}},{"name":"includeValues","in":"query","schema":{"type":"boolean"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalCustomPropertyGroupV1Model"}}}}}}},"/v1/customer-credits/{customerCreditId}/archive":{"post":{"tags":["v1 - Customer Credits"],"summary":"Archive customer credit","description":"Archives the given customer credit","operationId":"archiveCustomerCredit","parameters":[{"name":"customerCreditId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCustomerCreditV1Model"}}}}}}},"/v1/customer-credits":{"get":{"tags":["v1 - Customer Credits"],"summary":"List customer credits","description":"Returns a paginated list of customer credits","operationId":"listCustomerCredits","parameters":[{"name":"sort","in":"query","schema":{"type":"string","description":"Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `amount`, `businessPartnerName`, `documentDate`, `effectiveDocumentDate`, `postingDate`, `status`.","example":"amount:desc,createdAt:asc"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `businessPartnerId`, `companyEntityId`, `currency`, `documentDate`, `effectiveDocumentDate`, `einvoiceStatus`, `id`, `postingDate`, `status`, `updatedAt`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"type":"integer","format":"int32"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}},{"name":"include","in":"query","description":"Related objects to include on every customer credit. Supported value can be `INVOICE_RECEIVABLE`","schema":{"uniqueItems":true,"type":"array","items":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["INVOICE_RECEIVABLE"]}}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCursorPaginatedResponseV1ModelExternalCustomerCreditV1Model"}}}}}},"post":{"tags":["v1 - Customer Credits"],"summary":"Create customer credit","description":"Creates a new customer credit","operationId":"createCustomerCredit","parameters":[{"name":"X-Idempotency-Key","in":"header","schema":{"type":"string"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreateCustomerCreditRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCustomerCreditV1Model"}}}}}}},"/v1/customer-credits/{customerCreditId}/lines":{"post":{"tags":["v1 - Customer Credits"],"summary":"Create customer credit line","description":"Creates a new line for the given customer credit","operationId":"createCustomerCreditLine","parameters":[{"name":"customerCreditId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreateCustomerCreditLineRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCustomerCreditLineV1Model"}}}}}}},"/v1/customer-credits/{customerCreditId}/lines/{lineId}":{"delete":{"tags":["v1 - Customer Credits"],"summary":"Delete customer credit line","description":"Deletes the given customer credit line","operationId":"deleteCustomerCreditLine","parameters":[{"name":"customerCreditId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"lineId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}},"patch":{"tags":["v1 - Customer Credits"],"summary":"Update customer credit line","description":"Updates the given customer credit line","operationId":"updateCustomerCreditLine","parameters":[{"name":"customerCreditId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"lineId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUpdateCustomerCreditLineRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCustomerCreditLineV1Model"}}}}}}},"/v1/customer-credits/{customerCreditId}/document":{"post":{"tags":["v1 - Customer Credits"],"summary":"Generate customer credit PDF","description":"Generates the PDF document for a customer credit. Poll this endpoint until status is `READY`, then use the `url` field to download the PDF. The signed URL is temporary and should not be stored and reused. To download again, call this endpoint to get a fresh URL.","operationId":"generateCustomerCreditDocument","parameters":[{"name":"customerCreditId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCustomerCreditPdfDocumentV1Model"}}}}}}},"/v1/customer-credits/{customerCreditId}":{"get":{"tags":["v1 - Customer Credits"],"summary":"Get customer credit","description":"Returns a customer credit by ID","operationId":"getCustomerCredit","parameters":[{"name":"customerCreditId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCustomerCreditV1Model"}}}}}},"patch":{"tags":["v1 - Customer Credits"],"summary":"Update customer credit","description":"Updates the given customer credit","operationId":"updateCustomerCredit","parameters":[{"name":"X-Idempotency-Key","in":"header","schema":{"type":"string"}},{"name":"customerCreditId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUpdateCustomerCreditRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCustomerCreditV1Model"}}}}}}},"/v1/customer-credits/{customerCreditId}/activity-events":{"get":{"tags":["v1 - Customer Credits"],"summary":"List customer credit activity events","description":"The customer credit's activity timeline, newest first: who did what to it, when, and which fields changed. Requires permission to view this customer credit. The `entityId` and `entityType` filters are fixed by the path here; passing them can only narrow the result.","operationId":"listCustomerCreditActivityEvents","parameters":[{"name":"customerCreditId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `action`, `actorId`, `correlationId`, `createdAt`, `entityId`, `entityType`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"minimum":1,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalActivityEventV1Model"}}}}}}},"/v1/customer-credits/{customerCreditId}/invoice-receivables/{invoiceReceivableId}/link":{"post":{"tags":["v1 - Customer Credits"],"summary":"Link customer credit to invoice","description":"Links a customer credit to a sales invoice","operationId":"linkCustomerCreditToInvoice","parameters":[{"name":"customerCreditId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"invoiceReceivableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalLinkCustomerCreditToInvoiceReceivableRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCustomerCreditInvoiceReceivableV1Model"}}}}}}},"/v1/customer-credits/{customerCreditId}/invoice-receivables/{invoiceReceivableId}":{"post":{"tags":["v1 - Customer Credits"],"summary":"Link customer credit","description":"Links a customer credit to a sales invoice","operationId":"linkCustomerCredit","parameters":[{"name":"customerCreditId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"invoiceReceivableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalLinkCustomerCreditToInvoiceReceivableRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCustomerCreditInvoiceReceivableV1Model"}}}}}},"delete":{"tags":["v1 - Customer Credits"],"summary":"Unlink customer credit","description":"Deprecated: Use POST /{customerCreditId}/invoice-receivables/{invoiceReceivableId}/unlink instead. Unlinks a customer credit from a sales invoice. If the customer credit has already been applied (CLEARED or PARTIALLY_CLEARED status), this will reverse the clearing entries in the ledger.","operationId":"unlinkCustomerCredit","parameters":[{"name":"customerCreditId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"invoiceReceivableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}},"deprecated":true}},"/v1/customer-credits/{customerCreditId}/post-and-send-email":{"post":{"tags":["v1 - Customer Credits"],"summary":"Post and send customer credit","description":"Posts the customer credit and sends it via email. Optionally submits to e-invoicing if shouldSubmitEInvoice is set.","operationId":"postAndSendCustomerCredit","parameters":[{"name":"customerCreditId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPostAndSendCustomerCreditRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCustomerCreditV1Model"}}}}}}},"/v1/customer-credits/{customerCreditId}/post":{"post":{"tags":["v1 - Customer Credits"],"summary":"Post customer credit","description":"Posts the given customer credit and applies to invoice if linked","operationId":"postCustomerCredit","parameters":[{"name":"customerCreditId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPostCustomerCreditRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCustomerCreditV1Model"}}}}}}},"/v1/customer-credits/{customerCreditId}/submit-einvoice":{"post":{"tags":["v1 - Customer Credits"],"summary":"Submit e-invoice for customer credit","description":"Submits an e-invoice for the given customer credit. The customer credit must be posted.","operationId":"submitCustomerCreditEInvoice","parameters":[{"name":"customerCreditId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}}},"/v1/customer-credits/{customerCreditId}/unarchive":{"post":{"tags":["v1 - Customer Credits"],"summary":"Unarchive customer credit","description":"Unarchives the given customer credit and reverts it to draft","operationId":"unarchiveCustomerCredit","parameters":[{"name":"customerCreditId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Customer credit unarchived successfully.","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCustomerCreditV1Model"}}}},"400":{"description":"Bad request. Customer credit is not archived.","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUiClientExceptionV1Model"}}}}}}},"/v1/customer-credits/{customerCreditId}/invoice-receivables/{invoiceReceivableId}/unlink":{"post":{"tags":["v1 - Customer Credits"],"summary":"Unlink customer credit from invoice","description":"Unlinks a customer credit from a sales invoice. If the customer credit has already been applied (CLEARED or PARTIALLY_CLEARED status), this will reverse the clearing entries in the ledger.","operationId":"unlinkCustomerCreditFromInvoice","parameters":[{"name":"customerCreditId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"invoiceReceivableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}}},"/v1/customers/{customerId}/activate":{"post":{"tags":["v1 - Customers"],"summary":"Activate customer","description":"Activate the given customer","operationId":"activateCustomer","parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCustomerV1Model"}}}}}}},"/v1/customers/{customerId}/archive":{"post":{"tags":["v1 - Customers"],"summary":"Archive customer","description":"Archive the given customer","operationId":"archiveCustomer","parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCustomerV1Model"}}}}}}},"/v1/customers":{"get":{"tags":["v1 - Customers"],"summary":"List customers","description":"Returns a paginated list of customers","operationId":"listCustomers","parameters":[{"name":"sort","in":"query","schema":{"type":"string","description":"Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `name`, `email`, `createdAt`, `updatedAt`.","example":"amount:desc,createdAt:asc"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `billingAddressCity`, `billingAddressCountry`, `businessRegistrationNumber`, `createdAt`, `description`, `email`, `externalSourceId`, `externalSourceName`, `id`, `name`, `status`, `updatedAt`, `vatNumber`.\n\nThese fields accept only a subset of the operators: `externalSourceId` (`eq`, `in`), `externalSourceName` (`eq`, `in`).","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"searchTerm","in":"query","description":"Search term to filter results by. Performs a case-insensitive partial match across searchable fields.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalCustomerV1Model"}}}}}},"post":{"tags":["v1 - Customers"],"summary":"Create customer","description":"Creates a new customer","operationId":"createCustomer","parameters":[{"name":"X-Idempotency-Key","in":"header","schema":{"type":"string"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreateCustomerRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCustomerV1Model"}}}}}}},"/v1/customers/{customerId}":{"get":{"tags":["v1 - Customers"],"summary":"Get customer","description":"Returns a customer by ID","operationId":"getCustomerById","parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCustomerV1Model"}}}}}},"patch":{"tags":["v1 - Customers"],"summary":"Update customer","description":"Updates an existing customer","operationId":"updateCustomer","parameters":[{"name":"X-Idempotency-Key","in":"header","schema":{"type":"string"}},{"name":"customerId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUpdateCustomerRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCustomerV1Model"}}}}}}},"/v1/customers/{customerId}/activity-events":{"get":{"tags":["v1 - Customers"],"summary":"List customer activity events","description":"The customer's activity timeline, newest first: who did what to it, when, and which fields changed. Requires permission to view this customer. The `entityId` and `entityType` filters are fixed by the path here; passing them can only narrow the result.","operationId":"listCustomerActivityEvents","parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `action`, `actorId`, `correlationId`, `createdAt`, `entityId`, `entityType`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"minimum":1,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalActivityEventV1Model"}}}}}}},"/v1/document-templates":{"get":{"tags":["v1 - Document Templates"],"summary":"List document templates","description":"Returns the company's document templates, optionally filtered by document type","operationId":"listDocumentTemplates","parameters":[{"name":"companyEntityId","in":"query","description":"Only return templates that apply to this company entity","schema":{"type":"string","format":"uuid"}},{"name":"sort","in":"query","schema":{"type":"string","description":"Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `name`, `createdAt`.","example":"amount:desc,createdAt:asc"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `id`, `name`, `description`, `documentType`, `state`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set","schema":{"type":"integer","format":"int64"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalGetAllResponseV1ModelExternalDocumentTemplateV1Model"}}}}}}},"/v1/einvoicing/self-billed-einvoices/{id}":{"get":{"tags":["v1 - EInvoicing"],"summary":"Get self-billed e-invoice","description":"Returns a self-billed e-invoice by ID","operationId":"getSelfBilledEInvoice","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalSelfBilledEInvoiceV1Model"}}}}}}},"/v1/einvoicing/self-billed-einvoices":{"get":{"tags":["v1 - EInvoicing"],"summary":"List self-billed e-invoices","description":"Returns a paginated list of the self-billed e-invoices of the company, newest first","operationId":"getSelfBilledEInvoices","parameters":[{"name":"sort","in":"query","schema":{"type":"string","description":"Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `createdAt`.","example":"amount:desc,createdAt:asc"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `status`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"searchTerm","in":"query","description":"Search term to filter results by. Performs a case-insensitive partial match across searchable fields.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"type":"integer","format":"int32"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCursorPaginatedResponseV1ModelExternalSelfBilledEInvoiceListItemV1Model"}}}}}}},"/v1/exchange/rates/{base}/{target}":{"get":{"tags":["v1 - Exchange"],"summary":"Get exchange rate","description":"Returns an exchange rate between base and target currencies for a given date","operationId":"getRate","parameters":[{"name":"base","in":"path","description":"Base currency of the exchange rate","required":true,"schema":{"type":"string"}},{"name":"target","in":"path","description":"Target currency of the exchange rate","required":true,"schema":{"type":"string"}},{"name":"date","in":"query","description":"Date the exchange rate is requested for. If omitted, defaults to today","schema":{"$ref":"#/components/schemas/LocalDateParam"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalExchangeRateV1Model"}}}}}}},"/v1/exchange/rates/{currency}":{"get":{"tags":["v1 - Exchange"],"summary":"Get currency exchange rates","description":"Returns exchange rates for the given currency against all available currencies","operationId":"getRates","parameters":[{"name":"currency","in":"path","description":"Currency for which available exchange rates are requested for","required":true,"schema":{"type":"string"}},{"name":"date","in":"query","description":"Date the exchange rate is requested for. If omitted, defaults to today","schema":{"type":"string","format":"date","example":"2025-11-25"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExternalExchangeRateV1Model"}}}}}}}},"/v1/expenses/{expenseId}/cancel":{"post":{"tags":["v1 - Expenses"],"summary":"Cancel expense","description":"Cancels an existing expense","operationId":"cancelExpense","parameters":[{"name":"expenseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalExpenseV1Model"}}}}}}},"/v1/expenses":{"get":{"tags":["v1 - Expenses"],"summary":"List expenses","description":"Returns a paginated list of expenses","operationId":"listExpenses","parameters":[{"name":"sort","in":"query","schema":{"type":"string","description":"Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `userId`, `status`, `performedDate`, `createdAt`.","example":"amount:desc,createdAt:asc"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `id`, `userId`, `status`, `performedDate`, `createdAt`, `updatedAt`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/GetExternalExpensesResponseV1Model"}}}}}},"post":{"tags":["v1 - Expenses"],"summary":"Create expense","description":"Creates an expense synchronously from a receipt uploaded with `shouldAutoCreateExpense: false` and the given line items. No OCR runs: the fields you send are what is stored. A PDF receipt is kept as-is; JPEG, PNG, HEIC and TIFF receipts are converted to PDF first. The expense is created as a draft for the authenticated user and is included in the next POST /v1/expenses/submit.","operationId":"createExpense","parameters":[{"name":"X-Idempotency-Key","in":"header","schema":{"type":"string"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreateExpenseRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalExpenseV1Model"}}}}}}},"/v1/expenses/{expenseId}/line-items":{"post":{"tags":["v1 - Expenses"],"summary":"Create line item","description":"Creates a new line item","operationId":"createExpenseLineItem","parameters":[{"name":"expenseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/CreateExpenseLineItemRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalExpenseLineItemV1Model"}}}}}}},"/v1/expenses/{expenseId}/line-items/{lineItemId}":{"delete":{"tags":["v1 - Expenses"],"summary":"Delete line item","description":"Deletes an existing line item","operationId":"deleteExpenseLineItem","parameters":[{"name":"expenseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"lineItemId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}},"patch":{"tags":["v1 - Expenses"],"summary":"Update line item","description":"Updates an existing expense line item","operationId":"updateExpenseLineItem","parameters":[{"name":"expenseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"lineItemId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/UpdateExpenseLineItemRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalExpenseLineItemV1Model"}}}}}}},"/v1/expenses/upload-url":{"post":{"tags":["v1 - Expenses"],"summary":"Create upload URL","description":"Creates a pre-signed URL for uploading an expense receipt document","operationId":"generateUploadUrl","requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalExpenseReceiptUploadUrlRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalExpenseReceiptUploadUrlResponseV1Model"}}}}}}},"/v1/expenses/{expenseId}":{"get":{"tags":["v1 - Expenses"],"summary":"Get expense","description":"Returns an expense by ID including all line items","operationId":"getExpense","parameters":[{"name":"expenseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalExpenseV1Model"}}}}}},"patch":{"tags":["v1 - Expenses"],"summary":"Update expense","description":"Updates an existing expense","operationId":"updateExpense","parameters":[{"name":"expenseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUpdateExpenseRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalExpenseV1Model"}}}}}}},"/v1/expenses/{expenseId}/document":{"get":{"tags":["v1 - Expenses"],"summary":"Get expense document","description":"Returns the attached receipt document as a PDF download","operationId":"getAttachedDocument_1","parameters":[{"name":"expenseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/pdf":{}}}}}},"/v1/expenses/submit":{"post":{"tags":["v1 - Expenses"],"summary":"Submit reimbursement","description":"Submits all pending expenses from the current user for administrator review and approval","operationId":"submitReimbursement","responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}}},"/v1/general-ledger-summary":{"get":{"tags":["v1 - General Ledger Summary"],"summary":"Get general ledger summary","description":"Returns the opening balance, net movement and closing balance of every account over a date range. Each account carries one figure per entity in scope, the `subtotal` of those entities' own books, the intercompany `elimination` the selection is entitled to, and their `total`. Without a company entity filter the scope is every entity of the company, including inactive ones. An elimination between two entities applies only when both are in scope; one belonging to the group as a whole applies only when the scope covers the whole company.","operationId":"getGeneralLedgerSummary","parameters":[{"name":"from","in":"query","description":"First day included in the movement figures, inclusive. A UTC calendar date in `YYYY-MM-DD` format.","schema":{"type":"string","format":"date","example":"2026-01-01"}},{"name":"to","in":"query","description":"Last day included in the movement figures, inclusive. A UTC calendar date in `YYYY-MM-DD` format.","schema":{"type":"string","format":"date","example":"2026-01-31"}},{"name":"sort","in":"query","schema":{"type":"string","description":"Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `accountCode`.","example":"amount:desc,createdAt:asc"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `accountCode`, `accountId`, `accountType`, `companyEntityCode`, `companyEntityId`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"type":"integer","format":"int32"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nOmit it, or provide `0`, for the initial request.\nFor subsequent requests, use `nextCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.\nThis endpoint paginates by cursor only and has no `offset` parameter.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCursorPaginatedResponseV1ModelExternalGeneralLedgerSummaryRowV1Model"}}}}}}},"/v1/invoice-approval":{"get":{"tags":["v1 - Invoice Approvals"],"summary":"Get invoice approvals","description":"Returns approval records for specified invoice payables","operationId":"getInvoicePayableApprovals","parameters":[{"name":"invoicePayableId","in":"query","schema":{"type":"array","items":{"type":"string","format":"uuid"}}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/LightPrincipal"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExternalInvoiceApprovalV1Model"}}}}}}}},"/v1/invoice-payables/{invoicePayableId}/approve":{"post":{"tags":["v1 - Invoice Payables"],"summary":"Approve invoice payable","description":"Approves an invoice payable for payment processing","operationId":"approveInvoicePayable","parameters":[{"name":"invoicePayableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Idempotency-Key","in":"header","schema":{"type":"string"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalApproveInvoicePayableRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalInvoicePayableV1Model"}}}}}}},"/v1/invoice-payables/{invoicePayableId}/cancel":{"post":{"tags":["v1 - Invoice Payables"],"summary":"Cancel invoice payable","description":"Cancels an invoice payable","operationId":"cancelInvoicePayable","parameters":[{"name":"invoicePayableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCancelInvoicePayableRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalInvoicePayableV1Model"}}}}}}},"/v1/invoice-payables":{"get":{"tags":["v1 - Invoice Payables"],"summary":"List invoice payable details","description":"Returns a paginated list of invoice payables. Defaults to `createdAt:desc` when `sort` is omitted. `updatedAt`, `approverUserId`, `userId` and `hasWithholding` can be filtered on but are not returned in the response, and `updatedAt` cannot be sorted by. Resolve `vendorId` against `GET /v1/vendors/{vendorId}` for the vendor's details beyond `vendorName`. Filter on `documentStatus:in:POSTED|PARTIALLY_CLEARED` to list the bills that still owe money; a `state` filter cannot express that, because the scheduled and payment-pending bills owe money too. There is no partial-match operator, so a filter on a text field such as `vendorName`, `description` or `invoiceNumber` matches the stored value exactly and returns an empty page when nothing matches.","operationId":"listInvoicePayableDetails","parameters":[{"name":"sort","in":"query","schema":{"type":"string","description":"Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `amount`, `canceledAt`, `createdAt`, `description`, `dueDate`, `invoiceNumber`, `issuedDate`, `ocrCompletedAt`, `paymentAt`, `senderEmail`, `state`, `vendorName`.","example":"amount:desc,createdAt:asc"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `amount`, `approverUserId`, `companyEntityId`, `createdAt`, `description`, `documentStatus`, `dueDate`, `hasWithholding`, `id`, `invoiceNumber`, `issuedDate`, `paymentAt`, `senderBankAccountId`, `state`, `type`, `updatedAt`, `userId`, `vendorId`, `vendorName`.\n\nThese fields accept only a subset of the operators: `hasWithholding` (`eq`, `ne`).","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"minimum":1,"type":"integer","format":"int32"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCursorPaginatedResponseV1ModelExternalInvoicePayableListItemV1Model"}}}}}},"post":{"tags":["v1 - Invoice Payables"],"summary":"Create invoice payable","description":"Creates a new invoice payable document. Supports inline line items via the `lineItems` field for single-request creation.","operationId":"createInvoicePayableDetails","parameters":[{"name":"X-Idempotency-Key","in":"header","schema":{"type":"string"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreateInvoicePayableRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalInvoicePayableV1Model"}}}}}}},"/v1/invoice-payables/{invoicePayableId}/document/upload-url":{"post":{"tags":["v1 - Invoice Payables"],"summary":"Generate document upload URL","description":"Generates a secure upload URL for invoice payable documents","operationId":"createInvoicePayableDocumentUploadUrl","parameters":[{"name":"invoicePayableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUploadInvoicePayableDocumentRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalInvoicePayableUploadUrlResponseV1Model"}}}}}}},"/v1/invoice-payables/{invoicePayableId}/line-items":{"post":{"tags":["v1 - Invoice Payables"],"summary":"Create invoice payable line item","description":"Creates an invoice payable line item","operationId":"createInvoicePayableLineItem","parameters":[{"name":"invoicePayableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreateInvoicePayableLineItemRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalInvoicePayableLineItemV1Model"}}}}}}},"/v1/invoice-payables/{invoicePayableId}/decline":{"post":{"tags":["v1 - Invoice Payables"],"summary":"Decline invoice payable","description":"Declines an invoice payable","operationId":"declineInvoicePayable","parameters":[{"name":"invoicePayableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalDeclineInvoicePayableRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalInvoicePayableV1Model"}}}}}}},"/v1/invoice-payables/{invoicePayableId}/line-items/{lineItemId}":{"get":{"tags":["v1 - Invoice Payables"],"summary":"Get invoice payable line item","description":"Gets an invoice payable line item","operationId":"getInvoicePayableLineItem","parameters":[{"name":"invoicePayableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"lineItemId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalInvoicePayableLineItemV1Model"}}}}}},"put":{"tags":["v1 - Invoice Payables"],"summary":"Update invoice payable line item","description":"Updates an invoice payable line item","operationId":"updateInvoicePayableLineItem","parameters":[{"name":"invoicePayableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"lineItemId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUpdateInvoicePayableLineItemRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalInvoicePayableLineItemV1Model"}}}}}},"delete":{"tags":["v1 - Invoice Payables"],"summary":"Delete invoice payable line item","description":"Deletes an invoice payable line item","operationId":"deleteInvoicePayableLineItem","parameters":[{"name":"invoicePayableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"lineItemId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}}},"/v1/invoice-payables/{invoicePayableId}":{"get":{"tags":["v1 - Invoice Payables"],"summary":"Get invoice payable","description":"Returns a specific invoice payable by ID, with its `outstandingBalance` and `amountPaid`","operationId":"getInvoicePayableDetails","parameters":[{"name":"invoicePayableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"includeOutstandingBalance","in":"query","description":"Ignored: `outstandingBalance` and `amountPaid` are always returned. Deprecated, omit it.","deprecated":true,"schema":{"type":"boolean"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalInvoicePayableV1Model"}}}}}},"patch":{"tags":["v1 - Invoice Payables"],"summary":"Update invoice payable","description":"Updates an existing invoice payable document header","operationId":"updateInvoicePayable","parameters":[{"name":"invoicePayableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUpdateInvoicePayablePatchRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalInvoicePayableV1Model"}}}}}}},"/v1/invoice-payables/{invoicePayableId}/activity-events":{"get":{"tags":["v1 - Invoice Payables"],"summary":"List bill activity events","description":"The bill's activity timeline, newest first: who did what to it, when, and which fields changed. Requires permission to view this bill. The `entityId` and `entityType` filters are fixed by the path here; passing them can only narrow the result.","operationId":"listInvoicePayableActivityEvents","parameters":[{"name":"invoicePayableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `action`, `actorId`, `correlationId`, `createdAt`, `entityId`, `entityType`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"minimum":1,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalActivityEventV1Model"}}}}}}},"/v1/invoice-payables/{invoicePayableId}/document":{"get":{"tags":["v1 - Invoice Payables"],"summary":"Get invoice document","description":"Redirects to a temporary download link for the invoice payable's document. The link is valid for 30 minutes and can be opened by anyone who holds it; request a new one when you need the file.","operationId":"getInvoicePayableDocument","parameters":[{"name":"invoicePayableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentType","in":"query","schema":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["ORIGINAL","GENERATED"]}}],"responses":{"default":{"description":"default response","content":{"application/pdf":{}}}}}},"/v1/invoice-payables/{invoicePayableId}/credit-notes":{"get":{"tags":["v1 - Invoice Payables"],"summary":"Get linked credit notes","description":"Returns all credit notes linked to the invoice payable","operationId":"getLinkedCreditNotes","parameters":[{"name":"invoicePayableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExternalCreditNoteInvoicePayableV1Model"}}}}}}}},"/v1/invoice-payables/{invoicePayableId}/payments":{"get":{"tags":["v1 - Invoice Payables"],"summary":"List invoice payable payments","description":"Returns all clearings (bank payments and credit notes) linked to the invoice payable. Each entry carries a `type` discriminator (`BP` for bank payments, `CN` for credit notes) so consumers can filter client-side if only one kind is needed. Reversed clearings are excluded.","operationId":"listInvoicePayablePayments","parameters":[{"name":"invoicePayableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExternalInvoicePayablePaymentV1Model"}}}}}}}},"/v1/invoice-payables/{invoicePayableId}/mark-as-paid":{"post":{"tags":["v1 - Invoice Payables"],"summary":"Mark invoice payable as paid","description":"Marks an invoice payable as paid by recording a bank payment that clears it. Use `paymentOption=FULL` to clear the remaining outstanding balance, or `paymentOption=PARTIAL` to record an installment. The invoice transitions to `COMPLETED` (full) or `PARTIALLY_PAID` (partial).","operationId":"markInvoicePayableAsPaid","parameters":[{"name":"invoicePayableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Idempotency-Key","in":"header","schema":{"type":"string"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalMarkInvoicePayableAsPaidRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalInvoicePayableV1Model"}}}}}}},"/v1/invoice-payables/{invoicePayableId}/post":{"post":{"tags":["v1 - Invoice Payables"],"summary":"Post invoice payable without approval","description":"Posts an invoice payable directly to the ledger without going through the approval workflow. The invoice must be in `IN_DRAFT` state. After posting, linked credit notes are applied and unlinked credit notes may be auto-allocated. If the invoice is fully cleared by credit notes, it transitions to `COMPLETED`; otherwise it transitions to `UNPAID`.","operationId":"postInvoicePayable","parameters":[{"name":"invoicePayableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Idempotency-Key","in":"header","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalInvoicePayableV1Model"}}}}}}},"/v1/invoice-payables/{invoicePayableId}/reverse-clearing":{"post":{"tags":["v1 - Invoice Payables"],"summary":"Reverse invoice payable payment","description":"Reverses a clearing applied to an invoice payable — either a bank payment (`BP`) or a credit note (`CN`) — identified by its accounting document ID. Use the `List invoice payable payments` endpoint to obtain the `accountingDocumentId` and `type` of the clearing to reverse. Reversing removes the clearing's effect from the ledger and transitions the invoice back to `UNPAID` or `PARTIALLY_PAID` depending on the remaining outstanding balance. Optionally set `shouldArchiveClearingDocument` to also archive the underlying bank payment or credit note.","operationId":"reverseInvoicePayableClearing","parameters":[{"name":"invoicePayableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalReverseInvoicePayableClearingRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalInvoicePayableV1Model"}}}}}}},"/v1/invoice-payables/{invoicePayableId}/submit-for-approval":{"post":{"tags":["v1 - Invoice Payables"],"summary":"Submit for approval","description":"Submits an invoice for approval","operationId":"submitInvoicePayableForApproval","parameters":[{"name":"invoicePayableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Idempotency-Key","in":"header","schema":{"type":"string"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalSubmitForApprovalRequestV1Model"}}}},"responses":{"200":{"description":"Invoice approval submitted successfully. The invoice state will change to `APPROVAL_REQUESTED`. You must poll the invoice to check when it changes to `APPROVAL_PENDING`.\nIf the invoice fails to submit for approval, the state will change back to `IN_DRAFT` and the `failureContext` field will be populated with the error details.","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalInvoicePayableV1Model"}}}}}}},"/v1/invoice-payables/{invoicePayableId}/custom-properties":{"patch":{"tags":["v1 - Invoice Payables"],"summary":"Update the custom properties of a posted invoice payable","description":"Replaces all custom fields on an invoice payable after it has been posted/approved (e.g. ready for payment release, scheduled, unpaid, partially paid, completed). Any custom property group not included in the request is removed. Use this to set fields such as a reconciliation link once the invoice has left the inbox. Editing is locked while approval is actively pending.","operationId":"updateInvoicePayableCustomProperties","parameters":[{"name":"invoicePayableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUpdateInvoicePayableCustomPropertiesRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalInvoicePayableV1Model"}}}}}}},"/v1/invoice-receivables/{invoiceReceivableId}/archive":{"post":{"tags":["v1 - Invoice Receivables"],"summary":"Archive invoice","description":"Archives an invoice receivable","operationId":"archiveInvoiceReceivable","parameters":[{"name":"invoiceReceivableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalInvoiceReceivableV1Model"}}}}}}},"/v1/invoice-receivables":{"get":{"tags":["v1 - Invoice Receivables"],"summary":"List invoices","description":"Returns a paginated list of invoice receivables","operationId":"listInvoiceReceivables","parameters":[{"name":"sort","in":"query","schema":{"type":"string","description":"Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `amount`, `companyEntityId`, `createdAt`, `customer`, `description`, `dueDate`, `effectiveInvoiceDate`, `invoiceDate`, `invoiceNumber`, `openedAt`, `postingDate`, `state`, `totalDue`, `updatedAt`.","example":"amount:desc,createdAt:asc"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `companyEntityId`, `contractId`, `currency`, `customerId`, `invoiceTemplateId`, `payeeBankAccountId`, `paymentType`, `openedAt`, `documentNumber`, `documentStatus`, `dueDate`, `effectiveInvoiceDate`, `einvoiceStatus`, `externalSourceId`, `externalSourceName`, `hasWithholding`, `id`, `invoiceDate`, `postingDate`, `state`, `updatedAt`.\n\nThese fields accept only a subset of the operators: `externalSourceId` (`eq`, `in`, `not_in`, `is_null`, `is_not_null`), `externalSourceName` (`eq`, `in`, `not_in`, `is_null`, `is_not_null`), `hasWithholding` (`eq`, `ne`).","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalInvoiceReceivableV1Model"}}}}}},"post":{"tags":["v1 - Invoice Receivables"],"summary":"Create invoice","description":"Creates a new sales invoice","operationId":"createInvoice","parameters":[{"name":"X-Idempotency-Key","in":"header","schema":{"type":"string"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreateInvoiceReceivableRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalInvoiceReceivableV1Model"}}}}}}},"/v1/invoice-receivables/{invoiceReceivableId}/lines":{"post":{"tags":["v1 - Invoice Receivables"],"summary":"Create line","description":"Creates a new invoice line item","operationId":"createInvoiceLine","parameters":[{"name":"invoiceReceivableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreateInvoiceReceivableLineRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalInvoiceReceivableLineV1Model"}}}}}}},"/v1/invoice-receivables/{invoiceReceivableId}/lines/{lineId}":{"delete":{"tags":["v1 - Invoice Receivables"],"summary":"Delete invoice line","description":"Deletes an invoice line item","operationId":"deleteInvoiceLine","parameters":[{"name":"invoiceReceivableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"lineId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}},"patch":{"tags":["v1 - Invoice Receivables"],"summary":"Update invoice line","description":"Updates an invoice line item","operationId":"updateInvoiceLine","parameters":[{"name":"invoiceReceivableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"lineId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUpdateInvoiceReceivableLineRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalInvoiceReceivableLineV1Model"}}}}}}},"/v1/invoice-receivables/{invoiceReceivableId}/document":{"post":{"tags":["v1 - Invoice Receivables"],"summary":"Generate invoice PDF","description":"Generates the PDF document for an invoice receivable. Poll this endpoint until status is `READY`, then use the `url` field to download the PDF. The signed URL is temporary and should not be stored and reused. To download again, call this endpoint to get a fresh URL.","operationId":"generateInvoiceReceivableDocument","parameters":[{"name":"invoiceReceivableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalInvoiceReceivablePdfDocumentV1Model"}}}}}}},"/v1/invoice-receivables/{invoiceReceivableId}":{"get":{"tags":["v1 - Invoice Receivables"],"summary":"Get invoice","description":"Returns a specific invoice receivable by ID","operationId":"getInvoiceReceivable","parameters":[{"name":"invoiceReceivableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalInvoiceReceivableV1Model"}}}}}},"patch":{"tags":["v1 - Invoice Receivables"],"summary":"Update invoice","description":"Updates an invoice receivable","operationId":"updateInvoiceReceivable","parameters":[{"name":"invoiceReceivableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUpdateInvoiceReceivableRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalInvoiceReceivableV1Model"}}}}}}},"/v1/invoice-receivables/{invoiceReceivableId}/activity-events":{"get":{"tags":["v1 - Invoice Receivables"],"summary":"List invoice activity events","description":"The invoice's activity timeline, newest first: who did what to it, when, and which fields changed. Requires permission to view this invoice. The `entityId` and `entityType` filters are fixed by the path here; passing them can only narrow the result.","operationId":"listInvoiceReceivableActivityEvents","parameters":[{"name":"invoiceReceivableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `action`, `actorId`, `correlationId`, `createdAt`, `entityId`, `entityType`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"minimum":1,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalActivityEventV1Model"}}}}}}},"/v1/invoice-receivables/{invoiceReceivableId}/payments":{"get":{"tags":["v1 - Invoice Receivables"],"summary":"List invoice payments","description":"Returns a list of payments for an invoice receivable","operationId":"listInvoiceReceivablePayments","parameters":[{"name":"invoiceReceivableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExternalInvoiceReceivablePaymentV1Model"}}}}}}},"post":{"tags":["v1 - Invoice Receivables"],"summary":"Enter invoice payment","description":"Enters a payment for an invoice receivable. If the total amount paid equals the invoice total, the invoice status will be changed to PAID, otherwise it will be PARTIALLY_PAID.","operationId":"recordInvoicePayment","parameters":[{"name":"invoiceReceivableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalRegisterInvoiceReceivablePaymentRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalInvoiceReceivableV1Model"}}}}}}},"/v1/invoice-receivables/{invoiceReceivableId}/open":{"post":{"tags":["v1 - Invoice Receivables"],"summary":"Open invoice","description":"Initiates the process of opening an invoice receivable. This assigns an invoice number, locks the invoice for editing, and optionally sends it via email or submits it to e-invoicing systems. The request body is optional - if not provided, the invoice will be opened with default settings (no email sent, no e-invoice submission).","operationId":"openInvoiceReceivable","parameters":[{"name":"invoiceReceivableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Optional configuration for opening the invoice. If not provided, invoice will be opened with default settings (no email, no e-invoice).","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalInitInvoiceReceivableOpenRequestV1Model"}}}},"responses":{"200":{"description":"Invoice open process initiated successfully. The invoice status will change to `OPEN_IN_PROGRESS`. You must poll the invoice to check when it changes to `OPEN`.\nIf the invoice fails to open, the status will change back to `DRAFT` and the `failureContext` field will be populated with the error details.","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalInvoiceReceivableV1Model"}}}}}}},"/v1/invoice-receivables/{invoiceReceivableId}/reset":{"post":{"tags":["v1 - Invoice Receivables"],"summary":"Reset invoice","description":"Resets an invoice receivable to draft","operationId":"resetInvoiceReceivable","parameters":[{"name":"invoiceReceivableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalInvoiceReceivableV1Model"}}}}}}},"/v1/invoice-receivables/{invoiceReceivableId}/reverse-clearing":{"post":{"tags":["v1 - Invoice Receivables"],"summary":"Reverse invoice payment","description":"Reverses a clearing applied to an invoice receivable — either a bank payment (`BP`) or a customer credit (`CC`) — identified by its accounting document ID. Use the `List invoice payments` endpoint to obtain the `accountingDocumentId` and `type` of the clearing to reverse. Reversing removes the clearing's effect from the ledger and transitions the invoice back to `OPEN` or `PARTIALLY_PAID` depending on the remaining outstanding balance. Optionally set `shouldArchiveClearingDocument` to also archive the underlying bank payment or customer credit.","operationId":"reverseInvoiceReceivableClearing","parameters":[{"name":"invoiceReceivableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalReverseInvoiceReceivableClearingRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalInvoiceReceivableV1Model"}}}}}}},"/v1/invoice-receivables/{invoiceReceivableId}/send-email":{"post":{"tags":["v1 - Invoice Receivables"],"summary":"Send invoice email","description":"Sends an invoice receivable email with the given email information","operationId":"sendInvoiceReceivableEmail","parameters":[{"name":"invoiceReceivableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalInvoiceReceivableEmailInfoRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}}},"/v1/invoice-receivables/{invoiceReceivableId}/unarchive":{"post":{"tags":["v1 - Invoice Receivables"],"summary":"Unarchive invoice","description":"Unarchives an invoice receivable and reverts it to draft","operationId":"unarchiveInvoiceReceivable","parameters":[{"name":"invoiceReceivableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Invoice receivable unarchived successfully.","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalInvoiceReceivableV1Model"}}}},"400":{"description":"Bad request. Invoice receivable is not archived.","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUiClientExceptionV1Model"}}}}}}},"/v1/journal-entries/{journalEntryId}/archive":{"post":{"tags":["v1 - Journal Entries"],"summary":"Archive journal entry","description":"Archives the given journal entry. Drafts are archived directly; posted entries are reversed and marked as archived.","operationId":"archiveJournalEntry","parameters":[{"name":"X-Idempotency-Key","in":"header","schema":{"type":"string"}},{"name":"journalEntryId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalJournalEntryV1Model"}}}}}}},"/v1/journal-entries":{"get":{"tags":["v1 - Journal Entries"],"summary":"List journal entries","description":"Returns a paginated list of journal entries, each with its lines and custom properties","operationId":"listJournalEntries","parameters":[{"name":"sort","in":"query","schema":{"type":"string","description":"Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `documentSequenceId`, `postingDate`, `valuationDate`, `documentDate`, `businessPartnerName`, `status`, `createdBy`, `createdAt`.","example":"amount:desc,createdAt:asc"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `accountCode`, `accountLabel`, `id`, `documentSequenceId`, `documentNumber`, `companyEntityId`, `ledgerName`, `businessPartnerName`, `status`, `currency`, `postingDate`, `documentDate`, `valuationDate`, `intercompanyJournalEntryId`, `intercompanyDocumentId`, `taxCode`, `createdAt`, `createdBy`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"minimum":1,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalJournalEntryV1Model"}}}}}},"post":{"tags":["v1 - Journal Entries"],"summary":"Create journal entry","description":"Creates a new journal entry","operationId":"createJournalEntry","parameters":[{"name":"X-Idempotency-Key","in":"header","schema":{"type":"string"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreateJournalEntryRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalJournalEntryV1Model"}}}}}}},"/v1/journal-entries/{journalEntryId}":{"get":{"tags":["v1 - Journal Entries"],"summary":"Get journal entry","description":"Returns a journal entry by ID, with its lines and custom properties","operationId":"getJournalEntry","parameters":[{"name":"journalEntryId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalJournalEntryV1Model"}}}}}},"patch":{"tags":["v1 - Journal Entries"],"summary":"Update journal entry","description":"Updates the given draft journal entry. Only the fields present in the request body are modified; fields set explicitly to null are cleared.","operationId":"updateJournalEntry","parameters":[{"name":"X-Idempotency-Key","in":"header","schema":{"type":"string"}},{"name":"journalEntryId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUpdateJournalEntryRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalJournalEntryV1Model"}}}}}}},"/v1/journal-entries/{journalEntryId}/activity-events":{"get":{"tags":["v1 - Journal Entries"],"summary":"List journal entry activity events","description":"The journal entry's activity timeline, newest first: who did what to it, when, and which fields changed. Requires permission to view this journal entry. The `entityId` and `entityType` filters are fixed by the path here; passing them can only narrow the result.","operationId":"listJournalEntryActivityEvents","parameters":[{"name":"journalEntryId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `action`, `actorId`, `correlationId`, `createdAt`, `entityId`, `entityType`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"minimum":1,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalActivityEventV1Model"}}}}}}},"/v1/ledger-accounts":{"get":{"tags":["v1 - Ledger accounts"],"summary":"List ledger accounts","description":"Returns a paginated list of ledger accounts","operationId":"getLedgerAccounts","parameters":[{"name":"sort","in":"query","schema":{"type":"string","description":"Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `code`, `label`, `context`, `type`, `category`, `status`, `createdAt`, `updatedAt`.","example":"amount:desc,createdAt:asc"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `id`, `companyEntityId`, `code`, `sourceType`, `status`, `type`, `category`, `createdAt`, `updatedAt`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}},{"name":"ledgerFeature","in":"query","schema":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["ALL","CARD_TRANSACTIONS","INVOICE_PAYABLES","INVOICE_RECEIVABLES","JOURNAL_ENTRIES","PURCHASE_ORDERS","REIMBURSEMENTS"]}},{"name":"includeCustomProperties","in":"query","description":"Whether to include custom properties in the response","schema":{"type":"boolean"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalLedgerAccountV1Model"}}}}}}},"/v1/ledger-transaction-lines":{"get":{"tags":["v1 - Ledger Transactions"],"summary":"List ledger transaction lines","description":"Returns a paginated list of ledger transaction lines","operationId":"listLedgerTransactionLines","parameters":[{"name":"sort","in":"query","schema":{"type":"string","description":"Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `accountingDocumentNumber`, `transactionSequenceId`, `documentSequenceId`, `documentType`, `accountCode`, `accountLabel`, `postingDate`, `accountType`, `taxTagLabel`, `createdAt`.","example":"amount:desc,createdAt:asc"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `accountCode`, `accountId`, `accountType`, `accDocId`, `businessPartnerId`, `businessPartnerName`, `companyEntityCode`, `companyEntityId`, `createdAt`, `customPropertyValueId`, `documentSequenceId`, `documentType`, `eliminationOffset`, `groupAmount`, `groupCurrency`, `id`, `ledgerName`, `lineType`, `localAmount`, `localCurrency`, `postingDate`, `taxReportingDate`, `taxTagLabel`, `transactionCurrency`, `transactionId`, `transactionSequenceId`.\n\nThese fields accept only a subset of the operators: `customPropertyValueId` (`eq`, `in`).","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}},{"name":"includeCustomProperties","in":"query","schema":{"type":"boolean"}},{"name":"includeMaxLineAmount","in":"query","description":"If true, includes the maximum line amount in the response. This field is deprecated and will be removed, please fetch all lines and compute this locally if needed","deprecated":true,"schema":{"type":"boolean"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalGetLedgerTransactionLinesWithMaxAmountResponseV1Model"}}}}}}},"/v1/products/{productId}/archive":{"post":{"tags":["v1 - Products"],"summary":"Archive product","description":"Archive the given product","operationId":"archiveProduct","parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalProductV1Model"}}}}}}},"/v1/products":{"get":{"tags":["v1 - Products"],"summary":"List products","description":"Returns a list of products","operationId":"listProducts","parameters":[{"name":"sort","in":"query","schema":{"type":"string","description":"Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `name`, `createdAt`, `updatedAt`.","example":"amount:desc,createdAt:asc"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `id`, `name`, `pricingType`, `recurrence`, `state`, `invoiceReceivableId`, `updatedAt`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalProductV1Model"}}}}}},"post":{"tags":["v1 - Products"],"summary":"Create product","description":"Creates a new product","operationId":"createProduct","parameters":[{"name":"X-Idempotency-Key","in":"header","schema":{"type":"string"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreateProductRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalProductV1Model"}}}}}}},"/v1/products/{productId}":{"get":{"tags":["v1 - Products"],"summary":"Get product","description":"Returns a product by ID","operationId":"getProductById","parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalProductV1Model"}}}}}},"patch":{"tags":["v1 - Products"],"summary":"Update product","description":"Updates an existing product","operationId":"updateProduct","parameters":[{"name":"X-Idempotency-Key","in":"header","schema":{"type":"string"}},{"name":"productId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUpdateProductRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalProductV1Model"}}}}}}},"/v1/products/{productId}/activity-events":{"get":{"tags":["v1 - Products"],"summary":"List product activity events","description":"The product's activity timeline, newest first: who did what to it, when, and which fields changed. Requires permission to view this product. The `entityId` and `entityType` filters are fixed by the path here; passing them can only narrow the result.","operationId":"listProductActivityEvents","parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `action`, `actorId`, `correlationId`, `createdAt`, `entityId`, `entityType`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"minimum":1,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalActivityEventV1Model"}}}}}}},"/v1/purchase-orders/{purchaseOrderId}/lines/bulk":{"put":{"tags":["v1 - Purchase Orders"],"summary":"Batch update purchase order lines","description":"Updates multiple purchase order line items","operationId":"batchUpdatePurchaseOrderLines","parameters":[{"name":"purchaseOrderId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExternalBatchUpdatePurchaseOrderLineRequestV1Model"}}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExternalPurchaseOrderLineV1Model"}}}}}}},"post":{"tags":["v1 - Purchase Orders"],"summary":"Bulk create purchase order lines","description":"Creates multiple purchase order line items","operationId":"bulkCreatePurchaseOrderLines","parameters":[{"name":"purchaseOrderId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExternalCreatePurchaseOrderLineRequestV1Model"}}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExternalPurchaseOrderLineV1Model"}}}}}}}},"/v1/purchase-orders/{purchaseOrderId}/cancel":{"post":{"tags":["v1 - Purchase Orders"],"summary":"Cancel purchase order","description":"Cancels a purchase order","operationId":"cancelPurchaseOrder","parameters":[{"name":"purchaseOrderId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPurchaseOrderV1Model"}}}}}}},"/v1/purchase-orders/{purchaseOrderId}/close":{"post":{"tags":["v1 - Purchase Orders"],"summary":"Close purchase order","description":"Closes a purchase order","operationId":"closePurchaseOrder","parameters":[{"name":"purchaseOrderId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPurchaseOrderV1Model"}}}}}}},"/v1/purchase-orders":{"get":{"tags":["v1 - Purchase Orders"],"summary":"List purchase orders","description":"Returns a paginated list of purchase orders","operationId":"listPurchaseOrders","parameters":[{"name":"sort","in":"query","schema":{"type":"string","description":"Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `purchaseOrderId`, `erpNumber`, `vendorName`, `ownerName`, `ownerId`, `companyEntityId`, `state`, `closedAt`, `cancelledAt`, `createdAt`, `totalAmount`.","example":"amount:desc,createdAt:asc"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `purchaseOrderId`, `vendorId`, `ownerId`, `state`, `erpNumber`, `updatedAt`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalBffPurchaseOrderV1Model"}}}}}},"post":{"tags":["v1 - Purchase Orders"],"summary":"Create purchase order","description":"Creates a new purchase order","operationId":"createPurchaseOrder","requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreatePurchaseOrderRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPurchaseOrderV1Model"}}}}}}},"/v1/purchase-orders/{purchaseOrderId}/lines":{"post":{"tags":["v1 - Purchase Orders"],"summary":"Create purchase order line","description":"Creates a new purchase order line item","operationId":"createPurchaseOrderLine","parameters":[{"name":"purchaseOrderId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreatePurchaseOrderLineRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPurchaseOrderLineV1Model"}}}}}}},"/v1/purchase-orders/{purchaseOrderId}":{"get":{"tags":["v1 - Purchase Orders"],"summary":"Get purchase order","description":"Returns a purchase order by ID","operationId":"getPurchaseOrder","parameters":[{"name":"purchaseOrderId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPurchaseOrderV1Model"}}}}}},"patch":{"tags":["v1 - Purchase Orders"],"summary":"Update purchase order","description":"Updates an existing purchase order","operationId":"updatePurchaseOrder","parameters":[{"name":"purchaseOrderId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUpdatePurchaseOrderRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPurchaseOrderV1Model"}}}}}}},"/v1/purchase-orders/{purchaseOrderId}/activity-events":{"get":{"tags":["v1 - Purchase Orders"],"summary":"List purchase order activity events","description":"The purchase order's activity timeline, newest first: who did what to it, when, and which fields changed. Requires permission to view this purchase order. The `entityId` and `entityType` filters are fixed by the path here; passing them can only narrow the result.","operationId":"listPurchaseOrderActivityEvents","parameters":[{"name":"purchaseOrderId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `action`, `actorId`, `correlationId`, `createdAt`, `entityId`, `entityType`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"minimum":1,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalActivityEventV1Model"}}}}}}},"/v1/purchase-orders/{purchaseOrderId}/lock":{"post":{"tags":["v1 - Purchase Orders"],"summary":"Lock purchase order","description":"Locks a purchase order to prevent modifications","operationId":"locksPurchaseOrder","parameters":[{"name":"purchaseOrderId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPurchaseOrderV1Model"}}}}}}},"/v1/purchase-orders/{purchaseOrderId}/lines/{lineId}":{"delete":{"tags":["v1 - Purchase Orders"],"summary":"Delete purchase order line","description":"Deletes a purchase order line item","operationId":"deletePurchaseOrderLine","parameters":[{"name":"purchaseOrderId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"lineId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}},"patch":{"tags":["v1 - Purchase Orders"],"summary":"Update purchase order line","description":"Updates a purchase order line item","operationId":"updatePurchaseOrderLine","parameters":[{"name":"purchaseOrderId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"lineId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUpdatePurchaseOrderLineRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPurchaseOrderLineV1Model"}}}}}}},"/v1/purchase-orders/{purchaseOrderId}/reset":{"post":{"tags":["v1 - Purchase Orders"],"summary":"Reset purchase order","description":"Resets a purchase order to its initial state","operationId":"resetPurchaseOrder","parameters":[{"name":"purchaseOrderId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPurchaseOrderV1Model"}}}}}}},"/v1/reimbursement-categories":{"get":{"tags":["v1 - Reimbursement categories"],"summary":"List reimbursement categories","description":"Returns a paginated list of the company's reimbursement categories. Every expense line needs one: the category decides the GL account and tax code its reimbursement books to.","operationId":"listReimbursementCategories","parameters":[{"name":"entityIds","in":"query","description":"Restrict to categories available for these company entities","schema":{"uniqueItems":true,"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"sort","in":"query","schema":{"type":"string","description":"Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `createdAt`, `label`.","example":"amount:desc,createdAt:asc"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `label`, `status`, `id`, `createdAt`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"searchTerm","in":"query","description":"Matches against the category label","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalReimbursementCategoryV1Model"}}}}}}},"/v1/tax-codes/{id}":{"get":{"tags":["v1 - Tax codes"],"summary":"Get a tax code","description":"Returns a single tax code by ID, whatever its status or company entity assignments.","operationId":"getTaxCode","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalTaxCodeV1Model"}}}}}}},"/v1/tax-codes":{"get":{"tags":["v1 - Tax codes"],"summary":"List tax codes","description":"Returns a cursor-paginated list of the company's tax codes, the ones documents reference as `taxCodeId`. Only active tax codes are returned unless the request filters on `status`. With a filter on `id`, a tax code assigned to a company entity only inactively is returned as well.","operationId":"listTaxCodes","parameters":[{"name":"sort","in":"query","schema":{"type":"string","description":"Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `code`, `context`, `type`, `rate`, `country`, `status`, `createdAt`.","example":"amount:desc,createdAt:asc"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `id`, `companyEntityId`, `code`, `sourceType`, `status`, `type`, `createdAt`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"searchTerm","in":"query","description":"Matches against the tax code's code or name","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"type":"integer","format":"int32"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nOmit it, or provide `0`, for the initial request.\nFor subsequent requests, use `nextCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.\nThis endpoint paginates by cursor only and has no `offset` parameter.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCursorPaginatedResponseV1ModelExternalTaxCodeV1Model"}}}}}}},"/v1/user-comments":{"get":{"tags":["v1 - User Comments"],"summary":"List user comments","description":"List user comments for a given resource","operationId":"listUserComments","parameters":[{"name":"resourceId","in":"query","description":"ID of the resource this comment is attached to (e.g. vendor, customer, etc.).","schema":{"type":"string","format":"uuid"}},{"name":"sort","in":"query","schema":{"type":"string","description":"Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `createdAt`.","example":"amount:desc,createdAt:asc"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `createdBy`, `createdAt`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalUserCommentV1Model"}}}}}},"post":{"tags":["v1 - User Comments"],"summary":"Create user comment","description":"Creates a new user comment","operationId":"createUserComment","requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreateUserCommentRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUserCommentV1Model"}}}}}}},"/v1/user-comments/{userCommentId}":{"delete":{"tags":["v1 - User Comments"],"summary":"Delete user comment","description":"Deletes the given user comment","operationId":"deleteUserComment","parameters":[{"name":"userCommentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}},"patch":{"tags":["v1 - User Comments"],"summary":"Update user comment","description":"Updates the given user comment","operationId":"updateUserComment","parameters":[{"name":"userCommentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUpdateUserCommentRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUserCommentV1Model"}}}}}}},"/v1/user-groups/{userGroupId}/users":{"post":{"tags":["v1 - User Groups"],"summary":"Add users to group","description":"Adds users to a user group","operationId":"addUsersToGroup","parameters":[{"name":"userGroupId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalAddUsersToGroupRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}}},"/v1/user-groups/{userGroupId}/users/{userId}":{"delete":{"tags":["v1 - User Groups"],"summary":"Remove user from group","description":"Removes a user from a user group","operationId":"removeUserFromGroup","parameters":[{"name":"userGroupId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}}},"/v1/users":{"get":{"tags":["v1 - Users"],"summary":"List users","description":"Returns a paginated list of users","operationId":"listUsers","parameters":[{"name":"sort","in":"query","schema":{"type":"string","description":"Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `firstName`, `lastName`, `status`, `createdAt`, `updatedAt`.","example":"amount:desc,createdAt:asc"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `id`, `userGroupId`, `companyEntityId`, `status`, `email`, `createdAt`, `updatedAt`, `role`, `assignedRole`, `accessibleCompanyEntityId`.\n\nThese fields accept only a subset of the operators: `accessibleCompanyEntityId` (`eq`, `in`).","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","schema":{"maximum":200,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}},{"name":"includeRoles","in":"query","description":"Include each user's roles. When not set, `roles` is omitted from the response.","schema":{"type":"boolean"}},{"name":"includeGroups","in":"query","description":"Include each user's groups. When not set, `groups` is omitted from the response.","schema":{"type":"boolean"}},{"name":"includeManagers","in":"query","description":"Include each user's manager ids. When not set, `managerIds` is omitted from the response.","schema":{"type":"boolean"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalUserV1Model"}}}}}},"post":{"tags":["v1 - Users"],"summary":"Create user","description":"Creates a new user","operationId":"createUser","requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreateUserRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUserV1Model"}}}}}}},"/v1/users/{userId}/reimbursements/latest":{"get":{"tags":["v1 - Users"],"summary":"Get latest reimbursement","description":"Returns the most recent reimbursement for a user","operationId":"getLatestReimbursement","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalReimbursementV1Model"}}}}}}},"/v1/users/{userId}":{"get":{"tags":["v1 - Users"],"summary":"Get user","description":"Returns a user with assigned roles, groups, and manager IDs. Light-staff roles are excluded.","operationId":"getUser","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUserV1Model"}}}}}},"patch":{"tags":["v1 - Users"],"summary":"Update user","description":"Updates the given user","operationId":"updateUser","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUpdateUserRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUserV1Model"}}}}}}},"/v1/users/{userId}/reimbursement-config":{"get":{"tags":["v1 - Users"],"summary":"Get reimbursement config","description":"Returns the reimbursement configuration for a user","operationId":"getUserReimbursementConfig","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUserReimbursementConfigV1Model"}}}}}},"put":{"tags":["v1 - Users"],"summary":"Update reimbursement config","description":"Creates or updates the reimbursement configuration for a user","operationId":"upsertUserReimbursementConfig","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUpsertUserReimbursementConfigRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUserReimbursementConfigV1Model"}}}}}}},"/v1/users/{userId}/managers":{"put":{"tags":["v1 - Users"],"summary":"Update user managers","description":"Updates the given user's managers","operationId":"updateUserManagers","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUpdateUserManagersRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUserV1Model"}}}}}}},"/v1/users/{userId}/roles":{"put":{"tags":["v1 - Users"],"summary":"Update user roles","description":"Replaces the given user's roles. Requires the COMPANY_ADMIN role. When sendWelcomeEmail is omitted, the company's welcome-email setting is used. An email is only sent when the roles change.","operationId":"updateUserRoles","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUpdateUserRolesRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUserV1Model"}}}}}}},"/v1/users/{userId}/status":{"put":{"tags":["v1 - Users"],"summary":"Update user status","description":"Updates the given user's status","operationId":"updateUserStatus","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUpdateUserStatusRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUserV1Model"}}}}}}},"/v1/vendors":{"get":{"tags":["v1 - Vendors"],"summary":"List vendors","description":"Returns a paginated list of vendors","operationId":"listVendors","parameters":[{"name":"sort","in":"query","schema":{"type":"string","description":"Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `name`, `spendLastMtd`, `createdAt`, `updatedAt`.","example":"amount:desc,createdAt:asc"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `id`, `status`, `type`, `ledgerAccountId`, `ledgerTaxId`, `spendLastMtd`, `createdAt`, `updatedAt`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"searchTerm","in":"query","description":"Search term to filter results by. Performs a case-insensitive partial match across searchable fields.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalVendorV1Model"}}}}}},"post":{"tags":["v1 - Vendors"],"summary":"Create vendor","description":"Creates a new vendor","operationId":"createVendor","requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalCreateVendorRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalVendorV1Model"}}}}}}},"/v1/vendors/{vendorId}":{"get":{"tags":["v1 - Vendors"],"summary":"Get vendor","description":"Returns a vendor by ID","operationId":"getVendor","parameters":[{"name":"vendorId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalVendorV1Model"}}}}}},"put":{"tags":["v1 - Vendors"],"summary":"Update vendor","description":"Updates an existing vendor, replacing every field. Deprecated, use PATCH to update only the fields you send.","operationId":"updateVendor","parameters":[{"name":"vendorId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalUpdateVendorRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalVendorV1Model"}}}}},"deprecated":true},"patch":{"tags":["v1 - Vendors"],"summary":"Patch vendor","description":"Updates only the fields present in the request. Send a field as null to clear it.","operationId":"patchVendor","parameters":[{"name":"vendorId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPatchVendorRequestV1Model"}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalVendorV1Model"}}}}}}},"/v1/vendors/{vendorId}/activity-events":{"get":{"tags":["v1 - Vendors"],"summary":"List vendor activity events","description":"The vendor's activity timeline, newest first: who did what to it, when, and which fields changed. Requires permission to view this vendor. The `entityId` and `entityType` filters are fixed by the path here; passing them can only narrow the result.","operationId":"listVendorActivityEvents","parameters":[{"name":"vendorId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"filter","in":"query","schema":{"type":"string","description":"Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `action`, `actorId`, `correlationId`, `createdAt`, `entityId`, `entityType`.","example":"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"}},{"name":"limit","in":"query","description":"Maximum number of items to return. Default is 50, maximum is 200.","schema":{"maximum":200,"minimum":1,"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.","deprecated":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"The cursor position to start returning results from.\nTo opt-in into cursor-based pagination, provide `0` for the initial request.\nFor subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.\nCursor values are opaque and should not be constructed manually.","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ExternalPaginatedResponseV1ModelExternalActivityEventV1Model"}}}}}}},"/v1/vendors/{vendorId}/trigger-onboarding":{"post":{"tags":["v1 - Vendors"],"summary":"Trigger vendor onboarding","description":"Resends the self-service onboarding magic-link email for a vendor that already has an onboarding form","operationId":"triggerVendorOnboarding","parameters":[{"name":"vendorId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}}}},"components":{"schemas":{"Address":{"type":"object","properties":{"country":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["AC","AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BU","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CR","CS","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","FX","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NT","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SF","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SU","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","UK","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XI","XU","XK","YE","YT","YU","ZA","ZM","ZR","ZW"]},"city":{"type":"string"},"state":{"type":"string"},"zipcode":{"type":"string"},"street":{"type":"string"},"street2":{"type":"string"}}},"LocalDateParam":{"type":"object"},"PhoneNumber":{"type":"object","properties":{"countryCode":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["AC","AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BU","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CR","CS","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","FX","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NT","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SF","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SU","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","UK","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XI","XU","XK","YE","YT","YU","ZA","ZM","ZR","ZW"]},"localNumber":{"type":"string"}}},"ExternalOauthToken":{"type":"object","properties":{"access_token":{"type":"string"},"expires_in":{"type":"integer","format":"int64"},"token_type":{"type":"string"},"refresh_token":{"type":"string"}}},"DirectedAmount":{"type":"object","properties":{"amount":{"type":"integer","format":"int64"},"dcSign":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["D","C"]}}},"ExternalAccountingDocumentWithAmountV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"companyId":{"type":"string","format":"uuid"},"companyEntityId":{"type":"string","format":"uuid","nullable":true},"documentSequenceId":{"type":"string","nullable":true},"documentNumber":{"type":"string","nullable":true},"documentType":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["AP","AR","BP","CC","CN","CT","DE","FX","JE","YC"]},"status":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["DRAFT","APPROVAL_PENDING","APPROVED","POSTED","PARTIALLY_CLEARED","CLEARED","ARCHIVED"]},"description":{"type":"string","nullable":true},"documentDate":{"type":"string","format":"date","nullable":true},"areLinesWithTax":{"type":"boolean"},"businessPartnerName":{"type":"string","nullable":true},"businessPartnerId":{"type":"string","format":"uuid","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"totalTransactionAmount":{"$ref":"#/components/schemas/DirectedAmount"},"totalTransactionAmountInMajors":{"type":"number","nullable":true},"currency":{"type":"string","nullable":true,"example":"USD"}},"description":"List of records for the current page"},"ExternalPaginatedResponseV1ModelExternalAccountingDocumentWithAmountV1Model":{"type":"object","properties":{"records":{"type":"array","description":"List of records for the current page","items":{"$ref":"#/components/schemas/ExternalAccountingDocumentWithAmountV1Model"}},"hasMore":{"type":"boolean","description":"Boolean flag indicating if there are more records available"},"total":{"type":"integer","description":"Total number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination.","format":"int64","nullable":true,"deprecated":true},"nextCursor":{"type":"string","description":"Cursor for fetching the next page (only for cursor pagination)","nullable":true},"prevCursor":{"type":"string","description":"Cursor for fetching the previous page (only for cursor pagination)","nullable":true}}},"ExternalAccountingReleaseTemplateV1Model":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the object","format":"uuid"},"companyId":{"type":"string","description":"ID of the company","format":"uuid"},"createdBy":{"type":"string","description":"ID of the user who created the template","format":"uuid"},"name":{"type":"string","description":"Name of the template"},"method":{"type":"string","description":"How the amount is spread across the release schedule\n\n- `STRAIGHT_LINE_WITH_PARTIAL_ADJUSTMENT` - An equal amount each period, with the first and last periods adjusted for partial months\n- `REDUCING_BALANCE` - A fixed fraction of the remaining balance each period, so the amount declines over time\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["STRAIGHT_LINE_WITH_PARTIAL_ADJUSTMENT","REDUCING_BALANCE"]},"type":{"type":"string","description":"The kind of document or asset this template applies to. Fixed at creation\n\n- `AR` - Accounts receivable. Releases deferred revenue on invoice receivables\n- `AP` - Accounts payable. Releases prepaid expenses on invoice payables, credit notes and card transactions\n- `JE` - Journal entries\n- `CONTRACT` - Contracts. Releases deferred revenue over the contract term\n- `FIXED_ASSET` - Fixed assets. Depreciates a capitalised asset over its useful life\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["AR","AP","JE","CONTRACT","FIXED_ASSET"]},"deferralAccountId":{"type":"string","description":"ID of the ledger account holding the not-yet-released balance. Fixed at creation","format":"uuid"},"contractAccountId":{"type":"string","description":"ID of the ledger account used when the template is applied to a contract. Fixed at creation","format":"uuid","nullable":true},"additionsAccountId":{"type":"string","description":"ID of the ledger account credited or debited by each generated release. Falls back to the deferral account when not set. Fixed at creation","format":"uuid","nullable":true},"disposalAccountId":{"type":"string","description":"ID of the ledger account used when a fixed asset is disposed of. Fixed at creation","format":"uuid","nullable":true},"profitAccountId":{"type":"string","description":"ID of the ledger account for a gain on disposal. Fixed at creation","format":"uuid","nullable":true},"lossAccountId":{"type":"string","description":"ID of the ledger account for a loss on disposal. Fixed at creation","format":"uuid","nullable":true},"initialAmountPercentage":{"type":"number","description":"Fraction of the amount released in the first period, as a decimal between 0 and 1","nullable":true},"residualAmountPercentage":{"type":"number","description":"Fraction of the amount left unreleased at the end of the schedule, as a decimal between 0 and 1","nullable":true},"residualAmount":{"type":"integer","description":"Absolute amount in cents left unreleased at the end of the schedule. Only for the `REDUCING_BALANCE` method, and mutually exclusive with `reducingRate`","format":"int64","nullable":true},"reducingRate":{"type":"number","description":"Fraction of the remaining balance released each period, as a decimal between 0 and 1. Only for the `REDUCING_BALANCE` method, and mutually exclusive with `residualAmount`","nullable":true},"accumulatePastReleasesEnabled":{"type":"boolean","description":"Legacy representation of accumulationMode. True only for POSTING_DATE; false for OFF and OPEN_PERIOD. Read accumulationMode to distinguish all modes","deprecated":true},"accumulationMode":{"type":"string","description":"OFF keeps every scheduled release on its original date. POSTING_DATE combines releases dated before the document posting date with the first scheduled release on or after that date; if none remains, it uses the document posting date. OPEN_PERIOD finds the first postable date from the schedule start and combines earlier releases with the first scheduled release on or after that date; if none remains, it uses the first postable date. It applies only when the schedule starts before the document posting date. Later closed or locked periods still block posting. The document posting date stays unchanged.\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["OFF","OPEN_PERIOD","POSTING_DATE"]},"defaultDuration":{"type":"integer","description":"Default number of months the release schedule runs for. Can be overridden per document","format":"int32","nullable":true},"context":{"type":"string","description":"Free-text notes on the template","nullable":true},"status":{"type":"string","description":"Template status\n\n- `ACTIVE` - The template can be assigned to new documents and contracts\n- `ARCHIVED` - The template is archived and can no longer be assigned. Existing releases are unaffected\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["ACTIVE","ARCHIVED"]},"createdAt":{"type":"string","description":"Timestamp when the template was created","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the template was last updated","format":"date-time"}}},"ExternalCreateAccountingReleaseTemplateRequestV1Model":{"type":"object","properties":{"name":{"type":"string","description":"Name of the template"},"method":{"type":"string","description":"How the amount is spread across the release schedule\n\n- `STRAIGHT_LINE_WITH_PARTIAL_ADJUSTMENT` - An equal amount each period, with the first and last periods adjusted for partial months\n- `REDUCING_BALANCE` - A fixed fraction of the remaining balance each period, so the amount declines over time\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["STRAIGHT_LINE_WITH_PARTIAL_ADJUSTMENT","REDUCING_BALANCE"]},"type":{"type":"string","description":"The kind of document or asset this template applies to. Cannot be changed after creation\n\n- `AR` - Accounts receivable. Releases deferred revenue on invoice receivables\n- `AP` - Accounts payable. Releases prepaid expenses on invoice payables, credit notes and card transactions\n- `JE` - Journal entries\n- `CONTRACT` - Contracts. Releases deferred revenue over the contract term\n- `FIXED_ASSET` - Fixed assets. Depreciates a capitalised asset over its useful life\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["AR","AP","JE","CONTRACT","FIXED_ASSET"]},"deferralAccountId":{"type":"string","description":"ID of the ledger account holding the not-yet-released balance. Cannot be changed after creation","format":"uuid"},"contractAccountId":{"type":"string","description":"ID of the ledger account used when the template is applied to a contract. Cannot be changed after creation","format":"uuid","nullable":true},"additionsAccountId":{"type":"string","description":"ID of the ledger account credited or debited by each generated release. Defaults to the deferral account. Cannot be changed after creation","format":"uuid","nullable":true},"disposalAccountId":{"type":"string","description":"ID of the ledger account used when a fixed asset is disposed of. Cannot be changed after creation","format":"uuid","nullable":true},"profitAccountId":{"type":"string","description":"ID of the ledger account for a gain on disposal. Cannot be changed after creation","format":"uuid","nullable":true},"lossAccountId":{"type":"string","description":"ID of the ledger account for a loss on disposal. Cannot be changed after creation","format":"uuid","nullable":true},"initialAmountPercentage":{"type":"number","description":"Fraction of the amount released in the first period, as a decimal between 0 and 1","nullable":true},"residualAmountPercentage":{"type":"number","description":"Fraction of the amount left unreleased at the end of the schedule, as a decimal between 0 and 1","nullable":true},"residualAmount":{"type":"integer","description":"Absolute amount in cents left unreleased at the end of the schedule. Only for the `REDUCING_BALANCE` method, and mutually exclusive with `reducingRate`","format":"int64","nullable":true},"reducingRate":{"type":"number","description":"Fraction of the remaining balance released each period, as a decimal between 0 and 1. Only for the `REDUCING_BALANCE` method, and mutually exclusive with `residualAmount`","nullable":true},"accumulatePastReleasesEnabled":{"type":"boolean","description":"Legacy alternative to accumulationMode. When sent alone, true selects POSTING_DATE and false selects OFF. Prefer sending accumulationMode alone. When both fields are sent, this must equal whether accumulationMode is POSTING_DATE","nullable":true,"deprecated":true},"accumulationMode":{"type":"string","description":"OFF keeps every scheduled release on its original date. POSTING_DATE combines releases dated before the document posting date with the first scheduled release on or after that date; if none remains, it uses the document posting date. OPEN_PERIOD finds the first postable date from the schedule start and combines earlier releases with the first scheduled release on or after that date; if none remains, it uses the first postable date. It applies only when the schedule starts before the document posting date. Later closed or locked periods still block posting. The document posting date stays unchanged. Omit to use the legacy boolean, or OFF when both fields are omitted\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["OFF","OPEN_PERIOD","POSTING_DATE"]},"defaultDuration":{"type":"integer","description":"Default number of months the release schedule runs for. Can be overridden per document","format":"int32","nullable":true},"context":{"type":"string","description":"Free-text notes on the template","nullable":true}}},"ExternalPaginatedResponseV1ModelExternalAccountingReleaseTemplateV1Model":{"type":"object","properties":{"records":{"type":"array","description":"List of records for the current page","items":{"$ref":"#/components/schemas/ExternalAccountingReleaseTemplateV1Model"}},"hasMore":{"type":"boolean","description":"Boolean flag indicating if there are more records available"},"total":{"type":"integer","description":"Total number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination.","format":"int64","nullable":true,"deprecated":true},"nextCursor":{"type":"string","description":"Cursor for fetching the next page (only for cursor pagination)","nullable":true},"prevCursor":{"type":"string","description":"Cursor for fetching the previous page (only for cursor pagination)","nullable":true}}},"ExternalUpdateAccountingReleaseTemplateRequestV1Model":{"type":"object","properties":{"name":{"type":"string","description":"Name of the template","nullable":true},"method":{"type":"string","description":"How the amount is spread across the release schedule\n\n- `STRAIGHT_LINE_WITH_PARTIAL_ADJUSTMENT` - An equal amount each period, with the first and last periods adjusted for partial months\n- `REDUCING_BALANCE` - A fixed fraction of the remaining balance each period, so the amount declines over time\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["STRAIGHT_LINE_WITH_PARTIAL_ADJUSTMENT","REDUCING_BALANCE"]},"accumulatePastReleasesEnabled":{"type":"boolean","description":"Legacy alternative to accumulationMode. When sent alone, true selects POSTING_DATE and false selects OFF. Prefer sending accumulationMode alone. When both fields are sent, this must equal whether accumulationMode is POSTING_DATE","nullable":true,"deprecated":true},"accumulationMode":{"type":"string","description":"OFF keeps every scheduled release on its original date. POSTING_DATE combines releases dated before the document posting date with the first scheduled release on or after that date; if none remains, it uses the document posting date. OPEN_PERIOD finds the first postable date from the schedule start and combines earlier releases with the first scheduled release on or after that date; if none remains, it uses the first postable date. It applies only when the schedule starts before the document posting date. Later closed or locked periods still block posting. The document posting date stays unchanged. Omit both this field and accumulatePastReleasesEnabled to preserve the current mode\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["OFF","OPEN_PERIOD","POSTING_DATE"]},"defaultDuration":{"type":"integer","description":"Default number of months the release schedule runs for. Send `null` to clear it","format":"int32","nullable":true},"initialAmountPercentage":{"type":"number","description":"Fraction of the amount released in the first period, as a decimal between 0 and 1. Send `null` to clear it","nullable":true},"residualAmountPercentage":{"type":"number","description":"Fraction of the amount left unreleased at the end of the schedule, as a decimal between 0 and 1. Send `null` to clear it","nullable":true},"residualAmount":{"type":"integer","description":"Absolute amount in cents left unreleased at the end of the schedule. Send `null` to clear it","format":"int64","nullable":true},"reducingRate":{"type":"number","description":"Fraction of the remaining balance released each period, as a decimal between 0 and 1. Send `null` to clear it","nullable":true},"context":{"type":"string","description":"Free-text notes on the template. Send `null` to clear it","nullable":true}},"description":"Only the fields present in the request body are changed. The ledger accounts and `type` are fixed at creation and cannot be updated"},"ExternalActivityActorV1Model":{"type":"object","properties":{"id":{"type":"string","description":"ID of the principal that acted","format":"uuid"},"type":{"type":"string","description":"Kind of principal that acted\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["AI_AGENT","INTEGRATION","LIGHT_TEAM","SYSTEM","USER"]},"name":{"type":"string","description":"Display name of the actor"},"roles":{"uniqueItems":true,"type":"array","description":"Roles the actor held when the event was recorded, without Light-internal roles. Null for events recorded before roles were captured.","nullable":true,"items":{"type":"string","description":"Roles the actor held when the event was recorded, without Light-internal roles. Null for events recorded before roles were captured.\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["REIMBURSEMENT","CARDHOLDER","CONTROLLER","COMPANY_ADMIN","VENDOR_MANAGEMENT","INVOICE_APPROVER","AP_PREPARATION","AP_CLERK","AR_CLERK","PURCHASE_REQUESTER","REPORT_VIEWER","AUDITOR"]}}},"description":"Who did it"},"ExternalActivityAppV1Model":{"type":"object","properties":{"slug":{"type":"string","description":"Slug of the app, e.g. german-mileage, or the id of an app the company built outside Light"}},"description":"The app the actor made the change through. Null unless an app made the change.","nullable":true},"ExternalActivityDateValueV1Model":{"type":"object","allOf":[{"$ref":"#/components/schemas/ExternalRenderedActivityValueV1Model"},{"type":"object","properties":{"value":{"type":"string","format":"date"}}}]},"ExternalActivityEnumValueV1Model":{"type":"object","allOf":[{"$ref":"#/components/schemas/ExternalRenderedActivityValueV1Model"},{"type":"object","properties":{"value":{"type":"string","description":"The constant as stored"},"label":{"type":"string","description":"Human-readable label of the constant"}}}]},"ExternalActivityEventChangeV1Model":{"type":"object","properties":{"objectType":{"type":"string","description":"Whether the changed field belongs to the record itself or to one of its lines\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["HEADER","LINE"]},"objectId":{"type":"string","description":"ID of the record or line the field belongs to","format":"uuid"},"objectPosition":{"type":"integer","description":"Position of the line within the record, for line fields","format":"int32","nullable":true},"field":{"type":"string","description":"Machine name of the changed field"},"fieldLabel":{"type":"string","description":"Human-readable label of the changed field"},"oldValue":{"$ref":"#/components/schemas/ExternalRenderedActivityValueV1Model"},"newValue":{"$ref":"#/components/schemas/ExternalRenderedActivityValueV1Model"}},"description":"Field changes recorded with the event, each with the value before and after"},"ExternalActivityEventFileV1Model":{"type":"object","properties":{"attachmentId":{"type":"string","description":"ID of the attachment, usable with the attachments API. Null on events recorded before the id was kept.","format":"uuid","nullable":true},"fileName":{"type":"string","description":"Name of the file"}},"description":"Files an ATTACH_FILE or ARCHIVE_FILE event is about. Left out for other actions.","nullable":true},"ExternalActivityEventV1Model":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the event","format":"uuid"},"entityType":{"type":"string","description":"Type of the record the event belongs to\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["ACCOUNTING_PERIOD","AI_AGENT","AI_ARTIFACT","API_KEY","ASSISTANT_INSTRUCTION","BANK_ACCOUNT","BANK_PAYMENT","CARD","CARD_INTENT","CARD_TRANSACTION","COMPANY","CONTRACT","CREDIT_NOTE","CUSTOMER","CUSTOMER_CREDIT","CUSTOM_PROPERTY_GROUP","DEFERRED_ENTRY","DOCUMENT_TEMPLATE","FX_REVALUATION","HUBSPOT_CONNECTION","INTERCOMPANY_JOURNAL_ENTRY","INVOICE_PAYABLE","INVOICE_RECEIVABLE","JOURNAL_ENTRY","LCI_MEMORY","LEDGER_ACCOUNT","LEDGER_TAX","PRODUCT","PURCHASE_ORDER","PURCHASE_REQUEST","SALESFORCE_CONNECTION","SKILL","USER","USER_REIMBURSEMENT_CONFIG","VENDOR","WORKFLOW","YEAR_CLOSING_ENTRY"]},"entityId":{"type":"string","description":"ID of the record the event belongs to","format":"uuid"},"action":{"type":"string","description":"What was done to the record\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["ACTIVATE","ADD_TO_PAYMENT_BATCH","AGENT_REVIEW","APPLY_CREDIT_NOTE","APPLY_CUSTOMER_CREDIT","APPROVE","APPROVE_PAYMENT","ARCHIVE","ARCHIVE_FILE","ATTACH_FILE","CANCEL","CANCEL_TERMINATION","CLEAR","CLOSE","COMPLETE_TASK","CONFIRM_GOODS_RECEIPT","CREATE","DECLINE_APPROVAL","DECLINE_PAYMENT","DELETE","FAIL","FLAG_GOODS_RECEIPT_ISSUE","INITIATE_PAYMENT","LINK_INTERCOMPANY_DOCUMENT","LOCK","MARK_AS_PAID","MARK_AS_PAID_IN_STRIPE","MARK_AS_PARTIALLY_PAID","MATCH_BILL","MATCH_PURCHASE_ORDER","OPEN","PARTIALLY_CLEAR","PAUSE_PAYMENT","PAY","POST","POST_ELIMINATION","PUBLISH","REASSIGN","RECONCILE","RELEASE_PAYMENT_HOLD","REMOVE_CREDIT_NOTE","REMOVE_CUSTOMER_CREDIT","RENEW","REOPEN_TASK","RESET","RESUME_PAYMENT","REVERSE_CLEARING","REVERT","SCHEDULE_TERMINATION","SEND_CUSTOMER_CREDIT","SEND_DUNNING_EMAIL","SEND_INVOICE","SEND_PURCHASE_ORDER","SUBMIT_FOR_APPROVAL","SUBMIT_SELF_BILLED_EINVOICE","TERMINATE","TRIGGER_SYNC","UNARCHIVE","UNMATCH_BILL","UNMATCH_PURCHASE_ORDER","UNRECONCILE","UPDATE"]},"actor":{"$ref":"#/components/schemas/ExternalActivityActorV1Model"},"app":{"$ref":"#/components/schemas/ExternalActivityAppV1Model"},"correlationId":{"type":"string","description":"ID of the operation this event belongs to, e.g. an approval run or an assistant tool call. Events sharing it were caused by that one operation.","format":"uuid","nullable":true},"createdAt":{"type":"string","description":"Timestamp when the event happened","format":"date-time"},"changes":{"type":"array","description":"Field changes recorded with the event, each with the value before and after","items":{"$ref":"#/components/schemas/ExternalActivityEventChangeV1Model"}},"files":{"type":"array","description":"Files an ATTACH_FILE or ARCHIVE_FILE event is about. Left out for other actions.","nullable":true,"items":{"$ref":"#/components/schemas/ExternalActivityEventFileV1Model"}}},"description":"List of records for the current page"},"ExternalActivityMoneyValueV1Model":{"type":"object","allOf":[{"$ref":"#/components/schemas/ExternalRenderedActivityValueV1Model"},{"type":"object","properties":{"amount":{"type":"number","description":"Amount in major units, e.g. 25.00. Without a currency the scale is unknown, so the raw minor units are given instead."},"dcSign":{"type":"string","description":"Debit/credit sign\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["D","C"]},"currency":{"type":"string","example":"USD"}}}]},"ExternalActivityReferenceListItemV1Model":{"type":"object","properties":{"id":{"type":"string","description":"ID of the referenced record","format":"uuid"},"label":{"type":"string","description":"Display name of the referenced record"}}},"ExternalActivityReferenceListValueV1Model":{"type":"object","allOf":[{"$ref":"#/components/schemas/ExternalRenderedActivityValueV1Model"},{"type":"object","properties":{"referenceType":{"type":"string","description":"Type of record the references point to\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["ACCOUNTING_DOCUMENT","ACCOUNTING_RELEASE_TEMPLATE","ACCOUNTING_YEAR","BANK_ACCOUNT","BUSINESS_PARTNER","CARD","CARD_BALANCE_ACCOUNT","COMPANY_ENTITY","COST_CENTER","CUSTOMER","CUSTOM_PROPERTY_GROUP","CUSTOM_PROPERTY_VALUE","DOCUMENT_TEMPLATE","LEDGER_ACCOUNT","LEDGER_TAX","PRINCIPAL","PRODUCT","PURCHASE_ORDER","USER_GROUP"]},"values":{"type":"array","items":{"$ref":"#/components/schemas/ExternalActivityReferenceListItemV1Model"}}}}]},"ExternalActivityReferenceValueV1Model":{"type":"object","allOf":[{"$ref":"#/components/schemas/ExternalRenderedActivityValueV1Model"},{"type":"object","properties":{"referenceType":{"type":"string","description":"Type of record the reference points to\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["ACCOUNTING_DOCUMENT","ACCOUNTING_RELEASE_TEMPLATE","ACCOUNTING_YEAR","BANK_ACCOUNT","BUSINESS_PARTNER","CARD","CARD_BALANCE_ACCOUNT","COMPANY_ENTITY","COST_CENTER","CUSTOMER","CUSTOM_PROPERTY_GROUP","CUSTOM_PROPERTY_VALUE","DOCUMENT_TEMPLATE","LEDGER_ACCOUNT","LEDGER_TAX","PRINCIPAL","PRODUCT","PURCHASE_ORDER","USER_GROUP"]},"id":{"type":"string","description":"ID of the referenced record","format":"uuid"},"label":{"type":"string","description":"Display name of the referenced record"}}}]},"ExternalActivityTextValueV1Model":{"type":"object","allOf":[{"$ref":"#/components/schemas/ExternalRenderedActivityValueV1Model"},{"type":"object","properties":{"value":{"type":"string"}}}]},"ExternalCursorPaginatedResponseV1ModelExternalActivityEventV1Model":{"type":"object","properties":{"records":{"type":"array","description":"List of records for the current page","items":{"$ref":"#/components/schemas/ExternalActivityEventV1Model"}},"hasMore":{"type":"boolean","description":"Boolean flag indicating if there are more records available"},"nextCursor":{"type":"string","description":"Cursor for fetching the next page","nullable":true},"prevCursor":{"type":"string","description":"Cursor for fetching the previous page","nullable":true}}},"ExternalRenderedActivityValueV1Model":{"required":["type"],"type":"object","properties":{"type":{"type":"string"}},"description":"A field value, discriminated by `type`: TEXT, DATE, ENUM, MONEY, REFERENCE or REFERENCE_LIST","nullable":true,"discriminator":{"propertyName":"type","mapping":{"TEXT":"#/components/schemas/ExternalActivityTextValueV1Model","DATE":"#/components/schemas/ExternalActivityDateValueV1Model","ENUM":"#/components/schemas/ExternalActivityEnumValueV1Model","MONEY":"#/components/schemas/ExternalActivityMoneyValueV1Model","REFERENCE":"#/components/schemas/ExternalActivityReferenceValueV1Model","REFERENCE_LIST":"#/components/schemas/ExternalActivityReferenceListValueV1Model"}}},"ExternalAttachmentApMetadataV1Model":{"type":"object","allOf":[{"$ref":"#/components/schemas/ExternalAttachmentMetadataV1Model"},{"type":"object","properties":{"shouldAttachToEmail":{"type":"boolean"}}}]},"ExternalAttachmentArMetadataV1Model":{"type":"object","allOf":[{"$ref":"#/components/schemas/ExternalAttachmentMetadataV1Model"},{"type":"object","properties":{"shouldAttachToEmail":{"type":"boolean"}}}]},"ExternalAttachmentMetadataV1Model":{"type":"object","properties":{"type":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["AP","AR"]}},"discriminator":{"propertyName":"type"}},"ExternalAttachmentV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"companyId":{"type":"string","format":"uuid"},"resourceId":{"type":"string","format":"uuid"},"documentKey":{"type":"string"},"fileName":{"type":"string"},"contentType":{"type":"string"},"createdBy":{"type":"string","format":"uuid"},"metadata":{"$ref":"#/components/schemas/ExternalAttachmentMetadataV1Model"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"status":{"type":"string","description":"ARCHIVED once the attachment was archived. Who archived it and when is on the record's activity log.\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["ACTIVE","ARCHIVED"]}}},"ExternalCreateAttachmentRequestV1Model":{"type":"object","properties":{"resourceId":{"type":"string","format":"uuid"},"documentKey":{"type":"string"},"fileName":{"type":"string"},"contentType":{"type":"string"},"metadata":{"$ref":"#/components/schemas/ExternalAttachmentMetadataV1Model"}}},"ExternalAttachmentUploadUrlResponseV1Model":{"type":"object","properties":{"uploadUrl":{"type":"string","format":"url"},"key":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"nullable":true}}},"ExternalUploadAttachmentRequestV1Model":{"type":"object","properties":{"resourceId":{"type":"string","format":"uuid"},"fileName":{"type":"string"},"contentType":{"type":"string"}}},"LightPrincipal":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"string"}},"name":{"type":"string"}}},"ExternalBankAccountV1Model":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the bank account object","format":"uuid"},"companyId":{"type":"string","description":"ID of the company","format":"uuid"},"companyEntityId":{"type":"string","description":"ID of the entity","format":"uuid"},"name":{"type":"string","description":"Bank account display name"},"type":{"type":"string","description":"Type of the bank account (physical or virtual)\n\n- `PHYSICAL` - A physical bank account\n- `VIRTUAL` - A virtual bank account\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["PHYSICAL","VIRTUAL"]},"bankProvider":{"type":"string","description":"Bank provider\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["ABANCA","ABN_AMRO","AGRICULTURAL_BANK_OF_CHINA","AIRWALLEX","AKTIA_BANK","ALANDS_BANKEN","ANZ_GROUP","ARBEJDERNES_LANDSBANK","ARION_BANK","BANCA_MARCH","BANCA_NAZIONALE_DEL_LAVORO","BANCO_BPM","BANCO_BRADESCO","BANCO_DO_BRASIL","BANCO_SABADELL","BANCO_SANTANDER","BANK_NORWEGIAN","BANK_OF_AMERICA","BANK_OF_BEIJING","BANK_OF_CHINA","BANK_OF_COMMUNICATIONS","BANK_OF_JIANGSU","BANK_OF_MONTREAL","BANK_OF_NINGBO","BANK_OF_SHANGHAI","BANK2","BANKINTER","BANQUE_PALATINE","BARCLAYS","BAYERNLB","BBVA","BCC_MILANO","BN_BANK","BNP_PARIBAS","BNY_MELLON","BOURSORAMA","CAIXA_ECONOMICA_FEDERAL","CAIXABANK","CANADIAN_IMPERIAL_BANK_OF_COMMERCE","CAPITAL_ONE","CHARLES_SCHWAB","CHINA_CITIC_BANK","CHINA_CONSTRUCTION_BANK","CHINA_EVERBRIGHT_BANK","CHINA_GUANGFA_BANK","CHINA_MERCHANTS_BANK","CHINA_MINSHENG_BANK","CHINA_ZHESHANG_BANK","CITIGROUP","COMMERZBANK","COMMONWEALTH_BANK","CREDIT_AGRICOLE","CREDIT_DU_NORD","CREDIT_MUTUEL","CULTURA_SPAREBANK","DANSKE_BANK","DBS_GROUP","DEUTSCHE_BANK","DNB","DNB_BANK","DZ_BANK","ERSTE_GROUP","FELLOW_BANK","GOLDMAN_SACHS","GRASSHOPPER","GROUPE_BPCE","HANA_FINANCIAL","HANDELSBANKEN","HDFC_BANK","HELABA","HSBC","HSBC_FRANCE","HUAXIA_BANK","HYPO","IKANO_BANK","INDUSTRIAL_AND_COMMERCIAL_BANK_OF_CHINA","INDUSTRIAL_BANK","INDUSTRIAL_BANK_OF_KOREA","ING_DIBA","ING_GROUP","ING_SPAIN","INSTABANK","INTESA_SANPAOLO","ISLANDSBANKI","ITAU_UNIBANCO","JAPAN_POST_BANK","JPM_CHASE","JYSKE","KB_FINANCIAL_GROUP","KBC_GROUP","KFW_BANK","KUTXABANK","LA_BANQUE_POSTALE","LANDKREDITT_BANK","LANDESBANK_BADEN_WURTTEMBERG","LANDESBANK_BADEN_WURTTEMBERG_LBBW","LANDESBANK_BERLIN","LANDSBANKINN","LANSFORSAKRINGAR_BANK","LLOYDS_BANK","LLOYDS_BANKING_GROUP","MERCURY","MITSUBISHI_UFJ_FINANCIAL_GROUP","MIZUHO_FINANCIAL_GROUP","MONZO","MORGAN_STANLEY","NATIONAL_AUSTRALIA_BANK","NATIONAL_BANK_OF_CANADA","NATIONWIDE_BUILDING_SOCIETY","NATWEST","NATWEST_GROUP","NOMURA_HOLDINGS","NONGHYUP_BANK","NORDEA","NORDLB","NORINCHUKIN_BANK","NYKREDIT_BANK","OCBC","OP_BANK","OTHER","PARETO_BANK","PAYPAL","PING_AN_BANK","PNC_FINANCIAL_SERVICES","POP_PANKKI","POSTAL_SAVINGS_BANK_OF_CHINA","QATAR_NATIONAL_BANK","RABOBANK","RAIFFEISEN_GROUP","RESONA_HOLDINGS","REVOLUT","RINGKJOBING_LANDBOBANK","ROYAL_BANK_OF_CANADA","S_PANKKI","SANTANDER","SANTANDER_UK","SAXO_BANK","SBANKEN","SBERBANK_RUSSIA","SCOTIABANK","SEB","SHANGHAI_PUDONG_DEVELOPMENT_BANK","SHINHAN_FINANCIAL","SMBC_GROUP","SOCIETE_GENERALE","SPAR_NORD_BANK","STANDARD_CHARTERED","STARLING_BANK","STATE_BANK_OF_INDIA","STOREBRAND_BANK","STRIPE","SUMITOMO_MITSUI_TRUST","SVB","SVENSKA_HANDELSBANKEN","SWEDBANK","SYDBANK","TORONTO_DOMINION_BANK","TRUIST_FINANCIAL","TSB_BANK","UBS","UNICAJA_BANCO","UNICREDIT","UNICREDIT_BANK_HYPOVEREINSBANK","UNITED_OVERSEAS_BANK","US_BANCORP","VEKSELBANKEN","VIRGIN_MONEY","WELLS_FARGO","WESTPAC","WISE","WINTRUST_BANK","WOORI_FINANCIAL","YA_BANK","ZKB"]},"paymentSchedulingEligibility":{"type":"string","description":"Payment scheduling eligibility for this bank account\n\n- `INTERNAL` - Eligible for payment scheduling via Light internal capabilities\n- `BANK_PROVIDER` - Eligible for payment scheduling via the bank provider\n- `INELIGIBLE` - Not eligible for payment scheduling\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["INTERNAL","BANK_PROVIDER","INELIGIBLE"]},"iban":{"type":"string","description":"IBAN","nullable":true},"bic":{"type":"string","description":"BIC / SWIFT code","nullable":true},"domesticBankAccountNumber":{"type":"string","description":"Domestic bank account number","nullable":true},"domesticBankCode":{"type":"string","description":"Domestic bank code / routing code","nullable":true},"currency":{"type":"string","example":"USD"},"bankCountry":{"type":"string","description":"Bank country (ISO 3166-1 alpha-2)\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["AC","AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BU","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CR","CS","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","FX","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NT","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SF","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SU","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","UK","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XI","XU","XK","YE","YT","YU","ZA","ZM","ZR","ZW"]},"bankCity":{"type":"string","description":"Bank city","nullable":true},"bankAddress":{"type":"string","description":"Bank address","nullable":true},"bankZipcode":{"type":"string","description":"Bank ZIP / postal code","nullable":true},"bankName":{"type":"string","description":"Bank name"},"bankState":{"type":"string","description":"Bank state / region","nullable":true},"ledgerAccountCode":{"type":"integer","description":"Ledger account code linked to this bank account","format":"int32"},"createdAt":{"type":"string","description":"Timestamp when the bank account was created","format":"date-time"}}},"ExternalCreateBankAccountRequestV1Model":{"required":["bankCountry","bankProvider","companyEntityId","currency","ledgerAccount","name"],"type":"object","properties":{"companyEntityId":{"type":"string","description":"ID of the company entity this bank account belongs to.","format":"uuid"},"name":{"type":"string","description":"Bank account display name."},"bankProvider":{"type":"string","description":"Bank provider. Use OTHER if no specific provider applies.\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["ABANCA","ABN_AMRO","AGRICULTURAL_BANK_OF_CHINA","AIRWALLEX","AKTIA_BANK","ALANDS_BANKEN","ANZ_GROUP","ARBEJDERNES_LANDSBANK","ARION_BANK","BANCA_MARCH","BANCA_NAZIONALE_DEL_LAVORO","BANCO_BPM","BANCO_BRADESCO","BANCO_DO_BRASIL","BANCO_SABADELL","BANCO_SANTANDER","BANK_NORWEGIAN","BANK_OF_AMERICA","BANK_OF_BEIJING","BANK_OF_CHINA","BANK_OF_COMMUNICATIONS","BANK_OF_JIANGSU","BANK_OF_MONTREAL","BANK_OF_NINGBO","BANK_OF_SHANGHAI","BANK2","BANKINTER","BANQUE_PALATINE","BARCLAYS","BAYERNLB","BBVA","BCC_MILANO","BN_BANK","BNP_PARIBAS","BNY_MELLON","BOURSORAMA","CAIXA_ECONOMICA_FEDERAL","CAIXABANK","CANADIAN_IMPERIAL_BANK_OF_COMMERCE","CAPITAL_ONE","CHARLES_SCHWAB","CHINA_CITIC_BANK","CHINA_CONSTRUCTION_BANK","CHINA_EVERBRIGHT_BANK","CHINA_GUANGFA_BANK","CHINA_MERCHANTS_BANK","CHINA_MINSHENG_BANK","CHINA_ZHESHANG_BANK","CITIGROUP","COMMERZBANK","COMMONWEALTH_BANK","CREDIT_AGRICOLE","CREDIT_DU_NORD","CREDIT_MUTUEL","CULTURA_SPAREBANK","DANSKE_BANK","DBS_GROUP","DEUTSCHE_BANK","DNB","DNB_BANK","DZ_BANK","ERSTE_GROUP","FELLOW_BANK","GOLDMAN_SACHS","GRASSHOPPER","GROUPE_BPCE","HANA_FINANCIAL","HANDELSBANKEN","HDFC_BANK","HELABA","HSBC","HSBC_FRANCE","HUAXIA_BANK","HYPO","IKANO_BANK","INDUSTRIAL_AND_COMMERCIAL_BANK_OF_CHINA","INDUSTRIAL_BANK","INDUSTRIAL_BANK_OF_KOREA","ING_DIBA","ING_GROUP","ING_SPAIN","INSTABANK","INTESA_SANPAOLO","ISLANDSBANKI","ITAU_UNIBANCO","JAPAN_POST_BANK","JPM_CHASE","JYSKE","KB_FINANCIAL_GROUP","KBC_GROUP","KFW_BANK","KUTXABANK","LA_BANQUE_POSTALE","LANDKREDITT_BANK","LANDESBANK_BADEN_WURTTEMBERG","LANDESBANK_BADEN_WURTTEMBERG_LBBW","LANDESBANK_BERLIN","LANDSBANKINN","LANSFORSAKRINGAR_BANK","LLOYDS_BANK","LLOYDS_BANKING_GROUP","MERCURY","MITSUBISHI_UFJ_FINANCIAL_GROUP","MIZUHO_FINANCIAL_GROUP","MONZO","MORGAN_STANLEY","NATIONAL_AUSTRALIA_BANK","NATIONAL_BANK_OF_CANADA","NATIONWIDE_BUILDING_SOCIETY","NATWEST","NATWEST_GROUP","NOMURA_HOLDINGS","NONGHYUP_BANK","NORDEA","NORDLB","NORINCHUKIN_BANK","NYKREDIT_BANK","OCBC","OP_BANK","OTHER","PARETO_BANK","PAYPAL","PING_AN_BANK","PNC_FINANCIAL_SERVICES","POP_PANKKI","POSTAL_SAVINGS_BANK_OF_CHINA","QATAR_NATIONAL_BANK","RABOBANK","RAIFFEISEN_GROUP","RESONA_HOLDINGS","REVOLUT","RINGKJOBING_LANDBOBANK","ROYAL_BANK_OF_CANADA","S_PANKKI","SANTANDER","SANTANDER_UK","SAXO_BANK","SBANKEN","SBERBANK_RUSSIA","SCOTIABANK","SEB","SHANGHAI_PUDONG_DEVELOPMENT_BANK","SHINHAN_FINANCIAL","SMBC_GROUP","SOCIETE_GENERALE","SPAR_NORD_BANK","STANDARD_CHARTERED","STARLING_BANK","STATE_BANK_OF_INDIA","STOREBRAND_BANK","STRIPE","SUMITOMO_MITSUI_TRUST","SVB","SVENSKA_HANDELSBANKEN","SWEDBANK","SYDBANK","TORONTO_DOMINION_BANK","TRUIST_FINANCIAL","TSB_BANK","UBS","UNICAJA_BANCO","UNICREDIT","UNICREDIT_BANK_HYPOVEREINSBANK","UNITED_OVERSEAS_BANK","US_BANCORP","VEKSELBANKEN","VIRGIN_MONEY","WELLS_FARGO","WESTPAC","WISE","WINTRUST_BANK","WOORI_FINANCIAL","YA_BANK","ZKB"]},"currency":{"type":"string","example":"USD"},"bankCountry":{"type":"string","description":"Bank country (ISO 3166-1 alpha-2).\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["AC","AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BU","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CR","CS","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","FX","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NT","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SF","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SU","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","UK","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XI","XU","XK","YE","YT","YU","ZA","ZM","ZR","ZW"]},"ledgerAccount":{"$ref":"#/components/schemas/ExternalCreateBankLedgerAccountRequestV1Model"},"iban":{"type":"string","description":"IBAN. Required (with BIC) for IBAN countries.","nullable":true},"bic":{"type":"string","description":"BIC / SWIFT code. Required (with IBAN) for IBAN countries.","nullable":true},"domesticBankAccountNumber":{"type":"string","description":"Domestic bank account number. Used for non-IBAN countries; must be paired with domesticBankCode.","nullable":true},"domesticBankCode":{"type":"string","description":"Domestic bank code (e.g. routing/sort code). Must be paired with domesticBankAccountNumber.","nullable":true},"bankName":{"type":"string","description":"Bank name.","nullable":true},"bankCity":{"type":"string","description":"Bank city.","nullable":true},"bankAddress":{"type":"string","description":"Bank street address.","nullable":true},"bankZipcode":{"type":"string","description":"Bank ZIP / postal code.","nullable":true},"bankState":{"type":"string","description":"Bank state / region.","nullable":true},"defaultChargeBearerCode":{"type":"string","description":"Default charge bearer for international transfers. OUR = sender pays all fees, SHAR = fees shared. OUR applies outside the EEA only: a payment between two EEA countries falls under PSD2 and is always sent with shared charges, whatever this is set to.\n\n- `OUR` - Sender pays all fees\n- `SHAR` - Fees are shared between sender and receiver\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["OUR","SHAR"]}}},"ExternalCreateBankLedgerAccountRequestV1Model":{"required":["code"],"type":"object","properties":{"code":{"type":"integer","description":"Ledger account code. Must be a unique 6-digit integer within the company's chart of accounts.","format":"int32"},"label":{"type":"string","description":"Ledger account label. Defaults to the bank name when omitted.","nullable":true}},"description":"Ledger account (chart of accounts entry) created and linked to this bank account."},"ExternalBankTransactionV1Model":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the bank transaction","format":"uuid"},"bankAccountId":{"type":"string","description":"ID of the bank account this transaction belongs to","format":"uuid"},"date":{"type":"string","description":"Transaction date","format":"date"},"amount":{"type":"integer","description":"Transaction amount in minor units (e.g. cents)","format":"int64"},"dcSign":{"type":"string","description":"Debit/credit sign\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["D","C"]},"reconciliationStatus":{"type":"string","description":"Reconciliation status\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["EXCLUDED","MATCHED","UNMATCHED"]},"name":{"type":"string","description":"Transaction name / payee","nullable":true},"memo":{"type":"string","description":"Transaction memo / description","nullable":true},"reference":{"type":"string","description":"Transaction reference","nullable":true},"transactionId":{"type":"string","description":"External transaction identifier for idempotency","nullable":true},"createdAt":{"type":"string","description":"Timestamp when the transaction was created","format":"date-time"}}},"ExternalCreateBankTransactionRequestV1Model":{"required":["amount","date","dcSign"],"type":"object","properties":{"date":{"type":"string","description":"Transaction date","format":"date"},"amount":{"type":"integer","description":"Transaction amount in minor units (e.g. cents). Must be positive.","format":"int64"},"dcSign":{"type":"string","description":"Debit/credit sign. DEBIT for money out, CREDIT for money in.\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["D","C"]},"name":{"type":"string","description":"Transaction name / payee","nullable":true},"memo":{"type":"string","description":"Transaction memo / description","nullable":true},"reference":{"type":"string","description":"Transaction reference","nullable":true},"transactionId":{"type":"string","description":"External transaction identifier. Used for idempotency — duplicate transactionIds for the same bank account are silently skipped.","nullable":true}},"description":"List of bank transactions to create. Maximum 500 per request."},"ExternalCreateBankTransactionsRequestV1Model":{"required":["transactions"],"type":"object","properties":{"transactions":{"type":"array","description":"List of bank transactions to create. Maximum 500 per request.","items":{"$ref":"#/components/schemas/ExternalCreateBankTransactionRequestV1Model"}}}},"ExternalPaginatedResponseV1ModelExternalActivityEventV1Model":{"type":"object","properties":{"records":{"type":"array","description":"List of records for the current page","items":{"$ref":"#/components/schemas/ExternalActivityEventV1Model"}},"hasMore":{"type":"boolean","description":"Boolean flag indicating if there are more records available"},"total":{"type":"integer","description":"Total number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination.","format":"int64","nullable":true,"deprecated":true},"nextCursor":{"type":"string","description":"Cursor for fetching the next page (only for cursor pagination)","nullable":true},"prevCursor":{"type":"string","description":"Cursor for fetching the previous page (only for cursor pagination)","nullable":true}}},"ExternalBankAccountBalanceAsOfV1Model":{"type":"object","properties":{"bankAccountId":{"type":"string","description":"ID of the bank account","format":"uuid"},"currency":{"type":"string","description":"Currency of the bank account (ISO 4217)"},"bankBalance":{"type":"integer","description":"Bank statement balance in minor units (e.g. cents). Computed from the opening balance plus all bank transactions on or before `asOf`. Null if no opening balance has been set for this bank account.","format":"int64","nullable":true},"ledgerBalance":{"type":"integer","description":"Ledger balance in minor units (e.g. cents). Computed from all ledger transaction lines posted on or before `asOf` for the bank account's ledger account.","format":"int64"},"asOf":{"type":"string","description":"Date the balance is computed for","format":"date"}}},"ExternalGetAllResponseWithBalanceV1ModelExternalBankTransactionV1Model":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"records":{"type":"array","items":{"$ref":"#/components/schemas/ExternalBankTransactionV1Model"}},"balance":{"type":"integer","format":"int64"}}},"ExternalBankAccountBalanceV1Model":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the bank account balance","format":"uuid"},"bankAccountId":{"type":"string","description":"ID of the bank account","format":"uuid"},"balanceAt":{"type":"string","description":"Timestamp of the balance (opening balance date)","format":"date-time"},"balance":{"type":"integer","description":"Balance amount in minor units (e.g. cents)","format":"int64"}}},"ExternalUpsertBankAccountBalanceRequestV1Model":{"required":["balance"],"type":"object","properties":{"balanceAt":{"type":"string","description":"Timestamp of the balance (opening balance date). Defaults to current timestamp if not provided.","format":"date-time","nullable":true},"balance":{"type":"integer","description":"Balance amount in minor units (e.g. cents)","format":"int64"}}},"ExternalBffInvoicePayableUserDetailsV1Model":{"type":"object","properties":{"userId":{"type":"string","format":"uuid","nullable":true},"userFirstName":{"type":"string","nullable":true},"userLastName":{"type":"string","nullable":true},"userAvatarUrl":{"type":"string","nullable":true}}},"ExternalBffInvoicePayableV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["REIMBURSEMENT","SELF_BILLED","VENDOR_INVOICE"]},"metadata":{"$ref":"#/components/schemas/ExternalInvoicePayableMetadataV1Model"},"documentKey":{"type":"string","nullable":true},"documentName":{"type":"string","nullable":true},"senderEmail":{"type":"string","nullable":true},"companyId":{"type":"string","format":"uuid"},"failureReason":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"enum":["EMAIL_NOT_ALLOWED","ERP_ENTRY_FAILED","OCR_FAILED","DOCUMENT_PROCESSING_FAILED","PAYMENT_APPROVAL_DECLINED","PAYMENT_FAILED","RESETTING_INVOICE_FAILED","CANCELLING_INVOICE_FAILED","APPROVAL_SUBMISSION_FAILED","PAYMENT_VALIDATION_FAILED","USER_INPUT_VALIDATION_FAILED","DUPLICATE_INVOICE","PAYMENT_REJECTED","PAYMENT_REVERSED"]},"failureContext":{"$ref":"#/components/schemas/ExternalUiClientExceptionV1Model"},"state":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["INIT","CREATED","IN_DRAFT","APPROVAL_REQUESTED","APPROVAL_PENDING","APPROVED_ACCOUNTING_ENTRY_PENDING","DECLINED","READY_FOR_PAYMENT_RELEASE","PENDING_PAYMENT_APPROVAL","PAYMENT_PAUSED","SCHEDULED","PAYMENT_PENDING","PARTIALLY_PAID","UNPAID","PAID","COMPLETED","RESET_PENDING","CANCELLATION_PENDING","CANCELLED","DUPLICATED","IMPORT_PENDING"]},"version":{"type":"integer","format":"int32"},"approvalNote":{"type":"string","nullable":true},"payeeName":{"type":"string","nullable":true},"payeeIban":{"type":"string","nullable":true},"payeeBban":{"type":"string","nullable":true},"payeeBic":{"type":"string","nullable":true},"payeeBankCode":{"type":"string","nullable":true},"payeeCountry":{"type":"string","nullable":true},"payeeAddress":{"type":"string","nullable":true},"payeeZipcode":{"type":"string","nullable":true},"payeeBankName":{"type":"string","nullable":true},"payeeBankCountry":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"enum":["AC","AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BU","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CR","CS","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","FX","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NT","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SF","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SU","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","UK","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XI","XU","XK","YE","YT","YU","ZA","ZM","ZR","ZW"]},"payeeBankAddress":{"type":"string","nullable":true},"payeeBankZipcode":{"type":"string","nullable":true},"payeeCity":{"type":"string","nullable":true},"payeeBankCity":{"type":"string","nullable":true},"fiNumber":{"type":"string","nullable":true},"invoiceNumber":{"type":"string","nullable":true},"companyEntityId":{"type":"string","format":"uuid","nullable":true},"companyEntityName":{"type":"string","nullable":true},"amount":{"type":"integer","format":"int64","nullable":true},"outstandingBalance":{"type":"integer","description":"Outstanding invoice balance to be paid in cents, expressed in the invoice currency. `0` means the bill is settled. `null` means Light derived no balance for it — for instance the bill has no amount yet, its state is `CANCELLED`, `DECLINED` or `DUPLICATED`, or the company does not keep its ledger in Light — so do not read `null` as fully paid.","format":"int64","nullable":true},"amountPaid":{"type":"integer","description":"Amount paid against the invoice in cents, expressed in the invoice currency. Credit notes and reversed payments are not counted. `null` means Light derived no balance for the bill, as for `outstandingBalance`.","format":"int64","nullable":true},"currency":{"type":"string","nullable":true,"example":"USD"},"issuedDate":{"type":"string","format":"date","nullable":true},"dueDate":{"type":"string","format":"date","nullable":true},"paymentAt":{"type":"string","format":"date-time","nullable":true},"ocrCompletedAt":{"type":"string","format":"date-time","nullable":true},"canceledAt":{"type":"string","format":"date-time","nullable":true},"description":{"type":"string","nullable":true},"senderBankAccountId":{"type":"string","format":"uuid","nullable":true},"cancellationReason":{"type":"string","nullable":true},"vendor":{"$ref":"#/components/schemas/ExternalBffInvoicePayableVendorDetailsV1Model"},"user":{"$ref":"#/components/schemas/ExternalBffInvoicePayableUserDetailsV1Model"},"nextApprover":{"$ref":"#/components/schemas/ExternalNextApproverV1Model"},"reimbursement":{"$ref":"#/components/schemas/ExternalReimbursementV1Model"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"paymentPausedBy":{"type":"string","format":"uuid","nullable":true},"paymentPausedAt":{"type":"string","format":"date-time","nullable":true}},"description":"List of records for the current page"},"ExternalBffInvoicePayableVendorDetailsV1Model":{"type":"object","properties":{"vendorId":{"type":"string","format":"uuid","nullable":true},"vatId":{"type":"string","nullable":true},"vendorAccountId":{"type":"string","format":"uuid","nullable":true},"vendorTaxCodeId":{"type":"string","format":"uuid","nullable":true},"vendorIsWithholdingSubject":{"type":"boolean","nullable":true},"vendorCostCenterId":{"type":"string","format":"uuid","nullable":true},"vendorSenderBankAccountId":{"type":"string","format":"uuid","nullable":true},"vendorIdentifier":{"type":"string","nullable":true},"vendorName":{"type":"string","nullable":true},"vendorAvatarUrl":{"type":"string","nullable":true},"vendorEmail":{"type":"string","nullable":true},"vendorWebsite":{"type":"string","nullable":true},"vendorCountry":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"enum":["AC","AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BU","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CR","CS","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","FX","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NT","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SF","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SU","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","UK","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XI","XU","XK","YE","YT","YU","ZA","ZM","ZR","ZW"]},"vendorCity":{"type":"string","nullable":true},"vendorAddress":{"type":"string","nullable":true},"vendorZipcode":{"type":"string","nullable":true},"vendorCurrency":{"type":"string","nullable":true,"example":"USD"},"vendorContractValue":{"type":"integer","format":"int64","nullable":true},"vendorCreatedBy":{"type":"string","format":"uuid","nullable":true}}},"ExternalInvoicePayableMetadataV1Model":{"type":"object","properties":{"type":{"type":"string","description":"Type of metadata attached to the invoice payable, depending on its kind (vendor invoice or reimbursement).\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["SELF_BILLED_METADATA","VENDOR_INVOICE_METADATA","REIMBURSEMENT_METADATA"]}},"description":"Metadata specific to the invoice payable type (e.g. reimbursement- or vendor-specific fields).","discriminator":{"propertyName":"type"}},"ExternalNextApproverV1Model":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"fullName":{"type":"string"},"approvalSentAt":{"type":"string","format":"date-time"}}},"ExternalPaginatedResponseV1ModelExternalBffInvoicePayableV1Model":{"type":"object","properties":{"records":{"type":"array","description":"List of records for the current page","items":{"$ref":"#/components/schemas/ExternalBffInvoicePayableV1Model"}},"hasMore":{"type":"boolean","description":"Boolean flag indicating if there are more records available"},"total":{"type":"integer","description":"Total number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination.","format":"int64","nullable":true,"deprecated":true},"nextCursor":{"type":"string","description":"Cursor for fetching the next page (only for cursor pagination)","nullable":true},"prevCursor":{"type":"string","description":"Cursor for fetching the previous page (only for cursor pagination)","nullable":true}}},"ExternalReimbursementInvoicePayableMetadataV1Model":{"type":"object","allOf":[{"$ref":"#/components/schemas/ExternalInvoicePayableMetadataV1Model"},{"type":"object","properties":{"reimbursementId":{"type":"string","description":"ID of the reimbursement this invoice payable is linked to.","format":"uuid"},"userId":{"type":"string","description":"ID of the user who submitted or is associated with the reimbursement.","format":"uuid"}}}]},"ExternalReimbursementV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"companyId":{"type":"string","format":"uuid"},"userId":{"type":"string","format":"uuid"},"expenseIds":{"type":"array","items":{"type":"string","format":"uuid"}},"status":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["IN_PROGRESS","SUCCEEDED","FAILED","REJECTED","RESET"]},"createdAt":{"type":"string","format":"date-time"}}},"ExternalSelfBilledInvoicePayableMetadataV1Model":{"type":"object","allOf":[{"$ref":"#/components/schemas/ExternalInvoicePayableMetadataV1Model"}]},"ExternalUiClientExceptionErrorV1Model":{"type":"object","properties":{"type":{"type":"string","description":"A string code identifying the error type"},"message":{"type":"string","description":"A human-readable message providing more details about the error"},"path":{"type":"array","description":"Optional path of the error when the error is for a specific field. Used mostly on BAD_REQUEST errors, that path will match the field name on the request object","nullable":true,"items":{"type":"string","description":"Optional path of the error when the error is for a specific field. Used mostly on BAD_REQUEST errors, that path will match the field name on the request object","nullable":true}},"context":{"type":"object","additionalProperties":{"type":"object","description":"Optional context providing additional information about the error. This can include any relevant data that might help in understanding or resolving the error","nullable":true},"description":"Optional context providing additional information about the error. This can include any relevant data that might help in understanding or resolving the error","nullable":true}},"description":"List of errors providing details about what went wrong"},"ExternalUiClientExceptionV1Model":{"type":"object","properties":{"name":{"type":"string","description":"The error name"},"type":{"type":"string","description":"The error type\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","UNPROCESSABLE_CONTENT"]},"errors":{"type":"array","description":"List of errors providing details about what went wrong","items":{"$ref":"#/components/schemas/ExternalUiClientExceptionErrorV1Model"}}},"description":"Failure context when vendor onboarding fails.","nullable":true},"ExternalVendorInvoicePayableMetadataV1Model":{"type":"object","allOf":[{"$ref":"#/components/schemas/ExternalInvoicePayableMetadataV1Model"}]},"ExternalCardBalanceAccountStatementLineV1Model":{"type":"object","properties":{"providerId":{"type":"string"},"direction":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["DEBIT","CREDIT"]},"amount":{"type":"integer","format":"int64"},"runningBalance":{"type":"integer","format":"int64"},"bookedAt":{"type":"string","format":"date-time"},"valuedAt":{"type":"string","format":"date-time"},"description":{"type":"string","nullable":true},"reference":{"type":"string","nullable":true}}},"ExternalCardBalanceAccountStatementV1Model":{"type":"object","properties":{"balanceAccountId":{"type":"string","format":"uuid"},"currency":{"type":"string","example":"USD"},"periodStart":{"type":"string","format":"date-time"},"periodEnd":{"type":"string","format":"date-time"},"openingBalance":{"type":"integer","format":"int64"},"closingBalance":{"type":"integer","format":"int64"},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/ExternalCardBalanceAccountStatementLineV1Model"}},"generatedAt":{"type":"string","format":"date-time"}}},"ExternalCardBalanceAccountBalanceV1Model":{"type":"object","properties":{"available":{"type":"integer","format":"int64"},"settled":{"type":"integer","format":"int64"},"reserved":{"type":"integer","format":"int64"},"currency":{"type":"string","example":"USD"}}},"ExternalCardBalanceAccountV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"isPrimary":{"type":"boolean"},"companyEntityId":{"type":"string","format":"uuid"},"companyId":{"type":"string","format":"uuid"},"currency":{"type":"string","example":"USD"},"label":{"type":"string"},"status":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["ACTIVE","CLOSED"]},"balance":{"$ref":"#/components/schemas/ExternalCardBalanceAccountBalanceV1Model"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"description":"List of records for the current page"},"ExternalPaginatedResponseV1ModelExternalCardBalanceAccountV1Model":{"type":"object","properties":{"records":{"type":"array","description":"List of records for the current page","items":{"$ref":"#/components/schemas/ExternalCardBalanceAccountV1Model"}},"hasMore":{"type":"boolean","description":"Boolean flag indicating if there are more records available"},"total":{"type":"integer","description":"Total number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination.","format":"int64","nullable":true,"deprecated":true},"nextCursor":{"type":"string","description":"Cursor for fetching the next page (only for cursor pagination)","nullable":true},"prevCursor":{"type":"string","description":"Cursor for fetching the previous page (only for cursor pagination)","nullable":true}}},"ExternalCardBalanceAccountSpendV1Model":{"type":"object","properties":{"currency":{"type":"string","example":"USD"},"total":{"type":"integer","format":"int64"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}}},"ExternalCardPublicKeyInfoV1Model":{"type":"object","properties":{"publicKey":{"type":"string"},"expiryDate":{"type":"string","format":"date"}}},"ExternalBatchUpdateCardTransactionLineRequestV1Model":{"type":"object","properties":{"lineId":{"type":"string","format":"uuid"},"customProperties":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/SetCustomPropertyRequestV1Model"}},"description":{"type":"string","nullable":true},"accountId":{"type":"string","format":"uuid","nullable":true},"taxCodeId":{"type":"string","format":"uuid","nullable":true}}},"ExternalBatchUpdateCardTransactionRequestV1Model":{"type":"object","properties":{"cardTransactionId":{"type":"string","format":"uuid"},"customProperties":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/SetCustomPropertyRequestV1Model"}},"lines":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/ExternalBatchUpdateCardTransactionLineRequestV1Model"}},"postingDate":{"type":"string","format":"date","nullable":true},"description":{"type":"string","nullable":true}}},"SetCustomPropertyRequestV1Model":{"type":"object","properties":{"groupId":{"type":"string","format":"uuid"},"valueIds":{"type":"array","items":{"type":"string","format":"uuid"}},"inlineValues":{"type":"array","items":{"type":"string"}}}},"ExternalCardTransactionLineV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"transactionId":{"type":"string","format":"uuid"},"companyId":{"type":"string","format":"uuid"},"accountId":{"type":"string","format":"uuid"},"taxCodeId":{"type":"string","format":"uuid"},"costCenterId":{"type":"string","format":"uuid"},"amount":{"type":"integer","format":"int64"},"netAmount":{"type":"integer","format":"int64"},"taxAmount":{"type":"integer","format":"int64"},"description":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"customProperties":{"type":"array","items":{"$ref":"#/components/schemas/ExternalCustomPropertyV1Model"}},"amortizationTemplateId":{"type":"string","format":"uuid"},"amortizationStartDate":{"type":"string","format":"date"},"amortizationEndDate":{"type":"string","format":"date"}}},"ExternalCustomPropertyV1Model":{"type":"object","properties":{"groupId":{"type":"string","description":"ID of the custom property group","format":"uuid"},"groupInternalName":{"type":"string","description":"Internal name of the custom property group"},"values":{"type":"array","description":"List of values. Note that this will be a single value unless the group input type supports multiple values","items":{"$ref":"#/components/schemas/ExternalCustomPropertyValueV1Model"}}},"description":"Custom properties set on the vendor.","nullable":true},"ExternalCustomPropertyValueV1Model":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the object","format":"uuid"},"groupId":{"type":"string","description":"ID of the custom property group","format":"uuid"},"groupInternalName":{"type":"string","description":"Internal name of the custom property group"},"companyId":{"type":"string","description":"ID of the company","format":"uuid"},"internalName":{"type":"string","description":"Internal name of the custom property value"},"label":{"type":"string","description":"Label of the custom property value"},"context":{"type":"string","description":"Context/description of the custom property value","nullable":true},"createdAt":{"type":"string","description":"Timestamp when the custom property value was created","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the custom property value was last updated","format":"date-time"}},"description":"List of values. Note that this will be a single value unless the group input type supports multiple values"},"ExternalCreateCardTransactionLineRequestV1Model":{"type":"object","properties":{"accountId":{"type":"string","description":"ID of the ledger account to book this line against.","format":"uuid","nullable":true},"taxCodeId":{"type":"string","description":"ID of the tax code to apply to this line. The line's tax is calculated from it.","format":"uuid","nullable":true},"costCenterId":{"type":"string","description":"ID of the cost center.","format":"uuid","nullable":true},"amount":{"type":"integer","description":"Gross line amount in minor units (e.g. cents), including tax. Positive; the line takes the card transaction's direction.","format":"int64","nullable":true},"description":{"type":"string","description":"Description of this line.","nullable":true},"customProperties":{"type":"array","description":"Custom properties to set on this line.","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}},"amortizationTemplateId":{"type":"string","description":"ID of the amortization template to apply to this line.","format":"uuid","nullable":true},"amortizationStartDate":{"type":"string","description":"Start date for amortization of this line.","format":"date","nullable":true},"amortizationEndDate":{"type":"string","description":"End date for amortization of this line.","format":"date","nullable":true}}},"ExternalSetCustomPropertyRequestV1Model":{"type":"object","properties":{"groupId":{"type":"string","description":"ID of the custom property group.","format":"uuid"},"valueIds":{"type":"array","description":"IDs of the selected custom property values. It behaves as a PUT operation, so if empty the existing ones will be effectively deleted.","items":{"type":"string","description":"IDs of the selected custom property values. It behaves as a PUT operation, so if empty the existing ones will be effectively deleted.","format":"uuid"}},"inlineValues":{"type":"array","description":"Inline custom property values (used for TEXT/NUMERIC/DATE/etc. groups). It behaves as a PUT operation, so if empty or null the existing ones will be effectively deleted.","nullable":true,"items":{"type":"string","description":"Inline custom property values (used for TEXT/NUMERIC/DATE/etc. groups). It behaves as a PUT operation, so if empty or null the existing ones will be effectively deleted.","nullable":true}}},"description":"List of custom properties to set on the vendor. Replaces the existing set.","nullable":true},"ExternalCardTransactionReceiptUploadUrlResponseV1Model":{"type":"object","properties":{"uploadUrl":{"type":"string","format":"url"},"key":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"nullable":true}}},"ExternalTransactionReceiptUploadUrlRequestV1Model":{"type":"object","properties":{"filename":{"type":"string"},"contentType":{"type":"string"}}},"ExternalBffCardTransactionLineV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"transactionId":{"type":"string","format":"uuid"},"companyId":{"type":"string","format":"uuid"},"accountId":{"type":"string","format":"uuid"},"accountLabel":{"type":"string"},"taxCodeId":{"type":"string","format":"uuid"},"taxCodeLabel":{"type":"string"},"costCenterId":{"type":"string","format":"uuid"},"costCenterName":{"type":"string"},"amount":{"type":"integer","format":"int64"},"netAmount":{"type":"integer","format":"int64"},"description":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"customProperties":{"type":"array","items":{"$ref":"#/components/schemas/ExternalCustomPropertyV1Model"}},"amortizationTemplateId":{"type":"string","format":"uuid"},"amortizationStartDate":{"type":"string","format":"date"},"amortizationEndDate":{"type":"string","format":"date"}}},"ExternalBffCardTransactionParsedReceiptLineV1Model":{"type":"object","properties":{"description":{"type":"string"},"quantity":{"type":"number"},"price":{"type":"number"}}},"ExternalBffCardTransactionParsedReceiptV1Model":{"type":"object","properties":{"currency":{"type":"string"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ExternalBffCardTransactionParsedReceiptLineV1Model"}}}},"ExternalBffCardTransactionV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"companyId":{"type":"string","format":"uuid"},"companyEntityId":{"type":"string","format":"uuid"},"companyEntityName":{"type":"string"},"cardBalanceAccountId":{"type":"string","format":"uuid"},"cardBalanceAccountLabel":{"type":"string"},"cardId":{"type":"string","format":"uuid"},"providerId":{"type":"string"},"cardVendorId":{"type":"string","format":"uuid"},"cardVendorAvatarUrl":{"type":"string"},"cardVendorName":{"type":"string"},"cardOwnerName":{"type":"string"},"cardOwnerId":{"type":"string","format":"uuid"},"cardLastFour":{"type":"string"},"originalAmount":{"type":"integer","format":"int64"},"originalCurrency":{"type":"string","example":"USD"},"amount":{"type":"integer","format":"int64"},"currency":{"type":"string","example":"USD"},"direction":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["DEBIT","CREDIT"]},"transactionReason":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["ACCOUNT_NOT_ACTIVE","AMOUNT_LIMIT_EXCEEDED","APPROVAL_EXPIRED","APPROVED","AUTHENTICATION_FAILED","AUTHENTICATION_REQUIRED","BALANCE_ACCOUNT_BLOCKED_BY_RULE","CALL_REFERRAL","CANCELLED","CARD_BLOCKED","CARD_CAPTURED","CARD_EXPIRED","CARD_LOST_OR_STOLEN","CARD_RESTRICTED","CARD_VERIFICATION_FAILED","CASHBACK_LIMIT_EXCEEDED","CONTACTLESS_FALLBACK","CONTACTLESS_LIMIT_REACHED","COUNTERPARTY_ACCOUNT_UNAVAILABLE","COUNTERPARTY_ADDRESS_REQUIRED","COUNTERPARTY_BANK_UNAVAILABLE","CRYPTOGRAPHIC_FAILURE","DECLINED","DECLINED_BY_BAP_VALIDATION","DECLINED_BY_TRANSACTION_RULE","DECLINED_NON_GENERIC","DOMESTIC_DEBIT_NOT_ALLOWED","DO_NOT_HONOR","DUPLICATE_TRANSMISSION","FORMAT_ERROR","FRAUD","HONOR_WITH_ID","INSUFFICIENT_FUNDS","INTERNAL_TIMEOUT","INVALID_ACCOUNT","INVALID_AMOUNT","INVALID_AUTHORIZATION_LIFECYCLE","INVALID_CARD","INVALID_ISSUER","INVALID_MERCHANT","INVALID_TRANSACTION","ISSUER_SUSPECTED_FRAUD","MOBILE_PIN_REQUIRED","NOT_SUBMITTED","NO_ACCOUNT_OF_TYPE","OTHER","PARTIALLY_APPROVED","PENDING","PIN_INVALID","PIN_NOT_CHANGED","PIN_REQUIRED","PIN_TRIES_EXCEEDED","PIN_VALIDATION_NOT_POSSIBLE","PROVIDER_ERROR","PURCHASE_AMOUNT_ONLY_NO_CASHBACK","REFUSED_BY_COUNTERPARTY_BANK","REFUSED_BY_CUSTOMER","REVOCATION_OF_AUTH","ROUTE_NOT_FOUND","SCHEME_ADVICE","SECURITY_VIOLATION","TRANSACTION_NOT_PERMITTED","TRANSFER_INSTRUMENT_NOT_FOUND","TRANSFER_NOT_SUPPORTED","UNKNOWN","WITHDRAWAL_AMOUNT_EXCEEDED","WITHDRAWAL_COUNT_EXCEEDED"]},"purchaseType":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["ATM","BALANCE_INQUIRY","ECOMMERCE","POS","RECURRING","UNKNOWN","OTHER"]},"status":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["AUTHORIZED","DECLINED","CAPTURED","REFUNDED","VOIDED","POSTED"]},"type":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["PAYMENT","REFUND","OTHER"]},"merchant":{"$ref":"#/components/schemas/ExternalCardTransactionMerchantV1Model"},"receiptDocumentKey":{"type":"string"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ExternalBffCardTransactionLineV1Model"}},"failureContext":{"$ref":"#/components/schemas/ExternalUiClientExceptionV1Model"},"receiptFailureContext":{"$ref":"#/components/schemas/ExternalUiClientExceptionV1Model"},"description":{"type":"string"},"performedAt":{"type":"string","format":"date-time"},"exportedAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"customProperties":{"type":"array","items":{"$ref":"#/components/schemas/ExternalCustomPropertyV1Model"}},"parsedReceipt":{"$ref":"#/components/schemas/ExternalBffCardTransactionParsedReceiptV1Model"}},"description":"List of records for the current page"},"ExternalCardTransactionMerchantV1Model":{"type":"object","properties":{"name":{"type":"string"},"cleanName":{"type":"string"},"country":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["AC","AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BU","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CR","CS","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","FX","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NT","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SF","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SU","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","UK","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XI","XU","XK","YE","YT","YU","ZA","ZM","ZR","ZW"]},"zipcode":{"type":"string"},"id":{"type":"string"},"mcc":{"type":"string"},"acquirerId":{"type":"string"},"logoUrl":{"type":"string"}}},"ExternalPaginatedResponseV1ModelExternalBffCardTransactionV1Model":{"type":"object","properties":{"records":{"type":"array","description":"List of records for the current page","items":{"$ref":"#/components/schemas/ExternalBffCardTransactionV1Model"}},"hasMore":{"type":"boolean","description":"Boolean flag indicating if there are more records available"},"total":{"type":"integer","description":"Total number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination.","format":"int64","nullable":true,"deprecated":true},"nextCursor":{"type":"string","description":"Cursor for fetching the next page (only for cursor pagination)","nullable":true},"prevCursor":{"type":"string","description":"Cursor for fetching the previous page (only for cursor pagination)","nullable":true}}},"ExternalImportCardTransactionResultV1Model":{"type":"object","properties":{"index":{"type":"integer","description":"Position of the row in the request.","format":"int32"},"outcome":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["CREATED","FAILED","SKIPPED_DUPLICATE"]},"cardTransactionId":{"type":"string","format":"uuid","nullable":true},"providerId":{"type":"string","description":"The row's providerId: the one sent, or the one Light derived for a created or skipped row.","nullable":true},"error":{"type":"string","nullable":true},"failure":{"$ref":"#/components/schemas/ExternalUiClientExceptionV1Model"}}},"ExternalImportCardTransactionRequestV1Model":{"required":["amount","currency"],"type":"object","properties":{"cardId":{"type":"string","description":"Light's id of the card. Give this or cardProviderId, not both.","format":"uuid","nullable":true},"cardProviderId":{"type":"string","description":"The card's own provider id, as given when the card was created. Give this or cardId, not both.","nullable":true},"providerId":{"type":"string","description":"The issuer's own transaction id. Used as the idempotency key: a row whose providerId was already imported comes back as SKIPPED_DUPLICATE. When omitted, Light derives one from the card, amount, date and merchant.","nullable":true},"amount":{"type":"integer","description":"Amount settled on the balance account, in minor units (e.g. cents). Positive; 'direction' carries the sign.","format":"int64"},"currency":{"type":"string","example":"USD"},"originalAmount":{"type":"integer","description":"Purchase-side amount in minor units when the purchase was made in another currency.","format":"int64","nullable":true},"originalCurrency":{"type":"string","nullable":true,"example":"USD"},"direction":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["DEBIT","CREDIT"]},"merchantName":{"type":"string","nullable":true},"performedAt":{"type":"string","format":"date-time"},"postingDate":{"type":"string","description":"Posting date of the ledger document when the transaction is auto-posted. Defaults to the day of 'performedAt'.","format":"date","nullable":true}},"description":"Rows to import. Maximum 100 per request."},"ExternalImportCardTransactionsRequestV1Model":{"required":["transactions"],"type":"object","properties":{"transactions":{"type":"array","description":"Rows to import. Maximum 100 per request.","items":{"$ref":"#/components/schemas/ExternalImportCardTransactionRequestV1Model"}}}},"ExternalCardTransactionV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"companyId":{"type":"string","format":"uuid"},"companyEntityId":{"type":"string","format":"uuid"},"cardBalanceAccountId":{"type":"string","format":"uuid"},"cardId":{"type":"string","format":"uuid"},"providerId":{"type":"string"},"originalAmount":{"type":"integer","format":"int64"},"originalCurrency":{"type":"string","example":"USD"},"amount":{"type":"integer","format":"int64"},"currency":{"type":"string","example":"USD"},"direction":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["DEBIT","CREDIT"]},"transactionReason":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["ACCOUNT_NOT_ACTIVE","AMOUNT_LIMIT_EXCEEDED","APPROVAL_EXPIRED","APPROVED","AUTHENTICATION_FAILED","AUTHENTICATION_REQUIRED","BALANCE_ACCOUNT_BLOCKED_BY_RULE","CALL_REFERRAL","CANCELLED","CARD_BLOCKED","CARD_CAPTURED","CARD_EXPIRED","CARD_LOST_OR_STOLEN","CARD_RESTRICTED","CARD_VERIFICATION_FAILED","CASHBACK_LIMIT_EXCEEDED","CONTACTLESS_FALLBACK","CONTACTLESS_LIMIT_REACHED","COUNTERPARTY_ACCOUNT_UNAVAILABLE","COUNTERPARTY_ADDRESS_REQUIRED","COUNTERPARTY_BANK_UNAVAILABLE","CRYPTOGRAPHIC_FAILURE","DECLINED","DECLINED_BY_BAP_VALIDATION","DECLINED_BY_TRANSACTION_RULE","DECLINED_NON_GENERIC","DOMESTIC_DEBIT_NOT_ALLOWED","DO_NOT_HONOR","DUPLICATE_TRANSMISSION","FORMAT_ERROR","FRAUD","HONOR_WITH_ID","INSUFFICIENT_FUNDS","INTERNAL_TIMEOUT","INVALID_ACCOUNT","INVALID_AMOUNT","INVALID_AUTHORIZATION_LIFECYCLE","INVALID_CARD","INVALID_ISSUER","INVALID_MERCHANT","INVALID_TRANSACTION","ISSUER_SUSPECTED_FRAUD","MOBILE_PIN_REQUIRED","NOT_SUBMITTED","NO_ACCOUNT_OF_TYPE","OTHER","PARTIALLY_APPROVED","PENDING","PIN_INVALID","PIN_NOT_CHANGED","PIN_REQUIRED","PIN_TRIES_EXCEEDED","PIN_VALIDATION_NOT_POSSIBLE","PROVIDER_ERROR","PURCHASE_AMOUNT_ONLY_NO_CASHBACK","REFUSED_BY_COUNTERPARTY_BANK","REFUSED_BY_CUSTOMER","REVOCATION_OF_AUTH","ROUTE_NOT_FOUND","SCHEME_ADVICE","SECURITY_VIOLATION","TRANSACTION_NOT_PERMITTED","TRANSFER_INSTRUMENT_NOT_FOUND","TRANSFER_NOT_SUPPORTED","UNKNOWN","WITHDRAWAL_AMOUNT_EXCEEDED","WITHDRAWAL_COUNT_EXCEEDED"]},"purchaseType":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["ATM","BALANCE_INQUIRY","ECOMMERCE","POS","RECURRING","UNKNOWN","OTHER"]},"status":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["AUTHORIZED","DECLINED","CAPTURED","REFUNDED","VOIDED","POSTED"]},"type":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["PAYMENT","REFUND","OTHER"]},"merchant":{"$ref":"#/components/schemas/ExternalCardTransactionMerchantV1Model"},"receiptDocumentKey":{"type":"string"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ExternalCardTransactionLineV1Model"}},"failureContext":{"$ref":"#/components/schemas/ExternalUiClientExceptionV1Model"},"receiptFailureContext":{"$ref":"#/components/schemas/ExternalUiClientExceptionV1Model"},"editStatus":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["ALL_EDITS_ALLOWED","LINE_AMOUNT_EDITS_LOCKED","ALL_EDITS_LOCKED"]},"description":{"type":"string"},"performedAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"updatedBy":{"type":"string","format":"uuid"},"customProperties":{"type":"array","items":{"$ref":"#/components/schemas/ExternalCustomPropertyV1Model"}}}},"ExternalUpdateCardTransactionRequestV1Model":{"type":"object","properties":{"customProperties":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}},"description":{"type":"string","nullable":true}}},"ExternalUpdateCardTransactionLineRequestV1Model":{"type":"object","properties":{"customProperties":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}},"accountId":{"type":"string","format":"uuid","nullable":true},"taxCodeId":{"type":"string","format":"uuid","nullable":true},"costCenterId":{"type":"string","format":"uuid","nullable":true},"amount":{"type":"integer","format":"int64","nullable":true},"description":{"type":"string","nullable":true},"amortizationTemplateId":{"type":"string","format":"uuid","nullable":true},"amortizationStartDate":{"type":"string","format":"date","nullable":true},"amortizationEndDate":{"type":"string","format":"date","nullable":true}}},"ExternalCard3DsMetadataV1Model":{"type":"object","properties":{"phoneNumber":{"$ref":"#/components/schemas/PhoneNumber"},"password":{"type":"string"},"email":{"type":"string"}}},"ExternalCardLimitV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"companyId":{"type":"string","format":"uuid"},"cardId":{"type":"string","format":"uuid"},"amount":{"type":"integer","format":"int64"},"currency":{"type":"string","example":"USD"},"interval":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["PER_TRANSACTION","WEEKLY","MONTHLY"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"ExternalCardMetadataV1Model":{"type":"object","properties":{"type":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["VENDOR","EMPLOYEE"]}},"discriminator":{"propertyName":"type"}},"ExternalCardV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"companyEntityId":{"type":"string","format":"uuid"},"companyId":{"type":"string","format":"uuid"},"ownerId":{"type":"string","format":"uuid"},"cardBalanceAccountId":{"type":"string","format":"uuid"},"form":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["PHYSICAL","VIRTUAL"]},"status":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["ACTIVE","FROZEN","CLOSED","UPDATE_IN_PROGRESS"]},"metadata":{"$ref":"#/components/schemas/ExternalCardMetadataV1Model"},"threeDs":{"$ref":"#/components/schemas/ExternalCard3DsMetadataV1Model"},"description":{"type":"string"},"bin":{"type":"string"},"lastFour":{"type":"string"},"cardholderName":{"type":"string"},"limits":{"type":"array","items":{"$ref":"#/components/schemas/ExternalCardLimitV1Model"}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"type":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["VENDOR","EMPLOYEE"]}}},"ExternalEmployeeCardMetadataV1Model":{"type":"object","allOf":[{"$ref":"#/components/schemas/ExternalCardMetadataV1Model"}]},"ExternalVendorCardMetadataV1Model":{"type":"object","allOf":[{"$ref":"#/components/schemas/ExternalCardMetadataV1Model"},{"type":"object","properties":{"vendorId":{"type":"string","format":"uuid"}}}]},"ExternalCardAuthenticationV1Model":{"type":"object","properties":{"phoneNumber":{"$ref":"#/components/schemas/PhoneNumber"},"email":{"type":"string","description":"Email address for 3D Secure authentication.","nullable":true}},"description":"3D Secure authentication details for the card. Required for Light-issued cards, ignored for external providers.","nullable":true},"ExternalCardDeliveryAddressV1Model":{"type":"object","properties":{"street":{"type":"string","description":"Street name (maps to Adyen `address.line1`)."},"houseNumberOrName":{"type":"string","description":"House number, building, apartment, or suite (maps to Adyen `address.line2`)."},"city":{"type":"string","description":"City."},"postalCode":{"type":"string","description":"Postal or ZIP code in the delivery country's own format; separators such as spaces and dashes are optional. Max 10 characters, or 5 digits for `US`. The card issuer validates the format and rejects a code that doesn't match the destination country."},"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code (e.g. `DK`, `US`, `GB`).\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["AC","AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BU","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CR","CS","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","FX","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NT","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SF","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SU","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","UK","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XI","XU","XK","YE","YT","YU","ZA","ZM","ZR","ZW"]},"stateOrProvince":{"type":"string","description":"State, province, or region. **Required** when `country` is `US` or `CA`; requests without it are rejected with `PHYSICAL_CARD_STATE_OR_PROVINCE_REQUIRED`. Optional for other countries.","nullable":true}},"description":"Postal address the card is shipped to. Country must be an ISO 3166-1 alpha-2 code; `stateOrProvince` is required for US and CA destinations. An address the card issuer rejects comes back as `CARD_PROVIDER_REJECTED_FIELD` with `path` pointing at the offending field."},"ExternalCardDeliveryContactNameV1Model":{"type":"object","properties":{"firstName":{"type":"string","description":"Recipient first name."},"lastName":{"type":"string","description":"Recipient last name."}},"description":"Name printed on the shipping label."},"ExternalCardDeliveryContactV1Model":{"type":"object","properties":{"address":{"$ref":"#/components/schemas/ExternalCardDeliveryAddressV1Model"},"name":{"$ref":"#/components/schemas/ExternalCardDeliveryContactNameV1Model"},"company":{"type":"string","description":"Company or department name on the shipping label.","nullable":true},"email":{"type":"string","description":"Contact email for delivery notifications.","nullable":true},"phoneNumber":{"$ref":"#/components/schemas/PhoneNumber"}},"description":"Recipient and address used by the card issuer to ship the physical card. Only `address` and `name` are required.","nullable":true},"ExternalCreateCardLimitRequestV1Model":{"type":"object","properties":{"amount":{"type":"integer","description":"Spending limit amount in minor units (e.g., cents).","format":"int64"},"currency":{"type":"string","example":"USD"},"interval":{"type":"string","description":"Interval for the spending limit (PER_TRANSACTION, WEEKLY, or MONTHLY).\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["PER_TRANSACTION","WEEKLY","MONTHLY"]}},"description":"Optional spending limits for this card.","nullable":true},"ExternalCreateCardMetadataV1Model":{"type":"object","properties":{"type":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["VENDOR","EMPLOYEE"]}},"description":"Card type metadata. Use type 'VENDOR' with vendorId for vendor cards, or type 'EMPLOYEE' with employeeId for employee cards.","discriminator":{"propertyName":"type"}},"ExternalCreateCardRequestV1Model":{"type":"object","properties":{"balanceAccountId":{"type":"string","description":"ID of the card balance account to associate with this card.","format":"uuid"},"ownerId":{"type":"string","description":"ID of the user who will own/manage this card.","format":"uuid"},"metadata":{"$ref":"#/components/schemas/ExternalCreateCardMetadataV1Model"},"description":{"type":"string","description":"Optional description or memo for this card.","nullable":true},"authentication":{"$ref":"#/components/schemas/ExternalCardAuthenticationV1Model"},"limits":{"type":"array","description":"Optional spending limits for this card.","nullable":true,"items":{"$ref":"#/components/schemas/ExternalCreateCardLimitRequestV1Model"}},"formFactor":{"type":"string","description":"Card form factor. Defaults to `VIRTUAL` when omitted. `PHYSICAL` ships a plastic card and requires `deliveryContact` to be set. `VIRTUAL` must be sent with `deliveryContact` left null. Mismatches are rejected with `PHYSICAL_CARD_DELIVERY_CONTACT_REQUIRED` or `VIRTUAL_CARD_DELIVERY_CONTACT_NOT_ALLOWED`.\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["PHYSICAL","VIRTUAL"]},"deliveryContact":{"$ref":"#/components/schemas/ExternalCardDeliveryContactV1Model"},"providerId":{"type":"string","description":"Issuer-supplied card ID, for external (non-Adyen) cards only. Prefer sending this when known, since it makes repeat imports idempotent. A synthetic ID is generated when omitted. Ignored for cards on an Adyen-backed balance account.","nullable":true},"lastFour":{"type":"string","description":"Last four digits of the card number, for external (non-Adyen) cards only. Required when the balance account is external. Ignored for cards on an Adyen-backed balance account.","nullable":true},"cardholderName":{"type":"string","description":"Name embossed on the card, for external (non-Adyen) cards only. Required when the balance account is external. Ignored for cards on an Adyen-backed balance account.","nullable":true}}},"ExternalCreateEmployeeCardMetadataV1Model":{"type":"object","allOf":[{"$ref":"#/components/schemas/ExternalCreateCardMetadataV1Model"},{"type":"object","properties":{"employeeId":{"type":"string","description":"ID of the employee this card is associated with.","format":"uuid"}}}]},"ExternalCreateVendorCardMetadataV1Model":{"type":"object","allOf":[{"$ref":"#/components/schemas/ExternalCreateCardMetadataV1Model"},{"type":"object","properties":{"vendorId":{"type":"string","description":"ID of the vendor this card is associated with.","format":"uuid"}}}]},"ExternalBffCardV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"companyEntityId":{"type":"string","format":"uuid"},"companyEntityName":{"type":"string"},"companyId":{"type":"string","format":"uuid"},"ownerId":{"type":"string","format":"uuid"},"ownerName":{"type":"string"},"cardBalanceAccountId":{"type":"string","format":"uuid"},"cardBalanceAccountLabel":{"type":"string"},"currency":{"type":"string","example":"USD"},"form":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["PHYSICAL","VIRTUAL"]},"status":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["ACTIVE","FROZEN","CLOSED","UPDATE_IN_PROGRESS"]},"metadata":{"$ref":"#/components/schemas/ExternalCardMetadataV1Model"},"threeDs":{"$ref":"#/components/schemas/ExternalCard3DsMetadataV1Model"},"vendorId":{"type":"string","format":"uuid"},"vendorName":{"type":"string"},"vendorAvatarUrl":{"type":"string"},"description":{"type":"string"},"bin":{"type":"string"},"lastFour":{"type":"string"},"cardholderName":{"type":"string"},"limitIntervalSpend":{"type":"integer","format":"int64"},"limits":{"type":"array","items":{"$ref":"#/components/schemas/ExternalCardLimitV1Model"}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"type":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["VENDOR","EMPLOYEE"]}},"description":"List of records for the current page"},"ExternalPaginatedResponseV1ModelExternalBffCardV1Model":{"type":"object","properties":{"records":{"type":"array","description":"List of records for the current page","items":{"$ref":"#/components/schemas/ExternalBffCardV1Model"}},"hasMore":{"type":"boolean","description":"Boolean flag indicating if there are more records available"},"total":{"type":"integer","description":"Total number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination.","format":"int64","nullable":true,"deprecated":true},"nextCursor":{"type":"string","description":"Cursor for fetching the next page (only for cursor pagination)","nullable":true},"prevCursor":{"type":"string","description":"Cursor for fetching the previous page (only for cursor pagination)","nullable":true}}},"ExternalCompanyEntityV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"companyId":{"type":"string","format":"uuid"},"code":{"type":"string"},"parentCompanyEntityId":{"type":"string","format":"uuid"},"localCurrency":{"type":"string","example":"USD"},"displayName":{"type":"string"},"vatNumber":{"type":"string"},"name":{"type":"string"},"address":{"$ref":"#/components/schemas/Address"},"status":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["ACTIVE","HIDDEN","INACTIVE"]},"seedInvoiceNumber":{"type":"integer","description":"This field is used to offset the invoice number sequence for this company entity. The first invoice issued for this company entity will have the number seedInvoiceNumber. This field is optional (default is 1) and can be used to set a custom starting point for invoice numbering or to synchronize with an existing invoicing system. After the first invoice is issued, the sequence will continue without gaps and the seedInvoiceNumber will be ignored.","format":"int64"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"ExternalPaginatedResponseV1ModelExternalCompanyEntityV1Model":{"type":"object","properties":{"records":{"type":"array","description":"List of records for the current page","items":{"$ref":"#/components/schemas/ExternalCompanyEntityV1Model"}},"hasMore":{"type":"boolean","description":"Boolean flag indicating if there are more records available"},"total":{"type":"integer","description":"Total number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination.","format":"int64","nullable":true,"deprecated":true},"nextCursor":{"type":"string","description":"Cursor for fetching the next page (only for cursor pagination)","nullable":true},"prevCursor":{"type":"string","description":"Cursor for fetching the previous page (only for cursor pagination)","nullable":true}}},"ExternalCompanyV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"invoiceEmail":{"type":"string"},"receiptEmail":{"type":"string","nullable":true},"contractEmail":{"type":"string","nullable":true},"salesInvoiceEmail":{"type":"string","nullable":true},"logoUrl":{"type":"string","nullable":true},"baseCurrency":{"type":"string","example":"USD"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"ExternalAiValueSuggestionV1Model":{"type":"object","properties":{"field":{"type":"string"},"fieldValues":{"type":"array","items":{"type":"string"}},"reasoning":{"type":"string"}},"description":"AI-generated suggestions for line item values (e.g. account, cost center, tax code).","nullable":true},"ExternalContractLineAmountDiscountV1Model":{"type":"object","allOf":[{"$ref":"#/components/schemas/ExternalContractLineDiscountV1Model"},{"type":"object","properties":{"startDate":{"type":"string","description":"Start date for the discount","format":"date","nullable":true},"endDate":{"type":"string","description":"End date for the discount","format":"date","nullable":true},"value":{"type":"integer","description":"Discount amount in cents","format":"int64"}}}]},"ExternalContractLineDiscountV1Model":{"type":"object","properties":{"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"type":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["PERCENTAGE","AMOUNT"]}},"description":"Discount to apply to this line (can be percentage or amount-based)","nullable":true,"discriminator":{"propertyName":"type"}},"ExternalContractLinePercentageDiscountV1Model":{"type":"object","allOf":[{"$ref":"#/components/schemas/ExternalContractLineDiscountV1Model"},{"type":"object","properties":{"startDate":{"type":"string","description":"Start date for the discount","format":"date","nullable":true},"endDate":{"type":"string","description":"End date for the discount","format":"date","nullable":true},"value":{"type":"number","description":"Discount percentage (e.g., 10.5 for 10.5%)"}}}]},"ExternalContractLineV1Model":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the object","format":"uuid"},"companyId":{"type":"string","description":"ID of the company","format":"uuid"},"contractId":{"type":"string","description":"ID of the contract this line belongs to","format":"uuid"},"productId":{"type":"string","description":"ID of the product","format":"uuid"},"billingStart":{"type":"string","description":"Date when billing starts for this line","format":"date","nullable":true},"billingEnd":{"type":"string","description":"Date when billing ends for this line","format":"date","nullable":true},"billingRecurrence":{"type":"string","description":"Billing frequency for this line\n\n- `ONE_TIME` - The product is billed once\n- `MONTHLY` - The product is billed every month\n- `QUARTERLY` - The product is billed every three months\n- `HALF_YEARLY` - The product is billed every six months\n- `YEARLY` - The product is billed every year\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["ONE_TIME","MONTHLY","QUARTERLY","HALF_YEARLY","YEARLY"]},"accountId":{"type":"string","description":"ID of the account for bookkeeping","format":"uuid","nullable":true},"taxCodeId":{"type":"string","description":"ID of the tax code","format":"uuid","nullable":true},"avataxCode":{"type":"string","description":"Avalara tax code","nullable":true},"discount":{"$ref":"#/components/schemas/ExternalContractLineDiscountV1Model"},"quantity":{"type":"number","description":"Quantity of the product","nullable":true},"priceOverwrite":{"type":"integer","description":"Custom price override in cents","format":"int64","nullable":true},"productNameOverwrite":{"type":"string","description":"Custom product name override","nullable":true},"amortizationTemplateId":{"type":"string","description":"ID of the amortization template","format":"uuid","nullable":true},"amortizationStartDate":{"type":"string","description":"Start date for amortization","format":"date","nullable":true},"amortizationEndDate":{"type":"string","description":"End date for amortization","format":"date","nullable":true},"aiValueSuggestions":{"type":"array","description":"AI-generated suggestions for this line","nullable":true,"items":{"$ref":"#/components/schemas/ExternalAiValueSuggestionV1Model"}},"customProperties":{"type":"array","description":"List of custom properties associated with the line","nullable":true,"items":{"$ref":"#/components/schemas/ExternalCustomPropertyV1Model"}},"createdAt":{"type":"string","description":"Timestamp when the line was created","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the line was last updated","format":"date-time"}}},"ExternalContractV1Model":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the object","format":"uuid"},"companyId":{"type":"string","description":"ID of the company","format":"uuid"},"startDate":{"type":"string","description":"Contract start date","format":"date","nullable":true},"endDate":{"type":"string","description":"Contract end date","format":"date","nullable":true},"activatedAt":{"type":"string","description":"Timestamp when the contract was activated/published","format":"date-time","nullable":true},"terminatedAt":{"type":"string","description":"Timestamp when the contract was terminated","format":"date-time","nullable":true},"terminationReason":{"type":"string","description":"Reason for contract termination","nullable":true},"terminationReasonType":{"type":"string","description":"Categorized reason for contract termination\n\n- `FINISHED` - Contract ran to its natural end\n- `OTHER` - Terminated for another reason, described in terminationReason\n- `RENEWED` - Contract ended because it was renewed into a new contract\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["FINISHED","OTHER","RENEWED"]},"renewalDate":{"type":"string","description":"Date when the contract should be renewed","format":"date","nullable":true},"companyEntityId":{"type":"string","description":"ID of the entity","format":"uuid","nullable":true},"invoiceTemplateId":{"type":"string","description":"ID of the invoice template to use for generating invoices","format":"uuid","nullable":true},"currency":{"type":"string","example":"USD"},"estimatedAmount":{"type":"integer","description":"Estimated total amount for the contract in cents","format":"int64","nullable":true},"paymentType":{"type":"string","description":"Payment type for invoices generated from this contract\n\n- `AIRWALLEX` - Payment via Airwallex. A payment link will be displayed on the invoice\n- `BANK_TRANSFER` - Payment via bank transfer. Bank information will be displayed on the invoice\n- `DIRECT_DEBIT` - Payment via direct debit. A notice that the amount will be collected automatically will be displayed on the invoice\n- `STRIPE` - Payment via Stripe. A payment link will be sent to the customer\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["AIRWALLEX","BANK_TRANSFER","DIRECT_DEBIT","STRIPE"]},"payeeBankAccountId":{"type":"string","description":"ID of the bank account where payments should be sent","format":"uuid","nullable":true},"billingStart":{"type":"string","description":"Date when billing should start for this contract","format":"date","nullable":true},"netTerms":{"type":"integer","description":"Number of days from invoice date to when payment is due","format":"int32","nullable":true},"invoiceLeadDays":{"type":"integer","description":"Number of days before billing period start to date the invoice","format":"int32","nullable":true},"description":{"type":"string","description":"Description of the contract","nullable":true},"customerId":{"type":"string","description":"ID of the customer","format":"uuid","nullable":true},"state":{"type":"string","description":"Current state of the contract\n\n- `CREATED` - Contract has been created\n- `DRAFT` - Contract is in draft state and can be edited\n- `ACTIVE` - Contract is active and generating invoices\n- `PENDING_TERMINATION` - Contract has a scheduled termination\n- `TERMINATED` - Contract has been terminated\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["CREATED","DRAFT","ACTIVE","PENDING_TERMINATION","TERMINATED"]},"areLinesWithTax":{"type":"boolean","description":"Whether invoice line amounts include tax or tax is added on top"},"lines":{"type":"array","description":"List of contract line items. Only returned when fetching a single contract by ID","nullable":true,"items":{"$ref":"#/components/schemas/ExternalContractLineV1Model"}},"taxEngineName":{"type":"string","description":"Name of the tax engine to be used\n\n- `AVATAX` - Avalara AvaTax will be used for tax calculations\n- `LIGHT` - Light built-in tax engine will be used for tax calculations\n- `SPHERE` - Sphere tax engine will be used for tax calculations\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["AVATAX","LIGHT","SPHERE"]},"externalId":{"type":"string","description":"External identifier from an external system","nullable":true},"externalSource":{"type":"string","description":"Source system if contract was synced from an external system\n\n- `HUBSPOT` - Contract synced from HubSpot\n- `SALESFORCE` - Contract synced from Salesforce\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["HUBSPOT","SALESFORCE"]},"customProperties":{"type":"array","description":"List of custom properties associated with the contract","nullable":true,"items":{"$ref":"#/components/schemas/ExternalCustomPropertyV1Model"}},"createdAt":{"type":"string","description":"Timestamp when the contract was created","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the contract was last updated","format":"date-time"}}},"ExternalCreateContractLineRequestV1Model":{"type":"object","properties":{"productId":{"type":"string","description":"ID of the product","format":"uuid"},"billingStart":{"type":"string","description":"Date when billing starts for this line","format":"date","nullable":true},"billingEnd":{"type":"string","description":"Date when billing ends for this line","format":"date","nullable":true},"billingRecurrence":{"type":"string","description":"Billing frequency for this line\n\n- `ONE_TIME` - The product is billed once\n- `MONTHLY` - The product is billed every month\n- `QUARTERLY` - The product is billed every three months\n- `HALF_YEARLY` - The product is billed every six months\n- `YEARLY` - The product is billed every year\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["ONE_TIME","MONTHLY","QUARTERLY","HALF_YEARLY","YEARLY"]},"accountId":{"type":"string","description":"ID of the ledger account for this line","format":"uuid","nullable":true},"taxCodeId":{"type":"string","description":"ID of the tax code to apply to this line","format":"uuid","nullable":true},"avataxCode":{"type":"string","description":"Avalara tax code. Used when the contract tax engine is AVATAX","nullable":true},"discount":{"$ref":"#/components/schemas/ExternalContractLineDiscountV1Model"},"quantity":{"type":"number","description":"Quantity of the product","nullable":true},"priceOverwrite":{"type":"integer","description":"Custom price override in cents","format":"int64","nullable":true},"productNameOverwrite":{"type":"string","description":"Custom product name override","nullable":true},"customProperties":{"type":"array","description":"List of custom properties to set on the contract or line","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}},"amortizationTemplateId":{"type":"string","description":"ID of the amortization template","format":"uuid","nullable":true},"amortizationStartDate":{"type":"string","description":"Start date for amortization","format":"date","nullable":true},"amortizationEndDate":{"type":"string","description":"End date for amortization","format":"date","nullable":true}}},"ExternalCreateContractRequestV1Model":{"type":"object","properties":{"companyEntityId":{"type":"string","description":"ID of the company entity","format":"uuid"},"startDate":{"type":"string","description":"Contract start date","format":"date","nullable":true},"endDate":{"type":"string","description":"Contract end date","format":"date","nullable":true},"invoiceTemplateId":{"type":"string","description":"ID of the invoice template to use for generating invoices","format":"uuid","nullable":true},"currency":{"type":"string","nullable":true,"example":"USD"},"estimatedAmount":{"type":"integer","description":"Estimated total amount for the contract in cents","format":"int64","nullable":true},"renewalDate":{"type":"string","description":"Date when the contract should be renewed","format":"date","nullable":true},"paymentType":{"type":"string","description":"Payment type for invoices generated from this contract\n\n- `AIRWALLEX` - Payment via Airwallex. A payment link will be displayed on the invoice\n- `BANK_TRANSFER` - Payment via bank transfer. Bank information will be displayed on the invoice\n- `DIRECT_DEBIT` - Payment via direct debit. A notice that the amount will be collected automatically will be displayed on the invoice\n- `STRIPE` - Payment via Stripe. A payment link will be sent to the customer\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["AIRWALLEX","BANK_TRANSFER","DIRECT_DEBIT","STRIPE"]},"payeeBankAccountId":{"type":"string","description":"ID of the bank account where payments should be sent","format":"uuid","nullable":true},"netTerms":{"type":"integer","description":"Number of days from invoice date to when payment is due. Defaults to 30","format":"int32","nullable":true,"default":30},"invoiceLeadDays":{"type":"integer","description":"Number of days before the billing period start to date the invoice. Defaults to 0","format":"int32","nullable":true,"default":0},"billingStart":{"type":"string","description":"Date when billing should start for this contract","format":"date","nullable":true},"description":{"type":"string","description":"Description of the contract","nullable":true},"customerId":{"type":"string","description":"ID of the customer","format":"uuid","nullable":true},"areLinesWithTax":{"type":"boolean","description":"Whether invoice line amounts include tax or tax is added on top. Defaults to true","default":true},"customProperties":{"type":"array","description":"List of custom properties to set on the contract or line","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}},"lines":{"type":"array","description":"List of contract line items to create","nullable":true,"items":{"$ref":"#/components/schemas/ExternalCreateContractLineRequestV1Model"}}}},"ExternalContractDocumentUploadUrlResponseV1Model":{"type":"object","properties":{"uploadUrl":{"type":"string","description":"Pre-signed URL to upload the document to"},"key":{"type":"string","description":"Key to identify the uploaded document"},"metadata":{"type":"object","additionalProperties":{"type":"string","description":"Metadata to include with the upload request","nullable":true},"description":"Metadata to include with the upload request","nullable":true}}},"ExternalContractDocumentUploadRequestV1Model":{"type":"object","properties":{"filename":{"type":"string","description":"Name of the file to upload"}}},"ExternalPaginatedResponseV1ModelExternalContractV1Model":{"type":"object","properties":{"records":{"type":"array","description":"List of records for the current page","items":{"$ref":"#/components/schemas/ExternalContractV1Model"}},"hasMore":{"type":"boolean","description":"Boolean flag indicating if there are more records available"},"total":{"type":"integer","description":"Total number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination.","format":"int64","nullable":true,"deprecated":true},"nextCursor":{"type":"string","description":"Cursor for fetching the next page (only for cursor pagination)","nullable":true},"prevCursor":{"type":"string","description":"Cursor for fetching the previous page (only for cursor pagination)","nullable":true}}},"ExternalRenewContractRequestV1Model":{"type":"object","properties":{"nextEndDate":{"type":"string","description":"New end date when renewing the contract","format":"date"},"nextRenewalDate":{"type":"string","description":"New renewal date when renewing the contract","format":"date","nullable":true}}},"ExternalTerminateContractRequestV1Model":{"type":"object","properties":{"terminationDate":{"type":"string","description":"Date on which the contract should be terminated. If null or today, terminates immediately.","format":"date","nullable":true},"terminationReason":{"type":"string","description":"Reason for terminating the contract","nullable":true},"terminationReasonType":{"type":"string","description":"Categorized reason for terminating the contract\n\n- `FINISHED` - Contract ran to its natural end\n- `OTHER` - Terminated for another reason, described in terminationReason\n- `RENEWED` - Contract ended because it was renewed into a new contract\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["FINISHED","OTHER","RENEWED"]}}},"ExternalUpdateContractRequestV1Model":{"type":"object","properties":{"areLinesWithTax":{"type":"boolean","description":"Whether invoice line amounts include tax or tax is added on top. Defaults to true","nullable":true},"customProperties":{"type":"array","description":"List of custom properties to set on the contract or line","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}},"startDate":{"type":"string","description":"Contract start date","format":"date","nullable":true},"endDate":{"type":"string","description":"Contract end date","format":"date","nullable":true},"companyEntityId":{"type":"string","description":"ID of the company entity","format":"uuid","nullable":true},"invoiceTemplateId":{"type":"string","description":"ID of the invoice template to use for generating invoices","format":"uuid","nullable":true},"currency":{"type":"string","nullable":true,"example":"USD"},"estimatedAmount":{"type":"integer","description":"Estimated total amount for the contract in cents","format":"int64","nullable":true},"paymentType":{"type":"string","description":"Payment type for invoices generated from this contract\n\n- `AIRWALLEX` - Payment via Airwallex. A payment link will be displayed on the invoice\n- `BANK_TRANSFER` - Payment via bank transfer. Bank information will be displayed on the invoice\n- `DIRECT_DEBIT` - Payment via direct debit. A notice that the amount will be collected automatically will be displayed on the invoice\n- `STRIPE` - Payment via Stripe. A payment link will be sent to the customer\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["AIRWALLEX","BANK_TRANSFER","DIRECT_DEBIT","STRIPE"]},"payeeBankAccountId":{"type":"string","description":"ID of the bank account where payments should be sent","format":"uuid","nullable":true},"netTerms":{"type":"integer","description":"Number of days from invoice date to when payment is due. Defaults to 30","format":"int32","nullable":true},"invoiceLeadDays":{"type":"integer","description":"Number of days before the billing period start to date the invoice. Defaults to 0","format":"int32","nullable":true},"billingStart":{"type":"string","description":"Date when billing should start for this contract","format":"date","nullable":true},"description":{"type":"string","description":"Description of the contract","nullable":true},"customerId":{"type":"string","description":"ID of the customer","format":"uuid","nullable":true},"renewalDate":{"type":"string","description":"Date when the contract should be renewed","format":"date","nullable":true}}},"ExternalUpdateContractLineRequestV1Model":{"type":"object","properties":{"productId":{"type":"string","description":"ID of the product","format":"uuid","nullable":true},"billingStart":{"type":"string","description":"Date when billing starts for this line","format":"date","nullable":true},"accountId":{"type":"string","description":"ID of the ledger account for this line","format":"uuid","nullable":true},"taxCodeId":{"type":"string","description":"ID of the tax code to apply to this line","format":"uuid","nullable":true},"customProperties":{"type":"array","description":"List of custom properties to set on the contract or line","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}},"billingRecurrence":{"type":"string","description":"Billing frequency for this line\n\n- `ONE_TIME` - The product is billed once\n- `MONTHLY` - The product is billed every month\n- `QUARTERLY` - The product is billed every three months\n- `HALF_YEARLY` - The product is billed every six months\n- `YEARLY` - The product is billed every year\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["ONE_TIME","MONTHLY","QUARTERLY","HALF_YEARLY","YEARLY"]},"billingEnd":{"type":"string","description":"Date when billing ends for this line","format":"date","nullable":true},"discount":{"$ref":"#/components/schemas/ExternalContractLineDiscountV1Model"},"priceOverwrite":{"type":"integer","description":"Custom price override in cents","format":"int64","nullable":true},"productNameOverwrite":{"type":"string","description":"Custom product name override","nullable":true},"quantity":{"type":"number","description":"Quantity of the product","nullable":true},"amortizationTemplateId":{"type":"string","description":"ID of the amortization template","format":"uuid","nullable":true},"amortizationStartDate":{"type":"string","description":"Start date for amortization","format":"date","nullable":true},"amortizationEndDate":{"type":"string","description":"End date for amortization","format":"date","nullable":true}}},"ExternalCreditNoteLineV1Model":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the object","format":"uuid"},"companyId":{"type":"string","description":"ID of the company","format":"uuid"},"creditNoteId":{"type":"string","description":"ID of the credit note this line belongs to","format":"uuid"},"grossTransactionAmount":{"$ref":"#/components/schemas/DirectedAmount"},"netTransactionAmount":{"$ref":"#/components/schemas/DirectedAmount"},"description":{"type":"string","description":"Description of the credit note line item","nullable":true},"ledgerTaxId":{"type":"string","description":"ID of the tax code","format":"uuid","nullable":true},"taxTransactionAmount":{"$ref":"#/components/schemas/DirectedAmount"},"ledgerAccountId":{"type":"string","description":"ID of the ledger account","format":"uuid","nullable":true},"costCenterId":{"type":"string","description":"ID of the cost center","format":"uuid","nullable":true},"createdAt":{"type":"string","description":"Timestamp when the credit note line item was created","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the credit note line item was last updated","format":"date-time"},"accrualTemplateId":{"type":"string","description":"ID of the accrual template","format":"uuid","nullable":true},"accrualStartDate":{"type":"string","description":"Start date for accrual","format":"date","nullable":true},"accrualEndDate":{"type":"string","description":"End date for accrual","format":"date","nullable":true},"accrualDefaultDuration":{"type":"integer","description":"Default duration for accrual in months","format":"int32","nullable":true}}},"ExternalCreditNoteV1Model":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the object","format":"uuid"},"companyId":{"type":"string","description":"ID of the company","format":"uuid"},"companyEntityId":{"type":"string","description":"ID of the entity","format":"uuid","nullable":true},"amount":{"type":"integer","description":"Total credit note amount in cents","format":"int64","nullable":true},"businessPartnerName":{"type":"string","description":"Name of the vendor","nullable":true},"businessPartnerId":{"type":"string","description":"ID of the vendor","format":"uuid","nullable":true},"status":{"type":"string","description":"Status of the credit note\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["DRAFT","APPROVAL_PENDING","APPROVED","POSTED","PARTIALLY_CLEARED","CLEARED","ARCHIVED"]},"description":{"type":"string","description":"Description of the credit note","nullable":true},"currency":{"type":"string","example":"USD"},"postingDate":{"type":"string","description":"Date when the credit note should be posted to the ledger","format":"date","nullable":true},"documentDate":{"type":"string","description":"Date when the credit note was issued","format":"date","nullable":true},"valuationDate":{"type":"string","description":"Date used when applying foreign exchange rate","format":"date","nullable":true},"areLinesWithTax":{"type":"boolean","description":"Whether the credit note line amount is inclusive of tax or not. True means tax is already included in the line amount and will not be added on top, false means tax will be added on top of the line amount"},"lines":{"type":"array","description":"List of credit note line items","items":{"$ref":"#/components/schemas/ExternalCreditNoteLineV1Model"}},"createdAt":{"type":"string","description":"Timestamp when the credit note was created","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the credit note was last updated","format":"date-time"},"updatedBy":{"type":"string","description":"ID of the user who last updated the credit note","format":"uuid","nullable":true},"localCurrencyFxRate":{"type":"number","description":"FX rate applied for the ledger's local currency","nullable":true},"groupCurrencyFxRate":{"type":"number","description":"FX rate applied for the ledger's group currency","nullable":true},"senderEmail":{"type":"string","description":"The email of the user who sent the document that this credit note was created from","nullable":true},"documentName":{"type":"string","description":"The name of the document that this credit note was created from","nullable":true}}},"ExternalCreateCreditNoteLineRequestV1Model":{"type":"object","properties":{"netTransactionAmount":{"$ref":"#/components/schemas/DirectedAmount"},"grossTransactionAmount":{"$ref":"#/components/schemas/DirectedAmount"},"taxTransactionAmount":{"$ref":"#/components/schemas/DirectedAmount"},"description":{"type":"string","description":"Line description","nullable":true},"ledgerTaxId":{"type":"string","description":"ID of the tax code","format":"uuid","nullable":true},"ledgerAccountId":{"type":"string","description":"ID of the ledger account","format":"uuid","nullable":true},"customProperties":{"type":"array","description":"List of custom properties for this line","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}},"accrualTemplateId":{"type":"string","description":"ID of the accrual template","format":"uuid","nullable":true},"accrualStartDate":{"type":"string","description":"Start date for accrual","format":"date","nullable":true},"accrualEndDate":{"type":"string","description":"End date for accrual","format":"date","nullable":true}}},"ExternalCreateCreditNoteRequestV1Model":{"type":"object","properties":{"companyEntityId":{"type":"string","description":"ID of the entity","format":"uuid","nullable":true},"currency":{"type":"string","example":"USD"},"documentDate":{"type":"string","description":"Date when the credit note was issued","format":"date"},"businessPartnerId":{"type":"string","description":"ID of the vendor (required if the credit note will be linked to an invoice payable)","format":"uuid","nullable":true},"description":{"type":"string","description":"Description of the credit note","nullable":true},"amount":{"type":"integer","description":"Total credit note amount in cents","format":"int64","nullable":true},"areLinesWithTax":{"type":"boolean","description":"Whether line amounts include tax. true = tax included (gross), false = tax added on top (net)"},"documentNumber":{"type":"string","description":"Unique credit note number. When provided, it is also used for idempotency — retrying a create with the same documentNumber returns the existing credit note. If omitted, a number is generated automatically.","nullable":true},"customProperties":{"type":"array","description":"List of custom properties","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}},"lines":{"type":"array","description":"List of credit note line items","items":{"$ref":"#/components/schemas/ExternalCreateCreditNoteLineRequestV1Model"}},"localCurrencyFxRateOverride":{"type":"number","description":"Custom FX rate for the ledger's local currency. If not provided, Light uses official ECB rates.","nullable":true},"groupCurrencyFxRateOverride":{"type":"number","description":"Custom FX rate for the ledger's group currency. If not provided, Light uses official ECB rates.","nullable":true}}},"ExternalPaginatedResponseV1ModelExternalCreditNoteV1Model":{"type":"object","properties":{"records":{"type":"array","description":"List of records for the current page","items":{"$ref":"#/components/schemas/ExternalCreditNoteV1Model"}},"hasMore":{"type":"boolean","description":"Boolean flag indicating if there are more records available"},"total":{"type":"integer","description":"Total number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination.","format":"int64","nullable":true,"deprecated":true},"nextCursor":{"type":"string","description":"Cursor for fetching the next page (only for cursor pagination)","nullable":true},"prevCursor":{"type":"string","description":"Cursor for fetching the previous page (only for cursor pagination)","nullable":true}}},"ExternalCreditNoteInvoicePayableV1Model":{"type":"object","properties":{"companyId":{"type":"string","description":"ID of the company","format":"uuid"},"creditNote":{"$ref":"#/components/schemas/ExternalRelatedAccDocV1Model"},"invoicePayable":{"$ref":"#/components/schemas/ExternalRelatedAccDocV1Model"},"amount":{"type":"integer","description":"Clearing amount in cents","format":"int64"},"currency":{"type":"string","example":"USD"},"createdAt":{"type":"string","description":"Timestamp when the link was created","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the link was last updated","format":"date-time"}}},"ExternalRelatedAccDocV1Model":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the object","format":"uuid"},"documentNumber":{"type":"string","description":"Document number","nullable":true},"documentDate":{"type":"string","description":"Date the accounting document was issued","format":"date","nullable":true},"postingDate":{"type":"string","description":"Date the accounting document is posted to the ledger","format":"date","nullable":true},"status":{"type":"string","description":"Status of the accounting document\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["DRAFT","APPROVAL_PENDING","APPROVED","POSTED","PARTIALLY_CLEARED","CLEARED","ARCHIVED"]},"amount":{"type":"integer","description":"The amount of the accounting document in cents","format":"int64","nullable":true},"currency":{"type":"string","example":"USD"}},"description":"Invoice payable details"},"ExternalCreateCreditNoteInvoicePayableRequestV1Model":{"type":"object","properties":{"amount":{"type":"integer","description":"Amount to clear in cents","format":"int64"}}},"ExternalUpdateCreditNoteRequestV1Model":{"type":"object","properties":{"companyEntityId":{"type":"string","description":"ID of the entity","format":"uuid","nullable":true},"businessPartnerId":{"type":"string","description":"ID of the vendor","format":"uuid","nullable":true},"documentDate":{"type":"string","description":"Date when the credit note was issued","format":"date","nullable":true},"areLinesWithTax":{"type":"boolean","description":"Whether line amounts include tax. true = tax included (gross), false = tax added on top (net)","nullable":true},"customProperties":{"type":"array","description":"List of custom properties","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}},"description":{"type":"string","description":"Description of the credit note","nullable":true},"currency":{"type":"string","nullable":true,"example":"USD"},"amount":{"type":"integer","description":"Total credit note amount in cents","format":"int64","nullable":true},"documentNumber":{"type":"string","description":"Unique credit note number","nullable":true},"localCurrencyFxRateOverride":{"type":"number","description":"Custom FX rate for the ledger's local currency. If not provided, Light uses official ECB rates.","nullable":true},"groupCurrencyFxRateOverride":{"type":"number","description":"Custom FX rate for the ledger's group currency. If not provided, Light uses official ECB rates.","nullable":true}}},"ExternalUpdateCreditNoteLineRequestV1Model":{"type":"object","properties":{"customProperties":{"type":"array","description":"List of custom properties for this line","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}},"netTransactionAmount":{"$ref":"#/components/schemas/DirectedAmount"},"grossTransactionAmount":{"$ref":"#/components/schemas/DirectedAmount"},"taxTransactionAmount":{"$ref":"#/components/schemas/DirectedAmount"},"description":{"type":"string","description":"Line description","nullable":true},"ledgerTaxId":{"type":"string","description":"ID of the tax code","format":"uuid","nullable":true},"ledgerAccountId":{"type":"string","description":"ID of the ledger account","format":"uuid","nullable":true},"accrualTemplateId":{"type":"string","description":"ID of the accrual template","format":"uuid","nullable":true},"accrualStartDate":{"type":"string","description":"Start date for accrual","format":"date","nullable":true},"accrualEndDate":{"type":"string","description":"End date for accrual","format":"date","nullable":true}}},"ExternalUpdateCreditNoteInvoicePayableAmountRequestV1Model":{"type":"object","properties":{"amount":{"type":"integer","description":"Updated amount to clear in cents","format":"int64"}}},"ExternalCreateCustomPropertyValueRequestV1Model":{"type":"object","properties":{"internalName":{"type":"string","description":"Unique internal name for the custom property value."},"label":{"type":"string","description":"Display label for the custom property value."},"context":{"type":"string","description":"Optional context or description for the custom property value.","nullable":true}}},"ExternalCustomPropertyGroupV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"companyId":{"type":"string","format":"uuid"},"label":{"type":"string"},"internalName":{"type":"string"},"inputType":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["SINGLE_SELECT","MULTI_SELECT","NUMERIC","TEXT","BOOLEAN","DATE"]},"objectLevel":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["HEADER","LINE"]},"objectTypes":{"uniqueItems":true,"type":"array","items":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["BILL","CARD_TRANSACTION","CREDIT_NOTE","CONTRACT","CUSTOMER","CUSTOMER_CREDIT","INVOICE","JOURNAL_ENTRY","LEDGER_ACCOUNT","PRODUCT","PURCHASE_ORDER","PURCHASE_REQUEST","REIMBURSEMENT","VENDOR"]}},"objectTypeStatuses":{"type":"object","additionalProperties":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["ACTIVE","DELETED"]}},"isRequired":{"type":"boolean"},"context":{"type":"string"},"values":{"type":"array","items":{"$ref":"#/components/schemas/ExternalCustomPropertyValueV1Model"}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"description":"List of records for the current page"},"ExternalPaginatedResponseV1ModelExternalCustomPropertyGroupV1Model":{"type":"object","properties":{"records":{"type":"array","description":"List of records for the current page","items":{"$ref":"#/components/schemas/ExternalCustomPropertyGroupV1Model"}},"hasMore":{"type":"boolean","description":"Boolean flag indicating if there are more records available"},"total":{"type":"integer","description":"Total number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination.","format":"int64","nullable":true,"deprecated":true},"nextCursor":{"type":"string","description":"Cursor for fetching the next page (only for cursor pagination)","nullable":true},"prevCursor":{"type":"string","description":"Cursor for fetching the previous page (only for cursor pagination)","nullable":true}}},"ExternalPaginatedResponseV1ModelExternalCustomPropertyValueV1Model":{"type":"object","properties":{"records":{"type":"array","description":"List of records for the current page","items":{"$ref":"#/components/schemas/ExternalCustomPropertyValueV1Model"}},"hasMore":{"type":"boolean","description":"Boolean flag indicating if there are more records available"},"total":{"type":"integer","description":"Total number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination.","format":"int64","nullable":true,"deprecated":true},"nextCursor":{"type":"string","description":"Cursor for fetching the next page (only for cursor pagination)","nullable":true},"prevCursor":{"type":"string","description":"Cursor for fetching the previous page (only for cursor pagination)","nullable":true}}},"ExternalUpdateCustomPropertyValueRequestV1Model":{"type":"object","properties":{"label":{"type":"string","description":"Display label for the custom property value.","nullable":true},"context":{"type":"string","description":"Optional context or description for the custom property value.","nullable":true}}},"ExternalCustomerCreditLineV1Model":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the object","format":"uuid"},"companyId":{"type":"string","description":"ID of the company","format":"uuid"},"customerCreditId":{"type":"string","description":"ID of the customer credit this line belongs to","format":"uuid"},"grossTransactionAmount":{"$ref":"#/components/schemas/DirectedAmount"},"netTransactionAmount":{"$ref":"#/components/schemas/DirectedAmount"},"description":{"type":"string","description":"Description of the customer credit line item","nullable":true},"ledgerTaxId":{"type":"string","description":"ID of the tax code","format":"uuid","nullable":true},"taxTransactionAmount":{"$ref":"#/components/schemas/DirectedAmount"},"ledgerAccountId":{"type":"string","description":"ID of the ledger account","format":"uuid","nullable":true},"avataxCode":{"type":"string","description":"Avalara tax code. Used when the customer credit tax engine is AVATAX","nullable":true},"productId":{"type":"string","description":"ID of the product","format":"uuid"},"quantity":{"type":"number","description":"Quantity of the product"},"createdAt":{"type":"string","description":"Timestamp when the customer credit was created","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the customer credit was last updated","format":"date-time"},"accrualTemplateId":{"type":"string","description":"ID of the accrual template","format":"uuid","nullable":true},"accrualStartDate":{"type":"string","description":"Start date for accrual","format":"date","nullable":true},"accrualEndDate":{"type":"string","description":"End date for accrual","format":"date","nullable":true},"accrualDefaultDuration":{"type":"integer","description":"Default duration for accrual in months","format":"int32","nullable":true}}},"ExternalCustomerCreditV1Model":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the object","format":"uuid"},"companyId":{"type":"string","description":"ID of the company","format":"uuid"},"companyEntityId":{"type":"string","description":"ID of the entity","format":"uuid","nullable":true},"amount":{"type":"integer","description":"Total customer credit amount in cents","format":"int64","nullable":true},"customerName":{"type":"string","description":"Name of the customer","nullable":true},"customerId":{"type":"string","description":"ID of the customer","format":"uuid","nullable":true},"status":{"type":"string","description":"Status of the customer credit\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["DRAFT","APPROVAL_PENDING","APPROVED","POSTED","PARTIALLY_CLEARED","CLEARED","ARCHIVED"]},"description":{"type":"string","description":"Description of the customer credit","nullable":true},"currency":{"type":"string","example":"USD"},"documentDate":{"type":"string","description":"Customer-facing issue date override. Null means customer-facing documents use the posting date","format":"date","nullable":true},"postingDate":{"type":"string","description":"Date when the customer credit is posted to the ledger","format":"date","nullable":true},"valuationDate":{"type":"string","description":"Date used when applying foreign exchange rate","format":"date","nullable":true},"areLinesWithTax":{"type":"boolean","description":"Whether the customer credit line amount is inclusive of tax or not. True means tax is already included in the line amount and will not be added on top, false means tax will be added on top of the line amount"},"lines":{"type":"array","description":"List of customer credit line items","items":{"$ref":"#/components/schemas/ExternalCustomerCreditLineV1Model"}},"createdAt":{"type":"string","description":"Timestamp when the customer credit was created","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the customer credit was last updated","format":"date-time"},"updatedBy":{"type":"string","description":"ID of the user who last updated the customer credit","format":"uuid","nullable":true},"paymentReference":{"type":"string","description":"Payment reference generated when the customer credit is posted","nullable":true},"linkedInvoiceReceivable":{"$ref":"#/components/schemas/ExternalRelatedAccDocV1Model"}}},"ExternalCreateCustomerCreditLineRequestV1Model":{"type":"object","properties":{"productId":{"type":"string","description":"ID of the product","format":"uuid"},"quantity":{"type":"number","description":"Quantity of the product"},"netTransactionAmount":{"$ref":"#/components/schemas/DirectedAmount"},"grossTransactionAmount":{"$ref":"#/components/schemas/DirectedAmount"},"taxTransactionAmount":{"$ref":"#/components/schemas/DirectedAmount"},"description":{"type":"string","description":"Description of the customer credit line item","nullable":true},"ledgerTaxId":{"type":"string","description":"ID of the tax code","format":"uuid","nullable":true},"ledgerAccountId":{"type":"string","description":"ID of the ledger account","format":"uuid","nullable":true},"avataxCode":{"type":"string","description":"Avalara tax code. Used when the customer credit tax engine is AVATAX","nullable":true},"customProperties":{"type":"array","description":"List of custom properties associated with the line","nullable":true,"items":{"$ref":"#/components/schemas/SetCustomPropertyRequestV1Model"}},"accrualTemplateId":{"type":"string","description":"ID of the accrual template","format":"uuid","nullable":true},"accrualStartDate":{"type":"string","description":"Start date for accrual","format":"date","nullable":true},"accrualEndDate":{"type":"string","description":"End date for accrual","format":"date","nullable":true}}},"ExternalCreateCustomerCreditRequestV1Model":{"type":"object","properties":{"companyEntityId":{"type":"string","description":"ID of the entity","format":"uuid","nullable":true},"documentNumber":{"type":"string","description":"Unique customer credit number. If not provided, one will be generated automatically when the invoice is opened.","nullable":true},"description":{"type":"string","description":"Description of the customer credit","nullable":true},"currency":{"type":"string","nullable":true,"example":"USD"},"localCurrencyFxRate":{"type":"number","description":"Custom foreign exchange rate for the ledger's local currency. If not provided Light uses official ECB rates","nullable":true},"groupCurrencyFxRate":{"type":"number","description":"Custom foreign exchange rate for the ledger's group currency. If not provided Light uses official ECB rates","nullable":true},"documentDate":{"type":"string","description":"Date when the customer credit was issued","format":"date","nullable":true},"postingDate":{"type":"string","description":"Date when the customer credit is posted to the ledger. Defaults to the document date, or today if both dates are omitted","format":"date","nullable":true},"documentTemplateId":{"type":"string","description":"ID of the document template that the customer credit will use","format":"uuid","nullable":true},"areLinesWithTax":{"type":"boolean","description":"Whether the customer credit line amount is inclusive of tax or not. True means tax is already included in the line amount and will not be added on top, false means tax will be added on top of the line amount"},"customerId":{"type":"string","description":"ID of the customer","format":"uuid","nullable":true},"amount":{"type":"integer","description":"Total customer credit amount in cents","format":"int64","nullable":true},"lines":{"type":"array","description":"List of customer credit line items","items":{"$ref":"#/components/schemas/ExternalCreateCustomerCreditLineRequestV1Model"}},"customProperties":{"type":"array","description":"List of custom properties associated with the customer credit","nullable":true,"items":{"$ref":"#/components/schemas/SetCustomPropertyRequestV1Model"}}}},"ExternalCustomerCreditPdfDocumentV1Model":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the PDF document","format":"uuid"},"customerCreditId":{"type":"string","description":"ID of the customer credit","format":"uuid"},"status":{"type":"string","description":"Current status of the PDF document generation\n\n- `GENERATING` - The PDF is currently being generated\n- `READY` - The PDF has been generated and is ready for download\n- `FAILED` - The PDF generation failed\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["GENERATING","READY","FAILED"]},"url":{"type":"string","description":"Signed URL to download the PDF document. Only available when status is READY. The URL is temporary and should not be stored and reused. To download again, call the endpoint to get a fresh URL.","format":"url","nullable":true},"createdAt":{"type":"string","description":"Timestamp when the document was created","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the document was last updated","format":"date-time"}}},"ExternalCursorPaginatedResponseV1ModelExternalCustomerCreditV1Model":{"type":"object","properties":{"records":{"type":"array","description":"List of records for the current page","items":{"$ref":"#/components/schemas/ExternalCustomerCreditV1Model"}},"hasMore":{"type":"boolean","description":"Boolean flag indicating if there are more records available"},"nextCursor":{"type":"string","description":"Cursor for fetching the next page","nullable":true},"prevCursor":{"type":"string","description":"Cursor for fetching the previous page","nullable":true}}},"ExternalCustomerCreditInvoiceReceivableV1Model":{"type":"object","properties":{"companyId":{"type":"string","description":"ID of the company","format":"uuid"},"customerCredit":{"$ref":"#/components/schemas/ExternalRelatedAccDocV1Model"},"invoiceReceivable":{"$ref":"#/components/schemas/ExternalRelatedAccDocV1Model"},"amount":{"type":"integer","description":"Amount of the customer credit applied to the sales invoice, in the smallest currency unit","format":"int64"},"linkedAt":{"type":"string","description":"Timestamp when the customer credit was linked to the sales invoice","format":"date-time"}}},"ExternalLinkCustomerCreditToInvoiceReceivableRequestV1Model":{"type":"object","properties":{"amount":{"type":"integer","description":"Amount of the customer credit to apply to the sales invoice, in the smallest currency unit. If omitted, the remaining unallocated customer-credit balance is applied, capped by the invoice receivable's remaining balance. Partial allocation is not supported for entities configured with an e-invoicing provider.","format":"int64","nullable":true}}},"ExternalCustomerCreditEmailInfoRequestV1Model":{"type":"object","properties":{"subject":{"type":"string","description":"Email subject line"},"replyTo":{"type":"string","description":"Reply-to email address"},"recipients":{"type":"array","description":"List of email addresses to send the customer credit to","items":{"type":"string","description":"List of email addresses to send the customer credit to"}},"cc":{"type":"array","description":"List of email addresses to CC on the email","nullable":true,"items":{"type":"string","description":"List of email addresses to CC on the email","nullable":true}},"customMessage":{"type":"string","description":"Optional custom message added to the email body","nullable":true}},"description":"Email configuration for sending the customer credit."},"ExternalPostAndSendCustomerCreditRequestV1Model":{"type":"object","properties":{"emailInfo":{"$ref":"#/components/schemas/ExternalCustomerCreditEmailInfoRequestV1Model"},"shouldSubmitEInvoice":{"type":"boolean","description":"Whether to submit the customer credit to the e-invoicing system (if configured). If true, the e-credit note will be submitted. If false, it will not. If omitted (null), the system will auto-detect: submit if the linked invoice has an e-invoice ID.","nullable":true}}},"ExternalPostCustomerCreditRequestV1Model":{"type":"object","properties":{"shouldSubmitEInvoice":{"type":"boolean","description":"Whether to submit the customer credit to the e-invoicing system (if configured). If true, the e-credit note will be submitted. If false, it will not. If omitted (null), the system will auto-detect: submit if the linked invoice has an e-invoice ID.","nullable":true}}},"ExternalUpdateCustomerCreditRequestV1Model":{"type":"object","properties":{"companyEntityId":{"type":"string","description":"ID of the entity","format":"uuid","nullable":true},"customerId":{"type":"string","description":"ID of the customer","format":"uuid","nullable":true},"postingDate":{"type":"string","description":"Date when the customer credit is posted to the ledger","format":"date","nullable":true},"areLinesWithTax":{"type":"boolean","description":"Whether the customer credit line amount is inclusive of tax or not. True means tax is already included in the line amount and will not be added on top, false means tax will be added on top of the line amount","nullable":true},"customProperties":{"type":"array","description":"List of custom properties associated with the customer credit","nullable":true,"items":{"$ref":"#/components/schemas/SetCustomPropertyRequestV1Model"}},"documentDate":{"type":"string","description":"Date when the customer credit was issued. Null inherits the posting date","format":"date","nullable":true},"description":{"type":"string","description":"Description of the customer credit","nullable":true},"currency":{"type":"string","nullable":true,"example":"USD"},"amount":{"type":"integer","description":"Total customer credit amount in cents","format":"int64","nullable":true},"documentNumber":{"type":"string","description":"Unique customer credit number. If not provided, one will be generated automatically when the invoice is opened.","nullable":true},"documentTemplateId":{"type":"string","description":"ID of the document template that the customer credit will use","format":"uuid","nullable":true}}},"ExternalUpdateCustomerCreditLineRequestV1Model":{"type":"object","properties":{"productId":{"type":"string","description":"ID of the product","format":"uuid","nullable":true},"quantity":{"type":"number","description":"Quantity of the product","nullable":true},"customProperties":{"type":"array","description":"List of custom properties associated with the line","nullable":true,"items":{"$ref":"#/components/schemas/SetCustomPropertyRequestV1Model"}},"netTransactionAmount":{"$ref":"#/components/schemas/DirectedAmount"},"grossTransactionAmount":{"$ref":"#/components/schemas/DirectedAmount"},"taxTransactionAmount":{"$ref":"#/components/schemas/DirectedAmount"},"description":{"type":"string","description":"Description of the customer credit line item","nullable":true},"ledgerTaxId":{"type":"string","description":"ID of the tax code","format":"uuid","nullable":true},"ledgerAccountId":{"type":"string","description":"ID of the ledger account","format":"uuid","nullable":true},"avataxCode":{"type":"string","description":"Avalara tax code. Used when the customer credit tax engine is AVATAX","nullable":true},"accrualTemplateId":{"type":"string","description":"ID of the accrual template","format":"uuid","nullable":true},"accrualStartDate":{"type":"string","description":"Start date for accrual","format":"date","nullable":true},"accrualEndDate":{"type":"string","description":"End date for accrual","format":"date","nullable":true}}},"ExternalApiExternalSourceV1Model":{"type":"object","properties":{"name":{"type":"string","description":"The name of the external source\n\n- `CHARGEBEE` - Data synced from Chargebee\n- `HUBSPOT` - Data synced from HubSpot\n- `SALESFORCE` - Data synced from Salesforce\n- `STRIPE` - Data synced from Stripe\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["CHARGEBEE","HUBSPOT","SALESFORCE","STRIPE"]},"externalId":{"type":"string","description":"The ID of the object in the external source system"}},"description":"The external system where this product was synced from","nullable":true},"ExternalCustomerV1Model":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the object","format":"uuid"},"name":{"type":"string","description":"Name of the customer"},"email":{"type":"string","description":"Email address of the customer","nullable":true},"address":{"$ref":"#/components/schemas/Address"},"billingAddress":{"$ref":"#/components/schemas/Address"},"shippingAddress":{"$ref":"#/components/schemas/Address"},"status":{"type":"string","description":"Current status of the customer\n\n- `ACTIVE` - The customer is active and can be used in invoices and contracts\n- `ARCHIVED` - The customer is archived and cannot be used in new invoices or contracts\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["ACTIVE","ARCHIVED"]},"description":{"type":"string","description":"Description or notes about the customer","nullable":true},"vatNumber":{"type":"string","description":"VAT number of the customer","nullable":true},"businessRegistrationNumber":{"type":"string","description":"Business registration number of the customer","nullable":true},"easCode":{"type":"string","description":"Electronic Address Scheme code used for sending e-invoices","nullable":true},"einvoiceAddress":{"type":"string","description":"E-invoice address for the customer","nullable":true},"einvoiceNetwork":{"type":"string","description":"E-invoice network the customer is registered on\n\n- `FINVOICE` - Finland Finvoice e-invoice network\n- `FR_PA` - France Plateforme Agréée (Chorus Pro / Annuaire) e-invoice network\n- `MYDATA` - Greece myDATA e-invoice network\n- `NEMHANDEL` - NemHandel e-invoice network\n- `PEPPOL` - Peppol e-invoice network\n- `PORTUGUESE_TAX_REPORTING` - Portuguese tax reporting (ATCUD) e-invoice network\n- `SDI` - SDI (Sistema di Interscambio) e-invoice network\n- `VERIFACTU` - Spain VERI*FACTU tax reporting e-invoice network\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["FINVOICE","FR_PA","MYDATA","NEMHANDEL","PEPPOL","PORTUGUESE_TAX_REPORTING","SDI","VERIFACTU"]},"type":{"type":"string","description":"Type of customer\n\n- `BUSINESS` - Business customer\n- `CONSUMER` - Consumer customer\n- `GOVERNMENT` - Government customer\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["BUSINESS","CONSUMER","GOVERNMENT"]},"representedCompanyEntityId":{"type":"string","description":"ID of the company entity this business partner represents. Set when Light creates the partner for intercompany invoicing, or when a user links an existing one; null for ordinary customers.","format":"uuid","nullable":true},"defaultTaxId":{"type":"string","description":"Stored default tax code ID for the customer","format":"uuid","nullable":true},"logoUrl":{"type":"string","description":"URL to the customer's logo","nullable":true},"domain":{"type":"string","description":"Domain of the customer's website","nullable":true},"externalSource":{"$ref":"#/components/schemas/ExternalApiExternalSourceV1Model"},"createdAt":{"type":"string","description":"Timestamp when the customer was created","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the customer was last updated","format":"date-time"},"customProperties":{"type":"array","description":"List of custom properties associated with the customer","nullable":true,"items":{"$ref":"#/components/schemas/ExternalCustomPropertyV1Model"}},"recipientEmails":{"type":"array","description":"Billing email recipients (\"Send to\") used when sending invoices to this customer","items":{"type":"string","description":"Billing email recipients (\"Send to\") used when sending invoices to this customer"}},"ccEmails":{"type":"array","description":"Billing email CC recipients used when sending invoices to this customer","items":{"type":"string","description":"Billing email CC recipients used when sending invoices to this customer"}}}},"ExternalCreateCustomerRequestV1Model":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","nullable":true},"address":{"$ref":"#/components/schemas/Address"},"billingAddress":{"$ref":"#/components/schemas/Address"},"shippingAddress":{"$ref":"#/components/schemas/Address"},"domain":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"vatNumber":{"type":"string","nullable":true},"businessRegistrationNumber":{"type":"string","nullable":true},"easCode":{"type":"string","nullable":true},"einvoiceAddress":{"type":"string","nullable":true},"einvoiceNetwork":{"type":"string","description":"- `FINVOICE` - Finland Finvoice e-invoice network\n- `FR_PA` - France Plateforme Agréée (Chorus Pro / Annuaire) e-invoice network\n- `MYDATA` - Greece myDATA e-invoice network\n- `NEMHANDEL` - NemHandel e-invoice network\n- `PEPPOL` - Peppol e-invoice network\n- `PORTUGUESE_TAX_REPORTING` - Portuguese tax reporting (ATCUD) e-invoice network\n- `SDI` - SDI (Sistema di Interscambio) e-invoice network\n- `VERIFACTU` - Spain VERI*FACTU tax reporting e-invoice network\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"enum":["FINVOICE","FR_PA","MYDATA","NEMHANDEL","PEPPOL","PORTUGUESE_TAX_REPORTING","SDI","VERIFACTU"]},"type":{"type":"string","description":"- `BUSINESS` - Business customer\n- `CONSUMER` - Consumer customer\n- `GOVERNMENT` - Government customer\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"enum":["BUSINESS","CONSUMER","GOVERNMENT"]},"defaultTaxId":{"type":"string","description":"ID of an active sales tax code to store as the customer's default. Saving this preference does not change existing invoice or contract lines.","format":"uuid","nullable":true},"logoUrl":{"type":"string","nullable":true},"customProperties":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}},"recipientEmails":{"type":"array","description":"Billing email recipients (\"Send to\") used when sending invoices to this customer","nullable":true,"items":{"type":"string","description":"Billing email recipients (\"Send to\") used when sending invoices to this customer","nullable":true}},"ccEmails":{"type":"array","description":"Billing email CC recipients used when sending invoices to this customer","nullable":true,"items":{"type":"string","description":"Billing email CC recipients used when sending invoices to this customer","nullable":true}},"externalSource":{"$ref":"#/components/schemas/ExternalCustomerExternalSourceV1Model"}}},"ExternalCustomerExternalSourceV1Model":{"type":"object","properties":{"name":{"type":"string","description":"The system the ID comes from\n\n- `HUBSPOT` - Customer from HubSpot\n- `SALESFORCE` - Customer from Salesforce\n- `STRIPE` - Customer from Stripe\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["HUBSPOT","SALESFORCE","STRIPE"]},"externalId":{"type":"string","description":"The ID of the customer in the external system"}},"description":"The customer's ID in an external system and the system it comes from. Rejected when another customer already has the same ID from the same system.","nullable":true},"ExternalPaginatedResponseV1ModelExternalCustomerV1Model":{"type":"object","properties":{"records":{"type":"array","description":"List of records for the current page","items":{"$ref":"#/components/schemas/ExternalCustomerV1Model"}},"hasMore":{"type":"boolean","description":"Boolean flag indicating if there are more records available"},"total":{"type":"integer","description":"Total number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination.","format":"int64","nullable":true,"deprecated":true},"nextCursor":{"type":"string","description":"Cursor for fetching the next page (only for cursor pagination)","nullable":true},"prevCursor":{"type":"string","description":"Cursor for fetching the previous page (only for cursor pagination)","nullable":true}}},"ExternalUpdateCustomerRequestV1Model":{"type":"object","properties":{"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"address":{"$ref":"#/components/schemas/Address"},"billingAddress":{"$ref":"#/components/schemas/Address"},"customProperties":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}},"shippingAddress":{"$ref":"#/components/schemas/Address"},"domain":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"vatNumber":{"type":"string","nullable":true},"businessRegistrationNumber":{"type":"string","nullable":true},"easCode":{"type":"string","nullable":true},"einvoiceAddress":{"type":"string","nullable":true},"einvoiceNetwork":{"type":"string","description":"- `FINVOICE` - Finland Finvoice e-invoice network\n- `FR_PA` - France Plateforme Agréée (Chorus Pro / Annuaire) e-invoice network\n- `MYDATA` - Greece myDATA e-invoice network\n- `NEMHANDEL` - NemHandel e-invoice network\n- `PEPPOL` - Peppol e-invoice network\n- `PORTUGUESE_TAX_REPORTING` - Portuguese tax reporting (ATCUD) e-invoice network\n- `SDI` - SDI (Sistema di Interscambio) e-invoice network\n- `VERIFACTU` - Spain VERI*FACTU tax reporting e-invoice network\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"enum":["FINVOICE","FR_PA","MYDATA","NEMHANDEL","PEPPOL","PORTUGUESE_TAX_REPORTING","SDI","VERIFACTU"]},"type":{"type":"string","description":"- `BUSINESS` - Business customer\n- `CONSUMER` - Consumer customer\n- `GOVERNMENT` - Government customer\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"enum":["BUSINESS","CONSUMER","GOVERNMENT"]},"defaultTaxId":{"type":"string","description":"Default tax code ID. Must be an active sales tax. Omit to leave unchanged; send null to clear. Saving this preference does not change existing invoice or contract lines.","format":"uuid","nullable":true},"logoUrl":{"type":"string","nullable":true},"recipientEmails":{"type":"array","description":"Billing email recipients (\"Send to\"). Omit to leave unchanged; send an empty list to clear.","nullable":true,"items":{"type":"string","description":"Billing email recipients (\"Send to\"). Omit to leave unchanged; send an empty list to clear.","nullable":true}},"ccEmails":{"type":"array","description":"Billing email CC recipients. Omit to leave unchanged; send an empty list to clear.","nullable":true,"items":{"type":"string","description":"Billing email CC recipients. Omit to leave unchanged; send an empty list to clear.","nullable":true}},"externalSource":{"$ref":"#/components/schemas/ExternalCustomerExternalSourceV1Model"}}},"ExternalDocumentTemplateV1Model":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the object","format":"uuid"},"name":{"type":"string","description":"Name of the template"},"description":{"type":"string","description":"Free-text description of the template","nullable":true},"documentType":{"type":"string","description":"The kind of document the template produces\n\n- `CUSTOMER_CREDIT` - Credit note issued to a customer\n- `INVOICE_PAYABLE_SELF_BILLED` - Self-billed invoice issued on behalf of a vendor\n- `INVOICE_RECEIVABLE` - Sales invoice issued to a customer\n- `PURCHASE_ORDER` - Purchase order sent to a vendor\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["CUSTOMER_CREDIT","INVOICE_PAYABLE_SELF_BILLED","INVOICE_RECEIVABLE","PURCHASE_ORDER"]},"companyEntityIds":{"uniqueItems":true,"type":"array","description":"IDs of the company entities the template applies to","items":{"type":"string","description":"IDs of the company entities the template applies to","format":"uuid"}},"state":{"type":"string","description":"Whether the template is active or archived\n\n- `ACTIVE` - The template can be assigned to new documents\n- `ARCHIVED` - The template is archived and can no longer be assigned\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["ACTIVE","ARCHIVED"]}}},"ExternalGetAllResponseV1ModelExternalDocumentTemplateV1Model":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"records":{"type":"array","items":{"$ref":"#/components/schemas/ExternalDocumentTemplateV1Model"}}}},"ExternalSelfBilledEInvoiceLineV1Model":{"type":"object","properties":{"description":{"type":"string","nullable":true},"ledgerTaxId":{"type":"string","description":"The tax code's ID as stored on the line","format":"uuid","nullable":true},"taxName":{"type":"string","description":"The tax code's name as stored on the line","nullable":true},"edifactCode":{"type":"string","description":"The tax code's UNCL5305 code as stored on the line\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["AE","E","G","K","L","M","O","S","Z"]},"taxCategory":{"type":"string","description":"Whether the tax code is for goods or for services, as stored on the line\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["GOODS","SERVICES"]},"quantity":{"type":"number","nullable":true},"rate":{"type":"number","description":"The tax rate as a fraction, so 0.22 is 22%","nullable":true},"netTransactionAmount":{"$ref":"#/components/schemas/DirectedAmount"},"taxTransactionAmount":{"$ref":"#/components/schemas/DirectedAmount"},"countryProperties":{"type":"object","additionalProperties":{"type":"array","description":"The tax code's country property values, by group internal name, as stored on the line","items":{"type":"string","description":"The tax code's country property values, by group internal name, as stored on the line"}},"description":"The tax code's country property values, by group internal name, as stored on the line"}},"description":"A line on a self-billed e-invoice"},"ExternalSelfBilledEInvoiceV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"companyEntityId":{"type":"string","format":"uuid"},"accountingDocumentId":{"type":"string","description":"The accounting document the e-invoice was created for. Null once the accounting document is deleted","format":"uuid","nullable":true},"accountingDocumentType":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"enum":["AP","AR","BP","CC","CN","CT","DE","FX","JE","YC"]},"linkedSelfBilledEInvoiceId":{"type":"string","format":"uuid","nullable":true},"type":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["SELF_BILLED_CREDIT_NOTE","SELF_BILLED_INVOICE"]},"network":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["FINVOICE","FR_PA","MYDATA","NEMHANDEL","PEPPOL","PORTUGUESE_TAX_REPORTING","SDI","VERIFACTU"]},"selfBilledEInvoiceNumber":{"type":"string","nullable":true},"issueDate":{"type":"string","description":"The date on the self-billed e-invoice","format":"date"},"deadline":{"type":"string","description":"The last day to send the e-invoice to the network","format":"date","nullable":true},"documentNumber":{"type":"string","description":"The number on the supplier's document","nullable":true},"documentDate":{"type":"string","description":"The date of the supplier's document","format":"date","nullable":true},"currency":{"type":"string","nullable":true,"example":"USD"},"amount":{"type":"integer","description":"Total amount in cents, expressed in the invoice currency.","format":"int64","nullable":true},"netAmount":{"$ref":"#/components/schemas/DirectedAmount"},"taxAmount":{"$ref":"#/components/schemas/DirectedAmount"},"buyerName":{"type":"string"},"buyerVatNumber":{"type":"string"},"buyerBusinessRegistrationNumber":{"type":"string","nullable":true},"supplierName":{"type":"string"},"supplierVatNumber":{"type":"string","nullable":true},"supplierBusinessRegistrationNumber":{"type":"string","nullable":true},"areLinesWithTax":{"type":"boolean","description":"How the accounting document's amounts were entered: true means with tax. Line amounts in this response are always net"},"buyerAddress":{"$ref":"#/components/schemas/Address"},"supplierAddress":{"$ref":"#/components/schemas/Address"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ExternalSelfBilledEInvoiceLineV1Model"}},"status":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["ACCEPTED","ARCHIVED","DRAFT","FAILED","SUBMITTED"]},"failureContext":{"$ref":"#/components/schemas/ExternalUiClientExceptionV1Model"},"einvoiceId":{"type":"string","nullable":true},"submittedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"sdiTdCode":{"type":"string","description":"The SDI document type code. Only set on the SDI network\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["TD16","TD17","TD18","TD19","TD20","TD21","TD22","TD23","TD28"]}},"description":"An e-invoice the company issues to itself for an accounting document, as some networks require"},"ExternalCursorPaginatedResponseV1ModelExternalSelfBilledEInvoiceListItemV1Model":{"type":"object","properties":{"records":{"type":"array","description":"List of records for the current page","items":{"$ref":"#/components/schemas/ExternalSelfBilledEInvoiceListItemV1Model"}},"hasMore":{"type":"boolean","description":"Boolean flag indicating if there are more records available"},"nextCursor":{"type":"string","description":"Cursor for fetching the next page","nullable":true},"prevCursor":{"type":"string","description":"Cursor for fetching the previous page","nullable":true}}},"ExternalSelfBilledEInvoiceListItemV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"companyEntityId":{"type":"string","format":"uuid"},"accountingDocumentId":{"type":"string","description":"The accounting document the e-invoice was created for. Null once the accounting document is deleted","format":"uuid","nullable":true},"accountingDocumentType":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"enum":["AP","AR","BP","CC","CN","CT","DE","FX","JE","YC"]},"linkedSelfBilledEInvoiceId":{"type":"string","format":"uuid","nullable":true},"type":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["SELF_BILLED_CREDIT_NOTE","SELF_BILLED_INVOICE"]},"network":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["FINVOICE","FR_PA","MYDATA","NEMHANDEL","PEPPOL","PORTUGUESE_TAX_REPORTING","SDI","VERIFACTU"]},"selfBilledEInvoiceNumber":{"type":"string","nullable":true},"issueDate":{"type":"string","description":"The date on the self-billed e-invoice","format":"date"},"deadline":{"type":"string","description":"The last day to send the e-invoice to the network","format":"date","nullable":true},"documentNumber":{"type":"string","description":"The number on the supplier's document","nullable":true},"documentDate":{"type":"string","description":"The date of the supplier's document","format":"date","nullable":true},"currency":{"type":"string","nullable":true,"example":"USD"},"amount":{"type":"integer","description":"Total amount in cents, expressed in the invoice currency.","format":"int64","nullable":true},"netAmount":{"$ref":"#/components/schemas/DirectedAmount"},"taxAmount":{"$ref":"#/components/schemas/DirectedAmount"},"buyerName":{"type":"string"},"buyerVatNumber":{"type":"string"},"supplierName":{"type":"string"},"supplierVatNumber":{"type":"string","nullable":true},"status":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["ACCEPTED","ARCHIVED","DRAFT","FAILED","SUBMITTED"]},"failureContext":{"$ref":"#/components/schemas/ExternalUiClientExceptionV1Model"},"einvoiceId":{"type":"string","nullable":true},"submittedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"sdiTdCode":{"type":"string","description":"The SDI document type code. Only set on the SDI network\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["TD16","TD17","TD18","TD19","TD20","TD21","TD22","TD23","TD28"]}},"description":"A self-billed e-invoice in a list. Get it by ID for its lines and addresses"},"ExternalExchangeRateV1Model":{"type":"object","properties":{"base":{"type":"string","example":"USD"},"target":{"type":"string","example":"USD"},"rate":{"type":"number","description":"Exchange rate between base and target currency"},"effectiveDate":{"type":"string","description":"Effective date of the exchange rate. E.g., rate requested on Saturday will have the effective date Friday","format":"date"},"requestedDate":{"type":"string","description":"Date the exchange rate is requested for","format":"date"}}},"ExternalExpenseLineItemV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"expenseId":{"type":"string","format":"uuid"},"originalAmount":{"type":"integer","format":"int64"},"billingAmount":{"type":"integer","format":"int64"},"accountId":{"type":"string","format":"uuid"},"costCenterId":{"type":"string","format":"uuid"},"description":{"type":"string"},"reimbursementCategoryId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"ExternalExpenseV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"receiptDocumentKey":{"type":"string"},"originalCurrency":{"type":"string","example":"USD"},"billingCurrency":{"type":"string","example":"USD"},"status":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["CREATED","IN_DRAFT","SUBMITTED_FOR_REVIEW","CANCELLED"]},"userId":{"type":"string","format":"uuid"},"companyId":{"type":"string","format":"uuid"},"performedDate":{"type":"string","format":"date"},"detailedDescription":{"type":"string"},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/ExternalExpenseLineItemV1Model"}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"ExternalCreateExpenseLineItemRequestV1Model":{"required":["description","originalAmount","reimbursementCategoryId"],"type":"object","properties":{"originalAmount":{"type":"integer","description":"Amount in minor units of originalCurrency (e.g. 1250 for 12.50)","format":"int64"},"billingAmount":{"type":"integer","description":"Amount in minor units of the user's reimbursement currency. Optional: equals originalAmount when the currencies match, otherwise derived from the exchange rate of performedDate.","format":"int64","nullable":true},"description":{"type":"string","description":"What the line is for; shown on the expense and on the reimbursement"},"reimbursementCategoryId":{"type":"string","description":"Reimbursement category of the line, which decides the GL account and tax code on the reimbursement. Must belong to the user's company entity.","format":"uuid"}},"description":"At least one line. The reimbursement category of a line drives the GL account and tax code of the reimbursement."},"ExternalCreateExpenseRequestV1Model":{"required":["lineItems","originalCurrency","performedDate","receiptDocumentKey"],"type":"object","properties":{"receiptDocumentKey":{"type":"string","description":"Key returned by POST /v1/expenses/upload-url called with shouldAutoCreateExpense=false, once the file has been uploaded. A PDF is attached as-is; JPEG, PNG, HEIC and TIFF files are converted to PDF first."},"originalCurrency":{"type":"string","example":"USD"},"performedDate":{"type":"string","description":"Date the expense was incurred; also the date of the exchange rate used when billingAmount is derived","format":"date"},"detailedDescription":{"type":"string","description":"Free-text description of the expense as a whole; each line carries its own description","nullable":true},"lineItems":{"type":"array","description":"At least one line. The reimbursement category of a line drives the GL account and tax code of the reimbursement.","items":{"$ref":"#/components/schemas/ExternalCreateExpenseLineItemRequestV1Model"}}}},"CreateExpenseLineItemRequestV1Model":{"type":"object","properties":{"originalAmount":{"type":"integer","format":"int64"},"billingAmount":{"type":"integer","format":"int64"},"accountId":{"type":"string","format":"uuid"},"costCenterId":{"type":"string","format":"uuid"},"description":{"type":"string"},"reimbursementCategoryId":{"type":"string","format":"uuid"}}},"ExternalExpenseReceiptUploadUrlResponseV1Model":{"type":"object","properties":{"uploadUrl":{"type":"string","format":"url"},"key":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"nullable":true}}},"ExternalExpenseReceiptUploadUrlRequestV1Model":{"required":["contentType","filename"],"type":"object","properties":{"filename":{"type":"string","description":"Name of the file being uploaded; kept as the receipt's file name"},"contentType":{"type":"string","description":"MIME type of the file: application/pdf, image/jpeg, image/png, image/heic, image/heif or image/tiff"},"shouldAutoCreateExpense":{"type":"boolean","description":"When true (default), the uploaded receipt is converted to PDF, an expense is created automatically and its fields are extracted by OCR. When false, the receipt is only stored: no expense is created and nothing is parsed; the caller creates the expense itself from the returned key.","default":true}}},"GetExternalExpensesResponseV1Model":{"type":"object","properties":{"billingAmountTotal":{"type":"integer","format":"int64"},"records":{"type":"array","description":"List of records for the current page","items":{"$ref":"#/components/schemas/ExternalExpenseV1Model"}},"hasMore":{"type":"boolean","description":"Boolean flag indicating if there are more records available"},"total":{"type":"integer","description":"Total number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination.","format":"int64","nullable":true,"deprecated":true},"nextCursor":{"type":"string","description":"Cursor for fetching the next page (only for cursor pagination)","nullable":true},"prevCursor":{"type":"string","description":"Cursor for fetching the previous page (only for cursor pagination)","nullable":true}}},"ExternalUpdateExpenseRequestV1Model":{"type":"object","properties":{"originalCurrency":{"type":"string","nullable":true,"example":"USD"},"performedDate":{"type":"string","format":"date","nullable":true}}},"UpdateExpenseLineItemRequestV1Model":{"type":"object","properties":{"originalAmount":{"type":"integer","format":"int64"},"billingAmount":{"type":"integer","format":"int64"},"accountId":{"type":"string","format":"uuid"},"costCenterId":{"type":"string","format":"uuid"},"description":{"type":"string"},"reimbursementCategoryId":{"type":"string","format":"uuid"}}},"ExternalCursorPaginatedResponseV1ModelExternalGeneralLedgerSummaryRowV1Model":{"type":"object","properties":{"records":{"type":"array","description":"List of records for the current page","items":{"$ref":"#/components/schemas/ExternalGeneralLedgerSummaryRowV1Model"}},"hasMore":{"type":"boolean","description":"Boolean flag indicating if there are more records available"},"nextCursor":{"type":"string","description":"Cursor for fetching the next page","nullable":true},"prevCursor":{"type":"string","description":"Cursor for fetching the previous page","nullable":true}}},"ExternalGeneralLedgerSummaryAmountsV1Model":{"type":"object","properties":{"openingBalance":{"$ref":"#/components/schemas/ExternalGeneralLedgerSummaryFigureV1Model"},"movement":{"$ref":"#/components/schemas/ExternalGeneralLedgerSummaryFigureV1Model"},"closingBalance":{"$ref":"#/components/schemas/ExternalGeneralLedgerSummaryFigureV1Model"}},"description":"Balance carried into the period, the period's own net, and the two added together"},"ExternalGeneralLedgerSummaryEntityResultV1Model":{"type":"object","properties":{"companyEntityId":{"type":"string","format":"uuid"},"companyEntityCode":{"type":"string"},"companyEntityName":{"type":"string"},"localCurrency":{"type":"string","nullable":true,"example":"USD"},"amounts":{"$ref":"#/components/schemas/ExternalGeneralLedgerSummaryAmountsV1Model"}},"description":"One entity's own book, before any elimination"},"ExternalGeneralLedgerSummaryFigureV1Model":{"type":"object","properties":{"groupAmount":{"type":"integer","description":"Amount in currency of base company","format":"int64"},"localAmount":{"type":"integer","description":"Amount in local currency of entity, null on figures that cover more than one entity","format":"int64","nullable":true}},"description":"A signed, debit-positive figure in the group currency, and in the entity's local currency when the figure belongs to one entity"},"ExternalGeneralLedgerSummaryRowV1Model":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid"},"accountCode":{"type":"integer","format":"int32"},"accountLabel":{"type":"string"},"accountType":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["BANK","CARD","CASH_AND_EQUIVALENTS","ACCOUNTS_RECEIVABLE","INVENTORY","CORPORATE_TAX_RECEIVABLE","OTHER_CURRENT_ASSET","INTANGIBLE_NON_CURRENT_ASSET","TANGIBLE_NON_CURRENT_ASSET","FINANCIAL_NON_CURRENT_ASSET","CORPORATE_TAX_DEFERRED_ASSET","OTHER_NON_CURRENT_ASSET","ACCOUNTS_PAYABLE","OVERDRAFT_FACILITY","CORPORATE_TAX_PAYABLE","OTHER_CURRENT_LIABILITY","LONG_TERM_LOAN","CORPORATE_TAX_DEFERRED_LIABILITY","OTHER_LONG_TERM_LIABILITY","CONTRIBUTED_CAPITAL","RETAINED_EARNINGS","ACCUMULATED_OTHER_COMPREHENSIVE_INCOME","OTHER_EQUITY","COST_OF_SALES","DISTRIBUTION_COST","GENERAL_AND_ADMINISTRATIVE_EXPENSE","PERSONNEL_COST","OTHER_OPERATING_EXPENSE","INCOME_TAX","DEPRECIATION_AND_AMORTIZATION","NON_OPERATING_EXPENSE","INTEREST_EXPENSE","EXCHANGE_RATE_LOSS_REALIZED","EXCHANGE_RATE_LOSS_UNREALIZED","OTHER_FINANCIAL_EXPENSE","REVENUE","DISCOUNT","NON_OPERATING_INCOME","INTEREST_INCOME","EXCHANGE_RATE_GAIN_REALIZED","EXCHANGE_RATE_GAIN_UNREALIZED","OTHER_FINANCIAL_INCOME"]},"entities":{"type":"array","description":"One result per entity in scope, whether or not it posted to this account","items":{"$ref":"#/components/schemas/ExternalGeneralLedgerSummaryEntityResultV1Model"}},"subtotal":{"$ref":"#/components/schemas/ExternalGeneralLedgerSummaryAmountsV1Model"},"elimination":{"$ref":"#/components/schemas/ExternalGeneralLedgerSummaryAmountsV1Model"},"total":{"$ref":"#/components/schemas/ExternalGeneralLedgerSummaryAmountsV1Model"},"groupCurrency":{"type":"string","example":"USD"}},"description":"List of records for the current page"},"ExternalInvoiceApprovalV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"companyId":{"type":"string","format":"uuid"},"invoicePayableId":{"type":"string","format":"uuid"},"invoiceDocumentKey":{"type":"string"},"invoiceNumber":{"type":"string","nullable":true},"invoiceAmount":{"type":"integer","format":"int64"},"invoiceCurrency":{"type":"string","example":"USD"},"invoiceIssuedAt":{"type":"string","format":"date-time"},"invoiceIssuedDate":{"type":"string","format":"date"},"invoiceDueAt":{"type":"string","format":"date-time"},"invoiceDueDate":{"type":"string","format":"date"},"userApprovals":{"type":"array","items":{"$ref":"#/components/schemas/ExternalInvoiceUserApprovalV1Model"}},"note":{"type":"string","nullable":true},"status":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["APPROVED","DECLINED","CANCELLED","FAILED","IN_PROGRESS"]},"completedAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"}}},"ExternalInvoiceUserApprovalV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"approvalId":{"type":"string","format":"uuid"},"userId":{"type":"string","format":"uuid","nullable":true},"userGroupId":{"type":"string","format":"uuid","nullable":true},"priority":{"type":"integer","format":"int32"},"status":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["APPROVED","CANCELLED","DECLINED","FAILED","IN_REVIEW","PENDING"]},"note":{"type":"string","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"notifiedAt":{"type":"string","format":"date-time","nullable":true}}},"ExternalCustomPropertiesObjectValuesV1Model":{"type":"object","properties":{"items":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ExternalPropertyObjectValueV1Model"}}},"description":"Legacy container for custom properties on this line item (deprecated/old format).","nullable":true},"ExternalInvoicePayableLineItemMetadataV1Model":{"type":"object","properties":{"type":{"type":"string","description":"Type of the invoice payable line item (vendor invoice or reimbursement).\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["REIMBURSEMENT","SELF_BILLED","VENDOR_INVOICE"]}},"description":"Metadata for the invoice payable line item (ERP-specific fields and context).","nullable":true,"discriminator":{"propertyName":"type"}},"ExternalInvoicePayableLineItemV1Model":{"type":"object","properties":{"id":{"type":"string","description":"ID of the invoice payable line item.","format":"uuid"},"invoicePayableId":{"type":"string","description":"ID of the invoice payable this line item belongs to.","format":"uuid"},"type":{"type":"string","description":"Type of the invoice payable line item (vendor invoice or reimbursement).\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["REIMBURSEMENT","SELF_BILLED","VENDOR_INVOICE"]},"metadata":{"$ref":"#/components/schemas/ExternalInvoicePayableLineItemMetadataV1Model"},"amount":{"type":"integer","description":"Amount in cents, including tax. When `lineItemsIncludeTax` is true, `amount` represents the full tax-inclusive amount for this line.","format":"int64","nullable":true},"netAmount":{"type":"integer","description":"Net line amount in cents, excluding tax. When `lineItemsIncludeTax` is false, `netAmount` represents the base amount on which tax is calculated.","format":"int64","nullable":true},"description":{"type":"string","description":"Description of this invoice payable line item.","nullable":true},"taxCodeId":{"type":"string","description":"ID of the tax code applied to this line item.","format":"uuid","nullable":true},"taxAmount":{"type":"integer","description":"Tax amount in cents for this line item.","format":"int64","nullable":true},"accountId":{"type":"string","description":"ID of the ledger account used to book this line item.","format":"uuid","nullable":true},"costCenterId":{"type":"string","description":"ID of the cost center associated with this line item, if applicable.","format":"uuid","nullable":true},"amortizationStartDate":{"type":"string","description":"Start date for amortization of this line item.","format":"date","nullable":true},"amortizationEndDate":{"type":"string","description":"End date for amortization of this line item.","format":"date","nullable":true},"amortizationTemplateId":{"type":"string","description":"ID of the amortization template to use for this line item within Light Ledger.","format":"uuid","nullable":true},"customPropertiesOld":{"$ref":"#/components/schemas/ExternalCustomPropertiesObjectValuesV1Model"},"aiValueSuggestions":{"type":"array","description":"AI-generated suggestions for line item values (e.g. account, cost center, tax code).","nullable":true,"items":{"$ref":"#/components/schemas/ExternalAiValueSuggestionV1Model"}},"customProperties":{"type":"array","description":"Custom properties set on this invoice payable line item.","nullable":true,"items":{"$ref":"#/components/schemas/ExternalCustomPropertyV1Model"}},"createdAt":{"type":"string","description":"Timestamp when this invoice payable line item was created.","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when this invoice payable line item was last updated.","format":"date-time"}}},"ExternalInvoicePayableV1Model":{"type":"object","properties":{"id":{"type":"string","description":"External ID of the invoice payable object.","format":"uuid"},"type":{"type":"string","description":"Type of the invoice payable (e.g. vendor invoice or reimbursement).\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["REIMBURSEMENT","SELF_BILLED","VENDOR_INVOICE"]},"metadata":{"$ref":"#/components/schemas/ExternalInvoicePayableMetadataV1Model"},"invoicePayableId":{"type":"string","description":"Internal ID of the underlying invoice payable record.","format":"uuid"},"companyId":{"type":"string","description":"ID of the company this invoice payable belongs to.","format":"uuid"},"state":{"type":"string","description":"Current state of the invoice payable in its lifecycle (from ingestion to payment/completion).\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["INIT","CREATED","IN_DRAFT","APPROVAL_REQUESTED","APPROVAL_PENDING","APPROVED_ACCOUNTING_ENTRY_PENDING","DECLINED","READY_FOR_PAYMENT_RELEASE","PENDING_PAYMENT_APPROVAL","PAYMENT_PAUSED","SCHEDULED","PAYMENT_PENDING","PARTIALLY_PAID","UNPAID","PAID","COMPLETED","RESET_PENDING","CANCELLATION_PENDING","CANCELLED","DUPLICATED","IMPORT_PENDING"]},"failureReason":{"type":"string","description":"High-level reason why processing the invoice payable failed, if any.\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["EMAIL_NOT_ALLOWED","ERP_ENTRY_FAILED","OCR_FAILED","DOCUMENT_PROCESSING_FAILED","PAYMENT_APPROVAL_DECLINED","PAYMENT_FAILED","RESETTING_INVOICE_FAILED","CANCELLING_INVOICE_FAILED","APPROVAL_SUBMISSION_FAILED","PAYMENT_VALIDATION_FAILED","USER_INPUT_VALIDATION_FAILED","DUPLICATE_INVOICE","PAYMENT_REJECTED","PAYMENT_REVERSED"]},"failureContext":{"$ref":"#/components/schemas/ExternalUiClientExceptionV1Model"},"warningContext":{"$ref":"#/components/schemas/ExternalUiClientExceptionV1Model"},"approvalNote":{"type":"string","description":"Approval note associated with the invoice payable (e.g. approver comments).","nullable":true},"cancellationReason":{"type":"string","description":"Reason why the invoice payable was cancelled, if applicable.","nullable":true},"payeeName":{"type":"string","description":"Name of the payee for this invoice payable.","nullable":true},"payeeIban":{"type":"string","description":"Payee IBAN used for payment of this invoice payable.","nullable":true},"payeeBban":{"type":"string","description":"Payee BBAN (Basic Bank Account Number) used for local payments.","nullable":true},"payeeBic":{"type":"string","description":"Payee bank BIC/SWIFT code.","nullable":true},"payeeBankCode":{"type":"string","description":"Payee bank/branch code used for local payments.","nullable":true},"payeeSwedishBankgiroNumber":{"type":"string","description":"Payee Swedish Bankgiro number, if applicable.","nullable":true},"payeeSwedishPlusgiroNumber":{"type":"string","description":"Payee Swedish Plusgiro number, if applicable.","nullable":true},"payeeCountry":{"type":"string","description":"Country of the payee.\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["AC","AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BU","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CR","CS","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","FX","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NT","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SF","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SU","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","UK","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XI","XU","XK","YE","YT","YU","ZA","ZM","ZR","ZW"]},"payeeAddress":{"type":"string","description":"Street address of the payee.","nullable":true},"payeeZipcode":{"type":"string","description":"ZIP/postal code of the payee.","nullable":true},"payeeBankName":{"type":"string","description":"Name of the payee's bank.","nullable":true},"payeeBankCountry":{"type":"string","description":"Country of the payee's bank.\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["AC","AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BU","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CR","CS","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","FX","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NT","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SF","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SU","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","UK","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XI","XU","XK","YE","YT","YU","ZA","ZM","ZR","ZW"]},"payeeBankAddress":{"type":"string","description":"Street address of the payee's bank.","nullable":true},"payeeBankZipcode":{"type":"string","description":"ZIP/postal code of the payee's bank.","nullable":true},"payeeCity":{"type":"string","description":"City of the payee.","nullable":true},"payeeBankCity":{"type":"string","description":"City of the payee's bank.","nullable":true},"vendorId":{"type":"string","description":"ID of the vendor entity this invoice payable is linked to, if any.","format":"uuid","nullable":true},"vendorDetailsOcr":{"$ref":"#/components/schemas/ExternalInvoicePayableVendorDetailsOcrV1Model"},"companyEntityId":{"type":"string","description":"ID of the company entity this invoice payable is booked under.","format":"uuid","nullable":true},"invoiceNumber":{"type":"string","description":"Invoice number provided on the vendor invoice.","nullable":true},"amount":{"type":"integer","description":"Total invoice amount in cents, expressed in the invoice currency.","format":"int64","nullable":true},"outstandingBalance":{"type":"integer","description":"Outstanding invoice balance to be paid in cents, expressed in the invoice currency. `0` means the bill is settled. `null` means Light derived no balance for it — for instance the bill has no amount yet, its state is `CANCELLED`, `DECLINED` or `DUPLICATED`, or the company does not keep its ledger in Light — so do not read `null` as fully paid.","format":"int64","nullable":true},"amountPaid":{"type":"integer","description":"Amount paid against the invoice in cents, expressed in the invoice currency. Credit notes and reversed payments are not counted. `null` means Light derived no balance for the bill, as for `outstandingBalance`.","format":"int64","nullable":true},"currency":{"type":"string","example":"USD"},"description":{"type":"string","description":"Description or memo for the invoice payable.","nullable":true},"senderBankAccountId":{"type":"string","description":"ID of the sender bank account from which this invoice payable will be paid.","format":"uuid","nullable":true},"fiNumber":{"type":"string","description":"FI (Finnish reference) number associated with this invoice payable, if applicable.","nullable":true},"finnishPaymentReference":{"type":"string","description":"Finnish payment reference (viitenumero or RF Creditor Reference) associated with this invoice payable, if applicable.","nullable":true},"norKidReference":{"type":"string","description":"Norwegian KID reference associated with this invoice payable, if applicable.","nullable":true},"swissPaymentReference":{"type":"string","description":"Swiss payment reference (QR-Reference or Creditor Reference/SCOR) associated with this invoice payable, if applicable.","nullable":true},"swedishOcrReference":{"type":"string","description":"Swedish OCR reference associated with this invoice payable, if applicable.","nullable":true},"creditorNoteOverride":{"type":"string","description":"Override for the reference sent to the bank alongside the payment, used when the invoice number itself exceeds the payment scheme's length limit. Falls back to the invoice number when unset.","nullable":true},"senderPurposeCode":{"type":"string","description":"Purpose code the paying bank's regulator requires for this payment (e.g. a Norwegian Skatteetaten code for cross-border payments above NOK 100,000). The allowed codes come from the purpose-code requirements endpoint.","nullable":true},"receiverPurposeCode":{"type":"string","description":"Purpose code the receiving bank's regulator requires for this payment (e.g. an RBI code for payments to India). The allowed codes come from the purpose-code requirements endpoint.","nullable":true},"paymentAt":{"type":"string","description":"Date/time when payment is scheduled or was executed for this invoice payable.","format":"date-time","nullable":true},"ocrCompletedAt":{"type":"string","description":"Timestamp when OCR processing for this invoice payable was completed.","format":"date-time","nullable":true},"canceledAt":{"type":"string","description":"Timestamp when this invoice payable was cancelled.","format":"date-time","nullable":true},"issuedDate":{"type":"string","description":"Issue date of the original vendor invoice.","format":"date","nullable":true},"postingDate":{"type":"string","description":"Date the invoice payable is posted to the ledger, which sets its accounting period.","format":"date"},"dueDate":{"type":"string","description":"Payment due date of the invoice payable.","format":"date","nullable":true},"invoiceCreatedAt":{"type":"string","description":"Timestamp when the invoice payable record was created.","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the invoice payable record was last updated.","format":"date-time"},"purchaseOrderId":{"type":"string","description":"ID of the purchase order linked to this invoice payable, if any.","format":"uuid","nullable":true},"documentTemplateId":{"type":"string","description":"ID of the self-billed document template used to render this invoice payable, if any.","format":"uuid","nullable":true},"lineItemsIncludeTax":{"type":"boolean","description":"Whether invoice line item amounts are entered as tax-inclusive. When true, line item `amount` is expected to be the gross amount including tax; when false, line item `netAmount` is expected to be the base amount excluding tax."},"localCurrencyFxRate":{"type":"number","description":"Foreign exchange rate to the ledger's local currency. If null, the system uses its default FX source.","nullable":true},"groupCurrencyFxRate":{"type":"number","description":"Foreign exchange rate to the ledger's group currency. If null, the system uses its default FX source.","nullable":true},"lineItems":{"type":"array","description":"List of line items belonging to this invoice payable.","nullable":true,"items":{"$ref":"#/components/schemas/ExternalInvoicePayableLineItemV1Model"}},"customProperties":{"type":"array","description":"Custom properties set on the invoice payable header.","nullable":true,"items":{"$ref":"#/components/schemas/ExternalCustomPropertyV1Model"}},"paymentPausedBy":{"type":"string","description":"ID of the user who paused payment for this invoice payable, if payment is paused.","format":"uuid","nullable":true},"paymentPausedAt":{"type":"string","description":"Timestamp when payment for this invoice payable was paused, if applicable.","format":"date-time","nullable":true},"senderEmail":{"type":"string","description":"Email address from which the invoice payable was received, if known.","nullable":true},"documentName":{"type":"string","description":"Name of the original document file associated with this invoice payable.","nullable":true}}},"ExternalInvoicePayableVendorDetailsOcrV1Model":{"type":"object","properties":{"avatarUrl":{"type":"string","description":"URL of the vendor avatar/logo detected by OCR, if any.","nullable":true},"name":{"type":"string","description":"Vendor name detected by OCR from the uploaded document.","nullable":true},"email":{"type":"string","description":"Vendor email address detected by OCR from the uploaded document.","nullable":true},"phoneNumber":{"$ref":"#/components/schemas/PhoneNumber"},"website":{"type":"string","description":"Vendor website detected by OCR from the uploaded document.","nullable":true},"country":{"type":"string","description":"Vendor country detected by OCR from the uploaded document.\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["AC","AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BU","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CR","CS","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","FX","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NT","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SF","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SU","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","UK","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XI","XU","XK","YE","YT","YU","ZA","ZM","ZR","ZW"]},"city":{"type":"string","description":"Vendor city detected by OCR from the uploaded document.","nullable":true},"address":{"type":"string","description":"Vendor street address detected by OCR from the uploaded document.","nullable":true},"zipcode":{"type":"string","description":"Vendor ZIP/postal code detected by OCR from the uploaded document.","nullable":true},"bankAccountNumber":{"type":"string","description":"Vendor bank account number (IBAN or local format) detected by OCR from the uploaded document.","nullable":true},"bankAccountBic":{"type":"string","description":"Vendor bank BIC/SWIFT code detected by OCR from the uploaded document.","nullable":true},"domesticBankAccountNumber":{"type":"string","description":"Vendor domestic bank account number detected by OCR (country-specific format).","nullable":true},"domesticBankAccountCode":{"type":"string","description":"Vendor domestic bank account code detected by OCR (e.g. routing/sort code).","nullable":true},"vatId":{"type":"string","description":"Vendor VAT ID detected by OCR from the uploaded document.","nullable":true}},"description":"Vendor details extracted from the invoice using OCR.","nullable":true},"ExternalPropertyObjectValueV1Model":{"type":"object","properties":{"propertyId":{"type":"string","format":"uuid"},"value":{"type":"string"},"valueId":{"type":"string","format":"uuid"}}},"ExternalReimbursementLineItemMetadataV1Model":{"type":"object","allOf":[{"$ref":"#/components/schemas/ExternalInvoicePayableLineItemMetadataV1Model"},{"type":"object","properties":{"expenseId":{"type":"string","description":"ID of the underlying expense linked to this reimbursement line item, if any.","format":"uuid","nullable":true},"reimbursementCategoryId":{"type":"string","description":"ID of the reimbursement category associated with this line item.","format":"uuid","nullable":true},"performedDate":{"type":"string","description":"Date when the expense related to this reimbursement line item was performed.","format":"date","nullable":true},"originalAmount":{"type":"integer","description":"Original amount of the expense in cents, before conversion to invoice currency.","format":"int64","nullable":true},"originalCurrency":{"type":"string","example":"USD"}}}]},"ExternalVendorInvoiceLineItemMetadataV1Model":{"type":"object","allOf":[{"$ref":"#/components/schemas/ExternalInvoicePayableLineItemMetadataV1Model"}]},"ExternalApproveInvoicePayableRequestV1Model":{"type":"object","properties":{"note":{"type":"string","description":"Optional note.","nullable":true}}},"ExternalCancelInvoicePayableRequestV1Model":{"type":"object","properties":{"reason":{"type":"string","description":"Reason for cancelling the invoice payable."}}},"ExternalCreateInvoicePayableLineItemRequestV1Model":{"type":"object","properties":{"amount":{"type":"integer","description":"Gross line amount in cents, including tax. Set this when the parent invoice header field `lineItemsIncludeTax` is true. When `lineItemsIncludeTax` is false, prefer using `netAmount` instead and avoid sending both.","format":"int64","nullable":true},"netAmount":{"type":"integer","description":"Net line amount in cents, excluding tax. Set this when the parent invoice header field `lineItemsIncludeTax` is false. When `lineItemsIncludeTax` is true, prefer using `amount` instead and avoid sending both.","format":"int64","nullable":true},"taxAmount":{"type":"integer","description":"Tax amount for this line in cents. If omitted, tax may be derived from the configured tax code and base amount.","format":"int64","nullable":true},"description":{"type":"string","description":"Description for this invoice payable line item.","nullable":true},"taxCodeId":{"type":"string","description":"ID of the tax code to apply to this invoice payable line item.","format":"uuid","nullable":true},"accountId":{"type":"string","description":"ID of the ledger account to book this invoice payable line item against.","format":"uuid","nullable":true},"amortizationStartDate":{"type":"string","description":"Start date for amortization of this invoice payable line item.","format":"date","nullable":true},"amortizationEndDate":{"type":"string","description":"End date for amortization of this invoice payable line item.","format":"date","nullable":true},"amortizationTemplateId":{"type":"string","description":"ID of the amortization template to apply to this line item using Light Ledger.","format":"uuid","nullable":true},"customProperties":{"type":"array","description":"Custom properties to set on this invoice payable line item.","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}}}},"ExternalCreateInvoicePayableRequestV1Model":{"type":"object","properties":{"vendorId":{"type":"string","description":"ID of the vendor.","format":"uuid","nullable":true},"amount":{"type":"integer","description":"Invoice total amount in cents.","format":"int64","nullable":true},"currency":{"type":"string","nullable":true,"example":"USD"},"processingMode":{"type":"string","description":"How the invoice should be processed (skip AI Parse or AI Parse + merge).\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["DATA_ONLY","AI_PARSE_AND_MERGE"]},"type":{"type":"string","description":"Type of bill to create. `SELF_BILLED` creates a self-billed invoice that you issue on the vendor's behalf: it starts as a draft and takes the company entity's next self-billed number when it is submitted or posted, unless `invoiceNumber` is set. Rejected when `processingMode` is `AI_PARSE_AND_MERGE`.\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["VENDOR_INVOICE","SELF_BILLED"]},"documentTemplateId":{"type":"string","description":"ID of the self-billed document template used to render the bill. Must be an active self-billed template assigned to `companyEntityId`. When omitted on a self-billed bill, the newest active self-billed template of the company entity is used. Rejected when `processingMode` is `AI_PARSE_AND_MERGE`.","format":"uuid","nullable":true},"companyEntityId":{"type":"string","description":"ID of the company entity.","format":"uuid","nullable":true},"invoiceNumber":{"type":"string","description":"Invoice number.","nullable":true},"description":{"type":"string","description":"Invoice description.","nullable":true},"issuedDate":{"type":"string","description":"Issue date of the original vendor invoice.","format":"date","nullable":true},"postingDate":{"type":"string","description":"Date the invoice payable is posted to the ledger, which sets its accounting period independently of the issued date. Defaults to the issued date when omitted on creation.","format":"date","nullable":true},"dueDate":{"type":"string","description":"Payment due date of the invoice payable.","format":"date","nullable":true},"paymentAt":{"type":"string","description":"Date/time when payment is scheduled or was executed for this invoice payable.","format":"date-time","nullable":true},"senderBankAccountId":{"type":"string","description":"ID of the sender bank account from which this invoice payable will be paid.","format":"uuid","nullable":true},"lineItemsIncludeTax":{"type":"boolean","description":"Whether invoice line item amounts are entered as tax-inclusive. When true, line item `amount` is expected to be the gross amount including tax; when false, line item `netAmount` is expected to be the base amount excluding tax.","nullable":true},"lineItems":{"type":"array","description":"List of line items to create with the invoice. This allows creating the invoice header and its line items in a single request.","nullable":true,"items":{"$ref":"#/components/schemas/ExternalCreateInvoicePayableLineItemRequestV1Model"}},"customProperties":{"type":"array","description":"List of custom properties to set on the invoice.","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}},"localCurrencyFxRateOverride":{"type":"number","description":"Custom FX rate for the ledger's local currency. If not provided, Light uses official ECB rates.","nullable":true},"groupCurrencyFxRateOverride":{"type":"number","description":"Custom FX rate for the ledger's group currency. If not provided, Light uses official ECB rates.","nullable":true}}},"ExternalInvoicePayableUploadUrlResponseV1Model":{"type":"object","properties":{"uploadUrl":{"type":"string","description":"Pre-signed URL to which the invoice payable document can be uploaded.","format":"url"},"headers":{"type":"object","additionalProperties":{"type":"string","description":"HTTP headers required when uploading the document to the pre-signed URL."},"description":"HTTP headers required when uploading the document to the pre-signed URL."}}},"ExternalUploadInvoicePayableDocumentRequestV1Model":{"type":"object","properties":{"documentName":{"type":"string","description":"Original file name of the document."},"contentType":{"type":"string","description":"MIME type of the uploaded document (e.g. application/pdf)."}}},"ExternalDeclineInvoicePayableRequestV1Model":{"type":"object","properties":{"note":{"type":"string","description":"Optional note.","nullable":true}}},"ExternalCursorPaginatedResponseV1ModelExternalInvoicePayableListItemV1Model":{"type":"object","properties":{"records":{"type":"array","description":"List of records for the current page","items":{"$ref":"#/components/schemas/ExternalInvoicePayableListItemV1Model"}},"hasMore":{"type":"boolean","description":"Boolean flag indicating if there are more records available"},"nextCursor":{"type":"string","description":"Cursor for fetching the next page","nullable":true},"prevCursor":{"type":"string","description":"Cursor for fetching the previous page","nullable":true}}},"ExternalInvoicePayableListItemV1Model":{"type":"object","properties":{"id":{"type":"string","description":"External ID of the invoice payable object.","format":"uuid"},"type":{"type":"string","description":"Type of the invoice payable (e.g. vendor invoice or reimbursement).\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["REIMBURSEMENT","SELF_BILLED","VENDOR_INVOICE"]},"metadata":{"$ref":"#/components/schemas/ExternalInvoicePayableMetadataV1Model"},"state":{"type":"string","description":"Current state of the invoice payable in its lifecycle (from ingestion to payment/completion).\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["INIT","CREATED","IN_DRAFT","APPROVAL_REQUESTED","APPROVAL_PENDING","APPROVED_ACCOUNTING_ENTRY_PENDING","DECLINED","READY_FOR_PAYMENT_RELEASE","PENDING_PAYMENT_APPROVAL","PAYMENT_PAUSED","SCHEDULED","PAYMENT_PENDING","PARTIALLY_PAID","UNPAID","PAID","COMPLETED","RESET_PENDING","CANCELLATION_PENDING","CANCELLED","DUPLICATED","IMPORT_PENDING"]},"documentStatus":{"type":"string","description":"Status of the accounting document the invoice payable is booked as. Filter on `documentStatus:in:POSTED|PARTIALLY_CLEARED` to list the bills that still owe money.\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["DRAFT","APPROVAL_PENDING","APPROVED","POSTED","PARTIALLY_CLEARED","CLEARED","ARCHIVED"]},"companyId":{"type":"string","description":"ID of the company this invoice payable belongs to.","format":"uuid"},"companyEntityId":{"type":"string","description":"ID of the company entity this invoice payable is booked under.","format":"uuid","nullable":true},"vendorId":{"type":"string","description":"ID of the vendor entity this invoice payable is linked to, if any.","format":"uuid","nullable":true},"vendorName":{"type":"string","description":"Name of the vendor the invoice payable is for, as stored on the vendor record. Resolve `vendorId` against `GET /v1/vendors/{vendorId}` for the vendor's other details.","nullable":true},"invoiceNumber":{"type":"string","description":"Invoice number provided on the vendor invoice.","nullable":true},"documentName":{"type":"string","description":"Name of the original document file associated with this invoice payable.","nullable":true},"description":{"type":"string","description":"Description or memo for the invoice payable.","nullable":true},"amount":{"type":"integer","description":"Total invoice amount in cents, expressed in the invoice currency.","format":"int64","nullable":true},"netAmount":{"type":"integer","description":"Net amount in cents, excluding tax. Unlike `amount`, this is not a header value: it is derived by summing this invoice payable's persisted line items (debit-positive, credit-negative), so it is null when the bill has no coded lines even though `amount` is set, and it is not guaranteed to sum to `amount`.","format":"int64","nullable":true},"outstandingBalance":{"type":"integer","description":"Outstanding invoice balance to be paid in cents, expressed in the invoice currency. `0` means the bill is settled. `null` means Light derived no balance for it — for instance the bill has no amount yet, its state is `CANCELLED`, `DECLINED` or `DUPLICATED`, or the company does not keep its ledger in Light — so do not read `null` as fully paid.","format":"int64","nullable":true},"amountPaid":{"type":"integer","description":"Amount paid against the invoice in cents, expressed in the invoice currency. Credit notes and reversed payments are not counted. `null` means Light derived no balance for the bill, as for `outstandingBalance`.","format":"int64","nullable":true},"currency":{"type":"string","nullable":true,"example":"USD"},"issuedDate":{"type":"string","description":"Issue date of the original vendor invoice.","format":"date","nullable":true},"postingDate":{"type":"string","description":"Date the invoice payable is posted to the ledger, which sets its accounting period.","format":"date"},"dueDate":{"type":"string","description":"Payment due date of the invoice payable.","format":"date","nullable":true},"paymentAt":{"type":"string","description":"Date/time when payment is scheduled or was executed for this invoice payable.","format":"date-time","nullable":true},"invoiceCreatedAt":{"type":"string","description":"Timestamp when the invoice payable record was created.","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the invoice payable record was last updated.","format":"date-time"},"ocrCompletedAt":{"type":"string","description":"Timestamp when OCR processing for this invoice payable was completed.","format":"date-time","nullable":true},"canceledAt":{"type":"string","description":"Timestamp when this invoice payable was cancelled.","format":"date-time","nullable":true},"cancellationReason":{"type":"string","description":"Reason why the invoice payable was cancelled, if applicable.","nullable":true},"approvalNote":{"type":"string","description":"Approval note associated with the invoice payable (e.g. approver comments).","nullable":true},"failureReason":{"type":"string","description":"High-level reason why processing the invoice payable failed, if any.\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["EMAIL_NOT_ALLOWED","ERP_ENTRY_FAILED","OCR_FAILED","DOCUMENT_PROCESSING_FAILED","PAYMENT_APPROVAL_DECLINED","PAYMENT_FAILED","RESETTING_INVOICE_FAILED","CANCELLING_INVOICE_FAILED","APPROVAL_SUBMISSION_FAILED","PAYMENT_VALIDATION_FAILED","USER_INPUT_VALIDATION_FAILED","DUPLICATE_INVOICE","PAYMENT_REJECTED","PAYMENT_REVERSED"]},"failureContext":{"$ref":"#/components/schemas/ExternalUiClientExceptionV1Model"},"warningContext":{"$ref":"#/components/schemas/ExternalUiClientExceptionV1Model"},"fiNumber":{"type":"string","description":"FI (Finnish reference) number associated with this invoice payable, if applicable.","nullable":true},"senderEmail":{"type":"string","description":"Email address from which the invoice payable was received, if known.","nullable":true},"senderBankAccountId":{"type":"string","description":"ID of the sender bank account from which this invoice payable will be paid.","format":"uuid","nullable":true},"paymentPausedBy":{"type":"string","description":"ID of the user who paused payment for this invoice payable, if payment is paused.","format":"uuid","nullable":true},"paymentPausedAt":{"type":"string","description":"Timestamp when payment for this invoice payable was paused, if applicable.","format":"date-time","nullable":true},"payeeName":{"type":"string","description":"Name of the payee for this invoice payable.","nullable":true},"payeeIban":{"type":"string","description":"Payee IBAN used for payment of this invoice payable.","nullable":true},"payeeBban":{"type":"string","description":"Payee BBAN (Basic Bank Account Number) used for local payments.","nullable":true},"payeeBic":{"type":"string","description":"Payee bank BIC/SWIFT code.","nullable":true},"payeeBankCode":{"type":"string","description":"Payee bank/branch code used for local payments.","nullable":true},"payeeBankName":{"type":"string","description":"Name of the payee's bank.","nullable":true},"payeeBankCountry":{"type":"string","description":"Country of the payee's bank.\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["AC","AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BU","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CR","CS","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","FX","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NT","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SF","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SU","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","UK","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XI","XU","XK","YE","YT","YU","ZA","ZM","ZR","ZW"]},"payeeBankAddress":{"type":"string","description":"Street address of the payee's bank.","nullable":true},"payeeBankCity":{"type":"string","description":"City of the payee's bank.","nullable":true},"payeeBankZipcode":{"type":"string","description":"ZIP/postal code of the payee's bank.","nullable":true},"payeeCountry":{"type":"string","description":"Country of the payee.\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["AC","AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BU","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CR","CS","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","FX","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NT","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SF","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SU","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","UK","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XI","XU","XK","YE","YT","YU","ZA","ZM","ZR","ZW"]},"payeeAddress":{"type":"string","description":"Street address of the payee.","nullable":true},"payeeCity":{"type":"string","description":"City of the payee.","nullable":true},"payeeZipcode":{"type":"string","description":"ZIP/postal code of the payee.","nullable":true}},"description":"List of records for the current page"},"ExternalInvoicePayablePaymentBankPaymentEntryV1Model":{"title":"Bank payment","type":"object","allOf":[{"$ref":"#/components/schemas/ExternalInvoicePayablePaymentEntryV1Model"},{"type":"object","properties":{"bankAccountId":{"type":"string","description":"ID of the bank account","format":"uuid","nullable":true},"endToEndId":{"type":"string","description":"End-to-end ID for the payment","nullable":true},"originalAmount":{"type":"integer","description":"Original payment amount in smallest denomination","format":"int64"},"originalCurrency":{"type":"string","example":"USD"},"accountingDocumentId":{"type":"string","description":"ID of the accounting document","format":"uuid"}}}]},"ExternalInvoicePayablePaymentCreditNoteEntryV1Model":{"title":"Credit note","type":"object","allOf":[{"$ref":"#/components/schemas/ExternalInvoicePayablePaymentEntryV1Model"},{"type":"object","properties":{"accountingDocumentId":{"type":"string","description":"ID of the accounting document","format":"uuid"},"amount":{"type":"integer","description":"Credit note amount in smallest denomination","format":"int64","nullable":true},"documentNumber":{"type":"string","description":"Document number","nullable":true}}}]},"ExternalInvoicePayablePaymentEntryV1Model":{"type":"object","properties":{"type":{"type":"string","description":"- `BP` - Bank payment\n- `CN` - Credit note\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["BP","CN"]}},"description":"Type of payment entry for an invoice payable payment","nullable":true,"discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/ExternalInvoicePayablePaymentBankPaymentEntryV1Model"},{"$ref":"#/components/schemas/ExternalInvoicePayablePaymentCreditNoteEntryV1Model"}]},"ExternalInvoicePayablePaymentV1Model":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the payment","format":"uuid"},"invoicePayableId":{"type":"string","description":"ID of the invoice payable this payment cleared","format":"uuid"},"amount":{"type":"integer","description":"Payment amount in the smallest currency denomination (e.g. cents), in the invoice payable's currency","format":"int64"},"currency":{"type":"string","example":"USD"},"paymentDate":{"type":"string","description":"Date the payment was made","format":"date"},"payment":{"$ref":"#/components/schemas/ExternalInvoicePayablePaymentEntryV1Model"},"createdAt":{"type":"string","description":"Timestamp when the payment was created","format":"date-time"}}},"ExternalMarkInvoicePayableAsPaidRequestV1Model":{"type":"object","properties":{"amount":{"type":"integer","description":"Amount paid in cents, in the invoice's currency. Must be greater than zero.","format":"int64"},"bankAccountId":{"type":"string","description":"ID of the bank account the payment was made from. Deprecated: use `ledgerAccountId` instead. Exactly one of `bankAccountId` / `ledgerAccountId` must be set.","format":"uuid","nullable":true,"deprecated":true},"ledgerAccountId":{"type":"string","description":"ID of the payment-enabled ledger account the payment was made from. Accepts any payment-enabled ledger account, not just bank accounts. Exactly one of `bankAccountId` / `ledgerAccountId` must be set.","format":"uuid","nullable":true},"paymentAt":{"type":"string","description":"Date/time the payment was made. Defaults to now if omitted.","format":"date-time","nullable":true},"comment":{"type":"string","description":"Optional comment describing the payment.","nullable":true},"paymentOption":{"type":"string","description":"Whether to mark the invoice as fully paid or partially paid. Use `FULL` to clear the remaining outstanding balance regardless of `amount`, or `PARTIAL` to record an installment.\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["FULL","PARTIAL"]}}},"ExternalReverseInvoicePayableClearingRequestV1Model":{"type":"object","properties":{"clearingAccountingDocumentId":{"type":"string","description":"ID of the clearing accounting document to reverse — the bank payment or credit note that was applied to this invoice payable. Obtain it from the `accountingDocumentId` of an entry returned by the `List invoice payable payments` endpoint.","format":"uuid"},"clearingType":{"type":"string","description":"Type of the clearing being reversed: `BP` for a bank payment or `CN` for a credit note. Matches the `type` of the corresponding entry returned by the `List invoice payable payments` endpoint.\n\n- `BP` - Bank payment\n- `CN` - Credit note\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["BP","CN"]},"shouldArchiveClearingDocument":{"type":"boolean","description":"Whether to also archive the underlying clearing document (bank payment or credit note) after reversing it.","default":false}}},"ExternalSubmitForApprovalRequestV1Model":{"type":"object","properties":{"closePurchaseOrder":{"type":"boolean","description":"Whether the purchase order should be closed or not.","nullable":true}}},"ExternalUpdateInvoicePayableCustomPropertiesRequestV1Model":{"type":"object","properties":{"customProperties":{"type":"array","description":"The full set of custom properties for the invoice payable. This replaces all existing custom properties: any group not included is removed, and sending an empty `valueIds`/`inlineValues` for a group clears that group. Can be used after the invoice has been posted/approved.","items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}}}},"ExternalUpdateInvoicePayablePatchRequestV1Model":{"type":"object","properties":{"vendorId":{"type":"string","description":"ID of the vendor.","format":"uuid","nullable":true},"companyEntityId":{"type":"string","description":"ID of the company entity.","format":"uuid","nullable":true},"invoiceNumber":{"type":"string","description":"Invoice number.","nullable":true},"amount":{"type":"integer","description":"Invoice total amount in cents.","format":"int64","nullable":true},"currency":{"type":"string","nullable":true,"example":"USD"},"description":{"type":"string","description":"Invoice description.","nullable":true},"senderBankAccountId":{"type":"string","description":"ID of the sender bank account from which this invoice payable will be paid.","format":"uuid","nullable":true},"fiNumber":{"type":"string","description":"FI (Finnish reference) number associated with this invoice payable, if applicable.","nullable":true},"finnishPaymentReference":{"type":"string","description":"Finnish payment reference (viitenumero or RF Creditor Reference) associated with this invoice payable, if applicable.","nullable":true},"norKidReference":{"type":"string","description":"Norwegian KID reference associated with this invoice payable, if applicable.","nullable":true},"swissPaymentReference":{"type":"string","description":"Swiss payment reference (QR-Reference or Creditor Reference/SCOR) associated with this invoice payable, if applicable.","nullable":true},"swedishOcrReference":{"type":"string","description":"Swedish OCR reference associated with this invoice payable, if applicable.","nullable":true},"creditorNoteOverride":{"type":"string","description":"Override for the reference sent to the bank alongside the payment, used when the invoice number itself exceeds the payment scheme's length limit. Falls back to the invoice number when unset.","nullable":true},"senderPurposeCode":{"type":"string","description":"Purpose code the paying bank's regulator requires for this payment. Pick one of the codes returned by the purpose-code requirements endpoint for this invoice payable.","nullable":true},"receiverPurposeCode":{"type":"string","description":"Purpose code the receiving bank's regulator requires for this payment. Pick one of the codes returned by the purpose-code requirements endpoint for this invoice payable.","nullable":true},"paymentAt":{"type":"string","description":"Date/time when payment is scheduled or was executed for this invoice payable.","format":"date-time","nullable":true},"issuedDate":{"type":"string","description":"Issue date of the original vendor invoice. Sending it without postingDate also resets the posting date to this date.","format":"date","nullable":true},"postingDate":{"type":"string","description":"Date the invoice payable is posted to the ledger, which sets its accounting period independently of the issued date. Sending issuedDate without postingDate resets the posting date to the new issued date.","format":"date","nullable":true},"dueDate":{"type":"string","description":"Payment due date of the invoice payable.","format":"date","nullable":true},"approvalNote":{"type":"string","description":"Note used during approval workflow.","nullable":true},"purchaseOrderId":{"type":"string","description":"ID of the purchase order linked to this invoice payable, if any.","format":"uuid","nullable":true},"documentTemplateId":{"type":"string","description":"ID of the self-billed document template used to render the bill. Must be an active self-billed template assigned to the bill's company entity. Send `null` to clear it.","format":"uuid","nullable":true},"lineItemsIncludeTax":{"type":"boolean","description":"Whether invoice line item amounts are entered as tax-inclusive. When true, line item `amount` is expected to be the gross amount including tax; when false, line item `netAmount` is expected to be the base amount excluding tax.","nullable":true},"customProperties":{"type":"array","description":"List of custom properties to set on the invoice.","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}},"localCurrencyFxRateOverride":{"type":"number","description":"Custom FX rate for the ledger's local currency. If not provided, Light uses official ECB rates.","nullable":true},"groupCurrencyFxRateOverride":{"type":"number","description":"Custom FX rate for the ledger's group currency. If not provided, Light uses official ECB rates.","nullable":true}}},"ExternalUpdateInvoicePayableLineItemRequestV1Model":{"type":"object","properties":{"amount":{"type":"integer","description":"Gross line amount in cents, including tax. Set this when the parent invoice header field `lineItemsIncludeTax` is true. When `lineItemsIncludeTax` is false, prefer using `netAmount` instead and avoid sending both.","format":"int64","nullable":true},"netAmount":{"type":"integer","description":"Net line amount in cents, excluding tax. Set this when the parent invoice header field `lineItemsIncludeTax` is false. When `lineItemsIncludeTax` is true, prefer using `amount` instead and avoid sending both.","format":"int64","nullable":true},"taxAmount":{"type":"integer","description":"Tax amount for this line in cents. If omitted, tax may be derived from the configured tax code and base amount.","format":"int64","nullable":true},"description":{"type":"string","description":"Description for this invoice payable line item.","nullable":true},"taxCodeId":{"type":"string","description":"ID of the tax code to apply to this invoice payable line item.","format":"uuid","nullable":true},"accountId":{"type":"string","description":"ID of the ledger account to book this invoice payable line item against.","format":"uuid","nullable":true},"metadata":{"$ref":"#/components/schemas/ExternalInvoicePayableLineItemMetadataV1Model"},"amortizationStartDate":{"type":"string","description":"Start date for amortization of this invoice payable line item.","format":"date","nullable":true},"amortizationEndDate":{"type":"string","description":"End date for amortization of this invoice payable line item.","format":"date","nullable":true},"amortizationTemplateId":{"type":"string","description":"ID of the amortization template to apply to this line item using Light Ledger.","format":"uuid","nullable":true},"customProperties":{"type":"array","description":"Custom properties to set on this invoice payable line item.","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}}}},"ExternalAccountReceivableLineAmountDiscountV1Model":{"type":"object","allOf":[{"$ref":"#/components/schemas/ExternalAccountReceivableLineDiscountV1Model"},{"type":"object","properties":{"value":{"type":"integer","format":"int64"}}}]},"ExternalAccountReceivableLineDiscountV1Model":{"type":"object","properties":{"type":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["PERCENTAGE","AMOUNT"]}},"description":"Discount to apply to this line (can be percentage or amount-based)","nullable":true,"discriminator":{"propertyName":"type"}},"ExternalAccountReceivableLinePercentageDiscountV1Model":{"type":"object","allOf":[{"$ref":"#/components/schemas/ExternalAccountReceivableLineDiscountV1Model"},{"type":"object","properties":{"value":{"type":"number"}}}]},"ExternalInvoiceReceivableLineV1Model":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the object","format":"uuid"},"companyId":{"type":"string","description":"ID of the company","format":"uuid"},"invoiceReceivableId":{"type":"string","description":"ID of the invoice receivable this line belongs to","format":"uuid"},"productId":{"type":"string","description":"ID of the product","format":"uuid"},"quantity":{"type":"number","description":"Quantity of the product"},"taxCodeId":{"type":"string","description":"ID of the tax code","format":"uuid","nullable":true},"accountId":{"type":"string","description":"ID of the ledger account","format":"uuid","nullable":true},"discount":{"$ref":"#/components/schemas/ExternalAccountReceivableLineDiscountV1Model"},"discountAmount":{"type":"integer","description":"Discount amount in smallest denomination","format":"int64","nullable":true},"netAmount":{"type":"integer","description":"Net amount in smallest denomination after discount but before tax","format":"int64","nullable":true},"taxAmount":{"type":"integer","description":"Tax amount in smallest denomination","format":"int64","nullable":true},"avataxCode":{"type":"string","description":"Avalara tax code. Used when the invoice tax engine is `AVATAX`","nullable":true},"billingStart":{"type":"string","description":"Start of the billing period","format":"date","nullable":true},"billingEnd":{"type":"string","description":"End of the billing period","format":"date","nullable":true},"priceOverwrite":{"type":"integer","description":"Custom product price in smallest denomination. This overrides the default product's price","format":"int64","nullable":true},"productNameOverwrite":{"type":"string","description":"Custom product name. This overrides the default product's name","nullable":true},"createdAt":{"type":"string","description":"Timestamp when the line was created","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the line was last updated","format":"date-time"},"accrualTemplateId":{"type":"string","description":"ID of the accrual template","format":"uuid","nullable":true},"accrualStartDate":{"type":"string","description":"Start date for accrual","format":"date","nullable":true},"accrualEndDate":{"type":"string","description":"End date for accrual","format":"date","nullable":true},"customProperties":{"type":"array","description":"List of custom properties associated with the line","nullable":true,"items":{"$ref":"#/components/schemas/ExternalCustomPropertyV1Model"}}}},"ExternalInvoiceReceivableV1Model":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the object","format":"uuid"},"companyId":{"type":"string","description":"ID of the company","format":"uuid"},"contractId":{"type":"string","description":"ID of the contract, if this is invoice is linked to a contract","format":"uuid","nullable":true},"companyEntityId":{"type":"string","description":"ID of the entity","format":"uuid","nullable":true},"amount":{"type":"integer","description":"Total invoice amount in smallest denomination, with discounts and tax applied","format":"int64"},"paymentType":{"type":"string","description":"Payment type for the invoice\n\n- `AIRWALLEX` - Payment via Airwallex. A payment link will be displayed on the invoice\n- `BANK_TRANSFER` - Payment via bank transfer. Bank information will be displayed on the invoice\n- `DIRECT_DEBIT` - Payment via direct debit. A notice that the amount will be collected automatically will be displayed on the invoice\n- `STRIPE` - Payment via Stripe. A payment link will be sent to the customer\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["AIRWALLEX","BANK_TRANSFER","DIRECT_DEBIT","STRIPE"]},"payeeBankAccountId":{"type":"string","description":"ID of the bank account where money should be sent to","format":"uuid","nullable":true},"invoiceDate":{"type":"string","description":"Date the invoice was issued","format":"date","nullable":true},"effectiveInvoiceDate":{"type":"string","description":"The invoice date shown to customers; falls back to the posting date when the invoice date is not set","format":"date"},"postingDate":{"type":"string","description":"Date the invoice is posted to the ledger (drives GL, VAT and revenue recognition)","format":"date"},"dueDate":{"type":"string","description":"Date the invoice payment is due","format":"date","nullable":true},"netTerms":{"type":"integer","description":"Number of days from the invoice date to when the invoice is due. Updating this field will automatically set the invoice due date","format":"int32","nullable":true},"customerId":{"type":"string","description":"ID of the customer","format":"uuid","nullable":true},"invoiceTemplateId":{"type":"string","description":"ID of the invoice template","format":"uuid","nullable":true},"invoiceTemplateAdditionalText":{"type":"string","description":"Text that will added to the additional text section of the invoice template","nullable":true},"invoiceNumber":{"type":"string","description":"Invoice number. This number is guaranteed to be unique and sequential per entity.\nBy default Light will generate this number when the invoice is opened, but you can provide your own custom number when creating or updating a draft invoice","nullable":true},"type":{"type":"string","description":"Who raised the invoice\n\n- `STANDARD` - The company raised the invoice\n- `SELF_BILLED` - The customer issued the invoice on the company's behalf and sent it in\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["STANDARD","SELF_BILLED"]},"state":{"type":"string","description":"The invoice state\n\n- `CREATED` - The invoice document was received and is waiting to be parsed. Next valid state is DRAFT\n- `DRAFT` - The invoice is in draft and can be modified. Next valid states are OPEN_IN_PROGRESS or ARCHIVED\n- `OPEN_IN_PROGRESS` - The invoice is being opened. Next valid state is OPEN or DRAFT\n- `OPEN` - The invoice is open. Next valid states are PAYMENT_PENDING, PARTIALLY_PAID, PAID or ARCHIVED\n- `PAYMENT_PENDING` - The payment was initiated by Light and is waiting to be collected. Next valid state is PAID\n- `PARTIALLY_PAID` - The invoice is partially paid. Next valid state is PAID\n- `PAID` - The invoice is fully paid\n- `REVERSED` - The invoice was reversed by a credit note and reissued as a new invoice; it is locked and cannot be modified\n- `ARCHIVED` - The invoice is archived and cannot be modified\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["CREATED","DRAFT","OPEN_IN_PROGRESS","OPEN","PAYMENT_PENDING","PARTIALLY_PAID","PAID","REVERSED","ARCHIVED"]},"openedAt":{"type":"string","description":"Timestamp when the invoice was opened","format":"date-time","nullable":true},"poNumber":{"type":"string","description":"Purchase order number","nullable":true},"reference":{"type":"string","description":"Reference number for cross-referencing with procurement and invoicing workflows","nullable":true},"paymentReference":{"type":"string","description":"Payment reference generated by Light for the customer's bank payment","nullable":true},"description":{"type":"string","description":"Description of the invoice","nullable":true},"currency":{"type":"string","example":"USD"},"taxEngineName":{"type":"string","description":"Name of the tax engine to be used\n\n- `AVATAX` - Avalara AvaTax will be used for tax calculations\n- `LIGHT` - Light built-in tax engine will be used for tax calculations\n- `SPHERE` - Sphere tax engine will be used for tax calculations\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["AVATAX","LIGHT","SPHERE"]},"areLinesWithTax":{"type":"boolean","description":"Whether the invoice line amount is inclusive of tax or not. True means tax is already included in the line amount and will not be added on top, false means tax will be added on top of the line amount"},"localCurrencyFxRate":{"type":"number","description":"Custom foreign exchange rate for the ledger's local currency. If not provided Light uses official ECB rates","nullable":true},"groupCurrencyFxRate":{"type":"number","description":"Custom foreign exchange rate for the ledger's group currency. If not provided Light uses official ECB rates","nullable":true},"lines":{"type":"array","description":"List of invoice line items. This is only returned when fetching a single invoice by id","nullable":true,"items":{"$ref":"#/components/schemas/ExternalInvoiceReceivableLineV1Model"}},"customProperties":{"type":"array","description":"List of custom properties associated with the invoice","nullable":true,"items":{"$ref":"#/components/schemas/ExternalCustomPropertyV1Model"}},"externalSource":{"$ref":"#/components/schemas/ExternalApiExternalSourceV1Model"},"createdAt":{"type":"string","description":"Timestamp when the invoice was created","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the invoice was last updated","format":"date-time"},"updatedBy":{"type":"string","description":"ID of the user who last updated the invoice","format":"uuid","nullable":true},"failureContext":{"$ref":"#/components/schemas/ExternalUiClientExceptionV1Model"}}},"ExternalCreateInvoiceReceivableLineRequestV1Model":{"type":"object","properties":{"productId":{"type":"string","description":"ID of the product","format":"uuid"},"quantity":{"type":"number","description":"Quantity of the product","default":1},"taxCodeId":{"type":"string","description":"ID of the tax code to apply to this line","format":"uuid","nullable":true},"accountId":{"type":"string","description":"ID of the ledger account for this line","format":"uuid","nullable":true},"discount":{"$ref":"#/components/schemas/ExternalAccountReceivableLineDiscountV1Model"},"priceOverwrite":{"type":"integer","description":"Price overwrite in smallest denomination. If not provided, the product's default price will be used","format":"int64","nullable":true},"productNameOverwrite":{"type":"string","description":"Product name overwrite. If not provided, the product's default name will be used","nullable":true},"taxAmountOverwrite":{"type":"integer","description":"Tax amount override in smallest denomination. Bypasses tax calculation and sets the exact tax amount for this line.\n\nRequirements: The line must have a valid amount (product price or priceOverwrite must be set).\n\nThe taxAmount field in the response will reflect this override value.\n\nAmounts use smallest denomination. Examples: GBP 42.15 = 4215, JPY 12345 = 12345, BHD 7.321 = 7321.","format":"int64","nullable":true},"avataxCode":{"type":"string","description":"Avalara tax code. Used when the invoice tax engine is AVATAX","nullable":true},"billingStart":{"type":"string","description":"Start of the billing period for this line","format":"date","nullable":true},"billingEnd":{"type":"string","description":"End of the billing period for this line","format":"date","nullable":true},"accrualTemplateId":{"type":"string","description":"ID of the accrual/amortization template to apply to this line","format":"uuid","nullable":true},"accrualStartDate":{"type":"string","description":"Start date for accrual/amortization","format":"date","nullable":true},"accrualEndDate":{"type":"string","description":"End date for accrual/amortization","format":"date","nullable":true},"customProperties":{"type":"array","description":"List of custom properties to set on the invoice or line","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}}}},"ExternalCreateInvoiceReceivableRequestV1Model":{"type":"object","properties":{"companyEntityId":{"type":"string","description":"ID of the company entity","format":"uuid"},"invoiceNumber":{"type":"string","description":"Unique invoice number. If not provided, one will be generated automatically when the invoice is opened.","nullable":true},"description":{"type":"string","description":"Invoice description","nullable":true},"currency":{"type":"string","nullable":true,"example":"USD"},"paymentType":{"type":"string","description":"Payment type for the invoice\n\n- `AIRWALLEX` - Payment via Airwallex. A payment link will be displayed on the invoice\n- `BANK_TRANSFER` - Payment via bank transfer. Bank information will be displayed on the invoice\n- `DIRECT_DEBIT` - Payment via direct debit. A notice that the amount will be collected automatically will be displayed on the invoice\n- `STRIPE` - Payment via Stripe. A payment link will be sent to the customer\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["AIRWALLEX","BANK_TRANSFER","DIRECT_DEBIT","STRIPE"]},"payeeBankAccountId":{"type":"string","description":"ID of the bank account where money should be sent to","format":"uuid","nullable":true},"invoiceDate":{"type":"string","description":"Date the invoice was issued","format":"date","nullable":true},"postingDate":{"type":"string","description":"Date the invoice is posted to the ledger (drives GL, VAT and revenue recognition). Defaults to the invoice date when omitted.","format":"date","nullable":true},"dueDate":{"type":"string","description":"Date the invoice payment is due","format":"date","nullable":true},"customerId":{"type":"string","description":"ID of the customer","format":"uuid","nullable":true},"invoiceTemplateId":{"type":"string","description":"ID of the invoice template","format":"uuid","nullable":true},"netTerms":{"type":"integer","description":"Number of days from the invoice date to when the invoice is due. Setting this will automatically calculate the due date","format":"int32","nullable":true},"poNumber":{"type":"string","description":"Purchase order number","nullable":true},"reference":{"type":"string","description":"Reference number for cross-referencing with procurement and invoicing workflows","nullable":true},"invoiceTemplateAdditionalText":{"type":"string","description":"Text that will be added to the additional text section of the invoice template","nullable":true},"areLinesWithTax":{"type":"boolean","description":"Whether the invoice line amounts are inclusive of tax. True means tax is included in the line amount, false means tax will be added on top","default":true},"localCurrencyFxRate":{"type":"number","description":"Custom foreign exchange rate for the ledger's local currency. If not provided, Light uses official ECB rates","nullable":true},"groupCurrencyFxRate":{"type":"number","description":"Custom foreign exchange rate for the ledger's group currency. If not provided, Light uses official ECB rates","nullable":true},"lines":{"type":"array","description":"List of invoice line items to create","nullable":true,"items":{"$ref":"#/components/schemas/ExternalCreateInvoiceReceivableLineRequestV1Model"}},"customProperties":{"type":"array","description":"List of custom properties to set on the invoice or line","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}}}},"ExternalInvoiceReceivablePdfDocumentV1Model":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the PDF document","format":"uuid"},"invoiceReceivableId":{"type":"string","description":"ID of the invoice receivable","format":"uuid"},"status":{"type":"string","description":"Current status of the PDF document generation\n\n- `GENERATING` - The PDF is currently being generated\n- `READY` - The PDF has been generated and is ready for download\n- `FAILED` - The PDF generation failed\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["GENERATING","READY","FAILED"]},"url":{"type":"string","description":"Signed URL to download the PDF document. Only available when status is READY. The URL is temporary and should not be stored and reused. To download again, call the endpoint to get a fresh URL.","format":"url","nullable":true},"createdAt":{"type":"string","description":"Timestamp when the document was created","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the document was last updated","format":"date-time"}}},"ExternalPaginatedResponseV1ModelExternalInvoiceReceivableV1Model":{"type":"object","properties":{"records":{"type":"array","description":"List of records for the current page","items":{"$ref":"#/components/schemas/ExternalInvoiceReceivableV1Model"}},"hasMore":{"type":"boolean","description":"Boolean flag indicating if there are more records available"},"total":{"type":"integer","description":"Total number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination.","format":"int64","nullable":true,"deprecated":true},"nextCursor":{"type":"string","description":"Cursor for fetching the next page (only for cursor pagination)","nullable":true},"prevCursor":{"type":"string","description":"Cursor for fetching the previous page (only for cursor pagination)","nullable":true}}},"ExternalInvoiceReceivablePaymentBankPaymentEntryV1Model":{"title":"Bank payment","type":"object","allOf":[{"$ref":"#/components/schemas/ExternalInvoiceReceivablePaymentEntryV1Model"},{"type":"object","properties":{"bankAccountId":{"type":"string","description":"ID of the bank account","format":"uuid","nullable":true},"endToEndId":{"type":"string","description":"End-to-end ID for the payment","nullable":true},"originalAmount":{"type":"integer","description":"Original payment amount in smallest denomination","format":"int64"},"originalCurrency":{"type":"string","example":"USD"},"accountingDocumentId":{"type":"string","description":"ID of the accounting document","format":"uuid"}}}]},"ExternalInvoiceReceivablePaymentCustomerCreditEntryV1Model":{"title":"Customer credit","type":"object","allOf":[{"$ref":"#/components/schemas/ExternalInvoiceReceivablePaymentEntryV1Model"},{"type":"object","properties":{"accountingDocumentId":{"type":"string","description":"ID of the accounting document","format":"uuid"},"amount":{"type":"integer","description":"Payment amount in smallest denomination","format":"int64","nullable":true},"documentNumber":{"type":"string","description":"Document number","nullable":true}}}]},"ExternalInvoiceReceivablePaymentEntryV1Model":{"type":"object","properties":{"type":{"type":"string","description":"- `BP` - Bank payment\n- `CC` - Customer credit\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["BP","CC"]}},"description":"Type of payment entry for an invoice receivable payment","nullable":true,"discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/ExternalInvoiceReceivablePaymentBankPaymentEntryV1Model"},{"$ref":"#/components/schemas/ExternalInvoiceReceivablePaymentCustomerCreditEntryV1Model"}]},"ExternalInvoiceReceivablePaymentV1Model":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the payment","format":"uuid"},"invoiceReceivableId":{"type":"string","description":"ID of the invoice receivable","format":"uuid"},"amount":{"type":"integer","description":"Payment amount in smallest denomination","format":"int64"},"paymentDate":{"type":"string","description":"Date the payment was made","format":"date"},"currency":{"type":"string","example":"USD"},"payment":{"$ref":"#/components/schemas/ExternalInvoiceReceivablePaymentEntryV1Model"},"createdAt":{"type":"string","description":"Timestamp when the payment was created","format":"date-time"}}},"ExternalInitInvoiceReceivableOpenRequestV1Model":{"type":"object","properties":{"emailInfo":{"$ref":"#/components/schemas/ExternalInvoiceReceivableEmailInfoRequestV1Model"},"shouldSendEmail":{"type":"boolean","description":"Whether to send the invoice via email when opening. Defaults to false","default":false},"shouldSubmitEInvoice":{"type":"boolean","description":"Whether to submit the invoice to the e-invoicing system (if configured). Defaults to false","default":false}}},"ExternalInvoiceReceivableEmailInfoRequestV1Model":{"type":"object","properties":{"subject":{"type":"string","description":"Email subject line"},"replyTo":{"type":"string","description":"Reply-to email address"},"recipients":{"type":"array","description":"List of email addresses to send the invoice to","items":{"type":"string","description":"List of email addresses to send the invoice to"}},"cc":{"type":"array","description":"List of email addresses to CC on the invoice email","nullable":true,"items":{"type":"string","description":"List of email addresses to CC on the invoice email","nullable":true}},"customMessage":{"type":"string","description":"Optional custom message added to the invoice email body","nullable":true}}},"ExternalRegisterInvoiceReceivablePaymentRequestV1Model":{"type":"object","properties":{"paymentDate":{"type":"string","description":"Date the payment was made","format":"date"},"bankAccountId":{"type":"string","description":"ID of the bank account the payment was received in. Deprecated: use `ledgerAccountId` instead. Exactly one of `bankAccountId` / `ledgerAccountId` must be set.","format":"uuid","nullable":true,"deprecated":true},"ledgerAccountId":{"type":"string","description":"ID of the payment-enabled ledger account the payment was received in. Accepts any payment-enabled ledger account, not just bank accounts. Exactly one of `bankAccountId` / `ledgerAccountId` must be set.","format":"uuid","nullable":true},"amountInInvoiceCurrency":{"type":"integer","description":"Payment amount in smallest denomination, in the invoice's currency","format":"int64"}}},"ExternalReverseInvoiceReceivableClearingRequestV1Model":{"type":"object","properties":{"clearingAccountingDocumentId":{"type":"string","description":"ID of the clearing accounting document to reverse — the bank payment or customer credit that was applied to this invoice receivable. Obtain it from the `accountingDocumentId` of an entry returned by the `List invoice payments` endpoint.","format":"uuid"},"clearingType":{"type":"string","description":"Type of the clearing being reversed: `BP` for a bank payment or `CC` for a customer credit. Matches the `type` of the corresponding entry returned by the `List invoice payments` endpoint.\n\n- `BP` - Bank payment\n- `CC` - Customer credit\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["BP","CC"]},"shouldArchiveClearingDocument":{"type":"boolean","description":"Whether to also archive the underlying clearing document (bank payment or customer credit) after reversing it.","default":false}}},"ExternalUpdateInvoiceReceivableRequestV1Model":{"type":"object","properties":{"companyEntityId":{"type":"string","description":"ID of the company entity","format":"uuid","nullable":true},"currency":{"type":"string","nullable":true,"example":"USD"},"paymentType":{"type":"string","description":"Payment type for the invoice\n\n- `AIRWALLEX` - Payment via Airwallex. A payment link will be displayed on the invoice\n- `BANK_TRANSFER` - Payment via bank transfer. Bank information will be displayed on the invoice\n- `DIRECT_DEBIT` - Payment via direct debit. A notice that the amount will be collected automatically will be displayed on the invoice\n- `STRIPE` - Payment via Stripe. A payment link will be sent to the customer\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["AIRWALLEX","BANK_TRANSFER","DIRECT_DEBIT","STRIPE"]},"invoiceDate":{"type":"string","description":"Date the invoice was issued","format":"date","nullable":true},"postingDate":{"type":"string","description":"Date the invoice is posted to the ledger (drives GL, VAT and revenue recognition). Defaults to the invoice date when omitted.","format":"date","nullable":true},"dueDate":{"type":"string","description":"Date the invoice payment is due","format":"date","nullable":true},"customerId":{"type":"string","description":"ID of the customer","format":"uuid","nullable":true},"areLinesWithTax":{"type":"boolean","description":"Whether the invoice line amounts are inclusive of tax. True means tax is included in the line amount, false means tax will be added on top","nullable":true},"netTerms":{"type":"integer","description":"Number of days from the invoice date to when the invoice is due. Setting this will automatically calculate the due date","format":"int32","nullable":true},"invoiceNumber":{"type":"string","description":"Unique invoice number. If not provided, one will be generated automatically when the invoice is opened.","nullable":true},"payeeBankAccountId":{"type":"string","description":"ID of the bank account where money should be sent to","format":"uuid","nullable":true},"invoiceTemplateId":{"type":"string","description":"ID of the invoice template","format":"uuid","nullable":true},"description":{"type":"string","description":"Invoice description","nullable":true},"poNumber":{"type":"string","description":"Purchase order number","nullable":true},"reference":{"type":"string","description":"Reference number for cross-referencing with procurement and invoicing workflows","nullable":true},"invoiceTemplateAdditionalText":{"type":"string","description":"Text that will be added to the additional text section of the invoice template","nullable":true},"customProperties":{"type":"array","description":"List of custom properties to set on the invoice or line","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}}}},"ExternalUpdateInvoiceReceivableLineRequestV1Model":{"type":"object","properties":{"productId":{"type":"string","description":"ID of the product","format":"uuid","nullable":true},"quantity":{"type":"number","description":"Quantity of the product","nullable":true},"accountId":{"type":"string","description":"ID of the ledger account for this line","format":"uuid","nullable":true},"taxCodeId":{"type":"string","description":"ID of the tax code to apply to this line","format":"uuid","nullable":true},"discount":{"$ref":"#/components/schemas/ExternalAccountReceivableLineDiscountV1Model"},"priceOverwrite":{"type":"integer","description":"Price overwrite in smallest denomination. If not provided, the product's default price will be used","format":"int64","nullable":true},"productNameOverwrite":{"type":"string","description":"Product name overwrite. If not provided, the product's default name will be used","nullable":true},"taxAmountOverwrite":{"type":"integer","description":"Tax amount override in smallest denomination. Bypasses tax calculation and sets the exact tax amount for this line.\n\nRequirements: The line must have a valid amount (product price or priceOverwrite must be set).\n\nThe taxAmount field in the response will reflect this override value.\n\nAmounts use smallest denomination. Examples: GBP 42.15 = 4215, JPY 12345 = 12345, BHD 7.321 = 7321.","format":"int64","nullable":true},"avataxCode":{"type":"string","description":"Avalara tax code. Used when the invoice tax engine is AVATAX","nullable":true},"billingStart":{"type":"string","description":"Start of the billing period for this line","format":"date","nullable":true},"billingEnd":{"type":"string","description":"End of the billing period for this line","format":"date","nullable":true},"customProperties":{"type":"array","description":"List of custom properties to set on the invoice or line","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}},"accrualTemplateId":{"type":"string","description":"ID of the accrual/amortization template to apply to this line","format":"uuid","nullable":true},"accrualStartDate":{"type":"string","description":"Start date for accrual/amortization","format":"date","nullable":true},"accrualEndDate":{"type":"string","description":"End date for accrual/amortization","format":"date","nullable":true}}},"ExternalJournalEntryLineV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"journalEntryId":{"type":"string","format":"uuid"},"netTransactionAmount":{"$ref":"#/components/schemas/DirectedAmount"},"grossTransactionAmount":{"$ref":"#/components/schemas/DirectedAmount"},"taxTransactionAmount":{"$ref":"#/components/schemas/DirectedAmount"},"description":{"type":"string"},"targetCompanyEntityId":{"type":"string","format":"uuid"},"ledgerTaxId":{"type":"string","format":"uuid"},"ledgerAccountId":{"type":"string","format":"uuid"},"costCenterId":{"type":"string","format":"uuid"},"customProperties":{"type":"array","items":{"$ref":"#/components/schemas/ExternalCustomPropertyV1Model"}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"amortizationTemplateId":{"type":"string","format":"uuid"},"amortizationStartDate":{"type":"string","format":"date"},"amortizationEndDate":{"type":"string","format":"date"}}},"ExternalJournalEntryV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"companyId":{"type":"string","format":"uuid"},"documentNumber":{"type":"string"},"companyEntityId":{"type":"string","format":"uuid"},"ledgerName":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["PRIMARY","ELIMINATION"]},"createdBy":{"type":"string","format":"uuid"},"updatedBy":{"type":"string","format":"uuid"},"documentSequenceId":{"type":"string"},"status":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["DRAFT","APPROVAL_PENDING","APPROVED","POSTED","PARTIALLY_CLEARED","CLEARED","ARCHIVED"]},"description":{"type":"string"},"currency":{"type":"string","example":"USD"},"postingDate":{"type":"string","format":"date"},"documentDate":{"type":"string","format":"date"},"valuationDate":{"type":"string","format":"date"},"localCurrencyFxRate":{"type":"number","description":"Custom foreign exchange rate for the ledger's local currency. If not provided, Light uses official ECB rates","nullable":true},"groupCurrencyFxRate":{"type":"number","description":"Custom foreign exchange rate for the ledger's group currency. If not provided, Light uses official ECB rates","nullable":true},"areLinesWithTax":{"type":"boolean"},"failureContext":{"$ref":"#/components/schemas/ExternalUiClientExceptionV1Model"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ExternalJournalEntryLineV1Model"}},"customProperties":{"type":"array","items":{"$ref":"#/components/schemas/ExternalCustomPropertyV1Model"}},"businessPartnerName":{"type":"string"},"businessPartnerId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"totalNetTransactionAmount":{"$ref":"#/components/schemas/DirectedAmount"},"totalTaxTransactionAmount":{"$ref":"#/components/schemas/DirectedAmount"},"totalGrossTransactionAmount":{"$ref":"#/components/schemas/DirectedAmount"},"multiJournalEntryId":{"type":"string","format":"uuid"}}},"ExternalCreateJournalEntryLineRequestV1Model":{"type":"object","properties":{"netTransactionAmount":{"$ref":"#/components/schemas/DirectedAmount"},"grossTransactionAmount":{"$ref":"#/components/schemas/DirectedAmount"},"taxAmount":{"$ref":"#/components/schemas/DirectedAmount"},"description":{"type":"string","nullable":true},"targetCompanyEntityId":{"type":"string","format":"uuid","nullable":true},"ledgerTaxId":{"type":"string","format":"uuid","nullable":true},"ledgerAccountId":{"type":"string","format":"uuid","nullable":true},"costCenterId":{"type":"string","format":"uuid","nullable":true},"amortizationTemplateId":{"type":"string","format":"uuid","nullable":true},"amortizationStartDate":{"type":"string","format":"date","nullable":true},"amortizationEndDate":{"type":"string","format":"date","nullable":true},"customProperties":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}}}},"ExternalCreateJournalEntryRequestV1Model":{"type":"object","properties":{"companyEntityId":{"type":"string","format":"uuid"},"ledgerName":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["PRIMARY","ELIMINATION"]},"documentNumber":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"currency":{"type":"string","nullable":true,"example":"USD"},"postingDate":{"type":"string","format":"date","nullable":true},"valuationDate":{"type":"string","format":"date","nullable":true},"localCurrencyFxRateOverride":{"type":"number","description":"Custom foreign exchange rate for the ledger's local currency. If not provided, Light uses official ECB rates","nullable":true},"groupCurrencyFxRateOverride":{"type":"number","description":"Custom foreign exchange rate for the ledger's group currency. If not provided, Light uses official ECB rates","nullable":true},"documentDate":{"type":"string","format":"date","nullable":true},"areLinesWithTax":{"type":"boolean"},"lines":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/ExternalCreateJournalEntryLineRequestV1Model"}},"businessPartnerName":{"type":"string","nullable":true},"businessPartnerId":{"type":"string","format":"uuid","nullable":true},"shouldPost":{"type":"boolean"},"customProperties":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}}}},"ExternalPaginatedResponseV1ModelExternalJournalEntryV1Model":{"type":"object","properties":{"records":{"type":"array","description":"List of records for the current page","items":{"$ref":"#/components/schemas/ExternalJournalEntryV1Model"}},"hasMore":{"type":"boolean","description":"Boolean flag indicating if there are more records available"},"total":{"type":"integer","description":"Total number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination.","format":"int64","nullable":true,"deprecated":true},"nextCursor":{"type":"string","description":"Cursor for fetching the next page (only for cursor pagination)","nullable":true},"prevCursor":{"type":"string","description":"Cursor for fetching the previous page (only for cursor pagination)","nullable":true}}},"ExternalUpdateJournalEntryRequestV1Model":{"type":"object","properties":{"companyEntityId":{"type":"string","format":"uuid","nullable":true},"ledgerName":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"enum":["PRIMARY","ELIMINATION"]},"postingDate":{"type":"string","format":"date","nullable":true},"documentDate":{"type":"string","format":"date","nullable":true},"areLinesWithTax":{"type":"boolean","nullable":true},"customProperties":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}},"valuationDate":{"type":"string","format":"date","nullable":true},"localCurrencyFxRateOverride":{"type":"number","description":"Custom foreign exchange rate for the ledger's local currency. If not provided, Light uses official ECB rates","nullable":true},"groupCurrencyFxRateOverride":{"type":"number","description":"Custom foreign exchange rate for the ledger's group currency. If not provided, Light uses official ECB rates","nullable":true},"documentNumber":{"type":"string","nullable":true},"businessPartnerName":{"type":"string","nullable":true},"businessPartnerId":{"type":"string","format":"uuid","nullable":true},"description":{"type":"string","nullable":true},"currency":{"type":"string","nullable":true,"example":"USD"}}},"ExternalLedgerAccountV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"companyId":{"type":"string","format":"uuid"},"bankAccountId":{"type":"string","format":"uuid","nullable":true},"cardAccountId":{"type":"string","format":"uuid","nullable":true},"cashAndEquivalentsAccountId":{"type":"string","format":"uuid","nullable":true},"code":{"type":"integer","format":"int32"},"label":{"type":"string"},"type":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["BANK","CARD","CASH_AND_EQUIVALENTS","ACCOUNTS_RECEIVABLE","INVENTORY","CORPORATE_TAX_RECEIVABLE","OTHER_CURRENT_ASSET","INTANGIBLE_NON_CURRENT_ASSET","TANGIBLE_NON_CURRENT_ASSET","FINANCIAL_NON_CURRENT_ASSET","CORPORATE_TAX_DEFERRED_ASSET","OTHER_NON_CURRENT_ASSET","ACCOUNTS_PAYABLE","OVERDRAFT_FACILITY","CORPORATE_TAX_PAYABLE","OTHER_CURRENT_LIABILITY","LONG_TERM_LOAN","CORPORATE_TAX_DEFERRED_LIABILITY","OTHER_LONG_TERM_LIABILITY","CONTRIBUTED_CAPITAL","RETAINED_EARNINGS","ACCUMULATED_OTHER_COMPREHENSIVE_INCOME","OTHER_EQUITY","COST_OF_SALES","DISTRIBUTION_COST","GENERAL_AND_ADMINISTRATIVE_EXPENSE","PERSONNEL_COST","OTHER_OPERATING_EXPENSE","INCOME_TAX","DEPRECIATION_AND_AMORTIZATION","NON_OPERATING_EXPENSE","INTEREST_EXPENSE","EXCHANGE_RATE_LOSS_REALIZED","EXCHANGE_RATE_LOSS_UNREALIZED","OTHER_FINANCIAL_EXPENSE","REVENUE","DISCOUNT","NON_OPERATING_INCOME","INTEREST_INCOME","EXCHANGE_RATE_GAIN_REALIZED","EXCHANGE_RATE_GAIN_UNREALIZED","OTHER_FINANCIAL_INCOME"]},"status":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["ACTIVE","DISABLED_EXTERNALLY","DISABLED"]},"context":{"type":"string","nullable":true},"revaluateFxBalance":{"type":"boolean"},"companyEntities":{"type":"array","items":{"$ref":"#/components/schemas/ExternalCompanyEntityV1Model"}},"customProperties":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/ExternalCustomPropertyV1Model"}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"description":"List of records for the current page"},"ExternalPaginatedResponseV1ModelExternalLedgerAccountV1Model":{"type":"object","properties":{"records":{"type":"array","description":"List of records for the current page","items":{"$ref":"#/components/schemas/ExternalLedgerAccountV1Model"}},"hasMore":{"type":"boolean","description":"Boolean flag indicating if there are more records available"},"total":{"type":"integer","description":"Total number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination.","format":"int64","nullable":true,"deprecated":true},"nextCursor":{"type":"string","description":"Cursor for fetching the next page (only for cursor pagination)","nullable":true},"prevCursor":{"type":"string","description":"Cursor for fetching the previous page (only for cursor pagination)","nullable":true}}},"ExternalGetLedgerTransactionLinesWithMaxAmountResponseV1Model":{"type":"object","properties":{"maxTransactionAmount":{"type":"integer","description":"Maximum line amount in transaction currency across all records. This field is deprecated and will be removed, please fetch all lines and compute this locally if needed","format":"int64","nullable":true,"deprecated":true},"records":{"type":"array","description":"List of records for the current page","items":{"$ref":"#/components/schemas/ExternalLedgerTransactionLineV1Model"}},"hasMore":{"type":"boolean","description":"Boolean flag indicating if there are more records available"},"total":{"type":"integer","description":"Total number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination.","format":"int64","nullable":true,"deprecated":true},"nextCursor":{"type":"string","description":"Cursor for fetching the next page (only for cursor pagination)","nullable":true},"prevCursor":{"type":"string","description":"Cursor for fetching the previous page (only for cursor pagination)","nullable":true}}},"ExternalLedgerTransactionLineAmountsV1Model":{"type":"object","properties":{"dcSign":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["D","C"]},"transactionAmount":{"type":"integer","format":"int64","nullable":true},"transactionAmountInMajors":{"type":"number","nullable":true},"signedTransactionAmount":{"type":"integer","format":"int64","nullable":true},"transactionCurrency":{"type":"string","nullable":true,"example":"USD"},"localAmount":{"type":"integer","format":"int64"},"localAmountInMajors":{"type":"number"},"signedLocalAmount":{"type":"integer","format":"int64"},"localCurrency":{"type":"string","example":"USD"},"groupAmount":{"type":"integer","format":"int64"},"groupAmountInMajors":{"type":"number"},"signedGroupAmount":{"type":"integer","format":"int64"},"groupCurrency":{"type":"string","example":"USD"},"debit":{"type":"boolean"},"credit":{"type":"boolean"}}},"ExternalLedgerTransactionLineV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"ledgerTransactionId":{"type":"string","format":"uuid"},"reversedLedgerTransactionId":{"type":"string","description":"Only reversal lines carry the original ledger transaction ID; original lines have null.","format":"uuid","nullable":true},"reversedLedgerTransactionLineId":{"type":"string","description":"Only reversal lines carry the original ledger transaction line ID; original lines have null.","format":"uuid","nullable":true},"transactionSequenceId":{"type":"string"},"companyId":{"type":"string","format":"uuid"},"companyEntityId":{"type":"string","format":"uuid"},"companyEntityCode":{"type":"string"},"companyEntityName":{"type":"string"},"ledgerName":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["PRIMARY","ELIMINATION"]},"accountId":{"type":"string","format":"uuid"},"accountCode":{"type":"integer","format":"int32"},"accountLabel":{"type":"string"},"accountType":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["BANK","CARD","CASH_AND_EQUIVALENTS","ACCOUNTS_RECEIVABLE","INVENTORY","CORPORATE_TAX_RECEIVABLE","OTHER_CURRENT_ASSET","INTANGIBLE_NON_CURRENT_ASSET","TANGIBLE_NON_CURRENT_ASSET","FINANCIAL_NON_CURRENT_ASSET","CORPORATE_TAX_DEFERRED_ASSET","OTHER_NON_CURRENT_ASSET","ACCOUNTS_PAYABLE","OVERDRAFT_FACILITY","CORPORATE_TAX_PAYABLE","OTHER_CURRENT_LIABILITY","LONG_TERM_LOAN","CORPORATE_TAX_DEFERRED_LIABILITY","OTHER_LONG_TERM_LIABILITY","CONTRIBUTED_CAPITAL","RETAINED_EARNINGS","ACCUMULATED_OTHER_COMPREHENSIVE_INCOME","OTHER_EQUITY","COST_OF_SALES","DISTRIBUTION_COST","GENERAL_AND_ADMINISTRATIVE_EXPENSE","PERSONNEL_COST","OTHER_OPERATING_EXPENSE","INCOME_TAX","DEPRECIATION_AND_AMORTIZATION","NON_OPERATING_EXPENSE","INTEREST_EXPENSE","EXCHANGE_RATE_LOSS_REALIZED","EXCHANGE_RATE_LOSS_UNREALIZED","OTHER_FINANCIAL_EXPENSE","REVENUE","DISCOUNT","NON_OPERATING_INCOME","INTEREST_INCOME","EXCHANGE_RATE_GAIN_REALIZED","EXCHANGE_RATE_GAIN_UNREALIZED","OTHER_FINANCIAL_INCOME"]},"accountingDocumentLineId":{"type":"string","format":"uuid","nullable":true},"documentSequenceId":{"type":"string"},"accountingDocumentId":{"type":"string","format":"uuid"},"accountingDocumentNumber":{"type":"string","nullable":true},"documentType":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["AP","AR","BP","CC","CN","CT","DE","FX","JE","YC"]},"type":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["DISCOUNT","MAIN","OFFSET","ROUNDING","TAX","WITHHOLDING"]},"postingDate":{"type":"string","format":"date"},"valuationDate":{"type":"string","format":"date"},"description":{"type":"string","nullable":true},"documentDescription":{"type":"string","nullable":true},"amounts":{"$ref":"#/components/schemas/ExternalLedgerTransactionLineAmountsV1Model"},"taxId":{"type":"string","format":"uuid","nullable":true},"taxTagLabel":{"type":"string","nullable":true},"taxCode":{"type":"string","nullable":true},"businessPartnerName":{"type":"string","nullable":true},"businessPartnerId":{"type":"string","format":"uuid","nullable":true},"costCenterId":{"type":"string","format":"uuid","nullable":true},"accruedLedgerTransactionLineId":{"type":"string","format":"uuid","nullable":true},"ledgerTransactionType":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["DEFAULT","AMORTIZATION","FX","CTA","BANK_CLEARING"]},"isAmortized":{"type":"boolean"},"accountingReleaseStartDate":{"type":"string","format":"date","nullable":true},"accountingReleaseEndDate":{"type":"string","format":"date","nullable":true},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string","format":"uuid","nullable":true},"customProperties":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/ExternalCustomPropertyV1Model"}}},"description":"List of records for the current page"},"ExternalProductPricingV1Model":{"type":"object","properties":{"currency":{"type":"string","example":"USD"},"amount":{"type":"integer","description":"Price in cents","format":"int64"}}},"ExternalProductV1Model":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the object","format":"uuid"},"companyId":{"type":"string","description":"ID of the company","format":"uuid"},"name":{"type":"string","description":"Name of the product"},"pricingType":{"type":"string","description":"Pricing type of the product\n\n- `FIXED` - The product has a single price per unit\n- `PACKAGE` - The product is sold in packages with a fixed quantity\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["FIXED","PACKAGE"]},"billingRecurrence":{"type":"string","description":"Billing frequency for the product. Used in contracts\n\n- `ONE_TIME` - The product is billed once\n- `MONTHLY` - The product is billed every month\n- `QUARTERLY` - The product is billed every three months\n- `HALF_YEARLY` - The product is billed every six months\n- `YEARLY` - The product is billed every year\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["ONE_TIME","MONTHLY","QUARTERLY","HALF_YEARLY","YEARLY"]},"pricings":{"type":"array","description":"List of product price per currency","items":{"$ref":"#/components/schemas/ExternalProductPricingV1Model"}},"state":{"type":"string","description":"Product state\n\n- `ACTIVE` - The product is active and can be used in invoices and contracts\n- `ARCHIVED` - The product is archived and cannot be used in new invoices or contracts\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["ACTIVE","ARCHIVED"]},"defaultTaxId":{"type":"string","description":"ID of the default tax code for this product. Will be assigned to invoice lines when creating a line with this product","format":"uuid","nullable":true},"defaultAvataxCode":{"type":"string","description":"Default Avalara tax code. Used when the invoice tax engine is `AVATAX`. Will be assigned to invoice lines when creating a line with this product","nullable":true},"defaultLedgerAccountId":{"type":"string","description":"ID of the default ledger account for this product. Will be assigned to invoice lines when creating a line with this product","format":"uuid","nullable":true},"externalSource":{"$ref":"#/components/schemas/ExternalApiExternalSourceV1Model"},"createdAt":{"type":"string","description":"Timestamp when the product was created","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the product was last updated","format":"date-time"},"customProperties":{"type":"array","description":"List of custom properties associated with the product","nullable":true,"items":{"$ref":"#/components/schemas/ExternalCustomPropertyV1Model"}}}},"ExternalCreateProductRequestV1Model":{"type":"object","properties":{"name":{"type":"string"},"pricingType":{"type":"string","description":"- `FIXED` - The product has a single price per unit\n- `PACKAGE` - The product is sold in packages with a fixed quantity\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["FIXED","PACKAGE"]},"billingRecurrence":{"type":"string","description":"- `ONE_TIME` - The product is billed once\n- `MONTHLY` - The product is billed every month\n- `QUARTERLY` - The product is billed every three months\n- `HALF_YEARLY` - The product is billed every six months\n- `YEARLY` - The product is billed every year\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["ONE_TIME","MONTHLY","QUARTERLY","HALF_YEARLY","YEARLY"]},"pricings":{"type":"array","items":{"$ref":"#/components/schemas/ExternalProductPricingV1Model"}},"defaultAvataxCode":{"type":"string","nullable":true},"defaultTaxId":{"type":"string","format":"uuid","nullable":true},"defaultLedgerAccountId":{"type":"string","format":"uuid","nullable":true},"customProperties":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}}}},"ExternalPaginatedResponseV1ModelExternalProductV1Model":{"type":"object","properties":{"records":{"type":"array","description":"List of records for the current page","items":{"$ref":"#/components/schemas/ExternalProductV1Model"}},"hasMore":{"type":"boolean","description":"Boolean flag indicating if there are more records available"},"total":{"type":"integer","description":"Total number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination.","format":"int64","nullable":true,"deprecated":true},"nextCursor":{"type":"string","description":"Cursor for fetching the next page (only for cursor pagination)","nullable":true},"prevCursor":{"type":"string","description":"Cursor for fetching the previous page (only for cursor pagination)","nullable":true}}},"ExternalUpdateProductRequestV1Model":{"type":"object","properties":{"name":{"type":"string","nullable":true},"pricingType":{"type":"string","description":"- `FIXED` - The product has a single price per unit\n- `PACKAGE` - The product is sold in packages with a fixed quantity\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"enum":["FIXED","PACKAGE"]},"billingRecurrence":{"type":"string","description":"- `ONE_TIME` - The product is billed once\n- `MONTHLY` - The product is billed every month\n- `QUARTERLY` - The product is billed every three months\n- `HALF_YEARLY` - The product is billed every six months\n- `YEARLY` - The product is billed every year\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"enum":["ONE_TIME","MONTHLY","QUARTERLY","HALF_YEARLY","YEARLY"]},"pricings":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/ExternalProductPricingV1Model"}},"customProperties":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}},"defaultAvataxCode":{"type":"string","nullable":true},"defaultTaxId":{"type":"string","format":"uuid","nullable":true},"defaultLedgerAccountId":{"type":"string","format":"uuid","nullable":true}}},"ExternalPurchaseOrderLineV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"companyId":{"type":"string","format":"uuid"},"purchaseOrderId":{"type":"string","format":"uuid"},"description":{"type":"string"},"costCenterId":{"type":"string","format":"uuid"},"accountId":{"type":"string","format":"uuid"},"taxCodeId":{"type":"string","format":"uuid"},"quantity":{"type":"number"},"unitPrice":{"type":"integer","format":"int64"},"amount":{"type":"integer","format":"int64"},"netAmount":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"customProperties":{"type":"array","items":{"$ref":"#/components/schemas/ExternalCustomPropertyV1Model"}}}},"ExternalBatchUpdatePurchaseOrderLineRequestV1Model":{"type":"object","properties":{"lineId":{"type":"string","format":"uuid"},"description":{"type":"string","nullable":true},"costCenterId":{"type":"string","format":"uuid","nullable":true},"accountId":{"type":"string","format":"uuid","nullable":true},"taxCodeId":{"type":"string","format":"uuid","nullable":true},"quantity":{"type":"number","nullable":true},"unitPrice":{"type":"integer","format":"int64","nullable":true},"customProperties":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}}}},"ExternalCreatePurchaseOrderLineRequestV1Model":{"type":"object","properties":{"description":{"type":"string"},"costCenterId":{"type":"string","format":"uuid"},"accountId":{"type":"string","format":"uuid"},"taxCodeId":{"type":"string","format":"uuid"},"quantity":{"type":"number"},"unitPrice":{"type":"integer","format":"int64"},"customProperties":{"type":"array","items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}}}},"ExternalPurchaseOrderV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"companyId":{"type":"string","format":"uuid"},"createdBy":{"type":"string","format":"uuid"},"companyEntityId":{"type":"string","format":"uuid"},"purchaseRequestId":{"type":"string","format":"uuid"},"state":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["IN_DRAFT","RESET_PENDING","APPROVED_ACCOUNTING_ENTRY_PENDING","OPEN","CLOSE_PENDING","CLOSED","CANCEL_PENDING","CANCELLED"]},"totalAmount":{"type":"integer","format":"int64"},"totalNetAmount":{"type":"integer","format":"int64"},"totalTaxAmount":{"type":"integer","format":"int64"},"erpNumber":{"type":"string"},"description":{"type":"string"},"currency":{"type":"string","example":"USD"},"ownerId":{"type":"string","format":"uuid"},"vendorId":{"type":"string","format":"uuid"},"vendorEmail":{"type":"string"},"deliveryAddress":{"type":"string"},"deliveryDate":{"type":"string","format":"date"},"documentKey":{"type":"string"},"failureContext":{"$ref":"#/components/schemas/ExternalUiClientExceptionV1Model"},"editStatus":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["ALL_EDITS_ALLOWED","ALL_EDITS_LOCKED","CORE_EDITS_LOCKED"]},"purchaseOrderDate":{"type":"string","format":"date"},"erpSyncedAt":{"type":"string","format":"date-time"},"lockedAt":{"type":"string","format":"date-time"},"closedAt":{"type":"string","format":"date-time"},"cancelledAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ExternalPurchaseOrderLineV1Model"}},"customProperties":{"type":"array","items":{"$ref":"#/components/schemas/ExternalCustomPropertyV1Model"}}}},"ExternalCreatePurchaseOrderRequestV1Model":{"type":"object","properties":{"vendorId":{"type":"string","format":"uuid","nullable":true},"companyEntityId":{"type":"string","format":"uuid","nullable":true},"ownerId":{"type":"string","format":"uuid","nullable":true},"currency":{"type":"string","nullable":true,"example":"USD"},"purchaseOrderDate":{"type":"string","format":"date","nullable":true},"deliveryAddress":{"type":"string","nullable":true},"deliveryDate":{"type":"string","format":"date","nullable":true},"description":{"type":"string","nullable":true},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ExternalCreatePurchaseOrderLineRequestV1Model"}},"customProperties":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}}}},"ExternalBffPurchaseOrderLineV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"companyId":{"type":"string","format":"uuid"},"purchaseOrderId":{"type":"string","format":"uuid"},"description":{"type":"string","nullable":true},"quantity":{"type":"integer","format":"int64","nullable":true},"unitPrice":{"type":"integer","format":"int64","nullable":true},"accountId":{"type":"string","format":"uuid","nullable":true},"accountLabel":{"type":"string","nullable":true},"taxCodeId":{"type":"string","format":"uuid","nullable":true},"amount":{"type":"integer","format":"int64","nullable":true},"taxAmount":{"type":"integer","format":"int64","nullable":true},"netAmount":{"type":"integer","format":"int64","nullable":true},"taxCodeLabel":{"type":"string","nullable":true},"costCenterId":{"type":"string","format":"uuid","nullable":true},"costCenterName":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"ExternalBffPurchaseOrderV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"companyId":{"type":"string","format":"uuid"},"createdBy":{"type":"string","format":"uuid","nullable":true},"companyEntityId":{"type":"string","format":"uuid","nullable":true},"purchaseRequestId":{"type":"string","format":"uuid","nullable":true},"state":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["IN_DRAFT","RESET_PENDING","APPROVED_ACCOUNTING_ENTRY_PENDING","OPEN","CLOSE_PENDING","CLOSED","CANCEL_PENDING","CANCELLED"]},"erpNumber":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"currency":{"type":"string","nullable":true,"example":"USD"},"totalAmount":{"type":"integer","format":"int64"},"totalNetAmount":{"type":"integer","format":"int64"},"totalTaxAmount":{"type":"integer","format":"int64"},"totalMatchedAmount":{"type":"integer","format":"int64"},"ownerId":{"type":"string","format":"uuid","nullable":true},"ownerName":{"type":"string","nullable":true},"vendorId":{"type":"string","format":"uuid","nullable":true},"vendorEmail":{"type":"string","nullable":true},"vendorName":{"type":"string","nullable":true},"vendorAvatarUrl":{"type":"string","nullable":true},"documentKey":{"type":"string","nullable":true},"failureContext":{"$ref":"#/components/schemas/ExternalUiClientExceptionV1Model"},"purchaseOrderDate":{"type":"string","format":"date","nullable":true},"deliveryAddress":{"type":"string","nullable":true},"deliveryDate":{"type":"string","format":"date","nullable":true},"erpSyncedAt":{"type":"string","format":"date-time","nullable":true},"lockedAt":{"type":"string","format":"date-time","nullable":true},"closedAt":{"type":"string","format":"date-time","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ExternalBffPurchaseOrderLineV1Model"}}},"description":"List of records for the current page"},"ExternalPaginatedResponseV1ModelExternalBffPurchaseOrderV1Model":{"type":"object","properties":{"records":{"type":"array","description":"List of records for the current page","items":{"$ref":"#/components/schemas/ExternalBffPurchaseOrderV1Model"}},"hasMore":{"type":"boolean","description":"Boolean flag indicating if there are more records available"},"total":{"type":"integer","description":"Total number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination.","format":"int64","nullable":true,"deprecated":true},"nextCursor":{"type":"string","description":"Cursor for fetching the next page (only for cursor pagination)","nullable":true},"prevCursor":{"type":"string","description":"Cursor for fetching the previous page (only for cursor pagination)","nullable":true}}},"ExternalUpdatePurchaseOrderRequestV1Model":{"type":"object","properties":{"customProperties":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}},"vendorId":{"type":"string","format":"uuid","nullable":true},"companyEntityId":{"type":"string","format":"uuid","nullable":true},"ownerId":{"type":"string","format":"uuid","nullable":true},"currency":{"type":"string","nullable":true,"example":"USD"},"purchaseOrderDate":{"type":"string","format":"date","nullable":true},"deliveryAddress":{"type":"string","nullable":true},"deliveryDate":{"type":"string","format":"date","nullable":true},"description":{"type":"string","nullable":true}}},"ExternalUpdatePurchaseOrderLineRequestV1Model":{"type":"object","properties":{"customProperties":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}},"description":{"type":"string","nullable":true},"costCenterId":{"type":"string","format":"uuid","nullable":true},"accountId":{"type":"string","format":"uuid","nullable":true},"taxCodeId":{"type":"string","format":"uuid","nullable":true},"quantity":{"type":"number","nullable":true},"unitPrice":{"type":"integer","format":"int64","nullable":true}}},"ExternalPaginatedResponseV1ModelExternalReimbursementCategoryV1Model":{"type":"object","properties":{"records":{"type":"array","description":"List of records for the current page","items":{"$ref":"#/components/schemas/ExternalReimbursementCategoryV1Model"}},"hasMore":{"type":"boolean","description":"Boolean flag indicating if there are more records available"},"total":{"type":"integer","description":"Total number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination.","format":"int64","nullable":true,"deprecated":true},"nextCursor":{"type":"string","description":"Cursor for fetching the next page (only for cursor pagination)","nullable":true},"prevCursor":{"type":"string","description":"Cursor for fetching the previous page (only for cursor pagination)","nullable":true}}},"ExternalReimbursementCategoryV1Model":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the reimbursement category","format":"uuid"},"companyId":{"type":"string","description":"ID of the company","format":"uuid"},"companyEntityIds":{"uniqueItems":true,"type":"array","description":"Company entities this category is available for","items":{"type":"string","description":"Company entities this category is available for","format":"uuid"}},"label":{"type":"string","description":"Display name of the category"},"accountId":{"type":"string","description":"GL account a reimbursement line with this category books to","format":"uuid"},"taxCodeId":{"type":"string","description":"Tax code applied to a reimbursement line with this category","format":"uuid","nullable":true},"context":{"type":"string","description":"Free-text guidance describing when the category applies","nullable":true},"status":{"type":"string","description":"Status of the reimbursement category\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["ACTIVE"]},"createdAt":{"type":"string","description":"Timestamp when the reimbursement category was created","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the reimbursement category was last updated","format":"date-time"}},"description":"List of records for the current page"},"ExternalTaxCodeV1Model":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the tax code. Documents reference it as `taxCodeId`","format":"uuid"},"companyId":{"type":"string","description":"ID of the company","format":"uuid"},"code":{"type":"string","description":"Short code of the tax code, unique within the company"},"name":{"type":"string","description":"Display name of the tax code"},"rate":{"type":"number","description":"Tax rate as a fraction: `0.25` is 25%. Null for an exempt tax code","example":0.25},"type":{"type":"string","description":"Whether the tax code applies to purchases (bills) or to sales (sales invoices)\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["PURCHASE","SALES"]},"status":{"type":"string","description":"Status of the tax code. `DISABLED_EXTERNALLY` is set by an ERP sync when the code was disabled in the ERP\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["ACTIVE","DISABLED","DISABLED_EXTERNALLY"]},"sourceType":{"type":"string","description":"Where the tax code is maintained. `SYNCED_EXTERNALLY` means the code mirrors one in the company's ERP; `INTERNAL` means it was created in Light\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["INTERNAL","SYNCED_EXTERNALLY"]},"country":{"type":"string","description":"Country whose tax rules the tax code follows\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["AC","AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BU","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CR","CS","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","FX","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NT","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SF","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SU","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","UK","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XI","XU","XK","YE","YT","YU","ZA","ZM","ZR","ZW"]},"taxCategory":{"type":"string","description":"Whether the tax code is for goods or for services. Null when not set\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["GOODS","SERVICES"]},"edifactCode":{"type":"string","description":"Duty or tax category code from the UNCL5305 code list, used on electronic invoices (https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL5305/)\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["AE","E","G","K","L","M","O","S","Z"]},"context":{"type":"string","description":"Free-text guidance describing when the tax code applies"},"baseTaxTag":{"$ref":"#/components/schemas/ExternalTaxTagV1Model"},"companyEntityIds":{"uniqueItems":true,"type":"array","description":"Company entities the code may be used in","items":{"type":"string","description":"Company entities the code may be used in","format":"uuid"}},"createdAt":{"type":"string","description":"Timestamp when the tax code was created","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the tax code was last updated","format":"date-time"}},"description":"List of records for the current page"},"ExternalTaxTagV1Model":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the tax tag","format":"uuid"},"label":{"type":"string","description":"Label of the tax tag, as it appears on the tax report"},"country":{"type":"string","description":"Country whose tax report the tax tag belongs to\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["AC","AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BU","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CR","CS","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","FX","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NT","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SF","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SU","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","UK","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XI","XU","XK","YE","YT","YU","ZA","ZM","ZR","ZW"]}},"description":"Tax tag the taxable base of a line with this tax code is reported under on the tax report"},"ExternalCursorPaginatedResponseV1ModelExternalTaxCodeV1Model":{"type":"object","properties":{"records":{"type":"array","description":"List of records for the current page","items":{"$ref":"#/components/schemas/ExternalTaxCodeV1Model"}},"hasMore":{"type":"boolean","description":"Boolean flag indicating if there are more records available"},"nextCursor":{"type":"string","description":"Cursor for fetching the next page","nullable":true},"prevCursor":{"type":"string","description":"Cursor for fetching the previous page","nullable":true}}},"ExternalUserCommentV1Model":{"type":"object","properties":{"id":{"type":"string","description":"ID of the comment.","format":"uuid"},"companyId":{"type":"string","description":"ID of the company this comment belongs to.","format":"uuid"},"resourceId":{"type":"string","description":"ID of the resource this comment is attached to (e.g. vendor, customer, etc.).","format":"uuid"},"content":{"type":"string","description":"Comment content."},"createdBy":{"type":"string","description":"ID of the user who created the comment.","format":"uuid"},"createdAt":{"type":"string","description":"Timestamp when the comment was created.","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the comment was last updated.","format":"date-time"}}},"ExternalCreateUserCommentRequestV1Model":{"type":"object","properties":{"resourceId":{"type":"string","description":"ID of the resource this comment is attached to (e.g. vendor, customer, etc.).","format":"uuid"},"content":{"type":"string","description":"Comment content."}}},"ExternalPaginatedResponseV1ModelExternalUserCommentV1Model":{"type":"object","properties":{"records":{"type":"array","description":"List of records for the current page","items":{"$ref":"#/components/schemas/ExternalUserCommentV1Model"}},"hasMore":{"type":"boolean","description":"Boolean flag indicating if there are more records available"},"total":{"type":"integer","description":"Total number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination.","format":"int64","nullable":true,"deprecated":true},"nextCursor":{"type":"string","description":"Cursor for fetching the next page (only for cursor pagination)","nullable":true},"prevCursor":{"type":"string","description":"Cursor for fetching the previous page (only for cursor pagination)","nullable":true}}},"ExternalUpdateUserCommentRequestV1Model":{"type":"object","properties":{"content":{"type":"string","description":"Comment content."}}},"ExternalAddUsersToGroupRequestV1Model":{"type":"object","properties":{"userIds":{"uniqueItems":true,"type":"array","items":{"type":"string","format":"uuid"}}}},"ExternalUserGroupV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"companyId":{"type":"string","format":"uuid"},"memberCount":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"ExternalUserV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"companyId":{"type":"string","format":"uuid"},"companyEntityId":{"type":"string","format":"uuid"},"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"phoneNumber":{"$ref":"#/components/schemas/PhoneNumber"},"avatarUrl":{"type":"string"},"country":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["AC","AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BU","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CR","CS","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","FX","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NT","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SF","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SU","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","UK","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XI","XU","XK","YE","YT","YU","ZA","ZM","ZR","ZW"]},"city":{"type":"string"},"zipcode":{"type":"string"},"address":{"type":"string"},"status":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["ACTIVE","DEACTIVATED"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"roles":{"uniqueItems":true,"type":"array","items":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["REIMBURSEMENT","CARDHOLDER","CONTROLLER","COMPANY_ADMIN","VENDOR_MANAGEMENT","INVOICE_APPROVER","AP_PREPARATION","AP_CLERK","AR_CLERK","PURCHASE_REQUESTER","REPORT_VIEWER","AUDITOR"]}},"groups":{"uniqueItems":true,"type":"array","items":{"$ref":"#/components/schemas/ExternalUserGroupV1Model"}},"managerIds":{"uniqueItems":true,"type":"array","items":{"type":"string","format":"uuid"}}}},"ExternalCreateUserRequestV1Model":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"companyEntityId":{"type":"string","format":"uuid"},"phoneNumber":{"$ref":"#/components/schemas/PhoneNumber"},"avatarUrl":{"type":"string","nullable":true},"country":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"enum":["AC","AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BU","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CR","CS","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","FX","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NT","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SF","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SU","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","UK","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XI","XU","XK","YE","YT","YU","ZA","ZM","ZR","ZW"]},"city":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"zipcode":{"type":"string","nullable":true},"roles":{"uniqueItems":true,"type":"array","items":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["REIMBURSEMENT","CARDHOLDER","CONTROLLER","COMPANY_ADMIN","VENDOR_MANAGEMENT","INVOICE_APPROVER","AP_PREPARATION","AP_CLERK","AR_CLERK","PURCHASE_REQUESTER","REPORT_VIEWER","AUDITOR"]}},"sendWelcomeEmail":{"type":"boolean","nullable":true}}},"ExternalPaginatedResponseV1ModelExternalUserV1Model":{"type":"object","properties":{"records":{"type":"array","description":"List of records for the current page","items":{"$ref":"#/components/schemas/ExternalUserV1Model"}},"hasMore":{"type":"boolean","description":"Boolean flag indicating if there are more records available"},"total":{"type":"integer","description":"Total number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination.","format":"int64","nullable":true,"deprecated":true},"nextCursor":{"type":"string","description":"Cursor for fetching the next page (only for cursor pagination)","nullable":true},"prevCursor":{"type":"string","description":"Cursor for fetching the previous page (only for cursor pagination)","nullable":true}}},"ExternalUserReimbursementConfigV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"userId":{"type":"string","format":"uuid"},"companyId":{"type":"string","format":"uuid"},"currency":{"type":"string","example":"USD"},"defaultCostCenterId":{"type":"string","format":"uuid"},"bankCountry":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["AC","AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BU","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CR","CS","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","FX","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NT","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SF","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SU","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","UK","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XI","XU","XK","YE","YT","YU","ZA","ZM","ZR","ZW"]},"bankName":{"type":"string"},"bankCity":{"type":"string"},"bankAddress":{"type":"string"},"bankZipcode":{"type":"string"},"bankAccountNumber":{"type":"string"},"bankAccountBic":{"type":"string"},"domesticBankAccountNumber":{"type":"string"},"domesticBankAccountCode":{"type":"string"},"status":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["ACTIVE"]},"failureContext":{"$ref":"#/components/schemas/ExternalUiClientExceptionV1Model"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"ExternalUpdateUserRequestV1Model":{"type":"object","properties":{"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"companyEntityId":{"type":"string","format":"uuid","nullable":true},"phoneNumber":{"$ref":"#/components/schemas/PhoneNumber"},"avatarUrl":{"type":"string","nullable":true},"country":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"enum":["AC","AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BU","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CR","CS","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","FX","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NT","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SF","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SU","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","UK","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XI","XU","XK","YE","YT","YU","ZA","ZM","ZR","ZW"]},"city":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"zipcode":{"type":"string","nullable":true}}},"ExternalUpdateUserManagersRequestV1Model":{"type":"object","properties":{"managerIds":{"uniqueItems":true,"type":"array","items":{"type":"string","format":"uuid"}}}},"ExternalUpdateUserRolesRequestV1Model":{"type":"object","properties":{"roles":{"uniqueItems":true,"type":"array","items":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["REIMBURSEMENT","CARDHOLDER","CONTROLLER","COMPANY_ADMIN","VENDOR_MANAGEMENT","INVOICE_APPROVER","AP_PREPARATION","AP_CLERK","AR_CLERK","PURCHASE_REQUESTER","REPORT_VIEWER","AUDITOR"]}},"sendWelcomeEmail":{"type":"boolean","nullable":true}}},"ExternalUpdateUserStatusRequestV1Model":{"type":"object","properties":{"status":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["ACTIVE","DEACTIVATED"]}}},"ExternalUpsertUserReimbursementConfigRequestV1Model":{"type":"object","properties":{"currency":{"type":"string","example":"USD"},"bankCountry":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["AC","AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BU","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CR","CS","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","FX","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NT","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SF","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SU","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","UK","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XI","XU","XK","YE","YT","YU","ZA","ZM","ZR","ZW"]},"defaultCostCenterId":{"type":"string","format":"uuid","nullable":true},"bankName":{"type":"string","nullable":true},"bankCity":{"type":"string","nullable":true},"bankAddress":{"type":"string","nullable":true},"bankZipcode":{"type":"string","nullable":true},"bankAccountNumber":{"type":"string","nullable":true},"bankAccountBic":{"type":"string","nullable":true},"domesticBankAccountNumber":{"type":"string","nullable":true},"domesticBankAccountCode":{"type":"string","nullable":true}}},"ExternalDefaultVendorCompanyEntityV1Model":{"type":"object","properties":{"id":{"type":"string","description":"ID of the default company entity configuration.","format":"uuid"},"vendorId":{"type":"string","description":"ID of the vendor.","format":"uuid"},"companyEntityId":{"type":"string","description":"ID of the company entity.","format":"uuid","nullable":true},"accountId":{"type":"string","description":"ID of the ledger account to use for this vendor.","format":"uuid","nullable":true},"taxCodeId":{"type":"string","description":"ID of the tax code to use for this vendor.","format":"uuid","nullable":true},"costCenterId":{"type":"string","description":"ID of the cost center to use for this vendor.","format":"uuid","nullable":true},"senderBankAccountId":{"type":"string","description":"ID of the sender bank account to use for payments to this vendor.","format":"uuid","nullable":true},"createdAt":{"type":"string","description":"Timestamp when the configuration was created.","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the configuration was last updated.","format":"date-time"}},"description":"Default company entity configuration for this vendor, if any.","nullable":true},"ExternalVendorApproverV1Model":{"type":"object","properties":{"id":{"type":"string","description":"ID of the vendor approver entry.","format":"uuid"},"userId":{"type":"string","description":"ID of the approver user.","format":"uuid"},"vendorId":{"type":"string","description":"ID of the vendor.","format":"uuid"},"priority":{"type":"integer","description":"Approval priority (lower means earlier).","format":"int32"},"createdAt":{"type":"string","description":"Timestamp when the approver entry was created.","format":"date-time"}},"description":"List of vendor approvers."},"ExternalVendorNoteV1Model":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"vendorId":{"type":"string","format":"uuid"},"authorId":{"type":"string","format":"uuid"},"companyId":{"type":"string","format":"uuid"},"channel":{"type":"string","description":"⚠️ This enum is not exhaustive; new values may be added in the future.","enum":["WEB_APP","SLACK"]},"content":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"description":"List of vendor notes."},"ExternalVendorV1Model":{"type":"object","properties":{"type":{"type":"string","description":"Type of the vendor.\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["EXTERNAL","USER"]},"vendorId":{"type":"string","description":"External ID of the vendor.","format":"uuid"},"companyId":{"type":"string","description":"ID of the company this vendor belongs to.","format":"uuid"},"companyEntityIds":{"uniqueItems":true,"type":"array","description":"IDs of the company entities this vendor is associated with.","items":{"type":"string","description":"IDs of the company entities this vendor is associated with.","format":"uuid"}},"defaultCompanyEntity":{"$ref":"#/components/schemas/ExternalDefaultVendorCompanyEntityV1Model"},"vatId":{"type":"string","description":"Vendor VAT ID.","nullable":true},"businessRegistrationNumber":{"type":"string","description":"Vendor business registration number.","nullable":true},"identifier":{"type":"string","description":"Vendor identifier (external/system identifier).","nullable":true},"name":{"type":"string","description":"Vendor name."},"description":{"type":"string","description":"Vendor description or memo.","nullable":true},"avatarUrl":{"type":"string","description":"Vendor avatar/logo URL.","nullable":true},"email":{"type":"string","description":"Vendor email address.","nullable":true},"phoneNumber":{"$ref":"#/components/schemas/PhoneNumber"},"website":{"type":"string","description":"Vendor website.","nullable":true},"country":{"type":"string","description":"Vendor country.\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["AC","AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BU","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CR","CS","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","FX","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NT","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SF","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SU","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","UK","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XI","XU","XK","YE","YT","YU","ZA","ZM","ZR","ZW"]},"city":{"type":"string","description":"Vendor city.","nullable":true},"address":{"type":"string","description":"Vendor street address.","nullable":true},"zipcode":{"type":"string","description":"Vendor ZIP/postal code.","nullable":true},"bankName":{"type":"string","description":"Vendor bank name.","nullable":true},"bankCountry":{"type":"string","description":"Vendor bank country.\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["AC","AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BU","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CR","CS","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","FX","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NT","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SF","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SU","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","UK","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XI","XU","XK","YE","YT","YU","ZA","ZM","ZR","ZW"]},"bankCity":{"type":"string","description":"Vendor bank city.","nullable":true},"bankAddress":{"type":"string","description":"Vendor bank address.","nullable":true},"bankZipcode":{"type":"string","description":"Vendor bank ZIP/postal code.","nullable":true},"bankAccountNumber":{"type":"string","description":"Vendor bank account number (IBAN or local format).","nullable":true},"bankAccountBic":{"type":"string","description":"Vendor bank BIC/SWIFT code.","nullable":true},"domesticBankAccountNumber":{"type":"string","description":"Vendor domestic bank account number (country-specific format).","nullable":true},"domesticBankAccountCode":{"type":"string","description":"Vendor domestic bank account code (e.g. routing/sort code).","nullable":true},"swedishBankgiroNumber":{"type":"string","description":"Vendor Swedish Bankgiro number, if applicable.","nullable":true},"swedishPlusgiroNumber":{"type":"string","description":"Vendor Swedish Plusgiro number, if applicable.","nullable":true},"bankRecipientName":{"type":"string","description":"Name of the bank account holder. When set, this overrides the vendor name on the payment recipient for providers that consult it (currently Airwallex).","nullable":true},"isWithholdingSubject":{"type":"boolean","description":"Whether the vendor's invoices are expected to carry a withholding tax. The withholding tax code itself is the vendor's default tax code on the company entity."},"vendorCreatedAt":{"type":"string","description":"Timestamp when the vendor was created.","format":"date-time"},"approvers":{"type":"array","description":"List of vendor approvers.","items":{"$ref":"#/components/schemas/ExternalVendorApproverV1Model"}},"notes":{"type":"array","description":"List of vendor notes.","items":{"$ref":"#/components/schemas/ExternalVendorNoteV1Model"}},"currency":{"type":"string","example":"USD"},"contractValue":{"type":"integer","description":"Vendor contract value in cents.","format":"int64","nullable":true},"createdBy":{"type":"string","description":"ID of the user who created the vendor.","format":"uuid","nullable":true},"status":{"type":"string","description":"Vendor onboarding/status.\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":false,"deprecated":false,"enum":["ONBOARDING","IN_REVIEW","ACTIVE","FAILED"]},"failureContext":{"$ref":"#/components/schemas/ExternalUiClientExceptionV1Model"},"version":{"type":"integer","description":"Vendor record version.","format":"int32"},"updatedAt":{"type":"string","description":"Timestamp when the vendor was last updated.","format":"date-time"},"customProperties":{"type":"array","description":"Custom properties set on the vendor.","nullable":true,"items":{"$ref":"#/components/schemas/ExternalCustomPropertyV1Model"}},"representedCompanyEntityId":{"type":"string","description":"ID of the company entity this business partner represents. Set when Light creates the partner for intercompany invoicing, or when a user links an existing one; null for ordinary vendors.","format":"uuid","nullable":true},"lastMtdSpendInGroupCurrency":{"type":"integer","description":"Last month-to-date spend in group currency.","format":"int64","nullable":true},"groupCurrency":{"type":"string","example":"USD"}}},"ExternalCreateDefaultVendorCompanyEntityRequestV1Model":{"type":"object","properties":{"companyEntityId":{"type":"string","description":"ID of the company entity.","format":"uuid"},"accountId":{"type":"string","description":"ID of the ledger account to use for this vendor.","format":"uuid","nullable":true},"taxCodeId":{"type":"string","description":"ID of the tax code to use for this vendor.","format":"uuid","nullable":true},"costCenterId":{"type":"string","description":"ID of the cost center to use for this vendor.","format":"uuid","nullable":true},"senderBankAccountId":{"type":"string","description":"ID of the sender bank account to use for payments to this vendor.","format":"uuid","nullable":true}},"description":"Default company entity configuration for this vendor, if any.","nullable":true},"ExternalCreateVendorRequestV1Model":{"type":"object","properties":{"defaultCompanyEntity":{"$ref":"#/components/schemas/ExternalCreateDefaultVendorCompanyEntityRequestV1Model"},"companyEntityIds":{"uniqueItems":true,"type":"array","description":"IDs of the company entities this vendor is associated with.","items":{"type":"string","description":"IDs of the company entities this vendor is associated with.","format":"uuid"}},"vatId":{"type":"string","description":"Vendor VAT ID.","nullable":true},"businessRegistrationNumber":{"type":"string","description":"Vendor business registration number.","nullable":true},"identifier":{"type":"string","description":"Vendor identifier (external/system identifier).","nullable":true},"name":{"type":"string","description":"Vendor name."},"description":{"type":"string","description":"Vendor description or memo.","nullable":true},"avatarUrl":{"type":"string","description":"Vendor avatar/logo URL.","nullable":true},"email":{"type":"string","description":"Vendor email address.","nullable":true},"phoneNumber":{"$ref":"#/components/schemas/PhoneNumber"},"website":{"type":"string","description":"Vendor website.","nullable":true},"country":{"type":"string","description":"Vendor country.\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["AC","AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BU","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CR","CS","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","FX","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NT","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SF","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SU","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","UK","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XI","XU","XK","YE","YT","YU","ZA","ZM","ZR","ZW"]},"city":{"type":"string","description":"Vendor city.","nullable":true},"address":{"type":"string","description":"Vendor street address.","nullable":true},"zipcode":{"type":"string","description":"Vendor ZIP/postal code.","nullable":true},"bankName":{"type":"string","description":"Vendor bank name.","nullable":true},"bankCountry":{"type":"string","description":"Vendor bank country.\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["AC","AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BU","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CR","CS","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","FX","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NT","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SF","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SU","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","UK","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XI","XU","XK","YE","YT","YU","ZA","ZM","ZR","ZW"]},"bankCity":{"type":"string","description":"Vendor bank city.","nullable":true},"bankAddress":{"type":"string","description":"Vendor bank address.","nullable":true},"bankZipcode":{"type":"string","description":"Vendor bank ZIP/postal code.","nullable":true},"bankAccountNumber":{"type":"string","description":"Vendor bank account number (IBAN or local format).","nullable":true},"bankAccountBic":{"type":"string","description":"Vendor bank BIC/SWIFT code.","nullable":true},"domesticBankAccountNumber":{"type":"string","description":"Vendor domestic bank account number (country-specific format).","nullable":true},"domesticBankAccountCode":{"type":"string","description":"Vendor domestic bank account code (e.g. routing/sort code).","nullable":true},"swedishBankgiroNumber":{"type":"string","description":"Vendor Swedish Bankgiro number, if applicable.","nullable":true},"swedishPlusgiroNumber":{"type":"string","description":"Vendor Swedish Plusgiro number, if applicable.","nullable":true},"bankRecipientName":{"type":"string","description":"Name of the bank account holder. When set, this overrides the vendor name on the payment recipient for providers that consult it (currently Airwallex).","nullable":true},"isWithholdingSubject":{"type":"boolean","description":"Whether the vendor's invoices are expected to carry a withholding tax. The withholding tax code itself is the vendor's default tax code on the company entity. Defaults to false.","default":false},"currency":{"type":"string","nullable":true,"example":"USD"},"customProperties":{"type":"array","description":"List of custom properties to set on the vendor.","nullable":true,"items":{"$ref":"#/components/schemas/SetCustomPropertyRequestV1Model"}},"triggerOnboarding":{"type":"boolean","description":"When true, the vendor is created in onboarding status and sent the self-service onboarding magic-link email so it can complete its own details. Requires 'email' to be set. When false (the default) the vendor is created directly without an onboarding email."}}},"ExternalPaginatedResponseV1ModelExternalVendorV1Model":{"type":"object","properties":{"records":{"type":"array","description":"List of records for the current page","items":{"$ref":"#/components/schemas/ExternalVendorV1Model"}},"hasMore":{"type":"boolean","description":"Boolean flag indicating if there are more records available"},"total":{"type":"integer","description":"Total number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination.","format":"int64","nullable":true,"deprecated":true},"nextCursor":{"type":"string","description":"Cursor for fetching the next page (only for cursor pagination)","nullable":true},"prevCursor":{"type":"string","description":"Cursor for fetching the previous page (only for cursor pagination)","nullable":true}}},"ExternalPatchVendorRequestV1Model":{"type":"object","properties":{"name":{"type":"string","description":"Vendor name.","nullable":true},"companyEntityIds":{"uniqueItems":true,"type":"array","description":"IDs of the company entities this vendor is associated with.","nullable":true,"items":{"type":"string","description":"IDs of the company entities this vendor is associated with.","format":"uuid"}},"customProperties":{"type":"array","description":"List of custom properties to set on the vendor. Replaces the existing set.","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}},"defaultCompanyEntity":{"$ref":"#/components/schemas/ExternalUpdateDefaultVendorCompanyEntityRequestV1Model"},"vatId":{"type":"string","description":"Vendor VAT ID.","nullable":true},"businessRegistrationNumber":{"type":"string","description":"Vendor business registration number.","nullable":true},"identifier":{"type":"string","description":"Vendor identifier (external/system identifier).","nullable":true},"description":{"type":"string","description":"Vendor description or memo.","nullable":true},"avatarUrl":{"type":"string","description":"Vendor avatar/logo URL.","nullable":true},"email":{"type":"string","description":"Vendor email address.","nullable":true},"phoneNumber":{"$ref":"#/components/schemas/PhoneNumber"},"website":{"type":"string","description":"Vendor website.","nullable":true},"country":{"type":"string","description":"Vendor country. Note: currently, updating country does not sync with the vendor in the ERP.\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["AC","AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BU","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CR","CS","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","FX","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NT","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SF","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SU","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","UK","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XI","XU","XK","YE","YT","YU","ZA","ZM","ZR","ZW"]},"city":{"type":"string","description":"Vendor city.","nullable":true},"address":{"type":"string","description":"Vendor street address.","nullable":true},"zipcode":{"type":"string","description":"Vendor ZIP/postal code.","nullable":true},"bankName":{"type":"string","description":"Vendor bank name.","nullable":true},"bankCountry":{"type":"string","description":"Vendor bank country.\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["AC","AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BU","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CR","CS","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","FX","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NT","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SF","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SU","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","UK","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XI","XU","XK","YE","YT","YU","ZA","ZM","ZR","ZW"]},"bankCity":{"type":"string","description":"Vendor bank city.","nullable":true},"bankAddress":{"type":"string","description":"Vendor bank address.","nullable":true},"bankZipcode":{"type":"string","description":"Vendor bank ZIP/postal code.","nullable":true},"bankAccountNumber":{"type":"string","description":"Vendor bank account number (IBAN or local format).","nullable":true},"bankAccountBic":{"type":"string","description":"Vendor bank BIC/SWIFT code.","nullable":true},"domesticBankAccountNumber":{"type":"string","description":"Vendor domestic bank account number (country-specific format).","nullable":true},"domesticBankAccountCode":{"type":"string","description":"Vendor domestic bank account code (e.g. routing/sort code).","nullable":true},"swedishBankgiroNumber":{"type":"string","description":"Vendor Swedish Bankgiro number, if applicable.","nullable":true},"swedishPlusgiroNumber":{"type":"string","description":"Vendor Swedish Plusgiro number, if applicable.","nullable":true},"bankRecipientName":{"type":"string","description":"Name of the bank account holder. When set, this overrides the vendor name on the payment recipient for providers that consult it (currently Airwallex).","nullable":true}}},"ExternalUpdateDefaultVendorCompanyEntityRequestV1Model":{"type":"object","properties":{"companyEntityId":{"type":"string","description":"ID of the company entity.","format":"uuid"},"accountId":{"type":"string","description":"ID of the ledger account to use for this vendor.","format":"uuid","nullable":true},"taxCodeId":{"type":"string","description":"ID of the tax code to use for this vendor.","format":"uuid","nullable":true},"costCenterId":{"type":"string","description":"ID of the cost center to use for this vendor.","format":"uuid","nullable":true},"senderBankAccountId":{"type":"string","description":"ID of the sender bank account to use for payments to this vendor.","format":"uuid","nullable":true}},"description":"Default company entity configuration for this vendor, if any.","nullable":true},"ExternalUpdateVendorRequestV1Model":{"type":"object","properties":{"name":{"type":"string","description":"Vendor name."},"defaultCompanyEntity":{"$ref":"#/components/schemas/ExternalUpdateDefaultVendorCompanyEntityRequestV1Model"},"companyEntityIds":{"uniqueItems":true,"type":"array","description":"IDs of the company entities this vendor is associated with.","items":{"type":"string","description":"IDs of the company entities this vendor is associated with.","format":"uuid"}},"vatId":{"type":"string","description":"Vendor VAT ID.","nullable":true},"businessRegistrationNumber":{"type":"string","description":"Vendor business registration number.","nullable":true},"identifier":{"type":"string","description":"Vendor identifier (external/system identifier).","nullable":true},"description":{"type":"string","description":"Vendor description or memo.","nullable":true},"avatarUrl":{"type":"string","description":"Vendor avatar/logo URL.","nullable":true},"email":{"type":"string","description":"Vendor email address.","nullable":true},"phoneNumber":{"$ref":"#/components/schemas/PhoneNumber"},"website":{"type":"string","description":"Vendor website.","nullable":true},"country":{"type":"string","description":"Vendor country. Note: currently, updating country does not sync with the vendor in the ERP.\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["AC","AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BU","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CR","CS","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","FX","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NT","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SF","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SU","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","UK","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XI","XU","XK","YE","YT","YU","ZA","ZM","ZR","ZW"]},"city":{"type":"string","description":"Vendor city.","nullable":true},"address":{"type":"string","description":"Vendor street address.","nullable":true},"zipcode":{"type":"string","description":"Vendor ZIP/postal code.","nullable":true},"bankName":{"type":"string","description":"Vendor bank name.","nullable":true},"bankCountry":{"type":"string","description":"Vendor bank country.\n\n⚠️ This enum is not exhaustive; new values may be added in the future.","nullable":true,"deprecated":false,"enum":["AC","AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BU","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CR","CS","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","FX","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NT","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SF","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SU","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","UK","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XI","XU","XK","YE","YT","YU","ZA","ZM","ZR","ZW"]},"bankCity":{"type":"string","description":"Vendor bank city.","nullable":true},"bankAddress":{"type":"string","description":"Vendor bank address.","nullable":true},"bankZipcode":{"type":"string","description":"Vendor bank ZIP/postal code.","nullable":true},"bankAccountNumber":{"type":"string","description":"Vendor bank account number (IBAN or local format).","nullable":true},"bankAccountBic":{"type":"string","description":"Vendor bank BIC/SWIFT code.","nullable":true},"domesticBankAccountNumber":{"type":"string","description":"Vendor domestic bank account number (country-specific format).","nullable":true},"domesticBankAccountCode":{"type":"string","description":"Vendor domestic bank account code (e.g. routing/sort code).","nullable":true},"swedishBankgiroNumber":{"type":"string","description":"Vendor Swedish Bankgiro number, if applicable.","nullable":true},"swedishPlusgiroNumber":{"type":"string","description":"Vendor Swedish Plusgiro number, if applicable.","nullable":true},"bankRecipientName":{"type":"string","description":"Name of the bank account holder. When set, this overrides the vendor name on the payment recipient for providers that consult it (currently Airwallex).","nullable":true},"isWithholdingSubject":{"type":"boolean","description":"Whether the vendor's invoices are expected to carry a withholding tax. The withholding tax code itself is the vendor's default tax code on the company entity. Omitting it or sending null keeps the vendor's current value.","nullable":true},"customProperties":{"type":"array","description":"List of custom properties to set on the vendor. Replaces the existing set.","nullable":true,"items":{"$ref":"#/components/schemas/ExternalSetCustomPropertyRequestV1Model"}}}}},"securitySchemes":{"apiKeyAuth":{"type":"apiKey","description":"Basic authentication header of the form **Basic** **<api_key>**, where **<api_key>** is your api key.","name":"Authorization","in":"header"},"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"security":[{"apiKeyAuth":[]},{"bearerAuth":[]}]}
