From bf631b755a7c9255f175aca9b161b79812d3d51d Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Wed, 22 Apr 2026 11:08:49 +0000 Subject: [PATCH] ## Python SDK Changes: * `codat_sync_expenses.companies.create()`: `response.data_connections[].integration_key` **Changed** * `codat_sync_expenses.companies.get()`: `response.data_connections[].integration_key` **Changed** * `codat_sync_expenses.companies.list()`: `response.results[].data_connections[].integration_key` **Changed** * `codat_sync_expenses.companies.replace()`: `response.data_connections[].integration_key` **Changed** * `codat_sync_expenses.companies.update()`: `response.data_connections[].integration_key` **Changed** * `codat_sync_expenses.connections.create()`: `response.integration_key` **Changed** * `codat_sync_expenses.connections.create_partner_expense_connection()`: `response.integration_key` **Changed** * `codat_sync_expenses.connections.get()`: `response.integration_key` **Changed** * `codat_sync_expenses.connections.list()`: `response.results[].integration_key` **Changed** * `codat_sync_expenses.connections.unlink()`: `response.integration_key` **Changed** --- .speakeasy/logs/changes/changes.html | 19 +- .speakeasy/logs/changes/changes.md | 19 +- .speakeasy/logs/changes/new.openapi.yaml | 14089 ++++++++++++---- .speakeasy/logs/changes/old.openapi.yaml | 13855 +++++++++++---- .speakeasy/workflow.lock | 12 +- sync-for-expenses/.speakeasy/gen.lock | 143 +- sync-for-expenses/.speakeasy/gen.yaml | 2 +- sync-for-expenses/RELEASES.md | 12 +- .../docs/models/shared/connection.md | 2 +- sync-for-expenses/pyproject.toml | 2 +- .../src/codat_sync_for_expenses/_version.py | 6 +- .../src/codat_sync_for_expenses/accounts.py | 50 +- .../codat_sync_for_expenses/adjustments.py | 26 +- .../codat_sync_for_expenses/attachments.py | 26 +- .../codat_sync_for_expenses/bank_accounts.py | 50 +- .../src/codat_sync_for_expenses/basesdk.py | 86 +- .../src/codat_sync_for_expenses/companies.py | 146 +- .../codat_sync_for_expenses/company_info.py | 26 +- .../codat_sync_for_expenses/configuration.py | 50 +- .../codat_sync_for_expenses/connections.py | 148 +- .../src/codat_sync_for_expenses/customers.py | 106 +- .../src/codat_sync_for_expenses/expenses.py | 54 +- .../codat_sync_for_expenses/manage_data.py | 126 +- .../mapping_options.py | 24 +- .../models/shared/connection.py | 16 +- .../push_operations.py | 50 +- .../codat_sync_for_expenses/reimbursements.py | 52 +- .../src/codat_sync_for_expenses/suppliers.py | 106 +- .../src/codat_sync_for_expenses/sync.py | 96 +- .../transaction_status.py | 50 +- .../src/codat_sync_for_expenses/transfers.py | 26 +- .../utils/eventstreaming.py | 41 +- .../codat_sync_for_expenses/utils/metadata.py | 1 + .../codat_sync_for_expenses/utils/security.py | 32 +- .../utils/serializers.py | 12 +- 35 files changed, 22280 insertions(+), 7281 deletions(-) diff --git a/.speakeasy/logs/changes/changes.html b/.speakeasy/logs/changes/changes.html index 8231b2857..46d16b0bd 100644 --- a/.speakeasy/logs/changes/changes.html +++ b/.speakeasy/logs/changes/changes.html @@ -98,15 +98,16 @@

Python SDK Changes:

\ No newline at end of file diff --git a/.speakeasy/logs/changes/changes.md b/.speakeasy/logs/changes/changes.md index 279b36965..038c1da4e 100644 --- a/.speakeasy/logs/changes/changes.md +++ b/.speakeasy/logs/changes/changes.md @@ -1,10 +1,11 @@ ## Python SDK Changes: -* `codat_bank_feeds.companies.create()`: `response.data_connections[].integration_key` **Changed** -* `codat_bank_feeds.companies.get()`: `response.data_connections[].integration_key` **Changed** -* `codat_bank_feeds.companies.list()`: `response.results[].data_connections[].integration_key` **Changed** -* `codat_bank_feeds.companies.replace()`: `response.data_connections[].integration_key` **Changed** -* `codat_bank_feeds.companies.update()`: `response.data_connections[].integration_key` **Changed** -* `codat_bank_feeds.connections.create()`: `response.integration_key` **Changed** -* `codat_bank_feeds.connections.get()`: `response.integration_key` **Changed** -* `codat_bank_feeds.connections.list()`: `response.results[].integration_key` **Changed** -* `codat_bank_feeds.connections.unlink()`: `response.integration_key` **Changed** +* `codat_sync_expenses.companies.create()`: `response.data_connections[].integration_key` **Changed** +* `codat_sync_expenses.companies.get()`: `response.data_connections[].integration_key` **Changed** +* `codat_sync_expenses.companies.list()`: `response.results[].data_connections[].integration_key` **Changed** +* `codat_sync_expenses.companies.replace()`: `response.data_connections[].integration_key` **Changed** +* `codat_sync_expenses.companies.update()`: `response.data_connections[].integration_key` **Changed** +* `codat_sync_expenses.connections.create()`: `response.integration_key` **Changed** +* `codat_sync_expenses.connections.create_partner_expense_connection()`: `response.integration_key` **Changed** +* `codat_sync_expenses.connections.get()`: `response.integration_key` **Changed** +* `codat_sync_expenses.connections.list()`: `response.results[].integration_key` **Changed** +* `codat_sync_expenses.connections.unlink()`: `response.integration_key` **Changed** diff --git a/.speakeasy/logs/changes/new.openapi.yaml b/.speakeasy/logs/changes/new.openapi.yaml index e9a1f1efb..c006bc55b 100644 --- a/.speakeasy/logs/changes/new.openapi.yaml +++ b/.speakeasy/logs/changes/new.openapi.yaml @@ -1,19 +1,21 @@ openapi: 3.1.0 -servers: - - description: Production - url: 'https://api.codat.io' info: - title: Bank Feeds - version: 3.0.0 + title: Expenses + version: prealpha contact: - email: support@codat.io name: Codat + url: 'https://www.codat.io/' + email: expenses@codat.io description: |- - Bank Feeds solution enables your SMB users to set up bank feeds from accounts in your application to supported accounting software. + The API for Codat's Expenses solution. + + Expenses is an API and a set of supporting tools. It has been built to + enable corporate card and expense management platforms to provide high-quality + integrations with multiple accounting software through a standardized API. - A bank feed is a connection between a source bank account in your application and a target bank account in a supported accounting software. + [Explore solution](https://docs.codat.io/sync-for-expenses/overview) | [See our OpenAPI spec](https://github.com/codatio/oas) - [Explore solution](https://docs.codat.io/bank-feeds-api/overview) | [See OpenAPI spec](https://github.com/codatio/oas) + Not seeing the endpoints you're expecting? We've [reorganized our solutions](https://docs.codat.io/updates/230901-new-products), and you may be using a [different version of Expenses](https://docs.codat.io/sync-for-expenses-v1-api#/). --- @@ -23,10 +25,18 @@ info: | :- |:- | | Companies | Create and manage your SMB users' companies. | | Connections | Create new and manage existing data connections for a company. | - | Source accounts | Provide and manage lists of source bank accounts. | - | Account mapping | Extra functionality for building an account management UI. | - | Company information | Get detailed information about a company from the underlying platform. | - | Transactions | Create new bank account transactions for a company's connections, and see previous operations. | + | Configuration | View and manage mapping configuration and defaults for expense transactions. | + | Sync | Monitor the status of data syncs. | + | Expenses | Create and update transactions that represent your customers' spend. | + | Transfers | Create and update transactions that represent the movement of your customers' money. | + | Reimbursements | Create and update transactions that represent your customers' repayable spend. | + | Attachments | Attach receipts to a transaction for a complete audit trail. | + | Transaction status | Monitor the status of individual transactions in data syncs. | + | Manage data | Control and monitor the retrieval of data from an integration. | + | Push operations | View historic push operations. | + | Accounts | Create accounts and view account schemas. | + | Customers | Get, create, and update customers. | + | Suppliers | Get, create, and update suppliers. | termsOfService: 'https://www.codat.io/legals/' security: @@ -68,7 +78,7 @@ x-speakeasy-name-override: methodNameOverride: download-attachment - operationId: ^upload-.*?-attachment methodNameOverride: upload-attachment -x-codat-docs-path: bank-feeds-api +x-codat-docs-path: sync-for-expenses-api x-codat-keep-docs-paths-local: true x-codat-speakeasy-pagination: type: offsetLimit @@ -83,103 +93,42 @@ tags: description: Create and manage your SMB users' companies. - name: Connections description: Create new and manage existing data connections for a company. + - name: Company info + description: View the company information of your customers' linked accounting software. + - name: Manage data + description: Control and monitor the retrieval of data from an integration. + - name: Mapping options + description: 'Get accounts, trackingCategories and taxRates that can be used in your create and update requests.' + - name: Accounts + description: Create accounts and view create account options. - name: Bank accounts - description: Access bank accounts in an SMBs accounting software. - - name: Source accounts - description: Provide and manage lists of source bank accounts. - - name: Account mapping - description: Extra functionality for building an account management UI. - - name: Transactions - description: 'Create new bank account transactions for a company''s connections, and see previous operations.' - - name: Company information - description: Get detailed information about a company from the underlying accounting software. - - name: Managed bank feeds - description: Manage bank feed syncs for source accounts. + description: Create bank accounts and view create bank account options. + - name: Customers + description: 'Get, create, and update customers.' + - name: Suppliers + description: 'Get, create, and update suppliers.' + - name: Push operations + description: View historic push operations. + - name: Configuration + description: View and manage mapping configuration and defaults for expense transactions. + - name: Expenses + description: Create and update transactions that represent your customers' spend. + - name: Reimbursements + description: Create and update transactions that represent your customers' repayable spend. + - name: Transfers + description: Create and update transactions that represent the movement of your customers' money. + - name: Adjustments + description: Create transactions that represent your adjustments to your customers' spend. + - name: Attachments + description: Attach receipts to a transaction for a complete audit trail. + - name: Sync + description: Monitor the status of data syncs. + - name: Transaction status + description: Monitor the status of individual transactions in data syncs. +servers: + - url: 'https://api.codat.io' paths: /companies: - post: - summary: Create company - tags: - - Companies - operationId: create-company - responses: - '200': - description: OK - content: - application/json: - x-speakeasy-usage-example: true - schema: - $ref: '#/components/schemas/Company' - examples: - With no description: - value: - id: ab12c58d-a678-4ebf-a159-ae99e1807bd0 - name: Technicalium - description: '' - platform: '' - redirect: 'https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0' - dataConnections: [] - created: '2022-11-10T10:45:18.1950523Z' - createdByUserName: Dan Tzabar - products: - - spend-insights - referenceSubsidiaryCompanies: [] - With a description: - value: - id: ab12c58d-a678-4ebf-a159-ae99e1807bd0 - name: Technicalium - description: 'Technology services, including web and app design and development' - platform: '' - redirect: 'https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0' - dataConnections: [] - created: '2022-11-10T10:45:18.1950523Z' - createdByUserName: Dan Tzabar - products: - - spend-insights - referenceSubsidiaryCompanies: [] - With a tag: - value: - id: ab12c58d-a678-4ebf-a159-ae99e1807bd0 - name: Technicalium - description: '' - platform: '' - redirect: 'https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0' - dataConnections: [] - created: '2022-11-10T10:45:18.1950523Z' - createdByUserName: Dan Tzabar - products: - - spend-insights - tags: - region: us - referenceSubsidiaryCompanies: [] - '400': - $ref: '#/components/responses/BadRequest' - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - description: "\uFEFFUse the *Create company* endpoint to create a new [company](https://docs.codat.io/bank-feeds-api#/schemas/Company) that represents your customer in Codat. \n\nA [company](https://docs.codat.io/bank-feeds-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.\n\nIf forbidden characters (see `name` pattern) are present in the request, a company will be created with the forbidden characters removed. For example, `Company (Codat[1])` with be created as `Company Codat1`." - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CompanyRequestBody' - examples: - With no description: - value: - name: Technicalium - With a description: - value: - name: Technicalium - description: 'Technology services, including web and app design and development' get: summary: List companies tags: @@ -347,7 +296,7 @@ paths: '503': $ref: '#/components/responses/Service-Unavailable' operationId: list-companies - description: "\uFEFFThe *List companies* endpoint returns a list of [companies](https://docs.codat.io/bank-feeds-api#/schemas/Company) associated to your instances.\n\nA [company](https://docs.codat.io/bank-feeds-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.\n\n## Filter by tags\n\nThe *List companies* endpoint supports the filtering of companies using [tags](https://docs.codat.io/using-the-api/managing-companies#add-metadata-to-a-company). It supports the following operators with [Codat’s query language](https://docs.codat.io/using-the-api/querying):\n\n- equals (`=`)\n- not equals (`!=`)\n- contains (`~`)\n\nFor example, you can use the querying to filter companies tagged with a specific foreign key, region, or owning team: \n- Foreign key: `uid = {yourCustomerId}`\n- Region: `region != uk`\n- Owning team and region: `region = uk && owningTeam = invoice-finance`" + description: "\uFEFFThe *List companies* endpoint returns a list of [companies](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) associated to your instances.\n\nA [company](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/sync-for-expenses-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.\n\n## Filter by tags\n\nThe *List companies* endpoint supports the filtering of companies using [tags](https://docs.codat.io/using-the-api/managing-companies#add-metadata-to-a-company). It supports the following operators with [Codat’s query language](https://docs.codat.io/using-the-api/querying):\n\n- equals (`=`)\n- not equals (`!=`)\n- contains (`~`)\n\nFor example, you can use the querying to filter companies tagged with a specific foreign key, region, or owning team: \n- Foreign key: `uid = {yourCustomerId}`\n- Region: `region != uk`\n- Owning team and region: `region = uk && owningTeam = invoice-finance`" parameters: - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/pageSize' @@ -359,136 +308,93 @@ paths: type: string example: region=uk && team=invoice-finance description: 'Filter companies by tags using the "equals" (=), "not equals" (!=), and "contains" (~) operators with [Codat’s query language](https://docs.codat.io/using-the-api/querying).' - '/companies/{companyId}': - get: - summary: Get company - operationId: get-company - description: "\uFEFFThe *Get company* endpoint returns a single company for a given `companyId`.\n\nA [company](https://docs.codat.io/bank-feeds-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.\n" - parameters: - - $ref: '#/components/parameters/companyId' + post: + summary: Create company tags: - Companies + operationId: create-company responses: '200': description: OK content: application/json: + x-speakeasy-usage-example: true schema: $ref: '#/components/schemas/Company' examples: - Simple company: + With no description: value: id: ab12c58d-a678-4ebf-a159-ae99e1807bd0 - name: Toft stores holdings + name: Technicalium description: '' platform: '' redirect: 'https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0' dataConnections: [] - created: '2022-11-10T10:45:18Z' + created: '2022-11-10T10:45:18.1950523Z' createdByUserName: Dan Tzabar products: - spend-insights - - lending - - expenses-v1 - - commerce referenceSubsidiaryCompanies: [] - Parent multi-entity company: + With a description: value: id: ab12c58d-a678-4ebf-a159-ae99e1807bd0 - name: Toft stores - description: '' + name: Technicalium + description: 'Technology services, including web and app design and development' platform: '' redirect: 'https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0' dataConnections: [] - created: '2022-11-10T10:45:18Z' + created: '2022-11-10T10:45:18.1950523Z' createdByUserName: Dan Tzabar products: - spend-insights - - lending - - expenses-v1 - - commerce - referenceSubsidiaryCompanies: - - id: c8d3af58-7011-47ce-b3f2-89faf300ef6d - name: Toft stores UK - links: - portal: 'https://app.codat.io/companies/c8d3af58-7011-47ce-b3f2-89faf300ef6d/summary' - - id: db94eddc-9212-4568-9b5c-3eab0e325913 - name: Toft stores US - links: - portal: 'https://app.codat.io/companies/db94eddc-9212-4568-9b5c-3eab0e325913/summary' - Subsidiary multi-entity company: + referenceSubsidiaryCompanies: [] + With a tag: value: - id: c8d3af58-7011-47ce-b3f2-89faf300ef6d - name: Toft stores UK + id: ab12c58d-a678-4ebf-a159-ae99e1807bd0 + name: Technicalium description: '' platform: '' - redirect: 'https://link.codat.io/company/c8d3af58-7011-47ce-b3f2-89faf300ef6d' - dataConnections: - - id: d5ab61b7-1ad0-46fd-9f9f-b6761047941e - integrationId: cc750323-5a47-4f28-8d8e-30fbbf2ce137 - integrationKey: akxx - sourceId: 9815b998-024d-4415-a40b-89903b2cad6f - platformName: Oracle NetSuite - linkUrl: 'https://link-api.codat.io/companies/c8d3af58-7011-47ce-b3f2-89faf300ef6d/connections/d5ab61b7-1ad0-46fd-9f9f-b6761047941e/start' - status: Linked - lastSync: '2022-01-01T12:30:00.000Z' - created: '2022-01-01T11:30:00Z' - sourceType: Accounting - created: '2022-11-10T10:45:18Z' + redirect: 'https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0' + dataConnections: [] + created: '2022-11-10T10:45:18.1950523Z' createdByUserName: Dan Tzabar products: - spend-insights - - lending - - expenses-v1 - - commerce - referenceParentCompany: - id: ab12c58d-a678-4ebf-a159-ae99e1807bd0 - name: Toft stores - links: - portal: 'https://app.codat.io/companies/ab12c58d-a678-4ebf-a159-ae99e1807bd0/summary' + tags: + region: us referenceSubsidiaryCompanies: [] + '400': + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': $ref: '#/components/responses/Payment-Required' '403': $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - delete: - summary: Delete a company - operationId: delete-company - parameters: - - $ref: '#/components/parameters/companyId' - description: "\uFEFFThe *Delete company* endpoint permanently deletes a [company](https://docs.codat.io/bank-feeds-api#/schemas/Company), its [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) and any cached data. This operation is irreversible.\n\nA [company](https://docs.codat.io/bank-feeds-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.\n" - tags: - - Companies - responses: - '204': - description: No Content - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' '429': $ref: '#/components/responses/Too-Many-Requests' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' + description: "\uFEFFUse the *Create company* endpoint to create a new [company](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) that represents your customer in Codat. \n\nA [company](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/sync-for-expenses-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.\n\nIf forbidden characters (see `name` pattern) are present in the request, a company will be created with the forbidden characters removed. For example, `Company (Codat[1])` with be created as `Company Codat1`." + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyRequestBody' + examples: + With no description: + value: + name: Technicalium + With a description: + value: + name: Technicalium + description: 'Technology services, including web and app design and development' + '/companies/{companyId}': put: summary: Replace company - description: "\uFEFFUse the *Replace company* endpoint to replace the existing name, description, and tags of the company. Calling the endpoint will replace existing values even if new values haven't been defined in the payload.\n\nA [company](https://docs.codat.io/bank-feeds-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data." + description: "\uFEFFUse the *Replace company* endpoint to replace the existing name, description, and tags of the company. Calling the endpoint will replace existing values even if new values haven't been defined in the payload.\n\nA [company](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/sync-for-expenses-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data." operationId: replace-company x-speakeasy-name-override: replace parameters: @@ -531,7 +437,7 @@ paths: description: Additional documents required patch: summary: Update company - description: "\uFEFFUse the *Update company* endpoint to update the name, description, or tags of the company.\n\nThe *Update company* endpoint doesn't have any required fields. If any of the fields provided are `null` or not provided, they won't be included in the update. \n\nA [company](https://docs.codat.io/bank-feeds-api#/schemas/Company) represents a business sharing access to their data." + description: "\uFEFFUse the *Update company* endpoint to update the name, description, or tags of the company.\n\nThe *Update company* endpoint doesn't have any required fields. If any of the fields provided are `null` or not provided, they won't be included in the update. \n\nA [company](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) represents a business sharing access to their data." operationId: update-company parameters: - $ref: '#/components/parameters/companyId' @@ -571,32 +477,17 @@ paths: Update name: value: name: New Name - '/companies/{companyId}/accessToken': - get: - summary: Get company access token - operationId: get-company-access-token - x-speakeasy-name-override: get-access-token - description: |- - Use the _Get company access token_ endpoint to return an access token for the specified company ID. The token is valid for one day. - - The token is required by Codat's embeddable UIs (such as [Connections SDK](https://docs.codat.io/auth-flow/optimize/connection-management) and [Link SDK](https://docs.codat.io/auth-flow/authorize-embedded-link)) to verify the identity of the user and improve the reliability of data provided by them. + delete: + summary: Delete a company + operationId: delete-company parameters: - $ref: '#/components/parameters/companyId' + description: "\uFEFFThe *Delete company* endpoint permanently deletes a [company](https://docs.codat.io/sync-for-expenses-api#/schemas/Company), its [connections](https://docs.codat.io/sync-for-expenses-api#/schemas/Connection) and any cached data. This operation is irreversible.\n\nA [company](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/sync-for-expenses-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.\n" tags: - Companies responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/CompanyAccessToken' - examples: - Simple company: - value: - expiresIn: 86400 - accessToken: string - tokenType: Bearer + '204': + description: No Content '401': $ref: '#/components/responses/Unauthorized' '402': @@ -611,52 +502,153 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections': get: - summary: List connections - description: "\uFEFFList the connections for a company." - operationId: list-connections - tags: - - Connections + summary: Get company + operationId: get-company + description: "\uFEFFThe *Get company* endpoint returns a single company for a given `companyId`.\n\nA [company](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/sync-for-expenses-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.\n" parameters: - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/page' - - $ref: '#/components/parameters/pageSize' - - $ref: '#/components/parameters/query' - - $ref: '#/components/parameters/orderBy' + tags: + - Companies responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/Connections' + $ref: '#/components/schemas/Company' examples: - Connections: + Simple company: value: - results: - - id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd - integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c - integrationKey: dfxm - sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee - platformName: Basiq - linkUrl: 'https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' - status: Linked - lastSync: '2022-10-27T10:22:43.6464237Z' - created: '2022-10-27T09:53:29Z' - sourceType: Banking - pageNumber: 0 - pageSize: 0 - totalResults: 0 - _links: - self: - href: string - current: - href: string - next: - href: string - previous: - href: string + id: ab12c58d-a678-4ebf-a159-ae99e1807bd0 + name: Toft stores holdings + description: '' + platform: '' + redirect: 'https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0' + dataConnections: [] + created: '2022-11-10T10:45:18Z' + createdByUserName: Dan Tzabar + products: + - spend-insights + - lending + - expenses-v1 + - commerce + referenceSubsidiaryCompanies: [] + Parent multi-entity company: + value: + id: ab12c58d-a678-4ebf-a159-ae99e1807bd0 + name: Toft stores + description: '' + platform: '' + redirect: 'https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0' + dataConnections: [] + created: '2022-11-10T10:45:18Z' + createdByUserName: Dan Tzabar + products: + - spend-insights + - lending + - expenses-v1 + - commerce + referenceSubsidiaryCompanies: + - id: c8d3af58-7011-47ce-b3f2-89faf300ef6d + name: Toft stores UK + links: + portal: 'https://app.codat.io/companies/c8d3af58-7011-47ce-b3f2-89faf300ef6d/summary' + - id: db94eddc-9212-4568-9b5c-3eab0e325913 + name: Toft stores US + links: + portal: 'https://app.codat.io/companies/db94eddc-9212-4568-9b5c-3eab0e325913/summary' + Subsidiary multi-entity company: + value: + id: c8d3af58-7011-47ce-b3f2-89faf300ef6d + name: Toft stores UK + description: '' + platform: '' + redirect: 'https://link.codat.io/company/c8d3af58-7011-47ce-b3f2-89faf300ef6d' + dataConnections: + - id: d5ab61b7-1ad0-46fd-9f9f-b6761047941e + integrationId: cc750323-5a47-4f28-8d8e-30fbbf2ce137 + integrationKey: akxx + sourceId: 9815b998-024d-4415-a40b-89903b2cad6f + platformName: Oracle NetSuite + linkUrl: 'https://link-api.codat.io/companies/c8d3af58-7011-47ce-b3f2-89faf300ef6d/connections/d5ab61b7-1ad0-46fd-9f9f-b6761047941e/start' + status: Linked + lastSync: '2022-01-01T12:30:00.000Z' + created: '2022-01-01T11:30:00Z' + sourceType: Accounting + created: '2022-11-10T10:45:18Z' + createdByUserName: Dan Tzabar + products: + - spend-insights + - lending + - expenses-v1 + - commerce + referenceParentCompany: + id: ab12c58d-a678-4ebf-a159-ae99e1807bd0 + name: Toft stores + links: + portal: 'https://app.codat.io/companies/ab12c58d-a678-4ebf-a159-ae99e1807bd0/summary' + referenceSubsidiaryCompanies: [] + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + '/companies/{companyId}/connections': + get: + summary: List connections + description: "\uFEFFList the connections for a company." + operationId: list-connections + tags: + - Connections + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + - $ref: '#/components/parameters/query' + - $ref: '#/components/parameters/orderBy' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Connections' + examples: + Connections: + value: + results: + - id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd + integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c + integrationKey: dfxm + sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee + platformName: Basiq + linkUrl: 'https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' + status: Linked + lastSync: '2022-10-27T10:22:43.6464237Z' + created: '2022-10-27T09:53:29Z' + sourceType: Banking + pageNumber: 0 + pageSize: 0 + totalResults: 0 + _links: + self: + href: string + current: + href: string + next: + href: string + previous: + href: string '400': $ref: '#/components/responses/Malformed-Query' '401': @@ -847,441 +839,94 @@ paths: value: status: Unlinked description: '' - '/companies/{companyId}/connections/{connectionId}/data/bankAccounts': - parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' + '/companies/{companyId}/sync/expenses/connections/partnerExpense': + post: + tags: + - Connections + description: Creates a partner expense data connection + summary: Create partner expense connection + operationId: create-partner-expense-connection + x-speakeasy-name-override: create-partner-expense-connection + parameters: + - $ref: '#/components/parameters/companyId' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Connection' + examples: {} + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + '/companies/{companyId}/data/info': get: - x-internal: true tags: - - Bank accounts - summary: List bank accounts - operationId: list-bank-accounts + - Company info + summary: Get company info + description: Gets the latest basic info for a company. + operationId: get-company-info parameters: - - $ref: '#/components/parameters/page' - - $ref: '#/components/parameters/pageSize' - - $ref: '#/components/parameters/query' - - $ref: '#/components/parameters/orderBy' + - $ref: '#/components/parameters/companyId' responses: '200': description: Success content: application/json: schema: - $ref: '#/components/schemas/BankAccounts' + $ref: '#/components/schemas/CompanyInformation' examples: - Dynamics 365 Business Central: - value: - results: - - id: c9a41bc7-6e5b-ed11-8c34-0022481b8b5b - accountName: '55' - accountType: Unknown - nominalCode: '10500' - sortCode: '' - accountNumber: '' - iBan: '' - currency: GBP - balance: -352.03 - modifiedDate: '2023-03-27T14:21:10Z' - sourceModifiedDate: '2023-02-07T00:00:00' - overdraftLimit: 0 - metadata: - isDeleted: false - - id: 47020f80-60e6-ec11-82f8-0022481a77f0 - accountName: '555' - accountType: Unknown - nominalCode: '40300' - sortCode: '' - accountNumber: '' - iBan: '' - currency: PLN - balance: 661.79 - modifiedDate: '2023-03-27T14:21:10Z' - sourceModifiedDate: '2022-06-07T00:00:00' - overdraftLimit: 0 - metadata: - isDeleted: false - pageNumber: 1 - pageSize: 2 - totalResults: 28 - _links: - current: - href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/connections/60acb117-5cf5-4745-b069-491551da4066/data/bankAccounts?page=1&pageSize=2 - self: - href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/connections/60acb117-5cf5-4745-b069-491551da4066/data/bankAccounts - next: - href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/connections/60acb117-5cf5-4745-b069-491551da4066/data/bankAccounts?page=2&pageSize=2 - FreeAgent: - value: - results: - - id: '738783' - accountName: \w3fw - accountType: Debit - sortCode: '236972' - accountNumber: A06268209 - currency: GBP - balance: -10484.65 - availableBalance: -10484.65 - modifiedDate: '2023-04-25T14:19:12Z' - metadata: - isDeleted: false - - id: '738778' - accountName: 2e2bna45hy\ - accountType: Debit - sortCode: '236972' - accountNumber: D01825250 - currency: GBP - balance: -114.4 - availableBalance: -114.4 - modifiedDate: '2023-04-25T14:19:12Z' - metadata: - isDeleted: false - pageNumber: 1 - pageSize: 2 - totalResults: 82 - _links: - current: - href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/connections/4fd7c69f-ecc1-45f5-83f2-42ed3391e386/data/bankAccounts?page=1&pageSize=2 - self: - href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/connections/4fd7c69f-ecc1-45f5-83f2-42ed3391e386/data/bankAccounts - next: - href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/connections/4fd7c69f-ecc1-45f5-83f2-42ed3391e386/data/bankAccounts?page=2&pageSize=2 - KashFlow: - value: - results: - - id: '765768' - accountName: 16th Account - accountType: Unknown - nominalCode: '70700' - currency: GBP - balance: 326 - availableBalance: 326 - modifiedDate: '2022-09-30T10:29:16Z' - - id: '765766' - accountName: 1a1a - accountType: Unknown - nominalCode: '70600' - currency: GBP - balance: 0 - availableBalance: 0 - modifiedDate: '2022-09-30T10:29:16Z' - pageNumber: 1 - pageSize: 2 - totalResults: 56 - _links: - current: - href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/connections/ecab4f64-1a04-4c53-a343-bfd879f41f67/data/bankAccounts?page=1&pageSize=2 - self: - href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/connections/ecab4f64-1a04-4c53-a343-bfd879f41f67/data/bankAccounts - next: - href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/connections/ecab4f64-1a04-4c53-a343-bfd879f41f67/data/bankAccounts?page=2&pageSize=2 - Oracle NetSuite: - value: - results: - - id: '825' - accountName: Codat Europe Bank - accountType: Debit - nominalCode: '111111122222111' - currency: GBP - balance: 558.22 - modifiedDate: '2023-05-02T13:24:36Z' - sourceModifiedDate: '2022-07-15T11:34:02' - metadata: - isDeleted: false - - id: '826' - accountName: Codat Europe Bank USD - accountType: Debit - nominalCode: '1133221133' - currency: USD - modifiedDate: '2023-05-02T13:24:36Z' - sourceModifiedDate: '2021-03-26T10:31:40' - metadata: - isDeleted: false - pageNumber: 1 - pageSize: 2 - totalResults: 4 - _links: - current: - href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/connections/79f8313e-210a-4dc8-b69f-ba7e5004dda7/data/bankAccounts?page=1&pageSize=2 - self: - href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/connections/79f8313e-210a-4dc8-b69f-ba7e5004dda7/data/bankAccounts - next: - href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/connections/79f8313e-210a-4dc8-b69f-ba7e5004dda7/data/bankAccounts?page=2&pageSize=2 - QuickBooks Desktop: - value: - results: - - id: 20000-933270541 - accountName: Checking - accountType: Unknown - nominalCode: '10100' - currency: GBP - balance: 46954.1 - availableBalance: 46954.1 - modifiedDate: '2023-04-26T09:12:37Z' - sourceModifiedDate: '2023-12-16T05:06:45' - metadata: - isDeleted: false - - id: 550001-1071509830 - accountName: Petty Cash - accountType: Unknown - nominalCode: '10400' - currency: GBP - balance: 500 - availableBalance: 500 - modifiedDate: '2023-04-26T09:12:37Z' - sourceModifiedDate: '2023-12-16T05:06:45' - metadata: - isDeleted: false - pageNumber: 1 - pageSize: 2 - totalResults: 3 - _links: - current: - href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/connections/2c26b4da-97d4-4ba9-baad-1e18b49b96ac/data/bankAccounts?page=1&pageSize=2 - self: - href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/connections/2c26b4da-97d4-4ba9-baad-1e18b49b96ac/data/bankAccounts - next: - href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/connections/2c26b4da-97d4-4ba9-baad-1e18b49b96ac/data/bankAccounts?page=2&pageSize=2 - QuickBooks Online Sandbox: - value: - results: - - id: '164' - accountName: '00' - accountType: Debit - nominalCode: '123567' - currency: GBP - balance: 0 - availableBalance: 0 - modifiedDate: '2023-04-26T09:35:57Z' - sourceModifiedDate: '2022-07-20T14:11:28Z' - metadata: - isDeleted: false - - id: '163' - accountName: '11' - accountType: Debit - currency: GBP - balance: 0 - availableBalance: 0 - modifiedDate: '2023-04-26T09:35:57Z' - sourceModifiedDate: '2022-07-20T14:11:28Z' - metadata: - isDeleted: false - pageNumber: 1 - pageSize: 2 - totalResults: 57 - _links: - current: - href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/connections/1f9f6013-f8a5-4278-8a47-3ab7fdb6c24c/data/bankAccounts?page=1&pageSize=2 - self: - href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/connections/1f9f6013-f8a5-4278-8a47-3ab7fdb6c24c/data/bankAccounts - next: - href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/connections/1f9f6013-f8a5-4278-8a47-3ab7fdb6c24c/data/bankAccounts?page=2&pageSize=2 - QuickBooks Online: + Example 1: value: - results: - - id: '202' - accountName: \aa - accountType: Debit - currency: GBP - balance: 123 - availableBalance: 123 - modifiedDate: '2023-01-18T11:02:37Z' - sourceModifiedDate: '2022-11-11T14:15:13Z' - - id: '193' - accountName: 1 year ago - accountType: Debit - currency: GBP - balance: 5300.02 - availableBalance: 5300.02 - modifiedDate: '2023-01-18T11:02:37Z' - sourceModifiedDate: '2023-01-18T06:05:12Z' - pageNumber: 1 - pageSize: 2 - totalResults: 140 - _links: - current: - href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/connections/9e28a776-f4be-425b-8a3d-ad49956de2c9/data/bankAccounts?page=1&pageSize=2 - self: - href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/connections/9e28a776-f4be-425b-8a3d-ad49956de2c9/data/bankAccounts - next: - href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/connections/9e28a776-f4be-425b-8a3d-ad49956de2c9/data/bankAccounts?page=2&pageSize=2 - Sage 50 (UK): - value: - results: - - id: '1200' - accountName: Bank Current Account - accountType: Unknown - nominalCode: '1200' - sortCode: 23-34-34 - accountNumber: '003234234' - iBan: '' - currency: GBP - balance: -20091.04 - availableBalance: -20091.04 - modifiedDate: '2023-03-30T14:42:37Z' - sourceModifiedDate: '2022-11-25T09:25:48' - overdraftLimit: 120000 - institution: Lloyds Bank PLC - metadata: - isDeleted: false - - id: '1210' - accountName: Bank Deposit Account - accountType: Unknown - nominalCode: '1210' - sortCode: 45-45-45 - accountNumber: 9/00474345 - iBan: '' - currency: GBP - balance: 3510 - availableBalance: 3510 - modifiedDate: '2023-03-30T14:42:37Z' - sourceModifiedDate: '2022-11-25T09:25:48' - overdraftLimit: 0 - institution: Halifax Building Society - metadata: - isDeleted: false - pageNumber: 1 - pageSize: 2 - totalResults: 6 - _links: - current: - href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/connections/8ee4910f-4fc1-47e6-89b1-5931fb33d8f7/data/bankAccounts?page=1&pageSize=2 - self: - href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/connections/8ee4910f-4fc1-47e6-89b1-5931fb33d8f7/data/bankAccounts - next: - href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/connections/8ee4910f-4fc1-47e6-89b1-5931fb33d8f7/data/bankAccounts?page=2&pageSize=2 - Sage Business Cloud Accounting: - value: - results: - - id: 154d05abe9f24c4babe0f6a741dec1b9 - accountName: Abdi Internet Bank - accountType: Unknown - nominalCode: '1560' - sortCode: '010101' - accountNumber: '11111' - currency: GBP - balance: 49.61 - availableBalance: 49.61 - modifiedDate: '2022-10-24T14:52:53Z' - sourceModifiedDate: '2020-01-27T10:53:26Z' - - id: 565ce07212bc492c8c2d04f43f9f67e3 - accountName: Abdi Live Test - accountType: Unknown - nominalCode: '147852' - sortCode: '123456' - accountNumber: '1234567' - currency: GBP - balance: -225830.75 - availableBalance: -225830.75 - modifiedDate: '2022-10-24T14:52:53Z' - sourceModifiedDate: '2020-01-28T14:00:20Z' - pageNumber: 1 - pageSize: 2 - totalResults: 45 - _links: - current: - href: /companies/390083e2-351b-407c-a3be-55081c36c182/connections/37916fb7-b4b8-4a78-8872-1751e20ee0cd/data/bankAccounts?page=1&pageSize=2 - self: - href: /companies/390083e2-351b-407c-a3be-55081c36c182/connections/37916fb7-b4b8-4a78-8872-1751e20ee0cd/data/bankAccounts - next: - href: /companies/390083e2-351b-407c-a3be-55081c36c182/connections/37916fb7-b4b8-4a78-8872-1751e20ee0cd/data/bankAccounts?page=2&pageSize=2 - Sage Intacct: - value: - results: - - id: 'CREDITCARD:55' - accountName: CoT Credit Card - accountType: Credit - nominalCode: '10021' - currency: GBP - modifiedDate: '2023-04-04T16:31:46Z' - sourceModifiedDate: '2023-03-27T14:11:48' - metadata: - isDeleted: false - - id: 'CREDITCARD:58' - accountName: Cot Credit Card 2 - accountType: Credit - nominalCode: '11112' - currency: GBP - modifiedDate: '2023-04-04T16:31:46Z' - sourceModifiedDate: '2023-03-27T14:15:11' - metadata: - isDeleted: false - pageNumber: 1 - pageSize: 2 - totalResults: 14 - _links: - current: - href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/connections/8f457d9c-1142-4241-a07e-71d1ee2e3052/data/bankAccounts?page=1&pageSize=2 - self: - href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/connections/8f457d9c-1142-4241-a07e-71d1ee2e3052/data/bankAccounts - next: - href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/connections/8f457d9c-1142-4241-a07e-71d1ee2e3052/data/bankAccounts?page=2&pageSize=2 - Xero: - value: - results: - - id: bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4 - accountName: Business Bank Account - accountType: Debit - sortCode: '990404' - accountNumber: '987654321' - currency: GBP - balance: 6681.79 - modifiedDate: '2023-03-15T20:36:09Z' - sourceModifiedDate: '2023-03-15T20:35:07' - metadata: - isDeleted: false - - id: a8d6fb1a-8c5d-4683-90ce-bf9d28fc62ba - accountName: Business Savings Account - accountType: Debit - sortCode: '890303' - accountNumber: '876543210' - currency: GBP - balance: 0 - modifiedDate: '2023-03-15T20:36:09Z' - sourceModifiedDate: '2023-03-15T20:36:06' - metadata: - isDeleted: false - pageNumber: 1 - pageSize: 2 - totalResults: 2 - _links: - current: - href: /companies/5ced9667-a310-443a-a711-958d36377141/connections/6a4bcf97-e46a-465c-abf6-c42cec8e48c0/data/bankAccounts?page=1&pageSize=2 - self: - href: /companies/5ced9667-a310-443a-a711-958d36377141/connections/6a4bcf97-e46a-465c-abf6-c42cec8e48c0/data/bankAccounts - Zoho Books: - value: - results: - - id: '104957000000060010' - accountName: Abdi Test - accountType: Unknown - sortCode: '112233' - accountNumber: xxxx5678 - currency: GBP - balance: 69858.44 - modifiedDate: '2022-10-03T08:40:38Z' - institution: Test Bank - - id: '104957000000065002' - accountName: Abdi Test 2 - accountType: Unknown - sortCode: '' - accountNumber: '' - currency: AED - balance: 98.03 - modifiedDate: '2022-10-03T08:40:38Z' - institution: '' - pageNumber: 1 - pageSize: 2 - totalResults: 4 - _links: - current: - href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/connections/a2324b8e-60e9-451d-8eb1-0fdc8e8224df/data/bankAccounts?page=1&pageSize=2 - self: - href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/connections/a2324b8e-60e9-451d-8eb1-0fdc8e8224df/data/bankAccounts - next: - href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/connections/a2324b8e-60e9-451d-8eb1-0fdc8e8224df/data/bankAccounts?page=2&pageSize=2 - '400': - $ref: '#/components/responses/Malformed-Query' + companyName: Codat + accountingPlatformRef: 1700060034_ETD + companyLegalName: Codat Ltd + addresses: + - type: Billing + line1: 301 Ink Rooms + line2: 28 Easton Street + city: London + region: England + country: United Kingdom + postalCode: WC1X 0BE + - type: Delivery + line1: 28 Easton Street + city: London + country: UK + postalCode: WC1X 0BE + phoneNumbers: + - number: 02012 345678 + type: Landline + - number: 07123 456789 + type: Mobile + - number: 02012 345678 + type: Fax + webLinks: + - type: Website + url: 'https://www.codat.io/' + - type: Social + url: 'https://www.linkedin.com/company/codat-limited/' + registrationNumber: '5590111724' + taxNumber: '74111622555799035846' + financialYearStartDate: '2023-04-01T00:00:00' + baseCurrency: GBP + sourceUrls: + Api: 'https://api.codat.io' + createdDate: '2020-03-09T15:19:26' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -1298,154 +943,5125 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - description: |- - The *List bank accounts* endpoint returns a list of [bank accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) for a given company's connection. - - [Bank accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution. - - Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/bank-feeds-api#/operations/refresh-company-data). - - '/companies/{companyId}/connections/{connectionId}/options/bankAccounts': + '/companies/{companyId}/sync/expenses/config': + get: + tags: + - Configuration + parameters: + - $ref: '#/components/parameters/companyId' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyConfiguration' + examples: {} + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + summary: Get company configuration + description: Gets a company's expense sync configuration + operationId: get-company-configuration + post: + tags: + - Configuration + parameters: + - $ref: '#/components/parameters/companyId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyConfiguration' + examples: {} + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyConfiguration' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + summary: Set company configuration + description: Sets a company's expense sync configuration + operationId: set-company-configuration + x-speakeasy-name-override: set parameters: - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' + '/companies/{companyId}/sync/expenses/mappingOptions': get: - summary: Get create/update bank account model - x-internal: true tags: - - Bank accounts + - Mapping options + parameters: + - $ref: '#/components/parameters/companyId' responses: '200': - description: OK + description: Success content: application/json: schema: - $ref: '#/components/schemas/PushOption' - examples: - Dynamics 365 Business Central: - value: - type: Object - displayName: Bank Account - description: An account that bank transactions may be recorded against - properties: - accountName: - type: String - displayName: Name - description: The name of the bank account in the originating system - required: true - validation: - warnings: [] - information: - - field: AccountName - details: 'Needs to be of the format ''{No.}-{Name}''' - currency: - type: String - displayName: Currency - description: The currency of the bank account - required: true - accountNumber: - type: String - displayName: Account Number - description: The account number for the bank account - required: false - nominalCode: - type: String - displayName: Nominal Code - description: The external reference given to each nominal account for a business - required: false - validation: - warnings: [] - information: - - field: NominalCode - details: Bank Account Posting Group with Nominal Account must exist - sortCode: - type: String - displayName: Sort Code - description: The sort code for the bank account - required: false - validation: - warnings: [] - information: - - field: SortCode - details: Must have a length between 0 and 20 characters - iBan: - type: String - displayName: IBAN - description: The international bank account number of the account. Often used when making or receiving international payments - required: false - overdraftLimit: - type: Number - displayName: Overdraft Limit - description: The pre-arranged overdraft limit of the account - required: false - validation: - warnings: [] - information: - - field: OverdraftLimit - details: Default value is 0 - required: true - Exact (Netherlands): - value: - type: Object - displayName: Bank Account - description: An account that bank transactions may be recorded against - properties: - accountName: - type: String - displayName: Name - description: The name of the bank account in the originating system - required: true - accountNumber: - type: String - displayName: Account Number - description: The account number for the bank account - required: true - validation: - warnings: - - field: AccountNumber - details: Should not exceed the maximum length of 14 characters if the specified currency is GBP. - information: [] - sortCode: - type: String - displayName: Sort Code - description: The sort code for the bank account - required: false - validation: - warnings: - - field: SortCode - details: Must be 6 characters long if the specified currency is GBP. - - field: SortCode - details: Must be provided if the specified currency is GBP. - information: [] - currency: - type: String - displayName: Currency - description: The currency of the bank account - required: false - nominalCode: - type: String - displayName: Nominal Code - description: The external reference given to each nominal account for a business - required: false - required: true - Exact (UK): - value: - type: Object - displayName: Bank Account - description: An account that bank transactions may be recorded against - properties: - accountName: - type: String - displayName: Name - description: The name of the bank account in the originating system - required: true - accountNumber: - type: String - displayName: Account Number - description: The account number for the bank account - required: true - validation: - warnings: + $ref: '#/components/schemas/MappingOptions' + examples: {} + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + description: 'Gets the mapping options (accounts, trackingCategories and taxRates) for a company''s accounting software' + summary: Mapping options + operationId: get-mapping-options + x-speakeasy-name-override: get-mapping-options + parameters: + - $ref: '#/components/parameters/companyId' + '/companies/{companyId}/sync/expenses/syncs/lastSuccessful/status': + get: + tags: + - Sync + parameters: + - $ref: '#/components/parameters/companyId' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CompanySyncStatus' + examples: {} + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + description: Gets the status of the last successful sync + summary: Last successful sync + operationId: get-last-successful-sync + x-speakeasy-name-override: get-last-successful-sync + parameters: + - $ref: '#/components/parameters/companyId' + '/companies/{companyId}/sync/expenses/syncs/latest/status': + get: + tags: + - Sync + parameters: + - $ref: '#/components/parameters/companyId' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CompanySyncStatus' + examples: {} + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + description: Gets the latest sync status + summary: Latest sync status + operationId: get-latest-sync + x-speakeasy-name-override: get-latest-sync + parameters: + - $ref: '#/components/parameters/companyId' + '/companies/{companyId}/sync/expenses/syncs/list/status': + parameters: + - $ref: '#/components/parameters/companyId' + get: + tags: + - Sync + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/CompanySyncStatus' + examples: {} + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + summary: List sync statuses + description: Gets a list of sync statuses + operationId: list-syncs + '/companies/{companyId}/sync/expenses/syncs/{syncId}/status': + get: + tags: + - Sync + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/syncId' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CompanySyncStatus' + examples: {} + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + summary: Get sync status + description: Get the sync status for a specified sync + operationId: get-sync-by-id + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/syncId' + '/companies/{companyId}/sync/expenses/syncs/{syncId}/transactions': + get: + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/syncId' + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Transactions' + examples: {} + '400': + $ref: '#/components/responses/Malformed-Query' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + tags: + - Transaction status + summary: List sync transactions + description: Gets the transactions and status for a sync + operationId: list-sync-transactions + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/syncId' + '/companies/{companyId}/sync/expenses/syncs/{syncId}/transactions/{transactionId}': + get: + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/syncId' + - $ref: '#/components/parameters/transactionId' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionResponse' + examples: {} + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + tags: + - Transaction status + summary: Get sync transaction + description: Gets the status of a transaction for a sync + operationId: get-sync-transaction + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/syncId' + - $ref: '#/components/parameters/transactionId' + '/companies/{companyId}/sync/expenses/expense-transactions': + parameters: + - $ref: '#/components/parameters/companyId' + post: + summary: Create expense transaction + operationId: create-expense-transaction + description: | + The *Create expense* endpoint creates an [expense transaction](https://docs.codat.io/sync-for-expenses-api#/schemas/ExpenseTransaction) in the accounting software for a given company's connection. + + [Expense transactions](https://docs.codat.io/sync-for-expenses-api#/schemas/ExpenseTransaction) represent transactions made with a company debit or credit card. + + ### Supported Integrations + + | Integration | Supported | + |-------------------------------|-----------| + | Dynamics 365 Business Central | Yes | + | FreeAgent | Yes | + | QuickBooks Desktop | Yes | + | QuickBooks Online | Yes | + | Oracle NetSuite | Yes | + | Sage Intacct | Yes | + | Xero | Yes | + | Zoho Books | Yes | + tags: + - Expenses + responses: + '200': + description: OK + content: + application/json: + x-speakeasy-usage-example: true + schema: + $ref: '#/components/schemas/CreateExpenseResponse' + examples: + Example 1: + value: + syncId: cd937d46-8e41-43a9-9477-a79158ffd98a + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateExpenseRequest' + examples: + Payment: + value: + - id: 4d7c6929-7770-412b-91bb-44d3bc71d111 + type: Payment + issueDate: '2024-05-21T00:00:00+00:00' + currency: GBP + currencyRate: 1 + contactRef: + id: '430' + type: Supplier + bankAccountRef: + id: '97' + merchantName: Amazon UK + notes: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + lines: + - netAmount: 100 + taxAmount: 20 + taxRateRef: + id: 23_Bills + accountRef: + id: '35' + trackingRefs: + - id: DEPARTMENT_5 + dataType: trackingCategories + invoiceTo: + id: '504' + type: customer + Refund: + value: + - id: 7008d3f2-aeb4-11ed-afa1-0242ac120002 + type: Refund + issueDate: '2024-02-17T00:00:00+00:00' + currency: GBP + contactRef: + id: '430' + type: Supplier + bankAccountRef: + id: '97' + merchantName: Amazon UK + notes: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + lines: + - netAmount: 100 + taxAmount: 20 + taxRateRef: + id: 23_Bills + accountRef: + id: '42' + trackingRefs: + - id: DEPARTMENT_6 + '/companies/{companyId}/sync/expenses/expense-transactions/{transactionId}': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/transactionId' + put: + summary: Update expense transactions + tags: + - Expenses + responses: + '202': + description: Accepted + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateExpenseResponse' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '422': + $ref: '#/components/responses/Unprocessable-Content' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + operationId: update-expense-transaction + description: |- + The *Update expense* endpoint updates an existing [expense transaction](https://docs.codat.io/sync-for-expenses-api#/schemas/UpdateExpenseRequest) in the accounting software for a given company's connection. + + [Expense transactions](https://docs.codat.io/sync-for-expenses-api#/schemas/UpdateExpenseRequest) represent transactions made with a company debit or credit card. + + ### Supported integrations + The following integrations are supported for the [Payment](https://docs.codat.io/expenses/sync-process/expense-transactions#transaction-types) transaction `type` only: + | Integration | Supported | + |-----------------------|-----------| + | FreeAgent | Yes | + | QuickBooks Desktop | Yes | + | QuickBooks Online | Yes | + | Oracle NetSuite | Yes | + | Sage Intacct | Yes | + | Xero | Yes | + | Zoho Books | Yes | + + #### Integration-specific behavior + + | Integration | Specifics | + |-----------------------|-----------| + | Sage Intacct | To sync **debit card expenses**, map the debit card to a Credit Card with the account type set to `Debit`.| + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateExpenseRequest' + examples: + Payment: + value: + type: Payment + issueDate: '2024-05-21T00:00:00+00:00' + currency: GBP + currencyRate: 1 + contactRef: + id: '430' + type: Supplier + bankAccountRef: + id: '97' + merchantName: Amazon UK + notes: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + lines: + - netAmount: 100 + taxAmount: 20 + taxRateRef: + id: 23_Bills + accountRef: + id: '35' + trackingRefs: + - id: DEPARTMENT_5 + dataType: trackingCategories + invoiceTo: + id: '504' + type: customer + '/companies/{companyId}/sync/expenses/transfer-transactions/{transactionId}': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/transactionId' + put: + summary: Create transfer transaction + operationId: create-transfer-transaction + description: "Use the *Create transfer* endpoint to create or update a [transfer transaction](https://docs.codat.io/sync-for-expenses-api#/schemas/TransferTransactionRequest) in the accounting software for a given company's connection. \r\n\r\nTransfers record the movement of money between two bank accounts, or between a bank account and a nominal account. Use them to represent actions such as topping up a debit card account or a balance transfer to another credit card.\r\n\r\nThe `from.amount` and `to.amount` fields are in the native currency of the account.\r\n\r\n### Supported Integrations\r\n| Integration | Create transfer | Update transfer |\r\n|-----------------------|------------------|------------------|\r\n| Dynamics\t\t\t\t| No\t\t\t | No\t\t\t\t |\r\n| FreeAgent | Yes | Yes |\r\n| NetSuite | No | No |\r\n| QuickBooks Desktop | Yes | No |\r\n| QuickBooks Online | Yes | Yes |\r\n| Sage Intacct | No | No |\r\n| Xero | Yes | No |\r\n| Zoho Books | No | No |" + tags: + - Transfers + responses: + '200': + description: OK + content: + application/json: + x-speakeasy-usage-example: true + schema: + $ref: '#/components/schemas/TransferTransactionResponse' + examples: + Example 1: + value: + syncId: cd937d46-8e41-43a9-9477-a79158ffd98a + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransferTransactionRequest' + examples: + Create transfer: + value: + description: Sample transfer description + date: '2021-05-21T00:00:00+00:00' + from: + accountRef: + id: 787dfb37-5707-4dc0-8a86-8d74e4cc78ea + amount: 100 + to: + accountRef: + id: 777dfb37-5506-3dc0-6g86-8d34z4cc78ea + amount: 100 + '/companies/{companyId}/sync/expenses/adjustment-transactions': + parameters: + - $ref: '#/components/parameters/companyId' + post: + summary: Create adjustment transaction + operationId: create-adjustment-transaction + description: |- + Use the *Create adjustment expense* endpoint to create an [adjustment](https://docs.codat.io/sync-for-expenses-api#/schemas/AdjustmentTransactionRequest) in the accounting software for a given company's connection. + + Adjustments represent write-offs and transaction alterations, such as foreign exchange adjustments, in the form of a journal entry. + + ### Supported Integrations + + | Integration | Supported | + |-----------------------|-----------| + | QuickBooks Desktop | Yes | + tags: + - Adjustments + responses: + '200': + description: OK + content: + application/json: + x-speakeasy-usage-example: true + schema: + $ref: '#/components/schemas/AdjustmentTransactionResponse' + examples: + Example 1: + value: + syncId: cd937d46-8e41-43a9-9477-a79158ffd98a + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAdjustmentRequest' + examples: + Create adjustment: + value: + - id: 3357b3df-5f2e-465d-b9ba-226519dbb8f1 + date: '2024-05-21T00:00:00+00:00' + currency: USD + currencyRate: 1 + reference: test reference + lines: + - amount: 50 + accountRef: + id: 80000018-1671793811 + description: debit line + trackingRefs: + - id: 80000003-1674553958 + dataType: trackingCategories + invoiceTo: + id: 80000002-1674552702 + type: customer + - amount: -50 + accountRef: + id: 80000028-1671794219 + description: credit line + trackingRefs: + - id: 80000003-1674553958 + dataType: trackingCategories + '/companies/{companyId}/sync/expenses/reimbursable-expense-transactions': + parameters: + - $ref: '#/components/parameters/companyId' + post: + summary: Create reimbursable expense transaction + operationId: create-reimbursable-expense-transaction + description: "Use the *Create reimbursable expense* endpoint to submit an employee expense claim in the accounting platform for a given company's connection.\r\n\r\n[Reimbursable expense requests](https://docs.codat.io/sync-for-expenses-api#/schemas/ReimbursableExpenseTransactionRequest) are reflected in the accounting software in the form of **Bills** against an employee (who exists as a supplier in the accounting platform).\r\n\r\n### Supported Integrations\r\n| Integration | Supported |\r\n|-----------------------|-----------|\r\n| FreeAgent | Yes |\r\n| QuickBooks Desktop | Yes |\r\n| QuickBooks Online | Yes |\r\n| Oracle NetSuite | Yes |\r\n| Zoho Books | Yes |\r\n| Sage Intacct | Yes |" + tags: + - Reimbursements + responses: + '200': + description: OK + content: + application/json: + x-speakeasy-usage-example: true + schema: + $ref: '#/components/schemas/CreateReimbursableExpenseResponse' + examples: + Example 1: + value: + syncId: cd937d46-8e41-43a9-9477-a79158ffd98a + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ReimbursableExpenseTransactionRequest' + examples: + Create reimbursable expense: + value: + - id: 4d7c6929-7770-412b-91bb-44d3bc71d111 + reference: expenses w/c 01/07 + contactRef: + id: '752' + issueDate: '2024-05-21' + dueDate: '2024-05-21' + currency: GBP + currencyRate: 1 + notes: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + lines: + - description: Hotel + netAmount: 100 + taxAmount: 20 + taxRateRef: + id: 23_Bills + accountRef: + id: '35' + trackingRefs: + - id: DEPARTMENT_5 + dataType: trackingCategories + invoiceTo: + id: '504' + type: customer + '/companies/{companyId}/sync/expenses/reimbursable-expense-transactions/{transactionId}': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/transactionId' + put: + summary: Update reimbursable expense transaction + operationId: update-reimbursable-expense-transaction + description: "The *Update reimbursable expense* endpoint updates an existing employee expense claim in the accounting platform for a given company's connection. \r\n\r\nUpdating an existing [reimbursable expense transaction](https://docs.codat.io/sync-for-expenses-api#/schemas/UpdateReimbursableExpenseTransactionRequest) will update the existing **bill** against an employee (who exists as a supplier in the accounting software).\r\n\r\n### Supported Integrations\r\n| Integration | Supported |\r\n|-----------------------|-----------|\r\n| FreeAgent | Yes |\r\n| QuickBooks Online | Yes |\r\n| Oracle NetSuite | Yes |\r\n| Zoho Books | Yes |\r\n\r\n" + tags: + - Reimbursements + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/CreateReimbursableExpenseResponse' + examples: + Example 1: + value: + syncId: cd937d46-8e41-43a9-9477-a79158ffd98a + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateReimbursableExpenseTransactionRequest' + examples: + Update reimbursable expense: + value: + reference: expenses w/c 01/07 + contactRef: + id: '752' + issueDate: '2024-05-21' + dueDate: '2024-05-21' + currency: GBP + currencyRate: 1 + notes: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + lines: + - description: Hotel + netAmount: 100 + taxAmount: 20 + taxRateRef: + id: 23_Bills + accountRef: + id: '35' + trackingRefs: + - id: DEPARTMENT_5 + dataType: trackingCategories + invoiceTo: + id: '504' + type: customer + '/companies/{companyId}/sync/expenses/syncs/{syncId}/transactions/{transactionId}/attachments': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/syncId' + - $ref: '#/components/parameters/transactionId' + post: + summary: Upload attachment + operationId: upload-expense-attachment + x-speakeasy-name-override: upload + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Attachment' + examples: {} + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/AttachmentUpload' + tags: + - Attachments + description: |- + The *Upload attachment* endpoint uploads an attachment in the accounting software against the given transactionId. + + [Expense transactions](https://docs.codat.io/sync-for-expenses-api#/schemas/ExpenseTransaction) represent transactions made with a company debit or credit card. Attachments for `Adjustment` and `Transfer` transaction types are not supported for any integrations. + + **Integration-specific behavior** + + Each accounting software supports different file formats and sizes. + + | Integration | File size | File extension | Supported transactions | + |-----------------------------------|-----------|-------------------------------------------------------|------------------------| + | **Xero** | 3 MB | 7Z, BMP, CSV, DOC, DOCX, EML, GIF, JPEG, JPG, KEYNOTE, MSG, NUMBERS, ODF, ODS, ODT, PAGES, PDF, PNG, PPT, PPTX, RAR, RTF, TIF, TIFF, TXT, XLS, XLSX, ZIP | All supported types | + | **QuickBooks Online** | 100 MB | AI, CSV, DOC, DOCX, EPS, GIF, JPEG, JPG, ODS, PAGES, PDF, PNG, RTF, TIF, TXT, XLS, XLSX, XML | `expense-transactions.Payment`, `expense-transactions.Refund`, `reimbursable-expense-transactions` | + | **NetSuite** | 100 MB | BMP, CSV, XLS, XLSX, JSON, PDF, PJPG, PJPEG, PNG, TXT, SVG, TIF, TIFF, DOC, DOCX, ZIP |`expense-transactions.Payment`, `expense-transactions.Refund` | + | **Dynamics 365 Business Central** | 350 MB | [No explicit requirements outlined](https://learn.microsoft.com/en-gb/dynamics365/business-central/ui-how-add-link-to-record#to-attach-a-file-to-a-purchase-invoice) for text, image, and video files. | All supported types + | **QuickBooks Desktop** | NA | Does not support attachment upload | N/A | + | **FreeAgent** | 5MB | PNG, X-PNG, JPEG, PJG, GIF, X-PDF | `expense-transactions.Payment`, `reimbursable-expense-transactions` + | **Zoho Books** | 5MB | GIF, PNG, JPEG, JPG, BMP, PDF | `expense-transactions.Payment`, `reimbursable-expense-transactions` | + '/companies/{companyId}/data/all': + parameters: + - $ref: '#/components/parameters/companyId' + post: + summary: Refresh all data + operationId: refresh-all-data-types + responses: + '204': + description: No Content + '400': + $ref: '#/components/responses/Malformed-Query' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + description: |- + Refreshes all data types with `fetch on first link` set to `true` for a given company. + + This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view. + + [Read more](https://docs.codat.io/core-concepts/data-type-settings) about data type settings and `fetch on first link`. + tags: + - Manage data + '/companies/{companyId}/dataStatus': + parameters: + - $ref: '#/components/parameters/companyId' + get: + summary: Get data status + operationId: get-data-status + description: Get the state of each data type for a company + tags: + - Manage data + responses: + '200': + description: OK + content: + application/json: + schema: + title: Data statuses + x-internal: true + type: object + properties: + accountTransactions: + $ref: '#/components/schemas/DataStatus' + nullable: true + balanceSheet: + $ref: '#/components/schemas/DataStatus' + nullable: true + bankAccounts: + $ref: '#/components/schemas/DataStatus' + nullable: true + bankTransactions: + $ref: '#/components/schemas/DataStatus' + nullable: true + billCreditNotes: + $ref: '#/components/schemas/DataStatus' + nullable: true + billPayments: + $ref: '#/components/schemas/DataStatus' + nullable: true + bills: + $ref: '#/components/schemas/DataStatus' + nullable: true + cashFlowStatement: + $ref: '#/components/schemas/DataStatus' + nullable: true + chartOfAccounts: + $ref: '#/components/schemas/DataStatus' + nullable: true + company: + $ref: '#/components/schemas/DataStatus' + nullable: true + creditNotes: + $ref: '#/components/schemas/DataStatus' + nullable: true + customers: + $ref: '#/components/schemas/DataStatus' + nullable: true + directCosts: + $ref: '#/components/schemas/DataStatus' + nullable: true + directIncomes: + $ref: '#/components/schemas/DataStatus' + nullable: true + invoices: + $ref: '#/components/schemas/DataStatus' + nullable: true + itemReceipts: + $ref: '#/components/schemas/DataStatus' + nullable: true + items: + $ref: '#/components/schemas/DataStatus' + nullable: true + journalEntries: + $ref: '#/components/schemas/DataStatus' + nullable: true + journals: + $ref: '#/components/schemas/DataStatus' + nullable: true + paymentMethods: + $ref: '#/components/schemas/DataStatus' + nullable: true + payments: + $ref: '#/components/schemas/DataStatus' + nullable: true + profitAndLoss: + $ref: '#/components/schemas/DataStatus' + nullable: true + purchaseOrders: + $ref: '#/components/schemas/DataStatus' + nullable: true + salesOrders: + $ref: '#/components/schemas/DataStatus' + nullable: true + suppliers: + $ref: '#/components/schemas/DataStatus' + nullable: true + taxRates: + $ref: '#/components/schemas/DataStatus' + nullable: true + trackingCategories: + $ref: '#/components/schemas/DataStatus' + nullable: true + transfers: + $ref: '#/components/schemas/DataStatus' + nullable: true + banking-accountBalances: + $ref: '#/components/schemas/DataStatus' + nullable: true + banking-accounts: + $ref: '#/components/schemas/DataStatus' + nullable: true + banking-transactionCategories: + $ref: '#/components/schemas/DataStatus' + nullable: true + banking-transactions: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-companyInfo: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-customers: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-disputes: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-locations: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-orders: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-paymentMethods: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-payments: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-productCategories: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-products: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-taxComponents: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-transactions: + $ref: '#/components/schemas/DataStatus' + nullable: true + examples: + Example: + value: + accountTransactions: + dataType: accountTransactions + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + balanceSheet: + dataType: balanceSheet + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + bankAccounts: + dataType: bankAccounts + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + bankTransactions: + dataType: bankTransactions + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + billCreditNotes: + dataType: billCreditNotes + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + billPayments: + dataType: billPayments + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + bills: + dataType: bills + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + cashFlowStatement: + dataType: cashFlowStatement + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + chartOfAccounts: + dataType: chartOfAccounts + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + company: + dataType: company + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + creditNotes: + dataType: creditNotes + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + customers: + dataType: customers + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + directCosts: + dataType: directCosts + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + directIncomes: + dataType: directIncomes + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + invoices: + dataType: invoices + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + itemReceipts: + dataType: itemReceipts + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + items: + dataType: items + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + journalEntries: + dataType: journalEntries + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + journals: + dataType: journals + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + paymentMethods: + dataType: paymentMethods + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + payments: + dataType: payments + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + profitAndLoss: + dataType: profitAndLoss + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + purchaseOrders: + dataType: purchaseOrders + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + salesOrders: + dataType: salesOrders + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + suppliers: + dataType: suppliers + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + taxRates: + dataType: taxRates + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + trackingCategories: + dataType: trackingCategories + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + transfers: + dataType: transfers + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + banking-accountBalances: + dataType: banking-accountBalances + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + banking-accounts: + dataType: banking-accounts + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + banking-transactionCategories: + dataType: banking-transactionCategories + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + banking-transactions: + dataType: banking-transactions + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + commerce-companyInfo: + dataType: commerce-companyInfo + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + commerce-customers: + dataType: commerce-customers + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + commerce-disputes: + dataType: commerce-disputes + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + commerce-locations: + dataType: commerce-locations + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + commerce-orders: + dataType: commerce-orders + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + commerce-paymentMethods: + dataType: commerce-paymentMethods + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + commerce-payments: + dataType: commerce-payments + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + commerce-productCategories: + dataType: commerce-productCategories + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + commerce-products: + dataType: commerce-products + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + commerce-taxComponents: + dataType: commerce-taxComponents + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + commerce-transactions: + dataType: commerce-transactions + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + '/companies/{companyId}/data/queue/{dataType}': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/dataType' + post: + summary: Refresh data type + operationId: refresh-data-type + description: |- + Refreshes a given data type for a given company. + + This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view. + tags: + - Manage data + parameters: + - schema: + type: string + format: uuid + in: query + name: connectionId + description: 'Optionally, provide a data connection id to only queue pull operations on that connection.' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/PullOperation' + '400': + $ref: '#/components/responses/Malformed-Query' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + '/companies/{companyId}/data/history': + parameters: + - $ref: '#/components/parameters/companyId' + get: + summary: List pull operations + tags: + - Manage data + operationId: list-pull-operations + x-speakeasy-name-override: list-pull-operations + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/PullOperations' + examples: + Example: + value: + results: + - id: 97d60846-f07a-4d42-b5a0-0bdcc6ebf56b + companyId: 4645bd78-8988-45bc-ac9e-67ba5df6e4e5 + connectionId: 51baa045-4836-4317-a42e-3542e991e581 + dataType: invoices + status: Initial + requested: '2022-11-14T11:18:37.2798351Z' + progress: 10 + isCompleted: false + isErrored: false + _links: + current: + href: /companies/17129e41-5389-4f10-ac06-e0a37e47d177/data/history?page=1&pageSize=2 + self: + href: /companies/17129e41-5389-4f10-ac06-e0a37e47d177/data/history + next: + href: /companies/17129e41-5389-4f10-ac06-e0a37e47d177/data/history?page=2&pageSize=2 + pageNumber: 0 + pageSize: 0 + totalResults: 0 + '400': + $ref: '#/components/responses/Malformed-Query' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + description: Gets the pull operation history (datasets) for a given company. + parameters: + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + - $ref: '#/components/parameters/query' + - $ref: '#/components/parameters/orderBy' + '/companies/{companyId}/data/history/{datasetId}': + parameters: + - $ref: '#/components/parameters/companyId' + - name: datasetId + in: path + required: true + schema: + type: string + format: uuid + description: Unique identifier for the dataset that completed its sync. + description: Unique identifier for the dataset that completed its sync. + get: + summary: Get pull operation + operationId: get-pull-operation + x-speakeasy-name-override: get-pull-operation + tags: + - Manage data + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/PullOperation' + examples: {} + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + description: Retrieve information about a single dataset or pull operation. + '/companies/{companyId}/push': + parameters: + - $ref: '#/components/parameters/companyId' + get: + parameters: + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + - $ref: '#/components/parameters/query' + - $ref: '#/components/parameters/orderBy' + summary: List push operations + tags: + - Push operations + operationId: list-push-operations + description: List push operation records. + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/PushOperations' + examples: {} + '400': + $ref: '#/components/responses/Malformed-Query' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + '/companies/{companyId}/push/{pushOperationKey}': + parameters: + - $ref: '#/components/parameters/companyId' + - schema: + type: string + format: uuid + name: pushOperationKey + in: path + required: true + description: Push operation key. + get: + summary: Get push operation + tags: + - Push operations + operationId: get-push-operation + description: Retrieve push operation. + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/PushOperation' + examples: {} + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + '/companies/{companyId}/connections/{connectionId}/push/accounts': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/connectionId' + post: + tags: + - Accounts + summary: Create account + parameters: + - $ref: '#/components/parameters/timeoutInMinutes' + - $ref: '#/components/parameters/allowSyncOnPushComplete' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Account/definitions/accountPrototype' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAccountResponse' + examples: {} + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + description: |- + The *Create account* endpoint creates a new [account](https://docs.codat.io/sync-for-expenses-api#/schemas/Account) for a given company's connection. + + [Accounts](https://docs.codat.io/sync-for-expenses-api#/schemas/Account) are the categories a business uses to record accounting transactions. + + **Integration-specific behavior** + + Required data may vary by integration. To see what data to post, first call [Get create account model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-chartOfAccounts-model). + operationId: create-account + '/companies/{companyId}/connections/{connectionId}/options/chartOfAccounts': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/connectionId' + get: + summary: Get create account model + tags: + - Accounts + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/PushOption' + examples: + Exact (Netherlands): + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + validation: + warnings: [] + information: + - field: NominalCode + details: Must be provided. + name: + type: String + displayName: Name + description: Name of the account + required: true + validation: + warnings: [] + information: + - field: Name + details: Must be provided. + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + options: + - value: Asset.Assets.Cash + type: String + displayName: Asset.Assets.Cash + required: false + - value: Asset.Assets.Bank + type: String + displayName: Asset.Assets.Bank + required: false + - value: Asset.Assets.PaymentServices + type: String + displayName: Asset.Assets.PaymentServices + required: false + - value: Asset.Assets.AccountsReceivable + type: String + displayName: Asset.Assets.AccountsReceivable + required: false + - value: Liability.EquityAndLiabilities.AccountsPayable + type: String + displayName: Liability.EquityAndLiabilities.AccountsPayable + required: false + - value: Asset.Assets.VAT + type: String + displayName: Asset.Assets.VAT + required: false + - value: Liability.EquityAndLiabilities.EmployeesPayable + type: String + displayName: Liability.EquityAndLiabilities.EmployeesPayable + required: false + - value: Asset.Assets.PrepaidExpenses + type: String + displayName: Asset.Assets.PrepaidExpenses + required: false + - value: Liability.EquityAndLiabilities.AccruedExpenses + type: String + displayName: Liability.EquityAndLiabilities.AccruedExpenses + required: false + - value: Liability.EquityAndLiabilities.IncomeTaxesPayable + type: String + displayName: Liability.EquityAndLiabilities.IncomeTaxesPayable + required: false + - value: Asset.Assets.FixedAssets + type: String + displayName: Asset.Assets.FixedAssets + required: false + - value: Asset.Assets.OtherAssets + type: String + displayName: Asset.Assets.OtherAssets + required: false + - value: Asset.Assets.AccumulatedDeprecation + type: String + displayName: Asset.Assets.AccumulatedDeprecation + required: false + - value: Asset.Assets.Inventory + type: String + displayName: Asset.Assets.Inventory + required: false + - value: Equity.EquityAndLiabilities.CapitalStock + type: String + displayName: Equity.EquityAndLiabilities.CapitalStock + required: false + - value: Equity.EquityAndLiabilities.RetainedEarnings + type: String + displayName: Equity.EquityAndLiabilities.RetainedEarnings + required: false + - value: Liability.EquityAndLiabilities.LongTermDebt + type: String + displayName: Liability.EquityAndLiabilities.LongTermDebt + required: false + - value: Liability.EquityAndLiabilities.CurrentPortionOfDebt + type: String + displayName: Liability.EquityAndLiabilities.CurrentPortionOfDebt + required: false + - value: Unknown.EquityAndLiabilities.Intercompany + type: String + displayName: Unknown.EquityAndLiabilities.Intercompany + required: false + - value: Unknown.General.General + type: String + displayName: Unknown.General.General + required: false + - value: Income.NetIncome.Revenue + type: String + displayName: Income.NetIncome.Revenue + required: false + - value: Expense.NetIncome.CostOfGoods + type: String + displayName: Expense.NetIncome.CostOfGoods + required: false + - value: Expense.NetIncome.OtherCosts + type: String + displayName: Expense.NetIncome.OtherCosts + required: false + - value: Expense.NetIncome.SalesGeneralAdministrativeExpenses + type: String + displayName: Expense.NetIncome.SalesGeneralAdministrativeExpenses + required: false + - value: Expense.NetIncome.DeprecationCosts + type: String + displayName: Expense.NetIncome.DeprecationCosts + required: false + - value: Expense.NetIncome.ResearchAndDevelopment + type: String + displayName: Expense.NetIncome.ResearchAndDevelopment + required: false + - value: Expense.NetIncome.EmployeeCosts + type: String + displayName: Expense.NetIncome.EmployeeCosts + required: false + - value: Expense.NetIncome.EmploymentCosts + type: String + displayName: Expense.NetIncome.EmploymentCosts + required: false + - value: Expense.ExceptionalIncome.ExceptionalCosts + type: String + displayName: Expense.ExceptionalIncome.ExceptionalCosts + required: false + - value: Income.ExceptionalIncome.ExceptionalIncome + type: String + displayName: Income.ExceptionalIncome.ExceptionalIncome + required: false + - value: Expense.ExceptionalIncome.IncomeTaxes + type: String + displayName: Expense.ExceptionalIncome.IncomeTaxes + required: false + - value: Income.ExceptionalIncome.InterestIncome + type: String + displayName: Income.ExceptionalIncome.InterestIncome + required: false + required: true + validation: + warnings: [] + information: + - field: FullyQualifiedCategory + details: Must be provided. + status: + type: String + displayName: Account Status + description: The status of the account + options: + - value: Active + type: String + displayName: Active + required: false + - value: Pending + type: String + displayName: Pending + required: false + - value: Unknown + type: String + displayName: Unknown + required: false + required: true + validation: + warnings: [] + information: + - field: Status + details: Must be provided. + required: true + Exact (UK): + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + validation: + warnings: [] + information: + - field: NominalCode + details: Must be provided. + name: + type: String + displayName: Name + description: Name of the account + required: true + validation: + warnings: [] + information: + - field: Name + details: Must be provided. + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + options: + - value: Asset.Assets.Cash + type: String + displayName: Asset.Assets.Cash + required: false + - value: Asset.Assets.Bank + type: String + displayName: Asset.Assets.Bank + required: false + - value: Asset.Assets.PaymentServices + type: String + displayName: Asset.Assets.PaymentServices + required: false + - value: Asset.Assets.AccountsReceivable + type: String + displayName: Asset.Assets.AccountsReceivable + required: false + - value: Liability.EquityAndLiabilities.AccountsPayable + type: String + displayName: Liability.EquityAndLiabilities.AccountsPayable + required: false + - value: Asset.Assets.VAT + type: String + displayName: Asset.Assets.VAT + required: false + - value: Liability.EquityAndLiabilities.EmployeesPayable + type: String + displayName: Liability.EquityAndLiabilities.EmployeesPayable + required: false + - value: Asset.Assets.PrepaidExpenses + type: String + displayName: Asset.Assets.PrepaidExpenses + required: false + - value: Liability.EquityAndLiabilities.AccruedExpenses + type: String + displayName: Liability.EquityAndLiabilities.AccruedExpenses + required: false + - value: Liability.EquityAndLiabilities.IncomeTaxesPayable + type: String + displayName: Liability.EquityAndLiabilities.IncomeTaxesPayable + required: false + - value: Asset.Assets.FixedAssets + type: String + displayName: Asset.Assets.FixedAssets + required: false + - value: Asset.Assets.OtherAssets + type: String + displayName: Asset.Assets.OtherAssets + required: false + - value: Asset.Assets.AccumulatedDeprecation + type: String + displayName: Asset.Assets.AccumulatedDeprecation + required: false + - value: Asset.Assets.Inventory + type: String + displayName: Asset.Assets.Inventory + required: false + - value: Equity.EquityAndLiabilities.CapitalStock + type: String + displayName: Equity.EquityAndLiabilities.CapitalStock + required: false + - value: Equity.EquityAndLiabilities.RetainedEarnings + type: String + displayName: Equity.EquityAndLiabilities.RetainedEarnings + required: false + - value: Liability.EquityAndLiabilities.LongTermDebt + type: String + displayName: Liability.EquityAndLiabilities.LongTermDebt + required: false + - value: Liability.EquityAndLiabilities.CurrentPortionOfDebt + type: String + displayName: Liability.EquityAndLiabilities.CurrentPortionOfDebt + required: false + - value: Unknown.EquityAndLiabilities.Intercompany + type: String + displayName: Unknown.EquityAndLiabilities.Intercompany + required: false + - value: Unknown.General.General + type: String + displayName: Unknown.General.General + required: false + - value: Income.NetIncome.Revenue + type: String + displayName: Income.NetIncome.Revenue + required: false + - value: Expense.NetIncome.CostOfGoods + type: String + displayName: Expense.NetIncome.CostOfGoods + required: false + - value: Expense.NetIncome.OtherCosts + type: String + displayName: Expense.NetIncome.OtherCosts + required: false + - value: Expense.NetIncome.SalesGeneralAdministrativeExpenses + type: String + displayName: Expense.NetIncome.SalesGeneralAdministrativeExpenses + required: false + - value: Expense.NetIncome.DeprecationCosts + type: String + displayName: Expense.NetIncome.DeprecationCosts + required: false + - value: Expense.NetIncome.ResearchAndDevelopment + type: String + displayName: Expense.NetIncome.ResearchAndDevelopment + required: false + - value: Expense.NetIncome.EmployeeCosts + type: String + displayName: Expense.NetIncome.EmployeeCosts + required: false + - value: Expense.NetIncome.EmploymentCosts + type: String + displayName: Expense.NetIncome.EmploymentCosts + required: false + - value: Expense.ExceptionalIncome.ExceptionalCosts + type: String + displayName: Expense.ExceptionalIncome.ExceptionalCosts + required: false + - value: Income.ExceptionalIncome.ExceptionalIncome + type: String + displayName: Income.ExceptionalIncome.ExceptionalIncome + required: false + - value: Expense.ExceptionalIncome.IncomeTaxes + type: String + displayName: Expense.ExceptionalIncome.IncomeTaxes + required: false + - value: Income.ExceptionalIncome.InterestIncome + type: String + displayName: Income.ExceptionalIncome.InterestIncome + required: false + required: true + validation: + warnings: [] + information: + - field: FullyQualifiedCategory + details: Must be provided. + status: + type: String + displayName: Account Status + description: The status of the account + options: + - value: Active + type: String + displayName: Active + required: false + - value: Pending + type: String + displayName: Pending + required: false + - value: Unknown + type: String + displayName: Unknown + required: false + required: true + validation: + warnings: [] + information: + - field: Status + details: Must be provided. + required: true + MYOB AccountRight and Essentials: + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + validation: + warnings: + - field: NominalCode + details: 'If alphanumeric is supported, must be between 1 and 10 characters. Otherwise format is x-xxxx' + information: [] + name: + type: String + displayName: Name + description: Name of the account + required: false + validation: + warnings: + - field: Name + details: Must have a length between 1 and 60 characters + information: [] + description: + type: String + displayName: Description + description: Description of the account + required: false + validation: + warnings: + - field: Description + details: Must have a length between 1 and 255 characters + information: [] + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + options: + - value: Asset.Bank + type: String + displayName: Bank + required: false + - value: Asset.AccountReceivable + type: String + displayName: Accounts Receivable + required: false + - value: Asset.OtherCurrentAsset + type: String + displayName: Other Current Asset + required: false + - value: Asset.FixedAsset + type: String + displayName: Fixed Asset + required: false + - value: Asset.OtherAsset + type: String + displayName: Other Asset + required: false + - value: Asset.CashAndBank + type: String + displayName: Cash + required: false + - value: Asset.Property Plant and Equipment + type: String + displayName: Equipment Machinery + required: false + - value: Liability.CreditCard + type: String + displayName: Credit Card + required: false + - value: Liability.AccountsPayable + type: String + displayName: Accounts Payable + required: false + - value: Liability.OtherCurrentLiability + type: String + displayName: Other Current Liability + required: false + - value: Liability.LongTermLiability + type: String + displayName: Long Term Liability + required: false + - value: Liability.OtherLiability + type: String + displayName: Other Liability + required: false + - value: Equity + type: String + displayName: Equity + required: false + - value: Equity.Equity + type: String + displayName: Retained Earnings + required: false + - value: Equity.Equity.RetainedEarnings + type: String + displayName: Retained Earnings + required: false + - value: Equity.Owner's Equity + type: String + displayName: Retained Earnings + required: false + - value: Income + type: String + displayName: Income + required: false + - value: OtherIncome + type: String + displayName: Other Income + required: false + - value: Expense + type: String + displayName: Expense + required: false + - value: Expense.Expense + type: String + displayName: Sales Marketing + required: false + - value: Expense.Expense.Insurance + type: String + displayName: General Administrative + required: false + - value: Expense.Overhead + type: String + displayName: General Administrative + required: false + - value: Expense.Expense.RepairMaintenance + type: String + displayName: Repairs Maintenance + required: false + - value: OtherExpense + type: String + displayName: Other Expense + required: false + - value: CostOfSales + type: String + displayName: Cost of Sales + required: false + - value: Cost Of Goods Sold.Cost of Sales + type: String + displayName: Other + required: false + required: true + status: + type: String + displayName: Account Status + description: The status of the account + options: + - value: Active + type: String + displayName: Active + required: false + - value: Archived + type: String + displayName: Archived + required: false + required: true + required: true + QuickBooks Desktop: + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + validation: + warnings: + - field: NominalCode + details: Max length of 7 characters. + information: [] + name: + type: String + displayName: Name + description: Name of the account + required: true + validation: + warnings: + - field: Name + details: Max length of 31 characters. + information: [] + description: + type: String + displayName: Description + description: Description of the account + required: false + validation: + warnings: + - field: Description + details: Max length of 200 characters. + information: [] + currency: + type: String + displayName: Currency + description: The currency of the account + required: false + validation: + warnings: + - field: Currency + details: 'The currency must match the base currency of the QuickBooks Desktop company unless the FullyQualifiedCategory is ''Asset.AccountsReceivable'',''Liability.AccountsPayable'' or ''Liability.CreditCard''' + - field: Currency + details: Must be a three letter ISO code that matches an existing active currency in the QuickBooks Desktop company + - field: Currency + details: Can only be set if the QuickBooks Desktop company has Multicurrency enabled. + information: + - field: Currency + details: 'If not set, will default to the base currency of the QuickBooks Desktop company' + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + options: + - value: Asset.AccountsReceivable + type: String + displayName: Account Receivable + required: false + - value: Asset.FixedAsset + type: String + displayName: Fixed Asset + required: false + - value: Asset.OtherCurrentAsset + type: String + displayName: Other Current Asset + required: false + - value: Asset.OtherAsset + type: String + displayName: Other Asset + required: false + - value: Income.Income + type: String + displayName: Income + required: false + - value: Income.OtherIncome + type: String + displayName: Other Income + required: false + - value: Liability.AccountsPayable + type: String + displayName: Accounts Payable + required: false + - value: Liability.CreditCard + type: String + displayName: Credit Card + required: false + - value: Liability.LongTermLiability + type: String + displayName: Long Term Liability + required: false + - value: Liability.OtherCurrentLiability + type: String + displayName: Other Current Liability + required: false + - value: Liability.CostOfGoodsSold + type: String + displayName: Cost Of Goods Sold + required: false + - value: Equity.Equity + type: String + displayName: Equity + required: false + - value: Expense.Expense + type: String + displayName: Expense + required: false + - value: Expense.OtherExpense + type: String + displayName: Other Expense + required: false + required: true + currentBalance: + type: Number + displayName: Current Balance + description: The current balance in the account + required: false + required: true + QuickBooks Online Sandbox: + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: false + validation: + warnings: [] + information: + - field: NominalCode + details: If included must have a length between 1 and 7 characters + name: + type: String + displayName: Name + description: Name of the account + required: true + validation: + warnings: + - field: Name + details: Must have a length between 1 and 100 characters + information: [] + currency: + type: String + displayName: Currency + description: The currency of the account + required: false + validation: + warnings: [] + information: + - field: Currency + details: When not specified company base currency will be used + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + options: + - value: Asset.Bank.CashOnHand + type: String + displayName: Cash On Hand + required: false + - value: Asset.Bank.Checking + type: String + displayName: Checking + required: false + - value: Asset.Bank.MoneyMarket + type: String + displayName: Money Market + required: false + - value: Asset.Bank.RentsHeldInTrust + type: String + displayName: Rents Held In Trust + required: false + - value: Asset.Bank.Savings + type: String + displayName: Savings + required: false + - value: Asset.Bank.TrustAccounts + type: String + displayName: Trust Accounts + required: false + - value: Asset.Bank.CashAndCashEquivalents + type: String + displayName: Cash And Cash Equivalents + required: false + - value: Asset.Bank.OtherEarmarkedBankAccounts + type: String + displayName: Other Earmarked Bank Accounts + required: false + - value: Asset.Other Current Asset.AllowanceForBadDebts + type: String + displayName: Allowance For Bad Debts + required: false + - value: Asset.Other Current Asset.DevelopmentCosts + type: String + displayName: Development Costs + required: false + - value: Asset.Other Current Asset.EmployeeCashAdvances + type: String + displayName: Employee Cash Advances + required: false + - value: Asset.Other Current Asset.OtherCurrentAssets + type: String + displayName: Other Current Assets + required: false + - value: Asset.Other Current Asset.Inventory + type: String + displayName: Inventory + required: false + - value: Asset.Other Current Asset.Investment_MortgageRealEstateLoans + type: String + displayName: Investment Mortgage Real Estate Loans + required: false + - value: Asset.Other Current Asset.Investment_Other + type: String + displayName: Investment Other + required: false + - value: Asset.Other Current Asset.Investment_TaxExemptSecurities + type: String + displayName: Investment Tax Exempt Securities + required: false + - value: Asset.Other Current Asset.Investment_USGovernmentObligations + type: String + displayName: Investment US Government Obligations + required: false + - value: Asset.Other Current Asset.LoansToOfficers + type: String + displayName: Loans To Officers + required: false + - value: Asset.Other Current Asset.LoansToOthers + type: String + displayName: Loans To Others + required: false + - value: Asset.Other Current Asset.LoansToStockholders + type: String + displayName: Loans To Stockholders + required: false + - value: Asset.Other Current Asset.PrepaidExpenses + type: String + displayName: Prepaid Expenses + required: false + - value: Asset.Other Current Asset.Retainage + type: String + displayName: Retainage + required: false + - value: Asset.Other Current Asset.UndepositedFunds + type: String + displayName: Undeposited Funds + required: false + - value: Asset.Other Current Asset.AssetsAvailableForSale + type: String + displayName: Assets Available For Sale + required: false + - value: Asset.Other Current Asset.BalWithGovtAuthorities + type: String + displayName: Balance With Govt Authorities + required: false + - value: Asset.Other Current Asset.CalledUpShareCapitalNotPaid + type: String + displayName: Called Up Share Capital Not Paid + required: false + - value: Asset.Other Current Asset.ExpenditureAuthorisationsAndLettersOfCredit + type: String + displayName: Expenditure Authorisations And Letters Of Credit + required: false + - value: Asset.Other Current Asset.GlobalTaxDeferred + type: String + displayName: Global Tax Deferred + required: false + - value: Asset.Other Current Asset.GlobalTaxRefund + type: String + displayName: Global Tax Refund + required: false + - value: Asset.Other Current Asset.InternalTransfers + type: String + displayName: Internal Transfers + required: false + - value: Asset.Other Current Asset.OtherConsumables + type: String + displayName: Other Consumables + required: false + - value: Asset.Other Current Asset.ProvisionsCurrentAssets + type: String + displayName: Provisions Current Assets + required: false + - value: Asset.Other Current Asset.ShortTermInvestmentsInRelatedParties + type: String + displayName: Short Term Investments In Related Parties + required: false + - value: Asset.Other Current Asset.ShortTermLoansAndAdvancesToRelatedParties + type: String + displayName: Short Term Loans And Advances To Related Parties + required: false + - value: Asset.Other Current Asset.TradeAndOtherReceivables + type: String + displayName: Trade And Other Receivables + required: false + - value: Asset.Fixed Asset.AccumulatedDepletion + type: String + displayName: Accumulated Depletion + required: false + - value: Asset.Fixed Asset.AccumulatedDepreciation + type: String + displayName: Accumulated Depreciation + required: false + - value: Asset.Fixed Asset.DepletableAssets + type: String + displayName: Depletable Assets + required: false + - value: Asset.Fixed Asset.FixedAssetComputers + type: String + displayName: Fixed Asset Computers + required: false + - value: Asset.Fixed Asset.FixedAssetCopiers + type: String + displayName: Fixed Asset Copiers + required: false + - value: Asset.Fixed Asset.FixedAssetFurniture + type: String + displayName: Fixed Asset Furniture + required: false + - value: Asset.Fixed Asset.FixedAssetPhone + type: String + displayName: Fixed Asset Phone + required: false + - value: Asset.Fixed Asset.FixedAssetPhotoVideo + type: String + displayName: Fixed Asset Photo Video + required: false + - value: Asset.Fixed Asset.FixedAssetSoftware + type: String + displayName: Fixed Asset Software + required: false + - value: Asset.Fixed Asset.FixedAssetOtherToolsEquipment + type: String + displayName: Fixed Asset Other Tools Equipment + required: false + - value: Asset.Fixed Asset.FurnitureAndFixtures + type: String + displayName: Furniture And Fixtures + required: false + - value: Asset.Fixed Asset.Land + type: String + displayName: Land + required: false + - value: Asset.Fixed Asset.LeaseholdImprovements + type: String + displayName: Leasehold Improvements + required: false + - value: Asset.Fixed Asset.OtherFixedAssets + type: String + displayName: Other Fixed Assets + required: false + - value: Asset.Fixed Asset.AccumulatedAmortization + type: String + displayName: Accumulated Amortization + required: false + - value: Asset.Fixed Asset.Buildings + type: String + displayName: Buildings + required: false + - value: Asset.Fixed Asset.IntangibleAssets + type: String + displayName: Intangible Assets + required: false + - value: Asset.Fixed Asset.MachineryAndEquipment + type: String + displayName: Machinery And Equipment + required: false + - value: Asset.Fixed Asset.Vehicles + type: String + displayName: Vehicles + required: false + - value: Asset.Fixed Asset.AssetsInCourseOfConstruction + type: String + displayName: Assets In Course Of Construction + required: false + - value: Asset.Fixed Asset.CapitalWip + type: String + displayName: Capital Wip + required: false + - value: Asset.Fixed Asset.CumulativeDepreciationOnIntangibleAssets + type: String + displayName: Cumulative Depreciation On Intangible Assets + required: false + - value: Asset.Fixed Asset.IntangibleAssetsUnderDevelopment + type: String + displayName: Intangible Assets Under Development + required: false + - value: Asset.Fixed Asset.LandAsset + type: String + displayName: Land Asset + required: false + - value: Asset.Fixed Asset.NonCurrentAssets + type: String + displayName: Non Current Assets + required: false + - value: Asset.Fixed Asset.ParticipatingInterests + type: String + displayName: Participating Interests + required: false + - value: Asset.Fixed Asset.ProvisionsFixedAssets + type: String + displayName: Provisions Fixed Assets + required: false + - value: Asset.Other Asset.LeaseBuyout + type: String + displayName: Lease Buyout + required: false + - value: Asset.Other Asset.OtherLongTermAssets + type: String + displayName: Other Long Term Assets + required: false + - value: Asset.Other Asset.SecurityDeposits + type: String + displayName: Security Deposits + required: false + - value: Asset.Other Asset.AccumulatedAmortizationOfOtherAssets + type: String + displayName: Accumulated Amortization Of Other Assets + required: false + - value: Asset.Other Asset.Goodwill + type: String + displayName: Goodwill + required: false + - value: Asset.Other Asset.Licenses + type: String + displayName: Licenses + required: false + - value: Asset.Other Asset.OrganizationalCosts + type: String + displayName: Organizational Costs + required: false + - value: Asset.Other Asset.AssetsHeldForSale + type: String + displayName: Assets Held For Sale + required: false + - value: Asset.Other Asset.AvailableForSaleFinancialAssets + type: String + displayName: Available For Sale Financial Assets + required: false + - value: Asset.Other Asset.DeferredTax + type: String + displayName: Deferred Tax + required: false + - value: Asset.Other Asset.Investments + type: String + displayName: Investments + required: false + - value: Asset.Other Asset.LongTermInvestments + type: String + displayName: Long Term Investments + required: false + - value: Asset.Other Asset.LongTermLoansAndAdvancesToRelatedParties + type: String + displayName: Long Term Loans And Advances To Related Parties + required: false + - value: Asset.Other Asset.OtherIntangibleAssets + type: String + displayName: Other Intangible Assets + required: false + - value: Asset.Other Asset.OtherLongTermInvestments + type: String + displayName: Other Long Term Investments + required: false + - value: Asset.Other Asset.OtherLongTermLoansAndAdvances + type: String + displayName: Other Long Term Loans And Advances + required: false + - value: Asset.Other Asset.PrepaymentsAndAccruedIncome + type: String + displayName: Prepayments And Accrued Income + required: false + - value: Asset.Other Asset.ProvisionsNonCurrentAssets + type: String + displayName: Provisions Non-Current Assets + required: false + - value: Asset.Accounts Receivable.AccountsReceivable + type: String + displayName: Accounts Receivable + required: false + - value: Expense.Expense.AdvertisingPromotional + type: String + displayName: Advertising/Promotional + required: false + - value: Expense.Expense.BadDebts + type: String + displayName: Bad Debts + required: false + - value: Expense.Expense.BankCharges + type: String + displayName: Bank Charges + required: false + - value: Expense.Expense.CharitableContributions + type: String + displayName: Charitable Contributions + required: false + - value: Expense.Expense.CommissionsAndFees + type: String + displayName: Commissions And Fees + required: false + - value: Expense.Expense.Entertainment + type: String + displayName: Entertainment + required: false + - value: Expense.Expense.EntertainmentMeals + type: String + displayName: Entertainment Meals + required: false + - value: Expense.Expense.EquipmentRental + type: String + displayName: Equipment Rental + required: false + - value: Expense.Expense.FinanceCosts + type: String + displayName: Finance Costs + required: false + - value: Expense.Expense.GlobalTaxExpense + type: String + displayName: Global Tax Expense + required: false + - value: Expense.Expense.Insurance + type: String + displayName: Insurance + required: false + - value: Expense.Expense.InterestPaid + type: String + displayName: Interest Paid + required: false + - value: Expense.Expense.LegalProfessionalFees + type: String + displayName: Legal And Professional Fees + required: false + - value: Expense.Expense.OfficeExpenses + type: String + displayName: Office Expenses + required: false + - value: Expense.Expense.OfficeGeneralAdministrativeExpenses + type: String + displayName: Office/General Administrative Expenses + required: false + - value: Expense.Expense.OtherBusinessExpenses + type: String + displayName: Other Business Expenses + required: false + - value: Expense.Expense.OtherMiscellaneousServiceCost + type: String + displayName: Other Miscellaneous Service Cost + required: false + - value: Expense.Expense.PromotionalMeals + type: String + displayName: Promotional Meals + required: false + - value: Expense.Expense.RentOrLeaseOfBuildings + type: String + displayName: Rent Or Lease Of Buildings + required: false + - value: Expense.Expense.RepairMaintenance + type: String + displayName: Repair And Maintenance + required: false + - value: Expense.Expense.ShippingFreightDelivery + type: String + displayName: 'Shipping, Freight And Delivery' + required: false + - value: Expense.Expense.SuppliesMaterials + type: String + displayName: Supplies And Materials + required: false + - value: Expense.Expense.Travel + type: String + displayName: Travel + required: false + - value: Expense.Expense.TravelMeals + type: String + displayName: Travel Meals + required: false + - value: Expense.Expense.Utilities + type: String + displayName: Utilities + required: false + - value: Expense.Expense.Auto + type: String + displayName: Auto + required: false + - value: Expense.Expense.CostOfLabor + type: String + displayName: Cost Of Labor + required: false + - value: Expense.Expense.DuesSubscriptions + type: String + displayName: Dues And Subscriptions + required: false + - value: Expense.Expense.PayrollExpenses + type: String + displayName: Payroll Expenses + required: false + - value: Expense.Expense.TaxesPaid + type: String + displayName: Taxes Paid + required: false + - value: Expense.Expense.UnappliedCashBillPaymentExpense + type: String + displayName: Unapplied Cash Bill Payment Expense + required: false + - value: Expense.Expense.Utilities + type: String + displayName: Utilities + required: false + - value: Expense.Expense.AmortizationExpense + type: String + displayName: Amortization Expense + required: false + - value: Expense.Expense.AppropriationsToDepreciation + type: String + displayName: Appropriations To Depreciation + required: false + - value: Expense.Expense.BorrowingCost + type: String + displayName: Borrowing Cost + required: false + - value: Expense.Expense.CommissionsAndFees + type: String + displayName: Commissions And Fees + required: false + - value: Expense.Expense.DistributionCosts + type: String + displayName: Distribution Costs + required: false + - value: Expense.Expense.ExternalServices + type: String + displayName: External Services + required: false + - value: Expense.Expense.ExtraordinaryCharges + type: String + displayName: Extraordinary Charges + required: false + - value: Expense.Expense.IncomeTaxExpense + type: String + displayName: Income Tax Expense + required: false + - value: Expense.Expense.LossOnDiscontinuedOperationsNetOfTax + type: String + displayName: Loss On Discontinued Operations Net Of Tax + required: false + - value: Expense.Expense.ManagementCompensation + type: String + displayName: Management Compensation + required: false + - value: Expense.Expense.OtherCurrentOperatingCharges + type: String + displayName: Other Current Operating Charges + required: false + - value: Expense.Expense.OtherExternalServices + type: String + displayName: Other External Services + required: false + - value: Expense.Expense.OtherRentalCosts + type: String + displayName: Other Rental Costs + required: false + - value: Expense.Expense.OtherSellingExpenses + type: String + displayName: Other Selling Expenses + required: false + - value: Expense.Expense.ProjectStudiesSurveysAssessments + type: String + displayName: Project Studies Surveys Assessments + required: false + - value: Expense.Expense.PurchasesRebates + type: String + displayName: Purchases Rebates + required: false + - value: Expense.Expense.ShippingAndDeliveryExpense + type: String + displayName: Shipping And Delivery Expense + required: false + - value: Expense.Expense.StaffCosts + type: String + displayName: Staff Costs + required: false + - value: Expense.Expense.Sundry + type: String + displayName: Sundry + required: false + - value: Expense.Expense.TravelExpensesGeneralAndAdminExpenses + type: String + displayName: Travel Expenses General And Admin Expenses + required: false + - value: Expense.Expense.TravelExpensesSellingExpense + type: String + displayName: Travel Expenses Selling Expense + required: false + - value: Expense.Other Expense.Depreciation + type: String + displayName: Depreciation + required: false + - value: Expense.Other Expense.ExchangeGainOrLoss + type: String + displayName: Exchange Gain Or Loss + required: false + - value: Expense.Other Expense.OtherMiscellaneousExpense + type: String + displayName: Other Miscellaneous Expense + required: false + - value: Expense.Other Expense.PenaltiesSettlements + type: String + displayName: Penalties And Settlements + required: false + - value: Expense.Other Expense.Amortization + type: String + displayName: Amortization + required: false + - value: Expense.Other Expense.GasAndFuel + type: String + displayName: Gas And Fuel + required: false + - value: Expense.Other Expense.HomeOffice + type: String + displayName: Home Office + required: false + - value: Expense.Other Expense.HomeOwnerRentalInsurance + type: String + displayName: Home Owner Rental Insurance + required: false + - value: Expense.Other Expense.OtherHomeOfficeExpenses + type: String + displayName: Other Home Office Expenses + required: false + - value: Expense.Other Expense.MortgageInterest + type: String + displayName: Mortgage Interest + required: false + - value: Expense.Other Expense.RentAndLease + type: String + displayName: Rent And Lease + required: false + - value: Expense.Other Expense.RepairsAndMaintenance + type: String + displayName: Repairs And Maintenance + required: false + - value: Expense.Other Expense.ParkingAndTolls + type: String + displayName: Parking And Tolls + required: false + - value: Expense.Other Expense.Vehicle + type: String + displayName: Vehicle + required: false + - value: Expense.Other Expense.VehicleInsurance + type: String + displayName: Vehicle Insurance + required: false + - value: Expense.Other Expense.VehicleLease + type: String + displayName: Vehicle Lease + required: false + - value: Expense.Other Expense.VehicleLoanInterest + type: String + displayName: Vehicle Loan Interest + required: false + - value: Expense.Other Expense.VehicleLoan + type: String + displayName: Vehicle Loan + required: false + - value: Expense.Other Expense.VehicleRegistration + type: String + displayName: Vehicle Registration + required: false + - value: Expense.Other Expense.VehicleRepairs + type: String + displayName: Vehicle Repairs + required: false + - value: Expense.Other Expense.OtherVehicleExpenses + type: String + displayName: Other Vehicle Expenses + required: false + - value: Expense.Other Expense.Utilities + type: String + displayName: Utilities + required: false + - value: Expense.Other Expense.WashAndRoadServices + type: String + displayName: Wash And Road Services + required: false + - value: Expense.Other Expense.DeferredTaxExpense + type: String + displayName: Deferred Tax Expense + required: false + - value: Expense.Other Expense.Depletion + type: String + displayName: Depletion + required: false + - value: Expense.Other Expense.ExceptionalItems + type: String + displayName: Exceptional Items + required: false + - value: Expense.Other Expense.ExtraordinaryItems + type: String + displayName: Extraordinary Items + required: false + - value: Expense.Other Expense.IncomeTaxOtherExpense + type: String + displayName: Income Tax Other Expense + required: false + - value: Expense.Other Expense.MatCredit + type: String + displayName: Mat Credit + required: false + - value: Expense.Other Expense.PriorPeriodItems + type: String + displayName: Prior Period Items + required: false + - value: Expense.Other Expense.TaxRoundoffGainOrLoss + type: String + displayName: Tax Roundoff Gain Or Loss + required: false + - value: Expense.Cost of Goods Sold.EquipmentRentalCos + type: String + displayName: Equipment Rental - COS + required: false + - value: Expense.Cost of Goods Sold.OtherCostsOfServiceCos + type: String + displayName: Other Costs Of Sales - COS + required: false + - value: Expense.Cost of Goods Sold.ShippingFreightDeliveryCos + type: String + displayName: 'Shipping, Freight And Delivery - COS' + required: false + - value: Expense.Cost of Goods Sold.SuppliesMaterialsCogs + type: String + displayName: Supplies And Materials - COS + required: false + - value: Expense.Cost of Goods Sold.CostOfLaborCos + type: String + displayName: Cost Of Labor - COS + required: false + - value: Expense.Cost of Goods Sold.CostOfSales + type: String + displayName: Cost Of Sales + required: false + - value: Expense.Cost of Goods Sold.FreightAndDeliveryCost + type: String + displayName: Freight And Delivery Cost + required: false + - value: Income.Income.NonProfitIncome + type: String + displayName: Non Profit Income + required: false + - value: Income.Income.OtherPrimaryIncome + type: String + displayName: Other Primary Income + required: false + - value: Income.Income.SalesOfProductIncome + type: String + displayName: Sales Of ProductIncome + required: false + - value: Income.Income.ServiceFeeIncome + type: String + displayName: Service Fee Income + required: false + - value: Income.Income.DiscountsRefundsGiven + type: String + displayName: Discounts Refunds Given + required: false + - value: Income.Income.UnappliedCashPaymentIncome + type: String + displayName: Unapplied Cash Payment Income + required: false + - value: Income.Income.CashReceiptIncome + type: String + displayName: Cash Receipt Income + required: false + - value: Income.Income.OperatingGrants + type: String + displayName: Operating Grants + required: false + - value: Income.Income.OtherCurrentOperatingIncome + type: String + displayName: Other Current Operating Income + required: false + - value: Income.Income.OwnWorkCapitalized + type: String + displayName: Own Work Capitalized + required: false + - value: Income.Income.RevenueGeneral + type: String + displayName: Revenue General + required: false + - value: Income.Income.SalesRetail + type: String + displayName: Sales Retail + required: false + - value: Income.Income.SalesWholesale + type: String + displayName: Sales Wholesale + required: false + - value: Income.Income.SavingsByTaxScheme + type: String + displayName: Savings By Tax Scheme + required: false + - value: Income.Other Income.DividendIncome + type: String + displayName: Dividend Income + required: false + - value: Income.Other Income.InterestEarned + type: String + displayName: Interest Earned + required: false + - value: Income.Other Income.OtherInvestmentIncome + type: String + displayName: Other Investment Income + required: false + - value: Income.Other Income.OtherMiscellaneousIncome + type: String + displayName: Other Miscellaneous Income + required: false + - value: Income.Other Income.TaxExemptInterest + type: String + displayName: Tax Exempt Interest + required: false + - value: Income.Other Income.GainLossOnSaleOfFixedAssets + type: String + displayName: Gain Loss On Sale Of Fixed Assets + required: false + - value: Income.Other Income.GainLossOnSaleOfInvestments + type: String + displayName: Gain Loss On Sale Of Investments + required: false + - value: Income.Other Income.LossOnDisposalOfAssets + type: String + displayName: Loss On Disposal Of Assets + required: false + - value: Income.Other Income.OtherOperatingIncome + type: String + displayName: Other Operating Income + required: false + - value: Income.Other Income.UnrealisedLossOnSecuritiesNetOfTax + type: String + displayName: Unrealised Loss On Securities Net Of Tax + required: false + - value: Liability.Accounts Payable.AccountsPayable + type: String + displayName: Accounts Payable + required: false + - value: Liability.Accounts Payable.OutstandingDuesMicroSmallEnterprise + type: String + displayName: Outstanding Dues Micro Small Enterprise + required: false + - value: Liability.Accounts Payable.OutstandingDuesOtherThanMicroSmallEnterprise + type: String + displayName: Outstanding Dues Other Than Micro Small Enterprise + required: false + - value: Liability.Credit Card.CreditCard + type: String + displayName: Credit Card + required: false + - value: Liability.Long Term Liability.NotesPayable + type: String + displayName: Notes Payable + required: false + - value: Liability.Long Term Liability.OtherLongTermLiabilities + type: String + displayName: Other Long Term Liabilities + required: false + - value: Liability.Long Term Liability.ShareholderNotesPayable + type: String + displayName: Shareholder Notes Payable + required: false + - value: Liability.Long Term Liability.AccrualsAndDeferredIncome + type: String + displayName: Accruals And Deferred Income + required: false + - value: Liability.Long Term Liability.AccruedLongLermLiabilities + type: String + displayName: Accrued Long Lerm Liabilities + required: false + - value: Liability.Long Term Liability.AccruedVacationPayable + type: String + displayName: Accrued Vacation Payable + required: false + - value: Liability.Long Term Liability.BankLoans + type: String + displayName: Bank Loans + required: false + - value: Liability.Long Term Liability.DebtsRelatedToParticipatingInterests + type: String + displayName: Debts Related To Participating Interests + required: false + - value: Liability.Long Term Liability.DeferredTaxLiabilities + type: String + displayName: Deferred Tax Liabilities + required: false + - value: Liability.Long Term Liability.GovernmentAndOtherPublicAuthorities + type: String + displayName: Government And Other Public Authorities + required: false + - value: Liability.Long Term Liability.GroupAndAssociates + type: String + displayName: Group And Associates + required: false + - value: Liability.Long Term Liability.LiabilitiesRelatedToAssetsHeldForSale + type: String + displayName: Liabilities Related To Assets Held For Sale + required: false + - value: Liability.Long Term Liability.LongTermBorrowings + type: String + displayName: Long Term Borrowings + required: false + - value: Liability.Long Term Liability.LongTermDebit + type: String + displayName: Long Term Debit + required: false + - value: Liability.Long Term Liability.LongTermEmployeeBenefitObligations + type: String + displayName: Long Term Employee Benefit Obligations + required: false + - value: Liability.Long Term Liability.ObligationsUnderFinanceLeases + type: String + displayName: Obligations Under Finance Leases + required: false + - value: Liability.Long Term Liability.OtherLongTermProvisions + type: String + displayName: Other Long Term Provisions + required: false + - value: Liability.Long Term Liability.ProvisionForLiabilities + type: String + displayName: Provision For Liabilities + required: false + - value: Liability.Long Term Liability.ProvisionsNonCurrentLiabilities + type: String + displayName: Provisions Non Current Liabilities + required: false + - value: Liability.Long Term Liability.StaffAndRelatedLongTermLiabilityAccounts + type: String + displayName: Staff And Related Long Term Liability Accounts + required: false + - value: Liability.Other Current Liability.DirectDepositPayable + type: String + displayName: Direct Deposit Payable + required: false + - value: Liability.Other Current Liability.LineOfCredit + type: String + displayName: Line Of Credit + required: false + - value: Liability.Other Current Liability.LoanPayable + type: String + displayName: Loan Payable + required: false + - value: Liability.Other Current Liability.GlobalTaxPayable + type: String + displayName: Global Tax Payable + required: false + - value: Liability.Other Current Liability.GlobalTaxSuspense + type: String + displayName: Global Tax Suspense + required: false + - value: Liability.Other Current Liability.OtherCurrentLiabilities + type: String + displayName: Other Current Liabilities + required: false + - value: Liability.Other Current Liability.PayrollClearing + type: String + displayName: Payroll Clearing + required: false + - value: Liability.Other Current Liability.PayrollTaxPayable + type: String + displayName: Payroll Tax Payable + required: false + - value: Liability.Other Current Liability.PrepaidExpensesPayable + type: String + displayName: Prepaid Expenses Payable + required: false + - value: Liability.Other Current Liability.RentsInTrustLiability + type: String + displayName: Rents In Trust Liability + required: false + - value: Liability.Other Current Liability.TrustAccountsLiabilities + type: String + displayName: Trust Accounts Liabilities + required: false + - value: Liability.Other Current Liability.FederalIncomeTaxPayable + type: String + displayName: Federal Income Tax Payable + required: false + - value: Liability.Other Current Liability.InsurancePayable + type: String + displayName: Insurance Payable + required: false + - value: Liability.Other Current Liability.SalesTaxPayable + type: String + displayName: Sales Tax Payable + required: false + - value: Liability.Other Current Liability.StateLocalIncomeTaxPayable + type: String + displayName: State Local Income Tax Payable + required: false + - value: Liability.Other Current Liability.AccruedLiabilities + type: String + displayName: Accrued Liabilities + required: false + - value: Liability.Other Current Liability.CurrentLiabilities + type: String + displayName: Current Liabilities + required: false + - value: Liability.Other Current Liability.CurrentPortionEmployeeBenefitsObligations + type: String + displayName: Current Portion EmployeeBenefits Obligations + required: false + - value: Liability.Other Current Liability.CurrentPortionOfObligationsUnderFinanceLeases + type: String + displayName: Current Portion Of Obligations Under Finance Leases + required: false + - value: Liability.Other Current Liability.CurrentTaxLiability + type: String + displayName: Current Tax Liability + required: false + - value: Liability.Other Current Liability.DividendsPayable + type: String + displayName: Dividends Payable + required: false + - value: Liability.Other Current Liability.DutiesAndTaxes + type: String + displayName: Duties And Taxes + required: false + - value: Liability.Other Current Liability.InterestPayables + type: String + displayName: Interest Payables + required: false + - value: Liability.Other Current Liability.ProvisionForWarrantyObligations + type: String + displayName: Provision For Warranty Obligations + required: false + - value: Liability.Other Current Liability.ProvisionsCurrentLiabilities + type: String + displayName: Provisions Current Liabilities + required: false + - value: Liability.Other Current Liability.ShortTermBorrowings + type: String + displayName: Short Term Borrowings + required: false + - value: Liability.Other Current Liability.SocialSecurityAgencies + type: String + displayName: Social Security Agencies + required: false + - value: Liability.Other Current Liability.StaffAndRelatedLiabilityAccounts + type: String + displayName: Staff And Related Liability Accounts + required: false + - value: Liability.Other Current Liability.SundryDebtorsAndCreditors + type: String + displayName: Sundry Debtors And Creditors + required: false + - value: Liability.Other Current Liability.TradeAndOtherPayables + type: String + displayName: Trade And Other Payables + required: false + - value: Equity.Equity.OpeningBalanceEquity + type: String + displayName: Opening Balance Equity + required: false + - value: Equity.Equity.PartnersEquity + type: String + displayName: Partners Equity + required: false + - value: Equity.Equity.RetainedEarnings + type: String + displayName: Retained Earnings + required: false + - value: Equity.Equity.AccumulatedAdjustment + type: String + displayName: Accumulated Adjustment + required: false + - value: Equity.Equity.OwnersEquity + type: String + displayName: Owners Equity + required: false + - value: Equity.Equity.PaidInCapitalOrSurplus + type: String + displayName: Paid In Capital Or Surplus + required: false + - value: Equity.Equity.PartnerContributions + type: String + displayName: Partner Contributions + required: false + - value: Equity.Equity.PartnerDistributions + type: String + displayName: Partner Distributions + required: false + - value: Equity.Equity.PreferredStock + type: String + displayName: Preferred Stock + required: false + - value: Equity.Equity.CommonStock + type: String + displayName: Common Stock + required: false + - value: Equity.Equity.TreasuryStock + type: String + displayName: Treasury Stock + required: false + - value: Equity.Equity.EstimatedTaxes + type: String + displayName: Estimated Taxes + required: false + - value: Equity.Equity.Healthcare + type: String + displayName: Healthcare + required: false + - value: Equity.Equity.PersonalIncome + type: String + displayName: Personal Income + required: false + - value: Equity.Equity.PersonalExpense + type: String + displayName: Personal Expense + required: false + - value: Equity.Equity.AccumulatedOtherComprehensiveIncome + type: String + displayName: Accumulated Other Comprehensive Income + required: false + - value: Equity.Equity.CalledUpShareCapital + type: String + displayName: Called Up Share Capital + required: false + - value: Equity.Equity.CapitalReserves + type: String + displayName: Capital Reserves + required: false + - value: Equity.Equity.DividendDisbursed + type: String + displayName: Dividend Disbursed + required: false + - value: Equity.Equity.EquityInEarningsOfSubsiduaries + type: String + displayName: Equity In Earnings Of Subsiduaries + required: false + - value: Equity.Equity.InvestmentGrants + type: String + displayName: Investment Grants + required: false + - value: Equity.Equity.MoneyReceivedAgainstShareWarrants + type: String + displayName: Money Received Against Share Warrants + required: false + - value: Equity.Equity.OtherFreeReserves + type: String + displayName: Other Free Reserves + required: false + - value: Equity.Equity.ShareApplicationMoneyPendingAllotment + type: String + displayName: Share Application Money Pending Allotment + required: false + - value: Equity.Equity.ShareCapital + type: String + displayName: Share Capital + required: false + - value: Equity.Equity.Funds + type: String + displayName: Funds + required: false + required: true + required: true + QuickBooks Online: + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: false + validation: + warnings: [] + information: + - field: NominalCode + details: If included must have a length between 1 and 7 characters + name: + type: String + displayName: Name + description: Name of the account + required: true + validation: + warnings: + - field: Name + details: Must have a length between 1 and 100 characters + information: [] + currency: + type: String + displayName: Currency + description: The currency of the account + required: false + validation: + warnings: [] + information: + - field: Currency + details: When not specified company base currency will be used + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + options: + - value: Asset.Bank.CashOnHand + type: String + displayName: Cash On Hand + required: false + - value: Asset.Bank.Checking + type: String + displayName: Checking + required: false + - value: Asset.Bank.MoneyMarket + type: String + displayName: Money Market + required: false + - value: Asset.Bank.RentsHeldInTrust + type: String + displayName: Rents Held In Trust + required: false + - value: Asset.Bank.Savings + type: String + displayName: Savings + required: false + - value: Asset.Bank.TrustAccounts + type: String + displayName: Trust Accounts + required: false + - value: Asset.Bank.CashAndCashEquivalents + type: String + displayName: Cash And Cash Equivalents + required: false + - value: Asset.Bank.OtherEarmarkedBankAccounts + type: String + displayName: Other Earmarked Bank Accounts + required: false + - value: Asset.Other Current Asset.AllowanceForBadDebts + type: String + displayName: Allowance For Bad Debts + required: false + - value: Asset.Other Current Asset.DevelopmentCosts + type: String + displayName: Development Costs + required: false + - value: Asset.Other Current Asset.EmployeeCashAdvances + type: String + displayName: Employee Cash Advances + required: false + - value: Asset.Other Current Asset.OtherCurrentAssets + type: String + displayName: Other Current Assets + required: false + - value: Asset.Other Current Asset.Inventory + type: String + displayName: Inventory + required: false + - value: Asset.Other Current Asset.Investment_MortgageRealEstateLoans + type: String + displayName: Investment Mortgage Real Estate Loans + required: false + - value: Asset.Other Current Asset.Investment_Other + type: String + displayName: Investment Other + required: false + - value: Asset.Other Current Asset.Investment_TaxExemptSecurities + type: String + displayName: Investment Tax Exempt Securities + required: false + - value: Asset.Other Current Asset.Investment_USGovernmentObligations + type: String + displayName: Investment US Government Obligations + required: false + - value: Asset.Other Current Asset.LoansToOfficers + type: String + displayName: Loans To Officers + required: false + - value: Asset.Other Current Asset.LoansToOthers + type: String + displayName: Loans To Others + required: false + - value: Asset.Other Current Asset.LoansToStockholders + type: String + displayName: Loans To Stockholders + required: false + - value: Asset.Other Current Asset.PrepaidExpenses + type: String + displayName: Prepaid Expenses + required: false + - value: Asset.Other Current Asset.Retainage + type: String + displayName: Retainage + required: false + - value: Asset.Other Current Asset.UndepositedFunds + type: String + displayName: Undeposited Funds + required: false + - value: Asset.Other Current Asset.AssetsAvailableForSale + type: String + displayName: Assets Available For Sale + required: false + - value: Asset.Other Current Asset.BalWithGovtAuthorities + type: String + displayName: Balance With Govt Authorities + required: false + - value: Asset.Other Current Asset.CalledUpShareCapitalNotPaid + type: String + displayName: Called Up Share Capital Not Paid + required: false + - value: Asset.Other Current Asset.ExpenditureAuthorisationsAndLettersOfCredit + type: String + displayName: Expenditure Authorisations And Letters Of Credit + required: false + - value: Asset.Other Current Asset.GlobalTaxDeferred + type: String + displayName: Global Tax Deferred + required: false + - value: Asset.Other Current Asset.GlobalTaxRefund + type: String + displayName: Global Tax Refund + required: false + - value: Asset.Other Current Asset.InternalTransfers + type: String + displayName: Internal Transfers + required: false + - value: Asset.Other Current Asset.OtherConsumables + type: String + displayName: Other Consumables + required: false + - value: Asset.Other Current Asset.ProvisionsCurrentAssets + type: String + displayName: Provisions Current Assets + required: false + - value: Asset.Other Current Asset.ShortTermInvestmentsInRelatedParties + type: String + displayName: Short Term Investments In Related Parties + required: false + - value: Asset.Other Current Asset.ShortTermLoansAndAdvancesToRelatedParties + type: String + displayName: Short Term Loans And Advances To Related Parties + required: false + - value: Asset.Other Current Asset.TradeAndOtherReceivables + type: String + displayName: Trade And Other Receivables + required: false + - value: Asset.Fixed Asset.AccumulatedDepletion + type: String + displayName: Accumulated Depletion + required: false + - value: Asset.Fixed Asset.AccumulatedDepreciation + type: String + displayName: Accumulated Depreciation + required: false + - value: Asset.Fixed Asset.DepletableAssets + type: String + displayName: Depletable Assets + required: false + - value: Asset.Fixed Asset.FixedAssetComputers + type: String + displayName: Fixed Asset Computers + required: false + - value: Asset.Fixed Asset.FixedAssetCopiers + type: String + displayName: Fixed Asset Copiers + required: false + - value: Asset.Fixed Asset.FixedAssetFurniture + type: String + displayName: Fixed Asset Furniture + required: false + - value: Asset.Fixed Asset.FixedAssetPhone + type: String + displayName: Fixed Asset Phone + required: false + - value: Asset.Fixed Asset.FixedAssetPhotoVideo + type: String + displayName: Fixed Asset Photo Video + required: false + - value: Asset.Fixed Asset.FixedAssetSoftware + type: String + displayName: Fixed Asset Software + required: false + - value: Asset.Fixed Asset.FixedAssetOtherToolsEquipment + type: String + displayName: Fixed Asset Other Tools Equipment + required: false + - value: Asset.Fixed Asset.FurnitureAndFixtures + type: String + displayName: Furniture And Fixtures + required: false + - value: Asset.Fixed Asset.Land + type: String + displayName: Land + required: false + - value: Asset.Fixed Asset.LeaseholdImprovements + type: String + displayName: Leasehold Improvements + required: false + - value: Asset.Fixed Asset.OtherFixedAssets + type: String + displayName: Other Fixed Assets + required: false + - value: Asset.Fixed Asset.AccumulatedAmortization + type: String + displayName: Accumulated Amortization + required: false + - value: Asset.Fixed Asset.Buildings + type: String + displayName: Buildings + required: false + - value: Asset.Fixed Asset.IntangibleAssets + type: String + displayName: Intangible Assets + required: false + - value: Asset.Fixed Asset.MachineryAndEquipment + type: String + displayName: Machinery And Equipment + required: false + - value: Asset.Fixed Asset.Vehicles + type: String + displayName: Vehicles + required: false + - value: Asset.Fixed Asset.AssetsInCourseOfConstruction + type: String + displayName: Assets In Course Of Construction + required: false + - value: Asset.Fixed Asset.CapitalWip + type: String + displayName: Capital Wip + required: false + - value: Asset.Fixed Asset.CumulativeDepreciationOnIntangibleAssets + type: String + displayName: Cumulative Depreciation On Intangible Assets + required: false + - value: Asset.Fixed Asset.IntangibleAssetsUnderDevelopment + type: String + displayName: Intangible Assets Under Development + required: false + - value: Asset.Fixed Asset.LandAsset + type: String + displayName: Land Asset + required: false + - value: Asset.Fixed Asset.NonCurrentAssets + type: String + displayName: Non Current Assets + required: false + - value: Asset.Fixed Asset.ParticipatingInterests + type: String + displayName: Participating Interests + required: false + - value: Asset.Fixed Asset.ProvisionsFixedAssets + type: String + displayName: Provisions Fixed Assets + required: false + - value: Asset.Other Asset.LeaseBuyout + type: String + displayName: Lease Buyout + required: false + - value: Asset.Other Asset.OtherLongTermAssets + type: String + displayName: Other Long Term Assets + required: false + - value: Asset.Other Asset.SecurityDeposits + type: String + displayName: Security Deposits + required: false + - value: Asset.Other Asset.AccumulatedAmortizationOfOtherAssets + type: String + displayName: Accumulated Amortization Of Other Assets + required: false + - value: Asset.Other Asset.Goodwill + type: String + displayName: Goodwill + required: false + - value: Asset.Other Asset.Licenses + type: String + displayName: Licenses + required: false + - value: Asset.Other Asset.OrganizationalCosts + type: String + displayName: Organizational Costs + required: false + - value: Asset.Other Asset.AssetsHeldForSale + type: String + displayName: Assets Held For Sale + required: false + - value: Asset.Other Asset.AvailableForSaleFinancialAssets + type: String + displayName: Available For Sale Financial Assets + required: false + - value: Asset.Other Asset.DeferredTax + type: String + displayName: Deferred Tax + required: false + - value: Asset.Other Asset.Investments + type: String + displayName: Investments + required: false + - value: Asset.Other Asset.LongTermInvestments + type: String + displayName: Long Term Investments + required: false + - value: Asset.Other Asset.LongTermLoansAndAdvancesToRelatedParties + type: String + displayName: Long Term Loans And Advances To Related Parties + required: false + - value: Asset.Other Asset.OtherIntangibleAssets + type: String + displayName: Other Intangible Assets + required: false + - value: Asset.Other Asset.OtherLongTermInvestments + type: String + displayName: Other Long Term Investments + required: false + - value: Asset.Other Asset.OtherLongTermLoansAndAdvances + type: String + displayName: Other Long Term Loans And Advances + required: false + - value: Asset.Other Asset.PrepaymentsAndAccruedIncome + type: String + displayName: Prepayments And Accrued Income + required: false + - value: Asset.Other Asset.ProvisionsNonCurrentAssets + type: String + displayName: Provisions Non-Current Assets + required: false + - value: Asset.Accounts Receivable.AccountsReceivable + type: String + displayName: Accounts Receivable + required: false + - value: Expense.Expense.AdvertisingPromotional + type: String + displayName: Advertising/Promotional + required: false + - value: Expense.Expense.BadDebts + type: String + displayName: Bad Debts + required: false + - value: Expense.Expense.BankCharges + type: String + displayName: Bank Charges + required: false + - value: Expense.Expense.CharitableContributions + type: String + displayName: Charitable Contributions + required: false + - value: Expense.Expense.CommissionsAndFees + type: String + displayName: Commissions And Fees + required: false + - value: Expense.Expense.Entertainment + type: String + displayName: Entertainment + required: false + - value: Expense.Expense.EntertainmentMeals + type: String + displayName: Entertainment Meals + required: false + - value: Expense.Expense.EquipmentRental + type: String + displayName: Equipment Rental + required: false + - value: Expense.Expense.FinanceCosts + type: String + displayName: Finance Costs + required: false + - value: Expense.Expense.GlobalTaxExpense + type: String + displayName: Global Tax Expense + required: false + - value: Expense.Expense.Insurance + type: String + displayName: Insurance + required: false + - value: Expense.Expense.InterestPaid + type: String + displayName: Interest Paid + required: false + - value: Expense.Expense.LegalProfessionalFees + type: String + displayName: Legal And Professional Fees + required: false + - value: Expense.Expense.OfficeExpenses + type: String + displayName: Office Expenses + required: false + - value: Expense.Expense.OfficeGeneralAdministrativeExpenses + type: String + displayName: Office/General Administrative Expenses + required: false + - value: Expense.Expense.OtherBusinessExpenses + type: String + displayName: Other Business Expenses + required: false + - value: Expense.Expense.OtherMiscellaneousServiceCost + type: String + displayName: Other Miscellaneous Service Cost + required: false + - value: Expense.Expense.PromotionalMeals + type: String + displayName: Promotional Meals + required: false + - value: Expense.Expense.RentOrLeaseOfBuildings + type: String + displayName: Rent Or Lease Of Buildings + required: false + - value: Expense.Expense.RepairMaintenance + type: String + displayName: Repair And Maintenance + required: false + - value: Expense.Expense.ShippingFreightDelivery + type: String + displayName: 'Shipping, Freight And Delivery' + required: false + - value: Expense.Expense.SuppliesMaterials + type: String + displayName: Supplies And Materials + required: false + - value: Expense.Expense.Travel + type: String + displayName: Travel + required: false + - value: Expense.Expense.TravelMeals + type: String + displayName: Travel Meals + required: false + - value: Expense.Expense.Utilities + type: String + displayName: Utilities + required: false + - value: Expense.Expense.Auto + type: String + displayName: Auto + required: false + - value: Expense.Expense.CostOfLabor + type: String + displayName: Cost Of Labor + required: false + - value: Expense.Expense.DuesSubscriptions + type: String + displayName: Dues And Subscriptions + required: false + - value: Expense.Expense.PayrollExpenses + type: String + displayName: Payroll Expenses + required: false + - value: Expense.Expense.TaxesPaid + type: String + displayName: Taxes Paid + required: false + - value: Expense.Expense.UnappliedCashBillPaymentExpense + type: String + displayName: Unapplied Cash Bill Payment Expense + required: false + - value: Expense.Expense.Utilities + type: String + displayName: Utilities + required: false + - value: Expense.Expense.AmortizationExpense + type: String + displayName: Amortization Expense + required: false + - value: Expense.Expense.AppropriationsToDepreciation + type: String + displayName: Appropriations To Depreciation + required: false + - value: Expense.Expense.BorrowingCost + type: String + displayName: Borrowing Cost + required: false + - value: Expense.Expense.CommissionsAndFees + type: String + displayName: Commissions And Fees + required: false + - value: Expense.Expense.DistributionCosts + type: String + displayName: Distribution Costs + required: false + - value: Expense.Expense.ExternalServices + type: String + displayName: External Services + required: false + - value: Expense.Expense.ExtraordinaryCharges + type: String + displayName: Extraordinary Charges + required: false + - value: Expense.Expense.IncomeTaxExpense + type: String + displayName: Income Tax Expense + required: false + - value: Expense.Expense.LossOnDiscontinuedOperationsNetOfTax + type: String + displayName: Loss On Discontinued Operations Net Of Tax + required: false + - value: Expense.Expense.ManagementCompensation + type: String + displayName: Management Compensation + required: false + - value: Expense.Expense.OtherCurrentOperatingCharges + type: String + displayName: Other Current Operating Charges + required: false + - value: Expense.Expense.OtherExternalServices + type: String + displayName: Other External Services + required: false + - value: Expense.Expense.OtherRentalCosts + type: String + displayName: Other Rental Costs + required: false + - value: Expense.Expense.OtherSellingExpenses + type: String + displayName: Other Selling Expenses + required: false + - value: Expense.Expense.ProjectStudiesSurveysAssessments + type: String + displayName: Project Studies Surveys Assessments + required: false + - value: Expense.Expense.PurchasesRebates + type: String + displayName: Purchases Rebates + required: false + - value: Expense.Expense.ShippingAndDeliveryExpense + type: String + displayName: Shipping And Delivery Expense + required: false + - value: Expense.Expense.StaffCosts + type: String + displayName: Staff Costs + required: false + - value: Expense.Expense.Sundry + type: String + displayName: Sundry + required: false + - value: Expense.Expense.TravelExpensesGeneralAndAdminExpenses + type: String + displayName: Travel Expenses General And Admin Expenses + required: false + - value: Expense.Expense.TravelExpensesSellingExpense + type: String + displayName: Travel Expenses Selling Expense + required: false + - value: Expense.Other Expense.Depreciation + type: String + displayName: Depreciation + required: false + - value: Expense.Other Expense.ExchangeGainOrLoss + type: String + displayName: Exchange Gain Or Loss + required: false + - value: Expense.Other Expense.OtherMiscellaneousExpense + type: String + displayName: Other Miscellaneous Expense + required: false + - value: Expense.Other Expense.PenaltiesSettlements + type: String + displayName: Penalties And Settlements + required: false + - value: Expense.Other Expense.Amortization + type: String + displayName: Amortization + required: false + - value: Expense.Other Expense.GasAndFuel + type: String + displayName: Gas And Fuel + required: false + - value: Expense.Other Expense.HomeOffice + type: String + displayName: Home Office + required: false + - value: Expense.Other Expense.HomeOwnerRentalInsurance + type: String + displayName: Home Owner Rental Insurance + required: false + - value: Expense.Other Expense.OtherHomeOfficeExpenses + type: String + displayName: Other Home Office Expenses + required: false + - value: Expense.Other Expense.MortgageInterest + type: String + displayName: Mortgage Interest + required: false + - value: Expense.Other Expense.RentAndLease + type: String + displayName: Rent And Lease + required: false + - value: Expense.Other Expense.RepairsAndMaintenance + type: String + displayName: Repairs And Maintenance + required: false + - value: Expense.Other Expense.ParkingAndTolls + type: String + displayName: Parking And Tolls + required: false + - value: Expense.Other Expense.Vehicle + type: String + displayName: Vehicle + required: false + - value: Expense.Other Expense.VehicleInsurance + type: String + displayName: Vehicle Insurance + required: false + - value: Expense.Other Expense.VehicleLease + type: String + displayName: Vehicle Lease + required: false + - value: Expense.Other Expense.VehicleLoanInterest + type: String + displayName: Vehicle Loan Interest + required: false + - value: Expense.Other Expense.VehicleLoan + type: String + displayName: Vehicle Loan + required: false + - value: Expense.Other Expense.VehicleRegistration + type: String + displayName: Vehicle Registration + required: false + - value: Expense.Other Expense.VehicleRepairs + type: String + displayName: Vehicle Repairs + required: false + - value: Expense.Other Expense.OtherVehicleExpenses + type: String + displayName: Other Vehicle Expenses + required: false + - value: Expense.Other Expense.Utilities + type: String + displayName: Utilities + required: false + - value: Expense.Other Expense.WashAndRoadServices + type: String + displayName: Wash And Road Services + required: false + - value: Expense.Other Expense.DeferredTaxExpense + type: String + displayName: Deferred Tax Expense + required: false + - value: Expense.Other Expense.Depletion + type: String + displayName: Depletion + required: false + - value: Expense.Other Expense.ExceptionalItems + type: String + displayName: Exceptional Items + required: false + - value: Expense.Other Expense.ExtraordinaryItems + type: String + displayName: Extraordinary Items + required: false + - value: Expense.Other Expense.IncomeTaxOtherExpense + type: String + displayName: Income Tax Other Expense + required: false + - value: Expense.Other Expense.MatCredit + type: String + displayName: Mat Credit + required: false + - value: Expense.Other Expense.PriorPeriodItems + type: String + displayName: Prior Period Items + required: false + - value: Expense.Other Expense.TaxRoundoffGainOrLoss + type: String + displayName: Tax Roundoff Gain Or Loss + required: false + - value: Expense.Cost of Goods Sold.EquipmentRentalCos + type: String + displayName: Equipment Rental - COS + required: false + - value: Expense.Cost of Goods Sold.OtherCostsOfServiceCos + type: String + displayName: Other Costs Of Sales - COS + required: false + - value: Expense.Cost of Goods Sold.ShippingFreightDeliveryCos + type: String + displayName: 'Shipping, Freight And Delivery - COS' + required: false + - value: Expense.Cost of Goods Sold.SuppliesMaterialsCogs + type: String + displayName: Supplies And Materials - COS + required: false + - value: Expense.Cost of Goods Sold.CostOfLaborCos + type: String + displayName: Cost Of Labor - COS + required: false + - value: Expense.Cost of Goods Sold.CostOfSales + type: String + displayName: Cost Of Sales + required: false + - value: Expense.Cost of Goods Sold.FreightAndDeliveryCost + type: String + displayName: Freight And Delivery Cost + required: false + - value: Income.Income.NonProfitIncome + type: String + displayName: Non Profit Income + required: false + - value: Income.Income.OtherPrimaryIncome + type: String + displayName: Other Primary Income + required: false + - value: Income.Income.SalesOfProductIncome + type: String + displayName: Sales Of ProductIncome + required: false + - value: Income.Income.ServiceFeeIncome + type: String + displayName: Service Fee Income + required: false + - value: Income.Income.DiscountsRefundsGiven + type: String + displayName: Discounts Refunds Given + required: false + - value: Income.Income.UnappliedCashPaymentIncome + type: String + displayName: Unapplied Cash Payment Income + required: false + - value: Income.Income.CashReceiptIncome + type: String + displayName: Cash Receipt Income + required: false + - value: Income.Income.OperatingGrants + type: String + displayName: Operating Grants + required: false + - value: Income.Income.OtherCurrentOperatingIncome + type: String + displayName: Other Current Operating Income + required: false + - value: Income.Income.OwnWorkCapitalized + type: String + displayName: Own Work Capitalized + required: false + - value: Income.Income.RevenueGeneral + type: String + displayName: Revenue General + required: false + - value: Income.Income.SalesRetail + type: String + displayName: Sales Retail + required: false + - value: Income.Income.SalesWholesale + type: String + displayName: Sales Wholesale + required: false + - value: Income.Income.SavingsByTaxScheme + type: String + displayName: Savings By Tax Scheme + required: false + - value: Income.Other Income.DividendIncome + type: String + displayName: Dividend Income + required: false + - value: Income.Other Income.InterestEarned + type: String + displayName: Interest Earned + required: false + - value: Income.Other Income.OtherInvestmentIncome + type: String + displayName: Other Investment Income + required: false + - value: Income.Other Income.OtherMiscellaneousIncome + type: String + displayName: Other Miscellaneous Income + required: false + - value: Income.Other Income.TaxExemptInterest + type: String + displayName: Tax Exempt Interest + required: false + - value: Income.Other Income.GainLossOnSaleOfFixedAssets + type: String + displayName: Gain Loss On Sale Of Fixed Assets + required: false + - value: Income.Other Income.GainLossOnSaleOfInvestments + type: String + displayName: Gain Loss On Sale Of Investments + required: false + - value: Income.Other Income.LossOnDisposalOfAssets + type: String + displayName: Loss On Disposal Of Assets + required: false + - value: Income.Other Income.OtherOperatingIncome + type: String + displayName: Other Operating Income + required: false + - value: Income.Other Income.UnrealisedLossOnSecuritiesNetOfTax + type: String + displayName: Unrealised Loss On Securities Net Of Tax + required: false + - value: Liability.Accounts Payable.AccountsPayable + type: String + displayName: Accounts Payable + required: false + - value: Liability.Accounts Payable.OutstandingDuesMicroSmallEnterprise + type: String + displayName: Outstanding Dues Micro Small Enterprise + required: false + - value: Liability.Accounts Payable.OutstandingDuesOtherThanMicroSmallEnterprise + type: String + displayName: Outstanding Dues Other Than Micro Small Enterprise + required: false + - value: Liability.Credit Card.CreditCard + type: String + displayName: Credit Card + required: false + - value: Liability.Long Term Liability.NotesPayable + type: String + displayName: Notes Payable + required: false + - value: Liability.Long Term Liability.OtherLongTermLiabilities + type: String + displayName: Other Long Term Liabilities + required: false + - value: Liability.Long Term Liability.ShareholderNotesPayable + type: String + displayName: Shareholder Notes Payable + required: false + - value: Liability.Long Term Liability.AccrualsAndDeferredIncome + type: String + displayName: Accruals And Deferred Income + required: false + - value: Liability.Long Term Liability.AccruedLongLermLiabilities + type: String + displayName: Accrued Long Lerm Liabilities + required: false + - value: Liability.Long Term Liability.AccruedVacationPayable + type: String + displayName: Accrued Vacation Payable + required: false + - value: Liability.Long Term Liability.BankLoans + type: String + displayName: Bank Loans + required: false + - value: Liability.Long Term Liability.DebtsRelatedToParticipatingInterests + type: String + displayName: Debts Related To Participating Interests + required: false + - value: Liability.Long Term Liability.DeferredTaxLiabilities + type: String + displayName: Deferred Tax Liabilities + required: false + - value: Liability.Long Term Liability.GovernmentAndOtherPublicAuthorities + type: String + displayName: Government And Other Public Authorities + required: false + - value: Liability.Long Term Liability.GroupAndAssociates + type: String + displayName: Group And Associates + required: false + - value: Liability.Long Term Liability.LiabilitiesRelatedToAssetsHeldForSale + type: String + displayName: Liabilities Related To Assets Held For Sale + required: false + - value: Liability.Long Term Liability.LongTermBorrowings + type: String + displayName: Long Term Borrowings + required: false + - value: Liability.Long Term Liability.LongTermDebit + type: String + displayName: Long Term Debit + required: false + - value: Liability.Long Term Liability.LongTermEmployeeBenefitObligations + type: String + displayName: Long Term Employee Benefit Obligations + required: false + - value: Liability.Long Term Liability.ObligationsUnderFinanceLeases + type: String + displayName: Obligations Under Finance Leases + required: false + - value: Liability.Long Term Liability.OtherLongTermProvisions + type: String + displayName: Other Long Term Provisions + required: false + - value: Liability.Long Term Liability.ProvisionForLiabilities + type: String + displayName: Provision For Liabilities + required: false + - value: Liability.Long Term Liability.ProvisionsNonCurrentLiabilities + type: String + displayName: Provisions Non Current Liabilities + required: false + - value: Liability.Long Term Liability.StaffAndRelatedLongTermLiabilityAccounts + type: String + displayName: Staff And Related Long Term Liability Accounts + required: false + - value: Liability.Other Current Liability.DirectDepositPayable + type: String + displayName: Direct Deposit Payable + required: false + - value: Liability.Other Current Liability.LineOfCredit + type: String + displayName: Line Of Credit + required: false + - value: Liability.Other Current Liability.LoanPayable + type: String + displayName: Loan Payable + required: false + - value: Liability.Other Current Liability.GlobalTaxPayable + type: String + displayName: Global Tax Payable + required: false + - value: Liability.Other Current Liability.GlobalTaxSuspense + type: String + displayName: Global Tax Suspense + required: false + - value: Liability.Other Current Liability.OtherCurrentLiabilities + type: String + displayName: Other Current Liabilities + required: false + - value: Liability.Other Current Liability.PayrollClearing + type: String + displayName: Payroll Clearing + required: false + - value: Liability.Other Current Liability.PayrollTaxPayable + type: String + displayName: Payroll Tax Payable + required: false + - value: Liability.Other Current Liability.PrepaidExpensesPayable + type: String + displayName: Prepaid Expenses Payable + required: false + - value: Liability.Other Current Liability.RentsInTrustLiability + type: String + displayName: Rents In Trust Liability + required: false + - value: Liability.Other Current Liability.TrustAccountsLiabilities + type: String + displayName: Trust Accounts Liabilities + required: false + - value: Liability.Other Current Liability.FederalIncomeTaxPayable + type: String + displayName: Federal Income Tax Payable + required: false + - value: Liability.Other Current Liability.InsurancePayable + type: String + displayName: Insurance Payable + required: false + - value: Liability.Other Current Liability.SalesTaxPayable + type: String + displayName: Sales Tax Payable + required: false + - value: Liability.Other Current Liability.StateLocalIncomeTaxPayable + type: String + displayName: State Local Income Tax Payable + required: false + - value: Liability.Other Current Liability.AccruedLiabilities + type: String + displayName: Accrued Liabilities + required: false + - value: Liability.Other Current Liability.CurrentLiabilities + type: String + displayName: Current Liabilities + required: false + - value: Liability.Other Current Liability.CurrentPortionEmployeeBenefitsObligations + type: String + displayName: Current Portion EmployeeBenefits Obligations + required: false + - value: Liability.Other Current Liability.CurrentPortionOfObligationsUnderFinanceLeases + type: String + displayName: Current Portion Of Obligations Under Finance Leases + required: false + - value: Liability.Other Current Liability.CurrentTaxLiability + type: String + displayName: Current Tax Liability + required: false + - value: Liability.Other Current Liability.DividendsPayable + type: String + displayName: Dividends Payable + required: false + - value: Liability.Other Current Liability.DutiesAndTaxes + type: String + displayName: Duties And Taxes + required: false + - value: Liability.Other Current Liability.InterestPayables + type: String + displayName: Interest Payables + required: false + - value: Liability.Other Current Liability.ProvisionForWarrantyObligations + type: String + displayName: Provision For Warranty Obligations + required: false + - value: Liability.Other Current Liability.ProvisionsCurrentLiabilities + type: String + displayName: Provisions Current Liabilities + required: false + - value: Liability.Other Current Liability.ShortTermBorrowings + type: String + displayName: Short Term Borrowings + required: false + - value: Liability.Other Current Liability.SocialSecurityAgencies + type: String + displayName: Social Security Agencies + required: false + - value: Liability.Other Current Liability.StaffAndRelatedLiabilityAccounts + type: String + displayName: Staff And Related Liability Accounts + required: false + - value: Liability.Other Current Liability.SundryDebtorsAndCreditors + type: String + displayName: Sundry Debtors And Creditors + required: false + - value: Liability.Other Current Liability.TradeAndOtherPayables + type: String + displayName: Trade And Other Payables + required: false + - value: Equity.Equity.OpeningBalanceEquity + type: String + displayName: Opening Balance Equity + required: false + - value: Equity.Equity.PartnersEquity + type: String + displayName: Partners Equity + required: false + - value: Equity.Equity.RetainedEarnings + type: String + displayName: Retained Earnings + required: false + - value: Equity.Equity.AccumulatedAdjustment + type: String + displayName: Accumulated Adjustment + required: false + - value: Equity.Equity.OwnersEquity + type: String + displayName: Owners Equity + required: false + - value: Equity.Equity.PaidInCapitalOrSurplus + type: String + displayName: Paid In Capital Or Surplus + required: false + - value: Equity.Equity.PartnerContributions + type: String + displayName: Partner Contributions + required: false + - value: Equity.Equity.PartnerDistributions + type: String + displayName: Partner Distributions + required: false + - value: Equity.Equity.PreferredStock + type: String + displayName: Preferred Stock + required: false + - value: Equity.Equity.CommonStock + type: String + displayName: Common Stock + required: false + - value: Equity.Equity.TreasuryStock + type: String + displayName: Treasury Stock + required: false + - value: Equity.Equity.EstimatedTaxes + type: String + displayName: Estimated Taxes + required: false + - value: Equity.Equity.Healthcare + type: String + displayName: Healthcare + required: false + - value: Equity.Equity.PersonalIncome + type: String + displayName: Personal Income + required: false + - value: Equity.Equity.PersonalExpense + type: String + displayName: Personal Expense + required: false + - value: Equity.Equity.AccumulatedOtherComprehensiveIncome + type: String + displayName: Accumulated Other Comprehensive Income + required: false + - value: Equity.Equity.CalledUpShareCapital + type: String + displayName: Called Up Share Capital + required: false + - value: Equity.Equity.CapitalReserves + type: String + displayName: Capital Reserves + required: false + - value: Equity.Equity.DividendDisbursed + type: String + displayName: Dividend Disbursed + required: false + - value: Equity.Equity.EquityInEarningsOfSubsiduaries + type: String + displayName: Equity In Earnings Of Subsiduaries + required: false + - value: Equity.Equity.InvestmentGrants + type: String + displayName: Investment Grants + required: false + - value: Equity.Equity.MoneyReceivedAgainstShareWarrants + type: String + displayName: Money Received Against Share Warrants + required: false + - value: Equity.Equity.OtherFreeReserves + type: String + displayName: Other Free Reserves + required: false + - value: Equity.Equity.ShareApplicationMoneyPendingAllotment + type: String + displayName: Share Application Money Pending Allotment + required: false + - value: Equity.Equity.ShareCapital + type: String + displayName: Share Capital + required: false + - value: Equity.Equity.Funds + type: String + displayName: Funds + required: false + required: true + required: true + Sage Business Cloud Accounting: + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + name: + type: String + displayName: Name + description: Name of the account + required: true + validation: + warnings: [] + information: + - field: Name + details: Should not be longer than 200 characters. + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + validation: + warnings: [] + information: + - field: NominalCode + details: Should be a number between 1 and 99999999. + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + options: + - value: SALES + type: String + displayName: Sales + required: false + - value: OTHER_INCOME + type: String + displayName: Other Income + required: false + - value: DIRECT_EXPENSES + type: String + displayName: Direct Expenses + required: false + - value: OVERHEADS + type: String + displayName: Overheads + required: false + - value: DEPRECIATION + type: String + displayName: Depreciation + required: false + - value: CURRENT_ASSETS + type: String + displayName: Current Assets + required: false + - value: FIXED_ASSETS + type: String + displayName: Fixed Assets + required: false + - value: FUTURE_ASSETS + type: String + displayName: Future Assets + required: false + - value: BANK + type: String + displayName: Bank + required: false + - value: CURRENT_LIABILITY + type: String + displayName: Current Liability + required: false + - value: FUTURE_LIABILITY + type: String + displayName: Future Liability + required: false + - value: EQUITY + type: String + displayName: Equity + required: false + - value: LINE_OF_CREDIT + type: String + displayName: Credit Card / Loan + required: false + required: true + required: true + Sage Intacct: + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + validation: + warnings: + - field: NominalCode + details: Must be unique within the entity. + - field: NominalCode + details: 'Must be at most 24 characters in length, although restrictions may vary between entities.' + information: [] + name: + type: String + displayName: Name + description: Name of the account + required: true + status: + type: String + displayName: Account Status + description: The status of the account + options: + - value: Active + type: String + displayName: Active + required: false + - value: Archived + type: String + displayName: Archived + required: false + required: true + type: + type: String + displayName: Account Type + description: 'The type, or base category, of the account' + options: + - value: Asset + type: String + displayName: Asset + required: false + - value: Equity + type: String + displayName: Equity + required: false + - value: Expense + type: String + displayName: Expense + required: false + - value: Income + type: String + displayName: Income + required: false + - value: Liability + type: String + displayName: Liability + required: false + required: true + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + required: true + validation: + warnings: [] + information: + - field: FullyQualifiedCategory + details: 'Any category that is part of the hierarchy of one of: ''Assets'', ''Equity'', ''Liabilities'', ''Total Expenses'' and ''Total Income'' is permitted.' + required: true + Sandbox: + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + name: + type: String + displayName: Name + description: Name of the account + required: true + description: + type: String + displayName: Description + description: Description of the account + required: true + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + required: true + fullyQualifiedName: + type: String + displayName: Fully Qualified Name + description: The full name of the account e.g. Liability.Current.VAT or Income.Revenue.Sales + required: true + currency: + type: String + displayName: Currency + description: The currency of the account + required: true + currentBalance: + type: Number + displayName: Current Balance + description: The current balance in the account + required: true + type: + type: String + displayName: Account Type + description: 'The type, or base category, of the account' + required: true + status: + type: String + displayName: Account Status + description: The status of the account + required: true + isBankAccount: + type: Boolean + displayName: Is Bank Account? + description: Confirms whether the nominal account represents a bank account or not + required: true + validDatatypeLinks: + type: Array + displayName: Valid Datatype Links + description: Describes which fields on other data types are valid links to this account in the originating system + properties: + property: + type: String + displayName: Property + description: The field on the source data type that other data types can link to + required: true + links: + type: Array + displayName: Links + description: 'A collection of absolute names of fields from other data types, e.g. Invoice.LineItems.AccountRef.Id' + required: true + required: true + metadata: + type: Object + displayName: Metadata + description: Miscellaneous data about the item + properties: + isDeleted: + type: Boolean + displayName: IsDeleted + description: A boolean to indicate whether the object has been deleted + required: true + required: true + required: true + Xero: + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: Identifier for the nominal account. + required: true + validation: + warnings: + - field: NominalCode + details: Max length of 10 characters. + information: [] + name: + type: String + displayName: Name + description: Name of account as it appears in the chart of accounts or general ledger. + required: true + validation: + warnings: [] + information: + - field: Name + details: Payments are enabled to this account if the name ends in .PaymentsEnabled. + description: + type: String + displayName: Description + description: Description for the nominal account. + required: false + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: Account type and category for nominal account. + options: + - value: Asset.Current + type: String + displayName: Current Asset + required: false + - value: Asset.Fixed + type: String + displayName: Fixed Asset + required: false + - value: Asset.Inventory + type: String + displayName: Inventory + required: false + - value: Asset.NonCurrent + type: String + displayName: Non-current Asset + required: false + - value: Asset.Prepayment + type: String + displayName: Prepayment + required: false + - value: Expense.DirectCosts + type: String + displayName: Direct Costs + required: false + - value: Expense.Expense + type: String + displayName: Expense + required: false + - value: Expense.Overhead + type: String + displayName: Overhead + required: false + - value: Expense.Superannuation + type: String + displayName: Superannuation + required: false + - value: Expense.Wages + type: String + displayName: Wages + required: false + - value: Income.Sales + type: String + displayName: Sales + required: false + - value: Income.Revenue + type: String + displayName: Revenue + required: false + - value: Income.Other + type: String + displayName: Other Income + required: false + - value: Liability.Current + type: String + displayName: Current Liability + required: false + - value: Liability.Depreciation + type: String + displayName: Depreciation + required: false + - value: Liability.Liability + type: String + displayName: Liability + required: false + - value: Liability.NonCurrent + type: String + displayName: Non Current Liability + required: false + - value: Liability.PayAsYouGo + type: String + displayName: Pay As You Go Liability + required: false + - value: Liability.Superannuation + type: String + displayName: Superannuation Liability + required: false + - value: Liability.WagesPayable + type: String + displayName: Wages Payable Liability + required: false + - value: Equity.Equity + type: String + displayName: Equity + required: false + required: true + required: true + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + operationId: get-create-chartOfAccounts-model + description: |- + The *Get create account model* endpoint returns the expected data for the request payload when creating an [account](https://docs.codat.io/sync-for-expenses-api#/schemas/Account) for a given company and integration. + + [Accounts](https://docs.codat.io/sync-for-expenses-api#/schemas/Account) are the categories a business uses to record accounting transactions. + + **Integration-specific behavior** + + See the *response examples* for integration-specific indicative models. + '/companies/{companyId}/connections/{connectionId}/push/bankAccounts': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/connectionId' + post: + tags: + - Bank accounts + parameters: + - $ref: '#/components/parameters/timeoutInMinutes' + - $ref: '#/components/parameters/allowSyncOnPushComplete' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BankAccount' + examples: + QuickBooks Online: + value: + accountName: GBP Bank Account + accountType: Debit + accountNumber: '12345678' + currency: GBP + status: Active + Xero: + value: + accountName: Xero GBP Bank Account + accountType: Debit + sortCode: '445566' + accountNumber: '12345678' + currency: GBP + status: Active + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CreateBankAccountResponse' + examples: {} + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + summary: Create bank account + description: "The *Create bank account* endpoint creates a new [bank account](https://docs.codat.io/sync-for-expenses-api#/schemas/BankAccount) for a given company's connection.\r\n\r\n[Bank accounts](https://docs.codat.io/sync-for-expenses-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.\r\n\r\n**Integration-specific behavior**\r\n\r\nRequired data may vary by integration. To see what data to post, first call [Get create/update bank account model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-bankAccounts-model)." + operationId: create-bank-account + '/companies/{companyId}/connections/{connectionId}/options/bankAccounts': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/connectionId' + get: + summary: Get create bank account model + tags: + - Bank accounts + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/PushOption' + examples: + Dynamics 365 Business Central: + value: + type: Object + displayName: Bank Account + description: An account that bank transactions may be recorded against + properties: + accountName: + type: String + displayName: Name + description: The name of the bank account in the originating system + required: true + validation: + warnings: [] + information: + - field: AccountName + details: 'Needs to be of the format ''{No.}-{Name}''' + currency: + type: String + displayName: Currency + description: The currency of the bank account + required: true + accountNumber: + type: String + displayName: Account Number + description: The account number for the bank account + required: false + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: false + validation: + warnings: [] + information: + - field: NominalCode + details: Bank Account Posting Group with Nominal Account must exist + sortCode: + type: String + displayName: Sort Code + description: The sort code for the bank account + required: false + validation: + warnings: [] + information: + - field: SortCode + details: Must have a length between 0 and 20 characters + iBan: + type: String + displayName: IBAN + description: The international bank account number of the account. Often used when making or receiving international payments + required: false + overdraftLimit: + type: Number + displayName: Overdraft Limit + description: The pre-arranged overdraft limit of the account + required: false + validation: + warnings: [] + information: + - field: OverdraftLimit + details: Default value is 0 + required: true + Exact (Netherlands): + value: + type: Object + displayName: Bank Account + description: An account that bank transactions may be recorded against + properties: + accountName: + type: String + displayName: Name + description: The name of the bank account in the originating system + required: true + accountNumber: + type: String + displayName: Account Number + description: The account number for the bank account + required: true + validation: + warnings: + - field: AccountNumber + details: Should not exceed the maximum length of 14 characters if the specified currency is GBP. + information: [] + sortCode: + type: String + displayName: Sort Code + description: The sort code for the bank account + required: false + validation: + warnings: + - field: SortCode + details: Must be 6 characters long if the specified currency is GBP. + - field: SortCode + details: Must be provided if the specified currency is GBP. + information: [] + currency: + type: String + displayName: Currency + description: The currency of the bank account + required: false + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: false + required: true + Exact (UK): + value: + type: Object + displayName: Bank Account + description: An account that bank transactions may be recorded against + properties: + accountName: + type: String + displayName: Name + description: The name of the bank account in the originating system + required: true + accountNumber: + type: String + displayName: Account Number + description: The account number for the bank account + required: true + validation: + warnings: - field: AccountNumber details: Should not exceed the maximum length of 14 characters if the specified currency is GBP. information: [] @@ -2164,34 +6780,1250 @@ paths: '503': $ref: '#/components/responses/Service-Unavailable' operationId: get-create-bankAccounts-model - description: "The *Get create/update bank account model* endpoint returns the expected data for the request payload when creating and updating a [bank account](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) for a given company and integration.\r\n\r\n[Bank accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.\r\n\r\n**Integration-specific behavior**\r\n\r\nSee the *response examples* for integration-specific indicative models.\r\n" - '/companies/{companyId}/connections/{connectionId}/push/bankAccounts': + description: "The *Get create/update bank account model* endpoint returns the expected data for the request payload when creating and updating a [bank account](https://docs.codat.io/sync-for-expenses-api#/schemas/BankAccount) for a given company and integration.\r\n\r\n[Bank accounts](https://docs.codat.io/sync-for-expenses-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.\r\n\r\n**Integration-specific behavior**\r\n\r\nSee the *response examples* for integration-specific indicative models.\r\n" + '/companies/{companyId}/data/customers': parameters: - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - post: - x-internal: true + get: tags: - - Bank accounts - summary: Create bank account + - Customers + summary: List customers parameters: - - $ref: '#/components/parameters/timeoutInMinutes' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/BankAccounts/allOf/0/properties/results/items/definitions/bankAccountPrototype' - examples: {} + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + - $ref: '#/components/parameters/query' + - $ref: '#/components/parameters/orderBy' responses: '200': description: Success content: application/json: schema: - $ref: '#/components/schemas/BankAccounts/allOf/0/properties/results/items/definitions/bankAccountCreateResponse' - examples: {} + $ref: '#/components/schemas/Customers' + examples: + Clear Books: + value: + results: + - id: c8180244-74ac-40cf-a5df-6d83661c44d7 + customerName: Arjun Kuvalis + contactName: Werner Langworth + emailAddress: Arjun34@hotmail.com + defaultCurrency: GBP + phone: 014605 64820 + addresses: + - type: Delivery + line1: Suite 214 + line2: 8439 Lueilwitz Passage + city: Fernandohaven + region: Northern Ireland + country: United Kingdom + postalCode: JG04 7PV + - type: Delivery + line1: Suite 096 + line2: 864 Halie Course + city: Juliochester + region: England + country: United Kingdom + postalCode: DZ8 4BF + - type: Delivery + line1: Suite 001 + line2: 416 Stokes Fords + city: Naderborough + region: Wales + country: United Kingdom + postalCode: XG25 0XX + contacts: + - name: Werner Langworth + email: Werner_Langworth@hotmail.com + phone: [] + address: + type: Delivery + line1: Apt. 145 + line2: 317 Williamson Freeway + city: Hortenseville + region: Scotland + country: United Kingdom + postalCode: CV4 2HR + status: Active + - name: Belle Glover + email: Belle51@yahoo.com + phone: [] + address: + type: Delivery + line1: Suite 075 + line2: 9921 Dickens Walk + city: South Ali + region: Scotland + country: United Kingdom + postalCode: TI04 4OO + status: Active + registrationNumber: NI7JEJVM + taxNumber: '7505220209.583549' + status: Active + modifiedDate: '2023-04-26T12:38:16Z' + sourceModifiedDate: '2022-07-03T01:27:00' + metadata: + isDeleted: false + - id: 6d162ee4-47b4-46c6-a2e6-aa9edd0fe6b0 + customerName: 'Breitenberg, Emard and Schiller' + contactName: Miguel Hahn + emailAddress: contact@BreitenbergEmardandSchiller.biz + defaultCurrency: GBP + phone: 0800 445 6957 + addresses: + - type: Billing + line1: Apt. 184 + line2: 60578 Louie Springs + city: East Khalid + region: Wales + country: United Kingdom + postalCode: XW89 7NT + contacts: + - name: Miguel Hahn + email: Miguel.Hahn@gmail.com + phone: + - number: 018555 09614 + type: Landline + address: + type: Delivery + line1: Suite 400 + line2: 21930 Milan Lane + city: Reingerton + region: Wales + country: United Kingdom + postalCode: QG10 2DL + status: Active + registrationNumber: KME0AMIL + taxNumber: '8560920952.553111' + status: Archived + modifiedDate: '2023-04-26T12:38:16Z' + sourceModifiedDate: '2022-12-03T11:05:01' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 20 + _links: + current: + href: /companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/customers?page=1&pageSize=2 + self: + href: /companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/customers + next: + href: /companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/customers?page=2&pageSize=2 + Dynamics 365 Business Central: + value: + results: + - id: 0e2f7751-7696-ed11-bff5-6045bd0d2ad6 + customerName: '' + contactName: '' + emailAddress: '' + defaultCurrency: GBP + phone: '' + addresses: + - type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: '' + postalCode: '' + contacts: + - name: '' + email: '' + phone: [] + address: + type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: '' + postalCode: '' + status: Active + taxNumber: '' + status: Active + modifiedDate: '2023-03-27T14:21:25Z' + sourceModifiedDate: '2023-01-17T14:50:54Z' + metadata: + isDeleted: false + - id: 0ef95175-48c4-eb11-9f0a-0022481b4343 + customerName: '' + contactName: '' + emailAddress: '' + defaultCurrency: GBP + phone: '' + addresses: + - type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: GB + postalCode: '' + contacts: + - name: '' + email: '' + phone: [] + address: + type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: GB + postalCode: '' + status: Active + taxNumber: '' + status: Active + modifiedDate: '2023-03-27T14:21:25Z' + sourceModifiedDate: '2021-06-03T08:48:36Z' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 42 + _links: + current: + href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/data/customers?page=1&pageSize=2 + self: + href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/data/customers + next: + href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/data/customers?page=2&pageSize=2 + Exact (Netherlands): + value: + results: + - id: 555f8251-c65a-433a-a813-5dbe04321d1e + customerName: Ab Netherlands + defaultCurrency: EUR + addresses: + - type: Billing + country: NL + contacts: [] + status: Active + modifiedDate: '2022-10-26T13:32:05Z' + sourceModifiedDate: '2021-06-14T15:26:37Z' + - id: 9fd1f78e-67aa-4af7-8a10-df1fc5fb5841 + customerName: anna test 2 + defaultCurrency: EUR + addresses: + - type: Billing + country: NL + contacts: [] + status: Active + modifiedDate: '2022-10-26T13:32:05Z' + sourceModifiedDate: '2022-05-24T11:53:21Z' + pageNumber: 1 + pageSize: 2 + totalResults: 71 + _links: + current: + href: /companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/customers?page=1&pageSize=2 + self: + href: /companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/customers + next: + href: /companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/customers?page=2&pageSize=2 + Exact (UK): + value: + results: + - id: 5f20075a-a28e-434d-81a6-2db0dc170e87 + customerName: Abdi 99 + emailAddress: email@codat.io + defaultCurrency: GBP + addresses: + - type: Billing + line1: Ink Rooms + city: London + country: GB + postalCode: WC1X 0BE + contacts: [] + registrationNumber: '123456789' + taxNumber: GB339 0727 47 + status: Active + modifiedDate: '2022-10-26T13:33:08Z' + sourceModifiedDate: '2020-02-26T11:23:50Z' + - id: 1d9dc1a7-92d6-441b-93fd-42c9fb321b1c + customerName: Abdulbasit Al-haj + contactName: abeee + emailAddress: a.alhaj@codat.io + defaultCurrency: GBP + addresses: + - type: Billing + country: GB + contacts: + - name: abeee + phone: [] + address: + type: Unknown + line1: '' + country: 'GB ' + status: Active + modifiedDate: '2020-02-24T12:00:51.027Z' + status: Active + modifiedDate: '2022-10-26T13:33:08Z' + sourceModifiedDate: '2020-02-24T12:00:50Z' + pageNumber: 1 + pageSize: 2 + totalResults: 53 + _links: + current: + href: /companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/customers?page=1&pageSize=2 + self: + href: /companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/customers + next: + href: /companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/customers?page=2&pageSize=2 + FreeAgent: + value: + results: + - id: '11526230' + customerName: '-' + contactName: Test 1 + addresses: + - type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + contacts: + - name: Test 1 + phone: [] + address: + type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + status: Unknown + status: Active + modifiedDate: '2023-04-25T14:19:12Z' + sourceModifiedDate: '2023-04-17T06:02:46Z' + metadata: + isDeleted: false + - id: '9677150' + customerName: '-' + contactName: Test 1 + addresses: + - type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + contacts: + - name: Test 1 + phone: [] + address: + type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + status: Unknown + status: Active + modifiedDate: '2023-04-25T14:19:12Z' + sourceModifiedDate: '2023-04-24T06:19:23Z' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 159 + _links: + current: + href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/data/customers?page=1&pageSize=2 + self: + href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/data/customers + next: + href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/data/customers?page=2&pageSize=2 + FreshBooks: + value: + results: + - id: '634509' + customerName: A test customer 14 (updated) + contactName: test person name + emailAddress: test14@example.com + defaultCurrency: GBP + phone: 01876 541245 + addresses: + - type: Billing + line1: Line 1 + line2: Line 2 + city: Some city + region: A region + country: Country 1 + postalCode: SW1 2JQ + contacts: + - name: test person1 + email: test14A@example.com + phone: + - number: '24681012' + type: Primary + - number: '121086420' + type: Unknown + status: Active + - name: test person2 + email: test14B@example.com + phone: + - number: 1234 56789 + type: Primary + - number: 9876 54321 + type: Unknown + status: Active + - name: test person name + email: test14@example.com + phone: + - number: 01876 541245 + type: Unknown + status: Active + status: Active + modifiedDate: '2023-03-24T16:07:23Z' + sourceModifiedDate: '2022-05-18T09:23:56' + metadata: + isDeleted: false + - id: '634486' + customerName: A test customer name 2 + contactName: test person name + emailAddress: test8@example.com + defaultCurrency: GBP + phone: 01876 541245 + addresses: + - type: Billing + line1: Line 1 + line2: Line 2 + city: Some city + region: A region + country: Country 1 + postalCode: SW1 2JQ + contacts: + - name: test person1 + email: test9@example.com + phone: + - number: '24681012' + type: Primary + - number: '121086420' + type: Unknown + status: Active + - name: test person2 + email: test10@example.com + phone: + - number: '123456789' + type: Primary + - number: '987654321' + type: Unknown + status: Active + - name: test person name + email: test8@example.com + phone: + - number: 01876 541245 + type: Unknown + status: Active + status: Active + modifiedDate: '2023-03-24T16:07:23Z' + sourceModifiedDate: '2022-05-11T11:39:58' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 39 + _links: + current: + href: /companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/customers?page=1&pageSize=2 + self: + href: /companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/customers + next: + href: /companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/customers?page=2&pageSize=2 + KashFlow: + value: + results: + - id: '92227673' + customerName: Chekko Customer Test 01 + contactName: '' + emailAddress: '' + phone: '' + addresses: [] + contacts: + - name: '' + email: '' + phone: [] + status: Active + taxNumber: '' + status: Active + modifiedDate: '2022-09-30T10:29:15Z' + sourceModifiedDate: '0001-01-01T00:00:00' + - id: '88459410' + customerName: Diogo Sousa + contactName: Mr Diogo Sousa + emailAddress: diogomail@mail.com + phone: '123123123' + addresses: + - type: Billing + line1: Billing Address + line2: Billing line 2 Billing line 3 + city: Billing line 4 + country: United Kingdom + postalCode: '123321' + - type: Delivery + line1: Delivery Address + line2: Delivery line2 Delivery line3 + city: Delivery line4 + country: United Kingdom + postalCode: '123321' + contacts: + - name: Mr Diogo Sousa + email: diogomail@mail.com + phone: + - number: '123123123' + type: Landline + - number: '321321321' + type: Mobile + address: + type: Billing + line1: Billing Address + line2: Billing line 2 Billing line 3 + city: Billing line 4 + country: United Kingdom + postalCode: '123321' + status: Active + - name: Mr Diogo Sousa + phone: [] + address: + type: Delivery + line1: Delivery Address + line2: Delivery line2 Delivery line3 + city: Delivery line4 + country: United Kingdom + postalCode: '123321' + status: Active + taxNumber: '' + status: Active + modifiedDate: '2022-09-30T10:29:15Z' + sourceModifiedDate: '2021-05-04T13:22:19' + pageNumber: 1 + pageSize: 2 + totalResults: 10 + _links: + current: + href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/data/customers?page=1&pageSize=2 + self: + href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/data/customers + next: + href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/data/customers?page=2&pageSize=2 + Oracle NetSuite: + value: + results: + - id: '773' + customerName: 119 Test Customer + contactName: Mr Test Customer + defaultCurrency: GBP + addresses: [] + contacts: [] + status: Active + modifiedDate: '2023-01-30T14:48:02Z' + sourceModifiedDate: '2022-01-11T12:28:49' + - id: '172722' + customerName: 1248 European Company + contactName: European Company + defaultCurrency: GBP + addresses: [] + contacts: [] + status: Active + modifiedDate: '2023-01-30T14:48:02Z' + sourceModifiedDate: '2022-07-27T14:29:16' + pageNumber: 1 + pageSize: 2 + totalResults: 4 + _links: + current: + href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/customers?page=1&pageSize=2 + self: + href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/customers + next: + href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/customers?page=2&pageSize=2 + QuickBooks Desktop: + value: + results: + - id: 150000-933272658 + customerName: 'Abercrombie, Kristy' + contactName: Kristy Abercrombie + emailAddress: kristy@samplename.com + defaultCurrency: GBP + phone: 415-555-6579 + addresses: + - type: Delivery + line1: Kristy Abercrombie + line2: 5647 Cypress Hill Rd + city: Bayshore + region: CA + postalCode: '94326' + - type: Billing + line1: Kristy Abercrombie + line2: 5647 Cypress Hill Rd + city: Bayshore + region: CA + postalCode: '94326' + contacts: + - name: 'Abercrombie, Kristy' + email: kristy@samplename.com + phone: + - number: 415-555-6579 + type: Primary + status: Active + - name: Kristy Abercrombie + phone: [] + status: Active + - name: Steve Darcangelo + phone: [] + status: Active + status: Active + modifiedDate: '2023-04-26T09:07:55Z' + sourceModifiedDate: '2023-12-16T05:06:42' + metadata: + isDeleted: false + - id: 800000D0-1182061376 + customerName: 'Allard, Robert' + contactName: Amanda Roberts + emailAddress: rallard@myemail.com + defaultCurrency: GBP + phone: 650-555-3422 + addresses: + - type: Delivery + line1: Robert Allard + line2: 92834 Chandler St. + city: Millbrae + region: CA + postalCode: '94030' + - type: Billing + line1: Robert Allard + line2: 92834 Chandler St. + city: Millbrae + region: CA + postalCode: '94030' + contacts: + - name: 'Allard, Robert' + email: rallard@myemail.com + phone: + - number: 650-555-3422 + type: Primary + - number: 650-555-9804 + type: Fax + - number: 650-555-8349 + type: Unknown + status: Active + - name: Robert Allard + phone: [] + status: Active + - name: Rachel Fisher + phone: [] + status: Active + status: Active + modifiedDate: '2023-04-26T09:07:55Z' + sourceModifiedDate: '2023-12-16T05:06:42' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 64 + _links: + current: + href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/customers?page=1&pageSize=2 + self: + href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/customers + next: + href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/customers?page=2&pageSize=2 + QuickBooks Online: + value: + results: + - id: '9' + customerName: Abe + contactName: Abraham's Company + emailAddress: ab@email.com + defaultCurrency: GBP + addresses: [] + contacts: + - name: Abe + email: ab@email.com + phone: + - number: '01111111111' + type: Mobile + status: Active + registrationNumber: XXXX9900001 + taxNumber: XXXX9900001 + status: Active + modifiedDate: '2023-01-18T11:02:35Z' + sourceModifiedDate: '2022-12-08T15:42:59Z' + - id: '49' + customerName: adeel qbo child test + contactName: Adeel test + emailAddress: adeel@adeel.com + defaultCurrency: GBP + phone: '123456789' + addresses: + - type: Billing + line1: 4 Privet Drive + city: London + country: United Kingdom + postalCode: WD25 7LR + - type: Delivery + line1: 4 Privet Drive + city: London + country: United Kingdom + postalCode: WD25 7LR + contacts: + - name: Adeel test + email: adeel@adeel.com + phone: + - number: '123456789' + type: Primary + - number: '07546543216' + type: Mobile + address: + type: Billing + line1: 4 Privet Drive + city: London + country: United Kingdom + postalCode: WD25 7LR + status: Active + status: Active + modifiedDate: '2023-01-18T11:02:35Z' + sourceModifiedDate: '2022-08-22T09:21:09Z' + pageNumber: 1 + pageSize: 2 + totalResults: 40 + _links: + current: + href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/customers?page=1&pageSize=2 + self: + href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/customers + next: + href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/customers?page=2&pageSize=2 + QuickBooks Online Sandbox: + value: + results: + - id: '66' + customerName: Abercrombie International Group + contactName: Kristy Abercrombie + defaultCurrency: GBP + addresses: + - type: Billing + line1: 123 Main St + city: 'New York, NY' + contacts: + - name: Abercrombie International Group (deleted) + phone: [] + address: + type: Billing + line1: 123 Main St + city: 'New York, NY' + status: Archived + status: Archived + modifiedDate: '2023-04-26T09:35:56Z' + sourceModifiedDate: '2016-09-12T18:53:19Z' + metadata: + isDeleted: false + - id: '67' + customerName: Abercrombie International Group + contactName: Natalie Watts + emailAddress: n.watts@google.com + defaultCurrency: USD + addresses: + - type: Billing + - type: Delivery + contacts: + - name: Abercrombie International Group + email: n.watts@google.com + phone: [] + address: + type: Billing + status: Active + registrationNumber: XXXXVat123456 + taxNumber: XXXXVat123456 + status: Active + modifiedDate: '2023-04-26T09:35:56Z' + sourceModifiedDate: '2023-03-29T01:12:55Z' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 243 + _links: + current: + href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/customers?page=1&pageSize=2 + self: + href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/customers + next: + href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/customers?page=2&pageSize=2 + Sage 200cloud: + value: + results: + - id: A1D001 + customerName: A1 Design Services + contactName: Lee Dalkin + emailAddress: newbusinessadvice@sage.com + defaultCurrency: GBP + phone: 01742 876 234 + addresses: + - type: Delivery + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: '' + postalCode: BP12 7HT + - type: Delivery + line1: 23a Union Street + line2: '' + city: Manchester + region: '' + country: '' + postalCode: M2 6JK + - type: Billing + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: Great Britain + postalCode: BP12 7HT + contacts: + - name: Lee Dalkin + email: newbusinessadvice@sage.com + phone: + - number: 01742 876 234 + type: Landline + - number: 01742 876 235 + type: Landline + - number: 01742 876 236 + type: Fax + status: Active + - name: Malcolm Leverret + email: '' + phone: [] + status: Active + - name: Jim Thomas + email: Jim@a1designservices.co.uk + phone: + - number: 01742 876 234 + type: Landline + - number: 01742 876 235 + type: Fax + status: Active + - name: Jullian Plawsworth + email: Jullian@a1designservices.co.uk + phone: + - number: 0151 349 3939 + type: Landline + - number: 0151 349 3940 + type: Fax + status: Active + registrationNumber: '' + taxNumber: GB238 3839 38 + status: Active + modifiedDate: '2022-10-14T09:35:53Z' + sourceModifiedDate: '2022-04-27T15:17:36Z' + - id: A1D002 + customerName: A2 Design Services + contactName: Lee Dalkin + emailAddress: newbusinessadvice@sage.com + defaultCurrency: GBP + phone: 01742 876 234 + addresses: + - type: Billing + line1: 77a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: Great Britain + postalCode: BP12 7HT + contacts: + - name: Lee Dalkin + email: newbusinessadvice@sage.com + phone: + - number: 01742 876 234 + type: Landline + - number: 01742 876 235 + type: Landline + - number: 01742 876 236 + type: Fax + status: Active + - name: Malcolm Leverret + email: '' + phone: [] + status: Active + - name: Jim Thomas + email: Jim@a1designservices.co.uk + phone: + - number: 01742 876 234 + type: Landline + - number: 01742 876 235 + type: Fax + status: Active + - name: Jullian Plawsworth + email: Jullian@a1designservices.co.uk + phone: + - number: 0151 349 3939 + type: Landline + - number: 0151 349 3940 + type: Fax + status: Active + registrationNumber: '' + taxNumber: GB238 3839 40 + status: Active + modifiedDate: '2022-10-14T09:35:53Z' + sourceModifiedDate: '2020-09-23T10:28:58Z' + pageNumber: 1 + pageSize: 2 + totalResults: 43 + _links: + current: + href: /companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/customers?page=1&pageSize=2 + self: + href: /companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/customers + next: + href: /companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/customers?page=2&pageSize=2 + Sage 50 (UK): + value: + results: + - id: A1D001 + customerName: A1 Design Services + contactName: Ian Cairns + emailAddress: newbusinessadvice@sage.com + defaultCurrency: GBP + phone: 01742 876 234 + addresses: + - type: Delivery + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: GB + postalCode: BP12 7HT + - type: Delivery + line1: 23a Union Street + line2: '' + city: Manchester + region: '' + country: GB + postalCode: M2 6JK + - type: Unknown + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: GB + postalCode: BP12 7HT + contacts: [] + taxNumber: GB238 3839 38 + status: Active + modifiedDate: '2023-03-30T14:42:41Z' + sourceModifiedDate: '2022-11-25T09:43:54Z' + metadata: + isDeleted: false + - id: ABS001 + customerName: ABS Garages Ltd + contactName: Mike Hall + emailAddress: newbusinessadvice@sage.com + defaultCurrency: GBP + phone: 0191 254 5909 + addresses: + - type: Delivery + line1: Swanson Industries + line2: Dukes Industrial Estate + city: Whitley Bay + region: North Tyneside + country: GB + postalCode: NE56 4ER + - type: Delivery + line1: Unit 34 + line2: Holystone Ind Estate + city: Hebburn + region: Tyne & Wear + country: GB + postalCode: NE31 1VB + - type: Unknown + line1: Unit 34 + line2: Holystone Ind Estate + city: Hebburn + region: Tyne & Wear + country: GB + postalCode: NE31 1VB + contacts: [] + taxNumber: GB745 4584 68 + status: Active + modifiedDate: '2023-03-30T14:42:41Z' + sourceModifiedDate: '2022-11-25T09:43:54Z' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 30 + _links: + current: + href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/customers?page=1&pageSize=2 + self: + href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/customers + next: + href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/customers?page=2&pageSize=2 + Sage Business Cloud Accounting: + value: + results: + - id: 260f6a3f94a243738f2d5e08496a41a8 + customerName: 100 test name + contactName: Main Contact + emailAddress: email@codat.io + defaultCurrency: GBP + phone: contact phone number + addresses: + - type: Billing + line1: Aruba Address line 1 + line2: Aruba Address line 2 + city: Aruba City + region: Aruba Province + country: Aruba (AW) + postalCode: Aruba Post + contacts: + - phone: + - number: contact mobile number + type: Mobile + - number: contact fax number + type: Fax + status: Unknown + status: Active + modifiedDate: '2022-10-24T14:52:54Z' + sourceModifiedDate: '2021-05-10T16:31:51Z' + - id: 44a5d9461d9e4f6d90a5ace251c5cf35 + customerName: 100 test name DS + contactName: Main Contact + emailAddress: DCemail@codat.io + defaultCurrency: GBP + phone: contact phone number + addresses: + - type: Billing + line1: POST - Aruba Address line 1 + line2: POST - Aruba Address line 2 + city: POST - Aruba City + region: Aruba Province + country: Aruba (AW) + postalCode: Aruba Post + contacts: [] + status: Active + modifiedDate: '2022-10-24T14:52:54Z' + sourceModifiedDate: '2021-06-10T14:22:46Z' + pageNumber: 1 + pageSize: 2 + totalResults: 168 + _links: + current: + href: /companies/390083e2-351b-407c-a3be-55081c36c182/data/customers?page=1&pageSize=2 + self: + href: /companies/390083e2-351b-407c-a3be-55081c36c182/data/customers + next: + href: /companies/390083e2-351b-407c-a3be-55081c36c182/data/customers?page=2&pageSize=2 + Sage Intacct: + value: + results: + - id: '188' + customerName: 33Across + contactName: Yuna Conn + defaultCurrency: USD + phone: 520-393-4468 + addresses: + - type: Unknown + line1: 155 Westend Point + line2: '' + city: Albuquerque + region: NM + country: United States + postalCode: '87140' + contacts: + - name: 'Conn, Yuna' + phone: + - number: 520-393-4468 + type: Primary + address: + type: Unknown + line1: 155 Westend Point + line2: '' + city: Albuquerque + region: NM + country: United States + postalCode: '87140' + status: Unknown + taxNumber: '' + status: Active + modifiedDate: '2023-04-04T16:32:21Z' + sourceModifiedDate: '2022-09-06T12:58:27' + metadata: + isDeleted: false + - id: '324' + customerName: 3Way International Logistics + contactName: Lauri O'Heagertie + defaultCurrency: CAD + phone: 410-309-3976 + addresses: + - type: Unknown + line1: 7 Lerdahl Junction + line2: '' + city: Sparwood + region: British Columbia + country: Canada + postalCode: L4R + contacts: + - name: 'O''Heagertie, Lauri' + phone: + - number: 410-309-3976 + type: Primary + address: + type: Unknown + line1: 7 Lerdahl Junction + line2: '' + city: Sparwood + region: British Columbia + country: Canada + postalCode: L4R + status: Unknown + taxNumber: '' + status: Active + modifiedDate: '2023-04-04T16:32:21Z' + sourceModifiedDate: '2020-10-20T05:01:49' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 530 + _links: + current: + href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/customers?page=1&pageSize=2 + self: + href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/customers + next: + href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/customers?page=2&pageSize=2 + Wave: + value: + results: + - id: QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O0N1c3RvbWVyOjMyMzkzNTA4 + customerName: ABC Textiles + contactName: '' + emailAddress: c.taylor@codat.io + defaultCurrency: USD + addresses: [] + contacts: [] + status: Active + modifiedDate: '2022-11-16T18:15:30Z' + sourceModifiedDate: '2019-10-17T07:59:04Z' + - id: QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O0N1c3RvbWVyOjM3MTUzNDI2 + customerName: Coffee Cart + contactName: Coffee Carl + emailAddress: coffee.cart@example.com + defaultCurrency: GBP + phone: '0201111' + addresses: + - type: Billing + line1: 11 Coffee Lane + line2: Coffee Town + city: Coffee City + region: Hampshire + country: United Kingdom + postalCode: CC1 1CC + contacts: + - name: Coffee Carl + phone: + - number: '07733' + type: Mobile + status: Active + status: Active + modifiedDate: '2022-11-16T18:15:30Z' + sourceModifiedDate: '2020-03-17T19:12:39Z' + pageNumber: 1 + pageSize: 2 + totalResults: 10 + _links: + current: + href: /companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/customers?page=1&pageSize=2 + self: + href: /companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/customers + next: + href: /companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/customers?page=2&pageSize=2 + Xero: + value: + results: + - id: e4c9d0e2-c285-4e85-b579-6d28b180c730 + customerName: 24 Locks + emailAddress: '' + addresses: [] + contacts: [] + status: Active + modifiedDate: '2023-03-15T20:35:10Z' + sourceModifiedDate: '2023-02-17T18:03:42' + metadata: + isDeleted: false + - id: bab779bc-c5fb-42cb-a888-953e8309711c + customerName: 7-Eleven + emailAddress: '' + addresses: [] + contacts: [] + status: Active + modifiedDate: '2023-03-15T20:35:10Z' + sourceModifiedDate: '2023-02-17T18:03:42' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 48 + _links: + current: + href: /companies/5ced9667-a310-443a-a711-958d36377141/data/customers?page=1&pageSize=2 + self: + href: /companies/5ced9667-a310-443a-a711-958d36377141/data/customers + next: + href: /companies/5ced9667-a310-443a-a711-958d36377141/data/customers?page=2&pageSize=2 + Zoho Books: + value: + results: + - id: '104957000000032105' + customerName: A B + contactName: Contact (First Name) Contact (Last Name) + emailAddress: contactperson@whateveryouwantidontcare12345.com + defaultCurrency: GBP + phone: Work Phone + addresses: [] + contacts: + - name: Contact (First Name) Contact (Last Name) + email: contactperson@whateveryouwantidontcare12345.com + phone: + - number: Work Phone + type: Landline + - number: Mobile + type: Mobile + status: Active + status: Active + modifiedDate: '2022-10-03T08:40:37Z' + sourceModifiedDate: '2022-06-09T14:36:47' + - id: '104957000000054050' + customerName: 'Doe, John' + contactName: John Doe + emailAddress: '' + defaultCurrency: GBP + addresses: [] + contacts: + - name: John Doe + email: '' + phone: [] + status: Active + status: Active + modifiedDate: '2022-10-03T08:40:37Z' + sourceModifiedDate: '2022-09-28T15:09:22' + pageNumber: 1 + pageSize: 2 + totalResults: 14 + _links: + current: + href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/customers?page=1&pageSize=2 + self: + href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/customers + next: + href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/customers?page=2&pageSize=2 '400': - $ref: '#/components/responses/BadRequest' + $ref: '#/components/responses/Malformed-Query' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2200,317 +8032,556 @@ paths: $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/Not-Found' + '409': + $ref: '#/components/responses/Conflict' '429': $ref: '#/components/responses/Too-Many-Requests' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - description: "The *Create bank account* endpoint creates a new [bank account](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) for a given company's connection.\r\n\r\n[Bank accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.\r\n\r\n**Integration-specific behavior**\r\n\r\nRequired data may vary by integration. To see what data to post, first call [Get create/update bank account model](https://docs.codat.io/bank-feeds-api#/operations/get-create-update-bankAccounts-model)." - operationId: create-bank-account - '/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/batch': - parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - post: - tags: - - Source accounts - summary: Create source accounts description: |- - The _Batch create source accounts_ endpoint allows you to create multiple representations of your SMB's bank accounts within Codat's domain. The company can then map the source account to an existing or new target account in their accounting software. + The *List customers* endpoint returns a list of [customers](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) for a given company's connection. - > ### Versioning - > If you are integrating the Bank Feeds solution with Codat after August 1, 2024, please use the v2 version of the API, as detailed in the schema below. For integrations completed before August 1, 2024, select the v1 version from the schema dropdown below. - operationId: create-batch-source-account - x-speakeasy-name-override: create-batch - requestBody: - content: - application/json: - schema: - oneOf: - - type: array - items: - $ref: '#/components/schemas/SourceAccountV2/definitions/sourceAccountV2Prototype' - - type: array - items: - $ref: '#/components/schemas/SourceAccount/definitions/sourceAccountPrototype' - responses: - '201': - description: Success - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: '#/components/schemas/SourceAccountV2BatchCreateResponse' - - $ref: '#/components/schemas/SourceAccountBatchCreateResponse' - '207': - description: Multi-Status - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: '#/components/schemas/SourceAccountV2BatchCreateResponse' - - $ref: '#/components/schemas/SourceAccountBatchCreateResponse' - - $ref: '#/components/schemas/SourceAccountBatchErrorResponse' - '400': - $ref: '#/components/responses/BadRequest' - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '409': - description: Conflict - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: '#/components/schemas/SourceAccountV2BatchCreateResponse' - - $ref: '#/components/schemas/SourceAccountBatchCreateResponse' - - $ref: '#/components/schemas/SourceAccountBatchErrorResponse' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts': + [Customers](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. + + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-company-data). + + operationId: list-customers + '/companies/{companyId}/data/customers/{customerId}': parameters: - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - post: - tags: - - Source accounts - summary: Create single source account - description: |- - The _Create Source Account_ endpoint allows you to create a representation of a bank account within Codat's domain. The company can then map the source account to an existing or new target account in their accounting software. - - > ### Versioning - > If you are integrating the Bank Feeds solution with Codat after August 1, 2024, please use the v2 version of the API, as detailed in the schema below. For integrations completed before August 1, 2024, select the v1 version from the schema dropdown below. - operationId: create-source-account - requestBody: - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/SourceAccountV2/definitions/sourceAccountV2Prototype' - - $ref: '#/components/schemas/SourceAccount/definitions/sourceAccountPrototype' - examples: - Version 2: - value: - id: acc-001 - accountName: account-081 - accountType: checking - accountNumber: '12345670' - routingInfo: - bankCode: 021001088 - type: bankcode - currency: GBP - balance: 99.99 - accountInfo: - description: account description 1 - nickname: account 123 - accountOpenDate: '2023-05-06' - availableBalance: 10 - modifiedDate: '2024-08-02T00:00:00.000Z' - Version 1: - value: - id: acc-002 - accountName: account-081 - sortCode: '123456' - accountType: Credit - accountNumber: '12345670' - currency: GBP - balance: 99.99 - modifiedDate: '2023-01-09T14:14:14.1057478Z' - responses: - '200': - description: Success - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/SourceAccountV2' - - $ref: '#/components/schemas/SourceAccount' - examples: {} - '400': - $ref: '#/components/responses/BadRequest' - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' + - $ref: '#/components/parameters/customerId' get: tags: - - Source accounts - summary: List source accounts - description: "\uFEFFThe _List source accounts_ endpoint returns a list of [source accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankFeedAccount) for a given company's connection.\n\n[Source accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankFeedAccount) are the bank's bank account within Codat's domain from which transactions are synced into the accounting platform.\n\n> ### Versioning\n> If you are integrating the Bank Feeds solution with Codat after August 1, 2024, please use the v2 version of the API, as detailed in the schema below. For integrations completed before August 1, 2024, select the v1 version from the schema dropdown below." - operationId: list-source-accounts - responses: - '200': - description: Success - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/SourceAccountV2/definitions/sourceAccounts' - - $ref: '#/components/schemas/SourceAccount/definitions/sourceAccounts' - examples: {} - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/{accountId}': - patch: - tags: - - Source accounts - summary: Update source account - description: "\uFEFFThe _Update source account_ endpoint updates a single source account for a single data connection connected to a single company.\n\n### Tips and pitfalls\n\n* This endpoint makes it possible to update the `accountName`, `status`, and `balance` fields.\n * The `status` field can only be updated to 'disconnected'.\n * The `balance` field can only be updated on accounts that are **not** 'connected'.\n* Updates made here apply exclusively to source accounts and will not affect target accounts in the accounting software." - operationId: update-source-account - parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - - $ref: '#/components/parameters/accountId' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SourceAccount' - examples: {} - responses: - '200': - description: Success - content: - application/json: - x-speakeasy-usage-example: true - schema: - $ref: '#/components/schemas/SourceAccount' - examples: {} - '400': - $ref: '#/components/responses/BadRequest' - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - delete: - tags: - - Source accounts - summary: Delete source account - description: | - The _Delete source account_ endpoint enables you to remove a source account. - - Removing a source account will also remove any mapping between the source bank feed bank accounts and the target bankfeed bank account. - operationId: delete-source-account - parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - - $ref: '#/components/parameters/accountId' - responses: - '204': - description: No Content - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/credentials': - post: - tags: - - Source accounts - summary: Generate source account credentials - description: "\uFEFFThe _Generate bank account credentials_ endpoint can be used to generate credentials for QuickBooks Online to authenticate the Bank Feed in the QBO portal. Each time this endpoint is called, a new set of credentials will be generated.\n\nThe old credentials will still be valid until the revoke credentials endpoint is used, which will revoke all credentials associated to the data connection.\n\n> **For QuickBooks Online only**\n>\n> Only call this endpoint when onboarding SMBs that use QuickBooks Online." - operationId: generate-credentials - parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - requestBody: - required: true - content: - application/json: {} + - Customers + summary: Get customer responses: '200': description: Success content: application/json: schema: - $ref: '#/components/schemas/BankAccountCredentials' - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - delete: - tags: - - Source accounts - summary: Delete all source account credentials - x-speakeasy-name-override: delete-credentials - description: |- - The _Delete Bank Account Credentials_ endpoint serves as a comprehensive mechanism for revoking all existing authorization credentials that a company employs to establish its Bank Feed connection. - - In cases where multiple credential sets have been generated, a single API call to this endpoint revokes all of them. - operationId: delete-bank-feed-credentials - parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - responses: - '204': - description: No Content + $ref: '#/components/schemas/Customer' + examples: + Clear Books: + value: + id: c8180244-74ac-40cf-a5df-6d83661c44d7 + customerName: Arjun Kuvalis + contactName: Werner Langworth + emailAddress: Arjun34@hotmail.com + defaultCurrency: GBP + phone: 014605 64820 + addresses: + - type: Delivery + line1: Suite 214 + line2: 8439 Lueilwitz Passage + city: Fernandohaven + region: Northern Ireland + country: United Kingdom + postalCode: JG04 7PV + - type: Delivery + line1: Suite 096 + line2: 864 Halie Course + city: Juliochester + region: England + country: United Kingdom + postalCode: DZ8 4BF + - type: Delivery + line1: Suite 001 + line2: 416 Stokes Fords + city: Naderborough + region: Wales + country: United Kingdom + postalCode: XG25 0XX + contacts: + - name: Werner Langworth + email: Werner_Langworth@hotmail.com + phone: [] + address: + type: Delivery + line1: Apt. 145 + line2: 317 Williamson Freeway + city: Hortenseville + region: Scotland + country: United Kingdom + postalCode: CV4 2HR + status: Active + - name: Belle Glover + email: Belle51@yahoo.com + phone: [] + address: + type: Delivery + line1: Suite 075 + line2: 9921 Dickens Walk + city: South Ali + region: Scotland + country: United Kingdom + postalCode: TI04 4OO + status: Active + registrationNumber: NI7JEJVM + taxNumber: '7505220209.583549' + status: Active + modifiedDate: '2023-04-26T12:38:16Z' + sourceModifiedDate: '2022-07-03T01:27:00' + metadata: + isDeleted: false + Dynamics 365 Business Central: + value: + id: 0e2f7751-7696-ed11-bff5-6045bd0d2ad6 + customerName: '' + contactName: '' + emailAddress: '' + defaultCurrency: GBP + phone: '' + addresses: + - type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: '' + postalCode: '' + contacts: + - name: '' + email: '' + phone: [] + address: + type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: '' + postalCode: '' + status: Active + taxNumber: '' + status: Active + modifiedDate: '2023-03-27T14:21:25Z' + sourceModifiedDate: '2023-01-17T14:50:54Z' + metadata: + isDeleted: false + Exact (Netherlands): + value: + id: 555f8251-c65a-433a-a813-5dbe04321d1e + customerName: Ab Netherlands + defaultCurrency: EUR + addresses: + - type: Billing + country: NL + contacts: [] + status: Active + modifiedDate: '2022-10-26T13:32:05Z' + sourceModifiedDate: '2021-06-14T15:26:37Z' + Exact (UK): + value: + id: 5f20075a-a28e-434d-81a6-2db0dc170e87 + customerName: Abdi 99 + emailAddress: email@codat.io + defaultCurrency: GBP + addresses: + - type: Billing + line1: Ink Rooms + city: London + country: GB + postalCode: WC1X 0BE + contacts: [] + registrationNumber: '123456789' + taxNumber: GB339 0727 47 + status: Active + modifiedDate: '2022-10-26T13:33:08Z' + sourceModifiedDate: '2020-02-26T11:23:50Z' + FreeAgent: + value: + id: '11526230' + customerName: '-' + contactName: Test 1 + addresses: + - type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + contacts: + - name: Test 1 + phone: [] + address: + type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + status: Unknown + status: Active + modifiedDate: '2023-04-25T14:19:12Z' + sourceModifiedDate: '2023-04-17T06:02:46Z' + metadata: + isDeleted: false + FreshBooks: + value: + id: '634509' + customerName: A test customer 14 (updated) + contactName: test person name + emailAddress: test14@example.com + defaultCurrency: GBP + phone: 01876 541245 + addresses: + - type: Billing + line1: Line 1 + line2: Line 2 + city: Some city + region: A region + country: Country 1 + postalCode: SW1 2JQ + contacts: + - name: test person1 + email: test14A@example.com + phone: + - number: '24681012' + type: Primary + - number: '121086420' + type: Unknown + status: Active + - name: test person2 + email: test14B@example.com + phone: + - number: '123456789' + type: Primary + - number: '987654321' + type: Unknown + status: Active + - name: test person name + email: test14@example.com + phone: + - number: 01876 541245 + type: Unknown + status: Active + status: Active + modifiedDate: '2023-03-24T16:07:23Z' + sourceModifiedDate: '2022-05-18T09:23:56' + metadata: + isDeleted: false + KashFlow: + value: + id: '92227673' + customerName: Chekko Customer Test 01 + contactName: '' + emailAddress: '' + phone: '' + addresses: [] + contacts: + - name: '' + email: '' + phone: [] + status: Active + taxNumber: '' + status: Active + modifiedDate: '2022-09-30T10:29:15Z' + sourceModifiedDate: '0001-01-01T00:00:00' + Oracle NetSuite: + value: + id: '773' + customerName: 119 Test Customer + contactName: Mr Test Customer + defaultCurrency: GBP + addresses: [] + contacts: [] + status: Active + modifiedDate: '2023-01-30T14:48:02Z' + sourceModifiedDate: '2022-01-11T12:28:49' + QuickBooks Desktop: + value: + id: 150000-933272658 + customerName: 'Abercrombie, Kristy' + contactName: Kristy Abercrombie + emailAddress: kristy@samplename.com + defaultCurrency: GBP + phone: 415-555-6579 + addresses: + - type: Delivery + line1: Kristy Abercrombie + line2: 5647 Cypress Hill Rd + city: Bayshore + region: CA + postalCode: '94326' + - type: Billing + line1: Kristy Abercrombie + line2: 5647 Cypress Hill Rd + city: Bayshore + region: CA + postalCode: '94326' + contacts: + - name: 'Abercrombie, Kristy' + email: kristy@samplename.com + phone: + - number: 415-555-6579 + type: Primary + status: Active + - name: Kristy Abercrombie + phone: [] + status: Active + - name: Steve Darcangelo + phone: [] + status: Active + status: Active + modifiedDate: '2023-04-26T09:07:55Z' + sourceModifiedDate: '2023-12-16T05:06:42' + metadata: + isDeleted: false + QuickBooks Online: + value: + id: '9' + customerName: Abe + contactName: Abraham's Company + emailAddress: ab@email.com + defaultCurrency: GBP + addresses: [] + contacts: + - name: Abe + email: ab@email.com + phone: + - number: '01111111111' + type: Mobile + status: Active + registrationNumber: XXXX9900001 + taxNumber: XXXX9900001 + status: Active + modifiedDate: '2023-01-18T11:02:35Z' + sourceModifiedDate: '2022-12-08T15:42:59Z' + QuickBooks Online Sandbox: + value: + id: '66' + customerName: Abercrombie International Group + contactName: Kristy Abercrombie + defaultCurrency: GBP + addresses: + - type: Billing + line1: 123 Main St + city: 'New York, NY' + contacts: + - name: Abercrombie International Group (deleted) + phone: [] + address: + type: Billing + line1: 123 Main St + city: 'New York, NY' + status: Archived + status: Archived + modifiedDate: '2023-04-26T09:35:56Z' + sourceModifiedDate: '2016-09-12T18:53:19Z' + metadata: + isDeleted: false + Sage 200cloud: + value: + id: A1D001 + customerName: A1 Design Services + contactName: Lee Dalkin + emailAddress: newbusinessadvice@sage.com + defaultCurrency: GBP + phone: 01742 876 234 + addresses: + - type: Delivery + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: '' + postalCode: BP12 7HT + - type: Delivery + line1: 23a Union Street + line2: '' + city: Manchester + region: '' + country: '' + postalCode: M2 6JK + - type: Billing + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: Great Britain + postalCode: BP12 7HT + contacts: + - name: Lee Dalkin + email: newbusinessadvice@sage.com + phone: + - number: 01742 876 234 + type: Landline + - number: 01742 876 235 + type: Landline + - number: 01742 876 236 + type: Fax + status: Active + - name: Malcolm Leverret + email: '' + phone: [] + status: Active + - name: Jim Thomas + email: Jim@a1designservices.co.uk + phone: + - number: 01742 876 234 + type: Landline + - number: 01742 876 235 + type: Fax + status: Active + - name: Jullian Plawsworth + email: Jullian@a1designservices.co.uk + phone: + - number: 0151 349 3939 + type: Landline + - number: 0151 349 3940 + type: Fax + status: Active + registrationNumber: '' + taxNumber: GB238 3839 38 + status: Active + modifiedDate: '2022-10-14T09:35:53Z' + sourceModifiedDate: '2022-04-27T15:17:36Z' + Sage 50 (UK): + value: + id: A1D001 + customerName: A1 Design Services + contactName: Ian Cairns + emailAddress: newbusinessadvice@sage.com + defaultCurrency: GBP + phone: 01742 876 234 + addresses: + - type: Delivery + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: GB + postalCode: BP12 7HT + - type: Delivery + line1: 23a Union Street + line2: '' + city: Manchester + region: '' + country: GB + postalCode: M2 6JK + - type: Unknown + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: GB + postalCode: BP12 7HT + contacts: [] + taxNumber: GB238 3839 38 + status: Active + modifiedDate: '2023-03-30T14:42:41Z' + sourceModifiedDate: '2022-11-25T09:43:54Z' + metadata: + isDeleted: false + Sage Business Cloud Accounting: + value: + id: 260f6a3f94a243738f2d5e08496a41a8 + customerName: 100 test name + contactName: Main Contact + emailAddress: email@codat.io + defaultCurrency: GBP + phone: contact phone number + addresses: + - type: Billing + line1: Aruba Address line 1 + line2: Aruba Address line 2 + city: Aruba City + region: Aruba Province + country: Aruba (AW) + postalCode: Aruba Post + contacts: + - phone: + - number: contact mobile number + type: Mobile + - number: contact fax number + type: Fax + status: Unknown + status: Active + modifiedDate: '2022-10-24T14:52:54Z' + sourceModifiedDate: '2021-05-10T16:31:51Z' + Sage Intacct: + value: + id: '188' + customerName: 33Across + contactName: Yuna Conn + defaultCurrency: USD + phone: 520-393-4468 + addresses: + - type: Unknown + line1: 155 Westend Point + line2: '' + city: Albuquerque + region: NM + country: United States + postalCode: '87140' + contacts: + - name: 'Conn, Yuna' + phone: + - number: 520-393-4468 + type: Primary + address: + type: Unknown + line1: 155 Westend Point + line2: '' + city: Albuquerque + region: NM + country: United States + postalCode: '87140' + status: Unknown + taxNumber: '' + status: Active + modifiedDate: '2023-04-04T16:32:21Z' + sourceModifiedDate: '2022-09-06T12:58:27' + metadata: + isDeleted: false + Wave: + value: + id: QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O0N1c3RvbWVyOjMyMzkzNTA4 + customerName: ABC Textiles + contactName: '' + emailAddress: c.taylor@codat.io + defaultCurrency: USD + addresses: [] + contacts: [] + status: Active + modifiedDate: '2022-11-16T18:15:30Z' + sourceModifiedDate: '2019-10-17T07:59:04Z' + Xero: + value: + id: e4c9d0e2-c285-4e85-b579-6d28b180c730 + customerName: 24 Locks + emailAddress: '' + addresses: [] + contacts: [] + status: Active + modifiedDate: '2023-03-15T20:35:10Z' + sourceModifiedDate: '2023-02-17T18:03:42' + metadata: + isDeleted: false + Zoho Books: + value: + id: '104957000000032105' + customerName: A B + contactName: Contact (First Name) Contact (Last Name) + emailAddress: contactperson@whateveryouwantidontcare12345.com + defaultCurrency: GBP + phone: Work Phone + addresses: [] + contacts: + - name: Contact (First Name) Contact (Last Name) + email: contactperson@whateveryouwantidontcare12345.com + phone: + - number: Work Phone + type: Landline + - number: Mobile + type: Mobile + status: Active + status: Active + modifiedDate: '2022-10-03T08:40:37Z' + sourceModifiedDate: '2022-06-09T14:36:47' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2519,51 +8590,47 @@ paths: $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/Not-Found' + '409': + $ref: '#/components/responses/Conflict' '429': $ref: '#/components/responses/Too-Many-Requests' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/bankFeedAccounts/mapping': + description: | + The *Get customer* endpoint returns a single customer for a given customerId. + + [Customers](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. + + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-company-data). + operationId: get-customer + '/companies/{companyId}/connections/{connectionId}/push/customers': parameters: - $ref: '#/components/parameters/companyId' - $ref: '#/components/parameters/connectionId' - get: + post: tags: - - Account mapping - summary: List bank feed accounts - description: "\uFEFFThe *List bank accounts* endpoint returns information about a source bank account and any current or potential target mapping accounts.\n\nA bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end user's account in the underlying software).\n\n> **For custom builds only**\n> \n> Only use this endpoint if you are building your own account management UI." - operationId: get-bank-account-mapping + - Customers + summary: Create customer + parameters: + - $ref: '#/components/parameters/timeoutInMinutes' + - $ref: '#/components/parameters/allowSyncOnPushComplete' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Customer' responses: '200': description: Success content: application/json: schema: - $ref: '#/components/schemas/BankFeedMapping/definitions/bankFeedMappings' - examples: - Example: - value: - - sourceAccountId: account-001 - status: pending - targetAccountOptions: - - name: Money Bank account - id: d21e25d6-98c5-4bfb-b469-105833bea3c8 - accountNumber: '789' - sortCode: '123456' - - name: Bank of Dave account - id: d06ff4b2-e4f2-4681-9841-014bd008cdab - accountNumber: '99887766' - sortCode: '998866' - - name: LuxLend account - id: c8f252fc-84f3-4a8b-ace8-ae99f41a81ae - accountNumber: '123456789' - sortCode: '123456' - sourceAccountName: account-001 - sourceAccountNumber: '12345670' - sourceBalance: 99.99 - sourceCurrency: GBP + $ref: '#/components/schemas/CreateCustomerResponse' + examples: {} + '400': + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2578,29 +8645,40 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - post: + operationId: create-customer + description: |- + The *Create customer* endpoint creates a new [customer](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) for a given company's connection. + + [Customers](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. + + **Integration-specific behavior** + + Required data may vary by integration. To see what data to post, first call [Get create/update customer model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-customers-model). + '/companies/{companyId}/connections/{connectionId}/push/customers/{customerId}': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/connectionId' + - $ref: '#/components/parameters/customerId' + put: tags: - - Account mapping - summary: Create bank feed account mapping - description: "\uFEFFThe *Create bank account mapping* endpoint creates a new mapping between a source bank account and a potential account in the accounting software (target account).\n\nA bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end user's account in the underlying software).\n\nTo find valid target account options, first call the [List bank feed account mappings](https://docs.codat.io//bank-feeds-api#/operations/get-bank-account-mapping) endpoint.\n\n> **For custom builds only**\n>\n> Only use this endpoint if you are building your own account management UI.\n\n#### Account mapping variability\n\nThe method of mapping the source account to the target account varies depending on the accounting software your company uses.\n\n#### Mapping options:\n\n1. **API Mapping**: Integrate the mapping journey directly into your application for a seamless user experience.\n2. **Codat UI Mapping**: If you prefer a quicker setup, you can utilize Codat's provided user interface for mapping.\n3. **Accounting Platform Mapping**: For some accounting software, the mapping process must be conducted within the software itself.\n\n### Integration-specific behavior\n\n| Bank Feed Integration | API Mapping | Codat UI Mapping | Accounting Platform Mapping |\n| --------------------- | ----------- | ---------------- | --------------------------- |\n| Xero | ✅ | ✅ | |\n| FreeAgent | ✅ | ✅ | |\n| Oracle NetSuite | ✅ | ✅ | |\n| Exact Online (NL) | ✅ | ✅ | |\n| QuickBooks Online | | | ✅ |\n| Sage | | | ✅ |" - operationId: create-bank-account-mapping + - Customers + summary: Update customer + parameters: + - $ref: '#/components/parameters/timeoutInMinutes' + - $ref: '#/components/parameters/allowSyncOnPushComplete' + - $ref: '#/components/parameters/forceUpdate' requestBody: content: application/json: schema: - $ref: '#/components/schemas/BankFeedAccountMapping' - examples: - Example: - value: - sourceAccountId: acc-002 - targetAccountId: account-081 + $ref: '#/components/schemas/Customer' responses: '200': description: Success content: application/json: schema: - $ref: '#/components/schemas/BankFeedAccountMappingResponse' + $ref: '#/components/schemas/UpdateCustomerResponse' examples: {} '400': $ref: '#/components/responses/BadRequest' @@ -2618,37 +8696,801 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/bankFeeds/info': + description: |- + The *Update customer* endpoint updates an existing [customer](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) for a given company's connection. + + [Customers](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. + + **Integration-specific behavior** + + Required data may vary by integration. To see what data to post, first call [Get create/update customer model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-customers-model). + operationId: update-customer + '/companies/{companyId}/data/suppliers': parameters: - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' get: - summary: Get company information - description: |- - Use the *Get company information* endpoint to return information about the company available from the underlying accounting software. - - ### Supported Integrations - | Integration | Supported | - |-----------------------|-----------| - | Oracle NetSuite | Yes | - | Xero | Yes | - | Exact | No | - | FreeAgent | No | - | Sage | No | - | QuickBooks Online | No | - operationId: get-company-information tags: - - Company information + - Suppliers + summary: List suppliers + parameters: + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + - $ref: '#/components/parameters/query' + - $ref: '#/components/parameters/orderBy' responses: '200': description: Success content: application/json: schema: - $ref: '#/components/schemas/CompanyInformation' - examples: {} + $ref: '#/components/schemas/Suppliers' + examples: + Clear Books: + value: + results: + - id: owQ2Gqgj9f + supplierName: Abshire - Kshlerin + contactName: Faye Hansen + emailAddress: hello@Abshire-Kshlerin.info + phone: 01338 858162 + addresses: + - type: Delivery + line1: Suite 431 + line2: 289 Giles Lake + city: Cesarmouth + region: Northern Ireland + country: United Kingdom + postalCode: BG40 9GP + registrationNumber: VYL1XZXR + taxNumber: '1396267523.0914588' + status: Active + modifiedDate: '2023-04-26T12:38:17Z' + sourceModifiedDate: '1660-11-28T23:18:00' + defaultCurrency: GBP + metadata: + isDeleted: false + - id: FyUkHbZxhn + supplierName: Arjun Kuvalis + contactName: Werner Langworth + emailAddress: Arjun34@hotmail.com + phone: 0116 796 3163 + addresses: + - type: Delivery + line1: Suite 214 + line2: 8439 Lueilwitz Passage + city: Fernandohaven + region: Northern Ireland + country: United Kingdom + postalCode: JG04 7PV + - type: Delivery + line1: Suite 096 + line2: 864 Halie Course + city: Juliochester + region: England + country: United Kingdom + postalCode: DZ8 4BF + - type: Delivery + line1: Suite 001 + line2: 416 Stokes Fords + city: Naderborough + region: Wales + country: United Kingdom + postalCode: XG25 0XX + registrationNumber: NI7JEJVM + taxNumber: '7505220209.583549' + status: Active + modifiedDate: '2023-04-26T12:38:17Z' + sourceModifiedDate: '0177-04-27T11:56:00' + defaultCurrency: GBP + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 100 + _links: + current: + href: /companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/suppliers?page=1&pageSize=2 + self: + href: /companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/suppliers + next: + href: /companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/suppliers?page=2&pageSize=2 + Dynamics 365 Business Central: + value: + results: + - id: 78623f13-931e-eb11-bbf8-0022481b3585 + supplierName: '' + contactName: '' + emailAddress: '' + phone: '' + addresses: + - type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: GB + postalCode: '' + taxNumber: '' + status: Active + modifiedDate: '2023-03-27T14:21:12Z' + sourceModifiedDate: '2020-11-04T11:44:22Z' + defaultCurrency: GBP + metadata: + isDeleted: false + - id: be49ec62-6754-ed11-946f-0022481b67d1 + supplierName: '' + contactName: '' + emailAddress: '' + phone: '' + addresses: + - type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: GB + postalCode: '' + taxNumber: '' + status: Active + modifiedDate: '2023-03-27T14:21:12Z' + sourceModifiedDate: '2022-10-25T13:17:36Z' + defaultCurrency: GBP + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 31 + _links: + current: + href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/data/suppliers?page=1&pageSize=2 + self: + href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/data/suppliers + next: + href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/data/suppliers?page=2&pageSize=2 + Exact (Netherlands): + value: + results: + - id: 3150917c-1d92-4d77-9018-31b5c4758ca9 + supplierName: Abe + contactName: Kelly's Contact Name + emailAddress: sales@kellysupplies.com + phone: 07999 999999 + addresses: + - type: Billing + line1: Unit 51 + city: Bakersfield + region: California + country: US + postalCode: '933081' + registrationNumber: '8409314368' + status: Active + modifiedDate: '2022-10-26T13:32:05Z' + sourceModifiedDate: '2022-07-15T12:01:15Z' + defaultCurrency: EUR + - id: 00014c12-2616-481a-a2e8-31bdf2497775 + supplierName: Ann's test supplier 2 + contactName: Ann's contact name + emailAddress: anna@anna888888.com + phone: '55555555' + addresses: + - type: Billing + line1: line1 + line2: line2 + city: city + region: region + country: RU + postalCode: postal + registrationNumber: '55566677788899944455' + taxNumber: RU4444444 + status: Active + modifiedDate: '2022-10-26T13:32:05Z' + sourceModifiedDate: '2021-06-09T12:04:08Z' + defaultCurrency: USD + pageNumber: 1 + pageSize: 2 + totalResults: 73 + _links: + current: + href: /companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/suppliers?page=1&pageSize=2 + self: + href: /companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/suppliers + next: + href: /companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/suppliers?page=2&pageSize=2 + Exact (UK): + value: + results: + - id: 0185fea2-0298-445b-909a-0db685118a9e + supplierName: a + addresses: + - type: Billing + country: GB + status: Active + modifiedDate: '2022-10-26T13:33:13Z' + sourceModifiedDate: '2017-08-02T10:58:54Z' + defaultCurrency: GBP + - id: 64ae712f-4155-48bb-9fce-98232c51d979 + supplierName: aa + addresses: + - type: Billing + country: GB + status: Active + modifiedDate: '2022-10-26T13:33:13Z' + sourceModifiedDate: '2020-05-01T14:05:46Z' + defaultCurrency: GBP + pageNumber: 1 + pageSize: 2 + totalResults: 118 + _links: + current: + href: /companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/suppliers?page=1&pageSize=2 + self: + href: /companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/suppliers + next: + href: /companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/suppliers?page=2&pageSize=2 + FreeAgent: + value: + results: + - id: '11526230' + supplierName: '-' + contactName: Test 1 + addresses: + - type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + status: Active + modifiedDate: '2023-04-25T14:19:08Z' + sourceModifiedDate: '2023-04-17T06:02:46' + metadata: + isDeleted: false + - id: '9677150' + supplierName: '-' + contactName: Test 1 + addresses: + - type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + status: Active + modifiedDate: '2023-04-25T14:19:08Z' + sourceModifiedDate: '2023-04-24T06:19:23' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 159 + _links: + current: + href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/data/suppliers?page=1&pageSize=2 + self: + href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/data/suppliers + next: + href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/data/suppliers?page=2&pageSize=2 + FreshBooks: + value: + results: + - id: api vendor + supplierName: api vendor + addresses: [] + status: Active + modifiedDate: '2023-03-24T16:07:25Z' + metadata: + isDeleted: false + - id: DUndsRykrmy8kFsc+FvYk29YkJze4zSjGecoF4YcUEhVU7auJ5JkQA0VjXptZ7XQ+D4n6WoxFIkaGY2V/t4flA== + supplierName: 'Chekko Test merchant 100 - Test Very long name: ORIG CO NAME:AMERICAN EXPRESS ORIG ID:9493560001 DESC DATE:220307 CO ENTRY DESCR:ACH PMT SEC:CCD TRACE#:021000023255482 EED:220307 IND ID:A4670 IND NAME:Rick Sanchez' + addresses: [] + status: Active + modifiedDate: '2023-03-24T16:07:25Z' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 7 + _links: + current: + href: /companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/suppliers?page=1&pageSize=2 + self: + href: /companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/suppliers + next: + href: /companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/suppliers?page=2&pageSize=2 + KashFlow: + value: + results: + - id: '6202387' + supplierName: Dell + contactName: '' + emailAddress: '' + phone: '' + addresses: [] + taxNumber: '' + status: Unknown + modifiedDate: '2022-09-30T10:29:15Z' + sourceModifiedDate: '2017-05-09T00:00:00' + - id: '9338173' + supplierName: Home + contactName: '' + emailAddress: '' + phone: '' + addresses: [] + taxNumber: '' + status: Unknown + modifiedDate: '2022-09-30T10:29:15Z' + sourceModifiedDate: '1990-01-01T00:00:00' + pageNumber: 1 + pageSize: 2 + totalResults: 7 + _links: + current: + href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/data/suppliers?page=1&pageSize=2 + self: + href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/data/suppliers + next: + href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/data/suppliers?page=2&pageSize=2 + Oracle NetSuite: + value: + results: + - id: '779' + supplierName: Test Vendor + contactName: Test Vendor + emailAddress: '' + phone: '' + addresses: [] + status: Active + modifiedDate: '2023-01-30T14:47:02Z' + sourceModifiedDate: '2022-02-04T14:24:43' + defaultCurrency: GBP + - id: '726' + supplierName: Vendor -.A + contactName: Vendor -.A + emailAddress: '' + phone: '' + addresses: [] + status: Active + modifiedDate: '2023-01-30T14:47:02Z' + sourceModifiedDate: '2021-03-26T09:53:15' + defaultCurrency: GBP + pageNumber: 1 + pageSize: 2 + totalResults: 6 + _links: + current: + href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/suppliers?page=1&pageSize=2 + self: + href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/suppliers + next: + href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/suppliers?page=2&pageSize=2 + QuickBooks Desktop: + value: + results: + - id: A60000-1197760912 + supplierName: A Cheung Limited + contactName: Angela Cheung + emailAddress: AC@CheungLimited.com + phone: 510 555 5723 + addresses: + - type: Billing + line1: 'A Cheung Limited, Angela Cheung' + line2: 3818 Bear Rd. West + city: Berkeley + region: CA + postalCode: '94688' + status: Active + modifiedDate: '2023-04-26T09:09:03Z' + sourceModifiedDate: '2023-12-16T05:06:44' + defaultCurrency: GBP + metadata: + isDeleted: false + - id: A40000-1197774038 + supplierName: Bank of Anycity + contactName: Lisa D. Holzhauser + emailAddress: lisah@samplename.com + phone: 415-555-9135 + addresses: + - type: Billing + line1: 'Bank of Anycity, Lisa Holzhauser' + line2: 1935 Main Street + city: Middlefield + region: CA + postalCode: '94482' + status: Active + modifiedDate: '2023-04-26T09:09:03Z' + sourceModifiedDate: '2023-12-16T05:06:44' + defaultCurrency: GBP + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 54 + _links: + current: + href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/suppliers?page=1&pageSize=2 + self: + href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/suppliers + next: + href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/suppliers?page=2&pageSize=2 + QuickBooks Online: + value: + results: + - id: '41' + supplierName: AI Support + contactName: AI Support + addresses: + - type: Billing + line1: test + region: string + country: Djibouti + status: Active + modifiedDate: '2023-01-18T11:02:36Z' + sourceModifiedDate: '2022-12-07T10:48:18Z' + defaultCurrency: GBP + - id: '42' + supplierName: AI Support 2 + contactName: AI Support 2 + addresses: + - type: Billing + line1: test + region: string + country: DJ + status: Active + modifiedDate: '2023-01-18T11:02:36Z' + sourceModifiedDate: '2021-08-31T08:45:02Z' + defaultCurrency: GBP + pageNumber: 1 + pageSize: 2 + totalResults: 23 + _links: + current: + href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/suppliers?page=1&pageSize=2 + self: + href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/suppliers + next: + href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/suppliers?page=2&pageSize=2 + QuickBooks Online Sandbox: + value: + results: + - id: '129' + supplierName: Ally Johnson + contactName: Miss Smith + phone: 0728 38474 + addresses: + - type: Billing + line1: 100 London Road + line2: Angel + city: London + region: Greater London + country: England + postalCode: EC1M + status: Active + modifiedDate: '2023-04-26T09:35:55Z' + sourceModifiedDate: '2023-04-13T01:51:08Z' + defaultCurrency: GBP + metadata: + isDeleted: false + - id: '88' + supplierName: Andrew Haberbosch + addresses: [] + status: Active + modifiedDate: '2023-04-26T09:35:55Z' + sourceModifiedDate: '2022-07-06T15:55:28Z' + defaultCurrency: GBP + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 64 + _links: + current: + href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/suppliers?page=1&pageSize=2 + self: + href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/suppliers + next: + href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/suppliers?page=2&pageSize=2 + Sage 200cloud: + value: + results: + - id: '776' + supplierName: Aaren + contactName: '' + emailAddress: '' + phone: '' + addresses: + - type: Unknown + line1: '' + line2: '' + city: '' + region: '' + country: Great Britain + postalCode: '' + taxNumber: '' + status: Archived + modifiedDate: '2022-10-14T09:35:58Z' + defaultCurrency: GBP + metadata: + isDeleted: true + - id: '914' + supplierName: Aaren + contactName: '' + emailAddress: '' + phone: '' + addresses: + - type: Unknown + line1: '' + line2: '' + city: '' + region: '' + country: Great Britain + postalCode: '' + taxNumber: '' + status: Archived + modifiedDate: '2022-10-14T09:35:58Z' + defaultCurrency: GBP + metadata: + isDeleted: true + pageNumber: 1 + pageSize: 2 + totalResults: 943 + _links: + current: + href: /companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/suppliers?page=1&pageSize=2 + self: + href: /companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/suppliers + next: + href: /companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/suppliers?page=2&pageSize=2 + Sage 50 (UK): + value: + results: + - id: CON001 + supplierName: Concept Stationery Supplies + contactName: Mark Ramsay + emailAddress: newbusinessadvice@sage.com + phone: 0191 643 4343 + addresses: + - type: Delivery + line1: 66 New Street + line2: Ridgeway + city: Newcastle Upon Tyne + region: '' + country: GB + postalCode: NE1 4GF + - type: Unknown + line1: 66 New Street + line2: Ridgeway + city: Newcastle upon Tyne + region: '' + country: GB + postalCode: NE1 4GF + taxNumber: GB988 3453 23 + status: Active + modifiedDate: '2023-03-30T14:42:38Z' + sourceModifiedDate: '2022-11-25T09:43:54Z' + defaultCurrency: GBP + metadata: + isDeleted: false + - id: MCN001 + supplierName: McNally Computer Supplies + contactName: Stuart Lynn + emailAddress: newbusinessadvice@sage.com + phone: 0191 415 3434 + addresses: + - type: Delivery + line1: Station Lane Ind Est + line2: Birtley + city: Chester le Street + region: County Durham + country: GB + postalCode: DH1 3RG + - type: Unknown + line1: Station Lane Ind Est + line2: Birtley + city: Chester le Street + region: County Durham + country: GB + postalCode: DH1 3RG + taxNumber: GB455 2385 34 + status: Active + modifiedDate: '2023-03-30T14:42:38Z' + sourceModifiedDate: '2022-12-05T13:37:26Z' + defaultCurrency: GBP + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 15 + _links: + current: + href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/suppliers?page=1&pageSize=2 + self: + href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/suppliers + next: + href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/suppliers?page=2&pageSize=2 + Sage Business Cloud Accounting: + value: + results: + - id: 65179671e9ef424caff8b9006cd111c8 + supplierName: 5555 Abdul's Test Name + contactName: Main Contact + addresses: + - type: Billing + country: United Kingdom (GB) + status: Active + modifiedDate: '2022-10-24T14:52:54Z' + sourceModifiedDate: '2020-02-25T17:23:33Z' + defaultCurrency: GBP + - id: cf7f44d693904944a6a7cf3de0887964 + supplierName: Abdi Supplier + contactName: Abdi + emailAddress: abdisupplier@company.com + addresses: + - type: Billing + line1: 1 Place House + city: London + country: United Kingdom (GB) + postalCode: WC1X 1AH + status: Active + modifiedDate: '2022-10-24T14:52:54Z' + sourceModifiedDate: '2020-02-13T10:38:19Z' + defaultCurrency: GBP + pageNumber: 1 + pageSize: 2 + totalResults: 64 + _links: + current: + href: /companies/390083e2-351b-407c-a3be-55081c36c182/data/suppliers?page=1&pageSize=2 + self: + href: /companies/390083e2-351b-407c-a3be-55081c36c182/data/suppliers + next: + href: /companies/390083e2-351b-407c-a3be-55081c36c182/data/suppliers?page=2&pageSize=2 + Sage Intacct: + value: + results: + - id: '3' + supplierName: ADP + contactName: 'Jones, William' + phone: 214-760-9491 + addresses: + - type: Unknown + line1: 208 S Akard St + line2: '' + city: Dallas + region: TX + country: United States + postalCode: '75265' + registrationNumber: '' + taxNumber: 85-3678274 + status: Active + modifiedDate: '2023-04-04T16:32:20Z' + sourceModifiedDate: '2023-02-16T09:48:27' + defaultCurrency: USD + metadata: + isDeleted: false + - id: '29' + supplierName: Advisor Printing + contactName: 'Roach, Nathan' + phone: 130-202-4796 + addresses: + - type: Unknown + line1: 5 Carey Hill + line2: '' + city: Drayton Valley + region: Alberta + country: Canada + postalCode: G8V + registrationNumber: '' + taxNumber: '' + status: Active + modifiedDate: '2023-04-04T16:32:20Z' + sourceModifiedDate: '2022-06-15T11:38:29' + defaultCurrency: CAD + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 77 + _links: + current: + href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/suppliers?page=1&pageSize=2 + self: + href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/suppliers + next: + href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/suppliers?page=2&pageSize=2 + Wave: + value: + results: + - id: QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O1ZlbmRvcjo2NjA0Nzk0 + supplierName: Computer Shop + contactName: '' + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2022-11-16T18:15:24Z' + sourceModifiedDate: '2020-04-07T13:28:02Z' + defaultCurrency: GBP + - id: QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O1ZlbmRvcjo2NjA0NzQx + supplierName: Flour Mill + contactName: '' + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2022-11-16T18:15:24Z' + sourceModifiedDate: '2020-04-07T13:12:40Z' + defaultCurrency: GBP + pageNumber: 1 + pageSize: 2 + totalResults: 9 + _links: + current: + href: /companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/suppliers?page=1&pageSize=2 + self: + href: /companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/suppliers + next: + href: /companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/suppliers?page=2&pageSize=2 + Xero: + value: + results: + - id: e4c9d0e2-c285-4e85-b579-6d28b180c730 + supplierName: 24 Locks + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2023-03-15T20:36:09Z' + sourceModifiedDate: '2023-02-17T18:03:42' + metadata: + isDeleted: false + - id: bab779bc-c5fb-42cb-a888-953e8309711c + supplierName: 7-Eleven + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2023-03-15T20:36:09Z' + sourceModifiedDate: '2023-02-17T18:03:42' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 48 + _links: + current: + href: /companies/5ced9667-a310-443a-a711-958d36377141/data/suppliers?page=1&pageSize=2 + self: + href: /companies/5ced9667-a310-443a-a711-958d36377141/data/suppliers + next: + href: /companies/5ced9667-a310-443a-a711-958d36377141/data/suppliers?page=2&pageSize=2 + Zoho Books: + value: + results: + - id: '104957000001494001' + supplierName: Acme Corporation + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2022-10-03T08:40:37Z' + sourceModifiedDate: '2022-09-16T13:09:56' + defaultCurrency: GBP + - id: '104957000000648001' + supplierName: Cool company + contactName: Dre + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2022-10-03T08:40:37Z' + sourceModifiedDate: '2022-06-10T09:07:16' + defaultCurrency: CAD + pageNumber: 1 + pageSize: 2 + totalResults: 6 + _links: + current: + href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/suppliers?page=1&pageSize=2 + self: + href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/suppliers + next: + href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/suppliers?page=2&pageSize=2 '400': - $ref: '#/components/responses/BadRequest' + $ref: '#/components/responses/Malformed-Query' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2657,268 +9499,345 @@ paths: $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/Not-Found' + '409': + $ref: '#/components/responses/Conflict' '429': $ref: '#/components/responses/Too-Many-Requests' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/bankFeeds/otp': - parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - post: - tags: - - Source accounts - summary: Generate one-time password description: | - The *Generate OTP* endpoint generates a one-time password (OTP) for a bank feed connection. The OTP is returned along with an expiry time, after which it will no longer be valid. + The *List suppliers* endpoint returns a list of [suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) for a given company's connection. - > **For Sage only** - > - > Only call this endpoint for connections to Sage. Calling it for other integrations will return an error. - operationId: generate-otp - responses: - '200': - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/GenerateOtpResponse' - examples: {} - '400': - $ref: '#/components/responses/BadRequest' - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/push/bankAccounts/{accountId}/bankTransactions': - post: - tags: - - Transactions - summary: Create bank transactions - description: "\uFEFFThe *Create bank transactions* endpoint creates new [bank transactions](https://docs.codat.io/bank-feeds-api#/schemas/BankTransactions) for a given company's connection.\n\n[Bank transactions](https://docs.codat.io/bank-feeds-api#/schemas/BankTransactions) are records of monetary amounts that have moved in and out of an SMB's bank account.\n\n**Integration-specific behavior**\n\nThe required properties may vary based on the integration. For detailed requirements specific to each accounting software, refer to the API reference examples.\nAlternatively, you can view the [Get create bank transaction model](https://docs.codat.io/bank-feeds-api#/operations/get-create-bank-transactions-model) for more information." - operationId: create-bank-transactions - parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/timeoutInMinutes' - - name: allowSyncOnPushComplete - in: query - schema: - type: boolean - default: true - description: Allow a sync upon push completion. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateBankTransactions' - examples: - Xero: - value: - accountId: 49cd5a42-b311-4750-9361-52e2ed1d4653 - transactions: - - id: '716422529' - date: '2023-08-22T10:21:00' - description: Repayment of Credit Card - counterparty: Bank of Example - reference: Ref-12345 - reconciled: true - amount: 100 - balance: 100 - transactionType: Credit - - id: '716422530' - date: '2023-08-22T10:22:00' - description: Amazon Purchase - counterparty: Amazon - reference: Ref-12346 - reconciled: false - amount: -100 - balance: 0 - transactionType: Debit - - id: '716422531' - date: '2023-08-22T10:23:00' - description: Office Supplies - counterparty: Office Mart - reference: Ref-12347 - reconciled: false - amount: -60 - balance: -60 - transactionType: Debit - QuickBooks Online Bank Feeds: - value: - accountId: 49cd5a42-b311-4750-9361-52e2ed1d4653 - transactions: - - id: '716422529' - date: '2023-08-22T10:21:00' - description: Repayment of Credit Card - amount: 100 - balance: 100 - transactionType: Credit - - id: '716422530' - date: '2023-08-22T10:22:00' - description: Amazon Purchase - amount: -100 - balance: 0 - transactionType: Debit - - id: '716422531' - date: '2023-08-22T10:23:00' - description: Office Supplies - amount: -60 - balance: -60 - transactionType: Debit - FreeAgent: - value: - accountId: 49cd5a42-b311-4750-9361-52e2ed1d4653 - transactions: - - id: '716422529' - date: '2023-08-22T10:21:00' - description: Repayment of Credit Card - amount: 100 - transactionType: Credit - - id: '716422530' - date: '2023-08-22T10:22:00' - description: Amazon Purchase - amount: -100 - transactionType: Debit - - id: '716422531' - date: '2023-08-22T10:23:00' - description: Office Supplies - amount: -60 - transactionType: Debit - Sage: - value: - accountId: 49cd5a42-b311-4750-9361-52e2ed1d4653 - transactions: - - id: '716422529' - date: '2023-08-22T10:21:00' - description: Repayment of Credit Card - counterparty: Bank of Example - reference: Ref-12345 - amount: 100 - balance: 100 - transactionType: Credit - - id: '716422530' - date: '2023-08-22T10:22:00' - description: Amazon Purchase - counterparty: Amazon - reference: Ref-12346 - amount: -100 - balance: 0 - transactionType: Debit - - id: '716422531' - date: '2023-08-22T10:23:00' - description: Office Supplies - counterparty: Office Mart - reference: Ref-12347 - amount: -60 - balance: -60 - transactionType: Debit - responses: - '200': - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/CreateBankTransactionsResponse' - '400': - $ref: '#/components/responses/BadRequest' - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/options/bankAccounts/{accountId}/bankTransactions': - get: - tags: - - Transactions - summary: Get create bank transactions model - description: |- - The *Get create bank account transactions model* endpoint returns the expected data for the request payload when creating [bank account transactions](https://docs.codat.io/bank-feeds-api#/schemas/BankTransactions) for a given company and integration. + [Suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. - [Bank account transactions](https://docs.codat.io/bank-feeds-api#/schemas/BankTransactions) are records of money that has moved in and out of an SMB's bank account. + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-all-data-types). - **Integration-specific behavior** + ### Supported Integrations - See the *response examples* for integration-specific indicative models. - operationId: get-create-bank-transactions-model - parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - - $ref: '#/components/parameters/accountId' - responses: - '200': - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/PushOption' - examples: {} - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/push/{pushOperationKey}': + | Integration | Supported | + |-------------------------------|-----------| + | Dynamics 365 Business Central | Yes | + | FreeAgent | Yes | + | Oracle NetSuite | Yes | + | QuickBooks Desktop | Yes | + | QuickBooks Online | Yes | + | Sage Intacct | Yes | + | Xero | Yes | + | Zoho Books | Yes | + operationId: list-suppliers + '/companies/{companyId}/data/suppliers/{supplierId}': parameters: - $ref: '#/components/parameters/companyId' - - schema: - type: string - format: uuid - name: pushOperationKey - in: path - required: true - description: Push operation key. + - $ref: '#/components/parameters/supplierId' get: - summary: Get create operation tags: - - Transactions - operationId: get-create-operation - x-speakeasy-name-override: get-create-operation - description: |- - The **Get create operation** endpoint returns a specific [write operation](/using-the-api/push) identified by the `pushOperationKey` that was performed on the company. - - Write operations are actions that send requests to Codat, enabling the creation, updating, deletion of records, or uploading attachments in the connected accounting software. - - For bank feeds, your push operations will only relate to the `bankTransactions` data type. + - Suppliers + summary: Get supplier responses: '200': - description: OK + description: Success content: application/json: schema: - $ref: '#/components/schemas/PushOperation' - examples: {} + $ref: '#/components/schemas/Supplier' + examples: + Clear Books: + value: + id: owQ2Gqgj9f + supplierName: Abshire - Kshlerin + contactName: Faye Hansen + emailAddress: hello@Abshire-Kshlerin.info + phone: 01338 858162 + addresses: + - type: Delivery + line1: Suite 431 + line2: 289 Giles Lake + city: Cesarmouth + region: Northern Ireland + country: United Kingdom + postalCode: BG40 9GP + registrationNumber: VYL1XZXR + taxNumber: '1396267523.0914588' + status: Active + modifiedDate: '2023-04-26T12:38:17Z' + sourceModifiedDate: '1660-11-28T23:18:00' + defaultCurrency: GBP + metadata: + isDeleted: false + Dynamics 365 Business Central: + value: + id: 78623f13-931e-eb11-bbf8-0022481b3585 + supplierName: '' + contactName: '' + emailAddress: '' + phone: '' + addresses: + - type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: GB + postalCode: '' + taxNumber: '' + status: Active + modifiedDate: '2023-03-27T14:21:12Z' + sourceModifiedDate: '2020-11-04T11:44:22Z' + defaultCurrency: GBP + metadata: + isDeleted: false + Exact (Netherlands): + value: + id: 3150917c-1d92-4d77-9018-31b5c4758ca9 + supplierName: Abe + contactName: Kelly's Contact Name + emailAddress: sales@kellysupplies.com + phone: 07999 999999 + addresses: + - type: Billing + line1: Unit 51 + city: Bakersfield + region: California + country: US + postalCode: '933081' + registrationNumber: '8409314368' + status: Active + modifiedDate: '2022-10-26T13:32:05Z' + sourceModifiedDate: '2022-07-15T12:01:15Z' + defaultCurrency: EUR + Exact (UK): + value: + id: 0185fea2-0298-445b-909a-0db685118a9e + supplierName: a + addresses: + - type: Billing + country: GB + status: Active + modifiedDate: '2022-10-26T13:33:13Z' + sourceModifiedDate: '2017-08-02T10:58:54Z' + defaultCurrency: GBP + FreeAgent: + value: + id: '11526230' + supplierName: '-' + contactName: Test 1 + addresses: + - type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + status: Active + modifiedDate: '2023-04-25T14:19:08Z' + sourceModifiedDate: '2023-04-17T06:02:46' + metadata: + isDeleted: false + FreshBooks: + value: + id: api vendor + supplierName: api vendor + addresses: [] + status: Active + modifiedDate: '2023-03-24T16:07:25Z' + metadata: + isDeleted: false + KashFlow: + value: + id: '6202387' + supplierName: Dell + contactName: '' + emailAddress: '' + phone: '' + addresses: [] + taxNumber: '' + status: Unknown + modifiedDate: '2022-09-30T10:29:15Z' + sourceModifiedDate: '2017-05-09T00:00:00' + Oracle NetSuite: + value: + id: '779' + supplierName: Test Vendor + contactName: Test Vendor + emailAddress: '' + phone: '' + addresses: [] + status: Active + modifiedDate: '2023-01-30T14:47:02Z' + sourceModifiedDate: '2022-02-04T14:24:43' + defaultCurrency: GBP + QuickBooks Desktop: + value: + id: A60000-1197760912 + supplierName: A Cheung Limited + contactName: Angela Cheung + emailAddress: AC@CheungLimited.com + phone: 510 555 5723 + addresses: + - type: Billing + line1: 'A Cheung Limited, Angela Cheung' + line2: 3818 Bear Rd. West + city: Berkeley + region: CA + postalCode: '94688' + status: Active + modifiedDate: '2023-04-26T09:09:03Z' + sourceModifiedDate: '2023-12-16T05:06:44' + defaultCurrency: GBP + metadata: + isDeleted: false + QuickBooks Online: + value: + id: '41' + supplierName: AI Support + contactName: AI Support + addresses: + - type: Billing + line1: test + region: string + country: Djibouti + status: Active + modifiedDate: '2023-01-18T11:02:36Z' + sourceModifiedDate: '2022-12-07T10:48:18Z' + defaultCurrency: GBP + QuickBooks Online Sandbox: + value: + id: '129' + supplierName: Ally Johnson + contactName: Miss Smith + phone: 0728 38474 + addresses: + - type: Billing + line1: 100 London Road + line2: Angel + city: London + region: Greater London + country: England + postalCode: EC1M + status: Active + modifiedDate: '2023-04-26T09:35:55Z' + sourceModifiedDate: '2023-04-13T01:51:08Z' + defaultCurrency: GBP + metadata: + isDeleted: false + Sage 200cloud: + value: + id: '776' + supplierName: Aaren + contactName: '' + emailAddress: '' + phone: '' + addresses: + - type: Unknown + line1: '' + line2: '' + city: '' + region: '' + country: Great Britain + postalCode: '' + taxNumber: '' + status: Archived + modifiedDate: '2022-10-14T09:35:58Z' + defaultCurrency: GBP + metadata: + isDeleted: true + Sage 50 (UK): + value: + id: CON001 + supplierName: Concept Stationery Supplies + contactName: Mark Ramsay + emailAddress: newbusinessadvice@sage.com + phone: 0191 643 4343 + addresses: + - type: Delivery + line1: 66 New Street + line2: Ridgeway + city: Newcastle Upon Tyne + region: '' + country: GB + postalCode: NE1 4GF + - type: Unknown + line1: 66 New Street + line2: Ridgeway + city: Newcastle upon Tyne + region: '' + country: GB + postalCode: NE1 4GF + taxNumber: GB988 3453 23 + status: Active + modifiedDate: '2023-03-30T14:42:38Z' + sourceModifiedDate: '2022-11-25T09:43:54Z' + defaultCurrency: GBP + metadata: + isDeleted: false + Sage Business Cloud Accounting: + value: + id: 65179671e9ef424caff8b9006cd111c8 + supplierName: 5555 Abdul's Test Name + contactName: Main Contact + addresses: + - type: Billing + country: United Kingdom (GB) + status: Active + modifiedDate: '2022-10-24T14:52:54Z' + sourceModifiedDate: '2020-02-25T17:23:33Z' + defaultCurrency: GBP + Sage Intacct: + value: + id: '3' + supplierName: ADP + contactName: 'Jones, William' + phone: 214-760-9491 + addresses: + - type: Unknown + line1: 208 S Akard St + line2: '' + city: Dallas + region: TX + country: United States + postalCode: '75265' + registrationNumber: '' + taxNumber: 85-3678274 + status: Active + modifiedDate: '2023-04-04T16:32:20Z' + sourceModifiedDate: '2023-02-16T09:48:27' + defaultCurrency: USD + metadata: + isDeleted: false + Wave: + value: + id: QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O1ZlbmRvcjo2NjA0Nzk0 + supplierName: Computer Shop + contactName: '' + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2022-11-16T18:15:24Z' + sourceModifiedDate: '2020-04-07T13:28:02Z' + defaultCurrency: GBP + Xero: + value: + id: e4c9d0e2-c285-4e85-b579-6d28b180c730 + supplierName: 24 Locks + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2023-03-15T20:36:09Z' + sourceModifiedDate: '2023-02-17T18:03:42' + metadata: + isDeleted: false + Zoho Books: + value: + id: '104957000001494001' + supplierName: Acme Corporation + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2022-10-03T08:40:37Z' + sourceModifiedDate: '2022-09-16T13:09:56' + defaultCurrency: GBP '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2927,133 +9846,66 @@ paths: $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/Not-Found' + '409': + $ref: '#/components/responses/Conflict' '429': $ref: '#/components/responses/Too-Many-Requests' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/push': - parameters: - - $ref: '#/components/parameters/companyId' - get: - parameters: - - $ref: '#/components/parameters/page' - - $ref: '#/components/parameters/pageSize' - - $ref: '#/components/parameters/query' - - $ref: '#/components/parameters/orderBy' - summary: List create operations - tags: - - Transactions - operationId: list-create-operations - x-speakeasy-name-override: list-create-operations - description: |- - The **List create operations** endpoint returns a list of [write operations](/using-the-api/push) performed on the company. + description: | + The *Get supplier* endpoint returns a single supplier for a given supplierId. - Write operations are actions that send requests to Codat, enabling the creation, updating, deletion of records, or uploading attachments in the connected accounting software. + [Suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. - For bank feeds, use this endpoint to view write operations related to the `bankTransactions` data type. - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/PushOperations' - examples: {} - '400': - $ref: '#/components/responses/Malformed-Query' - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/bankFeedAccounts/{sourceAccountId}/managedBankFeeds/syncs/{syncId}': - parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - - name: sourceAccountId - in: path - required: true - schema: - type: string - description: The ID of the source bank account. - - name: syncId - in: path - required: true - schema: - type: string - format: uuid - description: The ID of the sync. - get: - tags: - - Managed bank feeds - summary: Get sync - operationId: get-managed-bank-feed-sync - x-speakeasy-name-override: get-sync - description: |- - The _Get sync_ endpoint returns the [sync status](https://docs.codat.io/bank-feeds-api#/schemas/SyncStatusResult) for a given 'syncId'. + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-all-data-types). - A sync is a single execution that fetches bank transactions from a connected bank account and records them in the company's accounting software. - responses: - '200': - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/SyncStatusResult' - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/bankFeedAccounts/{sourceAccountId}/managedBankFeeds/syncs/latest': + ### Supported Integrations + + | Integration | Supported | + |-------------------------------|-----------| + | Dynamics 365 Business Central | Yes | + | FreeAgent | Yes | + | Oracle NetSuite | Yes | + | QuickBooks Desktop | Yes | + | QuickBooks Online | Yes | + | Sage Intacct | Yes | + | Xero | Yes | + | Zoho Books | Yes | + operationId: get-supplier + '/companies/{companyId}/connections/{connectionId}/push/suppliers': parameters: - $ref: '#/components/parameters/companyId' - $ref: '#/components/parameters/connectionId' - - name: sourceAccountId - in: path - required: true - schema: - type: string - description: The ID of the source bank account. - get: + post: tags: - - Managed bank feeds - summary: Get latest sync - operationId: get-latest-managed-bank-feed-sync - x-speakeasy-name-override: get-latest-sync - description: |- - The _Get latest sync_ endpoint returns the status for a given source account's [most recent sync](https://docs.codat.io/bank-feeds-api#/schemas/SyncStatusResult). - - A sync is a single execution that fetches bank transactions from a connected bank account and records them in the company's accounting software. + - Suppliers + parameters: + - $ref: '#/components/parameters/timeoutInMinutes' + - $ref: '#/components/parameters/allowSyncOnPushComplete' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Supplier' + examples: + Sage Intacct: + value: + id: '73593' + supplierName: test 20230420 1004 + contactName: Joe Bloggs + status: Active responses: '200': description: Success content: application/json: - schema: - $ref: '#/components/schemas/SyncStatusResult' - '204': - description: No Content + schema: + $ref: '#/components/schemas/CreateSupplierResponse' + examples: {} + '400': + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -3068,35 +9920,54 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/bankFeedAccounts/{sourceAccountId}/managedBankFeeds/syncs': + summary: Create supplier + description: | + The *Create supplier* endpoint creates a new [supplier](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) for a given company's connection. + + [Suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. + + **Integration-specific behavior** + + Required data may vary by integration. To see what data to post, first call [Get create/update supplier model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-suppliers-model). + + ### Supported Integrations + + | Integration | Supported | + |-------------------------------|-----------| + | Dynamics 365 Business Central | Yes | + | FreeAgent | Yes | + | Oracle NetSuite | Yes | + | QuickBooks Desktop | Yes | + | QuickBooks Online | Yes | + | Sage Intacct | Yes | + | Xero | Yes | + | Zoho Books | Yes | + operationId: create-supplier + '/companies/{companyId}/connections/{connectionId}/push/suppliers/{supplierId}': parameters: - $ref: '#/components/parameters/companyId' - $ref: '#/components/parameters/connectionId' - - name: sourceAccountId - in: path - required: true - schema: - type: string - description: The ID of the source bank account. - post: + - $ref: '#/components/parameters/supplierId' + put: tags: - - Managed bank feeds - summary: Run ad-hoc sync - operationId: run-managed-bank-feed-ad-hoc-sync - x-speakeasy-name-override: run-ad-hoc-sync - description: |- - The _Run ad-hoc sync_ endpoint immediately runs a sync with a fetch period from the last successful sync to the execution time of the new sync. - - A sync is a single execution that fetches bank transactions from a connected bank account and records them in the company's accounting software. - - Use either the [_Get latest sync_](https://docs.codat.io/bank-feeds-api#/operations/get-latest-managed-bank-feed-sync) endpoint or the [_Get sync_](https://docs.codat.io/bank-feeds-api#/operations/fetch-managed-bank-feed-sync-by-id) endpoint to get the result of this sync. + - Suppliers + parameters: + - $ref: '#/components/parameters/timeoutInMinutes' + - $ref: '#/components/parameters/allowSyncOnPushComplete' + - $ref: '#/components/parameters/forceUpdate' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Supplier' responses: - '201': - description: Created + '200': + description: Success content: application/json: schema: - $ref: '#/components/schemas/StartScheduledSyncResult' + $ref: '#/components/schemas/UpdateSupplierResponse' + examples: {} '400': $ref: '#/components/responses/BadRequest' '401': @@ -3107,616 +9978,1292 @@ paths: $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/Not-Found' - '409': - $ref: '#/components/responses/Conflict' '429': $ref: '#/components/responses/Too-Many-Requests' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' + summary: Update supplier + description: | + The *Update supplier* endpoint updates an existing [supplier](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) for a given company's connection. + + [Suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. + + **Integration-specific behavior** + + Required data may vary by integration. To see what data to post, first call [Get create/update supplier model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-suppliers-model). + + ### Supported Integrations + + | Integration | Supported | + |-------------------|-----------| + | FreeAgent | Yes | + | QuickBooks Online | Yes | + | Xero | Yes | + operationId: update-supplier webhooks: - client.rateLimit.reached: + expenses.sync.successful: post: - description: Called when your client’s request count to Codat's API surpasses the allocated quota. + description: Called when an expense sync successfully completes without any errors or warnings. requestBody: content: application/json: schema: - $ref: '#/components/schemas/ClientRateLimitWebhook' + $ref: '#/components/schemas/ExpensesSyncWebhook' examples: - Reached: + Successful: value: - id: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b - eventType: client.rateLimit.reached + id: ba29118f-5406-4e59-b05c-ba307ca38d01 + eventType: expenses.sync.successful generatedDate: '2024-09-01T00:00:00Z' payload: - dailyQuota: 12000 - quotaRemaining: 0 - expiryDate: '2024-09-01T12:14:14Z' + referenceCompany: + id: 0498e921-9b53-4396-a412-4f2f5983b0a2 + name: Toft stores + description: Syncing expenses + syncId: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd + transactions: + - id: f47ac10b-58cc-4372-a567-0e02b2c3d479 + status: Completed + errorMessage: null + - id: e7f8a3d5-0c3c-4c9b-b5d3-56b4a43b62e4 + status: Completed + errorMessage: null responses: '200': description: Return a 200 status to indicate that the webhook was received successfully. - client.rateLimit.reset: + expenses.sync.unsuccessful: post: - description: 'Called when your client''s rate limit quota is reset, allowing additional requests to Codat''s API.' + description: 'Called when an expense sync fails to complete successfully, resulting in at least one error or warning.' requestBody: content: application/json: schema: - $ref: '#/components/schemas/ClientRateLimitWebhook' + $ref: '#/components/schemas/ExpensesSyncWebhook' examples: - Reset: + Unsuccessful: value: - id: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b - eventType: client.rateLimit.reset + id: ba29118f-5406-4e59-b05c-ba307ca38d01 + eventType: expenses.sync.unsuccessful generatedDate: '2024-09-01T00:00:00Z' payload: - dailyQuota: 12000 - quotaRemaining: 11993 - expiryDate: '2024-09-01T23:59:99Z' + referenceCompany: + id: 0498e921-9b53-4396-a412-4f2f5983b0a2 + name: Toft stores + description: Syncing expenses + syncId: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd + transactions: + - id: f47ac10b-58cc-4372-a567-0e02b2c3d479 + status: Completed + errorMessage: null + - id: e7f8a3d5-0c3c-4c9b-b5d3-56b4a43b62e4 + status: Failed + errorMessage: Insufficient funds responses: '200': description: Return a 200 status to indicate that the webhook was received successfully. - bankFeeds.sourceAccount.connected: + client.rateLimit.reached: post: - description: Triggered when a bank feed source account has become connected to a target account. This occurs when a user sets up mapping between the two. - x-svix-feature-flag: bank-feeds + description: Called when your client’s request count to Codat's API surpasses the allocated quota. requestBody: content: application/json: schema: - $ref: '#/components/schemas/SourceAccountWebhook' + $ref: '#/components/schemas/ClientRateLimitWebhook' examples: - Connected: + Reached: value: - id: ba29118f-5406-4e59-b05c-ba307ca38d01 - eventType: bankFeeds.sourceAccount.connected - generatedDate: '2022-10-23T00:00:00.000Z' + id: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b + eventType: client.rateLimit.reached + generatedDate: '2024-09-01T00:00:00Z' payload: - referenceCompany: - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - name: Toft stores - description: Requested early access to the new financing scheme. - links: - portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' - connectionId: 2e9d2c44-f675-40ba-8049-353bfcb5e171 - sourceAccount: - id: acc-002 - accountName: account-081 - sortCode: '040004' - accountNumber: '12345678' - currency: GBP - balance: 99.99 - modifiedDate: '2023-01-09T14:14:14.1057478Z' - status: pending + dailyQuota: 12000 + quotaRemaining: 0 + expiryDate: '2024-09-01T12:14:14Z' responses: '200': description: Return a 200 status to indicate that the webhook was received successfully. - bankFeeds.sourceAccount.disconnected: + client.rateLimit.reset: post: - description: Called when a bank feed source account has become disconnected. - x-svix-feature-flag: bank-feeds + description: 'Called when your client''s rate limit quota is reset, allowing additional requests to Codat''s API.' requestBody: content: application/json: schema: - $ref: '#/components/schemas/SourceAccountWebhook' + $ref: '#/components/schemas/ClientRateLimitWebhook' examples: - Disconnected: + Reset: value: - id: ba29118f-5406-4e59-b05c-ba307ca38d01 - eventType: bankFeeds.sourceAccount.disconnected - generatedDate: '2022-10-23T00:00:00.000Z' + id: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b + eventType: client.rateLimit.reset + generatedDate: '2024-09-01T00:00:00Z' payload: - referenceCompany: - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - name: Toft stores - description: Requested early access to the new financing scheme. - links: - portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' - connectionId: 2e9d2c44-f675-40ba-8049-353bfcb5e171 - sourceAccount: - id: acc-002 - accountName: account-081 - sortCode: '040004' - accountNumber: '12345678' - currency: GBP - balance: 99.99 - modifiedDate: '2023-01-09T14:14:14.1057478Z' - status: pending + dailyQuota: 12000 + quotaRemaining: 11993 + expiryDate: '2024-09-01T23:59:99Z' responses: '200': description: Return a 200 status to indicate that the webhook was received successfully. components: schemas: - BankAccountCredentials: - title: Bank Account Credentials - description: Result of generate credentials + Account: + title: 'Accounting: Account' + description: "\uFEFF> **Language tip:** Accounts are also referred to as **chart of accounts**, **nominal accounts**, and **general ledger**.\n\n## Overview\n\nAccounts are the categories a business uses to record accounting transactions. From the Accounts endpoints, you can retrieve a list of all accounts for a specified company.\n\nThe categories for an account include:\n* Asset\n* Expense\n* Income\n* Liability\n* Equity.\n\nThe same account may have a different category based on the integration it is used in. For example, a current account (known as checking in the US) should be categorized as `Asset.Current` for Xero, and `Asset.Bank.Checking` for QuickBooks Online.\n\nAt the same time, each integration may have its own requirements to the categories. For example, a Paypal account in Xero is of the `Asset.Bank` category and therefore requires additional properties to be provided.\n\nTo determine the list of allowed categories for a specific integration, you can:\n- Follow our [Create, update, delete data](https://docs.codat.io/using-the-api/push) guide and use the [Get create account model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-chartOfAccounts-model).\n- Refer to the integration's own documentation.\n\n> **Accounts with no category**\n>\n> If an account is pulled from the chart of accounts and its nominal code does not lie within the category layout for the company's accounts, then the **type** is `Unknown`. The **fullyQualifiedCategory** and **fullyQualifiedName** fields return `null`.\n>\n> This approach gives a true representation of the company's accounts whilst preventing distorting financials such as a company's profit and loss and balance sheet reports." + allOf: + - properties: + id: + type: string + description: 'Identifier for the account, unique for the company.' + example: 1b6266d1-1e44-46c5-8eb5-a8f98e03124e + - $ref: '#/components/schemas/Account/definitions/accountPrototype' + - properties: + metadata: + title: Metadata + type: object + x-internal: true + properties: + isDeleted: + type: boolean + description: Indicates whether the record has been deleted in the third-party system this record originated from. + nullable: true + - title: Modified dates + x-internal: true + allOf: + - title: ModifiedDate + x-internal: true + type: object + properties: + modifiedDate: + allOf: + - $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + - description: |- + The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + + Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + + This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + + In Codat's data model, dates and times are represented using the ISO 8601 standard. + - title: Source Modified Date + x-internal: true + type: object + nullable: true + properties: + sourceModifiedDate: + allOf: + - $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + - description: |- + The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + + It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + - Pulling attachments + - The accounting software does not provide modification dates for a data type + - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + + In Codat's data model, dates and times are represented using the ISO 8601 standard. + definitions: + accountPrototype: + title: Account prototype + type: object + properties: + nominalCode: + type: string + nullable: true + description: Reference given to each nominal account for a business. It ensures money is allocated to the correct account. This code isn't a unique identifier in the Codat system. + example: '610' + name: + type: string + nullable: true + description: Name of the account. + example: Accounts Receivable + description: + type: string + nullable: true + description: Description for the account. + example: Invoices the business has issued but has not yet collected payment on. + fullyQualifiedCategory: + type: string + nullable: true + description: "Full category of the account. \r\n\r\nFor example, `Liability.Current` or `Income.Revenue`. To determine a list of possible categories for each integration, see our examples, follow our [Create, update, delete data](https://docs.codat.io/using-the-api/push) guide, or refer to the integration's own documentation." + example: Asset.Current + fullyQualifiedName: + type: string + nullable: true + description: |- + Full name of the account, for example: + - `Cash On Hand` + - `Rents Held In Trust` + - `Fixed Asset` + examples: + - Cash On Hand + - Fixed Asset + currency: + title: Currency + x-internal: true + type: string + description: |- + The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. + + ## Unknown currencies + + In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction. + + There are only a very small number of edge cases where this currency code is returned by the Codat system. + format: ISO4217 + examples: + - GBP + - USD + - EUR + currentBalance: + type: number + format: decimal + nullable: true + description: Current balance in the account. + example: 0 + type: + $ref: '#/components/schemas/Account/definitions/accountType' + status: + $ref: '#/components/schemas/Account/definitions/accountStatus' + isBankAccount: + type: boolean + description: Confirms whether the account is a bank account or not. + validDatatypeLinks: + type: array + nullable: true + description: 'The validDatatypeLinks can be used to determine whether an account can be correctly mapped to another object; for example, accounts with a `type` of `income` might only support being used on an Invoice and Direct Income. For more information, see [Valid Data Type Links](/sync-for-expenses-api#/schemas/ValidDataTypeLinks).' + items: + title: Valid data type links + description: |- + When querying Codat's data model, some data types return `validDatatypeLinks` metadata in the JSON response. This indicates where that object can be used as a reference—a _valid link_—when creating or updating other data. + + For example, `validDatatypeLinks` might indicate the following references: + + - Which tax rates are valid to use on the line item of a bill. + - Which items can be used when creating an invoice. + + You can use `validDatatypeLinks` to present your SMB customers with only valid choices when selecting objects from a list, for example. + + ## `validDatatypeLinks` example + + The following example uses the `Accounting.Accounts` data type. It shows that, on the linked integration, this account is valid as the account on a payment or bill payment; and as the account referenced on the line item of a direct income or direct cost. Because there is no valid link to Invoices or Bills, using this account on those data types will result in an error. + + ```json validDatatypeLinks for an account + { + "id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", + "nominalCode": "090", + "name": "Business Bank Account", + #... + "validDatatypeLinks": [ + { + "property": "Id", + "links": [ + "Payment.AccountRef.Id", + "BillPayment.AccountRef.Id", + "DirectIncome.LineItems.AccountRef.Id", + "DirectCost.LineItems.AccountRef.Id" + ] + } + ] + } + ``` + + + + ## Support for `validDatatypeLinks` + + Codat currently supports `validDatatypeLinks` for some data types on our Xero, QuickBooks Online, QuickBooks Desktop, Exact (NL), and Sage Business Cloud integrations. + + If you'd like us to extend support to more data types or integrations, suggest or vote for this on our Product Roadmap. + type: object + properties: + property: + type: string + nullable: true + description: The property from the account that can be linked. + links: + type: array + nullable: true + description: Supported `dataTypes` that the record can be linked to. + items: + type: string + supplementalData: + $ref: '#/components/schemas/SupplementalData' + accountRef: + title: Account reference + type: object + description: 'Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account.' + properties: + id: + type: string + description: '''id'' from the Accounts data type.' + name: + type: string + description: '''name'' from the Accounts data type.' + accountType: + title: Account type + enum: + - Unknown + - Asset + - Expense + - Income + - Liability + - Equity + type: string + description: Type of account + example: Asset + accountStatus: + title: Account status + enum: + - Unknown + - Active + - Archived + - Pending + type: string + description: Status of the account + example: Active + type: object + AccountMappingInfo: + title: Account mapping info + x-internal: true + type: object + additionalProperties: false + x-examples: + Example AccountInfo: + id: 313a4dbe-b3a4-42f0-a5f5-43e382e62db9 + nominalCode: '720' + name: Travel + currency: GBP + accountType: Expense + fullyQualifiedCategory: Expense.Overhead + isBankAccount: false + validTransactionTypes: + - Payment + - Refund + validFor: + - expense-transactions.Payment + - expense-transactions.Refund + - reimbursable-expense-transactions + properties: + id: + type: string + description: Unique identifier of account. + example: 127f3b99-8dc2-4b7e-854c-91ef9bd2757b + nullable: false + nominalCode: + type: string + description: Code used to identify each nominal account in the accounting software. + example: '300' + nullable: true + name: + type: string + description: Name of the account as it appears in the company's accounting software. + example: Purchases + nullable: false + currency: + type: string + description: Currency of the account. + example: GBP + nullable: false + accountType: + type: string + description: Type of the account. + example: Expense + enum: + - Asset + - Liability + - Income + - Expense + - Equity + nullable: false + fullyQualifiedCategory: + type: string + description: Full account type and category of the account + example: Expense.DirectCosts + nullable: false + isBankAccount: + type: boolean + description: Confirms whether the account is a bank account or not. + validTransactionTypes: + $ref: '#/components/schemas/validTransactionTypes' + description: Supported transaction types for the account. + validFor: + $ref: '#/components/schemas/validFor' + description: Supported endpoints for the account. + AdjustmentTransactionLine: + x-internal: true + title: Adjustment transaction line + type: object + properties: + amount: + type: number + format: decimal + example: 50 + description: Amount of the line. A positive line represents a debit; a negative line represents a credit. + accountRef: + $ref: '#/components/schemas/RecordRef' + description: + type: string + description: 'Any private, company notes about the transaction.' + example: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + trackingRefs: + type: array + minItems: 1 + maxItems: 10 + nullable: true + items: + $ref: '#/components/schemas/TrackingRefAdjustmentTransaction' + invoiceTo: + $ref: '#/components/schemas/InvoiceTo' + required: + - amount + - accountRef + AdjustmentTransactionRequest: + title: Adjustment transaction + type: object + properties: + id: + type: string + format: uuid + description: Your unique identifier for the transaction. + date: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: Date of the transaction. + currency: + type: string + description: Currency the transaction was recorded in. + currencyRate: + $ref: '#/components/schemas/ExpenseTransaction/properties/currencyRate' + reference: + type: string + nullable: true + description: User-friendly reference for the adjustment transaction. + lines: + type: array + description: Array of transaction lines. + minItems: 1 + maxItems: 100 + items: + $ref: '#/components/schemas/AdjustmentTransactionLine' + required: + - id + - date + - currency + - lines + AdjustmentTransactionResponse: + title: Adjustment response + x-internal: true + type: object + properties: + syncId: + type: string + example: cd937d46-8e41-43a9-9477-a79158ffd98a + format: uuid + description: Unique id of sync created + apAccountRef: + x-internal: true + type: object + title: Accounts Payable account reference + nullable: true + properties: + id: + type: string + example: 8000004C-1724173136 + description: Unique identifier for the Accounts Payable account associated with the transaction. The `apAccountRef` object is currently supported only for QuickBooks Desktop. + Attachment: + title: Attachment + type: object + x-examples: + Attachment Example: + companyId: bf1e0242-5b7a-418b-a307-9e09dbf9f39a + id: '1400000000122699154' + transactionId: f8f00edd-ddb0-4ca5-b36b-8f932e6b5160 + properties: + companyId: + type: string + format: uuid + description: Unique ID of company in Codat + id: + type: string + description: Unique identifier of attachment + transactionId: + type: string + description: Unique identifier of transaction + AttachmentUpload: + title: Attachment upload + type: object + x-internal: true + required: + - file + properties: + file: + $ref: '#/components/schemas/AttachmentUpload/definitions/codatFile' + definitions: + codatFile: + type: string + description: The file to be uploaded as an attachment. + format: binary + BankAccount: + title: 'Accounting: Bank account' + description: |- + > **Accessing Bank Accounts through Banking API** + > + > This datatype was originally used for accessing bank account data both in accounting integrations and open banking aggregators. + > + > To view bank account data through the Banking API, please refer to the new [Banking: Account](https://docs.codat.io/sync-for-expenses-api#/schemas/Account) data type. + + ## Overview + + A list of bank accounts associated with a company and a specific data connection. + + Bank accounts data includes: + * The name and ID of the account in the accounting software. + * The currency and balance of the account. + * The sort code and account number. + type: object + allOf: + - properties: + id: + type: string + description: 'Identifier for the account, unique for the company in the accounting software.' + - $ref: '#/components/schemas/BankAccount/definitions/bankAccountPrototype' + - properties: + metadata: + $ref: '#/components/schemas/Account/allOf/2/properties/metadata' + supplementalData: + $ref: '#/components/schemas/SupplementalData' + - $ref: '#/components/schemas/Account/allOf/3' + definitions: + bankAccountPrototype: + title: Bank account prototype + type: object + properties: + accountName: + type: string + nullable: true + description: Name of the bank account in the accounting software. + accountType: + title: Bank Account Type + x-internal: true + enum: + - Unknown + - Credit + - Debit + type: string + description: |- + The type of transactions and balances on the account. + For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities. + For Debit accounts, positive balances are assets, and positive transactions **increase** assets. + nominalCode: + type: string + nullable: true + description: Code used to identify each nominal account for a business. + sortCode: + type: string + nullable: true + description: |- + Sort code for the bank account. + + Xero integrations + The sort code is only displayed when the currency = GBP and the sort code and account number sum to 14 digits. For non-GBP accounts, this field is not populated. + accountNumber: + type: string + nullable: true + description: |- + Account number for the bank account. + + Xero integrations + Only a UK account number shows for bank accounts with GBP currency and a combined total of sort code and account number that equals 14 digits, For non-GBP accounts, the full bank account number is populated. + + FreeAgent integrations + For Credit accounts, only the last four digits are required. For other types, the field is optional. + iBan: + type: string + nullable: true + description: International bank account number of the account. Often used when making or receiving international payments. + currency: + $ref: '#/components/schemas/Account/definitions/accountPrototype/properties/currency' + description: Base currency of the bank account. + balance: + type: number + format: decimal + nullable: true + description: Balance of the bank account. + institution: + type: string + nullable: true + description: The institution of the bank account. + availableBalance: + type: number + format: decimal + nullable: true + description: Total available balance of the bank account as reported by the underlying data source. This may take into account overdrafts or pending transactions for example. + overdraftLimit: + type: number + format: decimal + nullable: true + description: |- + Pre-arranged overdraft limit of the account. + + The value is always positive. For example, an overdraftLimit of `1000` means that the balance of the account can go down to `-1000`. + status: + $ref: '#/components/schemas/BankAccount/definitions/bankAccountStatus' + bankAccountCreateResponse: + title: Create bank account response + allOf: + - properties: + data: + allOf: + - $ref: '#/components/schemas/BankAccount' + - deprecated: true + - $ref: '#/components/schemas/PushOperation' + bankAccountRef: + title: Bank account reference + type: object + properties: + id: + type: string + description: Bank account 'id' for the account transaction. + name: + type: string + description: bank account 'name' for the account transaction. + description: Links to the Account transactions data type. + bankAccounts: + title: 'Accounting: Bank accounts' + allOf: + - type: object + properties: + results: + type: array + items: + $ref: '#/components/schemas/BankAccount' + - $ref: '#/components/schemas/PagingInfo' + bankAccountStatus: + title: Account status + enum: + - Unknown + - Active + - Archived + - Pending + type: string + description: Status of the bank account. + example: Active + ClientRateLimitWebhook: + title: Client rate limit webhook type: object properties: - username: + id: type: string - example: S0MW-TR0P-7DS0 - description: Username used by the bank feeds platform to retrieve transactions - password: + format: uuid + example: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b + description: Unique identifier of the event. + eventType: type: string - example: cO0ajh0uGyTN0Pwh - description: Password to enable the bank feeds platform to securely retrieve transactions. - examples: - - QuickBooks Online Bank Feeds: null - username: S0MW-TR0P-7DS0 - password: cO0ajh0uGyTN0Pwh - BankAccounts: + description: The type of event. + examples: + - client.rateLimit.reset + - client.rateLimit.reached + generatedDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: The date time in UTC the event was generated in Codat. + payload: + $ref: '#/components/schemas/ClientRateLimitWebhook/definitions/clientRateLimitWebhookPayload' + definitions: + clientRateLimitWebhookPayload: + title: Client rate limit webhook payload + type: object + properties: + dailyQuota: + type: integer + description: The number of available requests per day. + quotaRemaining: + type: integer + description: Total number of requests remaining for your client. + expiryDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: The date time in UTC when your daily quota is reset. + Companies: + title: Companies x-internal: true - title: 'Accounting: Bank accounts' allOf: - type: object properties: results: type: array items: - title: 'Accounting: Bank account' - description: |- - > **Accessing Bank Accounts through Banking API** - > - > This datatype was originally used for accessing bank account data both in accounting integrations and open banking aggregators. - > - > To view bank account data through the Banking API, please refer to the new [Banking: Account](https://docs.codat.io/bank-feeds-api#/schemas/Account) data type. - - ## Overview - - A list of bank accounts associated with a company and a specific data connection. - - Bank accounts data includes: - * The name and ID of the account in the accounting software. - * The currency and balance of the account. - * The sort code and account number. - type: object - allOf: - - properties: - id: - type: string - description: 'Identifier for the account, unique for the company in the accounting software.' - - $ref: '#/components/schemas/BankAccounts/allOf/0/properties/results/items/definitions/bankAccountPrototype' - - properties: - metadata: - title: Metadata - type: object - x-internal: true - properties: - isDeleted: - type: boolean - description: Indicates whether the record has been deleted in the third-party system this record originated from. - nullable: true - supplementalData: - title: Supplemental data - type: object - x-internal: true - description: |- - Supplemental data is additional data you can include in our standard data types. - - It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. - properties: - content: - type: object - additionalProperties: - type: object - additionalProperties: true - nullable: true - - title: Modified dates - x-internal: true - allOf: - - title: ModifiedDate - x-internal: true - type: object - properties: - modifiedDate: - allOf: - - $ref: '#/components/schemas/DateTime' - - description: |- - The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. - - Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. - - This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). - - In Codat's data model, dates and times are represented using the ISO 8601 standard. - - title: Source Modified Date - x-internal: true - type: object - nullable: true - properties: - sourceModifiedDate: - allOf: - - $ref: '#/components/schemas/DateTime' - - description: |- - The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. - - It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: - - Pulling attachments - - The accounting software does not provide modification dates for a data type - - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred - - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records - - In Codat's data model, dates and times are represented using the ISO 8601 standard. - definitions: - bankAccountPrototype: - title: Bank account prototype - type: object - properties: - accountName: - type: string - nullable: true - description: Name of the bank account in the accounting software. - accountType: - title: Bank Account Type - x-internal: true - enum: - - Unknown - - Credit - - Debit - type: string - description: |- - The type of transactions and balances on the account. - For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities. - For Debit accounts, positive balances are assets, and positive transactions **increase** assets. - nominalCode: - type: string - nullable: true - description: Code used to identify each nominal account for a business. - sortCode: - type: string - nullable: true - description: |- - Sort code for the bank account. - - Xero integrations - The sort code is only displayed when the currency = GBP and the sort code and account number sum to 14 digits. For non-GBP accounts, this field is not populated. - accountNumber: - type: string - nullable: true - description: |- - Account number for the bank account. - - Xero integrations - Only a UK account number shows for bank accounts with GBP currency and a combined total of sort code and account number that equals 14 digits, For non-GBP accounts, the full bank account number is populated. - - FreeAgent integrations - For Credit accounts, only the last four digits are required. For other types, the field is optional. - iBan: - type: string - nullable: true - description: International bank account number of the account. Often used when making or receiving international payments. - currency: - $ref: '#/components/schemas/SourceAccount/properties/currency' - description: Base currency of the bank account. - balance: - type: number - format: decimal - nullable: true - description: Balance of the bank account. - institution: - type: string - nullable: true - description: The institution of the bank account. - availableBalance: - type: number - format: decimal - nullable: true - description: Total available balance of the bank account as reported by the underlying data source. This may take into account overdrafts or pending transactions for example. - overdraftLimit: - type: number - format: decimal - nullable: true - description: |- - Pre-arranged overdraft limit of the account. + $ref: '#/components/schemas/Company' + - $ref: '#/components/schemas/PagingInfo' + Company: + title: Company + description: "\uFEFFIn Codat, a company represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/sync-for-expenses-api#/schemas/Connection) to different data sources such as one connection to [Xero](https://docs.codat.io/integrations/accounting/xero/accounting-xero) for accounting data, two connections to [Plaid](https://docs.codat.io/integrations/banking/plaid/banking-plaid) for two bank accounts and a connection to [Zettle](https://docs.codat.io/integrations/commerce/zettle/commerce-zettle) for POS data.\n\nTypically each company is one of your customers.\n\nWhen you create a company, you can specify a `name` and we will automatically generate a unique `id` for the company. You can also add a `description` to store any additional information about the company." + type: object + allOf: + - $ref: '#/components/schemas/Company/definitions/companyDetails' + - type: object + properties: + dataConnections: + type: array + items: + $ref: '#/components/schemas/Connection' + definitions: + companyDetails: + title: Company details + type: object + properties: + id: + $ref: '#/components/parameters/companyId/schema' + name: + type: string + description: The name of the company + example: Codat Ltd. + description: + $ref: '#/components/schemas/CompanyRequestBody/properties/description' + nullable: true + redirect: + type: string + format: uri + description: 'The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company.' + example: 'https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739' + lastSync: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + nullable: true + created: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + createdByUserName: + type: string + description: Name of user that created the company in Codat. + nullable: true + products: + type: array + items: + type: string + description: An array of products that are currently enabled for the company. + tags: + title: Tags + type: object + maxProperties: 10 + propertyNames: + pattern: '^.{1,27}$' + additionalProperties: + type: string + maxLength: 100 + description: A collection of user-defined key-value pairs that store custom metadata against the company. + referenceParentCompany: + $ref: '#/components/schemas/Company/definitions/companyReference' + nullable: true + description: The parent entity or controlling organization of this company. Null if the company has no parent. + referenceSubsidiaryCompanies: + type: array + nullable: false + description: A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + minItems: 0 + items: + $ref: '#/components/schemas/Company/definitions/companyReference' + required: + - id + - name + - redirect + companyReference: + title: Company reference + type: object + properties: + id: + $ref: '#/components/parameters/companyId/schema' + name: + $ref: '#/components/schemas/Company/definitions/companyDetails/properties/name' + description: + $ref: '#/components/schemas/Company/definitions/companyDetails/properties/description' + links: + type: object + description: A collection of links for the company. + properties: + portal: + type: string + format: uri + description: Link to the company page in the portal. + tags: + $ref: '#/components/schemas/Company/definitions/companyDetails/properties/tags' + examples: + - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 + name: string + redirect: 'https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739' + lastSync: '2022-01-01T12:00:00.000Z' + created: '2022-01-01T12:00:00.000Z' + createdByUserName: string + tags: + region: us + uid: f6b0c253-16c7-4da1-a0c5-9c871e9c9d6c + dataConnections: + - id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd + integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c + integrationKey: dfxm + sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee + platformName: Basiq + linkUrl: 'https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' + status: Linked + lastSync: '2022-10-27T10:22:43.6464237Z' + created: '2022-10-27T09:53:29Z' + sourceType: Banking + products: + - spend-insights + - lending + CompanyConfiguration: + required: + - bankAccount + - supplier + - customer + title: Company configuration + type: object + x-examples: + Config Example: + bankAccount: + id: '89' + supplier: + id: '124' + customer: + id: '140' + properties: + bankAccount: + $ref: '#/components/schemas/CompanyConfiguration/definitions/BankAccountDetails' + supplier: + $ref: '#/components/schemas/CompanyConfiguration/definitions/SupplierDetails' + customer: + $ref: '#/components/schemas/CompanyConfiguration/definitions/CustomerDetails' + definitions: + BankAccountDetails: + title: Bank account details + type: object + properties: + id: + type: string + description: The id of the account from which purchases are made + example: '32' + SupplierDetails: + title: Supplier details + type: object + properties: + id: + $ref: '#/components/schemas/Supplier/allOf/0/properties/id' + CustomerDetails: + title: Customer details + type: object + properties: + id: + $ref: '#/components/schemas/Customer/allOf/0/properties/id' + CompanyInformation: + title: 'Accounting: Company information' + description: |- + Company info provides standard details about a linked company such as their address, phone number, and company registration. - The value is always positive. For example, an overdraftLimit of `1000` means that the balance of the account can go down to `-1000`. - status: - $ref: '#/components/schemas/BankAccounts/allOf/0/properties/results/items/definitions/bankAccountStatus' - bankAccountCreateResponse: - title: Create bank account response - allOf: - - properties: - data: - allOf: - - $ref: '#/components/schemas/BankAccounts/allOf/0/properties/results/items' - - deprecated: true - - $ref: '#/components/schemas/PushOperation' - bankAccountRef: - title: Bank account reference - type: object - properties: - id: - type: string - description: Bank account 'id' for the account transaction. - name: - type: string - description: bank account 'name' for the account transaction. - description: Links to the Account transactions data type. - bankAccounts: - title: 'Accounting: Bank accounts' - allOf: - - type: object - properties: - results: - type: array - items: - $ref: '#/components/schemas/BankAccounts/allOf/0/properties/results/items' - - $ref: '#/components/schemas/Companies/allOf/1' - bankAccountStatus: - title: Account status - enum: - - Unknown - - Active - - Archived - - Pending - type: string - description: Status of the bank account. - example: Active - - $ref: '#/components/schemas/Companies/allOf/1' - BankFeedAccountMapping: - title: Bank feed account mapping + > **Company information or companies?** + > + > Company information is standard information that is held in the accounting software about a company. `Companies` is an endpoint that lists businesses in the Codat system that have linked and shared their data sources. type: object - additionalProperties: false properties: - sourceAccountId: + companyName: + type: string + nullable: true + description: Name of the linked company. + accountingPlatformRef: type: string - description: Unique ID for the source account - targetAccountId: + nullable: true + description: Identifier or reference for the company in the accounting software. + companyLegalName: type: string nullable: true - description: Unique ID for the target account - feedStartDate: - $ref: '#/components/schemas/DateTime' + description: Registered legal name of the linked company. + addresses: + type: array nullable: true - description: The date from which bank transactions can be provided to the platform. - required: - - sourceAccountId + description: An array of Addresses. + items: + title: 'Accounting: Address' + x-internal: true + type: object + properties: + type: + $ref: '#/components/schemas/CompanyInformation/properties/addresses/items/definitions/accountingAddressType' + line1: + type: string + nullable: true + description: Line 1 of the customer address. + line2: + type: string + nullable: true + description: Line 2 of the customer address. + city: + type: string + nullable: true + description: City of the customer address. + region: + type: string + nullable: true + description: Region of the customer address. + country: + type: string + nullable: true + description: Country of the customer address. + postalCode: + type: string + nullable: true + description: Postal code or zip code. + required: + - type + definitions: + accountingAddressType: + description: The type of the address + type: string + enum: + - Unknown + - Billing + - Delivery + phoneNumbers: + type: array + nullable: true + description: An array of phone numbers. + items: + title: Phone + type: object + x-internal: true + properties: + number: + type: string + nullable: true + examples: + - +44 25691 154789 + - (877) 492-8687 + - 01224 658 999 + description: A phone number. + type: + description: The type of phone number + type: string + enum: + - Primary + - Landline + - Mobile + - Fax + - Unknown + required: + - type + webLinks: + type: array + nullable: true + description: An array of weblinks. + items: + title: Weblink + description: Weblink associated with the company. + type: object + properties: + type: + description: The type of the weblink. + type: string + enum: + - Website + - Social + - Unknown + url: + description: The full URL for the weblink. + type: string + format: url + example: + type: Website + url: 'https://codat.io' + ledgerLockDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: 'If set in the accounting software, the date (in the ISO 8601 date/time format) after which accounting transactions cannot be edited. Commonly used when books are closed at year-end.' + registrationNumber: + type: string + nullable: true + description: Registration number given to the linked company by the companies authority in the country of origin. In the UK this is Companies House. + taxNumber: + type: string + nullable: true + description: Company tax number. + financialYearStartDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: Start date of the financial year for the company. + baseCurrency: + type: string + nullable: true + description: Currency set in the accounting software of the linked company. Used by the currency rate. + sourceUrls: + type: object + additionalProperties: + type: string + nullable: true + nullable: true + description: |- + URL addresses for the accounting source. + + For example, for Xero integrations two URLs are returned. These have many potential use cases, such as [deep linking](https://developer.xero.com/documentation/api-guides/deep-link-xero). + createdDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: Date the linked company was created in the accounting software. + supplementalData: + $ref: '#/components/schemas/SupplementalData' examples: - - sourceAccountId: acc-002 - targetAccountId: account-081 - BankFeedAccountMappingResponse: - title: Bank feed account mapping response + - companyName: ACME Corporation + accountingPlatformRef: 4444e827-401b-4925-92cb-d79086bf3b6b + companyLegalName: ACME Corporation Ltd. + addresses: + - type: Billing + line1: Warner House + line2: 98 Theobald's Road + city: London + region: '' + country: United Kingdom + postalcode: WC1X 8WB + - type: Unknown + line1: 123 Sierra Way + line2: '' + city: San Pablo + region: CA + country: '' + postalCode: '87999' + phoneNumbers: + - number: 010 1234 5678 + type: Landline + webLinks: + - type: Website + url: 'https://www.wbsl.com/' + ledgerLockDate: '2019-03-04T12:08:01.881Z' + registrationNumber: '1234567890' + taxNumber: GB 123456789 + financialYearStartDate: '2019-04-01T00:00:00Z' + baseCurrency: USD + sourceUrls: + url1: 'https://go.xero.com/organisationlogin/default.aspx?shortcode=!rxs0Q' + url2: 'https://reporting.xero.com/!rxs0Q' + createdDate: '2020-02-03T16:42:02Z' + CompanyRequestBody: + title: Create company request + x-internal: true + type: object + properties: + name: + type: string + description: Name of company being connected. + pattern: '^[A-Za-z0-9\s\-'',&@.,?!\s]+$' + minLength: 1 + example: Bank of Dave + description: + type: string + example: Requested early access to the new financing scheme. + description: 'Additional information about the company. This can be used to store foreign IDs, references, etc.' + tags: + $ref: '#/components/schemas/Company/definitions/companyDetails/properties/tags' + required: + - name + CompanySyncStatus: + title: Company sync status type: object additionalProperties: false + x-examples: + Success Data Pushed: + companyId: 20803807-4e9a-4cb7-b67b-9f889a3916e1 + syncId: aa4c9dfd-e945-4424-9628-9e724f14c267 + syncStatusCode: 2000 + syncStatus: Complete + errorMessage: '' + syncExceptionMessage: '' + syncUtc: '2023-01-24T14:15:22Z' + dataPushed: true + Success No Data Pushed: + companyId: 20803807-4e9a-4cb7-b67b-9f889a3916e1 + syncId: aa4c9dfd-e945-4424-9628-9e724f14c267 + syncStatusCode: 2040 + syncStatus: Complete + errorMessage: '' + syncExceptionMessage: '' + syncUtc: '2023-01-24T14:15:22Z' + dataPushed: false properties: - sourceAccountId: + companyId: type: string - description: Unique ID for the source account. - targetAccountId: + description: Unique identifier for your SMB in Codat. + example: d4d73051-ed31-42b6-99f6-d288cd940992 + nullable: true + syncId: type: string + description: Unique identifier of the sync. + example: a6a22aff-a43a-411d-a910-2dae73217cce nullable: true - description: Unique ID for the target account. - status: + syncStatusCode: + type: integer + format: int32 + description: Status code of the sync. + example: 2000 + syncStatus: + type: string + description: Text status of the sync. + examples: + - Complete + - PushError + - Started + - NotStarted + - Pushing + nullable: true + errorMessage: type: string + description: Error message of the sync. nullable: true - description: Status of the POST request. - error: + syncExceptionMessage: type: string + description: Exception message of the sync. nullable: true - description: Error returned during the post request - examples: - - sourceAccountId: acc-002 - targetAccountId: account-081 - status: Failed - error: A feed connection already exists to this account - BankFeedMapping: - title: Bank feed mapping + syncUtc: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: Datetime of the sync. + nullable: true + dataPushed: + type: boolean + description: Boolean of whether the sync resulted in data being pushed. + CompanyUpdateRequest: + title: Update company request + x-internal: true + type: object + properties: + name: + type: string + description: Name of company being connected. + pattern: '^[A-Za-z0-9\s\-'',&@.,?!\s]+$' + minLength: 1 + example: Bank of Dave + description: + $ref: '#/components/schemas/CompanyRequestBody/properties/description' + tags: + $ref: '#/components/schemas/Company/definitions/companyDetails/properties/tags' + Connection: + title: Connection + description: "\uFEFFA connection represents a [company's](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) connection to a data source and allows you to synchronize data (pull and/or push) with that source.\n\nA company can have multiple data connections depending on the type of data source it is connecting to. For example, a single company can link to:\n\n- [Accounting data](https://docs.codat.io/accounting-api/overview) - 1 active connection.\n- [Banking data](https://docs.codat.io/banking-api/overview) - Multiple active connections.\n- [Commerce data](https://docs.codat.io/commerce-api/overview) - Multiple active connections.\nAny combination of accounting, banking, and commerce data connections is allowed.\n\nBefore you can use a data connection to pull or push data, the company must grant you access to their business data by [linking the connection](https://docs.codat.io/auth-flow/overview)." type: object - additionalProperties: false properties: - sourceAccountId: + id: + $ref: '#/components/parameters/connectionId/schema' + integrationId: type: string - description: Unique ID for the source account. - sourceAccountName: + format: uuid + example: fd321cb6-7963-4506-b873-e99593a45e30 + description: A Codat ID representing the integration. + integrationKey: type: string - description: Name for the source account. - sourceAccountNumber: + description: A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. + sourceId: type: string - description: Account number for the source account. - sourceBalance: - type: number - format: decimal - description: Balance for the source account. - sourceCurrency: - $ref: '#/components/schemas/SourceAccount/properties/currency' - targetAccountId: + format: uuid + example: 35b92968-9851-4095-ad60-395c95cbcba4 + description: 'A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`.' + sourceType: + title: Source Type + description: The type of platform of the connection. type: string - nullable: true - description: Unique ID for the target account in the accounting software. - targetAccountName: + enum: + - Accounting + - Banking + - BankFeed + - Commerce + - Expense + - Other + - Unknown + example: Accounting + platformName: type: string - description: Name for the target account in the accounting software. - status: + description: Name of integration connected to company. + linkUrl: type: string - description: The status. - targetAccountOptions: + format: uri + description: The link URL your customers can use to authorize access to their business application. + example: 'https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/2e2eb431-c1fa-4dc9-93fa-d29781c12bcd/start' + status: + $ref: '#/components/schemas/Connection/definitions/dataConnectionStatus' + lastSync: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + nullable: true + created: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + dataConnectionErrors: type: array nullable: true - description: An array of potential target accounts. items: - $ref: '#/components/schemas/BankFeedMapping/definitions/targetAccountOption' - feedStartDate: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/Connection/definitions/dataConnectionError' + connectionInfo: + type: object nullable: true - description: The date from which bank transactions can be provided to the platform. - description: 'A bank feed connection between a source account and a target account, including potential target accounts.' + additionalProperties: true + additionalProperties: false + required: + - id + - integrationId + - sourceId + - platformName + - linkUrl + - status + - created + - sourceType definitions: - targetAccountOption: - title: Target Account Option + dataConnectionStatus: + title: Data connection status + description: The current authorization status of the data connection. + type: string + enum: + - PendingAuth + - Linked + - Unlinked + - Deauthorized + dataConnectionError: + title: Data connection error type: object properties: - id: + statusCode: type: string - description: Id of the target account. - name: + description: The HTTP status code returned by the source platform when the error occurred. + statusText: type: string - nullable: true - description: Name of the target account. - balance: - type: number - format: decimal - nullable: true - description: The balance of the account. - sortCode: + description: A non-numeric status code/text returned by the source platform when the error occurred. + errorMessage: type: string - nullable: true - description: The sort code of the account. - accountNumber: + description: A message about a error returned by Codat. + erroredOnUtc: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + status: + title: Error status + description: The current status of a transient error. Null statuses indicate that the error is not transient. type: string nullable: true - description: The account number of the account. - bankFeedMappings: - title: Bank feed mappings - type: array - items: - $ref: '#/components/schemas/BankFeedMapping' - additionalProperties: false - examples: - - sourceAccountId: acc-002 - targetAccountId: account-081 - sourceCurrency: USD - status: Success - feedStartDate: '2023-01-09T14:14:14.1057478Z' - sourceAccountName: ACME Bank - sourceAccountNumber: 1234-5678 - sourceBalance: 500 - targetAccountName: ACME Bank - - sourceAccountId: c53fd75a-dddb-4493-839a-5090b008f625 - status: pending - targetAccountOptions: - - name: account-081 - id: 044096a7-1478-4554-8820-f478caad1b00 - balance: 100.99 - sortCode: '602336' - accountNumber: '23203' - sourceAccountName: bank name here - sourceAccountNumber: '5670' - sourceBalance: 1550 - sourceCurrency: GBP - BankTransactions: - title: Bank transactions - type: array - maxItems: 1000 - items: - title: Bank transaction - type: object - properties: - id: - type: string - description: 'Identifier for the bank account transaction, unique for the company in the accounting software.' - example: '716422529' - date: - title: Local date time - type: string - examples: - - '2023-08-22T10:21:00' - - '2023-08-22' - description: |- - In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - - ``` - 2023-08-22T10:21:00 - 2023-08-22 - ``` - - When pushing bank transaction data to Codat, the date is treated as a local date. This means: - - - The date/time is used exactly as provided, without any timezone conversion. - - If a timezone offset is included (e.g., `2023-08-22T10:21:00-05:00`), the offset will be ignored and only the local date/time portion will be used. - - We recommend providing dates without a timezone suffix for clarity (e.g., `2023-08-22T10:21:00` rather than `2023-08-22T10:21:00Z`). - description: - type: string - nullable: true - description: Description of the bank transaction. - example: Debit for Payment Id sdp-1-57379a43-c4b8-49f5-bd7c-699189ee7a60 - counterparty: - type: string - nullable: true - description: The giving or receiving party such as a person or organization. - example: ACME INC - reference: - type: string - nullable: true - description: An optional reference to the bank transaction. - example: reference for transaction - reconciled: - type: boolean - nullable: true - description: '`True` if the bank transaction has been [reconciled](https://www.xero.com/uk/guides/what-is-bank-reconciliation/) in the accounting software.' - example: false - amount: - type: number - format: decimal - description: The amount transacted in the bank transaction. - example: 999.99 - balance: - type: number - format: decimal - description: 'The remaining balance in the account with ID `accountId`. This field is optional for QuickBooks Online but is required for Xero, Sage, NetSuite, Exact, and FreeAgent.' - example: -999.99 - transactionType: - title: Bank transaction type - nullable: true - description: Type of transaction for the bank statement line. - type: string - enum: - - Unknown - - Credit - - Debit - - Int - - Div - - Fee - - SerChg - - Dep - - Atm - - Pos - - Xfer - - Check - - Payment - - Cash - - DirectDep - - DirectDebit - - RepeatPmt - - Other - ClientRateLimitWebhook: - title: Client rate limit webhook - type: object - properties: - id: - type: string - format: uuid - example: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b - description: Unique identifier of the event. - eventType: + enum: + - Active + - Resolved + resolvedOnUtc: + description: The datetime in Utc that the error was resolved. + nullable: true + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + dataConnectionSourceType: + title: Source Type + description: The type of platform of the connection. type: string - description: The type of event. - examples: - - client.rateLimit.reset - - client.rateLimit.reached - generatedDate: - $ref: '#/components/schemas/DateTime' - description: The date time in UTC the event was generated in Codat. - payload: - $ref: '#/components/schemas/ClientRateLimitWebhook/definitions/clientRateLimitWebhookPayload' - definitions: - clientRateLimitWebhookPayload: - title: Client rate limit webhook payload - type: object - properties: - dailyQuota: - type: integer - description: The number of available requests per day. - quotaRemaining: - type: integer - description: Total number of requests remaining for your client. - expiryDate: - $ref: '#/components/schemas/DateTime' - description: The date time in UTC when your daily quota is reset. - Companies: - title: Companies + enum: + - Accounting + - Banking + - BankFeed + - Commerce + - Expense + - Other + - Unknown + example: Accounting + example: + id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd + integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c + integrationKey: dfxm + sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee + platformName: Basiq + linkUrl: 'https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' + status: Linked + lastSync: '2022-10-27T10:22:43.6464237Z' + created: '2022-10-27T09:53:29Z' + sourceType: Banking + Connections: + title: Connections x-internal: true allOf: - type: object @@ -3724,588 +11271,728 @@ components: results: type: array items: - $ref: '#/components/schemas/Company' + $ref: '#/components/schemas/Connection' + - $ref: '#/components/schemas/PagingInfo' + CreateAccountResponse: + title: Create account response + x-internal: true + allOf: - type: object - title: Pagination information - x-internal: true properties: - pageNumber: - type: integer - description: Current page number. - pageSize: - type: integer - description: Number of items to return in results array. - maximum: 2000 - totalResults: - type: integer - description: Total number of items. - _links: - $ref: '#/components/schemas/Companies/allOf/1/definitions/links' - definitions: - links: - title: Hal Links - type: object - required: - - self - - current - properties: - self: - $ref: '#/components/schemas/Companies/allOf/1/definitions/halRef' - current: - $ref: '#/components/schemas/Companies/allOf/1/definitions/halRef' - next: - $ref: '#/components/schemas/Companies/allOf/1/definitions/halRef' - previous: - $ref: '#/components/schemas/Companies/allOf/1/definitions/halRef' - examples: - - self: - href: /companies - current: - href: /companies?page=1&pageSize=10 - halRef: - title: Hypertext reference - type: object - properties: - href: - type: string - format: uri-reference - description: Uri hypertext reference. - required: - - pageNumber - - pageSize - - totalResults - - _links - examples: - - pageNumber: 1 - pageSize: 10 - totalResults: 1 - _links: - self: - href: '/companies/{id}/data/{dataType}' - current: - href: '/companies/{id}/data/{dataType}?page=1&pageSize=10' - Company: - title: Company - description: "\uFEFFIn Codat, a company represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) to different data sources such as one connection to [Xero](https://docs.codat.io/integrations/accounting/xero/accounting-xero) for accounting data, two connections to [Plaid](https://docs.codat.io/integrations/banking/plaid/banking-plaid) for two bank accounts and a connection to [Zettle](https://docs.codat.io/integrations/commerce/zettle/commerce-zettle) for POS data.\n\nTypically each company is one of your customers.\n\nWhen you create a company, you can specify a `name` and we will automatically generate a unique `id` for the company. You can also add a `description` to store any additional information about the company." + data: + allOf: + - $ref: '#/components/schemas/Account' + - deprecated: true + - $ref: '#/components/schemas/PushOperation' + CreateAdjustmentRequest: + title: Create adjustment request + x-internal: true + type: array + minItems: 1 + maxItems: 50 + items: + $ref: '#/components/schemas/AdjustmentTransactionRequest' + CreateBankAccountResponse: + title: Create bank account response + x-internal: true + allOf: + - type: object + properties: + data: + allOf: + - $ref: '#/components/schemas/BankAccount' + - deprecated: true + - $ref: '#/components/schemas/PushOperation' + CreateCustomerResponse: + title: Create customer response + x-internal: true + allOf: + - type: object + properties: + data: + allOf: + - $ref: '#/components/schemas/Customer' + - deprecated: true + - $ref: '#/components/schemas/PushOperation' + CreateExpenseRequest: + title: Create expense request + x-internal: true + type: array + minItems: 1 + maxItems: 50 + items: + $ref: '#/components/schemas/ExpenseTransaction' + CreateExpenseResponse: + title: Create expense response + x-internal: true + type: object + properties: + syncId: + type: string + example: cd937d46-8e41-43a9-9477-a79158ffd98a + format: uuid + description: Unique id of sync created + CreateReimbursableExpenseResponse: + title: Create reimbursable expense response + x-internal: true type: object + properties: + syncId: + type: string + example: cd937d46-8e41-43a9-9477-a79158ffd98a + format: uuid + description: Unique id of sync created + CreateSupplierResponse: + title: Create supplier response + x-internal: true allOf: - - $ref: '#/components/schemas/Company/definitions/companyDetails' - type: object properties: - dataConnections: - type: array - items: - $ref: '#/components/schemas/Connection' - definitions: - companyDetails: - title: Company details - type: object + data: + allOf: + - $ref: '#/components/schemas/Supplier' + - deprecated: true + - $ref: '#/components/schemas/PushOperation' + Customer: + title: 'Accounting: Customer' + description: | + ## Overview + + A customer is a person or organisation that buys goods or services. From the Customers endpoints, you can retrieve a [list of all the customers of a company](https://api.codat.io/swagger/index.html#/Customers/get_companies__companyId__data_customers). + + Customers' data links to accounts receivable [invoices](https://docs.codat.io/sync-for-expenses-api#/schemas/Invoice). + type: object + allOf: + - type: object properties: id: - $ref: '#/components/parameters/companyId/schema' - name: type: string - description: The name of the company - example: Codat Ltd. - description: - $ref: '#/components/schemas/CompanyRequestBody/properties/description' + description: 'Identifier for the customer, unique to the company in the accounting software.' + customerName: + type: string nullable: true - redirect: + description: 'Name of the customer as recorded in the accounting system, typically the company name.' + contactName: type: string - format: uri - description: 'The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company.' - example: 'https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739' - lastSync: - $ref: '#/components/schemas/DateTime' nullable: true - created: - $ref: '#/components/schemas/DateTime' - createdByUserName: + description: Name of the main contact for the identified customer. + emailAddress: type: string - description: Name of user that created the company in Codat. nullable: true - products: + description: Email address the customer can be contacted by. + defaultCurrency: + $ref: '#/components/schemas/Account/definitions/accountPrototype/properties/currency' + description: Default currency the transactional data of the customer is recorded in. + phone: + type: string + nullable: true + description: Phone number the customer can be contacted by. + addresses: type: array - items: - type: string - description: An array of products that are currently enabled for the company. - tags: - title: Tags - type: object - maxProperties: 10 - propertyNames: - pattern: '^.{1,27}$' - additionalProperties: - type: string - maxLength: 100 - description: A collection of user-defined key-value pairs that store custom metadata against the company. - referenceParentCompany: - $ref: '#/components/schemas/Company/definitions/companyReference' nullable: true - description: The parent entity or controlling organization of this company. Null if the company has no parent. - referenceSubsidiaryCompanies: + description: An array of Addresses. + items: + $ref: '#/components/schemas/CompanyInformation/properties/addresses/items' + contacts: type: array - nullable: false - description: A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. - minItems: 0 + nullable: true + description: An array of Contacts. items: - $ref: '#/components/schemas/Company/definitions/companyReference' + $ref: '#/components/schemas/Customer/definitions/contact' + registrationNumber: + type: string + nullable: true + description: 'Company number. In the UK, this is typically the Companies House company registration number.' + taxNumber: + type: string + nullable: true + description: Company tax number. + status: + $ref: '#/components/schemas/Customer/definitions/customerStatus' + description: Current state of the customer. + metadata: + $ref: '#/components/schemas/Account/allOf/2/properties/metadata' + supplementalData: + $ref: '#/components/schemas/SupplementalData' + - $ref: '#/components/schemas/Account/allOf/3' + required: + - status + definitions: + accountingCustomerRef: + type: object + properties: + id: + minLength: 1 + type: string + description: '`id` from the Customers data type' + companyName: + type: string + nullable: true + description: '`customerName` from the Customer data type' required: - id - - name - - redirect - companyReference: - title: Company reference + customerStatus: + description: Status of customer. + type: string + enum: + - Unknown + - Active + - Archived + contact: type: object properties: - id: - $ref: '#/components/parameters/companyId/schema' name: - $ref: '#/components/schemas/Company/definitions/companyDetails/properties/name' - description: - $ref: '#/components/schemas/Company/definitions/companyDetails/properties/description' - links: - type: object - description: A collection of links for the company. - properties: - portal: - type: string - format: uri - description: Link to the company page in the portal. - tags: - $ref: '#/components/schemas/Company/definitions/companyDetails/properties/tags' + type: string + nullable: true + description: Name of a contact for a customer. + email: + type: string + nullable: true + description: Email of a contact for a customer. + phone: + type: array + nullable: true + description: An array of Phone numbers. + items: + $ref: '#/components/schemas/CompanyInformation/properties/phoneNumbers/items' + address: + $ref: '#/components/schemas/CompanyInformation/properties/addresses/items' + description: An object of Address information. + status: + $ref: '#/components/schemas/Customer/definitions/customerStatus' + modifiedDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + required: + - status + Customers: + title: Customers + x-internal: true + allOf: + - type: object + properties: + results: + type: array + items: + $ref: '#/components/schemas/Customer' + - $ref: '#/components/schemas/PagingInfo' + DataStatus: + title: Data status + description: Describes the state of data in the Codat cache for a company and data type + type: object + required: + - dataType + - currentStatus + properties: + dataType: + title: Data types + x-internal: true + type: string + description: Available data types + enum: + - accountTransactions + - balanceSheet + - bankAccounts + - bankTransactions + - billCreditNotes + - billPayments + - bills + - cashFlowStatement + - chartOfAccounts + - company + - creditNotes + - customers + - directCosts + - directIncomes + - invoices + - itemReceipts + - items + - journalEntries + - journals + - paymentMethods + - payments + - profitAndLoss + - purchaseOrders + - salesOrders + - suppliers + - taxRates + - trackingCategories + - transfers + - banking-accountBalances + - banking-accounts + - banking-transactionCategories + - banking-transactions + - commerce-companyInfo + - commerce-customers + - commerce-disputes + - commerce-locations + - commerce-orders + - commerce-paymentMethods + - commerce-payments + - commerce-productCategories + - commerce-products + - commerce-taxComponents + - commerce-transactions + example: invoices + lastSuccessfulSync: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + currentStatus: + $ref: '#/components/schemas/PullOperation/properties/status' + latestSyncId: + type: string + description: Unique identifier for most recent sync of data type. + format: uuid + example: ad474a37-2003-478e-baee-9af9f1ec2fe3 + latestSuccessfulSyncId: + type: string + description: Unique identifier for the most recent successful sync of data type. + format: uuid + example: 8220fc90-55b6-47bc-9417-48ac6ea93101 examples: - - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - name: string - redirect: 'https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739' - lastSync: '2022-01-01T12:00:00.000Z' - created: '2022-01-01T12:00:00.000Z' - createdByUserName: string - tags: - region: us - uid: f6b0c253-16c7-4da1-a0c5-9c871e9c9d6c - dataConnections: - - id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd - integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c - integrationKey: dfxm - sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee - platformName: Basiq - linkUrl: 'https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' - status: Linked - lastSync: '2022-10-27T10:22:43.6464237Z' - created: '2022-10-27T09:53:29Z' - sourceType: Banking - products: - - spend-insights - - lending - CompanyAccessToken: - title: Company access token - description: Details of the access token provisioned for a company. + - dataType: string + lastSuccessfulSync: '2022-01-01T13:00:00.000Z' + currentStatus: string + latestSyncId: ad474a37-2003-478e-baee-9af9f1ec2fe3 + latestSuccessfulSyncId: 8220fc90-55b6-47bc-9417-48ac6ea93101 + DataStatusResponse: + x-internal: true + title: Data status response type: object - allOf: - - $ref: '#/components/schemas/CompanyAccessToken/definitions/accessToken' + additionalProperties: + $ref: '#/components/schemas/DataStatus' + DataType: + x-internal: true + $ref: '#/components/schemas/DataStatus/properties/dataType' + ErrorMessage: + title: Error message + type: object + x-internal: true + properties: + statusCode: + type: integer + description: The HTTP status code returned by the error. + service: + type: string + description: Codat's service the returned the error. + error: + type: string + description: A brief description of the error. + correlationId: + type: string + description: Unique identifier used to propagate to all downstream services and determine the source of the error. + validation: + $ref: '#/components/schemas/ErrorMessage/definitions/errorValidation' + canBeRetried: + type: string + description: '`True` if the error occurred transiently and can be retried.' + detailedErrorCode: + type: integer + description: Machine readable error code used to automate processes based on the code returned. definitions: - accessToken: - title: Access token + errorValidation: + title: Validation error + type: object + nullable: true + description: 'A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here.' + properties: + errors: + type: array + nullable: true + items: + $ref: '#/components/schemas/ErrorMessage/definitions/errorValidationItem' + warnings: + type: array + nullable: true + items: + $ref: '#/components/schemas/ErrorMessage/definitions/errorValidationItem' + errorValidationItem: + title: Validation error item type: object properties: - expiresIn: - type: integer - description: The number of seconds until the access token expires. - example: 86400 - accessToken: + itemId: + type: string + nullable: true + description: Unique identifier for a validation item. + message: type: string - description: The access token for the company. - tokenType: + nullable: true + description: A message outlining validation item's issue. + validatorName: type: string - description: The type of token. - example: Bearer - required: - - expiresIn - - accessToken - - tokenType - examples: - - expiresIn: 86400 - accessToken: string - tokenType: Bearer - CompanyInformation: - title: Company information - description: Information about the company from the underlying accounting software. + nullable: true + description: Name of validator. + ExpenseContactRef: type: object - properties: - companyName: - type: string - nullable: false - description: Name of the linked company. - baseCurrency: - type: string - nullable: false - description: Currency set in the accounting software of the linked company. - planType: - type: string - nullable: true - description: 'Accounting software subscription type such as Trial, Demo, Standard.' - multicurrencyEnabled: - type: boolean - description: Boolean showing if the organisation has multicurrency enabled. - currencies: - type: array - nullable: true - description: Array of enabled currencies for the linked company. - items: - type: string - CompanyRequestBody: - title: Create company request + title: Supplier/customer reference x-internal: true - type: object properties: - name: + id: type: string - description: Name of company being connected. - pattern: '^[A-Za-z0-9\s\-'',&@.,?!\s]+$' - minLength: 1 - example: Bank of Dave - description: + example: 40e3e57c-2322-4898-966c-ca41adfd23fd + description: Identifier of supplier or customer. + type: type: string - example: Requested early access to the new financing scheme. - description: 'Additional information about the company. This can be used to store foreign IDs, references, etc.' - tags: - $ref: '#/components/schemas/Company/definitions/companyDetails/properties/tags' + description: The type of contact. + example: Supplier + default: Supplier + enum: + - Supplier required: - - name - CompanyUpdateRequest: - title: Update company request - x-internal: true - type: object - properties: - name: - type: string - description: Name of company being connected. - pattern: '^[A-Za-z0-9\s\-'',&@.,?!\s]+$' - minLength: 1 - example: Bank of Dave - description: - $ref: '#/components/schemas/CompanyRequestBody/properties/description' - tags: - $ref: '#/components/schemas/Company/definitions/companyDetails/properties/tags' - Connection: - title: Connection - description: "\uFEFFA connection represents a [company's](https://docs.codat.io/bank-feeds-api#/schemas/Company) connection to a data source and allows you to synchronize data (pull and/or push) with that source.\n\nA company can have multiple data connections depending on the type of data source it is connecting to. For example, a single company can link to:\n\n- [Accounting data](https://docs.codat.io/accounting-api/overview) - 1 active connection.\n- [Banking data](https://docs.codat.io/banking-api/overview) - Multiple active connections.\n- [Commerce data](https://docs.codat.io/commerce-api/overview) - Multiple active connections.\nAny combination of accounting, banking, and commerce data connections is allowed.\n\nBefore you can use a data connection to pull or push data, the company must grant you access to their business data by [linking the connection](https://docs.codat.io/auth-flow/overview)." + - id + ExpensesSyncWebhook: + title: Expenses sync webhook type: object properties: id: - $ref: '#/components/parameters/connectionId/schema' - integrationId: - type: string - format: uuid - example: fd321cb6-7963-4506-b873-e99593a45e30 - description: A Codat ID representing the integration. - integrationKey: - type: string - description: A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. - sourceId: type: string format: uuid - example: 35b92968-9851-4095-ad60-395c95cbcba4 - description: 'A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`.' - sourceType: - title: Source Type - description: The type of platform of the connection. - type: string - enum: - - Accounting - - Banking - - BankFeed - - Commerce - - Expense - - Other - - Unknown - example: Accounting - platformName: - type: string - description: Name of integration connected to company. - linkUrl: + example: ba29118f-5406-4e59-b05c-ba307ca38d01 + description: Unique identifier of the event. + eventType: type: string - format: uri - description: The link URL your customers can use to authorize access to their business application. - example: 'https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/2e2eb431-c1fa-4dc9-93fa-d29781c12bcd/start' - status: - $ref: '#/components/schemas/Connection/definitions/dataConnectionStatus' - lastSync: - $ref: '#/components/schemas/DateTime' - nullable: true - created: - $ref: '#/components/schemas/DateTime' - dataConnectionErrors: - type: array - nullable: true - items: - $ref: '#/components/schemas/Connection/definitions/dataConnectionError' - connectionInfo: - type: object - nullable: true - additionalProperties: true - additionalProperties: false - required: - - id - - integrationId - - sourceId - - platformName - - linkUrl - - status - - created - - sourceType + description: The type of event. + examples: + - expenses.sync.successful + - expenses.sync.unsuccessful + generatedDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: The date time in UTC the event was generated in Codat. + payload: + $ref: '#/components/schemas/ExpensesSyncWebhook/definitions/expensesSyncWebhookPayload' definitions: - dataConnectionStatus: - title: Data connection status - description: The current authorization status of the data connection. - type: string - enum: - - PendingAuth - - Linked - - Unlinked - - Deauthorized - dataConnectionError: - title: Data connection error + transaction: + title: Transaction type: object properties: - statusCode: - type: string - description: The HTTP status code returned by the source platform when the error occurred. - statusText: - type: string - description: A non-numeric status code/text returned by the source platform when the error occurred. - errorMessage: + id: type: string - description: A message about a error returned by Codat. - erroredOnUtc: - $ref: '#/components/schemas/DateTime' + description: Unique identifier of the transaction. status: - title: Error status - description: The current status of a transient error. Null statuses indicate that the error is not transient. type: string - nullable: true enum: - - Active - - Resolved - resolvedOnUtc: - description: The datetime in Utc that the error was resolved. + - Unknown + - PushError + - Completed + - Failed + - Pending + description: Status of transaction. + errorMessage: + type: string nullable: true - $ref: '#/components/schemas/DateTime' - dataConnectionSourceType: - title: Source Type - description: The type of platform of the connection. - type: string - enum: - - Accounting - - Banking - - BankFeed - - Commerce - - Expense - - Other - - Unknown - example: Accounting - example: - id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd - integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c - integrationKey: dfxm - sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee - platformName: Basiq - linkUrl: 'https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' - status: Linked - lastSync: '2022-10-27T10:22:43.6464237Z' - created: '2022-10-27T09:53:29Z' - sourceType: Banking - Connections: - title: Connections - x-internal: true - allOf: - - type: object + description: Error message for failed transaction. + expensesSyncWebhookPayload: + title: Expenses sync webhook payload + type: object properties: - results: + referenceCompany: + $ref: '#/components/schemas/Company/definitions/companyReference' + syncId: + type: string + description: Unique identifier of the sync. + transactions: type: array items: - $ref: '#/components/schemas/Connection' - - $ref: '#/components/schemas/Companies/allOf/1' - CreateBankTransactions: - title: Create bank transactions + $ref: '#/components/schemas/ExpensesSyncWebhook/definitions/transaction' + ExpenseTransaction: + title: Expense transaction type: object properties: - accountId: + id: type: string - description: Unique identifier for a bank account. - examples: - - 13d946f0-c5d5-42bc-b092-97ece17923ab - - 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2 - - '7110701885' - - EILBDVJVNUAGVKRQ - - Checking 0202 - transactions: - $ref: '#/components/schemas/BankTransactions' - required: - - accountId - - transactions - CreateBankTransactionsResponse: - title: Create bank transaction response - x-internal: true - allOf: - - type: object - properties: - data: - $ref: '#/components/schemas/CreateBankTransactions' - - $ref: '#/components/schemas/PushOperation' - DataType: - title: Data types - x-internal: true - type: string - description: Available data types - enum: - - accountTransactions - - balanceSheet - - bankAccounts - - bankTransactions - - billCreditNotes - - billPayments - - bills - - cashFlowStatement - - chartOfAccounts - - company - - creditNotes - - customers - - directCosts - - directIncomes - - invoices - - itemReceipts - - items - - journalEntries - - journals - - paymentMethods - - payments - - profitAndLoss - - purchaseOrders - - salesOrders - - suppliers - - taxRates - - trackingCategories - - transfers - - banking-accountBalances - - banking-accounts - - banking-transactionCategories - - banking-transactions - - commerce-companyInfo - - commerce-customers - - commerce-disputes - - commerce-locations - - commerce-orders - - commerce-paymentMethods - - commerce-payments - - commerce-productCategories - - commerce-products - - commerce-taxComponents - - commerce-transactions - example: invoices - DateTime: - title: Date time - type: string - examples: - - '2022-10-23T00:00:00Z' - - '2022-10-23' - description: |- - In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + example: 4d7c6929-7770-412b-91bb-44d3bc71d111 + format: uuid + description: Your unique identifier for the transaction. + type: + type: string + example: Payment + description: The type of transaction. + enum: + - Payment + - Refund + - Reward + - Chargeback + issueDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: Date of the transaction was recorded. + currency: + type: string + example: GBP + description: Currency the transaction was recorded in. + currencyRate: + title: Currency rate + type: number + format: decimal + nullable: true + description: |- + Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - ``` - 2020-10-08T22:40:50Z - 2021-01-01T00:00:00 - ``` + Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit. + It is not possible to perform the currency conversion with two or more non-base currencies participating in the transaction. For example, if a company's base currency is USD, and it has a bill issued in EUR, then the bill payment must happen in USD or EUR. + Where the currency rate is provided by the underlying accounting software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). - When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. - - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - - Unqualified local time: `2021-11-15T01:00:00` - - UTC time offsets: `2021-11-15T01:00:00-05:00` + ## Examples with base currency of GBP - > Time zones - > - > Not all dates from Codat will contain information about time zones. - > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. - ErrorMessage: - title: Error message + | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + | :--------------- | :------------- | :------------ | :------------------------- | + | **USD** | $20 | 0.781 | £15.62 | + | **EUR** | €20 | 0.885 | £17.70 | + | **RUB** | ₽20 | 0.011 | £0.22 | + + ## Examples with base currency of USD + + | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + | :--------------- | :------------- | :------------ | :------------------------- | + | **GBP** | £20 | 1.277 | $25.54 | + | **EUR** | €20 | 1.134 | $22.68 | + | **RUB** | ₽20 | 0.015 | $0.30 | + + + ### Integration-specific details + + | Integration | Scenario | System behavior | + |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + contactRef: + description: Supplier or customer for the purchase to be associated to. + $ref: '#/components/schemas/ExpenseContactRef' + bankAccountRef: + type: object + title: Bank account reference + properties: + id: + type: string + example: 787dfb37-5707-4dc0-8a86-8d74e4cc78ea + description: Identifier of the bank account. + reference: + type: string + nullable: true + description: User-friendly reference for the expense transaction. + merchantName: + type: string + example: Amazon UK + description: Name of the merchant where the purchase took place + lines: + type: array + description: Array of transaction lines. + minItems: 1 + maxItems: 100 + items: + $ref: '#/components/schemas/ExpenseTransactionLine' + notes: + type: string + description: 'Any private, company notes about the transaction.' + example: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + postAsDraft: + type: boolean + nullable: true + description: 'This optional property, when set to true, posts the transaction to a drafted state. Note that postAsDraft is only supported in Microsoft Dynamics 365 Business Central.' + required: + - id + - type + - issueDate + - currency + examples: + - id: a44135b0-6882-489a-83fe-a0c57a4afb19 + type: Payment + issueDate: '2024-05-21T00:00:00+00:00' + currency: GBP + currencyRate: 1 + contactRef: + id: '430' + type: Supplier + bankAccountRef: + id: '97' + merchantName: Amazon UK + notes: amazon purchase + lines: + - netAmount: 100 + taxAmount: 20 + taxRateRef: + id: 23_Bills + accountRef: + id: '35' + trackingRefs: + - id: DEPARTMENT_3 + - dataType: trackingCategories + invoiceTo: + id: '504' + type: customer + ExpenseTransactionLine: + x-internal: true + title: Expense transaction line type: object + x-examples: + ExpenseTransactionLine: + netAmount: 100 + taxAmount: 20 + taxRateRef: + id: 08d37c46-8d5d-441b-8bad-76286c43047e + accountRef: + id: 16989b16-96d4-401a-9054-f5c620c655a6 + trackingRefs: + - id: e9a1b63d-9ff0-40e7-8038-016354b987e6 + invoiceTo: + id: 80000002-1674552702 + type: customer + properties: + netAmount: + type: number + format: decimal + example: 100 + description: 'Amount of the line, exclusive of tax.' + taxAmount: + type: number + format: decimal + example: 20 + description: Amount of tax for the line. + taxRateRef: + $ref: '#/components/schemas/RecordRef' + accountRef: + description: The `accountRef` contains the `id` of the account the transaction is against. The `accountRef` object is required for all integrations except QBD which currently supports either itemRef or accountRef. + $ref: '#/components/schemas/RecordRef' + itemRef: + $ref: '#/components/schemas/ItemRef' + trackingRefs: + type: array + minItems: 1 + maxItems: 10 + nullable: true + items: + $ref: '#/components/schemas/TrackingRef' + invoiceTo: + $ref: '#/components/schemas/InvoiceTo' + required: + - netAmount + IntegrationType: + title: Integration type + x-internal: true + type: string + description: Type of transaction that has been processed e.g. Expense or Bank Feed. + enum: + - expenses + - bankfeeds + default: expenses + example: expenses + nullable: true + InvoiceTo: + title: Billable customer reference x-internal: true + type: object + nullable: true + description: Unique identifier for the customer billed for the transaction. The `invoiceTo` object is currently supported only for QuickBooks Online and QuickBooks Desktop. properties: - statusCode: - type: integer - description: The HTTP status code returned by the error. - service: + id: type: string - description: Codat's service the returned the error. - error: + example: 80000002-1674552702 + description: identifier of customer. + type: type: string - description: A brief description of the error. - correlationId: + example: customer + description: The type of contact. + enum: + - customer + ItemRef: + x-internal: true + type: object + title: Item reference + nullable: true + properties: + id: type: string - description: Unique identifier used to propagate to all downstream services and determine the source of the error. - validation: - $ref: '#/components/schemas/ErrorMessage/definitions/errorValidation' - canBeRetried: + example: 80000002-1675158984 + description: 'Unique identifier for the item associated with the transaction. The `itemRef` object is currently supported only for QuickBooks Desktop. You can specify either `itemRef` or `accountRef`, but not both.' + MappingOptions: + title: Mapping options + type: object + additionalProperties: false + x-examples: {} + properties: + expenseProvider: type: string - description: '`True` if the error occurred transiently and can be retried.' - detailedErrorCode: + description: Name of the expense integration. + example: Partner Expense + nullable: true + accounts: + type: array + description: Array of available accounts for mapping. + nullable: true + items: + $ref: '#/components/schemas/AccountMappingInfo' + trackingCategories: + type: array + description: Array of available tracking categories for mapping. + nullable: true + items: + $ref: '#/components/schemas/TrackingCategoryMappingInfo' + taxRates: + type: array + description: Array of available tax rates for mapping. + nullable: true + items: + $ref: '#/components/schemas/TaxRateMappingInfo' + PagingInfo: + type: object + title: Pagination information + x-internal: true + properties: + pageNumber: type: integer - description: Machine readable error code used to automate processes based on the code returned. + description: Current page number. + pageSize: + type: integer + description: Number of items to return in results array. + maximum: 2000 + totalResults: + type: integer + description: Total number of items. + _links: + $ref: '#/components/schemas/PagingInfo/definitions/links' definitions: - errorValidation: - title: Validation error + links: + title: Hal Links type: object - nullable: true - description: 'A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here.' + required: + - self + - current properties: - errors: - type: array - nullable: true - items: - $ref: '#/components/schemas/ErrorMessage/definitions/errorValidationItem' - warnings: - type: array - nullable: true - items: - $ref: '#/components/schemas/ErrorMessage/definitions/errorValidationItem' - errorValidationItem: - title: Validation error item + self: + $ref: '#/components/schemas/PagingInfo/definitions/halRef' + current: + $ref: '#/components/schemas/PagingInfo/definitions/halRef' + next: + $ref: '#/components/schemas/PagingInfo/definitions/halRef' + previous: + $ref: '#/components/schemas/PagingInfo/definitions/halRef' + examples: + - self: + href: /companies + current: + href: /companies?page=1&pageSize=10 + halRef: + title: Hypertext reference type: object properties: - itemId: - type: string - nullable: true - description: Unique identifier for a validation item. - message: - type: string - nullable: true - description: A message outlining validation item's issue. - validatorName: + href: type: string - nullable: true - description: Name of validator. - GenerateOtpResponse: - title: OTP response - type: object - description: Response containing a one-time password and its expiry time. - additionalProperties: false - properties: - otp: - type: string - description: The one-time password. - expiry: - $ref: '#/components/schemas/DateTime' - description: The expiry date and time of the OTP in UTC. + format: uri-reference + description: Uri hypertext reference. required: - - otp - - expiry + - pageNumber + - pageSize + - totalResults + - _links examples: - - otp: GT40U4 - expiry: '2026-04-08T10:30:00Z' + - pageNumber: 1 + pageSize: 10 + totalResults: 1 + _links: + self: + href: '/companies/{id}/data/{dataType}' + current: + href: '/companies/{id}/data/{dataType}?page=1&pageSize=10' PullOperation: title: Pull operation description: |- @@ -4369,9 +12056,9 @@ components: nullable: true description: A message about a transient or persistent error returned by Codat or the source platform. requested: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' completed: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' progress: type: integer description: An integer signifying the progress of the pull operation. @@ -4412,7 +12099,7 @@ components: type: array items: $ref: '#/components/schemas/PullOperation' - - $ref: '#/components/schemas/Companies/allOf/1' + - $ref: '#/components/schemas/PagingInfo' PushOperation: title: Push operation type: object @@ -4425,7 +12112,7 @@ components: items: $ref: '#/components/schemas/PushOperation/definitions/pushOperationChange' dataType: - $ref: '#/components/schemas/DataType' + $ref: '#/components/schemas/DataStatus/properties/dataType' description: 'The type of data being pushed, eg invoices, customers.' companyId: $ref: '#/components/parameters/companyId/schema' @@ -4436,10 +12123,10 @@ components: dataConnectionKey: $ref: '#/components/parameters/connectionId/schema' requestedOnUtc: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' description: The datetime when the push was requested. completedOnUtc: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' description: 'The datetime when the push was completed, null if Pending.' timeoutInMinutes: type: integer @@ -4522,7 +12209,7 @@ components: type: string description: Unique identifier for a push operation. dataType: - $ref: '#/components/schemas/DataType' + $ref: '#/components/schemas/DataStatus/properties/dataType' nullable: true additionalProperties: false pushOperationStatus: @@ -4555,7 +12242,7 @@ components: type: array items: $ref: '#/components/schemas/PushOperation' - - $ref: '#/components/schemas/Companies/allOf/1' + - $ref: '#/components/schemas/PagingInfo' PushOption: title: Push option x-internal: true @@ -4683,541 +12370,821 @@ components: $ref: '#/components/schemas/PushOption/definitions/pushOptionProperty/properties/description' required: $ref: '#/components/schemas/PushOption/definitions/pushOptionProperty/properties/required' - SourceAccount: - title: Source account (v1) + RecordRef: + x-internal: true type: object - description: The target bank account in a supported accounting software for ingestion into a bank feed. - additionalProperties: false + title: Record reference properties: id: type: string - description: Unique ID for the bank account. - accountName: - type: string - nullable: true - description: The bank account name. - accountType: - type: string - nullable: true - description: The type of bank account e.g. Credit. - accountNumber: - type: string - nullable: true - description: The account number. - sortCode: - type: string - nullable: true - description: The sort code. - currency: - title: Currency - x-internal: true + example: 40e3e57c-2322-4898-966c-ca41adfd23fd + description: Identifier of linked reference from mapping options. + ReimbursableExpenseTransactionLine: + x-internal: true + title: Reimbursable expense transaction line + type: object + properties: + description: type: string - description: |- - The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - - ## Unknown currencies - - In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction. - - There are only a very small number of edge cases where this currency code is returned by the Codat system. - format: ISO4217 - examples: - - GBP - - USD - - EUR - balance: + example: 2-night hotel stay + description: line description + netAmount: type: number format: decimal + example: 100 + description: 'Amount of the line, exclusive of tax.' + taxAmount: + type: number + format: decimal + example: 20 + description: Amount of tax for the line. + taxRateRef: + $ref: '#/components/schemas/RecordRef' + accountRef: + description: The `accountRef` contains the `id` of the account the transaction is against. The `accountRef` object is required for all integrations except QBD which currently supports either itemRef or accountRef. + $ref: '#/components/schemas/RecordRef' + itemRef: + $ref: '#/components/schemas/ItemRef' + trackingRefs: + type: array + minItems: 1 + maxItems: 10 nullable: true - description: The latest balance for the bank account. - modifiedDate: - $ref: '#/components/schemas/DateTime' - nullable: true - description: The last date the bank account was modified. - status: + items: + $ref: '#/components/schemas/TrackingRef' + invoiceTo: + $ref: '#/components/schemas/InvoiceTo' + required: + - netAmount + ReimbursableExpenseTransactionRequest: + title: Reimbursable expense transaction request + type: array + minItems: 1 + maxItems: 50 + items: + $ref: '#/components/schemas/ReimbursableExpenseTransactionRequest/definitions/reimbursableExpenseTransaction' + definitions: + reimbursableExpenseTransaction: + title: Reimbursable expense transaction + type: object + properties: + id: + type: string + example: 4d7c6929-7770-412b-91bb-44d3bc71d111 + format: uuid + description: Your unique identifier for the transaction. + reference: + type: string + nullable: true + description: User-friendly reference for the reimbursable expense. + contactRef: + $ref: '#/components/schemas/ReimbursementContactRef' + apAccountRef: + $ref: '#/components/schemas/apAccountRef' + issueDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: Date of the transaction was recorded. + dueDate: + description: Date the supplier is due to be paid. + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + currency: + type: string + example: GBP + description: Currency the transaction was recorded in. + currencyRate: + $ref: '#/components/schemas/ExpenseTransaction/properties/currencyRate' + notes: + type: string + description: 'Any private, company notes about the transaction.' + example: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + lines: + type: array + description: Array of transaction lines. + minItems: 1 + maxItems: 100 + items: + $ref: '#/components/schemas/ReimbursableExpenseTransactionLine' + required: + - id + - contactRef + - issueDate + - dueDate + - currency + ReimbursementContactRef: + type: object + title: Contact reference + x-internal: true + properties: + id: type: string - nullable: true - description: Status of the source account. - enum: - - pending - - connected - - connecting - - disconnected - - unknown - feedStartDate: - $ref: '#/components/schemas/DateTime' - nullable: true + example: 40e3e57c-2322-4898-966c-ca41adfd23fd + description: Identifier of contact. required: - id + SupplementalData: + title: Supplemental data + type: object + x-internal: true + description: |- + Supplemental data is additional data you can include in our standard data types. + + It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. + properties: + content: + type: object + additionalProperties: + type: object + additionalProperties: true + nullable: true + Supplier: + title: 'Accounting: Supplier' + description: |- + ## Overview + + From the **Suppliers** endpoints, you can retrieve a list of [all the suppliers for a company](https://docs.codat.io/sync-for-expenses-api#/operations/list-suppliers). Suppliers' data links to accounts payable [bills](https://docs.codat.io/sync-for-expenses-api#/schemas/Bill). + type: object + allOf: + - type: object + properties: + id: + type: string + description: 'Identifier for the supplier, unique to the company in the accounting software.' + supplierName: + type: string + nullable: true + description: 'Name of the supplier as recorded in the accounting system, typically the company name.' + contactName: + type: string + nullable: true + description: Name of the main contact for the supplier. + emailAddress: + type: string + nullable: true + description: Email address that the supplier may be contacted on. + phone: + type: string + nullable: true + description: Phone number that the supplier may be contacted on. + examples: + - +44 25691 154789 + - (877) 492-8687 + - 01224 658 999 + addresses: + type: array + nullable: true + description: An array of Addresses. + items: + $ref: '#/components/schemas/CompanyInformation/properties/addresses/items' + registrationNumber: + type: string + nullable: true + description: 'Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House.' + taxNumber: + type: string + nullable: true + description: Supplier's company tax number. + status: + $ref: '#/components/schemas/Supplier/definitions/supplierStatus' + defaultCurrency: + type: string + nullable: true + description: Default currency the supplier's transactional data is recorded in. + metadata: + $ref: '#/components/schemas/Account/allOf/2/properties/metadata' + supplementalData: + $ref: '#/components/schemas/SupplementalData' + - $ref: '#/components/schemas/Account/allOf/3' + required: + - status definitions: - sourceAccountPrototype: - title: Source account (v1) + supplierRef: + title: Supplier reference + description: Reference to the supplier the record relates to. type: object properties: id: - $ref: '#/components/schemas/SourceAccount/properties/id' - accountName: - $ref: '#/components/schemas/SourceAccount/properties/accountName' - accountType: - $ref: '#/components/schemas/SourceAccount/properties/accountType' - accountNumber: - $ref: '#/components/schemas/SourceAccount/properties/accountNumber' - sortCode: - $ref: '#/components/schemas/SourceAccount/properties/sortCode' - currency: - $ref: '#/components/schemas/SourceAccount/properties/currency' - balance: - $ref: '#/components/schemas/SourceAccount/properties/balance' - modifiedDate: - $ref: '#/components/schemas/SourceAccount/properties/modifiedDate' + minLength: 1 + type: string + description: The supplier's unique ID + supplierName: + type: string + nullable: true + description: The supplier's name required: - id - sourceAccounts: - title: Source accounts - type: array - items: - $ref: '#/components/schemas/SourceAccount' + supplierStatus: + description: Status of the supplier. + type: string + enum: + - Unknown + - Active + - Archived examples: - - id: acc-002 - accountName: account-081 - sortCode: '123456' - accountType: Credit - accountNumber: '12345670' - currency: GBP - balance: 99.99 - modifiedDate: '2023-01-09T14:14:14.1057478Z' - status: pending - - id: acc-003 - accountName: account-095 - sortCode: '123456' - accountType: Credit - accountNumber: '12345671' - currency: USD - balance: 0 - modifiedDate: '2023-01-09T14:14:14.1057478Z' - status: pending - SourceAccountBatchCreateResponse: - title: Batch source account request creation response - description: Account ID and resulting object of the batch `Create source account` request. + - id: C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F + supplierName: Kelly's Industrial Supplies + contactName: Kelly's Industrial Supplies + emailAddress: sales@kellysupplies.com + phone: 07999 999999 + addresses: + - type: Billing + line1: Unit 51 + line2: Bakersfield Industrial Estate + city: Bakersfield + region: California + country: USA + postalcode: '93308' + registrationNumber: string + taxNumber: string + status: Unknown + defaultCurrency: string + metadata: + isDeleted: true + supplementalData: + content: + property1: + property1: null + property2: null + property2: + property1: null + property2: null + modifiedDate: '2022-10-23T00:00:00Z' + sourceModifiedDate: '2022-10-23T00:00:00Z' + Suppliers: + title: Suppliers + x-internal: true + allOf: + - type: object + properties: + results: + type: array + items: + $ref: '#/components/schemas/Supplier' + - $ref: '#/components/schemas/PagingInfo' + SyncCompleteWebhook: + title: Sync complete webhook + x-internal: true + description: Webhook request body used to notify that a sync has completed. + type: object + properties: + ClientId: + $ref: '#/components/schemas/SyncFailedWebhook/properties/ClientId' + ClientName: + $ref: '#/components/schemas/SyncFailedWebhook/properties/ClientName' + CompanyId: + $ref: '#/components/parameters/companyId/schema' + RuleId: + $ref: '#/components/schemas/SyncFailedWebhook/properties/RuleId' + RuleType: + $ref: '#/components/schemas/SyncFailedWebhook/properties/RuleType' + AlertId: + $ref: '#/components/schemas/SyncFailedWebhook/properties/AlertId' + Message: + $ref: '#/components/schemas/SyncFailedWebhook/properties/Message' + Data: + $ref: '#/components/schemas/SyncCompleteWebhook/definitions/SyncCompleteWebhookData' + definitions: + SyncCompleteWebhookData: + type: object + title: Sync complete webhook data + properties: + syncId: + $ref: '#/components/schemas/SyncFailedWebhook/definitions/SyncFailedWebhookData/properties/syncId' + syncType: + $ref: '#/components/schemas/SyncFailedWebhook/definitions/SyncFailedWebhookData/properties/syncType' + examples: + - ClientId: 30e0f9d2-52c0-4c9f-a806-bcd98a3bcd7e + ClientName: Expense Sync + CompanyId: 1f9559e7-8368-48c9-bdf4-f158e16b8b85 + AlertId: 33a4f8e9-09ae-4334-9b00-7bbe83024672 + RuleId: 5c27631d-3b63-4b50-8228-ee502fd113eb + RuleType: Sync Completed + Message: Sync 321363b4-efa9-4fbc-b71c-0b58d62f3248 for company 1f9559e7-8368-48c9-bdf4-f158e16b8b85 of type Expense completed successfully. + Data: + syncId: 321363b4-efa9-4fbc-b71c-0b58d62f3248 + syncType: Expense + SyncFailedWebhook: + title: Sync failed webhook + x-internal: true + description: Webhook request body used to notify that a sync has failed. type: object properties: - sourceAccountId: + ClientId: + title: Client ID type: string - description: Unique ID for the source account. - examples: - - '12345' - result: - $ref: '#/components/schemas/SourceAccountBatchCreateResponse/definitions/sourceAccountBatchCreateResult' + format: uuid + description: Unique identifier for your client in Codat. + ClientName: + type: string + description: Name of your client in Codat. + CompanyId: + $ref: '#/components/parameters/companyId/schema' + RuleId: + type: string + format: uuid + description: Unique identifier for the rule. + deprecated: true + RuleType: + type: string + x-stoplight: + id: 34d52a089f08a + description: The type of rule. + AlertId: + type: string + format: uuid + description: Unique identifier of the webhook event. + Message: + type: string + description: A human-readable message about the webhook. + Data: + $ref: '#/components/schemas/SyncFailedWebhook/definitions/SyncFailedWebhookData' definitions: - sourceAccountBatchCreateResult: - title: Source Account Batch Create Result - description: Status details and corresponding object of the `Create account` operation. + SyncFailedWebhookData: type: object + title: Sync failed webhook data properties: - statusCode: - type: integer - description: The HTTP status code for the creation of the source account - error: + syncId: type: string - nullable: true - description: A brief description of the error. - account: - $ref: '#/components/schemas/SourceAccount' - SourceAccountBatchErrorResponse: - title: Batch source account creation error - description: Describes the error that occured when trying to create the specified source account. + format: uuid + example: a9367074-b5c3-42c4-9be4-be129f43577e + description: Unique identifier for the failed sync. + syncType: + type: string + description: The type of sync being performed. + FailureStage: + type: string + description: The stage of the job the sync failed. + examples: + - ClientId: 30e0f9d2-52c0-4c9f-a806-bcd98a3bcd7e + ClientName: Expense Sync + CompanyId: 1f9559e7-8368-48c9-bdf4-f158e16b8b85 + RuleId: 289c80dc-2aee-4b71-afff-9acd8d051080 + RuleType: Sync Failed + AlertId: 72c1103b-7f17-4a3a-8db5-67c2d360a516 + Message: Sync 3bead2a1-1b3d-4d90-8077-cddc5ca68b01 for company 1f9559e7-8368-48c9-bdf4-f158e16b8b85 of type Expense has failed at step Pushing. + Data: + syncId: 3bead2a1-1b3d-4d90-8077-cddc5ca68b01 + syncType: Expense + FailureStage: Pushing + SyncInitiated: + title: Sync initiated + type: object + properties: + syncId: + type: string + format: uuid + description: Unique identifier for the sync initiated. + additionalProperties: false + TaxRateMappingInfo: + title: Tax rate mapping info + x-internal: true + type: object + additionalProperties: false + x-examples: + UK Tax Rate: + id: 23_Bills + name: 20% Bill tax Bills + code: 20% Bill tax + effectiveTaxRate: 20 + totalTaxRate: 20 + validTransactionTypes: + - Payment + - Reward + properties: + id: + type: string + description: Unique identifier of tax rate. + example: 23_Bills + nullable: false + name: + type: string + description: Name of the tax rate in the accounting software. + example: 20% Bill tax Bills + nullable: false + code: + type: string + description: Code for the tax rate from the accounting software. + example: 20% Bill tax + nullable: true + effectiveTaxRate: + type: number + format: decimal + description: Effective tax rate. + example: 20 + totalTaxRate: + type: number + format: decimal + description: Total (not compounded) sum of the components of a tax rate. + example: 20 + validTransactionTypes: + $ref: '#/components/schemas/validTransactionTypes' + description: Supported transaction types for the tax rate. + TrackingCategoryMappingInfo: + title: Tracking category mapping info + x-internal: true + type: object + additionalProperties: false + x-examples: + Tracking Category with parentId: + id: DEPARTMENT_1 + name: TestLocation + hasChildren: false + parentId: DEPARTMENTS + Parent Tracking Category: + id: DEPARTMENTS + name: Departments + hasChildren: true + properties: + id: + type: string + description: Unique identifier of the tracking category. + example: DEPARTMENT_2 + nullable: false + name: + type: string + description: Name of the tracking category as it appears in the accounting software. + example: New York + nullable: false + hasChildren: + type: boolean + description: Boolean of whether the tracking category has child categories. + parentId: + type: string + description: ID of the parent tracking category + example: DEPARTMENTS + nullable: true + TrackingRef: type: object + title: Tracking reference + x-internal: true properties: - sourceAccountId: + id: type: string - description: Unique ID for the source account. - examples: - - '12345' - result: - type: object - properties: - statusCode: - description: The error status code for the attempted creation of the source account. - type: string - examples: - - 409 - error: - description: The error description for the attempted creation of the source account. - type: string - examples: - - A bank account already exists with the same Id - SourceAccountV2: - title: Source account (v2) + example: e9a1b63d-9ff0-40e7-8038-016354b987e6 + description: Unique identifier of the linked reference from mapping options or the unique identifier of the linked customer. + dataType: + type: string + example: trackingCategories + default: trackingCategories + description: The type of the linked reference + enum: + - trackingCategories + - customers + TrackingRefAdjustmentTransaction: type: object - description: The target bank account in a supported accounting software for ingestion into a bank feed. - additionalProperties: false + title: Tracking reference + x-internal: true properties: id: type: string - description: Unique ID for the bank account. - accountName: - type: string - description: The bank account name. - accountType: + example: e9a1b63d-9ff0-40e7-8038-016354b987e6 + description: Unique identifier of the linked reference from mapping options or the unique identifier of the linked customer or supplier. + dataType: type: string - description: 'The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard.' + example: trackingCategories + default: trackingCategories + description: The type of the linked reference enum: - - checking - - savings - - loan - - creditCard - - prepaidCard - accountNumber: - type: string - description: The account number. - sortCode: + - trackingCategories + - customers + - suppliers + Transaction: + title: Transaction + type: object + additionalProperties: false + properties: + transactionId: type: string + description: Your unique idenfier of the transaction. + example: aa02271d-ed5f-47f5-be76-778d5905225a nullable: true - description: The sort code. - routingInfo: - $ref: '#/components/schemas/SourceAccountV2/definitions/routingInfo' - currency: - $ref: '#/components/schemas/SourceAccount/properties/currency' - balance: - type: number - format: decimal - description: The latest balance for the bank account. - accountInfo: - $ref: '#/components/schemas/SourceAccountV2/definitions/accountInfo' - modifiedDate: - $ref: '#/components/schemas/DateTime' - nullable: true - description: The last date the bank account was modified. status: + $ref: '#/components/schemas/TransactionStatus' + message: type: string + description: Metadata such as validation errors or the resulting record created in the accounting software. nullable: true - description: Status of the source account. - enum: - - pending - - connected - - connecting - - disconnected - - unknown - feedStartDate: - nullable: true - title: Date + integrationType: + $ref: '#/components/schemas/IntegrationType' + x-examples: + Successful Transaction: + transactionId: 8fdba4ed-e327-4925-be1a-b7a2b04627f7 + status: Completed + integrationType: expense + Unsuccessful Transaction: + transactionId: 3d694cd1-4cd9-4136-91db-32408195c6fc + status: ValidationError + message: The line item total -208.10((-195.01 + -1.09) + (-10.01 + -1.99)) must equal the transaction total -1.1 + integrationType: string + TransactionResponse: + title: Transaction response + x-internal: true + type: array + items: + $ref: '#/components/schemas/Transaction' + Transactions: + title: Transactions + x-internal: true + additionalProperties: false + allOf: + - type: object + properties: + results: + type: array + items: + $ref: '#/components/schemas/Transaction' + - $ref: '#/components/schemas/PagingInfo' + x-examples: + Example 1: + results: + - transactionId: aa02271d-ed5f-47f5-be76-778d5905225a + status: Completed + integrationType: expenses + - transactionId: 730177a2-8505-410a-9ebc-c2dd52e4bea9 + status: Completed + integrationType: expenses + pageNumber: 1 + pageSize: 100 + totalResults: 2 + links: + self: + href: string + current: + href: string + TransactionStatus: + title: Transaction status + x-internal: true + type: string + description: Status of the transaction. + enum: + - Unknown + - Pending + - ValidationError + - Completed + - PushError + example: Completed + nullable: true + TransferTransactionRequest: + title: Transfer + type: object + properties: + description: type: string - example: '2022-10-23' - description: |- - In Codat's data model, dates are represented using the ISO 8601 standard. Date fields are formatted as strings; for example: - ``` - 2020-10-08 - ``` - required: - - id - - accountName - - accountType - - accountNumber - - currency - - balance - definitions: - sourceAccountV2Prototype: - title: Source account (v2) + description: 'Any private, company notes about the transaction.' + example: Transfer from bank account Y to bank account Z + date: + allOf: + - description: Date of the transfer transaction as recorded in the accounting software. + - title: Date time + type: string + examples: + - '2022-10-23T00:00:00Z' + - '2022-10-23' + description: |- + In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + + ``` + 2020-10-08T22:40:50Z + 2021-01-01T00:00:00 + ``` + + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + - Unqualified local time: `2021-11-15T01:00:00` + - UTC time offsets: `2021-11-15T01:00:00-05:00` + + > Time zones + > + > Not all dates from Codat will contain information about time zones. + > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. + from: type: object properties: - id: - $ref: '#/components/schemas/SourceAccountV2/properties/id' - accountName: - $ref: '#/components/schemas/SourceAccountV2/properties/accountName' - accountType: - $ref: '#/components/schemas/SourceAccountV2/properties/accountType' - accountNumber: - $ref: '#/components/schemas/SourceAccountV2/properties/accountNumber' - routingInfo: - $ref: '#/components/schemas/SourceAccountV2/definitions/routingInfo' - sortCode: - $ref: '#/components/schemas/SourceAccountV2/properties/sortCode' - currency: - $ref: '#/components/schemas/SourceAccount/properties/currency' - balance: - $ref: '#/components/schemas/SourceAccountV2/properties/balance' - modifiedDate: - $ref: '#/components/schemas/SourceAccountV2/properties/modifiedDate' - accountInfo: - $ref: '#/components/schemas/SourceAccountV2/definitions/accountInfo' + accountRef: + type: object + title: Account reference + description: Reference of the account you are transferring money from. + properties: + id: + type: string + description: '''id'' from the Accounts data type.' + required: + - id + amount: + type: number + format: decimal + description: Amount that has been transferred from the account in the native currency of the account. required: - - id - - accountName - - accountType - - accountNumber - - currency - - balance - accountInfo: - title: Account Info + - accountRef + - amount + to: type: object - nullable: true properties: - description: - type: string - nullable: true - description: Description of the account. - nickname: - type: string - nullable: true - description: Name given to the account by the user. Used in UIs to assist in account selection. - accountOpenDate: - $ref: '#/components/schemas/SourceAccountV2/properties/feedStartDate' - nullable: true - description: Date when the account was opened or created at the provider - availableBalance: + accountRef: + type: object + title: Account reference + description: Reference of the account you are transferring money to. + properties: + id: + type: string + description: '''id'' from the Accounts data type.' + required: + - id + amount: type: number format: decimal - nullable: true - description: Balance of funds available for use. This includes pending activity. - sourceAccounts: - title: Source accounts - type: array - items: - $ref: '#/components/schemas/SourceAccountV2' - routingInfo: - title: Routing Info - type: object - description: Routing information for the bank. This does not include account number. - properties: - bankCode: - type: string - nullable: true - description: The numeric identifier of the routing number - type: - type: string - nullable: true - default: bankcode - enum: - - rtn - - aba - - swift - - bsb - - iban - - nz2 - - trno - - sortcode - - blz - - ifsc - - bankcode - - apca - - clabe - description: The type of routing number. - examples: - - id: acc-001 - accountName: account-081 - accountType: checking - accountNumber: '12345670' - routingInfo: - bankCode: 021001088 - type: bankcode - currency: GBP - balance: 99.99 - accountInfo: - description: account description 1 - nickname: account 123 - accountOpenDate: '2023-05-06' - availableBalance: 10 - modifiedDate: '2024-08-02T00:00:00.000Z' - status: pending - feedStartDate: '2024-05-01' - - id: acc-002 - accountName: account-083 - accountType: savings - accountNumber: '23456789' - routingInfo: - bankCode: 021001088 - type: bankcode - currency: GBP - balance: 400 - accountInfo: - description: account description 2 - nickname: account 1290 - accountOpenDate: '2023-05-23' - availableBalance: 400 - modifiedDate: '2024-08-02T00:00:00.000Z' - status: pending - feedStartDate: '2024-05-01' - SourceAccountV2BatchCreateResponse: - title: Batch source account (v2) creation response - description: Account ID and resulting object of the batch `Create source account` request. + description: Amount that has been transferred to the account in the native currency of the account. + required: + - accountRef + - amount + required: + - date + - from + - to + TransferTransactionResponse: + title: Create transfer response + x-internal: true type: object properties: - sourceAccountId: + syncId: type: string - description: Unique ID for the source account. - examples: - - '12345' - result: - $ref: '#/components/schemas/SourceAccountV2BatchCreateResponse/definitions/sourceAccountV2BatchCreateResult' - definitions: - sourceAccountV2BatchCreateResult: - title: Source Account V2 Batch CreateResult - description: Status details and corresponding object of the `Create account` operation. - type: object + example: cd937d46-8e41-43a9-9477-a79158ffd98a + format: uuid + description: Unique id of sync created + UpdateCustomerResponse: + title: Update customer response + x-internal: true + allOf: + - type: object properties: - statusCode: - type: integer - description: The HTTP status code for the creation of the source account - error: - type: string - nullable: true - description: A brief description of the error. - account: - $ref: '#/components/schemas/SourceAccountV2' - SourceAccountWebhook: - title: Source account status changed webhook + data: + allOf: + - $ref: '#/components/schemas/Customer' + - deprecated: true + - $ref: '#/components/schemas/PushOperation' + UpdateExpenseRequest: + title: Updating expense transaction request type: object properties: - id: + type: type: string - format: uuid - example: ba29118f-5406-4e59-b05c-ba307ca38d01 - description: Unique identifier of the event. - eventType: + example: Payment + description: The type of transaction. + enum: + - Payment + - Refund + - Reward + - Chargeback + issueDate: type: string - description: The type of event. - examples: - - bankFeeds.sourceAccount.connected - - bankFeeds.sourceAccount.disconnected - generatedDate: - $ref: '#/components/schemas/DateTime' - description: The date time in UTC the event was generated in Codat. - payload: - $ref: '#/components/schemas/SourceAccountWebhook/definitions/sourceAccountWebhookPayload' - definitions: - sourceAccountWebhookPayload: - title: Payload + description: Date the transaction was recorded. + example: '2022-06-28T00:00:00.000Z' + currency: + type: string + example: GBP + description: Currency the transaction was recorded in. + currencyRate: + $ref: '#/components/schemas/ExpenseTransaction/properties/currencyRate' + contactRef: + description: Supplier or Customer for the purchase to be associated to. + $ref: '#/components/schemas/ExpenseContactRef' + bankAccountRef: type: object + title: Bank account reference properties: - referenceCompany: - $ref: '#/components/schemas/Company/definitions/companyReference' - companyId: - $ref: '#/components/parameters/companyId/schema' - deprecated: true - connectionId: - $ref: '#/components/parameters/connectionId/schema' - sourceAccount: - oneOf: - - $ref: '#/components/schemas/SourceAccountV2' - - $ref: '#/components/schemas/SourceAccount' - StartScheduledSyncResult: - title: Start scheduled sync result - type: object - description: Represents the result of an ad-hoc sync request. - properties: - syncId: + id: + type: string + example: 787dfb37-5707-4dc0-8a86-8d74e4cc78ea + description: Identifier of the bank account. + merchantName: type: string - format: uuid - description: The unique identifier for the created sync. + description: Name of the merchant where the purchase took place + example: Amazon UK + lines: + type: array + description: Array of transaction lines. + items: + $ref: '#/components/schemas/ExpenseTransactionLine' + notes: + type: string + description: 'Any private, company notes about the transaction.' + example: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' required: - - syncId - SyncStatusResult: - title: Sync status + - type + - issueDate + - currency + UpdateExpenseResponse: + title: Update expense response + x-internal: true type: object - description: Represents the status of a managed bank feed sync. properties: syncId: type: string - format: uuid - description: The unique identifier for the sync. - clientId: - type: string - format: uuid - description: The ID of the client associated with the company that owns the source bank account. - companyId: - type: string - format: uuid - description: The ID of the company that owns the source bank account. - companyName: - type: string - description: The name of the company that owns the source bank account. - dataConnectionId: - type: string - format: uuid - description: The ID of the target accounting data connection. - sourceAccountId: - type: string - description: The ID of the source bank account from which transactions are fetched. - periodStartUtc: - type: string - format: date-time - description: The start of the sync period. - periodEndUtc: - type: string - format: date-time - description: The end of the sync period. - executionStartUtc: - type: string - format: date-time - description: The UTC timestamp when the sync started executing. - status: - type: string - description: 'The current status of the sync. Known values are `Started`, `Failed`, `SuccessDataPushed`, `SuccessNoDataPushed`, `PartialSuccessDataPushed`.' - example: SuccessDataPushed - executionEndUtc: + description: Unique identifier for the update expense sync. + example: 1ad0695c-4566-4715-918c-adbb03eac81e + UpdateReimbursableExpenseTransactionRequest: + title: Updating reimbursable expense transaction request + type: object + properties: + reference: type: string - format: date-time nullable: true - description: 'The UTC timestamp when the sync execution ended, if completed (i.e. `status` is any value other than `Started`).' - errorMessage: + description: User-friendly reference for the reimbursable expense. + contactRef: + $ref: '#/components/schemas/ReimbursementContactRef' + apAccountRef: + $ref: '#/components/schemas/apAccountRef' + issueDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: Date of the transaction was recorded. + dueDate: + description: Date the supplier is due to be paid. + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + currency: type: string - nullable: true - description: Error message if the sync failed. - errorCode: + example: GBP + description: Currency the transaction was recorded in. + currencyRate: + $ref: '#/components/schemas/ExpenseTransaction/properties/currencyRate' + notes: type: string - nullable: true - description: Error code if the sync failed. - pushOperationKeys: + description: 'Any private, company notes about the transaction.' + example: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + lines: type: array + description: Array of transaction lines. + minItems: 1 + maxItems: 100 items: - type: string - format: uuid - nullable: true - description: 'List of write operation keys associated with the sync, if the sync resulted in write attempts.' + $ref: '#/components/schemas/ReimbursableExpenseTransactionLine' required: - - syncId - - clientId - - companyId - - companyName - - dataConnectionId - - sourceAccountId - - periodStartUtc - - periodEndUtc - - executionStartUtc - - status + - contactRef + - issueDate + - dueDate + - currency + UpdateSupplierResponse: + title: Update supplier response + x-internal: true + allOf: + - type: object + properties: + data: + allOf: + - $ref: '#/components/schemas/Supplier' + - deprecated: true + - $ref: '#/components/schemas/PushOperation' + validFor: + title: Valid endpoints + x-internal: true + type: array + description: Supported endpoints for the account. + nullable: false + items: + type: string + enum: + - expense-transactions.Payment + - expense-transactions.Refund + - expense-transactions.Reward + - expense-transactions.Chargeback + - reimbursable-expense-transactions + - transfer-transactions + - adjustment-transactions + example: expense-transactions.Payment + validTransactionTypes: + title: Valid transaction types + x-internal: true + type: array + description: Supported transaction types for the account. + nullable: false + items: + type: string + enum: + - Payment + - Refund + - Reward + - Chargeback + example: Payment parameters: - companyId: - name: companyId + syncId: + name: syncId in: path required: true schema: type: string format: uuid - example: 8a210b68-6988-11ed-a1eb-0242ac120002 - description: Unique identifier for your SMB in Codat. - description: Unique identifier for a company. - connectionId: - name: connectionId + example: 6fb40d5e-b13e-11ed-afa1-0242ac120002 + description: Unique identifier for a sync. + transactionId: + name: transactionId in: path required: true schema: type: string format: uuid - example: 2e9d2c44-f675-40ba-8049-353bfcb5e171 - description: Unique identifier for a company's data connection. - description: Unique identifier for a connection. - accountId: - name: accountId - in: path - required: true - schema: - type: string - examples: - - 13d946f0-c5d5-42bc-b092-97ece17923ab - - 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2 - - 7110701885 - - EILBDVJVNUAGVKRQ - description: Unique identifier for an account. + example: 336694d8-2dca-4cb5-a28d-3ccb83e55eee + description: The unique identifier for your SMB's transaction. page: name: page in: query @@ -5255,6 +13222,26 @@ components: type: string example: '-modifiedDate' description: 'Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).' + companyId: + name: companyId + in: path + required: true + schema: + type: string + format: uuid + example: 8a210b68-6988-11ed-a1eb-0242ac120002 + description: Unique identifier for your SMB in Codat. + description: Unique identifier for a company. + connectionId: + name: connectionId + in: path + required: true + schema: + type: string + format: uuid + example: 2e9d2c44-f675-40ba-8049-353bfcb5e171 + description: Unique identifier for a company's data connection. + description: Unique identifier for a connection. dataType: name: dataType description: The key of a Codat data type @@ -5262,15 +13249,30 @@ components: required: true schema: $ref: '#/components/schemas/DataType' - datasetId: - name: datasetId + supplierId: + name: supplierId in: path required: true schema: type: string - format: uuid - description: Unique identifier for the dataset that completed its sync. - description: Unique identifier for the dataset that completed its sync. + examples: + - 13d946f0-c5d5-42bc-b092-97ece17923ab + - 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2 + - 7110701885 + - EILBDVJVNUAGVKRQ + description: Unique identifier for a supplier. + customerId: + name: customerId + in: path + required: true + schema: + type: string + examples: + - 13d946f0-c5d5-42bc-b092-97ece17923ab + - 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2 + - 7110701885 + - EILBDVJVNUAGVKRQ + description: Unique identifier for a customer. timeoutInMinutes: name: timeoutInMinutes in: query @@ -5278,6 +13280,20 @@ components: type: integer format: int32 description: Time limit for the push operation to complete before it is timed out. + allowSyncOnPushComplete: + name: allowSyncOnPushComplete + in: query + schema: + type: boolean + default: true + description: Allow a sync upon push completion. + forceUpdate: + name: forceUpdate + in: query + schema: + type: boolean + default: false + description: 'When updating data in the destination platform Codat checks the `sourceModifiedDate` against the `lastupdated` date from the accounting software, if they''re different Codat will return an error suggesting you should initiate another pull of the data. If this is set to `true` then the update will override this check.' responses: BadRequest: description: The request made is not valid. @@ -5415,6 +13431,21 @@ components: correlationId: bc997528a9d7abb9161ef45f05d38599 canBeRetried: Unknown detailedErrorCode: 0 + Unprocessable-Content: + description: The requests made can't be processed. This may be due to differences in platform support. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + examples: + Conflict: + value: + statusCode: 422 + service: ExpenseSyncApi + error: Expense transaction updates are not supported for platforms other than Xero. + correlationId: 7c8e23841d211c87f49f30b248f70c93 + canBeRetried: Unknown + detailedErrorCode: 0 Too-Many-Requests: description: Too many requests were made in a given amount of time. Wait a short period and then try again. content: diff --git a/.speakeasy/logs/changes/old.openapi.yaml b/.speakeasy/logs/changes/old.openapi.yaml index b20877e2f..661e01d87 100644 --- a/.speakeasy/logs/changes/old.openapi.yaml +++ b/.speakeasy/logs/changes/old.openapi.yaml @@ -1,19 +1,21 @@ openapi: 3.1.0 -servers: - - description: Production - url: 'https://api.codat.io' info: - title: Bank Feeds - version: 3.0.0 + title: Expenses + version: prealpha contact: - email: support@codat.io name: Codat + url: 'https://www.codat.io/' + email: expenses@codat.io description: |- - Bank Feeds solution enables your SMB users to set up bank feeds from accounts in your application to supported accounting software. + The API for Codat's Expenses solution. + + Expenses is an API and a set of supporting tools. It has been built to + enable corporate card and expense management platforms to provide high-quality + integrations with multiple accounting software through a standardized API. - A bank feed is a connection between a source bank account in your application and a target bank account in a supported accounting software. + [Explore solution](https://docs.codat.io/sync-for-expenses/overview) | [See our OpenAPI spec](https://github.com/codatio/oas) - [Explore solution](https://docs.codat.io/bank-feeds-api/overview) | [See OpenAPI spec](https://github.com/codatio/oas) + Not seeing the endpoints you're expecting? We've [reorganized our solutions](https://docs.codat.io/updates/230901-new-products), and you may be using a [different version of Expenses](https://docs.codat.io/sync-for-expenses-v1-api#/). --- @@ -23,10 +25,18 @@ info: | :- |:- | | Companies | Create and manage your SMB users' companies. | | Connections | Create new and manage existing data connections for a company. | - | Source accounts | Provide and manage lists of source bank accounts. | - | Account mapping | Extra functionality for building an account management UI. | - | Company information | Get detailed information about a company from the underlying platform. | - | Transactions | Create new bank account transactions for a company's connections, and see previous operations. | + | Configuration | View and manage mapping configuration and defaults for expense transactions. | + | Sync | Monitor the status of data syncs. | + | Expenses | Create and update transactions that represent your customers' spend. | + | Transfers | Create and update transactions that represent the movement of your customers' money. | + | Reimbursements | Create and update transactions that represent your customers' repayable spend. | + | Attachments | Attach receipts to a transaction for a complete audit trail. | + | Transaction status | Monitor the status of individual transactions in data syncs. | + | Manage data | Control and monitor the retrieval of data from an integration. | + | Push operations | View historic push operations. | + | Accounts | Create accounts and view account schemas. | + | Customers | Get, create, and update customers. | + | Suppliers | Get, create, and update suppliers. | termsOfService: 'https://www.codat.io/legals/' security: @@ -68,7 +78,7 @@ x-speakeasy-name-override: methodNameOverride: download-attachment - operationId: ^upload-.*?-attachment methodNameOverride: upload-attachment -x-codat-docs-path: bank-feeds-api +x-codat-docs-path: sync-for-expenses-api x-codat-keep-docs-paths-local: true x-codat-speakeasy-pagination: type: offsetLimit @@ -83,103 +93,42 @@ tags: description: Create and manage your SMB users' companies. - name: Connections description: Create new and manage existing data connections for a company. + - name: Company info + description: View the company information of your customers' linked accounting software. + - name: Manage data + description: Control and monitor the retrieval of data from an integration. + - name: Mapping options + description: 'Get accounts, trackingCategories and taxRates that can be used in your create and update requests.' + - name: Accounts + description: Create accounts and view create account options. - name: Bank accounts - description: Access bank accounts in an SMBs accounting software. - - name: Source accounts - description: Provide and manage lists of source bank accounts. - - name: Account mapping - description: Extra functionality for building an account management UI. - - name: Transactions - description: 'Create new bank account transactions for a company''s connections, and see previous operations.' - - name: Company information - description: Get detailed information about a company from the underlying accounting software. - - name: Managed bank feeds - description: Manage bank feed syncs for source accounts. + description: Create bank accounts and view create bank account options. + - name: Customers + description: 'Get, create, and update customers.' + - name: Suppliers + description: 'Get, create, and update suppliers.' + - name: Push operations + description: View historic push operations. + - name: Configuration + description: View and manage mapping configuration and defaults for expense transactions. + - name: Expenses + description: Create and update transactions that represent your customers' spend. + - name: Reimbursements + description: Create and update transactions that represent your customers' repayable spend. + - name: Transfers + description: Create and update transactions that represent the movement of your customers' money. + - name: Adjustments + description: Create transactions that represent your adjustments to your customers' spend. + - name: Attachments + description: Attach receipts to a transaction for a complete audit trail. + - name: Sync + description: Monitor the status of data syncs. + - name: Transaction status + description: Monitor the status of individual transactions in data syncs. +servers: + - url: 'https://api.codat.io' paths: /companies: - post: - summary: Create company - tags: - - Companies - operationId: create-company - responses: - '200': - description: OK - content: - application/json: - x-speakeasy-usage-example: true - schema: - $ref: '#/components/schemas/Company' - examples: - With no description: - value: - id: ab12c58d-a678-4ebf-a159-ae99e1807bd0 - name: Technicalium - description: '' - platform: '' - redirect: 'https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0' - dataConnections: [] - created: '2022-11-10T10:45:18.1950523Z' - createdByUserName: Dan Tzabar - products: - - spend-insights - referenceSubsidiaryCompanies: [] - With a description: - value: - id: ab12c58d-a678-4ebf-a159-ae99e1807bd0 - name: Technicalium - description: 'Technology services, including web and app design and development' - platform: '' - redirect: 'https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0' - dataConnections: [] - created: '2022-11-10T10:45:18.1950523Z' - createdByUserName: Dan Tzabar - products: - - spend-insights - referenceSubsidiaryCompanies: [] - With a tag: - value: - id: ab12c58d-a678-4ebf-a159-ae99e1807bd0 - name: Technicalium - description: '' - platform: '' - redirect: 'https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0' - dataConnections: [] - created: '2022-11-10T10:45:18.1950523Z' - createdByUserName: Dan Tzabar - products: - - spend-insights - tags: - region: us - referenceSubsidiaryCompanies: [] - '400': - $ref: '#/components/responses/BadRequest' - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - description: "\uFEFF\x55\x73\x65\x20\x74\x68\x65\x20\x2A\x43\x72\x65\x61\x74\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x74\x6F\x20\x63\x72\x65\x61\x74\x65\x20\x61\x20\x6E\x65\x77\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x62\x61\x6E\x6B\x2D\x66\x65\x65\x64\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x74\x68\x61\x74\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x79\x6F\x75\x72\x20\x63\x75\x73\x74\x6F\x6D\x65\x72\x20\x69\x6E\x20\x43\x6F\x64\x61\x74\x2E\x20\n\n\x41\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x62\x61\x6E\x6B\x2D\x66\x65\x65\x64\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x61\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x64\x61\x74\x61\x2E\n\x45\x61\x63\x68\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x68\x61\x76\x65\x20\x6D\x75\x6C\x74\x69\x70\x6C\x65\x20\x5B\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x62\x61\x6E\x6B\x2D\x66\x65\x65\x64\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x29\x20\x74\x6F\x20\x64\x69\x66\x66\x65\x72\x65\x6E\x74\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x73\x2C\x20\x73\x75\x63\x68\x20\x61\x73\x20\x6F\x6E\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x58\x65\x72\x6F\x20\x66\x6F\x72\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x64\x61\x74\x61\x2C\x20\x74\x77\x6F\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x74\x6F\x20\x50\x6C\x61\x69\x64\x20\x66\x6F\x72\x20\x74\x77\x6F\x20\x62\x61\x6E\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x2C\x20\x61\x6E\x64\x20\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x5A\x65\x74\x74\x6C\x65\x20\x66\x6F\x72\x20\x50\x4F\x53\x20\x64\x61\x74\x61\x2E\n\n\x49\x66\x20\x66\x6F\x72\x62\x69\x64\x64\x65\x6E\x20\x63\x68\x61\x72\x61\x63\x74\x65\x72\x73\x20\x28\x73\x65\x65\x20\x60\x6E\x61\x6D\x65\x60\x20\x70\x61\x74\x74\x65\x72\x6E\x29\x20\x61\x72\x65\x20\x70\x72\x65\x73\x65\x6E\x74\x20\x69\x6E\x20\x74\x68\x65\x20\x72\x65\x71\x75\x65\x73\x74\x2C\x20\x61\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x77\x69\x6C\x6C\x20\x62\x65\x20\x63\x72\x65\x61\x74\x65\x64\x20\x77\x69\x74\x68\x20\x74\x68\x65\x20\x66\x6F\x72\x62\x69\x64\x64\x65\x6E\x20\x63\x68\x61\x72\x61\x63\x74\x65\x72\x73\x20\x72\x65\x6D\x6F\x76\x65\x64\x2E\x20\x46\x6F\x72\x20\x65\x78\x61\x6D\x70\x6C\x65\x2C\x20\x60\x43\x6F\x6D\x70\x61\x6E\x79\x20\x28\x43\x6F\x64\x61\x74\x5B\x31\x5D\x29\x60\x20\x77\x69\x74\x68\x20\x62\x65\x20\x63\x72\x65\x61\x74\x65\x64\x20\x61\x73\x20\x60\x43\x6F\x6D\x70\x61\x6E\x79\x20\x43\x6F\x64\x61\x74\x31\x60\x2E" - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CompanyRequestBody' - examples: - With no description: - value: - name: Technicalium - With a description: - value: - name: Technicalium - description: 'Technology services, including web and app design and development' get: summary: List companies tags: @@ -347,7 +296,7 @@ paths: '503': $ref: '#/components/responses/Service-Unavailable' operationId: list-companies - description: "\uFEFF\x54\x68\x65\x20\x2A\x4C\x69\x73\x74\x20\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x72\x65\x74\x75\x72\x6E\x73\x20\x61\x20\x6C\x69\x73\x74\x20\x6F\x66\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x62\x61\x6E\x6B\x2D\x66\x65\x65\x64\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x65\x64\x20\x74\x6F\x20\x79\x6F\x75\x72\x20\x69\x6E\x73\x74\x61\x6E\x63\x65\x73\x2E\n\n\x41\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x62\x61\x6E\x6B\x2D\x66\x65\x65\x64\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x61\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x64\x61\x74\x61\x2E\n\x45\x61\x63\x68\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x68\x61\x76\x65\x20\x6D\x75\x6C\x74\x69\x70\x6C\x65\x20\x5B\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x62\x61\x6E\x6B\x2D\x66\x65\x65\x64\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x29\x20\x74\x6F\x20\x64\x69\x66\x66\x65\x72\x65\x6E\x74\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x73\x2C\x20\x73\x75\x63\x68\x20\x61\x73\x20\x6F\x6E\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x58\x65\x72\x6F\x20\x66\x6F\x72\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x64\x61\x74\x61\x2C\x20\x74\x77\x6F\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x74\x6F\x20\x50\x6C\x61\x69\x64\x20\x66\x6F\x72\x20\x74\x77\x6F\x20\x62\x61\x6E\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x2C\x20\x61\x6E\x64\x20\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x5A\x65\x74\x74\x6C\x65\x20\x66\x6F\x72\x20\x50\x4F\x53\x20\x64\x61\x74\x61\x2E\n\n\x23\x23\x20\x46\x69\x6C\x74\x65\x72\x20\x62\x79\x20\x74\x61\x67\x73\n\n\x54\x68\x65\x20\x2A\x4C\x69\x73\x74\x20\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x73\x75\x70\x70\x6F\x72\x74\x73\x20\x74\x68\x65\x20\x66\x69\x6C\x74\x65\x72\x69\x6E\x67\x20\x6F\x66\x20\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73\x20\x75\x73\x69\x6E\x67\x20\x5B\x74\x61\x67\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x75\x73\x69\x6E\x67\x2D\x74\x68\x65\x2D\x61\x70\x69\x2F\x6D\x61\x6E\x61\x67\x69\x6E\x67\x2D\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73\x23\x61\x64\x64\x2D\x6D\x65\x74\x61\x64\x61\x74\x61\x2D\x74\x6F\x2D\x61\x2D\x63\x6F\x6D\x70\x61\x6E\x79\x29\x2E\x20\x49\x74\x20\x73\x75\x70\x70\x6F\x72\x74\x73\x20\x74\x68\x65\x20\x66\x6F\x6C\x6C\x6F\x77\x69\x6E\x67\x20\x6F\x70\x65\x72\x61\x74\x6F\x72\x73\x20\x77\x69\x74\x68\x20\x5B\x43\x6F\x64\x61\x74\u2019\x73\x20\x71\x75\x65\x72\x79\x20\x6C\x61\x6E\x67\x75\x61\x67\x65\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x75\x73\x69\x6E\x67\x2D\x74\x68\x65\x2D\x61\x70\x69\x2F\x71\x75\x65\x72\x79\x69\x6E\x67\x29\x3A\n\n\x2D\x20\x65\x71\x75\x61\x6C\x73\x20\x28\x60\x3D\x60\x29\n\x2D\x20\x6E\x6F\x74\x20\x65\x71\x75\x61\x6C\x73\x20\x28\x60\x21\x3D\x60\x29\n\x2D\x20\x63\x6F\x6E\x74\x61\x69\x6E\x73\x20\x28\x60\x7E\x60\x29\n\n\x46\x6F\x72\x20\x65\x78\x61\x6D\x70\x6C\x65\x2C\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x75\x73\x65\x20\x74\x68\x65\x20\x71\x75\x65\x72\x79\x69\x6E\x67\x20\x74\x6F\x20\x66\x69\x6C\x74\x65\x72\x20\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73\x20\x74\x61\x67\x67\x65\x64\x20\x77\x69\x74\x68\x20\x61\x20\x73\x70\x65\x63\x69\x66\x69\x63\x20\x66\x6F\x72\x65\x69\x67\x6E\x20\x6B\x65\x79\x2C\x20\x72\x65\x67\x69\x6F\x6E\x2C\x20\x6F\x72\x20\x6F\x77\x6E\x69\x6E\x67\x20\x74\x65\x61\x6D\x3A\x20\n\x2D\x20\x46\x6F\x72\x65\x69\x67\x6E\x20\x6B\x65\x79\x3A\x20\x60\x75\x69\x64\x20\x3D\x20\x7B\x79\x6F\x75\x72\x43\x75\x73\x74\x6F\x6D\x65\x72\x49\x64\x7D\x60\n\x2D\x20\x52\x65\x67\x69\x6F\x6E\x3A\x20\x60\x72\x65\x67\x69\x6F\x6E\x20\x21\x3D\x20\x75\x6B\x60\n\x2D\x20\x4F\x77\x6E\x69\x6E\x67\x20\x74\x65\x61\x6D\x20\x61\x6E\x64\x20\x72\x65\x67\x69\x6F\x6E\x3A\x20\x60\x72\x65\x67\x69\x6F\x6E\x20\x3D\x20\x75\x6B\x20\x26\x26\x20\x6F\x77\x6E\x69\x6E\x67\x54\x65\x61\x6D\x20\x3D\x20\x69\x6E\x76\x6F\x69\x63\x65\x2D\x66\x69\x6E\x61\x6E\x63\x65\x60" + description: "\uFEFF\x54\x68\x65\x20\x2A\x4C\x69\x73\x74\x20\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x72\x65\x74\x75\x72\x6E\x73\x20\x61\x20\x6C\x69\x73\x74\x20\x6F\x66\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x65\x64\x20\x74\x6F\x20\x79\x6F\x75\x72\x20\x69\x6E\x73\x74\x61\x6E\x63\x65\x73\x2E\n\n\x41\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x61\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x64\x61\x74\x61\x2E\n\x45\x61\x63\x68\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x68\x61\x76\x65\x20\x6D\x75\x6C\x74\x69\x70\x6C\x65\x20\x5B\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x29\x20\x74\x6F\x20\x64\x69\x66\x66\x65\x72\x65\x6E\x74\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x73\x2C\x20\x73\x75\x63\x68\x20\x61\x73\x20\x6F\x6E\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x58\x65\x72\x6F\x20\x66\x6F\x72\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x64\x61\x74\x61\x2C\x20\x74\x77\x6F\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x74\x6F\x20\x50\x6C\x61\x69\x64\x20\x66\x6F\x72\x20\x74\x77\x6F\x20\x62\x61\x6E\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x2C\x20\x61\x6E\x64\x20\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x5A\x65\x74\x74\x6C\x65\x20\x66\x6F\x72\x20\x50\x4F\x53\x20\x64\x61\x74\x61\x2E\n\n\x23\x23\x20\x46\x69\x6C\x74\x65\x72\x20\x62\x79\x20\x74\x61\x67\x73\n\n\x54\x68\x65\x20\x2A\x4C\x69\x73\x74\x20\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x73\x75\x70\x70\x6F\x72\x74\x73\x20\x74\x68\x65\x20\x66\x69\x6C\x74\x65\x72\x69\x6E\x67\x20\x6F\x66\x20\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73\x20\x75\x73\x69\x6E\x67\x20\x5B\x74\x61\x67\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x75\x73\x69\x6E\x67\x2D\x74\x68\x65\x2D\x61\x70\x69\x2F\x6D\x61\x6E\x61\x67\x69\x6E\x67\x2D\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73\x23\x61\x64\x64\x2D\x6D\x65\x74\x61\x64\x61\x74\x61\x2D\x74\x6F\x2D\x61\x2D\x63\x6F\x6D\x70\x61\x6E\x79\x29\x2E\x20\x49\x74\x20\x73\x75\x70\x70\x6F\x72\x74\x73\x20\x74\x68\x65\x20\x66\x6F\x6C\x6C\x6F\x77\x69\x6E\x67\x20\x6F\x70\x65\x72\x61\x74\x6F\x72\x73\x20\x77\x69\x74\x68\x20\x5B\x43\x6F\x64\x61\x74\u2019\x73\x20\x71\x75\x65\x72\x79\x20\x6C\x61\x6E\x67\x75\x61\x67\x65\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x75\x73\x69\x6E\x67\x2D\x74\x68\x65\x2D\x61\x70\x69\x2F\x71\x75\x65\x72\x79\x69\x6E\x67\x29\x3A\n\n\x2D\x20\x65\x71\x75\x61\x6C\x73\x20\x28\x60\x3D\x60\x29\n\x2D\x20\x6E\x6F\x74\x20\x65\x71\x75\x61\x6C\x73\x20\x28\x60\x21\x3D\x60\x29\n\x2D\x20\x63\x6F\x6E\x74\x61\x69\x6E\x73\x20\x28\x60\x7E\x60\x29\n\n\x46\x6F\x72\x20\x65\x78\x61\x6D\x70\x6C\x65\x2C\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x75\x73\x65\x20\x74\x68\x65\x20\x71\x75\x65\x72\x79\x69\x6E\x67\x20\x74\x6F\x20\x66\x69\x6C\x74\x65\x72\x20\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73\x20\x74\x61\x67\x67\x65\x64\x20\x77\x69\x74\x68\x20\x61\x20\x73\x70\x65\x63\x69\x66\x69\x63\x20\x66\x6F\x72\x65\x69\x67\x6E\x20\x6B\x65\x79\x2C\x20\x72\x65\x67\x69\x6F\x6E\x2C\x20\x6F\x72\x20\x6F\x77\x6E\x69\x6E\x67\x20\x74\x65\x61\x6D\x3A\x20\n\x2D\x20\x46\x6F\x72\x65\x69\x67\x6E\x20\x6B\x65\x79\x3A\x20\x60\x75\x69\x64\x20\x3D\x20\x7B\x79\x6F\x75\x72\x43\x75\x73\x74\x6F\x6D\x65\x72\x49\x64\x7D\x60\n\x2D\x20\x52\x65\x67\x69\x6F\x6E\x3A\x20\x60\x72\x65\x67\x69\x6F\x6E\x20\x21\x3D\x20\x75\x6B\x60\n\x2D\x20\x4F\x77\x6E\x69\x6E\x67\x20\x74\x65\x61\x6D\x20\x61\x6E\x64\x20\x72\x65\x67\x69\x6F\x6E\x3A\x20\x60\x72\x65\x67\x69\x6F\x6E\x20\x3D\x20\x75\x6B\x20\x26\x26\x20\x6F\x77\x6E\x69\x6E\x67\x54\x65\x61\x6D\x20\x3D\x20\x69\x6E\x76\x6F\x69\x63\x65\x2D\x66\x69\x6E\x61\x6E\x63\x65\x60" parameters: - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/pageSize' @@ -359,136 +308,93 @@ paths: type: string example: region=uk && team=invoice-finance description: 'Filter companies by tags using the "equals" (=), "not equals" (!=), and "contains" (~) operators with [Codat’s query language](https://docs.codat.io/using-the-api/querying).' - '/companies/{companyId}': - get: - summary: Get company - operationId: get-company - description: "\uFEFF\x54\x68\x65\x20\x2A\x47\x65\x74\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x72\x65\x74\x75\x72\x6E\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x66\x6F\x72\x20\x61\x20\x67\x69\x76\x65\x6E\x20\x60\x63\x6F\x6D\x70\x61\x6E\x79\x49\x64\x60\x2E\n\n\x41\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x62\x61\x6E\x6B\x2D\x66\x65\x65\x64\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x61\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x64\x61\x74\x61\x2E\n\x45\x61\x63\x68\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x68\x61\x76\x65\x20\x6D\x75\x6C\x74\x69\x70\x6C\x65\x20\x5B\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x62\x61\x6E\x6B\x2D\x66\x65\x65\x64\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x29\x20\x74\x6F\x20\x64\x69\x66\x66\x65\x72\x65\x6E\x74\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x73\x2C\x20\x73\x75\x63\x68\x20\x61\x73\x20\x6F\x6E\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x58\x65\x72\x6F\x20\x66\x6F\x72\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x64\x61\x74\x61\x2C\x20\x74\x77\x6F\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x74\x6F\x20\x50\x6C\x61\x69\x64\x20\x66\x6F\x72\x20\x74\x77\x6F\x20\x62\x61\x6E\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x2C\x20\x61\x6E\x64\x20\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x5A\x65\x74\x74\x6C\x65\x20\x66\x6F\x72\x20\x50\x4F\x53\x20\x64\x61\x74\x61\x2E\n" - parameters: - - $ref: '#/components/parameters/companyId' + post: + summary: Create company tags: - Companies + operationId: create-company responses: '200': description: OK content: application/json: + x-speakeasy-usage-example: true schema: $ref: '#/components/schemas/Company' examples: - Simple company: + With no description: value: id: ab12c58d-a678-4ebf-a159-ae99e1807bd0 - name: Toft stores holdings + name: Technicalium description: '' platform: '' redirect: 'https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0' dataConnections: [] - created: '2022-11-10T10:45:18Z' + created: '2022-11-10T10:45:18.1950523Z' createdByUserName: Dan Tzabar products: - spend-insights - - lending - - expenses-v1 - - commerce referenceSubsidiaryCompanies: [] - Parent multi-entity company: + With a description: value: id: ab12c58d-a678-4ebf-a159-ae99e1807bd0 - name: Toft stores - description: '' + name: Technicalium + description: 'Technology services, including web and app design and development' platform: '' redirect: 'https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0' dataConnections: [] - created: '2022-11-10T10:45:18Z' + created: '2022-11-10T10:45:18.1950523Z' createdByUserName: Dan Tzabar products: - spend-insights - - lending - - expenses-v1 - - commerce - referenceSubsidiaryCompanies: - - id: c8d3af58-7011-47ce-b3f2-89faf300ef6d - name: Toft stores UK - links: - portal: 'https://app.codat.io/companies/c8d3af58-7011-47ce-b3f2-89faf300ef6d/summary' - - id: db94eddc-9212-4568-9b5c-3eab0e325913 - name: Toft stores US - links: - portal: 'https://app.codat.io/companies/db94eddc-9212-4568-9b5c-3eab0e325913/summary' - Subsidiary multi-entity company: + referenceSubsidiaryCompanies: [] + With a tag: value: - id: c8d3af58-7011-47ce-b3f2-89faf300ef6d - name: Toft stores UK + id: ab12c58d-a678-4ebf-a159-ae99e1807bd0 + name: Technicalium description: '' platform: '' - redirect: 'https://link.codat.io/company/c8d3af58-7011-47ce-b3f2-89faf300ef6d' - dataConnections: - - id: d5ab61b7-1ad0-46fd-9f9f-b6761047941e - integrationId: cc750323-5a47-4f28-8d8e-30fbbf2ce137 - integrationKey: akxx - sourceId: 9815b998-024d-4415-a40b-89903b2cad6f - platformName: Oracle NetSuite - linkUrl: 'https://link-api.codat.io/companies/c8d3af58-7011-47ce-b3f2-89faf300ef6d/connections/d5ab61b7-1ad0-46fd-9f9f-b6761047941e/start' - status: Linked - lastSync: '2022-01-01T12:30:00.000Z' - created: '2022-01-01T11:30:00Z' - sourceType: Accounting - created: '2022-11-10T10:45:18Z' + redirect: 'https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0' + dataConnections: [] + created: '2022-11-10T10:45:18.1950523Z' createdByUserName: Dan Tzabar products: - spend-insights - - lending - - expenses-v1 - - commerce - referenceParentCompany: - id: ab12c58d-a678-4ebf-a159-ae99e1807bd0 - name: Toft stores - links: - portal: 'https://app.codat.io/companies/ab12c58d-a678-4ebf-a159-ae99e1807bd0/summary' + tags: + region: us referenceSubsidiaryCompanies: [] + '400': + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': $ref: '#/components/responses/Payment-Required' '403': $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - delete: - summary: Delete a company - operationId: delete-company - parameters: - - $ref: '#/components/parameters/companyId' - description: "\uFEFF\x54\x68\x65\x20\x2A\x44\x65\x6C\x65\x74\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x70\x65\x72\x6D\x61\x6E\x65\x6E\x74\x6C\x79\x20\x64\x65\x6C\x65\x74\x65\x73\x20\x61\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x62\x61\x6E\x6B\x2D\x66\x65\x65\x64\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x2C\x20\x69\x74\x73\x20\x5B\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x62\x61\x6E\x6B\x2D\x66\x65\x65\x64\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x29\x20\x61\x6E\x64\x20\x61\x6E\x79\x20\x63\x61\x63\x68\x65\x64\x20\x64\x61\x74\x61\x2E\x20\x54\x68\x69\x73\x20\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E\x20\x69\x73\x20\x69\x72\x72\x65\x76\x65\x72\x73\x69\x62\x6C\x65\x2E\n\n\x41\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x62\x61\x6E\x6B\x2D\x66\x65\x65\x64\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x61\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x64\x61\x74\x61\x2E\n\x45\x61\x63\x68\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x68\x61\x76\x65\x20\x6D\x75\x6C\x74\x69\x70\x6C\x65\x20\x5B\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x62\x61\x6E\x6B\x2D\x66\x65\x65\x64\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x29\x20\x74\x6F\x20\x64\x69\x66\x66\x65\x72\x65\x6E\x74\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x73\x2C\x20\x73\x75\x63\x68\x20\x61\x73\x20\x6F\x6E\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x58\x65\x72\x6F\x20\x66\x6F\x72\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x64\x61\x74\x61\x2C\x20\x74\x77\x6F\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x74\x6F\x20\x50\x6C\x61\x69\x64\x20\x66\x6F\x72\x20\x74\x77\x6F\x20\x62\x61\x6E\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x2C\x20\x61\x6E\x64\x20\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x5A\x65\x74\x74\x6C\x65\x20\x66\x6F\x72\x20\x50\x4F\x53\x20\x64\x61\x74\x61\x2E\n" - tags: - - Companies - responses: - '204': - description: No Content - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' '429': $ref: '#/components/responses/Too-Many-Requests' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' + description: "\uFEFF\x55\x73\x65\x20\x74\x68\x65\x20\x2A\x43\x72\x65\x61\x74\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x74\x6F\x20\x63\x72\x65\x61\x74\x65\x20\x61\x20\x6E\x65\x77\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x74\x68\x61\x74\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x79\x6F\x75\x72\x20\x63\x75\x73\x74\x6F\x6D\x65\x72\x20\x69\x6E\x20\x43\x6F\x64\x61\x74\x2E\x20\n\n\x41\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x61\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x64\x61\x74\x61\x2E\n\x45\x61\x63\x68\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x68\x61\x76\x65\x20\x6D\x75\x6C\x74\x69\x70\x6C\x65\x20\x5B\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x29\x20\x74\x6F\x20\x64\x69\x66\x66\x65\x72\x65\x6E\x74\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x73\x2C\x20\x73\x75\x63\x68\x20\x61\x73\x20\x6F\x6E\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x58\x65\x72\x6F\x20\x66\x6F\x72\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x64\x61\x74\x61\x2C\x20\x74\x77\x6F\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x74\x6F\x20\x50\x6C\x61\x69\x64\x20\x66\x6F\x72\x20\x74\x77\x6F\x20\x62\x61\x6E\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x2C\x20\x61\x6E\x64\x20\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x5A\x65\x74\x74\x6C\x65\x20\x66\x6F\x72\x20\x50\x4F\x53\x20\x64\x61\x74\x61\x2E\n\n\x49\x66\x20\x66\x6F\x72\x62\x69\x64\x64\x65\x6E\x20\x63\x68\x61\x72\x61\x63\x74\x65\x72\x73\x20\x28\x73\x65\x65\x20\x60\x6E\x61\x6D\x65\x60\x20\x70\x61\x74\x74\x65\x72\x6E\x29\x20\x61\x72\x65\x20\x70\x72\x65\x73\x65\x6E\x74\x20\x69\x6E\x20\x74\x68\x65\x20\x72\x65\x71\x75\x65\x73\x74\x2C\x20\x61\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x77\x69\x6C\x6C\x20\x62\x65\x20\x63\x72\x65\x61\x74\x65\x64\x20\x77\x69\x74\x68\x20\x74\x68\x65\x20\x66\x6F\x72\x62\x69\x64\x64\x65\x6E\x20\x63\x68\x61\x72\x61\x63\x74\x65\x72\x73\x20\x72\x65\x6D\x6F\x76\x65\x64\x2E\x20\x46\x6F\x72\x20\x65\x78\x61\x6D\x70\x6C\x65\x2C\x20\x60\x43\x6F\x6D\x70\x61\x6E\x79\x20\x28\x43\x6F\x64\x61\x74\x5B\x31\x5D\x29\x60\x20\x77\x69\x74\x68\x20\x62\x65\x20\x63\x72\x65\x61\x74\x65\x64\x20\x61\x73\x20\x60\x43\x6F\x6D\x70\x61\x6E\x79\x20\x43\x6F\x64\x61\x74\x31\x60\x2E" + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyRequestBody' + examples: + With no description: + value: + name: Technicalium + With a description: + value: + name: Technicalium + description: 'Technology services, including web and app design and development' + '/companies/{companyId}': put: summary: Replace company - description: "\uFEFF\x55\x73\x65\x20\x74\x68\x65\x20\x2A\x52\x65\x70\x6C\x61\x63\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x74\x6F\x20\x72\x65\x70\x6C\x61\x63\x65\x20\x74\x68\x65\x20\x65\x78\x69\x73\x74\x69\x6E\x67\x20\x6E\x61\x6D\x65\x2C\x20\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x2C\x20\x61\x6E\x64\x20\x74\x61\x67\x73\x20\x6F\x66\x20\x74\x68\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2E\x20\x43\x61\x6C\x6C\x69\x6E\x67\x20\x74\x68\x65\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x77\x69\x6C\x6C\x20\x72\x65\x70\x6C\x61\x63\x65\x20\x65\x78\x69\x73\x74\x69\x6E\x67\x20\x76\x61\x6C\x75\x65\x73\x20\x65\x76\x65\x6E\x20\x69\x66\x20\x6E\x65\x77\x20\x76\x61\x6C\x75\x65\x73\x20\x68\x61\x76\x65\x6E\x27\x74\x20\x62\x65\x65\x6E\x20\x64\x65\x66\x69\x6E\x65\x64\x20\x69\x6E\x20\x74\x68\x65\x20\x70\x61\x79\x6C\x6F\x61\x64\x2E\n\n\x41\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x62\x61\x6E\x6B\x2D\x66\x65\x65\x64\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x61\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x64\x61\x74\x61\x2E\n\x45\x61\x63\x68\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x68\x61\x76\x65\x20\x6D\x75\x6C\x74\x69\x70\x6C\x65\x20\x5B\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x62\x61\x6E\x6B\x2D\x66\x65\x65\x64\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x29\x20\x74\x6F\x20\x64\x69\x66\x66\x65\x72\x65\x6E\x74\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x73\x2C\x20\x73\x75\x63\x68\x20\x61\x73\x20\x6F\x6E\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x58\x65\x72\x6F\x20\x66\x6F\x72\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x64\x61\x74\x61\x2C\x20\x74\x77\x6F\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x74\x6F\x20\x50\x6C\x61\x69\x64\x20\x66\x6F\x72\x20\x74\x77\x6F\x20\x62\x61\x6E\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x2C\x20\x61\x6E\x64\x20\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x5A\x65\x74\x74\x6C\x65\x20\x66\x6F\x72\x20\x50\x4F\x53\x20\x64\x61\x74\x61\x2E" + description: "\uFEFF\x55\x73\x65\x20\x74\x68\x65\x20\x2A\x52\x65\x70\x6C\x61\x63\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x74\x6F\x20\x72\x65\x70\x6C\x61\x63\x65\x20\x74\x68\x65\x20\x65\x78\x69\x73\x74\x69\x6E\x67\x20\x6E\x61\x6D\x65\x2C\x20\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x2C\x20\x61\x6E\x64\x20\x74\x61\x67\x73\x20\x6F\x66\x20\x74\x68\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2E\x20\x43\x61\x6C\x6C\x69\x6E\x67\x20\x74\x68\x65\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x77\x69\x6C\x6C\x20\x72\x65\x70\x6C\x61\x63\x65\x20\x65\x78\x69\x73\x74\x69\x6E\x67\x20\x76\x61\x6C\x75\x65\x73\x20\x65\x76\x65\x6E\x20\x69\x66\x20\x6E\x65\x77\x20\x76\x61\x6C\x75\x65\x73\x20\x68\x61\x76\x65\x6E\x27\x74\x20\x62\x65\x65\x6E\x20\x64\x65\x66\x69\x6E\x65\x64\x20\x69\x6E\x20\x74\x68\x65\x20\x70\x61\x79\x6C\x6F\x61\x64\x2E\n\n\x41\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x61\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x64\x61\x74\x61\x2E\n\x45\x61\x63\x68\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x68\x61\x76\x65\x20\x6D\x75\x6C\x74\x69\x70\x6C\x65\x20\x5B\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x29\x20\x74\x6F\x20\x64\x69\x66\x66\x65\x72\x65\x6E\x74\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x73\x2C\x20\x73\x75\x63\x68\x20\x61\x73\x20\x6F\x6E\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x58\x65\x72\x6F\x20\x66\x6F\x72\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x64\x61\x74\x61\x2C\x20\x74\x77\x6F\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x74\x6F\x20\x50\x6C\x61\x69\x64\x20\x66\x6F\x72\x20\x74\x77\x6F\x20\x62\x61\x6E\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x2C\x20\x61\x6E\x64\x20\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x5A\x65\x74\x74\x6C\x65\x20\x66\x6F\x72\x20\x50\x4F\x53\x20\x64\x61\x74\x61\x2E" operationId: replace-company x-speakeasy-name-override: replace parameters: @@ -531,7 +437,7 @@ paths: description: Additional documents required patch: summary: Update company - description: "\uFEFF\x55\x73\x65\x20\x74\x68\x65\x20\x2A\x55\x70\x64\x61\x74\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x74\x6F\x20\x75\x70\x64\x61\x74\x65\x20\x74\x68\x65\x20\x6E\x61\x6D\x65\x2C\x20\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x2C\x20\x6F\x72\x20\x74\x61\x67\x73\x20\x6F\x66\x20\x74\x68\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2E\n\n\x54\x68\x65\x20\x2A\x55\x70\x64\x61\x74\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x64\x6F\x65\x73\x6E\x27\x74\x20\x68\x61\x76\x65\x20\x61\x6E\x79\x20\x72\x65\x71\x75\x69\x72\x65\x64\x20\x66\x69\x65\x6C\x64\x73\x2E\x20\x49\x66\x20\x61\x6E\x79\x20\x6F\x66\x20\x74\x68\x65\x20\x66\x69\x65\x6C\x64\x73\x20\x70\x72\x6F\x76\x69\x64\x65\x64\x20\x61\x72\x65\x20\x60\x6E\x75\x6C\x6C\x60\x20\x6F\x72\x20\x6E\x6F\x74\x20\x70\x72\x6F\x76\x69\x64\x65\x64\x2C\x20\x74\x68\x65\x79\x20\x77\x6F\x6E\x27\x74\x20\x62\x65\x20\x69\x6E\x63\x6C\x75\x64\x65\x64\x20\x69\x6E\x20\x74\x68\x65\x20\x75\x70\x64\x61\x74\x65\x2E\x20\x20\n\n\x41\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x62\x61\x6E\x6B\x2D\x66\x65\x65\x64\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x61\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x64\x61\x74\x61\x2E" + description: "\uFEFF\x55\x73\x65\x20\x74\x68\x65\x20\x2A\x55\x70\x64\x61\x74\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x74\x6F\x20\x75\x70\x64\x61\x74\x65\x20\x74\x68\x65\x20\x6E\x61\x6D\x65\x2C\x20\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x2C\x20\x6F\x72\x20\x74\x61\x67\x73\x20\x6F\x66\x20\x74\x68\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2E\n\n\x54\x68\x65\x20\x2A\x55\x70\x64\x61\x74\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x64\x6F\x65\x73\x6E\x27\x74\x20\x68\x61\x76\x65\x20\x61\x6E\x79\x20\x72\x65\x71\x75\x69\x72\x65\x64\x20\x66\x69\x65\x6C\x64\x73\x2E\x20\x49\x66\x20\x61\x6E\x79\x20\x6F\x66\x20\x74\x68\x65\x20\x66\x69\x65\x6C\x64\x73\x20\x70\x72\x6F\x76\x69\x64\x65\x64\x20\x61\x72\x65\x20\x60\x6E\x75\x6C\x6C\x60\x20\x6F\x72\x20\x6E\x6F\x74\x20\x70\x72\x6F\x76\x69\x64\x65\x64\x2C\x20\x74\x68\x65\x79\x20\x77\x6F\x6E\x27\x74\x20\x62\x65\x20\x69\x6E\x63\x6C\x75\x64\x65\x64\x20\x69\x6E\x20\x74\x68\x65\x20\x75\x70\x64\x61\x74\x65\x2E\x20\x20\n\n\x41\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x61\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x64\x61\x74\x61\x2E" operationId: update-company parameters: - $ref: '#/components/parameters/companyId' @@ -571,29 +477,17 @@ paths: Update name: value: name: New Name - '/companies/{companyId}/accessToken': - get: - summary: Get company access token - operationId: get-company-access-token - x-speakeasy-name-override: get-access-token - description: "Use the _Get company access token_ endpoint to return an access token for the specified company ID. The token is valid for one day. \n\nThe token is required by Codat's embeddable UIs (such as [Connections SDK](https://docs.codat.io/auth-flow/optimize/connection-management) and [Link SDK](https://docs.codat.io/auth-flow/authorize-embedded-link)) to verify the identity of the user and improve the reliability of data provided by them." + delete: + summary: Delete a company + operationId: delete-company parameters: - $ref: '#/components/parameters/companyId' + description: "\uFEFF\x54\x68\x65\x20\x2A\x44\x65\x6C\x65\x74\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x70\x65\x72\x6D\x61\x6E\x65\x6E\x74\x6C\x79\x20\x64\x65\x6C\x65\x74\x65\x73\x20\x61\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x2C\x20\x69\x74\x73\x20\x5B\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x29\x20\x61\x6E\x64\x20\x61\x6E\x79\x20\x63\x61\x63\x68\x65\x64\x20\x64\x61\x74\x61\x2E\x20\x54\x68\x69\x73\x20\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E\x20\x69\x73\x20\x69\x72\x72\x65\x76\x65\x72\x73\x69\x62\x6C\x65\x2E\n\n\x41\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x61\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x64\x61\x74\x61\x2E\n\x45\x61\x63\x68\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x68\x61\x76\x65\x20\x6D\x75\x6C\x74\x69\x70\x6C\x65\x20\x5B\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x29\x20\x74\x6F\x20\x64\x69\x66\x66\x65\x72\x65\x6E\x74\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x73\x2C\x20\x73\x75\x63\x68\x20\x61\x73\x20\x6F\x6E\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x58\x65\x72\x6F\x20\x66\x6F\x72\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x64\x61\x74\x61\x2C\x20\x74\x77\x6F\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x74\x6F\x20\x50\x6C\x61\x69\x64\x20\x66\x6F\x72\x20\x74\x77\x6F\x20\x62\x61\x6E\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x2C\x20\x61\x6E\x64\x20\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x5A\x65\x74\x74\x6C\x65\x20\x66\x6F\x72\x20\x50\x4F\x53\x20\x64\x61\x74\x61\x2E\n" tags: - Companies responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/CompanyAccessToken' - examples: - Simple company: - value: - expiresIn: 86400 - accessToken: string - tokenType: Bearer + '204': + description: No Content '401': $ref: '#/components/responses/Unauthorized' '402': @@ -608,54 +502,155 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections': get: - summary: List connections - description: "\uFEFF\x4C\x69\x73\x74\x20\x74\x68\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x66\x6F\x72\x20\x61\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2E" - operationId: list-connections - tags: - - Connections + summary: Get company + operationId: get-company + description: "\uFEFF\x54\x68\x65\x20\x2A\x47\x65\x74\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x72\x65\x74\x75\x72\x6E\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x66\x6F\x72\x20\x61\x20\x67\x69\x76\x65\x6E\x20\x60\x63\x6F\x6D\x70\x61\x6E\x79\x49\x64\x60\x2E\n\n\x41\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x61\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x64\x61\x74\x61\x2E\n\x45\x61\x63\x68\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x68\x61\x76\x65\x20\x6D\x75\x6C\x74\x69\x70\x6C\x65\x20\x5B\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x29\x20\x74\x6F\x20\x64\x69\x66\x66\x65\x72\x65\x6E\x74\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x73\x2C\x20\x73\x75\x63\x68\x20\x61\x73\x20\x6F\x6E\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x58\x65\x72\x6F\x20\x66\x6F\x72\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x64\x61\x74\x61\x2C\x20\x74\x77\x6F\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x74\x6F\x20\x50\x6C\x61\x69\x64\x20\x66\x6F\x72\x20\x74\x77\x6F\x20\x62\x61\x6E\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x2C\x20\x61\x6E\x64\x20\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x5A\x65\x74\x74\x6C\x65\x20\x66\x6F\x72\x20\x50\x4F\x53\x20\x64\x61\x74\x61\x2E\n" parameters: - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/page' - - $ref: '#/components/parameters/pageSize' - - $ref: '#/components/parameters/query' - - $ref: '#/components/parameters/orderBy' + tags: + - Companies responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/Connections' + $ref: '#/components/schemas/Company' examples: - Connections: + Simple company: value: - results: - - id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd - integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c - integrationKey: dfxm - sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee - platformName: Basiq - linkUrl: 'https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' - status: Linked - lastSync: '2022-10-27T10:22:43.6464237Z' - created: '2022-10-27T09:53:29Z' - sourceType: Banking - pageNumber: 0 - pageSize: 0 - totalResults: 0 - _links: - self: - href: string - current: - href: string - next: - href: string - previous: - href: string - '400': - $ref: '#/components/responses/Malformed-Query' + id: ab12c58d-a678-4ebf-a159-ae99e1807bd0 + name: Toft stores holdings + description: '' + platform: '' + redirect: 'https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0' + dataConnections: [] + created: '2022-11-10T10:45:18Z' + createdByUserName: Dan Tzabar + products: + - spend-insights + - lending + - expenses-v1 + - commerce + referenceSubsidiaryCompanies: [] + Parent multi-entity company: + value: + id: ab12c58d-a678-4ebf-a159-ae99e1807bd0 + name: Toft stores + description: '' + platform: '' + redirect: 'https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0' + dataConnections: [] + created: '2022-11-10T10:45:18Z' + createdByUserName: Dan Tzabar + products: + - spend-insights + - lending + - expenses-v1 + - commerce + referenceSubsidiaryCompanies: + - id: c8d3af58-7011-47ce-b3f2-89faf300ef6d + name: Toft stores UK + links: + portal: 'https://app.codat.io/companies/c8d3af58-7011-47ce-b3f2-89faf300ef6d/summary' + - id: db94eddc-9212-4568-9b5c-3eab0e325913 + name: Toft stores US + links: + portal: 'https://app.codat.io/companies/db94eddc-9212-4568-9b5c-3eab0e325913/summary' + Subsidiary multi-entity company: + value: + id: c8d3af58-7011-47ce-b3f2-89faf300ef6d + name: Toft stores UK + description: '' + platform: '' + redirect: 'https://link.codat.io/company/c8d3af58-7011-47ce-b3f2-89faf300ef6d' + dataConnections: + - id: d5ab61b7-1ad0-46fd-9f9f-b6761047941e + integrationId: cc750323-5a47-4f28-8d8e-30fbbf2ce137 + integrationKey: akxx + sourceId: 9815b998-024d-4415-a40b-89903b2cad6f + platformName: Oracle NetSuite + linkUrl: 'https://link-api.codat.io/companies/c8d3af58-7011-47ce-b3f2-89faf300ef6d/connections/d5ab61b7-1ad0-46fd-9f9f-b6761047941e/start' + status: Linked + lastSync: '2022-01-01T12:30:00.000Z' + created: '2022-01-01T11:30:00Z' + sourceType: Accounting + created: '2022-11-10T10:45:18Z' + createdByUserName: Dan Tzabar + products: + - spend-insights + - lending + - expenses-v1 + - commerce + referenceParentCompany: + id: ab12c58d-a678-4ebf-a159-ae99e1807bd0 + name: Toft stores + links: + portal: 'https://app.codat.io/companies/ab12c58d-a678-4ebf-a159-ae99e1807bd0/summary' + referenceSubsidiaryCompanies: [] + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + '/companies/{companyId}/connections': + get: + summary: List connections + description: "\uFEFF\x4C\x69\x73\x74\x20\x74\x68\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x66\x6F\x72\x20\x61\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2E" + operationId: list-connections + tags: + - Connections + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + - $ref: '#/components/parameters/query' + - $ref: '#/components/parameters/orderBy' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Connections' + examples: + Connections: + value: + results: + - id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd + integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c + integrationKey: dfxm + sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee + platformName: Basiq + linkUrl: 'https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' + status: Linked + lastSync: '2022-10-27T10:22:43.6464237Z' + created: '2022-10-27T09:53:29Z' + sourceType: Banking + pageNumber: 0 + pageSize: 0 + totalResults: 0 + _links: + self: + href: string + current: + href: string + next: + href: string + previous: + href: string + '400': + $ref: '#/components/responses/Malformed-Query' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -844,441 +839,94 @@ paths: value: status: Unlinked description: '' - '/companies/{companyId}/connections/{connectionId}/data/bankAccounts': - parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' + '/companies/{companyId}/sync/expenses/connections/partnerExpense': + post: + tags: + - Connections + description: Creates a partner expense data connection + summary: Create partner expense connection + operationId: create-partner-expense-connection + x-speakeasy-name-override: create-partner-expense-connection + parameters: + - $ref: '#/components/parameters/companyId' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Connection' + examples: {} + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + '/companies/{companyId}/data/info': get: - x-internal: true tags: - - Bank accounts - summary: List bank accounts - operationId: list-bank-accounts + - Company info + summary: Get company info + description: Gets the latest basic info for a company. + operationId: get-company-info parameters: - - $ref: '#/components/parameters/page' - - $ref: '#/components/parameters/pageSize' - - $ref: '#/components/parameters/query' - - $ref: '#/components/parameters/orderBy' + - $ref: '#/components/parameters/companyId' responses: '200': description: Success content: application/json: schema: - $ref: '#/components/schemas/BankAccounts' + $ref: '#/components/schemas/CompanyInformation' examples: - Dynamics 365 Business Central: - value: - results: - - id: c9a41bc7-6e5b-ed11-8c34-0022481b8b5b - accountName: '55' - accountType: Unknown - nominalCode: '10500' - sortCode: '' - accountNumber: '' - iBan: '' - currency: GBP - balance: -352.03 - modifiedDate: '2023-03-27T14:21:10Z' - sourceModifiedDate: '2023-02-07T00:00:00' - overdraftLimit: 0 - metadata: - isDeleted: false - - id: 47020f80-60e6-ec11-82f8-0022481a77f0 - accountName: '555' - accountType: Unknown - nominalCode: '40300' - sortCode: '' - accountNumber: '' - iBan: '' - currency: PLN - balance: 661.79 - modifiedDate: '2023-03-27T14:21:10Z' - sourceModifiedDate: '2022-06-07T00:00:00' - overdraftLimit: 0 - metadata: - isDeleted: false - pageNumber: 1 - pageSize: 2 - totalResults: 28 - _links: - current: - href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/connections/60acb117-5cf5-4745-b069-491551da4066/data/bankAccounts?page=1&pageSize=2 - self: - href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/connections/60acb117-5cf5-4745-b069-491551da4066/data/bankAccounts - next: - href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/connections/60acb117-5cf5-4745-b069-491551da4066/data/bankAccounts?page=2&pageSize=2 - FreeAgent: - value: - results: - - id: '738783' - accountName: \w3fw - accountType: Debit - sortCode: '236972' - accountNumber: A06268209 - currency: GBP - balance: -10484.65 - availableBalance: -10484.65 - modifiedDate: '2023-04-25T14:19:12Z' - metadata: - isDeleted: false - - id: '738778' - accountName: 2e2bna45hy\ - accountType: Debit - sortCode: '236972' - accountNumber: D01825250 - currency: GBP - balance: -114.4 - availableBalance: -114.4 - modifiedDate: '2023-04-25T14:19:12Z' - metadata: - isDeleted: false - pageNumber: 1 - pageSize: 2 - totalResults: 82 - _links: - current: - href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/connections/4fd7c69f-ecc1-45f5-83f2-42ed3391e386/data/bankAccounts?page=1&pageSize=2 - self: - href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/connections/4fd7c69f-ecc1-45f5-83f2-42ed3391e386/data/bankAccounts - next: - href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/connections/4fd7c69f-ecc1-45f5-83f2-42ed3391e386/data/bankAccounts?page=2&pageSize=2 - KashFlow: - value: - results: - - id: '765768' - accountName: 16th Account - accountType: Unknown - nominalCode: '70700' - currency: GBP - balance: 326 - availableBalance: 326 - modifiedDate: '2022-09-30T10:29:16Z' - - id: '765766' - accountName: 1a1a - accountType: Unknown - nominalCode: '70600' - currency: GBP - balance: 0 - availableBalance: 0 - modifiedDate: '2022-09-30T10:29:16Z' - pageNumber: 1 - pageSize: 2 - totalResults: 56 - _links: - current: - href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/connections/ecab4f64-1a04-4c53-a343-bfd879f41f67/data/bankAccounts?page=1&pageSize=2 - self: - href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/connections/ecab4f64-1a04-4c53-a343-bfd879f41f67/data/bankAccounts - next: - href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/connections/ecab4f64-1a04-4c53-a343-bfd879f41f67/data/bankAccounts?page=2&pageSize=2 - Oracle NetSuite: - value: - results: - - id: '825' - accountName: Codat Europe Bank - accountType: Debit - nominalCode: '111111122222111' - currency: GBP - balance: 558.22 - modifiedDate: '2023-05-02T13:24:36Z' - sourceModifiedDate: '2022-07-15T11:34:02' - metadata: - isDeleted: false - - id: '826' - accountName: Codat Europe Bank USD - accountType: Debit - nominalCode: '1133221133' - currency: USD - modifiedDate: '2023-05-02T13:24:36Z' - sourceModifiedDate: '2021-03-26T10:31:40' - metadata: - isDeleted: false - pageNumber: 1 - pageSize: 2 - totalResults: 4 - _links: - current: - href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/connections/79f8313e-210a-4dc8-b69f-ba7e5004dda7/data/bankAccounts?page=1&pageSize=2 - self: - href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/connections/79f8313e-210a-4dc8-b69f-ba7e5004dda7/data/bankAccounts - next: - href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/connections/79f8313e-210a-4dc8-b69f-ba7e5004dda7/data/bankAccounts?page=2&pageSize=2 - QuickBooks Desktop: - value: - results: - - id: 20000-933270541 - accountName: Checking - accountType: Unknown - nominalCode: '10100' - currency: GBP - balance: 46954.1 - availableBalance: 46954.1 - modifiedDate: '2023-04-26T09:12:37Z' - sourceModifiedDate: '2023-12-16T05:06:45' - metadata: - isDeleted: false - - id: 550001-1071509830 - accountName: Petty Cash - accountType: Unknown - nominalCode: '10400' - currency: GBP - balance: 500 - availableBalance: 500 - modifiedDate: '2023-04-26T09:12:37Z' - sourceModifiedDate: '2023-12-16T05:06:45' - metadata: - isDeleted: false - pageNumber: 1 - pageSize: 2 - totalResults: 3 - _links: - current: - href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/connections/2c26b4da-97d4-4ba9-baad-1e18b49b96ac/data/bankAccounts?page=1&pageSize=2 - self: - href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/connections/2c26b4da-97d4-4ba9-baad-1e18b49b96ac/data/bankAccounts - next: - href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/connections/2c26b4da-97d4-4ba9-baad-1e18b49b96ac/data/bankAccounts?page=2&pageSize=2 - QuickBooks Online Sandbox: - value: - results: - - id: '164' - accountName: '00' - accountType: Debit - nominalCode: '123567' - currency: GBP - balance: 0 - availableBalance: 0 - modifiedDate: '2023-04-26T09:35:57Z' - sourceModifiedDate: '2022-07-20T14:11:28Z' - metadata: - isDeleted: false - - id: '163' - accountName: '11' - accountType: Debit - currency: GBP - balance: 0 - availableBalance: 0 - modifiedDate: '2023-04-26T09:35:57Z' - sourceModifiedDate: '2022-07-20T14:11:28Z' - metadata: - isDeleted: false - pageNumber: 1 - pageSize: 2 - totalResults: 57 - _links: - current: - href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/connections/1f9f6013-f8a5-4278-8a47-3ab7fdb6c24c/data/bankAccounts?page=1&pageSize=2 - self: - href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/connections/1f9f6013-f8a5-4278-8a47-3ab7fdb6c24c/data/bankAccounts - next: - href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/connections/1f9f6013-f8a5-4278-8a47-3ab7fdb6c24c/data/bankAccounts?page=2&pageSize=2 - QuickBooks Online: + Example 1: value: - results: - - id: '202' - accountName: \aa - accountType: Debit - currency: GBP - balance: 123 - availableBalance: 123 - modifiedDate: '2023-01-18T11:02:37Z' - sourceModifiedDate: '2022-11-11T14:15:13Z' - - id: '193' - accountName: 1 year ago - accountType: Debit - currency: GBP - balance: 5300.02 - availableBalance: 5300.02 - modifiedDate: '2023-01-18T11:02:37Z' - sourceModifiedDate: '2023-01-18T06:05:12Z' - pageNumber: 1 - pageSize: 2 - totalResults: 140 - _links: - current: - href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/connections/9e28a776-f4be-425b-8a3d-ad49956de2c9/data/bankAccounts?page=1&pageSize=2 - self: - href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/connections/9e28a776-f4be-425b-8a3d-ad49956de2c9/data/bankAccounts - next: - href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/connections/9e28a776-f4be-425b-8a3d-ad49956de2c9/data/bankAccounts?page=2&pageSize=2 - Sage 50 (UK): - value: - results: - - id: '1200' - accountName: Bank Current Account - accountType: Unknown - nominalCode: '1200' - sortCode: 23-34-34 - accountNumber: '003234234' - iBan: '' - currency: GBP - balance: -20091.04 - availableBalance: -20091.04 - modifiedDate: '2023-03-30T14:42:37Z' - sourceModifiedDate: '2022-11-25T09:25:48' - overdraftLimit: 120000 - institution: Lloyds Bank PLC - metadata: - isDeleted: false - - id: '1210' - accountName: Bank Deposit Account - accountType: Unknown - nominalCode: '1210' - sortCode: 45-45-45 - accountNumber: 9/00474345 - iBan: '' - currency: GBP - balance: 3510 - availableBalance: 3510 - modifiedDate: '2023-03-30T14:42:37Z' - sourceModifiedDate: '2022-11-25T09:25:48' - overdraftLimit: 0 - institution: Halifax Building Society - metadata: - isDeleted: false - pageNumber: 1 - pageSize: 2 - totalResults: 6 - _links: - current: - href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/connections/8ee4910f-4fc1-47e6-89b1-5931fb33d8f7/data/bankAccounts?page=1&pageSize=2 - self: - href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/connections/8ee4910f-4fc1-47e6-89b1-5931fb33d8f7/data/bankAccounts - next: - href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/connections/8ee4910f-4fc1-47e6-89b1-5931fb33d8f7/data/bankAccounts?page=2&pageSize=2 - Sage Business Cloud Accounting: - value: - results: - - id: 154d05abe9f24c4babe0f6a741dec1b9 - accountName: Abdi Internet Bank - accountType: Unknown - nominalCode: '1560' - sortCode: '010101' - accountNumber: '11111' - currency: GBP - balance: 49.61 - availableBalance: 49.61 - modifiedDate: '2022-10-24T14:52:53Z' - sourceModifiedDate: '2020-01-27T10:53:26Z' - - id: 565ce07212bc492c8c2d04f43f9f67e3 - accountName: Abdi Live Test - accountType: Unknown - nominalCode: '147852' - sortCode: '123456' - accountNumber: '1234567' - currency: GBP - balance: -225830.75 - availableBalance: -225830.75 - modifiedDate: '2022-10-24T14:52:53Z' - sourceModifiedDate: '2020-01-28T14:00:20Z' - pageNumber: 1 - pageSize: 2 - totalResults: 45 - _links: - current: - href: /companies/390083e2-351b-407c-a3be-55081c36c182/connections/37916fb7-b4b8-4a78-8872-1751e20ee0cd/data/bankAccounts?page=1&pageSize=2 - self: - href: /companies/390083e2-351b-407c-a3be-55081c36c182/connections/37916fb7-b4b8-4a78-8872-1751e20ee0cd/data/bankAccounts - next: - href: /companies/390083e2-351b-407c-a3be-55081c36c182/connections/37916fb7-b4b8-4a78-8872-1751e20ee0cd/data/bankAccounts?page=2&pageSize=2 - Sage Intacct: - value: - results: - - id: 'CREDITCARD:55' - accountName: CoT Credit Card - accountType: Credit - nominalCode: '10021' - currency: GBP - modifiedDate: '2023-04-04T16:31:46Z' - sourceModifiedDate: '2023-03-27T14:11:48' - metadata: - isDeleted: false - - id: 'CREDITCARD:58' - accountName: Cot Credit Card 2 - accountType: Credit - nominalCode: '11112' - currency: GBP - modifiedDate: '2023-04-04T16:31:46Z' - sourceModifiedDate: '2023-03-27T14:15:11' - metadata: - isDeleted: false - pageNumber: 1 - pageSize: 2 - totalResults: 14 - _links: - current: - href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/connections/8f457d9c-1142-4241-a07e-71d1ee2e3052/data/bankAccounts?page=1&pageSize=2 - self: - href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/connections/8f457d9c-1142-4241-a07e-71d1ee2e3052/data/bankAccounts - next: - href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/connections/8f457d9c-1142-4241-a07e-71d1ee2e3052/data/bankAccounts?page=2&pageSize=2 - Xero: - value: - results: - - id: bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4 - accountName: Business Bank Account - accountType: Debit - sortCode: '990404' - accountNumber: '987654321' - currency: GBP - balance: 6681.79 - modifiedDate: '2023-03-15T20:36:09Z' - sourceModifiedDate: '2023-03-15T20:35:07' - metadata: - isDeleted: false - - id: a8d6fb1a-8c5d-4683-90ce-bf9d28fc62ba - accountName: Business Savings Account - accountType: Debit - sortCode: '890303' - accountNumber: '876543210' - currency: GBP - balance: 0 - modifiedDate: '2023-03-15T20:36:09Z' - sourceModifiedDate: '2023-03-15T20:36:06' - metadata: - isDeleted: false - pageNumber: 1 - pageSize: 2 - totalResults: 2 - _links: - current: - href: /companies/5ced9667-a310-443a-a711-958d36377141/connections/6a4bcf97-e46a-465c-abf6-c42cec8e48c0/data/bankAccounts?page=1&pageSize=2 - self: - href: /companies/5ced9667-a310-443a-a711-958d36377141/connections/6a4bcf97-e46a-465c-abf6-c42cec8e48c0/data/bankAccounts - Zoho Books: - value: - results: - - id: '104957000000060010' - accountName: Abdi Test - accountType: Unknown - sortCode: '112233' - accountNumber: xxxx5678 - currency: GBP - balance: 69858.44 - modifiedDate: '2022-10-03T08:40:38Z' - institution: Test Bank - - id: '104957000000065002' - accountName: Abdi Test 2 - accountType: Unknown - sortCode: '' - accountNumber: '' - currency: AED - balance: 98.03 - modifiedDate: '2022-10-03T08:40:38Z' - institution: '' - pageNumber: 1 - pageSize: 2 - totalResults: 4 - _links: - current: - href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/connections/a2324b8e-60e9-451d-8eb1-0fdc8e8224df/data/bankAccounts?page=1&pageSize=2 - self: - href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/connections/a2324b8e-60e9-451d-8eb1-0fdc8e8224df/data/bankAccounts - next: - href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/connections/a2324b8e-60e9-451d-8eb1-0fdc8e8224df/data/bankAccounts?page=2&pageSize=2 - '400': - $ref: '#/components/responses/Malformed-Query' + companyName: Codat + accountingPlatformRef: 1700060034_ETD + companyLegalName: Codat Ltd + addresses: + - type: Billing + line1: 301 Ink Rooms + line2: 28 Easton Street + city: London + region: England + country: United Kingdom + postalCode: WC1X 0BE + - type: Delivery + line1: 28 Easton Street + city: London + country: UK + postalCode: WC1X 0BE + phoneNumbers: + - number: 02012 345678 + type: Landline + - number: 07123 456789 + type: Mobile + - number: 02012 345678 + type: Fax + webLinks: + - type: Website + url: 'https://www.codat.io/' + - type: Social + url: 'https://www.linkedin.com/company/codat-limited/' + registrationNumber: '5590111724' + taxNumber: '74111622555799035846' + financialYearStartDate: '2023-04-01T00:00:00' + baseCurrency: GBP + sourceUrls: + Api: 'https://api.codat.io' + createdDate: '2020-03-09T15:19:26' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -1295,150 +943,5064 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - description: "The *List bank accounts* endpoint returns a list of [bank accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) for a given company's connection.\n\n[Bank accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.\n\nBefore using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/bank-feeds-api#/operations/refresh-company-data).\n " - '/companies/{companyId}/connections/{connectionId}/options/bankAccounts': + '/companies/{companyId}/sync/expenses/config': + get: + tags: + - Configuration + parameters: + - $ref: '#/components/parameters/companyId' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyConfiguration' + examples: {} + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + summary: Get company configuration + description: Gets a company's expense sync configuration + operationId: get-company-configuration + post: + tags: + - Configuration + parameters: + - $ref: '#/components/parameters/companyId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyConfiguration' + examples: {} + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyConfiguration' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + summary: Set company configuration + description: Sets a company's expense sync configuration + operationId: set-company-configuration + x-speakeasy-name-override: set parameters: - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' + '/companies/{companyId}/sync/expenses/mappingOptions': get: - summary: Get create/update bank account model - x-internal: true tags: - - Bank accounts + - Mapping options + parameters: + - $ref: '#/components/parameters/companyId' responses: '200': - description: OK + description: Success content: application/json: schema: - $ref: '#/components/schemas/PushOption' - examples: - Dynamics 365 Business Central: - value: - type: Object - displayName: Bank Account - description: An account that bank transactions may be recorded against - properties: - accountName: - type: String - displayName: Name - description: The name of the bank account in the originating system - required: true - validation: - warnings: [] - information: - - field: AccountName - details: 'Needs to be of the format ''{No.}-{Name}''' - currency: - type: String - displayName: Currency - description: The currency of the bank account - required: true - accountNumber: - type: String - displayName: Account Number - description: The account number for the bank account - required: false - nominalCode: - type: String - displayName: Nominal Code - description: The external reference given to each nominal account for a business - required: false - validation: - warnings: [] - information: - - field: NominalCode - details: Bank Account Posting Group with Nominal Account must exist - sortCode: - type: String - displayName: Sort Code - description: The sort code for the bank account - required: false - validation: - warnings: [] - information: - - field: SortCode - details: Must have a length between 0 and 20 characters - iBan: - type: String - displayName: IBAN - description: The international bank account number of the account. Often used when making or receiving international payments - required: false - overdraftLimit: - type: Number - displayName: Overdraft Limit - description: The pre-arranged overdraft limit of the account - required: false - validation: - warnings: [] - information: - - field: OverdraftLimit - details: Default value is 0 - required: true - Exact (Netherlands): - value: - type: Object - displayName: Bank Account - description: An account that bank transactions may be recorded against - properties: - accountName: - type: String - displayName: Name - description: The name of the bank account in the originating system - required: true - accountNumber: - type: String - displayName: Account Number - description: The account number for the bank account - required: true - validation: - warnings: - - field: AccountNumber - details: Should not exceed the maximum length of 14 characters if the specified currency is GBP. - information: [] - sortCode: - type: String - displayName: Sort Code - description: The sort code for the bank account - required: false - validation: - warnings: - - field: SortCode - details: Must be 6 characters long if the specified currency is GBP. - - field: SortCode - details: Must be provided if the specified currency is GBP. - information: [] - currency: - type: String - displayName: Currency - description: The currency of the bank account - required: false - nominalCode: - type: String - displayName: Nominal Code - description: The external reference given to each nominal account for a business - required: false - required: true - Exact (UK): - value: - type: Object - displayName: Bank Account - description: An account that bank transactions may be recorded against - properties: - accountName: - type: String - displayName: Name - description: The name of the bank account in the originating system - required: true - accountNumber: - type: String - displayName: Account Number - description: The account number for the bank account - required: true - validation: - warnings: - - field: AccountNumber - details: Should not exceed the maximum length of 14 characters if the specified currency is GBP. + $ref: '#/components/schemas/MappingOptions' + examples: {} + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + description: 'Gets the mapping options (accounts, trackingCategories and taxRates) for a company''s accounting software' + summary: Mapping options + operationId: get-mapping-options + x-speakeasy-name-override: get-mapping-options + parameters: + - $ref: '#/components/parameters/companyId' + '/companies/{companyId}/sync/expenses/syncs/lastSuccessful/status': + get: + tags: + - Sync + parameters: + - $ref: '#/components/parameters/companyId' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CompanySyncStatus' + examples: {} + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + description: Gets the status of the last successful sync + summary: Last successful sync + operationId: get-last-successful-sync + x-speakeasy-name-override: get-last-successful-sync + parameters: + - $ref: '#/components/parameters/companyId' + '/companies/{companyId}/sync/expenses/syncs/latest/status': + get: + tags: + - Sync + parameters: + - $ref: '#/components/parameters/companyId' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CompanySyncStatus' + examples: {} + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + description: Gets the latest sync status + summary: Latest sync status + operationId: get-latest-sync + x-speakeasy-name-override: get-latest-sync + parameters: + - $ref: '#/components/parameters/companyId' + '/companies/{companyId}/sync/expenses/syncs/list/status': + parameters: + - $ref: '#/components/parameters/companyId' + get: + tags: + - Sync + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/CompanySyncStatus' + examples: {} + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + summary: List sync statuses + description: Gets a list of sync statuses + operationId: list-syncs + '/companies/{companyId}/sync/expenses/syncs/{syncId}/status': + get: + tags: + - Sync + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/syncId' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CompanySyncStatus' + examples: {} + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + summary: Get sync status + description: Get the sync status for a specified sync + operationId: get-sync-by-id + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/syncId' + '/companies/{companyId}/sync/expenses/syncs/{syncId}/transactions': + get: + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/syncId' + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Transactions' + examples: {} + '400': + $ref: '#/components/responses/Malformed-Query' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + tags: + - Transaction status + summary: List sync transactions + description: Gets the transactions and status for a sync + operationId: list-sync-transactions + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/syncId' + '/companies/{companyId}/sync/expenses/syncs/{syncId}/transactions/{transactionId}': + get: + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/syncId' + - $ref: '#/components/parameters/transactionId' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionResponse' + examples: {} + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + tags: + - Transaction status + summary: Get sync transaction + description: Gets the status of a transaction for a sync + operationId: get-sync-transaction + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/syncId' + - $ref: '#/components/parameters/transactionId' + '/companies/{companyId}/sync/expenses/expense-transactions': + parameters: + - $ref: '#/components/parameters/companyId' + post: + summary: Create expense transaction + operationId: create-expense-transaction + description: "The *Create expense* endpoint creates an [expense transaction](https://docs.codat.io/sync-for-expenses-api#/schemas/ExpenseTransaction) in the accounting software for a given company's connection. \n\n[Expense transactions](https://docs.codat.io/sync-for-expenses-api#/schemas/ExpenseTransaction) represent transactions made with a company debit or credit card. \n\n### Supported Integrations\n\n| Integration | Supported |\n|-------------------------------|-----------|\n| Dynamics 365 Business Central | Yes |\n| FreeAgent | Yes |\n| QuickBooks Desktop | Yes |\n| QuickBooks Online | Yes |\n| Oracle NetSuite | Yes |\n| Sage Intacct | Yes |\n| Xero | Yes |\n| Zoho Books | Yes |\n" + tags: + - Expenses + responses: + '200': + description: OK + content: + application/json: + x-speakeasy-usage-example: true + schema: + $ref: '#/components/schemas/CreateExpenseResponse' + examples: + Example 1: + value: + syncId: cd937d46-8e41-43a9-9477-a79158ffd98a + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateExpenseRequest' + examples: + Payment: + value: + - id: 4d7c6929-7770-412b-91bb-44d3bc71d111 + type: Payment + issueDate: '2024-05-21T00:00:00+00:00' + currency: GBP + currencyRate: 1 + contactRef: + id: '430' + type: Supplier + bankAccountRef: + id: '97' + merchantName: Amazon UK + notes: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + lines: + - netAmount: 100 + taxAmount: 20 + taxRateRef: + id: 23_Bills + accountRef: + id: '35' + trackingRefs: + - id: DEPARTMENT_5 + dataType: trackingCategories + invoiceTo: + id: '504' + type: customer + Refund: + value: + - id: 7008d3f2-aeb4-11ed-afa1-0242ac120002 + type: Refund + issueDate: '2024-02-17T00:00:00+00:00' + currency: GBP + contactRef: + id: '430' + type: Supplier + bankAccountRef: + id: '97' + merchantName: Amazon UK + notes: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + lines: + - netAmount: 100 + taxAmount: 20 + taxRateRef: + id: 23_Bills + accountRef: + id: '42' + trackingRefs: + - id: DEPARTMENT_6 + '/companies/{companyId}/sync/expenses/expense-transactions/{transactionId}': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/transactionId' + put: + summary: Update expense transactions + tags: + - Expenses + responses: + '202': + description: Accepted + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateExpenseResponse' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '422': + $ref: '#/components/responses/Unprocessable-Content' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + operationId: update-expense-transaction + description: "The *Update expense* endpoint updates an existing [expense transaction](https://docs.codat.io/sync-for-expenses-api#/schemas/UpdateExpenseRequest) in the accounting software for a given company's connection. \n\n[Expense transactions](https://docs.codat.io/sync-for-expenses-api#/schemas/UpdateExpenseRequest) represent transactions made with a company debit or credit card. \n\n### Supported integrations\nThe following integrations are supported for the [Payment](https://docs.codat.io/expenses/sync-process/expense-transactions#transaction-types) transaction `type` only: \n| Integration | Supported |\n|-----------------------|-----------|\n| FreeAgent | Yes |\n| QuickBooks Desktop | Yes |\n| QuickBooks Online | Yes |\n| Oracle NetSuite | Yes |\n| Sage Intacct | Yes |\n| Xero | Yes |\n| Zoho Books | Yes |\n\n#### Integration-specific behavior\n\n| Integration | Specifics |\n|-----------------------|-----------|\n| Sage Intacct | To sync **debit card expenses**, map the debit card to a Credit Card with the account type set to `Debit`.|" + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateExpenseRequest' + examples: + Payment: + value: + type: Payment + issueDate: '2024-05-21T00:00:00+00:00' + currency: GBP + currencyRate: 1 + contactRef: + id: '430' + type: Supplier + bankAccountRef: + id: '97' + merchantName: Amazon UK + notes: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + lines: + - netAmount: 100 + taxAmount: 20 + taxRateRef: + id: 23_Bills + accountRef: + id: '35' + trackingRefs: + - id: DEPARTMENT_5 + dataType: trackingCategories + invoiceTo: + id: '504' + type: customer + '/companies/{companyId}/sync/expenses/transfer-transactions/{transactionId}': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/transactionId' + put: + summary: Create transfer transaction + operationId: create-transfer-transaction + description: "Use the *Create transfer* endpoint to create or update a [transfer transaction](https://docs.codat.io/sync-for-expenses-api#/schemas/TransferTransactionRequest) in the accounting software for a given company's connection. \r\n\r\nTransfers record the movement of money between two bank accounts, or between a bank account and a nominal account. Use them to represent actions such as topping up a debit card account or a balance transfer to another credit card.\r\n\r\nThe `from.amount` and `to.amount` fields are in the native currency of the account.\r\n\r\n### Supported Integrations\r\n| Integration | Create transfer | Update transfer |\r\n|-----------------------|------------------|------------------|\r\n| Dynamics\t\t\t\t| No\t\t\t | No\t\t\t\t |\r\n| FreeAgent | Yes | Yes |\r\n| NetSuite | No | No |\r\n| QuickBooks Desktop | Yes | No |\r\n| QuickBooks Online | Yes | Yes |\r\n| Sage Intacct | No | No |\r\n| Xero | Yes | No |\r\n| Zoho Books | No | No |" + tags: + - Transfers + responses: + '200': + description: OK + content: + application/json: + x-speakeasy-usage-example: true + schema: + $ref: '#/components/schemas/TransferTransactionResponse' + examples: + Example 1: + value: + syncId: cd937d46-8e41-43a9-9477-a79158ffd98a + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransferTransactionRequest' + examples: + Create transfer: + value: + description: Sample transfer description + date: '2021-05-21T00:00:00+00:00' + from: + accountRef: + id: 787dfb37-5707-4dc0-8a86-8d74e4cc78ea + amount: 100 + to: + accountRef: + id: 777dfb37-5506-3dc0-6g86-8d34z4cc78ea + amount: 100 + '/companies/{companyId}/sync/expenses/adjustment-transactions': + parameters: + - $ref: '#/components/parameters/companyId' + post: + summary: Create adjustment transaction + operationId: create-adjustment-transaction + description: "Use the *Create adjustment expense* endpoint to create an [adjustment](https://docs.codat.io/sync-for-expenses-api#/schemas/AdjustmentTransactionRequest) in the accounting software for a given company's connection. \n\nAdjustments represent write-offs and transaction alterations, such as foreign exchange adjustments, in the form of a journal entry. \n\n### Supported Integrations\n\n| Integration | Supported |\n|-----------------------|-----------|\n| QuickBooks Desktop | Yes |" + tags: + - Adjustments + responses: + '200': + description: OK + content: + application/json: + x-speakeasy-usage-example: true + schema: + $ref: '#/components/schemas/AdjustmentTransactionResponse' + examples: + Example 1: + value: + syncId: cd937d46-8e41-43a9-9477-a79158ffd98a + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAdjustmentRequest' + examples: + Create adjustment: + value: + - id: 3357b3df-5f2e-465d-b9ba-226519dbb8f1 + date: '2024-05-21T00:00:00+00:00' + currency: USD + currencyRate: 1 + reference: test reference + lines: + - amount: 50 + accountRef: + id: 80000018-1671793811 + description: debit line + trackingRefs: + - id: 80000003-1674553958 + dataType: trackingCategories + invoiceTo: + id: 80000002-1674552702 + type: customer + - amount: -50 + accountRef: + id: 80000028-1671794219 + description: credit line + trackingRefs: + - id: 80000003-1674553958 + dataType: trackingCategories + '/companies/{companyId}/sync/expenses/reimbursable-expense-transactions': + parameters: + - $ref: '#/components/parameters/companyId' + post: + summary: Create reimbursable expense transaction + operationId: create-reimbursable-expense-transaction + description: "Use the *Create reimbursable expense* endpoint to submit an employee expense claim in the accounting platform for a given company's connection.\r\n\r\n[Reimbursable expense requests](https://docs.codat.io/sync-for-expenses-api#/schemas/ReimbursableExpenseTransactionRequest) are reflected in the accounting software in the form of **Bills** against an employee (who exists as a supplier in the accounting platform).\r\n\r\n### Supported Integrations\r\n| Integration | Supported |\r\n|-----------------------|-----------|\r\n| FreeAgent | Yes |\r\n| QuickBooks Desktop | Yes |\r\n| QuickBooks Online | Yes |\r\n| Oracle NetSuite | Yes |\r\n| Zoho Books | Yes |\r\n| Sage Intacct | Yes |" + tags: + - Reimbursements + responses: + '200': + description: OK + content: + application/json: + x-speakeasy-usage-example: true + schema: + $ref: '#/components/schemas/CreateReimbursableExpenseResponse' + examples: + Example 1: + value: + syncId: cd937d46-8e41-43a9-9477-a79158ffd98a + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ReimbursableExpenseTransactionRequest' + examples: + Create reimbursable expense: + value: + - id: 4d7c6929-7770-412b-91bb-44d3bc71d111 + reference: expenses w/c 01/07 + contactRef: + id: '752' + issueDate: '2024-05-21' + dueDate: '2024-05-21' + currency: GBP + currencyRate: 1 + notes: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + lines: + - description: Hotel + netAmount: 100 + taxAmount: 20 + taxRateRef: + id: 23_Bills + accountRef: + id: '35' + trackingRefs: + - id: DEPARTMENT_5 + dataType: trackingCategories + invoiceTo: + id: '504' + type: customer + '/companies/{companyId}/sync/expenses/reimbursable-expense-transactions/{transactionId}': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/transactionId' + put: + summary: Update reimbursable expense transaction + operationId: update-reimbursable-expense-transaction + description: "The *Update reimbursable expense* endpoint updates an existing employee expense claim in the accounting platform for a given company's connection. \r\n\r\nUpdating an existing [reimbursable expense transaction](https://docs.codat.io/sync-for-expenses-api#/schemas/UpdateReimbursableExpenseTransactionRequest) will update the existing **bill** against an employee (who exists as a supplier in the accounting software).\r\n\r\n### Supported Integrations\r\n| Integration | Supported |\r\n|-----------------------|-----------|\r\n| FreeAgent | Yes |\r\n| QuickBooks Online | Yes |\r\n| Oracle NetSuite | Yes |\r\n| Zoho Books | Yes |\r\n\r\n" + tags: + - Reimbursements + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/CreateReimbursableExpenseResponse' + examples: + Example 1: + value: + syncId: cd937d46-8e41-43a9-9477-a79158ffd98a + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateReimbursableExpenseTransactionRequest' + examples: + Update reimbursable expense: + value: + reference: expenses w/c 01/07 + contactRef: + id: '752' + issueDate: '2024-05-21' + dueDate: '2024-05-21' + currency: GBP + currencyRate: 1 + notes: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + lines: + - description: Hotel + netAmount: 100 + taxAmount: 20 + taxRateRef: + id: 23_Bills + accountRef: + id: '35' + trackingRefs: + - id: DEPARTMENT_5 + dataType: trackingCategories + invoiceTo: + id: '504' + type: customer + '/companies/{companyId}/sync/expenses/syncs/{syncId}/transactions/{transactionId}/attachments': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/syncId' + - $ref: '#/components/parameters/transactionId' + post: + summary: Upload attachment + operationId: upload-expense-attachment + x-speakeasy-name-override: upload + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Attachment' + examples: {} + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/AttachmentUpload' + tags: + - Attachments + description: "The *Upload attachment* endpoint uploads an attachment in the accounting software against the given transactionId. \n\n[Expense transactions](https://docs.codat.io/sync-for-expenses-api#/schemas/ExpenseTransaction) represent transactions made with a company debit or credit card. Attachments for `Adjustment` and `Transfer` transaction types are not supported for any integrations.\n\n**Integration-specific behavior**\n\nEach accounting software supports different file formats and sizes.\n\n| Integration | File size | File extension | Supported transactions |\n|-----------------------------------|-----------|-------------------------------------------------------|------------------------|\n| **Xero** | 3 MB | 7Z, BMP, CSV, DOC, DOCX, EML, GIF, JPEG, JPG, KEYNOTE, MSG, NUMBERS, ODF, ODS, ODT, PAGES, PDF, PNG, PPT, PPTX, RAR, RTF, TIF, TIFF, TXT, XLS, XLSX, ZIP | All supported types |\n| **QuickBooks Online** | 100 MB | AI, CSV, DOC, DOCX, EPS, GIF, JPEG, JPG, ODS, PAGES, PDF, PNG, RTF, TIF, TXT, XLS, XLSX, XML | `expense-transactions.Payment`, `expense-transactions.Refund`, `reimbursable-expense-transactions` |\n| **NetSuite** | 100 MB | BMP, CSV, XLS, XLSX, JSON, PDF, PJPG, PJPEG, PNG, TXT, SVG, TIF, TIFF, DOC, DOCX, ZIP |`expense-transactions.Payment`, `expense-transactions.Refund` |\n| **Dynamics 365 Business Central** | 350 MB | [No explicit requirements outlined](https://learn.microsoft.com/en-gb/dynamics365/business-central/ui-how-add-link-to-record#to-attach-a-file-to-a-purchase-invoice) for text, image, and video files. | All supported types\n| **QuickBooks Desktop** | NA | Does not support attachment upload | N/A |\n| **FreeAgent** | 5MB | PNG, X-PNG, JPEG, PJG, GIF, X-PDF | `expense-transactions.Payment`, `reimbursable-expense-transactions`\n| **Zoho Books** | 5MB | GIF, PNG, JPEG, JPG, BMP, PDF | `expense-transactions.Payment`, `reimbursable-expense-transactions` |" + '/companies/{companyId}/data/all': + parameters: + - $ref: '#/components/parameters/companyId' + post: + summary: Refresh all data + operationId: refresh-all-data-types + responses: + '204': + description: No Content + '400': + $ref: '#/components/responses/Malformed-Query' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + description: |- + Refreshes all data types with `fetch on first link` set to `true` for a given company. + + This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view. + + [Read more](https://docs.codat.io/core-concepts/data-type-settings) about data type settings and `fetch on first link`. + tags: + - Manage data + '/companies/{companyId}/dataStatus': + parameters: + - $ref: '#/components/parameters/companyId' + get: + summary: Get data status + operationId: get-data-status + description: Get the state of each data type for a company + tags: + - Manage data + responses: + '200': + description: OK + content: + application/json: + schema: + title: Data statuses + x-internal: true + type: object + properties: + accountTransactions: + $ref: '#/components/schemas/DataStatus' + nullable: true + balanceSheet: + $ref: '#/components/schemas/DataStatus' + nullable: true + bankAccounts: + $ref: '#/components/schemas/DataStatus' + nullable: true + bankTransactions: + $ref: '#/components/schemas/DataStatus' + nullable: true + billCreditNotes: + $ref: '#/components/schemas/DataStatus' + nullable: true + billPayments: + $ref: '#/components/schemas/DataStatus' + nullable: true + bills: + $ref: '#/components/schemas/DataStatus' + nullable: true + cashFlowStatement: + $ref: '#/components/schemas/DataStatus' + nullable: true + chartOfAccounts: + $ref: '#/components/schemas/DataStatus' + nullable: true + company: + $ref: '#/components/schemas/DataStatus' + nullable: true + creditNotes: + $ref: '#/components/schemas/DataStatus' + nullable: true + customers: + $ref: '#/components/schemas/DataStatus' + nullable: true + directCosts: + $ref: '#/components/schemas/DataStatus' + nullable: true + directIncomes: + $ref: '#/components/schemas/DataStatus' + nullable: true + invoices: + $ref: '#/components/schemas/DataStatus' + nullable: true + itemReceipts: + $ref: '#/components/schemas/DataStatus' + nullable: true + items: + $ref: '#/components/schemas/DataStatus' + nullable: true + journalEntries: + $ref: '#/components/schemas/DataStatus' + nullable: true + journals: + $ref: '#/components/schemas/DataStatus' + nullable: true + paymentMethods: + $ref: '#/components/schemas/DataStatus' + nullable: true + payments: + $ref: '#/components/schemas/DataStatus' + nullable: true + profitAndLoss: + $ref: '#/components/schemas/DataStatus' + nullable: true + purchaseOrders: + $ref: '#/components/schemas/DataStatus' + nullable: true + salesOrders: + $ref: '#/components/schemas/DataStatus' + nullable: true + suppliers: + $ref: '#/components/schemas/DataStatus' + nullable: true + taxRates: + $ref: '#/components/schemas/DataStatus' + nullable: true + trackingCategories: + $ref: '#/components/schemas/DataStatus' + nullable: true + transfers: + $ref: '#/components/schemas/DataStatus' + nullable: true + banking-accountBalances: + $ref: '#/components/schemas/DataStatus' + nullable: true + banking-accounts: + $ref: '#/components/schemas/DataStatus' + nullable: true + banking-transactionCategories: + $ref: '#/components/schemas/DataStatus' + nullable: true + banking-transactions: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-companyInfo: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-customers: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-disputes: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-locations: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-orders: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-paymentMethods: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-payments: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-productCategories: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-products: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-taxComponents: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-transactions: + $ref: '#/components/schemas/DataStatus' + nullable: true + examples: + Example: + value: + accountTransactions: + dataType: accountTransactions + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + balanceSheet: + dataType: balanceSheet + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + bankAccounts: + dataType: bankAccounts + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + bankTransactions: + dataType: bankTransactions + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + billCreditNotes: + dataType: billCreditNotes + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + billPayments: + dataType: billPayments + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + bills: + dataType: bills + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + cashFlowStatement: + dataType: cashFlowStatement + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + chartOfAccounts: + dataType: chartOfAccounts + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + company: + dataType: company + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + creditNotes: + dataType: creditNotes + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + customers: + dataType: customers + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + directCosts: + dataType: directCosts + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + directIncomes: + dataType: directIncomes + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + invoices: + dataType: invoices + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + itemReceipts: + dataType: itemReceipts + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + items: + dataType: items + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + journalEntries: + dataType: journalEntries + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + journals: + dataType: journals + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + paymentMethods: + dataType: paymentMethods + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + payments: + dataType: payments + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + profitAndLoss: + dataType: profitAndLoss + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + purchaseOrders: + dataType: purchaseOrders + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + salesOrders: + dataType: salesOrders + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + suppliers: + dataType: suppliers + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + taxRates: + dataType: taxRates + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + trackingCategories: + dataType: trackingCategories + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + transfers: + dataType: transfers + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + banking-accountBalances: + dataType: banking-accountBalances + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + banking-accounts: + dataType: banking-accounts + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + banking-transactionCategories: + dataType: banking-transactionCategories + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + banking-transactions: + dataType: banking-transactions + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + commerce-companyInfo: + dataType: commerce-companyInfo + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + commerce-customers: + dataType: commerce-customers + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + commerce-disputes: + dataType: commerce-disputes + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + commerce-locations: + dataType: commerce-locations + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + commerce-orders: + dataType: commerce-orders + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + commerce-paymentMethods: + dataType: commerce-paymentMethods + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + commerce-payments: + dataType: commerce-payments + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + commerce-productCategories: + dataType: commerce-productCategories + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + commerce-products: + dataType: commerce-products + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + commerce-taxComponents: + dataType: commerce-taxComponents + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + commerce-transactions: + dataType: commerce-transactions + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + '/companies/{companyId}/data/queue/{dataType}': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/dataType' + post: + summary: Refresh data type + operationId: refresh-data-type + description: |- + Refreshes a given data type for a given company. + + This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view. + tags: + - Manage data + parameters: + - schema: + type: string + format: uuid + in: query + name: connectionId + description: 'Optionally, provide a data connection id to only queue pull operations on that connection.' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/PullOperation' + '400': + $ref: '#/components/responses/Malformed-Query' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + '/companies/{companyId}/data/history': + parameters: + - $ref: '#/components/parameters/companyId' + get: + summary: List pull operations + tags: + - Manage data + operationId: list-pull-operations + x-speakeasy-name-override: list-pull-operations + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/PullOperations' + examples: + Example: + value: + results: + - id: 97d60846-f07a-4d42-b5a0-0bdcc6ebf56b + companyId: 4645bd78-8988-45bc-ac9e-67ba5df6e4e5 + connectionId: 51baa045-4836-4317-a42e-3542e991e581 + dataType: invoices + status: Initial + requested: '2022-11-14T11:18:37.2798351Z' + progress: 10 + isCompleted: false + isErrored: false + _links: + current: + href: /companies/17129e41-5389-4f10-ac06-e0a37e47d177/data/history?page=1&pageSize=2 + self: + href: /companies/17129e41-5389-4f10-ac06-e0a37e47d177/data/history + next: + href: /companies/17129e41-5389-4f10-ac06-e0a37e47d177/data/history?page=2&pageSize=2 + pageNumber: 0 + pageSize: 0 + totalResults: 0 + '400': + $ref: '#/components/responses/Malformed-Query' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + description: Gets the pull operation history (datasets) for a given company. + parameters: + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + - $ref: '#/components/parameters/query' + - $ref: '#/components/parameters/orderBy' + '/companies/{companyId}/data/history/{datasetId}': + parameters: + - $ref: '#/components/parameters/companyId' + - name: datasetId + in: path + required: true + schema: + type: string + format: uuid + description: Unique identifier for the dataset that completed its sync. + description: Unique identifier for the dataset that completed its sync. + get: + summary: Get pull operation + operationId: get-pull-operation + x-speakeasy-name-override: get-pull-operation + tags: + - Manage data + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/PullOperation' + examples: {} + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + description: Retrieve information about a single dataset or pull operation. + '/companies/{companyId}/push': + parameters: + - $ref: '#/components/parameters/companyId' + get: + parameters: + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + - $ref: '#/components/parameters/query' + - $ref: '#/components/parameters/orderBy' + summary: List push operations + tags: + - Push operations + operationId: list-push-operations + description: List push operation records. + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/PushOperations' + examples: {} + '400': + $ref: '#/components/responses/Malformed-Query' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + '/companies/{companyId}/push/{pushOperationKey}': + parameters: + - $ref: '#/components/parameters/companyId' + - schema: + type: string + format: uuid + name: pushOperationKey + in: path + required: true + description: Push operation key. + get: + summary: Get push operation + tags: + - Push operations + operationId: get-push-operation + description: Retrieve push operation. + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/PushOperation' + examples: {} + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + '/companies/{companyId}/connections/{connectionId}/push/accounts': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/connectionId' + post: + tags: + - Accounts + summary: Create account + parameters: + - $ref: '#/components/parameters/timeoutInMinutes' + - $ref: '#/components/parameters/allowSyncOnPushComplete' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Account/definitions/accountPrototype' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAccountResponse' + examples: {} + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + description: |- + The *Create account* endpoint creates a new [account](https://docs.codat.io/sync-for-expenses-api#/schemas/Account) for a given company's connection. + + [Accounts](https://docs.codat.io/sync-for-expenses-api#/schemas/Account) are the categories a business uses to record accounting transactions. + + **Integration-specific behavior** + + Required data may vary by integration. To see what data to post, first call [Get create account model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-chartOfAccounts-model). + operationId: create-account + '/companies/{companyId}/connections/{connectionId}/options/chartOfAccounts': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/connectionId' + get: + summary: Get create account model + tags: + - Accounts + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/PushOption' + examples: + Exact (Netherlands): + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + validation: + warnings: [] + information: + - field: NominalCode + details: Must be provided. + name: + type: String + displayName: Name + description: Name of the account + required: true + validation: + warnings: [] + information: + - field: Name + details: Must be provided. + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + options: + - value: Asset.Assets.Cash + type: String + displayName: Asset.Assets.Cash + required: false + - value: Asset.Assets.Bank + type: String + displayName: Asset.Assets.Bank + required: false + - value: Asset.Assets.PaymentServices + type: String + displayName: Asset.Assets.PaymentServices + required: false + - value: Asset.Assets.AccountsReceivable + type: String + displayName: Asset.Assets.AccountsReceivable + required: false + - value: Liability.EquityAndLiabilities.AccountsPayable + type: String + displayName: Liability.EquityAndLiabilities.AccountsPayable + required: false + - value: Asset.Assets.VAT + type: String + displayName: Asset.Assets.VAT + required: false + - value: Liability.EquityAndLiabilities.EmployeesPayable + type: String + displayName: Liability.EquityAndLiabilities.EmployeesPayable + required: false + - value: Asset.Assets.PrepaidExpenses + type: String + displayName: Asset.Assets.PrepaidExpenses + required: false + - value: Liability.EquityAndLiabilities.AccruedExpenses + type: String + displayName: Liability.EquityAndLiabilities.AccruedExpenses + required: false + - value: Liability.EquityAndLiabilities.IncomeTaxesPayable + type: String + displayName: Liability.EquityAndLiabilities.IncomeTaxesPayable + required: false + - value: Asset.Assets.FixedAssets + type: String + displayName: Asset.Assets.FixedAssets + required: false + - value: Asset.Assets.OtherAssets + type: String + displayName: Asset.Assets.OtherAssets + required: false + - value: Asset.Assets.AccumulatedDeprecation + type: String + displayName: Asset.Assets.AccumulatedDeprecation + required: false + - value: Asset.Assets.Inventory + type: String + displayName: Asset.Assets.Inventory + required: false + - value: Equity.EquityAndLiabilities.CapitalStock + type: String + displayName: Equity.EquityAndLiabilities.CapitalStock + required: false + - value: Equity.EquityAndLiabilities.RetainedEarnings + type: String + displayName: Equity.EquityAndLiabilities.RetainedEarnings + required: false + - value: Liability.EquityAndLiabilities.LongTermDebt + type: String + displayName: Liability.EquityAndLiabilities.LongTermDebt + required: false + - value: Liability.EquityAndLiabilities.CurrentPortionOfDebt + type: String + displayName: Liability.EquityAndLiabilities.CurrentPortionOfDebt + required: false + - value: Unknown.EquityAndLiabilities.Intercompany + type: String + displayName: Unknown.EquityAndLiabilities.Intercompany + required: false + - value: Unknown.General.General + type: String + displayName: Unknown.General.General + required: false + - value: Income.NetIncome.Revenue + type: String + displayName: Income.NetIncome.Revenue + required: false + - value: Expense.NetIncome.CostOfGoods + type: String + displayName: Expense.NetIncome.CostOfGoods + required: false + - value: Expense.NetIncome.OtherCosts + type: String + displayName: Expense.NetIncome.OtherCosts + required: false + - value: Expense.NetIncome.SalesGeneralAdministrativeExpenses + type: String + displayName: Expense.NetIncome.SalesGeneralAdministrativeExpenses + required: false + - value: Expense.NetIncome.DeprecationCosts + type: String + displayName: Expense.NetIncome.DeprecationCosts + required: false + - value: Expense.NetIncome.ResearchAndDevelopment + type: String + displayName: Expense.NetIncome.ResearchAndDevelopment + required: false + - value: Expense.NetIncome.EmployeeCosts + type: String + displayName: Expense.NetIncome.EmployeeCosts + required: false + - value: Expense.NetIncome.EmploymentCosts + type: String + displayName: Expense.NetIncome.EmploymentCosts + required: false + - value: Expense.ExceptionalIncome.ExceptionalCosts + type: String + displayName: Expense.ExceptionalIncome.ExceptionalCosts + required: false + - value: Income.ExceptionalIncome.ExceptionalIncome + type: String + displayName: Income.ExceptionalIncome.ExceptionalIncome + required: false + - value: Expense.ExceptionalIncome.IncomeTaxes + type: String + displayName: Expense.ExceptionalIncome.IncomeTaxes + required: false + - value: Income.ExceptionalIncome.InterestIncome + type: String + displayName: Income.ExceptionalIncome.InterestIncome + required: false + required: true + validation: + warnings: [] + information: + - field: FullyQualifiedCategory + details: Must be provided. + status: + type: String + displayName: Account Status + description: The status of the account + options: + - value: Active + type: String + displayName: Active + required: false + - value: Pending + type: String + displayName: Pending + required: false + - value: Unknown + type: String + displayName: Unknown + required: false + required: true + validation: + warnings: [] + information: + - field: Status + details: Must be provided. + required: true + Exact (UK): + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + validation: + warnings: [] + information: + - field: NominalCode + details: Must be provided. + name: + type: String + displayName: Name + description: Name of the account + required: true + validation: + warnings: [] + information: + - field: Name + details: Must be provided. + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + options: + - value: Asset.Assets.Cash + type: String + displayName: Asset.Assets.Cash + required: false + - value: Asset.Assets.Bank + type: String + displayName: Asset.Assets.Bank + required: false + - value: Asset.Assets.PaymentServices + type: String + displayName: Asset.Assets.PaymentServices + required: false + - value: Asset.Assets.AccountsReceivable + type: String + displayName: Asset.Assets.AccountsReceivable + required: false + - value: Liability.EquityAndLiabilities.AccountsPayable + type: String + displayName: Liability.EquityAndLiabilities.AccountsPayable + required: false + - value: Asset.Assets.VAT + type: String + displayName: Asset.Assets.VAT + required: false + - value: Liability.EquityAndLiabilities.EmployeesPayable + type: String + displayName: Liability.EquityAndLiabilities.EmployeesPayable + required: false + - value: Asset.Assets.PrepaidExpenses + type: String + displayName: Asset.Assets.PrepaidExpenses + required: false + - value: Liability.EquityAndLiabilities.AccruedExpenses + type: String + displayName: Liability.EquityAndLiabilities.AccruedExpenses + required: false + - value: Liability.EquityAndLiabilities.IncomeTaxesPayable + type: String + displayName: Liability.EquityAndLiabilities.IncomeTaxesPayable + required: false + - value: Asset.Assets.FixedAssets + type: String + displayName: Asset.Assets.FixedAssets + required: false + - value: Asset.Assets.OtherAssets + type: String + displayName: Asset.Assets.OtherAssets + required: false + - value: Asset.Assets.AccumulatedDeprecation + type: String + displayName: Asset.Assets.AccumulatedDeprecation + required: false + - value: Asset.Assets.Inventory + type: String + displayName: Asset.Assets.Inventory + required: false + - value: Equity.EquityAndLiabilities.CapitalStock + type: String + displayName: Equity.EquityAndLiabilities.CapitalStock + required: false + - value: Equity.EquityAndLiabilities.RetainedEarnings + type: String + displayName: Equity.EquityAndLiabilities.RetainedEarnings + required: false + - value: Liability.EquityAndLiabilities.LongTermDebt + type: String + displayName: Liability.EquityAndLiabilities.LongTermDebt + required: false + - value: Liability.EquityAndLiabilities.CurrentPortionOfDebt + type: String + displayName: Liability.EquityAndLiabilities.CurrentPortionOfDebt + required: false + - value: Unknown.EquityAndLiabilities.Intercompany + type: String + displayName: Unknown.EquityAndLiabilities.Intercompany + required: false + - value: Unknown.General.General + type: String + displayName: Unknown.General.General + required: false + - value: Income.NetIncome.Revenue + type: String + displayName: Income.NetIncome.Revenue + required: false + - value: Expense.NetIncome.CostOfGoods + type: String + displayName: Expense.NetIncome.CostOfGoods + required: false + - value: Expense.NetIncome.OtherCosts + type: String + displayName: Expense.NetIncome.OtherCosts + required: false + - value: Expense.NetIncome.SalesGeneralAdministrativeExpenses + type: String + displayName: Expense.NetIncome.SalesGeneralAdministrativeExpenses + required: false + - value: Expense.NetIncome.DeprecationCosts + type: String + displayName: Expense.NetIncome.DeprecationCosts + required: false + - value: Expense.NetIncome.ResearchAndDevelopment + type: String + displayName: Expense.NetIncome.ResearchAndDevelopment + required: false + - value: Expense.NetIncome.EmployeeCosts + type: String + displayName: Expense.NetIncome.EmployeeCosts + required: false + - value: Expense.NetIncome.EmploymentCosts + type: String + displayName: Expense.NetIncome.EmploymentCosts + required: false + - value: Expense.ExceptionalIncome.ExceptionalCosts + type: String + displayName: Expense.ExceptionalIncome.ExceptionalCosts + required: false + - value: Income.ExceptionalIncome.ExceptionalIncome + type: String + displayName: Income.ExceptionalIncome.ExceptionalIncome + required: false + - value: Expense.ExceptionalIncome.IncomeTaxes + type: String + displayName: Expense.ExceptionalIncome.IncomeTaxes + required: false + - value: Income.ExceptionalIncome.InterestIncome + type: String + displayName: Income.ExceptionalIncome.InterestIncome + required: false + required: true + validation: + warnings: [] + information: + - field: FullyQualifiedCategory + details: Must be provided. + status: + type: String + displayName: Account Status + description: The status of the account + options: + - value: Active + type: String + displayName: Active + required: false + - value: Pending + type: String + displayName: Pending + required: false + - value: Unknown + type: String + displayName: Unknown + required: false + required: true + validation: + warnings: [] + information: + - field: Status + details: Must be provided. + required: true + MYOB AccountRight and Essentials: + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + validation: + warnings: + - field: NominalCode + details: 'If alphanumeric is supported, must be between 1 and 10 characters. Otherwise format is x-xxxx' + information: [] + name: + type: String + displayName: Name + description: Name of the account + required: false + validation: + warnings: + - field: Name + details: Must have a length between 1 and 60 characters + information: [] + description: + type: String + displayName: Description + description: Description of the account + required: false + validation: + warnings: + - field: Description + details: Must have a length between 1 and 255 characters + information: [] + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + options: + - value: Asset.Bank + type: String + displayName: Bank + required: false + - value: Asset.AccountReceivable + type: String + displayName: Accounts Receivable + required: false + - value: Asset.OtherCurrentAsset + type: String + displayName: Other Current Asset + required: false + - value: Asset.FixedAsset + type: String + displayName: Fixed Asset + required: false + - value: Asset.OtherAsset + type: String + displayName: Other Asset + required: false + - value: Asset.CashAndBank + type: String + displayName: Cash + required: false + - value: Asset.Property Plant and Equipment + type: String + displayName: Equipment Machinery + required: false + - value: Liability.CreditCard + type: String + displayName: Credit Card + required: false + - value: Liability.AccountsPayable + type: String + displayName: Accounts Payable + required: false + - value: Liability.OtherCurrentLiability + type: String + displayName: Other Current Liability + required: false + - value: Liability.LongTermLiability + type: String + displayName: Long Term Liability + required: false + - value: Liability.OtherLiability + type: String + displayName: Other Liability + required: false + - value: Equity + type: String + displayName: Equity + required: false + - value: Equity.Equity + type: String + displayName: Retained Earnings + required: false + - value: Equity.Equity.RetainedEarnings + type: String + displayName: Retained Earnings + required: false + - value: Equity.Owner's Equity + type: String + displayName: Retained Earnings + required: false + - value: Income + type: String + displayName: Income + required: false + - value: OtherIncome + type: String + displayName: Other Income + required: false + - value: Expense + type: String + displayName: Expense + required: false + - value: Expense.Expense + type: String + displayName: Sales Marketing + required: false + - value: Expense.Expense.Insurance + type: String + displayName: General Administrative + required: false + - value: Expense.Overhead + type: String + displayName: General Administrative + required: false + - value: Expense.Expense.RepairMaintenance + type: String + displayName: Repairs Maintenance + required: false + - value: OtherExpense + type: String + displayName: Other Expense + required: false + - value: CostOfSales + type: String + displayName: Cost of Sales + required: false + - value: Cost Of Goods Sold.Cost of Sales + type: String + displayName: Other + required: false + required: true + status: + type: String + displayName: Account Status + description: The status of the account + options: + - value: Active + type: String + displayName: Active + required: false + - value: Archived + type: String + displayName: Archived + required: false + required: true + required: true + QuickBooks Desktop: + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + validation: + warnings: + - field: NominalCode + details: Max length of 7 characters. + information: [] + name: + type: String + displayName: Name + description: Name of the account + required: true + validation: + warnings: + - field: Name + details: Max length of 31 characters. + information: [] + description: + type: String + displayName: Description + description: Description of the account + required: false + validation: + warnings: + - field: Description + details: Max length of 200 characters. + information: [] + currency: + type: String + displayName: Currency + description: The currency of the account + required: false + validation: + warnings: + - field: Currency + details: 'The currency must match the base currency of the QuickBooks Desktop company unless the FullyQualifiedCategory is ''Asset.AccountsReceivable'',''Liability.AccountsPayable'' or ''Liability.CreditCard''' + - field: Currency + details: Must be a three letter ISO code that matches an existing active currency in the QuickBooks Desktop company + - field: Currency + details: Can only be set if the QuickBooks Desktop company has Multicurrency enabled. + information: + - field: Currency + details: 'If not set, will default to the base currency of the QuickBooks Desktop company' + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + options: + - value: Asset.AccountsReceivable + type: String + displayName: Account Receivable + required: false + - value: Asset.FixedAsset + type: String + displayName: Fixed Asset + required: false + - value: Asset.OtherCurrentAsset + type: String + displayName: Other Current Asset + required: false + - value: Asset.OtherAsset + type: String + displayName: Other Asset + required: false + - value: Income.Income + type: String + displayName: Income + required: false + - value: Income.OtherIncome + type: String + displayName: Other Income + required: false + - value: Liability.AccountsPayable + type: String + displayName: Accounts Payable + required: false + - value: Liability.CreditCard + type: String + displayName: Credit Card + required: false + - value: Liability.LongTermLiability + type: String + displayName: Long Term Liability + required: false + - value: Liability.OtherCurrentLiability + type: String + displayName: Other Current Liability + required: false + - value: Liability.CostOfGoodsSold + type: String + displayName: Cost Of Goods Sold + required: false + - value: Equity.Equity + type: String + displayName: Equity + required: false + - value: Expense.Expense + type: String + displayName: Expense + required: false + - value: Expense.OtherExpense + type: String + displayName: Other Expense + required: false + required: true + currentBalance: + type: Number + displayName: Current Balance + description: The current balance in the account + required: false + required: true + QuickBooks Online Sandbox: + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: false + validation: + warnings: [] + information: + - field: NominalCode + details: If included must have a length between 1 and 7 characters + name: + type: String + displayName: Name + description: Name of the account + required: true + validation: + warnings: + - field: Name + details: Must have a length between 1 and 100 characters + information: [] + currency: + type: String + displayName: Currency + description: The currency of the account + required: false + validation: + warnings: [] + information: + - field: Currency + details: When not specified company base currency will be used + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + options: + - value: Asset.Bank.CashOnHand + type: String + displayName: Cash On Hand + required: false + - value: Asset.Bank.Checking + type: String + displayName: Checking + required: false + - value: Asset.Bank.MoneyMarket + type: String + displayName: Money Market + required: false + - value: Asset.Bank.RentsHeldInTrust + type: String + displayName: Rents Held In Trust + required: false + - value: Asset.Bank.Savings + type: String + displayName: Savings + required: false + - value: Asset.Bank.TrustAccounts + type: String + displayName: Trust Accounts + required: false + - value: Asset.Bank.CashAndCashEquivalents + type: String + displayName: Cash And Cash Equivalents + required: false + - value: Asset.Bank.OtherEarmarkedBankAccounts + type: String + displayName: Other Earmarked Bank Accounts + required: false + - value: Asset.Other Current Asset.AllowanceForBadDebts + type: String + displayName: Allowance For Bad Debts + required: false + - value: Asset.Other Current Asset.DevelopmentCosts + type: String + displayName: Development Costs + required: false + - value: Asset.Other Current Asset.EmployeeCashAdvances + type: String + displayName: Employee Cash Advances + required: false + - value: Asset.Other Current Asset.OtherCurrentAssets + type: String + displayName: Other Current Assets + required: false + - value: Asset.Other Current Asset.Inventory + type: String + displayName: Inventory + required: false + - value: Asset.Other Current Asset.Investment_MortgageRealEstateLoans + type: String + displayName: Investment Mortgage Real Estate Loans + required: false + - value: Asset.Other Current Asset.Investment_Other + type: String + displayName: Investment Other + required: false + - value: Asset.Other Current Asset.Investment_TaxExemptSecurities + type: String + displayName: Investment Tax Exempt Securities + required: false + - value: Asset.Other Current Asset.Investment_USGovernmentObligations + type: String + displayName: Investment US Government Obligations + required: false + - value: Asset.Other Current Asset.LoansToOfficers + type: String + displayName: Loans To Officers + required: false + - value: Asset.Other Current Asset.LoansToOthers + type: String + displayName: Loans To Others + required: false + - value: Asset.Other Current Asset.LoansToStockholders + type: String + displayName: Loans To Stockholders + required: false + - value: Asset.Other Current Asset.PrepaidExpenses + type: String + displayName: Prepaid Expenses + required: false + - value: Asset.Other Current Asset.Retainage + type: String + displayName: Retainage + required: false + - value: Asset.Other Current Asset.UndepositedFunds + type: String + displayName: Undeposited Funds + required: false + - value: Asset.Other Current Asset.AssetsAvailableForSale + type: String + displayName: Assets Available For Sale + required: false + - value: Asset.Other Current Asset.BalWithGovtAuthorities + type: String + displayName: Balance With Govt Authorities + required: false + - value: Asset.Other Current Asset.CalledUpShareCapitalNotPaid + type: String + displayName: Called Up Share Capital Not Paid + required: false + - value: Asset.Other Current Asset.ExpenditureAuthorisationsAndLettersOfCredit + type: String + displayName: Expenditure Authorisations And Letters Of Credit + required: false + - value: Asset.Other Current Asset.GlobalTaxDeferred + type: String + displayName: Global Tax Deferred + required: false + - value: Asset.Other Current Asset.GlobalTaxRefund + type: String + displayName: Global Tax Refund + required: false + - value: Asset.Other Current Asset.InternalTransfers + type: String + displayName: Internal Transfers + required: false + - value: Asset.Other Current Asset.OtherConsumables + type: String + displayName: Other Consumables + required: false + - value: Asset.Other Current Asset.ProvisionsCurrentAssets + type: String + displayName: Provisions Current Assets + required: false + - value: Asset.Other Current Asset.ShortTermInvestmentsInRelatedParties + type: String + displayName: Short Term Investments In Related Parties + required: false + - value: Asset.Other Current Asset.ShortTermLoansAndAdvancesToRelatedParties + type: String + displayName: Short Term Loans And Advances To Related Parties + required: false + - value: Asset.Other Current Asset.TradeAndOtherReceivables + type: String + displayName: Trade And Other Receivables + required: false + - value: Asset.Fixed Asset.AccumulatedDepletion + type: String + displayName: Accumulated Depletion + required: false + - value: Asset.Fixed Asset.AccumulatedDepreciation + type: String + displayName: Accumulated Depreciation + required: false + - value: Asset.Fixed Asset.DepletableAssets + type: String + displayName: Depletable Assets + required: false + - value: Asset.Fixed Asset.FixedAssetComputers + type: String + displayName: Fixed Asset Computers + required: false + - value: Asset.Fixed Asset.FixedAssetCopiers + type: String + displayName: Fixed Asset Copiers + required: false + - value: Asset.Fixed Asset.FixedAssetFurniture + type: String + displayName: Fixed Asset Furniture + required: false + - value: Asset.Fixed Asset.FixedAssetPhone + type: String + displayName: Fixed Asset Phone + required: false + - value: Asset.Fixed Asset.FixedAssetPhotoVideo + type: String + displayName: Fixed Asset Photo Video + required: false + - value: Asset.Fixed Asset.FixedAssetSoftware + type: String + displayName: Fixed Asset Software + required: false + - value: Asset.Fixed Asset.FixedAssetOtherToolsEquipment + type: String + displayName: Fixed Asset Other Tools Equipment + required: false + - value: Asset.Fixed Asset.FurnitureAndFixtures + type: String + displayName: Furniture And Fixtures + required: false + - value: Asset.Fixed Asset.Land + type: String + displayName: Land + required: false + - value: Asset.Fixed Asset.LeaseholdImprovements + type: String + displayName: Leasehold Improvements + required: false + - value: Asset.Fixed Asset.OtherFixedAssets + type: String + displayName: Other Fixed Assets + required: false + - value: Asset.Fixed Asset.AccumulatedAmortization + type: String + displayName: Accumulated Amortization + required: false + - value: Asset.Fixed Asset.Buildings + type: String + displayName: Buildings + required: false + - value: Asset.Fixed Asset.IntangibleAssets + type: String + displayName: Intangible Assets + required: false + - value: Asset.Fixed Asset.MachineryAndEquipment + type: String + displayName: Machinery And Equipment + required: false + - value: Asset.Fixed Asset.Vehicles + type: String + displayName: Vehicles + required: false + - value: Asset.Fixed Asset.AssetsInCourseOfConstruction + type: String + displayName: Assets In Course Of Construction + required: false + - value: Asset.Fixed Asset.CapitalWip + type: String + displayName: Capital Wip + required: false + - value: Asset.Fixed Asset.CumulativeDepreciationOnIntangibleAssets + type: String + displayName: Cumulative Depreciation On Intangible Assets + required: false + - value: Asset.Fixed Asset.IntangibleAssetsUnderDevelopment + type: String + displayName: Intangible Assets Under Development + required: false + - value: Asset.Fixed Asset.LandAsset + type: String + displayName: Land Asset + required: false + - value: Asset.Fixed Asset.NonCurrentAssets + type: String + displayName: Non Current Assets + required: false + - value: Asset.Fixed Asset.ParticipatingInterests + type: String + displayName: Participating Interests + required: false + - value: Asset.Fixed Asset.ProvisionsFixedAssets + type: String + displayName: Provisions Fixed Assets + required: false + - value: Asset.Other Asset.LeaseBuyout + type: String + displayName: Lease Buyout + required: false + - value: Asset.Other Asset.OtherLongTermAssets + type: String + displayName: Other Long Term Assets + required: false + - value: Asset.Other Asset.SecurityDeposits + type: String + displayName: Security Deposits + required: false + - value: Asset.Other Asset.AccumulatedAmortizationOfOtherAssets + type: String + displayName: Accumulated Amortization Of Other Assets + required: false + - value: Asset.Other Asset.Goodwill + type: String + displayName: Goodwill + required: false + - value: Asset.Other Asset.Licenses + type: String + displayName: Licenses + required: false + - value: Asset.Other Asset.OrganizationalCosts + type: String + displayName: Organizational Costs + required: false + - value: Asset.Other Asset.AssetsHeldForSale + type: String + displayName: Assets Held For Sale + required: false + - value: Asset.Other Asset.AvailableForSaleFinancialAssets + type: String + displayName: Available For Sale Financial Assets + required: false + - value: Asset.Other Asset.DeferredTax + type: String + displayName: Deferred Tax + required: false + - value: Asset.Other Asset.Investments + type: String + displayName: Investments + required: false + - value: Asset.Other Asset.LongTermInvestments + type: String + displayName: Long Term Investments + required: false + - value: Asset.Other Asset.LongTermLoansAndAdvancesToRelatedParties + type: String + displayName: Long Term Loans And Advances To Related Parties + required: false + - value: Asset.Other Asset.OtherIntangibleAssets + type: String + displayName: Other Intangible Assets + required: false + - value: Asset.Other Asset.OtherLongTermInvestments + type: String + displayName: Other Long Term Investments + required: false + - value: Asset.Other Asset.OtherLongTermLoansAndAdvances + type: String + displayName: Other Long Term Loans And Advances + required: false + - value: Asset.Other Asset.PrepaymentsAndAccruedIncome + type: String + displayName: Prepayments And Accrued Income + required: false + - value: Asset.Other Asset.ProvisionsNonCurrentAssets + type: String + displayName: Provisions Non-Current Assets + required: false + - value: Asset.Accounts Receivable.AccountsReceivable + type: String + displayName: Accounts Receivable + required: false + - value: Expense.Expense.AdvertisingPromotional + type: String + displayName: Advertising/Promotional + required: false + - value: Expense.Expense.BadDebts + type: String + displayName: Bad Debts + required: false + - value: Expense.Expense.BankCharges + type: String + displayName: Bank Charges + required: false + - value: Expense.Expense.CharitableContributions + type: String + displayName: Charitable Contributions + required: false + - value: Expense.Expense.CommissionsAndFees + type: String + displayName: Commissions And Fees + required: false + - value: Expense.Expense.Entertainment + type: String + displayName: Entertainment + required: false + - value: Expense.Expense.EntertainmentMeals + type: String + displayName: Entertainment Meals + required: false + - value: Expense.Expense.EquipmentRental + type: String + displayName: Equipment Rental + required: false + - value: Expense.Expense.FinanceCosts + type: String + displayName: Finance Costs + required: false + - value: Expense.Expense.GlobalTaxExpense + type: String + displayName: Global Tax Expense + required: false + - value: Expense.Expense.Insurance + type: String + displayName: Insurance + required: false + - value: Expense.Expense.InterestPaid + type: String + displayName: Interest Paid + required: false + - value: Expense.Expense.LegalProfessionalFees + type: String + displayName: Legal And Professional Fees + required: false + - value: Expense.Expense.OfficeExpenses + type: String + displayName: Office Expenses + required: false + - value: Expense.Expense.OfficeGeneralAdministrativeExpenses + type: String + displayName: Office/General Administrative Expenses + required: false + - value: Expense.Expense.OtherBusinessExpenses + type: String + displayName: Other Business Expenses + required: false + - value: Expense.Expense.OtherMiscellaneousServiceCost + type: String + displayName: Other Miscellaneous Service Cost + required: false + - value: Expense.Expense.PromotionalMeals + type: String + displayName: Promotional Meals + required: false + - value: Expense.Expense.RentOrLeaseOfBuildings + type: String + displayName: Rent Or Lease Of Buildings + required: false + - value: Expense.Expense.RepairMaintenance + type: String + displayName: Repair And Maintenance + required: false + - value: Expense.Expense.ShippingFreightDelivery + type: String + displayName: 'Shipping, Freight And Delivery' + required: false + - value: Expense.Expense.SuppliesMaterials + type: String + displayName: Supplies And Materials + required: false + - value: Expense.Expense.Travel + type: String + displayName: Travel + required: false + - value: Expense.Expense.TravelMeals + type: String + displayName: Travel Meals + required: false + - value: Expense.Expense.Utilities + type: String + displayName: Utilities + required: false + - value: Expense.Expense.Auto + type: String + displayName: Auto + required: false + - value: Expense.Expense.CostOfLabor + type: String + displayName: Cost Of Labor + required: false + - value: Expense.Expense.DuesSubscriptions + type: String + displayName: Dues And Subscriptions + required: false + - value: Expense.Expense.PayrollExpenses + type: String + displayName: Payroll Expenses + required: false + - value: Expense.Expense.TaxesPaid + type: String + displayName: Taxes Paid + required: false + - value: Expense.Expense.UnappliedCashBillPaymentExpense + type: String + displayName: Unapplied Cash Bill Payment Expense + required: false + - value: Expense.Expense.Utilities + type: String + displayName: Utilities + required: false + - value: Expense.Expense.AmortizationExpense + type: String + displayName: Amortization Expense + required: false + - value: Expense.Expense.AppropriationsToDepreciation + type: String + displayName: Appropriations To Depreciation + required: false + - value: Expense.Expense.BorrowingCost + type: String + displayName: Borrowing Cost + required: false + - value: Expense.Expense.CommissionsAndFees + type: String + displayName: Commissions And Fees + required: false + - value: Expense.Expense.DistributionCosts + type: String + displayName: Distribution Costs + required: false + - value: Expense.Expense.ExternalServices + type: String + displayName: External Services + required: false + - value: Expense.Expense.ExtraordinaryCharges + type: String + displayName: Extraordinary Charges + required: false + - value: Expense.Expense.IncomeTaxExpense + type: String + displayName: Income Tax Expense + required: false + - value: Expense.Expense.LossOnDiscontinuedOperationsNetOfTax + type: String + displayName: Loss On Discontinued Operations Net Of Tax + required: false + - value: Expense.Expense.ManagementCompensation + type: String + displayName: Management Compensation + required: false + - value: Expense.Expense.OtherCurrentOperatingCharges + type: String + displayName: Other Current Operating Charges + required: false + - value: Expense.Expense.OtherExternalServices + type: String + displayName: Other External Services + required: false + - value: Expense.Expense.OtherRentalCosts + type: String + displayName: Other Rental Costs + required: false + - value: Expense.Expense.OtherSellingExpenses + type: String + displayName: Other Selling Expenses + required: false + - value: Expense.Expense.ProjectStudiesSurveysAssessments + type: String + displayName: Project Studies Surveys Assessments + required: false + - value: Expense.Expense.PurchasesRebates + type: String + displayName: Purchases Rebates + required: false + - value: Expense.Expense.ShippingAndDeliveryExpense + type: String + displayName: Shipping And Delivery Expense + required: false + - value: Expense.Expense.StaffCosts + type: String + displayName: Staff Costs + required: false + - value: Expense.Expense.Sundry + type: String + displayName: Sundry + required: false + - value: Expense.Expense.TravelExpensesGeneralAndAdminExpenses + type: String + displayName: Travel Expenses General And Admin Expenses + required: false + - value: Expense.Expense.TravelExpensesSellingExpense + type: String + displayName: Travel Expenses Selling Expense + required: false + - value: Expense.Other Expense.Depreciation + type: String + displayName: Depreciation + required: false + - value: Expense.Other Expense.ExchangeGainOrLoss + type: String + displayName: Exchange Gain Or Loss + required: false + - value: Expense.Other Expense.OtherMiscellaneousExpense + type: String + displayName: Other Miscellaneous Expense + required: false + - value: Expense.Other Expense.PenaltiesSettlements + type: String + displayName: Penalties And Settlements + required: false + - value: Expense.Other Expense.Amortization + type: String + displayName: Amortization + required: false + - value: Expense.Other Expense.GasAndFuel + type: String + displayName: Gas And Fuel + required: false + - value: Expense.Other Expense.HomeOffice + type: String + displayName: Home Office + required: false + - value: Expense.Other Expense.HomeOwnerRentalInsurance + type: String + displayName: Home Owner Rental Insurance + required: false + - value: Expense.Other Expense.OtherHomeOfficeExpenses + type: String + displayName: Other Home Office Expenses + required: false + - value: Expense.Other Expense.MortgageInterest + type: String + displayName: Mortgage Interest + required: false + - value: Expense.Other Expense.RentAndLease + type: String + displayName: Rent And Lease + required: false + - value: Expense.Other Expense.RepairsAndMaintenance + type: String + displayName: Repairs And Maintenance + required: false + - value: Expense.Other Expense.ParkingAndTolls + type: String + displayName: Parking And Tolls + required: false + - value: Expense.Other Expense.Vehicle + type: String + displayName: Vehicle + required: false + - value: Expense.Other Expense.VehicleInsurance + type: String + displayName: Vehicle Insurance + required: false + - value: Expense.Other Expense.VehicleLease + type: String + displayName: Vehicle Lease + required: false + - value: Expense.Other Expense.VehicleLoanInterest + type: String + displayName: Vehicle Loan Interest + required: false + - value: Expense.Other Expense.VehicleLoan + type: String + displayName: Vehicle Loan + required: false + - value: Expense.Other Expense.VehicleRegistration + type: String + displayName: Vehicle Registration + required: false + - value: Expense.Other Expense.VehicleRepairs + type: String + displayName: Vehicle Repairs + required: false + - value: Expense.Other Expense.OtherVehicleExpenses + type: String + displayName: Other Vehicle Expenses + required: false + - value: Expense.Other Expense.Utilities + type: String + displayName: Utilities + required: false + - value: Expense.Other Expense.WashAndRoadServices + type: String + displayName: Wash And Road Services + required: false + - value: Expense.Other Expense.DeferredTaxExpense + type: String + displayName: Deferred Tax Expense + required: false + - value: Expense.Other Expense.Depletion + type: String + displayName: Depletion + required: false + - value: Expense.Other Expense.ExceptionalItems + type: String + displayName: Exceptional Items + required: false + - value: Expense.Other Expense.ExtraordinaryItems + type: String + displayName: Extraordinary Items + required: false + - value: Expense.Other Expense.IncomeTaxOtherExpense + type: String + displayName: Income Tax Other Expense + required: false + - value: Expense.Other Expense.MatCredit + type: String + displayName: Mat Credit + required: false + - value: Expense.Other Expense.PriorPeriodItems + type: String + displayName: Prior Period Items + required: false + - value: Expense.Other Expense.TaxRoundoffGainOrLoss + type: String + displayName: Tax Roundoff Gain Or Loss + required: false + - value: Expense.Cost of Goods Sold.EquipmentRentalCos + type: String + displayName: Equipment Rental - COS + required: false + - value: Expense.Cost of Goods Sold.OtherCostsOfServiceCos + type: String + displayName: Other Costs Of Sales - COS + required: false + - value: Expense.Cost of Goods Sold.ShippingFreightDeliveryCos + type: String + displayName: 'Shipping, Freight And Delivery - COS' + required: false + - value: Expense.Cost of Goods Sold.SuppliesMaterialsCogs + type: String + displayName: Supplies And Materials - COS + required: false + - value: Expense.Cost of Goods Sold.CostOfLaborCos + type: String + displayName: Cost Of Labor - COS + required: false + - value: Expense.Cost of Goods Sold.CostOfSales + type: String + displayName: Cost Of Sales + required: false + - value: Expense.Cost of Goods Sold.FreightAndDeliveryCost + type: String + displayName: Freight And Delivery Cost + required: false + - value: Income.Income.NonProfitIncome + type: String + displayName: Non Profit Income + required: false + - value: Income.Income.OtherPrimaryIncome + type: String + displayName: Other Primary Income + required: false + - value: Income.Income.SalesOfProductIncome + type: String + displayName: Sales Of ProductIncome + required: false + - value: Income.Income.ServiceFeeIncome + type: String + displayName: Service Fee Income + required: false + - value: Income.Income.DiscountsRefundsGiven + type: String + displayName: Discounts Refunds Given + required: false + - value: Income.Income.UnappliedCashPaymentIncome + type: String + displayName: Unapplied Cash Payment Income + required: false + - value: Income.Income.CashReceiptIncome + type: String + displayName: Cash Receipt Income + required: false + - value: Income.Income.OperatingGrants + type: String + displayName: Operating Grants + required: false + - value: Income.Income.OtherCurrentOperatingIncome + type: String + displayName: Other Current Operating Income + required: false + - value: Income.Income.OwnWorkCapitalized + type: String + displayName: Own Work Capitalized + required: false + - value: Income.Income.RevenueGeneral + type: String + displayName: Revenue General + required: false + - value: Income.Income.SalesRetail + type: String + displayName: Sales Retail + required: false + - value: Income.Income.SalesWholesale + type: String + displayName: Sales Wholesale + required: false + - value: Income.Income.SavingsByTaxScheme + type: String + displayName: Savings By Tax Scheme + required: false + - value: Income.Other Income.DividendIncome + type: String + displayName: Dividend Income + required: false + - value: Income.Other Income.InterestEarned + type: String + displayName: Interest Earned + required: false + - value: Income.Other Income.OtherInvestmentIncome + type: String + displayName: Other Investment Income + required: false + - value: Income.Other Income.OtherMiscellaneousIncome + type: String + displayName: Other Miscellaneous Income + required: false + - value: Income.Other Income.TaxExemptInterest + type: String + displayName: Tax Exempt Interest + required: false + - value: Income.Other Income.GainLossOnSaleOfFixedAssets + type: String + displayName: Gain Loss On Sale Of Fixed Assets + required: false + - value: Income.Other Income.GainLossOnSaleOfInvestments + type: String + displayName: Gain Loss On Sale Of Investments + required: false + - value: Income.Other Income.LossOnDisposalOfAssets + type: String + displayName: Loss On Disposal Of Assets + required: false + - value: Income.Other Income.OtherOperatingIncome + type: String + displayName: Other Operating Income + required: false + - value: Income.Other Income.UnrealisedLossOnSecuritiesNetOfTax + type: String + displayName: Unrealised Loss On Securities Net Of Tax + required: false + - value: Liability.Accounts Payable.AccountsPayable + type: String + displayName: Accounts Payable + required: false + - value: Liability.Accounts Payable.OutstandingDuesMicroSmallEnterprise + type: String + displayName: Outstanding Dues Micro Small Enterprise + required: false + - value: Liability.Accounts Payable.OutstandingDuesOtherThanMicroSmallEnterprise + type: String + displayName: Outstanding Dues Other Than Micro Small Enterprise + required: false + - value: Liability.Credit Card.CreditCard + type: String + displayName: Credit Card + required: false + - value: Liability.Long Term Liability.NotesPayable + type: String + displayName: Notes Payable + required: false + - value: Liability.Long Term Liability.OtherLongTermLiabilities + type: String + displayName: Other Long Term Liabilities + required: false + - value: Liability.Long Term Liability.ShareholderNotesPayable + type: String + displayName: Shareholder Notes Payable + required: false + - value: Liability.Long Term Liability.AccrualsAndDeferredIncome + type: String + displayName: Accruals And Deferred Income + required: false + - value: Liability.Long Term Liability.AccruedLongLermLiabilities + type: String + displayName: Accrued Long Lerm Liabilities + required: false + - value: Liability.Long Term Liability.AccruedVacationPayable + type: String + displayName: Accrued Vacation Payable + required: false + - value: Liability.Long Term Liability.BankLoans + type: String + displayName: Bank Loans + required: false + - value: Liability.Long Term Liability.DebtsRelatedToParticipatingInterests + type: String + displayName: Debts Related To Participating Interests + required: false + - value: Liability.Long Term Liability.DeferredTaxLiabilities + type: String + displayName: Deferred Tax Liabilities + required: false + - value: Liability.Long Term Liability.GovernmentAndOtherPublicAuthorities + type: String + displayName: Government And Other Public Authorities + required: false + - value: Liability.Long Term Liability.GroupAndAssociates + type: String + displayName: Group And Associates + required: false + - value: Liability.Long Term Liability.LiabilitiesRelatedToAssetsHeldForSale + type: String + displayName: Liabilities Related To Assets Held For Sale + required: false + - value: Liability.Long Term Liability.LongTermBorrowings + type: String + displayName: Long Term Borrowings + required: false + - value: Liability.Long Term Liability.LongTermDebit + type: String + displayName: Long Term Debit + required: false + - value: Liability.Long Term Liability.LongTermEmployeeBenefitObligations + type: String + displayName: Long Term Employee Benefit Obligations + required: false + - value: Liability.Long Term Liability.ObligationsUnderFinanceLeases + type: String + displayName: Obligations Under Finance Leases + required: false + - value: Liability.Long Term Liability.OtherLongTermProvisions + type: String + displayName: Other Long Term Provisions + required: false + - value: Liability.Long Term Liability.ProvisionForLiabilities + type: String + displayName: Provision For Liabilities + required: false + - value: Liability.Long Term Liability.ProvisionsNonCurrentLiabilities + type: String + displayName: Provisions Non Current Liabilities + required: false + - value: Liability.Long Term Liability.StaffAndRelatedLongTermLiabilityAccounts + type: String + displayName: Staff And Related Long Term Liability Accounts + required: false + - value: Liability.Other Current Liability.DirectDepositPayable + type: String + displayName: Direct Deposit Payable + required: false + - value: Liability.Other Current Liability.LineOfCredit + type: String + displayName: Line Of Credit + required: false + - value: Liability.Other Current Liability.LoanPayable + type: String + displayName: Loan Payable + required: false + - value: Liability.Other Current Liability.GlobalTaxPayable + type: String + displayName: Global Tax Payable + required: false + - value: Liability.Other Current Liability.GlobalTaxSuspense + type: String + displayName: Global Tax Suspense + required: false + - value: Liability.Other Current Liability.OtherCurrentLiabilities + type: String + displayName: Other Current Liabilities + required: false + - value: Liability.Other Current Liability.PayrollClearing + type: String + displayName: Payroll Clearing + required: false + - value: Liability.Other Current Liability.PayrollTaxPayable + type: String + displayName: Payroll Tax Payable + required: false + - value: Liability.Other Current Liability.PrepaidExpensesPayable + type: String + displayName: Prepaid Expenses Payable + required: false + - value: Liability.Other Current Liability.RentsInTrustLiability + type: String + displayName: Rents In Trust Liability + required: false + - value: Liability.Other Current Liability.TrustAccountsLiabilities + type: String + displayName: Trust Accounts Liabilities + required: false + - value: Liability.Other Current Liability.FederalIncomeTaxPayable + type: String + displayName: Federal Income Tax Payable + required: false + - value: Liability.Other Current Liability.InsurancePayable + type: String + displayName: Insurance Payable + required: false + - value: Liability.Other Current Liability.SalesTaxPayable + type: String + displayName: Sales Tax Payable + required: false + - value: Liability.Other Current Liability.StateLocalIncomeTaxPayable + type: String + displayName: State Local Income Tax Payable + required: false + - value: Liability.Other Current Liability.AccruedLiabilities + type: String + displayName: Accrued Liabilities + required: false + - value: Liability.Other Current Liability.CurrentLiabilities + type: String + displayName: Current Liabilities + required: false + - value: Liability.Other Current Liability.CurrentPortionEmployeeBenefitsObligations + type: String + displayName: Current Portion EmployeeBenefits Obligations + required: false + - value: Liability.Other Current Liability.CurrentPortionOfObligationsUnderFinanceLeases + type: String + displayName: Current Portion Of Obligations Under Finance Leases + required: false + - value: Liability.Other Current Liability.CurrentTaxLiability + type: String + displayName: Current Tax Liability + required: false + - value: Liability.Other Current Liability.DividendsPayable + type: String + displayName: Dividends Payable + required: false + - value: Liability.Other Current Liability.DutiesAndTaxes + type: String + displayName: Duties And Taxes + required: false + - value: Liability.Other Current Liability.InterestPayables + type: String + displayName: Interest Payables + required: false + - value: Liability.Other Current Liability.ProvisionForWarrantyObligations + type: String + displayName: Provision For Warranty Obligations + required: false + - value: Liability.Other Current Liability.ProvisionsCurrentLiabilities + type: String + displayName: Provisions Current Liabilities + required: false + - value: Liability.Other Current Liability.ShortTermBorrowings + type: String + displayName: Short Term Borrowings + required: false + - value: Liability.Other Current Liability.SocialSecurityAgencies + type: String + displayName: Social Security Agencies + required: false + - value: Liability.Other Current Liability.StaffAndRelatedLiabilityAccounts + type: String + displayName: Staff And Related Liability Accounts + required: false + - value: Liability.Other Current Liability.SundryDebtorsAndCreditors + type: String + displayName: Sundry Debtors And Creditors + required: false + - value: Liability.Other Current Liability.TradeAndOtherPayables + type: String + displayName: Trade And Other Payables + required: false + - value: Equity.Equity.OpeningBalanceEquity + type: String + displayName: Opening Balance Equity + required: false + - value: Equity.Equity.PartnersEquity + type: String + displayName: Partners Equity + required: false + - value: Equity.Equity.RetainedEarnings + type: String + displayName: Retained Earnings + required: false + - value: Equity.Equity.AccumulatedAdjustment + type: String + displayName: Accumulated Adjustment + required: false + - value: Equity.Equity.OwnersEquity + type: String + displayName: Owners Equity + required: false + - value: Equity.Equity.PaidInCapitalOrSurplus + type: String + displayName: Paid In Capital Or Surplus + required: false + - value: Equity.Equity.PartnerContributions + type: String + displayName: Partner Contributions + required: false + - value: Equity.Equity.PartnerDistributions + type: String + displayName: Partner Distributions + required: false + - value: Equity.Equity.PreferredStock + type: String + displayName: Preferred Stock + required: false + - value: Equity.Equity.CommonStock + type: String + displayName: Common Stock + required: false + - value: Equity.Equity.TreasuryStock + type: String + displayName: Treasury Stock + required: false + - value: Equity.Equity.EstimatedTaxes + type: String + displayName: Estimated Taxes + required: false + - value: Equity.Equity.Healthcare + type: String + displayName: Healthcare + required: false + - value: Equity.Equity.PersonalIncome + type: String + displayName: Personal Income + required: false + - value: Equity.Equity.PersonalExpense + type: String + displayName: Personal Expense + required: false + - value: Equity.Equity.AccumulatedOtherComprehensiveIncome + type: String + displayName: Accumulated Other Comprehensive Income + required: false + - value: Equity.Equity.CalledUpShareCapital + type: String + displayName: Called Up Share Capital + required: false + - value: Equity.Equity.CapitalReserves + type: String + displayName: Capital Reserves + required: false + - value: Equity.Equity.DividendDisbursed + type: String + displayName: Dividend Disbursed + required: false + - value: Equity.Equity.EquityInEarningsOfSubsiduaries + type: String + displayName: Equity In Earnings Of Subsiduaries + required: false + - value: Equity.Equity.InvestmentGrants + type: String + displayName: Investment Grants + required: false + - value: Equity.Equity.MoneyReceivedAgainstShareWarrants + type: String + displayName: Money Received Against Share Warrants + required: false + - value: Equity.Equity.OtherFreeReserves + type: String + displayName: Other Free Reserves + required: false + - value: Equity.Equity.ShareApplicationMoneyPendingAllotment + type: String + displayName: Share Application Money Pending Allotment + required: false + - value: Equity.Equity.ShareCapital + type: String + displayName: Share Capital + required: false + - value: Equity.Equity.Funds + type: String + displayName: Funds + required: false + required: true + required: true + QuickBooks Online: + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: false + validation: + warnings: [] + information: + - field: NominalCode + details: If included must have a length between 1 and 7 characters + name: + type: String + displayName: Name + description: Name of the account + required: true + validation: + warnings: + - field: Name + details: Must have a length between 1 and 100 characters + information: [] + currency: + type: String + displayName: Currency + description: The currency of the account + required: false + validation: + warnings: [] + information: + - field: Currency + details: When not specified company base currency will be used + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + options: + - value: Asset.Bank.CashOnHand + type: String + displayName: Cash On Hand + required: false + - value: Asset.Bank.Checking + type: String + displayName: Checking + required: false + - value: Asset.Bank.MoneyMarket + type: String + displayName: Money Market + required: false + - value: Asset.Bank.RentsHeldInTrust + type: String + displayName: Rents Held In Trust + required: false + - value: Asset.Bank.Savings + type: String + displayName: Savings + required: false + - value: Asset.Bank.TrustAccounts + type: String + displayName: Trust Accounts + required: false + - value: Asset.Bank.CashAndCashEquivalents + type: String + displayName: Cash And Cash Equivalents + required: false + - value: Asset.Bank.OtherEarmarkedBankAccounts + type: String + displayName: Other Earmarked Bank Accounts + required: false + - value: Asset.Other Current Asset.AllowanceForBadDebts + type: String + displayName: Allowance For Bad Debts + required: false + - value: Asset.Other Current Asset.DevelopmentCosts + type: String + displayName: Development Costs + required: false + - value: Asset.Other Current Asset.EmployeeCashAdvances + type: String + displayName: Employee Cash Advances + required: false + - value: Asset.Other Current Asset.OtherCurrentAssets + type: String + displayName: Other Current Assets + required: false + - value: Asset.Other Current Asset.Inventory + type: String + displayName: Inventory + required: false + - value: Asset.Other Current Asset.Investment_MortgageRealEstateLoans + type: String + displayName: Investment Mortgage Real Estate Loans + required: false + - value: Asset.Other Current Asset.Investment_Other + type: String + displayName: Investment Other + required: false + - value: Asset.Other Current Asset.Investment_TaxExemptSecurities + type: String + displayName: Investment Tax Exempt Securities + required: false + - value: Asset.Other Current Asset.Investment_USGovernmentObligations + type: String + displayName: Investment US Government Obligations + required: false + - value: Asset.Other Current Asset.LoansToOfficers + type: String + displayName: Loans To Officers + required: false + - value: Asset.Other Current Asset.LoansToOthers + type: String + displayName: Loans To Others + required: false + - value: Asset.Other Current Asset.LoansToStockholders + type: String + displayName: Loans To Stockholders + required: false + - value: Asset.Other Current Asset.PrepaidExpenses + type: String + displayName: Prepaid Expenses + required: false + - value: Asset.Other Current Asset.Retainage + type: String + displayName: Retainage + required: false + - value: Asset.Other Current Asset.UndepositedFunds + type: String + displayName: Undeposited Funds + required: false + - value: Asset.Other Current Asset.AssetsAvailableForSale + type: String + displayName: Assets Available For Sale + required: false + - value: Asset.Other Current Asset.BalWithGovtAuthorities + type: String + displayName: Balance With Govt Authorities + required: false + - value: Asset.Other Current Asset.CalledUpShareCapitalNotPaid + type: String + displayName: Called Up Share Capital Not Paid + required: false + - value: Asset.Other Current Asset.ExpenditureAuthorisationsAndLettersOfCredit + type: String + displayName: Expenditure Authorisations And Letters Of Credit + required: false + - value: Asset.Other Current Asset.GlobalTaxDeferred + type: String + displayName: Global Tax Deferred + required: false + - value: Asset.Other Current Asset.GlobalTaxRefund + type: String + displayName: Global Tax Refund + required: false + - value: Asset.Other Current Asset.InternalTransfers + type: String + displayName: Internal Transfers + required: false + - value: Asset.Other Current Asset.OtherConsumables + type: String + displayName: Other Consumables + required: false + - value: Asset.Other Current Asset.ProvisionsCurrentAssets + type: String + displayName: Provisions Current Assets + required: false + - value: Asset.Other Current Asset.ShortTermInvestmentsInRelatedParties + type: String + displayName: Short Term Investments In Related Parties + required: false + - value: Asset.Other Current Asset.ShortTermLoansAndAdvancesToRelatedParties + type: String + displayName: Short Term Loans And Advances To Related Parties + required: false + - value: Asset.Other Current Asset.TradeAndOtherReceivables + type: String + displayName: Trade And Other Receivables + required: false + - value: Asset.Fixed Asset.AccumulatedDepletion + type: String + displayName: Accumulated Depletion + required: false + - value: Asset.Fixed Asset.AccumulatedDepreciation + type: String + displayName: Accumulated Depreciation + required: false + - value: Asset.Fixed Asset.DepletableAssets + type: String + displayName: Depletable Assets + required: false + - value: Asset.Fixed Asset.FixedAssetComputers + type: String + displayName: Fixed Asset Computers + required: false + - value: Asset.Fixed Asset.FixedAssetCopiers + type: String + displayName: Fixed Asset Copiers + required: false + - value: Asset.Fixed Asset.FixedAssetFurniture + type: String + displayName: Fixed Asset Furniture + required: false + - value: Asset.Fixed Asset.FixedAssetPhone + type: String + displayName: Fixed Asset Phone + required: false + - value: Asset.Fixed Asset.FixedAssetPhotoVideo + type: String + displayName: Fixed Asset Photo Video + required: false + - value: Asset.Fixed Asset.FixedAssetSoftware + type: String + displayName: Fixed Asset Software + required: false + - value: Asset.Fixed Asset.FixedAssetOtherToolsEquipment + type: String + displayName: Fixed Asset Other Tools Equipment + required: false + - value: Asset.Fixed Asset.FurnitureAndFixtures + type: String + displayName: Furniture And Fixtures + required: false + - value: Asset.Fixed Asset.Land + type: String + displayName: Land + required: false + - value: Asset.Fixed Asset.LeaseholdImprovements + type: String + displayName: Leasehold Improvements + required: false + - value: Asset.Fixed Asset.OtherFixedAssets + type: String + displayName: Other Fixed Assets + required: false + - value: Asset.Fixed Asset.AccumulatedAmortization + type: String + displayName: Accumulated Amortization + required: false + - value: Asset.Fixed Asset.Buildings + type: String + displayName: Buildings + required: false + - value: Asset.Fixed Asset.IntangibleAssets + type: String + displayName: Intangible Assets + required: false + - value: Asset.Fixed Asset.MachineryAndEquipment + type: String + displayName: Machinery And Equipment + required: false + - value: Asset.Fixed Asset.Vehicles + type: String + displayName: Vehicles + required: false + - value: Asset.Fixed Asset.AssetsInCourseOfConstruction + type: String + displayName: Assets In Course Of Construction + required: false + - value: Asset.Fixed Asset.CapitalWip + type: String + displayName: Capital Wip + required: false + - value: Asset.Fixed Asset.CumulativeDepreciationOnIntangibleAssets + type: String + displayName: Cumulative Depreciation On Intangible Assets + required: false + - value: Asset.Fixed Asset.IntangibleAssetsUnderDevelopment + type: String + displayName: Intangible Assets Under Development + required: false + - value: Asset.Fixed Asset.LandAsset + type: String + displayName: Land Asset + required: false + - value: Asset.Fixed Asset.NonCurrentAssets + type: String + displayName: Non Current Assets + required: false + - value: Asset.Fixed Asset.ParticipatingInterests + type: String + displayName: Participating Interests + required: false + - value: Asset.Fixed Asset.ProvisionsFixedAssets + type: String + displayName: Provisions Fixed Assets + required: false + - value: Asset.Other Asset.LeaseBuyout + type: String + displayName: Lease Buyout + required: false + - value: Asset.Other Asset.OtherLongTermAssets + type: String + displayName: Other Long Term Assets + required: false + - value: Asset.Other Asset.SecurityDeposits + type: String + displayName: Security Deposits + required: false + - value: Asset.Other Asset.AccumulatedAmortizationOfOtherAssets + type: String + displayName: Accumulated Amortization Of Other Assets + required: false + - value: Asset.Other Asset.Goodwill + type: String + displayName: Goodwill + required: false + - value: Asset.Other Asset.Licenses + type: String + displayName: Licenses + required: false + - value: Asset.Other Asset.OrganizationalCosts + type: String + displayName: Organizational Costs + required: false + - value: Asset.Other Asset.AssetsHeldForSale + type: String + displayName: Assets Held For Sale + required: false + - value: Asset.Other Asset.AvailableForSaleFinancialAssets + type: String + displayName: Available For Sale Financial Assets + required: false + - value: Asset.Other Asset.DeferredTax + type: String + displayName: Deferred Tax + required: false + - value: Asset.Other Asset.Investments + type: String + displayName: Investments + required: false + - value: Asset.Other Asset.LongTermInvestments + type: String + displayName: Long Term Investments + required: false + - value: Asset.Other Asset.LongTermLoansAndAdvancesToRelatedParties + type: String + displayName: Long Term Loans And Advances To Related Parties + required: false + - value: Asset.Other Asset.OtherIntangibleAssets + type: String + displayName: Other Intangible Assets + required: false + - value: Asset.Other Asset.OtherLongTermInvestments + type: String + displayName: Other Long Term Investments + required: false + - value: Asset.Other Asset.OtherLongTermLoansAndAdvances + type: String + displayName: Other Long Term Loans And Advances + required: false + - value: Asset.Other Asset.PrepaymentsAndAccruedIncome + type: String + displayName: Prepayments And Accrued Income + required: false + - value: Asset.Other Asset.ProvisionsNonCurrentAssets + type: String + displayName: Provisions Non-Current Assets + required: false + - value: Asset.Accounts Receivable.AccountsReceivable + type: String + displayName: Accounts Receivable + required: false + - value: Expense.Expense.AdvertisingPromotional + type: String + displayName: Advertising/Promotional + required: false + - value: Expense.Expense.BadDebts + type: String + displayName: Bad Debts + required: false + - value: Expense.Expense.BankCharges + type: String + displayName: Bank Charges + required: false + - value: Expense.Expense.CharitableContributions + type: String + displayName: Charitable Contributions + required: false + - value: Expense.Expense.CommissionsAndFees + type: String + displayName: Commissions And Fees + required: false + - value: Expense.Expense.Entertainment + type: String + displayName: Entertainment + required: false + - value: Expense.Expense.EntertainmentMeals + type: String + displayName: Entertainment Meals + required: false + - value: Expense.Expense.EquipmentRental + type: String + displayName: Equipment Rental + required: false + - value: Expense.Expense.FinanceCosts + type: String + displayName: Finance Costs + required: false + - value: Expense.Expense.GlobalTaxExpense + type: String + displayName: Global Tax Expense + required: false + - value: Expense.Expense.Insurance + type: String + displayName: Insurance + required: false + - value: Expense.Expense.InterestPaid + type: String + displayName: Interest Paid + required: false + - value: Expense.Expense.LegalProfessionalFees + type: String + displayName: Legal And Professional Fees + required: false + - value: Expense.Expense.OfficeExpenses + type: String + displayName: Office Expenses + required: false + - value: Expense.Expense.OfficeGeneralAdministrativeExpenses + type: String + displayName: Office/General Administrative Expenses + required: false + - value: Expense.Expense.OtherBusinessExpenses + type: String + displayName: Other Business Expenses + required: false + - value: Expense.Expense.OtherMiscellaneousServiceCost + type: String + displayName: Other Miscellaneous Service Cost + required: false + - value: Expense.Expense.PromotionalMeals + type: String + displayName: Promotional Meals + required: false + - value: Expense.Expense.RentOrLeaseOfBuildings + type: String + displayName: Rent Or Lease Of Buildings + required: false + - value: Expense.Expense.RepairMaintenance + type: String + displayName: Repair And Maintenance + required: false + - value: Expense.Expense.ShippingFreightDelivery + type: String + displayName: 'Shipping, Freight And Delivery' + required: false + - value: Expense.Expense.SuppliesMaterials + type: String + displayName: Supplies And Materials + required: false + - value: Expense.Expense.Travel + type: String + displayName: Travel + required: false + - value: Expense.Expense.TravelMeals + type: String + displayName: Travel Meals + required: false + - value: Expense.Expense.Utilities + type: String + displayName: Utilities + required: false + - value: Expense.Expense.Auto + type: String + displayName: Auto + required: false + - value: Expense.Expense.CostOfLabor + type: String + displayName: Cost Of Labor + required: false + - value: Expense.Expense.DuesSubscriptions + type: String + displayName: Dues And Subscriptions + required: false + - value: Expense.Expense.PayrollExpenses + type: String + displayName: Payroll Expenses + required: false + - value: Expense.Expense.TaxesPaid + type: String + displayName: Taxes Paid + required: false + - value: Expense.Expense.UnappliedCashBillPaymentExpense + type: String + displayName: Unapplied Cash Bill Payment Expense + required: false + - value: Expense.Expense.Utilities + type: String + displayName: Utilities + required: false + - value: Expense.Expense.AmortizationExpense + type: String + displayName: Amortization Expense + required: false + - value: Expense.Expense.AppropriationsToDepreciation + type: String + displayName: Appropriations To Depreciation + required: false + - value: Expense.Expense.BorrowingCost + type: String + displayName: Borrowing Cost + required: false + - value: Expense.Expense.CommissionsAndFees + type: String + displayName: Commissions And Fees + required: false + - value: Expense.Expense.DistributionCosts + type: String + displayName: Distribution Costs + required: false + - value: Expense.Expense.ExternalServices + type: String + displayName: External Services + required: false + - value: Expense.Expense.ExtraordinaryCharges + type: String + displayName: Extraordinary Charges + required: false + - value: Expense.Expense.IncomeTaxExpense + type: String + displayName: Income Tax Expense + required: false + - value: Expense.Expense.LossOnDiscontinuedOperationsNetOfTax + type: String + displayName: Loss On Discontinued Operations Net Of Tax + required: false + - value: Expense.Expense.ManagementCompensation + type: String + displayName: Management Compensation + required: false + - value: Expense.Expense.OtherCurrentOperatingCharges + type: String + displayName: Other Current Operating Charges + required: false + - value: Expense.Expense.OtherExternalServices + type: String + displayName: Other External Services + required: false + - value: Expense.Expense.OtherRentalCosts + type: String + displayName: Other Rental Costs + required: false + - value: Expense.Expense.OtherSellingExpenses + type: String + displayName: Other Selling Expenses + required: false + - value: Expense.Expense.ProjectStudiesSurveysAssessments + type: String + displayName: Project Studies Surveys Assessments + required: false + - value: Expense.Expense.PurchasesRebates + type: String + displayName: Purchases Rebates + required: false + - value: Expense.Expense.ShippingAndDeliveryExpense + type: String + displayName: Shipping And Delivery Expense + required: false + - value: Expense.Expense.StaffCosts + type: String + displayName: Staff Costs + required: false + - value: Expense.Expense.Sundry + type: String + displayName: Sundry + required: false + - value: Expense.Expense.TravelExpensesGeneralAndAdminExpenses + type: String + displayName: Travel Expenses General And Admin Expenses + required: false + - value: Expense.Expense.TravelExpensesSellingExpense + type: String + displayName: Travel Expenses Selling Expense + required: false + - value: Expense.Other Expense.Depreciation + type: String + displayName: Depreciation + required: false + - value: Expense.Other Expense.ExchangeGainOrLoss + type: String + displayName: Exchange Gain Or Loss + required: false + - value: Expense.Other Expense.OtherMiscellaneousExpense + type: String + displayName: Other Miscellaneous Expense + required: false + - value: Expense.Other Expense.PenaltiesSettlements + type: String + displayName: Penalties And Settlements + required: false + - value: Expense.Other Expense.Amortization + type: String + displayName: Amortization + required: false + - value: Expense.Other Expense.GasAndFuel + type: String + displayName: Gas And Fuel + required: false + - value: Expense.Other Expense.HomeOffice + type: String + displayName: Home Office + required: false + - value: Expense.Other Expense.HomeOwnerRentalInsurance + type: String + displayName: Home Owner Rental Insurance + required: false + - value: Expense.Other Expense.OtherHomeOfficeExpenses + type: String + displayName: Other Home Office Expenses + required: false + - value: Expense.Other Expense.MortgageInterest + type: String + displayName: Mortgage Interest + required: false + - value: Expense.Other Expense.RentAndLease + type: String + displayName: Rent And Lease + required: false + - value: Expense.Other Expense.RepairsAndMaintenance + type: String + displayName: Repairs And Maintenance + required: false + - value: Expense.Other Expense.ParkingAndTolls + type: String + displayName: Parking And Tolls + required: false + - value: Expense.Other Expense.Vehicle + type: String + displayName: Vehicle + required: false + - value: Expense.Other Expense.VehicleInsurance + type: String + displayName: Vehicle Insurance + required: false + - value: Expense.Other Expense.VehicleLease + type: String + displayName: Vehicle Lease + required: false + - value: Expense.Other Expense.VehicleLoanInterest + type: String + displayName: Vehicle Loan Interest + required: false + - value: Expense.Other Expense.VehicleLoan + type: String + displayName: Vehicle Loan + required: false + - value: Expense.Other Expense.VehicleRegistration + type: String + displayName: Vehicle Registration + required: false + - value: Expense.Other Expense.VehicleRepairs + type: String + displayName: Vehicle Repairs + required: false + - value: Expense.Other Expense.OtherVehicleExpenses + type: String + displayName: Other Vehicle Expenses + required: false + - value: Expense.Other Expense.Utilities + type: String + displayName: Utilities + required: false + - value: Expense.Other Expense.WashAndRoadServices + type: String + displayName: Wash And Road Services + required: false + - value: Expense.Other Expense.DeferredTaxExpense + type: String + displayName: Deferred Tax Expense + required: false + - value: Expense.Other Expense.Depletion + type: String + displayName: Depletion + required: false + - value: Expense.Other Expense.ExceptionalItems + type: String + displayName: Exceptional Items + required: false + - value: Expense.Other Expense.ExtraordinaryItems + type: String + displayName: Extraordinary Items + required: false + - value: Expense.Other Expense.IncomeTaxOtherExpense + type: String + displayName: Income Tax Other Expense + required: false + - value: Expense.Other Expense.MatCredit + type: String + displayName: Mat Credit + required: false + - value: Expense.Other Expense.PriorPeriodItems + type: String + displayName: Prior Period Items + required: false + - value: Expense.Other Expense.TaxRoundoffGainOrLoss + type: String + displayName: Tax Roundoff Gain Or Loss + required: false + - value: Expense.Cost of Goods Sold.EquipmentRentalCos + type: String + displayName: Equipment Rental - COS + required: false + - value: Expense.Cost of Goods Sold.OtherCostsOfServiceCos + type: String + displayName: Other Costs Of Sales - COS + required: false + - value: Expense.Cost of Goods Sold.ShippingFreightDeliveryCos + type: String + displayName: 'Shipping, Freight And Delivery - COS' + required: false + - value: Expense.Cost of Goods Sold.SuppliesMaterialsCogs + type: String + displayName: Supplies And Materials - COS + required: false + - value: Expense.Cost of Goods Sold.CostOfLaborCos + type: String + displayName: Cost Of Labor - COS + required: false + - value: Expense.Cost of Goods Sold.CostOfSales + type: String + displayName: Cost Of Sales + required: false + - value: Expense.Cost of Goods Sold.FreightAndDeliveryCost + type: String + displayName: Freight And Delivery Cost + required: false + - value: Income.Income.NonProfitIncome + type: String + displayName: Non Profit Income + required: false + - value: Income.Income.OtherPrimaryIncome + type: String + displayName: Other Primary Income + required: false + - value: Income.Income.SalesOfProductIncome + type: String + displayName: Sales Of ProductIncome + required: false + - value: Income.Income.ServiceFeeIncome + type: String + displayName: Service Fee Income + required: false + - value: Income.Income.DiscountsRefundsGiven + type: String + displayName: Discounts Refunds Given + required: false + - value: Income.Income.UnappliedCashPaymentIncome + type: String + displayName: Unapplied Cash Payment Income + required: false + - value: Income.Income.CashReceiptIncome + type: String + displayName: Cash Receipt Income + required: false + - value: Income.Income.OperatingGrants + type: String + displayName: Operating Grants + required: false + - value: Income.Income.OtherCurrentOperatingIncome + type: String + displayName: Other Current Operating Income + required: false + - value: Income.Income.OwnWorkCapitalized + type: String + displayName: Own Work Capitalized + required: false + - value: Income.Income.RevenueGeneral + type: String + displayName: Revenue General + required: false + - value: Income.Income.SalesRetail + type: String + displayName: Sales Retail + required: false + - value: Income.Income.SalesWholesale + type: String + displayName: Sales Wholesale + required: false + - value: Income.Income.SavingsByTaxScheme + type: String + displayName: Savings By Tax Scheme + required: false + - value: Income.Other Income.DividendIncome + type: String + displayName: Dividend Income + required: false + - value: Income.Other Income.InterestEarned + type: String + displayName: Interest Earned + required: false + - value: Income.Other Income.OtherInvestmentIncome + type: String + displayName: Other Investment Income + required: false + - value: Income.Other Income.OtherMiscellaneousIncome + type: String + displayName: Other Miscellaneous Income + required: false + - value: Income.Other Income.TaxExemptInterest + type: String + displayName: Tax Exempt Interest + required: false + - value: Income.Other Income.GainLossOnSaleOfFixedAssets + type: String + displayName: Gain Loss On Sale Of Fixed Assets + required: false + - value: Income.Other Income.GainLossOnSaleOfInvestments + type: String + displayName: Gain Loss On Sale Of Investments + required: false + - value: Income.Other Income.LossOnDisposalOfAssets + type: String + displayName: Loss On Disposal Of Assets + required: false + - value: Income.Other Income.OtherOperatingIncome + type: String + displayName: Other Operating Income + required: false + - value: Income.Other Income.UnrealisedLossOnSecuritiesNetOfTax + type: String + displayName: Unrealised Loss On Securities Net Of Tax + required: false + - value: Liability.Accounts Payable.AccountsPayable + type: String + displayName: Accounts Payable + required: false + - value: Liability.Accounts Payable.OutstandingDuesMicroSmallEnterprise + type: String + displayName: Outstanding Dues Micro Small Enterprise + required: false + - value: Liability.Accounts Payable.OutstandingDuesOtherThanMicroSmallEnterprise + type: String + displayName: Outstanding Dues Other Than Micro Small Enterprise + required: false + - value: Liability.Credit Card.CreditCard + type: String + displayName: Credit Card + required: false + - value: Liability.Long Term Liability.NotesPayable + type: String + displayName: Notes Payable + required: false + - value: Liability.Long Term Liability.OtherLongTermLiabilities + type: String + displayName: Other Long Term Liabilities + required: false + - value: Liability.Long Term Liability.ShareholderNotesPayable + type: String + displayName: Shareholder Notes Payable + required: false + - value: Liability.Long Term Liability.AccrualsAndDeferredIncome + type: String + displayName: Accruals And Deferred Income + required: false + - value: Liability.Long Term Liability.AccruedLongLermLiabilities + type: String + displayName: Accrued Long Lerm Liabilities + required: false + - value: Liability.Long Term Liability.AccruedVacationPayable + type: String + displayName: Accrued Vacation Payable + required: false + - value: Liability.Long Term Liability.BankLoans + type: String + displayName: Bank Loans + required: false + - value: Liability.Long Term Liability.DebtsRelatedToParticipatingInterests + type: String + displayName: Debts Related To Participating Interests + required: false + - value: Liability.Long Term Liability.DeferredTaxLiabilities + type: String + displayName: Deferred Tax Liabilities + required: false + - value: Liability.Long Term Liability.GovernmentAndOtherPublicAuthorities + type: String + displayName: Government And Other Public Authorities + required: false + - value: Liability.Long Term Liability.GroupAndAssociates + type: String + displayName: Group And Associates + required: false + - value: Liability.Long Term Liability.LiabilitiesRelatedToAssetsHeldForSale + type: String + displayName: Liabilities Related To Assets Held For Sale + required: false + - value: Liability.Long Term Liability.LongTermBorrowings + type: String + displayName: Long Term Borrowings + required: false + - value: Liability.Long Term Liability.LongTermDebit + type: String + displayName: Long Term Debit + required: false + - value: Liability.Long Term Liability.LongTermEmployeeBenefitObligations + type: String + displayName: Long Term Employee Benefit Obligations + required: false + - value: Liability.Long Term Liability.ObligationsUnderFinanceLeases + type: String + displayName: Obligations Under Finance Leases + required: false + - value: Liability.Long Term Liability.OtherLongTermProvisions + type: String + displayName: Other Long Term Provisions + required: false + - value: Liability.Long Term Liability.ProvisionForLiabilities + type: String + displayName: Provision For Liabilities + required: false + - value: Liability.Long Term Liability.ProvisionsNonCurrentLiabilities + type: String + displayName: Provisions Non Current Liabilities + required: false + - value: Liability.Long Term Liability.StaffAndRelatedLongTermLiabilityAccounts + type: String + displayName: Staff And Related Long Term Liability Accounts + required: false + - value: Liability.Other Current Liability.DirectDepositPayable + type: String + displayName: Direct Deposit Payable + required: false + - value: Liability.Other Current Liability.LineOfCredit + type: String + displayName: Line Of Credit + required: false + - value: Liability.Other Current Liability.LoanPayable + type: String + displayName: Loan Payable + required: false + - value: Liability.Other Current Liability.GlobalTaxPayable + type: String + displayName: Global Tax Payable + required: false + - value: Liability.Other Current Liability.GlobalTaxSuspense + type: String + displayName: Global Tax Suspense + required: false + - value: Liability.Other Current Liability.OtherCurrentLiabilities + type: String + displayName: Other Current Liabilities + required: false + - value: Liability.Other Current Liability.PayrollClearing + type: String + displayName: Payroll Clearing + required: false + - value: Liability.Other Current Liability.PayrollTaxPayable + type: String + displayName: Payroll Tax Payable + required: false + - value: Liability.Other Current Liability.PrepaidExpensesPayable + type: String + displayName: Prepaid Expenses Payable + required: false + - value: Liability.Other Current Liability.RentsInTrustLiability + type: String + displayName: Rents In Trust Liability + required: false + - value: Liability.Other Current Liability.TrustAccountsLiabilities + type: String + displayName: Trust Accounts Liabilities + required: false + - value: Liability.Other Current Liability.FederalIncomeTaxPayable + type: String + displayName: Federal Income Tax Payable + required: false + - value: Liability.Other Current Liability.InsurancePayable + type: String + displayName: Insurance Payable + required: false + - value: Liability.Other Current Liability.SalesTaxPayable + type: String + displayName: Sales Tax Payable + required: false + - value: Liability.Other Current Liability.StateLocalIncomeTaxPayable + type: String + displayName: State Local Income Tax Payable + required: false + - value: Liability.Other Current Liability.AccruedLiabilities + type: String + displayName: Accrued Liabilities + required: false + - value: Liability.Other Current Liability.CurrentLiabilities + type: String + displayName: Current Liabilities + required: false + - value: Liability.Other Current Liability.CurrentPortionEmployeeBenefitsObligations + type: String + displayName: Current Portion EmployeeBenefits Obligations + required: false + - value: Liability.Other Current Liability.CurrentPortionOfObligationsUnderFinanceLeases + type: String + displayName: Current Portion Of Obligations Under Finance Leases + required: false + - value: Liability.Other Current Liability.CurrentTaxLiability + type: String + displayName: Current Tax Liability + required: false + - value: Liability.Other Current Liability.DividendsPayable + type: String + displayName: Dividends Payable + required: false + - value: Liability.Other Current Liability.DutiesAndTaxes + type: String + displayName: Duties And Taxes + required: false + - value: Liability.Other Current Liability.InterestPayables + type: String + displayName: Interest Payables + required: false + - value: Liability.Other Current Liability.ProvisionForWarrantyObligations + type: String + displayName: Provision For Warranty Obligations + required: false + - value: Liability.Other Current Liability.ProvisionsCurrentLiabilities + type: String + displayName: Provisions Current Liabilities + required: false + - value: Liability.Other Current Liability.ShortTermBorrowings + type: String + displayName: Short Term Borrowings + required: false + - value: Liability.Other Current Liability.SocialSecurityAgencies + type: String + displayName: Social Security Agencies + required: false + - value: Liability.Other Current Liability.StaffAndRelatedLiabilityAccounts + type: String + displayName: Staff And Related Liability Accounts + required: false + - value: Liability.Other Current Liability.SundryDebtorsAndCreditors + type: String + displayName: Sundry Debtors And Creditors + required: false + - value: Liability.Other Current Liability.TradeAndOtherPayables + type: String + displayName: Trade And Other Payables + required: false + - value: Equity.Equity.OpeningBalanceEquity + type: String + displayName: Opening Balance Equity + required: false + - value: Equity.Equity.PartnersEquity + type: String + displayName: Partners Equity + required: false + - value: Equity.Equity.RetainedEarnings + type: String + displayName: Retained Earnings + required: false + - value: Equity.Equity.AccumulatedAdjustment + type: String + displayName: Accumulated Adjustment + required: false + - value: Equity.Equity.OwnersEquity + type: String + displayName: Owners Equity + required: false + - value: Equity.Equity.PaidInCapitalOrSurplus + type: String + displayName: Paid In Capital Or Surplus + required: false + - value: Equity.Equity.PartnerContributions + type: String + displayName: Partner Contributions + required: false + - value: Equity.Equity.PartnerDistributions + type: String + displayName: Partner Distributions + required: false + - value: Equity.Equity.PreferredStock + type: String + displayName: Preferred Stock + required: false + - value: Equity.Equity.CommonStock + type: String + displayName: Common Stock + required: false + - value: Equity.Equity.TreasuryStock + type: String + displayName: Treasury Stock + required: false + - value: Equity.Equity.EstimatedTaxes + type: String + displayName: Estimated Taxes + required: false + - value: Equity.Equity.Healthcare + type: String + displayName: Healthcare + required: false + - value: Equity.Equity.PersonalIncome + type: String + displayName: Personal Income + required: false + - value: Equity.Equity.PersonalExpense + type: String + displayName: Personal Expense + required: false + - value: Equity.Equity.AccumulatedOtherComprehensiveIncome + type: String + displayName: Accumulated Other Comprehensive Income + required: false + - value: Equity.Equity.CalledUpShareCapital + type: String + displayName: Called Up Share Capital + required: false + - value: Equity.Equity.CapitalReserves + type: String + displayName: Capital Reserves + required: false + - value: Equity.Equity.DividendDisbursed + type: String + displayName: Dividend Disbursed + required: false + - value: Equity.Equity.EquityInEarningsOfSubsiduaries + type: String + displayName: Equity In Earnings Of Subsiduaries + required: false + - value: Equity.Equity.InvestmentGrants + type: String + displayName: Investment Grants + required: false + - value: Equity.Equity.MoneyReceivedAgainstShareWarrants + type: String + displayName: Money Received Against Share Warrants + required: false + - value: Equity.Equity.OtherFreeReserves + type: String + displayName: Other Free Reserves + required: false + - value: Equity.Equity.ShareApplicationMoneyPendingAllotment + type: String + displayName: Share Application Money Pending Allotment + required: false + - value: Equity.Equity.ShareCapital + type: String + displayName: Share Capital + required: false + - value: Equity.Equity.Funds + type: String + displayName: Funds + required: false + required: true + required: true + Sage Business Cloud Accounting: + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + name: + type: String + displayName: Name + description: Name of the account + required: true + validation: + warnings: [] + information: + - field: Name + details: Should not be longer than 200 characters. + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + validation: + warnings: [] + information: + - field: NominalCode + details: Should be a number between 1 and 99999999. + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + options: + - value: SALES + type: String + displayName: Sales + required: false + - value: OTHER_INCOME + type: String + displayName: Other Income + required: false + - value: DIRECT_EXPENSES + type: String + displayName: Direct Expenses + required: false + - value: OVERHEADS + type: String + displayName: Overheads + required: false + - value: DEPRECIATION + type: String + displayName: Depreciation + required: false + - value: CURRENT_ASSETS + type: String + displayName: Current Assets + required: false + - value: FIXED_ASSETS + type: String + displayName: Fixed Assets + required: false + - value: FUTURE_ASSETS + type: String + displayName: Future Assets + required: false + - value: BANK + type: String + displayName: Bank + required: false + - value: CURRENT_LIABILITY + type: String + displayName: Current Liability + required: false + - value: FUTURE_LIABILITY + type: String + displayName: Future Liability + required: false + - value: EQUITY + type: String + displayName: Equity + required: false + - value: LINE_OF_CREDIT + type: String + displayName: Credit Card / Loan + required: false + required: true + required: true + Sage Intacct: + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + validation: + warnings: + - field: NominalCode + details: Must be unique within the entity. + - field: NominalCode + details: 'Must be at most 24 characters in length, although restrictions may vary between entities.' + information: [] + name: + type: String + displayName: Name + description: Name of the account + required: true + status: + type: String + displayName: Account Status + description: The status of the account + options: + - value: Active + type: String + displayName: Active + required: false + - value: Archived + type: String + displayName: Archived + required: false + required: true + type: + type: String + displayName: Account Type + description: 'The type, or base category, of the account' + options: + - value: Asset + type: String + displayName: Asset + required: false + - value: Equity + type: String + displayName: Equity + required: false + - value: Expense + type: String + displayName: Expense + required: false + - value: Income + type: String + displayName: Income + required: false + - value: Liability + type: String + displayName: Liability + required: false + required: true + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + required: true + validation: + warnings: [] + information: + - field: FullyQualifiedCategory + details: 'Any category that is part of the hierarchy of one of: ''Assets'', ''Equity'', ''Liabilities'', ''Total Expenses'' and ''Total Income'' is permitted.' + required: true + Sandbox: + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + name: + type: String + displayName: Name + description: Name of the account + required: true + description: + type: String + displayName: Description + description: Description of the account + required: true + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + required: true + fullyQualifiedName: + type: String + displayName: Fully Qualified Name + description: The full name of the account e.g. Liability.Current.VAT or Income.Revenue.Sales + required: true + currency: + type: String + displayName: Currency + description: The currency of the account + required: true + currentBalance: + type: Number + displayName: Current Balance + description: The current balance in the account + required: true + type: + type: String + displayName: Account Type + description: 'The type, or base category, of the account' + required: true + status: + type: String + displayName: Account Status + description: The status of the account + required: true + isBankAccount: + type: Boolean + displayName: Is Bank Account? + description: Confirms whether the nominal account represents a bank account or not + required: true + validDatatypeLinks: + type: Array + displayName: Valid Datatype Links + description: Describes which fields on other data types are valid links to this account in the originating system + properties: + property: + type: String + displayName: Property + description: The field on the source data type that other data types can link to + required: true + links: + type: Array + displayName: Links + description: 'A collection of absolute names of fields from other data types, e.g. Invoice.LineItems.AccountRef.Id' + required: true + required: true + metadata: + type: Object + displayName: Metadata + description: Miscellaneous data about the item + properties: + isDeleted: + type: Boolean + displayName: IsDeleted + description: A boolean to indicate whether the object has been deleted + required: true + required: true + required: true + Xero: + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: Identifier for the nominal account. + required: true + validation: + warnings: + - field: NominalCode + details: Max length of 10 characters. + information: [] + name: + type: String + displayName: Name + description: Name of account as it appears in the chart of accounts or general ledger. + required: true + validation: + warnings: [] + information: + - field: Name + details: Payments are enabled to this account if the name ends in .PaymentsEnabled. + description: + type: String + displayName: Description + description: Description for the nominal account. + required: false + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: Account type and category for nominal account. + options: + - value: Asset.Current + type: String + displayName: Current Asset + required: false + - value: Asset.Fixed + type: String + displayName: Fixed Asset + required: false + - value: Asset.Inventory + type: String + displayName: Inventory + required: false + - value: Asset.NonCurrent + type: String + displayName: Non-current Asset + required: false + - value: Asset.Prepayment + type: String + displayName: Prepayment + required: false + - value: Expense.DirectCosts + type: String + displayName: Direct Costs + required: false + - value: Expense.Expense + type: String + displayName: Expense + required: false + - value: Expense.Overhead + type: String + displayName: Overhead + required: false + - value: Expense.Superannuation + type: String + displayName: Superannuation + required: false + - value: Expense.Wages + type: String + displayName: Wages + required: false + - value: Income.Sales + type: String + displayName: Sales + required: false + - value: Income.Revenue + type: String + displayName: Revenue + required: false + - value: Income.Other + type: String + displayName: Other Income + required: false + - value: Liability.Current + type: String + displayName: Current Liability + required: false + - value: Liability.Depreciation + type: String + displayName: Depreciation + required: false + - value: Liability.Liability + type: String + displayName: Liability + required: false + - value: Liability.NonCurrent + type: String + displayName: Non Current Liability + required: false + - value: Liability.PayAsYouGo + type: String + displayName: Pay As You Go Liability + required: false + - value: Liability.Superannuation + type: String + displayName: Superannuation Liability + required: false + - value: Liability.WagesPayable + type: String + displayName: Wages Payable Liability + required: false + - value: Equity.Equity + type: String + displayName: Equity + required: false + required: true + required: true + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + operationId: get-create-chartOfAccounts-model + description: |- + The *Get create account model* endpoint returns the expected data for the request payload when creating an [account](https://docs.codat.io/sync-for-expenses-api#/schemas/Account) for a given company and integration. + + [Accounts](https://docs.codat.io/sync-for-expenses-api#/schemas/Account) are the categories a business uses to record accounting transactions. + + **Integration-specific behavior** + + See the *response examples* for integration-specific indicative models. + '/companies/{companyId}/connections/{connectionId}/push/bankAccounts': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/connectionId' + post: + tags: + - Bank accounts + parameters: + - $ref: '#/components/parameters/timeoutInMinutes' + - $ref: '#/components/parameters/allowSyncOnPushComplete' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BankAccount' + examples: + QuickBooks Online: + value: + accountName: GBP Bank Account + accountType: Debit + accountNumber: '12345678' + currency: GBP + status: Active + Xero: + value: + accountName: Xero GBP Bank Account + accountType: Debit + sortCode: '445566' + accountNumber: '12345678' + currency: GBP + status: Active + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CreateBankAccountResponse' + examples: {} + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + summary: Create bank account + description: "The *Create bank account* endpoint creates a new [bank account](https://docs.codat.io/sync-for-expenses-api#/schemas/BankAccount) for a given company's connection.\r\n\r\n[Bank accounts](https://docs.codat.io/sync-for-expenses-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.\r\n\r\n**Integration-specific behavior**\r\n\r\nRequired data may vary by integration. To see what data to post, first call [Get create/update bank account model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-bankAccounts-model)." + operationId: create-bank-account + '/companies/{companyId}/connections/{connectionId}/options/bankAccounts': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/connectionId' + get: + summary: Get create bank account model + tags: + - Bank accounts + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/PushOption' + examples: + Dynamics 365 Business Central: + value: + type: Object + displayName: Bank Account + description: An account that bank transactions may be recorded against + properties: + accountName: + type: String + displayName: Name + description: The name of the bank account in the originating system + required: true + validation: + warnings: [] + information: + - field: AccountName + details: 'Needs to be of the format ''{No.}-{Name}''' + currency: + type: String + displayName: Currency + description: The currency of the bank account + required: true + accountNumber: + type: String + displayName: Account Number + description: The account number for the bank account + required: false + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: false + validation: + warnings: [] + information: + - field: NominalCode + details: Bank Account Posting Group with Nominal Account must exist + sortCode: + type: String + displayName: Sort Code + description: The sort code for the bank account + required: false + validation: + warnings: [] + information: + - field: SortCode + details: Must have a length between 0 and 20 characters + iBan: + type: String + displayName: IBAN + description: The international bank account number of the account. Often used when making or receiving international payments + required: false + overdraftLimit: + type: Number + displayName: Overdraft Limit + description: The pre-arranged overdraft limit of the account + required: false + validation: + warnings: [] + information: + - field: OverdraftLimit + details: Default value is 0 + required: true + Exact (Netherlands): + value: + type: Object + displayName: Bank Account + description: An account that bank transactions may be recorded against + properties: + accountName: + type: String + displayName: Name + description: The name of the bank account in the originating system + required: true + accountNumber: + type: String + displayName: Account Number + description: The account number for the bank account + required: true + validation: + warnings: + - field: AccountNumber + details: Should not exceed the maximum length of 14 characters if the specified currency is GBP. + information: [] + sortCode: + type: String + displayName: Sort Code + description: The sort code for the bank account + required: false + validation: + warnings: + - field: SortCode + details: Must be 6 characters long if the specified currency is GBP. + - field: SortCode + details: Must be provided if the specified currency is GBP. + information: [] + currency: + type: String + displayName: Currency + description: The currency of the bank account + required: false + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: false + required: true + Exact (UK): + value: + type: Object + displayName: Bank Account + description: An account that bank transactions may be recorded against + properties: + accountName: + type: String + displayName: Name + description: The name of the bank account in the originating system + required: true + accountNumber: + type: String + displayName: Account Number + description: The account number for the bank account + required: true + validation: + warnings: + - field: AccountNumber + details: Should not exceed the maximum length of 14 characters if the specified currency is GBP. information: [] sortCode: type: String @@ -2130,211 +6692,16 @@ paths: required: true metadata: type: Object - displayName: Metadata - description: Miscellaneous data about the item - properties: - isDeleted: - type: Boolean - displayName: IsDeleted - description: A boolean to indicate whether the object has been deleted - required: true - required: true - required: true - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - operationId: get-create-bankAccounts-model - description: "The *Get create/update bank account model* endpoint returns the expected data for the request payload when creating and updating a [bank account](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) for a given company and integration.\r\n\r\n[Bank accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.\r\n\r\n**Integration-specific behavior**\r\n\r\nSee the *response examples* for integration-specific indicative models.\r\n" - '/companies/{companyId}/connections/{connectionId}/push/bankAccounts': - parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - post: - x-internal: true - tags: - - Bank accounts - summary: Create bank account - parameters: - - $ref: '#/components/parameters/timeoutInMinutes' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/BankAccounts/allOf/0/properties/results/items/definitions/bankAccountPrototype' - examples: {} - responses: - '200': - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/BankAccounts/allOf/0/properties/results/items/definitions/bankAccountCreateResponse' - examples: {} - '400': - $ref: '#/components/responses/BadRequest' - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - description: "The *Create bank account* endpoint creates a new [bank account](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) for a given company's connection.\r\n\r\n[Bank accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.\r\n\r\n**Integration-specific behavior**\r\n\r\nRequired data may vary by integration. To see what data to post, first call [Get create/update bank account model](https://docs.codat.io/bank-feeds-api#/operations/get-create-update-bankAccounts-model)." - operationId: create-bank-account - '/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/batch': - parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - post: - tags: - - Source accounts - summary: Create source accounts - description: |- - The _Batch create source accounts_ endpoint allows you to create multiple representations of your SMB's bank accounts within Codat's domain. The company can then map the source account to an existing or new target account in their accounting software. - - > ### Versioning - > If you are integrating the Bank Feeds solution with Codat after August 1, 2024, please use the v2 version of the API, as detailed in the schema below. For integrations completed before August 1, 2024, select the v1 version from the schema dropdown below. - operationId: create-batch-source-account - x-speakeasy-name-override: create-batch - requestBody: - content: - application/json: - schema: - oneOf: - - type: array - items: - $ref: '#/components/schemas/SourceAccountV2/definitions/sourceAccountV2Prototype' - - type: array - items: - $ref: '#/components/schemas/SourceAccount/definitions/sourceAccountPrototype' - responses: - '201': - description: Success - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: '#/components/schemas/SourceAccountV2BatchCreateResponse' - - $ref: '#/components/schemas/SourceAccountBatchCreateResponse' - '207': - description: Multi-Status - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: '#/components/schemas/SourceAccountV2BatchCreateResponse' - - $ref: '#/components/schemas/SourceAccountBatchCreateResponse' - - $ref: '#/components/schemas/SourceAccountBatchErrorResponse' - '400': - $ref: '#/components/responses/BadRequest' - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '409': - description: Conflict - content: - application/json: - schema: - type: array - items: - oneOf: - - $ref: '#/components/schemas/SourceAccountV2BatchCreateResponse' - - $ref: '#/components/schemas/SourceAccountBatchCreateResponse' - - $ref: '#/components/schemas/SourceAccountBatchErrorResponse' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts': - parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - post: - tags: - - Source accounts - summary: Create single source account - description: |- - The _Create Source Account_ endpoint allows you to create a representation of a bank account within Codat's domain. The company can then map the source account to an existing or new target account in their accounting software. - - > ### Versioning - > If you are integrating the Bank Feeds solution with Codat after August 1, 2024, please use the v2 version of the API, as detailed in the schema below. For integrations completed before August 1, 2024, select the v1 version from the schema dropdown below. - operationId: create-source-account - requestBody: - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/SourceAccountV2/definitions/sourceAccountV2Prototype' - - $ref: '#/components/schemas/SourceAccount/definitions/sourceAccountPrototype' - examples: - Version 2: - value: - id: acc-001 - accountName: account-081 - accountType: checking - accountNumber: '12345670' - routingInfo: - bankCode: 021001088 - type: bankcode - currency: GBP - balance: 99.99 - accountInfo: - description: account description 1 - nickname: account 123 - accountOpenDate: '2023-05-06' - availableBalance: 10 - modifiedDate: '2024-08-02T00:00:00.000Z' - Version 1: - value: - id: acc-002 - accountName: account-081 - sortCode: '123456' - accountType: Credit - accountNumber: '12345670' - currency: GBP - balance: 99.99 - modifiedDate: '2023-01-09T14:14:14.1057478Z' - responses: - '200': - description: Success - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/SourceAccountV2' - - $ref: '#/components/schemas/SourceAccount' - examples: {} - '400': - $ref: '#/components/responses/BadRequest' + displayName: Metadata + description: Miscellaneous data about the item + properties: + isDeleted: + type: Boolean + displayName: IsDeleted + description: A boolean to indicate whether the object has been deleted + required: true + required: true + required: true '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2349,159 +6716,1251 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' + operationId: get-create-bankAccounts-model + description: "The *Get create/update bank account model* endpoint returns the expected data for the request payload when creating and updating a [bank account](https://docs.codat.io/sync-for-expenses-api#/schemas/BankAccount) for a given company and integration.\r\n\r\n[Bank accounts](https://docs.codat.io/sync-for-expenses-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.\r\n\r\n**Integration-specific behavior**\r\n\r\nSee the *response examples* for integration-specific indicative models.\r\n" + '/companies/{companyId}/data/customers': + parameters: + - $ref: '#/components/parameters/companyId' get: tags: - - Source accounts - summary: List source accounts - description: "\uFEFF\x54\x68\x65\x20\x5F\x4C\x69\x73\x74\x20\x73\x6F\x75\x72\x63\x65\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x5F\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x72\x65\x74\x75\x72\x6E\x73\x20\x61\x20\x6C\x69\x73\x74\x20\x6F\x66\x20\x5B\x73\x6F\x75\x72\x63\x65\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x62\x61\x6E\x6B\x2D\x66\x65\x65\x64\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x42\x61\x6E\x6B\x46\x65\x65\x64\x41\x63\x63\x6F\x75\x6E\x74\x29\x20\x66\x6F\x72\x20\x61\x20\x67\x69\x76\x65\x6E\x20\x63\x6F\x6D\x70\x61\x6E\x79\x27\x73\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x2E\n\n\x5B\x53\x6F\x75\x72\x63\x65\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x62\x61\x6E\x6B\x2D\x66\x65\x65\x64\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x42\x61\x6E\x6B\x46\x65\x65\x64\x41\x63\x63\x6F\x75\x6E\x74\x29\x20\x61\x72\x65\x20\x74\x68\x65\x20\x62\x61\x6E\x6B\x27\x73\x20\x62\x61\x6E\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x77\x69\x74\x68\x69\x6E\x20\x43\x6F\x64\x61\x74\x27\x73\x20\x64\x6F\x6D\x61\x69\x6E\x20\x66\x72\x6F\x6D\x20\x77\x68\x69\x63\x68\x20\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E\x73\x20\x61\x72\x65\x20\x73\x79\x6E\x63\x65\x64\x20\x69\x6E\x74\x6F\x20\x74\x68\x65\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x70\x6C\x61\x74\x66\x6F\x72\x6D\x2E\n\n\x3E\x20\x23\x23\x23\x20\x56\x65\x72\x73\x69\x6F\x6E\x69\x6E\x67\n\x3E\x20\x49\x66\x20\x79\x6F\x75\x20\x61\x72\x65\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6E\x67\x20\x74\x68\x65\x20\x42\x61\x6E\x6B\x20\x46\x65\x65\x64\x73\x20\x73\x6F\x6C\x75\x74\x69\x6F\x6E\x20\x77\x69\x74\x68\x20\x43\x6F\x64\x61\x74\x20\x61\x66\x74\x65\x72\x20\x41\x75\x67\x75\x73\x74\x20\x31\x2C\x20\x32\x30\x32\x34\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x74\x68\x65\x20\x76\x32\x20\x76\x65\x72\x73\x69\x6F\x6E\x20\x6F\x66\x20\x74\x68\x65\x20\x41\x50\x49\x2C\x20\x61\x73\x20\x64\x65\x74\x61\x69\x6C\x65\x64\x20\x69\x6E\x20\x74\x68\x65\x20\x73\x63\x68\x65\x6D\x61\x20\x62\x65\x6C\x6F\x77\x2E\x20\x46\x6F\x72\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x20\x63\x6F\x6D\x70\x6C\x65\x74\x65\x64\x20\x62\x65\x66\x6F\x72\x65\x20\x41\x75\x67\x75\x73\x74\x20\x31\x2C\x20\x32\x30\x32\x34\x2C\x20\x73\x65\x6C\x65\x63\x74\x20\x74\x68\x65\x20\x76\x31\x20\x76\x65\x72\x73\x69\x6F\x6E\x20\x66\x72\x6F\x6D\x20\x74\x68\x65\x20\x73\x63\x68\x65\x6D\x61\x20\x64\x72\x6F\x70\x64\x6F\x77\x6E\x20\x62\x65\x6C\x6F\x77\x2E" - operationId: list-source-accounts - responses: - '200': - description: Success - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/SourceAccountV2/definitions/sourceAccounts' - - $ref: '#/components/schemas/SourceAccount/definitions/sourceAccounts' - examples: {} - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/{accountId}': - patch: - tags: - - Source accounts - summary: Update source account - description: "\uFEFF\x54\x68\x65\x20\x5F\x55\x70\x64\x61\x74\x65\x20\x73\x6F\x75\x72\x63\x65\x20\x61\x63\x63\x6F\x75\x6E\x74\x5F\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x75\x70\x64\x61\x74\x65\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x73\x6F\x75\x72\x63\x65\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x66\x6F\x72\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x64\x61\x74\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x20\x74\x6F\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2E\n\n\x23\x23\x23\x20\x54\x69\x70\x73\x20\x61\x6E\x64\x20\x70\x69\x74\x66\x61\x6C\x6C\x73\n\n\x2A\x20\x54\x68\x69\x73\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x6D\x61\x6B\x65\x73\x20\x69\x74\x20\x70\x6F\x73\x73\x69\x62\x6C\x65\x20\x74\x6F\x20\x75\x70\x64\x61\x74\x65\x20\x74\x68\x65\x20\x60\x61\x63\x63\x6F\x75\x6E\x74\x4E\x61\x6D\x65\x60\x2C\x20\x60\x73\x74\x61\x74\x75\x73\x60\x2C\x20\x61\x6E\x64\x20\x60\x62\x61\x6C\x61\x6E\x63\x65\x60\x20\x66\x69\x65\x6C\x64\x73\x2E\n\x20\x20\x20\x20\x2A\x20\x54\x68\x65\x20\x60\x73\x74\x61\x74\x75\x73\x60\x20\x66\x69\x65\x6C\x64\x20\x63\x61\x6E\x20\x6F\x6E\x6C\x79\x20\x62\x65\x20\x75\x70\x64\x61\x74\x65\x64\x20\x74\x6F\x20\x27\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x27\x2E\n\x20\x20\x20\x20\x2A\x20\x54\x68\x65\x20\x60\x62\x61\x6C\x61\x6E\x63\x65\x60\x20\x66\x69\x65\x6C\x64\x20\x63\x61\x6E\x20\x6F\x6E\x6C\x79\x20\x62\x65\x20\x75\x70\x64\x61\x74\x65\x64\x20\x6F\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x20\x74\x68\x61\x74\x20\x61\x72\x65\x20\x2A\x2A\x6E\x6F\x74\x2A\x2A\x20\x27\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x27\x2E\n\x2A\x20\x55\x70\x64\x61\x74\x65\x73\x20\x6D\x61\x64\x65\x20\x68\x65\x72\x65\x20\x61\x70\x70\x6C\x79\x20\x65\x78\x63\x6C\x75\x73\x69\x76\x65\x6C\x79\x20\x74\x6F\x20\x73\x6F\x75\x72\x63\x65\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x20\x61\x6E\x64\x20\x77\x69\x6C\x6C\x20\x6E\x6F\x74\x20\x61\x66\x66\x65\x63\x74\x20\x74\x61\x72\x67\x65\x74\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x20\x69\x6E\x20\x74\x68\x65\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x73\x6F\x66\x74\x77\x61\x72\x65\x2E" - operationId: update-source-account - parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - - $ref: '#/components/parameters/accountId' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SourceAccount' - examples: {} - responses: - '200': - description: Success - content: - application/json: - x-speakeasy-usage-example: true - schema: - $ref: '#/components/schemas/SourceAccount' - examples: {} - '400': - $ref: '#/components/responses/BadRequest' - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - delete: - tags: - - Source accounts - summary: Delete source account - description: | - The _Delete source account_ endpoint enables you to remove a source account. - - Removing a source account will also remove any mapping between the source bank feed bank accounts and the target bankfeed bank account. - operationId: delete-source-account - parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - - $ref: '#/components/parameters/accountId' - responses: - '204': - description: No Content - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/credentials': - post: - tags: - - Source accounts - summary: Generate source account credentials - description: "\uFEFF\x54\x68\x65\x20\x5F\x47\x65\x6E\x65\x72\x61\x74\x65\x20\x62\x61\x6E\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x63\x72\x65\x64\x65\x6E\x74\x69\x61\x6C\x73\x5F\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x63\x61\x6E\x20\x62\x65\x20\x75\x73\x65\x64\x20\x74\x6F\x20\x67\x65\x6E\x65\x72\x61\x74\x65\x20\x63\x72\x65\x64\x65\x6E\x74\x69\x61\x6C\x73\x20\x66\x6F\x72\x20\x51\x75\x69\x63\x6B\x42\x6F\x6F\x6B\x73\x20\x4F\x6E\x6C\x69\x6E\x65\x20\x74\x6F\x20\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x20\x74\x68\x65\x20\x42\x61\x6E\x6B\x20\x46\x65\x65\x64\x20\x69\x6E\x20\x74\x68\x65\x20\x51\x42\x4F\x20\x70\x6F\x72\x74\x61\x6C\x2E\x20\x45\x61\x63\x68\x20\x74\x69\x6D\x65\x20\x74\x68\x69\x73\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x69\x73\x20\x63\x61\x6C\x6C\x65\x64\x2C\x20\x61\x20\x6E\x65\x77\x20\x73\x65\x74\x20\x6F\x66\x20\x63\x72\x65\x64\x65\x6E\x74\x69\x61\x6C\x73\x20\x77\x69\x6C\x6C\x20\x62\x65\x20\x67\x65\x6E\x65\x72\x61\x74\x65\x64\x2E\n\n\x54\x68\x65\x20\x6F\x6C\x64\x20\x63\x72\x65\x64\x65\x6E\x74\x69\x61\x6C\x73\x20\x77\x69\x6C\x6C\x20\x73\x74\x69\x6C\x6C\x20\x62\x65\x20\x76\x61\x6C\x69\x64\x20\x75\x6E\x74\x69\x6C\x20\x74\x68\x65\x20\x72\x65\x76\x6F\x6B\x65\x20\x63\x72\x65\x64\x65\x6E\x74\x69\x61\x6C\x73\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x69\x73\x20\x75\x73\x65\x64\x2C\x20\x77\x68\x69\x63\x68\x20\x77\x69\x6C\x6C\x20\x72\x65\x76\x6F\x6B\x65\x20\x61\x6C\x6C\x20\x63\x72\x65\x64\x65\x6E\x74\x69\x61\x6C\x73\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x65\x64\x20\x74\x6F\x20\x74\x68\x65\x20\x64\x61\x74\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x2E\n\n\x3E\x20\x2A\x2A\x46\x6F\x72\x20\x51\x75\x69\x63\x6B\x42\x6F\x6F\x6B\x73\x20\x4F\x6E\x6C\x69\x6E\x65\x20\x6F\x6E\x6C\x79\x2A\x2A\n\x3E\n\x3E\x20\x4F\x6E\x6C\x79\x20\x63\x61\x6C\x6C\x20\x74\x68\x69\x73\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x77\x68\x65\x6E\x20\x6F\x6E\x62\x6F\x61\x72\x64\x69\x6E\x67\x20\x53\x4D\x42\x73\x20\x74\x68\x61\x74\x20\x75\x73\x65\x20\x20\x51\x75\x69\x63\x6B\x42\x6F\x6F\x6B\x73\x20\x4F\x6E\x6C\x69\x6E\x65\x2E" - operationId: generate-credentials + - Customers + summary: List customers parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - requestBody: - required: true - content: - application/json: {} + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + - $ref: '#/components/parameters/query' + - $ref: '#/components/parameters/orderBy' responses: '200': description: Success content: application/json: schema: - $ref: '#/components/schemas/BankAccountCredentials' - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - delete: - tags: - - Source accounts - summary: Delete all source account credentials - x-speakeasy-name-override: delete-credentials - description: |- - The _Delete Bank Account Credentials_ endpoint serves as a comprehensive mechanism for revoking all existing authorization credentials that a company employs to establish its Bank Feed connection. - - In cases where multiple credential sets have been generated, a single API call to this endpoint revokes all of them. - operationId: delete-bank-feed-credentials - parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - responses: - '204': - description: No Content + $ref: '#/components/schemas/Customers' + examples: + Clear Books: + value: + results: + - id: c8180244-74ac-40cf-a5df-6d83661c44d7 + customerName: Arjun Kuvalis + contactName: Werner Langworth + emailAddress: Arjun34@hotmail.com + defaultCurrency: GBP + phone: 014605 64820 + addresses: + - type: Delivery + line1: Suite 214 + line2: 8439 Lueilwitz Passage + city: Fernandohaven + region: Northern Ireland + country: United Kingdom + postalCode: JG04 7PV + - type: Delivery + line1: Suite 096 + line2: 864 Halie Course + city: Juliochester + region: England + country: United Kingdom + postalCode: DZ8 4BF + - type: Delivery + line1: Suite 001 + line2: 416 Stokes Fords + city: Naderborough + region: Wales + country: United Kingdom + postalCode: XG25 0XX + contacts: + - name: Werner Langworth + email: Werner_Langworth@hotmail.com + phone: [] + address: + type: Delivery + line1: Apt. 145 + line2: 317 Williamson Freeway + city: Hortenseville + region: Scotland + country: United Kingdom + postalCode: CV4 2HR + status: Active + - name: Belle Glover + email: Belle51@yahoo.com + phone: [] + address: + type: Delivery + line1: Suite 075 + line2: 9921 Dickens Walk + city: South Ali + region: Scotland + country: United Kingdom + postalCode: TI04 4OO + status: Active + registrationNumber: NI7JEJVM + taxNumber: '7505220209.583549' + status: Active + modifiedDate: '2023-04-26T12:38:16Z' + sourceModifiedDate: '2022-07-03T01:27:00' + metadata: + isDeleted: false + - id: 6d162ee4-47b4-46c6-a2e6-aa9edd0fe6b0 + customerName: 'Breitenberg, Emard and Schiller' + contactName: Miguel Hahn + emailAddress: contact@BreitenbergEmardandSchiller.biz + defaultCurrency: GBP + phone: 0800 445 6957 + addresses: + - type: Billing + line1: Apt. 184 + line2: 60578 Louie Springs + city: East Khalid + region: Wales + country: United Kingdom + postalCode: XW89 7NT + contacts: + - name: Miguel Hahn + email: Miguel.Hahn@gmail.com + phone: + - number: 018555 09614 + type: Landline + address: + type: Delivery + line1: Suite 400 + line2: 21930 Milan Lane + city: Reingerton + region: Wales + country: United Kingdom + postalCode: QG10 2DL + status: Active + registrationNumber: KME0AMIL + taxNumber: '8560920952.553111' + status: Archived + modifiedDate: '2023-04-26T12:38:16Z' + sourceModifiedDate: '2022-12-03T11:05:01' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 20 + _links: + current: + href: /companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/customers?page=1&pageSize=2 + self: + href: /companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/customers + next: + href: /companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/customers?page=2&pageSize=2 + Dynamics 365 Business Central: + value: + results: + - id: 0e2f7751-7696-ed11-bff5-6045bd0d2ad6 + customerName: '' + contactName: '' + emailAddress: '' + defaultCurrency: GBP + phone: '' + addresses: + - type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: '' + postalCode: '' + contacts: + - name: '' + email: '' + phone: [] + address: + type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: '' + postalCode: '' + status: Active + taxNumber: '' + status: Active + modifiedDate: '2023-03-27T14:21:25Z' + sourceModifiedDate: '2023-01-17T14:50:54Z' + metadata: + isDeleted: false + - id: 0ef95175-48c4-eb11-9f0a-0022481b4343 + customerName: '' + contactName: '' + emailAddress: '' + defaultCurrency: GBP + phone: '' + addresses: + - type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: GB + postalCode: '' + contacts: + - name: '' + email: '' + phone: [] + address: + type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: GB + postalCode: '' + status: Active + taxNumber: '' + status: Active + modifiedDate: '2023-03-27T14:21:25Z' + sourceModifiedDate: '2021-06-03T08:48:36Z' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 42 + _links: + current: + href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/data/customers?page=1&pageSize=2 + self: + href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/data/customers + next: + href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/data/customers?page=2&pageSize=2 + Exact (Netherlands): + value: + results: + - id: 555f8251-c65a-433a-a813-5dbe04321d1e + customerName: Ab Netherlands + defaultCurrency: EUR + addresses: + - type: Billing + country: NL + contacts: [] + status: Active + modifiedDate: '2022-10-26T13:32:05Z' + sourceModifiedDate: '2021-06-14T15:26:37Z' + - id: 9fd1f78e-67aa-4af7-8a10-df1fc5fb5841 + customerName: anna test 2 + defaultCurrency: EUR + addresses: + - type: Billing + country: NL + contacts: [] + status: Active + modifiedDate: '2022-10-26T13:32:05Z' + sourceModifiedDate: '2022-05-24T11:53:21Z' + pageNumber: 1 + pageSize: 2 + totalResults: 71 + _links: + current: + href: /companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/customers?page=1&pageSize=2 + self: + href: /companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/customers + next: + href: /companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/customers?page=2&pageSize=2 + Exact (UK): + value: + results: + - id: 5f20075a-a28e-434d-81a6-2db0dc170e87 + customerName: Abdi 99 + emailAddress: email@codat.io + defaultCurrency: GBP + addresses: + - type: Billing + line1: Ink Rooms + city: London + country: GB + postalCode: WC1X 0BE + contacts: [] + registrationNumber: '123456789' + taxNumber: GB339 0727 47 + status: Active + modifiedDate: '2022-10-26T13:33:08Z' + sourceModifiedDate: '2020-02-26T11:23:50Z' + - id: 1d9dc1a7-92d6-441b-93fd-42c9fb321b1c + customerName: Abdulbasit Al-haj + contactName: abeee + emailAddress: a.alhaj@codat.io + defaultCurrency: GBP + addresses: + - type: Billing + country: GB + contacts: + - name: abeee + phone: [] + address: + type: Unknown + line1: '' + country: 'GB ' + status: Active + modifiedDate: '2020-02-24T12:00:51.027Z' + status: Active + modifiedDate: '2022-10-26T13:33:08Z' + sourceModifiedDate: '2020-02-24T12:00:50Z' + pageNumber: 1 + pageSize: 2 + totalResults: 53 + _links: + current: + href: /companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/customers?page=1&pageSize=2 + self: + href: /companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/customers + next: + href: /companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/customers?page=2&pageSize=2 + FreeAgent: + value: + results: + - id: '11526230' + customerName: '-' + contactName: Test 1 + addresses: + - type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + contacts: + - name: Test 1 + phone: [] + address: + type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + status: Unknown + status: Active + modifiedDate: '2023-04-25T14:19:12Z' + sourceModifiedDate: '2023-04-17T06:02:46Z' + metadata: + isDeleted: false + - id: '9677150' + customerName: '-' + contactName: Test 1 + addresses: + - type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + contacts: + - name: Test 1 + phone: [] + address: + type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + status: Unknown + status: Active + modifiedDate: '2023-04-25T14:19:12Z' + sourceModifiedDate: '2023-04-24T06:19:23Z' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 159 + _links: + current: + href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/data/customers?page=1&pageSize=2 + self: + href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/data/customers + next: + href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/data/customers?page=2&pageSize=2 + FreshBooks: + value: + results: + - id: '634509' + customerName: A test customer 14 (updated) + contactName: test person name + emailAddress: test14@example.com + defaultCurrency: GBP + phone: 01876 541245 + addresses: + - type: Billing + line1: Line 1 + line2: Line 2 + city: Some city + region: A region + country: Country 1 + postalCode: SW1 2JQ + contacts: + - name: test person1 + email: test14A@example.com + phone: + - number: '24681012' + type: Primary + - number: '121086420' + type: Unknown + status: Active + - name: test person2 + email: test14B@example.com + phone: + - number: 1234 56789 + type: Primary + - number: 9876 54321 + type: Unknown + status: Active + - name: test person name + email: test14@example.com + phone: + - number: 01876 541245 + type: Unknown + status: Active + status: Active + modifiedDate: '2023-03-24T16:07:23Z' + sourceModifiedDate: '2022-05-18T09:23:56' + metadata: + isDeleted: false + - id: '634486' + customerName: A test customer name 2 + contactName: test person name + emailAddress: test8@example.com + defaultCurrency: GBP + phone: 01876 541245 + addresses: + - type: Billing + line1: Line 1 + line2: Line 2 + city: Some city + region: A region + country: Country 1 + postalCode: SW1 2JQ + contacts: + - name: test person1 + email: test9@example.com + phone: + - number: '24681012' + type: Primary + - number: '121086420' + type: Unknown + status: Active + - name: test person2 + email: test10@example.com + phone: + - number: '123456789' + type: Primary + - number: '987654321' + type: Unknown + status: Active + - name: test person name + email: test8@example.com + phone: + - number: 01876 541245 + type: Unknown + status: Active + status: Active + modifiedDate: '2023-03-24T16:07:23Z' + sourceModifiedDate: '2022-05-11T11:39:58' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 39 + _links: + current: + href: /companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/customers?page=1&pageSize=2 + self: + href: /companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/customers + next: + href: /companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/customers?page=2&pageSize=2 + KashFlow: + value: + results: + - id: '92227673' + customerName: Chekko Customer Test 01 + contactName: '' + emailAddress: '' + phone: '' + addresses: [] + contacts: + - name: '' + email: '' + phone: [] + status: Active + taxNumber: '' + status: Active + modifiedDate: '2022-09-30T10:29:15Z' + sourceModifiedDate: '0001-01-01T00:00:00' + - id: '88459410' + customerName: Diogo Sousa + contactName: Mr Diogo Sousa + emailAddress: diogomail@mail.com + phone: '123123123' + addresses: + - type: Billing + line1: Billing Address + line2: Billing line 2 Billing line 3 + city: Billing line 4 + country: United Kingdom + postalCode: '123321' + - type: Delivery + line1: Delivery Address + line2: Delivery line2 Delivery line3 + city: Delivery line4 + country: United Kingdom + postalCode: '123321' + contacts: + - name: Mr Diogo Sousa + email: diogomail@mail.com + phone: + - number: '123123123' + type: Landline + - number: '321321321' + type: Mobile + address: + type: Billing + line1: Billing Address + line2: Billing line 2 Billing line 3 + city: Billing line 4 + country: United Kingdom + postalCode: '123321' + status: Active + - name: Mr Diogo Sousa + phone: [] + address: + type: Delivery + line1: Delivery Address + line2: Delivery line2 Delivery line3 + city: Delivery line4 + country: United Kingdom + postalCode: '123321' + status: Active + taxNumber: '' + status: Active + modifiedDate: '2022-09-30T10:29:15Z' + sourceModifiedDate: '2021-05-04T13:22:19' + pageNumber: 1 + pageSize: 2 + totalResults: 10 + _links: + current: + href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/data/customers?page=1&pageSize=2 + self: + href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/data/customers + next: + href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/data/customers?page=2&pageSize=2 + Oracle NetSuite: + value: + results: + - id: '773' + customerName: 119 Test Customer + contactName: Mr Test Customer + defaultCurrency: GBP + addresses: [] + contacts: [] + status: Active + modifiedDate: '2023-01-30T14:48:02Z' + sourceModifiedDate: '2022-01-11T12:28:49' + - id: '172722' + customerName: 1248 European Company + contactName: European Company + defaultCurrency: GBP + addresses: [] + contacts: [] + status: Active + modifiedDate: '2023-01-30T14:48:02Z' + sourceModifiedDate: '2022-07-27T14:29:16' + pageNumber: 1 + pageSize: 2 + totalResults: 4 + _links: + current: + href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/customers?page=1&pageSize=2 + self: + href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/customers + next: + href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/customers?page=2&pageSize=2 + QuickBooks Desktop: + value: + results: + - id: 150000-933272658 + customerName: 'Abercrombie, Kristy' + contactName: Kristy Abercrombie + emailAddress: kristy@samplename.com + defaultCurrency: GBP + phone: 415-555-6579 + addresses: + - type: Delivery + line1: Kristy Abercrombie + line2: 5647 Cypress Hill Rd + city: Bayshore + region: CA + postalCode: '94326' + - type: Billing + line1: Kristy Abercrombie + line2: 5647 Cypress Hill Rd + city: Bayshore + region: CA + postalCode: '94326' + contacts: + - name: 'Abercrombie, Kristy' + email: kristy@samplename.com + phone: + - number: 415-555-6579 + type: Primary + status: Active + - name: Kristy Abercrombie + phone: [] + status: Active + - name: Steve Darcangelo + phone: [] + status: Active + status: Active + modifiedDate: '2023-04-26T09:07:55Z' + sourceModifiedDate: '2023-12-16T05:06:42' + metadata: + isDeleted: false + - id: 800000D0-1182061376 + customerName: 'Allard, Robert' + contactName: Amanda Roberts + emailAddress: rallard@myemail.com + defaultCurrency: GBP + phone: 650-555-3422 + addresses: + - type: Delivery + line1: Robert Allard + line2: 92834 Chandler St. + city: Millbrae + region: CA + postalCode: '94030' + - type: Billing + line1: Robert Allard + line2: 92834 Chandler St. + city: Millbrae + region: CA + postalCode: '94030' + contacts: + - name: 'Allard, Robert' + email: rallard@myemail.com + phone: + - number: 650-555-3422 + type: Primary + - number: 650-555-9804 + type: Fax + - number: 650-555-8349 + type: Unknown + status: Active + - name: Robert Allard + phone: [] + status: Active + - name: Rachel Fisher + phone: [] + status: Active + status: Active + modifiedDate: '2023-04-26T09:07:55Z' + sourceModifiedDate: '2023-12-16T05:06:42' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 64 + _links: + current: + href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/customers?page=1&pageSize=2 + self: + href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/customers + next: + href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/customers?page=2&pageSize=2 + QuickBooks Online: + value: + results: + - id: '9' + customerName: Abe + contactName: Abraham's Company + emailAddress: ab@email.com + defaultCurrency: GBP + addresses: [] + contacts: + - name: Abe + email: ab@email.com + phone: + - number: '01111111111' + type: Mobile + status: Active + registrationNumber: XXXX9900001 + taxNumber: XXXX9900001 + status: Active + modifiedDate: '2023-01-18T11:02:35Z' + sourceModifiedDate: '2022-12-08T15:42:59Z' + - id: '49' + customerName: adeel qbo child test + contactName: Adeel test + emailAddress: adeel@adeel.com + defaultCurrency: GBP + phone: '123456789' + addresses: + - type: Billing + line1: 4 Privet Drive + city: London + country: United Kingdom + postalCode: WD25 7LR + - type: Delivery + line1: 4 Privet Drive + city: London + country: United Kingdom + postalCode: WD25 7LR + contacts: + - name: Adeel test + email: adeel@adeel.com + phone: + - number: '123456789' + type: Primary + - number: '07546543216' + type: Mobile + address: + type: Billing + line1: 4 Privet Drive + city: London + country: United Kingdom + postalCode: WD25 7LR + status: Active + status: Active + modifiedDate: '2023-01-18T11:02:35Z' + sourceModifiedDate: '2022-08-22T09:21:09Z' + pageNumber: 1 + pageSize: 2 + totalResults: 40 + _links: + current: + href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/customers?page=1&pageSize=2 + self: + href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/customers + next: + href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/customers?page=2&pageSize=2 + QuickBooks Online Sandbox: + value: + results: + - id: '66' + customerName: Abercrombie International Group + contactName: Kristy Abercrombie + defaultCurrency: GBP + addresses: + - type: Billing + line1: 123 Main St + city: 'New York, NY' + contacts: + - name: Abercrombie International Group (deleted) + phone: [] + address: + type: Billing + line1: 123 Main St + city: 'New York, NY' + status: Archived + status: Archived + modifiedDate: '2023-04-26T09:35:56Z' + sourceModifiedDate: '2016-09-12T18:53:19Z' + metadata: + isDeleted: false + - id: '67' + customerName: Abercrombie International Group + contactName: Natalie Watts + emailAddress: n.watts@google.com + defaultCurrency: USD + addresses: + - type: Billing + - type: Delivery + contacts: + - name: Abercrombie International Group + email: n.watts@google.com + phone: [] + address: + type: Billing + status: Active + registrationNumber: XXXXVat123456 + taxNumber: XXXXVat123456 + status: Active + modifiedDate: '2023-04-26T09:35:56Z' + sourceModifiedDate: '2023-03-29T01:12:55Z' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 243 + _links: + current: + href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/customers?page=1&pageSize=2 + self: + href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/customers + next: + href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/customers?page=2&pageSize=2 + Sage 200cloud: + value: + results: + - id: A1D001 + customerName: A1 Design Services + contactName: Lee Dalkin + emailAddress: newbusinessadvice@sage.com + defaultCurrency: GBP + phone: 01742 876 234 + addresses: + - type: Delivery + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: '' + postalCode: BP12 7HT + - type: Delivery + line1: 23a Union Street + line2: '' + city: Manchester + region: '' + country: '' + postalCode: M2 6JK + - type: Billing + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: Great Britain + postalCode: BP12 7HT + contacts: + - name: Lee Dalkin + email: newbusinessadvice@sage.com + phone: + - number: 01742 876 234 + type: Landline + - number: 01742 876 235 + type: Landline + - number: 01742 876 236 + type: Fax + status: Active + - name: Malcolm Leverret + email: '' + phone: [] + status: Active + - name: Jim Thomas + email: Jim@a1designservices.co.uk + phone: + - number: 01742 876 234 + type: Landline + - number: 01742 876 235 + type: Fax + status: Active + - name: Jullian Plawsworth + email: Jullian@a1designservices.co.uk + phone: + - number: 0151 349 3939 + type: Landline + - number: 0151 349 3940 + type: Fax + status: Active + registrationNumber: '' + taxNumber: GB238 3839 38 + status: Active + modifiedDate: '2022-10-14T09:35:53Z' + sourceModifiedDate: '2022-04-27T15:17:36Z' + - id: A1D002 + customerName: A2 Design Services + contactName: Lee Dalkin + emailAddress: newbusinessadvice@sage.com + defaultCurrency: GBP + phone: 01742 876 234 + addresses: + - type: Billing + line1: 77a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: Great Britain + postalCode: BP12 7HT + contacts: + - name: Lee Dalkin + email: newbusinessadvice@sage.com + phone: + - number: 01742 876 234 + type: Landline + - number: 01742 876 235 + type: Landline + - number: 01742 876 236 + type: Fax + status: Active + - name: Malcolm Leverret + email: '' + phone: [] + status: Active + - name: Jim Thomas + email: Jim@a1designservices.co.uk + phone: + - number: 01742 876 234 + type: Landline + - number: 01742 876 235 + type: Fax + status: Active + - name: Jullian Plawsworth + email: Jullian@a1designservices.co.uk + phone: + - number: 0151 349 3939 + type: Landline + - number: 0151 349 3940 + type: Fax + status: Active + registrationNumber: '' + taxNumber: GB238 3839 40 + status: Active + modifiedDate: '2022-10-14T09:35:53Z' + sourceModifiedDate: '2020-09-23T10:28:58Z' + pageNumber: 1 + pageSize: 2 + totalResults: 43 + _links: + current: + href: /companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/customers?page=1&pageSize=2 + self: + href: /companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/customers + next: + href: /companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/customers?page=2&pageSize=2 + Sage 50 (UK): + value: + results: + - id: A1D001 + customerName: A1 Design Services + contactName: Ian Cairns + emailAddress: newbusinessadvice@sage.com + defaultCurrency: GBP + phone: 01742 876 234 + addresses: + - type: Delivery + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: GB + postalCode: BP12 7HT + - type: Delivery + line1: 23a Union Street + line2: '' + city: Manchester + region: '' + country: GB + postalCode: M2 6JK + - type: Unknown + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: GB + postalCode: BP12 7HT + contacts: [] + taxNumber: GB238 3839 38 + status: Active + modifiedDate: '2023-03-30T14:42:41Z' + sourceModifiedDate: '2022-11-25T09:43:54Z' + metadata: + isDeleted: false + - id: ABS001 + customerName: ABS Garages Ltd + contactName: Mike Hall + emailAddress: newbusinessadvice@sage.com + defaultCurrency: GBP + phone: 0191 254 5909 + addresses: + - type: Delivery + line1: Swanson Industries + line2: Dukes Industrial Estate + city: Whitley Bay + region: North Tyneside + country: GB + postalCode: NE56 4ER + - type: Delivery + line1: Unit 34 + line2: Holystone Ind Estate + city: Hebburn + region: Tyne & Wear + country: GB + postalCode: NE31 1VB + - type: Unknown + line1: Unit 34 + line2: Holystone Ind Estate + city: Hebburn + region: Tyne & Wear + country: GB + postalCode: NE31 1VB + contacts: [] + taxNumber: GB745 4584 68 + status: Active + modifiedDate: '2023-03-30T14:42:41Z' + sourceModifiedDate: '2022-11-25T09:43:54Z' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 30 + _links: + current: + href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/customers?page=1&pageSize=2 + self: + href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/customers + next: + href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/customers?page=2&pageSize=2 + Sage Business Cloud Accounting: + value: + results: + - id: 260f6a3f94a243738f2d5e08496a41a8 + customerName: 100 test name + contactName: Main Contact + emailAddress: email@codat.io + defaultCurrency: GBP + phone: contact phone number + addresses: + - type: Billing + line1: Aruba Address line 1 + line2: Aruba Address line 2 + city: Aruba City + region: Aruba Province + country: Aruba (AW) + postalCode: Aruba Post + contacts: + - phone: + - number: contact mobile number + type: Mobile + - number: contact fax number + type: Fax + status: Unknown + status: Active + modifiedDate: '2022-10-24T14:52:54Z' + sourceModifiedDate: '2021-05-10T16:31:51Z' + - id: 44a5d9461d9e4f6d90a5ace251c5cf35 + customerName: 100 test name DS + contactName: Main Contact + emailAddress: DCemail@codat.io + defaultCurrency: GBP + phone: contact phone number + addresses: + - type: Billing + line1: POST - Aruba Address line 1 + line2: POST - Aruba Address line 2 + city: POST - Aruba City + region: Aruba Province + country: Aruba (AW) + postalCode: Aruba Post + contacts: [] + status: Active + modifiedDate: '2022-10-24T14:52:54Z' + sourceModifiedDate: '2021-06-10T14:22:46Z' + pageNumber: 1 + pageSize: 2 + totalResults: 168 + _links: + current: + href: /companies/390083e2-351b-407c-a3be-55081c36c182/data/customers?page=1&pageSize=2 + self: + href: /companies/390083e2-351b-407c-a3be-55081c36c182/data/customers + next: + href: /companies/390083e2-351b-407c-a3be-55081c36c182/data/customers?page=2&pageSize=2 + Sage Intacct: + value: + results: + - id: '188' + customerName: 33Across + contactName: Yuna Conn + defaultCurrency: USD + phone: 520-393-4468 + addresses: + - type: Unknown + line1: 155 Westend Point + line2: '' + city: Albuquerque + region: NM + country: United States + postalCode: '87140' + contacts: + - name: 'Conn, Yuna' + phone: + - number: 520-393-4468 + type: Primary + address: + type: Unknown + line1: 155 Westend Point + line2: '' + city: Albuquerque + region: NM + country: United States + postalCode: '87140' + status: Unknown + taxNumber: '' + status: Active + modifiedDate: '2023-04-04T16:32:21Z' + sourceModifiedDate: '2022-09-06T12:58:27' + metadata: + isDeleted: false + - id: '324' + customerName: 3Way International Logistics + contactName: Lauri O'Heagertie + defaultCurrency: CAD + phone: 410-309-3976 + addresses: + - type: Unknown + line1: 7 Lerdahl Junction + line2: '' + city: Sparwood + region: British Columbia + country: Canada + postalCode: L4R + contacts: + - name: 'O''Heagertie, Lauri' + phone: + - number: 410-309-3976 + type: Primary + address: + type: Unknown + line1: 7 Lerdahl Junction + line2: '' + city: Sparwood + region: British Columbia + country: Canada + postalCode: L4R + status: Unknown + taxNumber: '' + status: Active + modifiedDate: '2023-04-04T16:32:21Z' + sourceModifiedDate: '2020-10-20T05:01:49' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 530 + _links: + current: + href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/customers?page=1&pageSize=2 + self: + href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/customers + next: + href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/customers?page=2&pageSize=2 + Wave: + value: + results: + - id: QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O0N1c3RvbWVyOjMyMzkzNTA4 + customerName: ABC Textiles + contactName: '' + emailAddress: c.taylor@codat.io + defaultCurrency: USD + addresses: [] + contacts: [] + status: Active + modifiedDate: '2022-11-16T18:15:30Z' + sourceModifiedDate: '2019-10-17T07:59:04Z' + - id: QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O0N1c3RvbWVyOjM3MTUzNDI2 + customerName: Coffee Cart + contactName: Coffee Carl + emailAddress: coffee.cart@example.com + defaultCurrency: GBP + phone: '0201111' + addresses: + - type: Billing + line1: 11 Coffee Lane + line2: Coffee Town + city: Coffee City + region: Hampshire + country: United Kingdom + postalCode: CC1 1CC + contacts: + - name: Coffee Carl + phone: + - number: '07733' + type: Mobile + status: Active + status: Active + modifiedDate: '2022-11-16T18:15:30Z' + sourceModifiedDate: '2020-03-17T19:12:39Z' + pageNumber: 1 + pageSize: 2 + totalResults: 10 + _links: + current: + href: /companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/customers?page=1&pageSize=2 + self: + href: /companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/customers + next: + href: /companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/customers?page=2&pageSize=2 + Xero: + value: + results: + - id: e4c9d0e2-c285-4e85-b579-6d28b180c730 + customerName: 24 Locks + emailAddress: '' + addresses: [] + contacts: [] + status: Active + modifiedDate: '2023-03-15T20:35:10Z' + sourceModifiedDate: '2023-02-17T18:03:42' + metadata: + isDeleted: false + - id: bab779bc-c5fb-42cb-a888-953e8309711c + customerName: 7-Eleven + emailAddress: '' + addresses: [] + contacts: [] + status: Active + modifiedDate: '2023-03-15T20:35:10Z' + sourceModifiedDate: '2023-02-17T18:03:42' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 48 + _links: + current: + href: /companies/5ced9667-a310-443a-a711-958d36377141/data/customers?page=1&pageSize=2 + self: + href: /companies/5ced9667-a310-443a-a711-958d36377141/data/customers + next: + href: /companies/5ced9667-a310-443a-a711-958d36377141/data/customers?page=2&pageSize=2 + Zoho Books: + value: + results: + - id: '104957000000032105' + customerName: A B + contactName: Contact (First Name) Contact (Last Name) + emailAddress: contactperson@whateveryouwantidontcare12345.com + defaultCurrency: GBP + phone: Work Phone + addresses: [] + contacts: + - name: Contact (First Name) Contact (Last Name) + email: contactperson@whateveryouwantidontcare12345.com + phone: + - number: Work Phone + type: Landline + - number: Mobile + type: Mobile + status: Active + status: Active + modifiedDate: '2022-10-03T08:40:37Z' + sourceModifiedDate: '2022-06-09T14:36:47' + - id: '104957000000054050' + customerName: 'Doe, John' + contactName: John Doe + emailAddress: '' + defaultCurrency: GBP + addresses: [] + contacts: + - name: John Doe + email: '' + phone: [] + status: Active + status: Active + modifiedDate: '2022-10-03T08:40:37Z' + sourceModifiedDate: '2022-09-28T15:09:22' + pageNumber: 1 + pageSize: 2 + totalResults: 14 + _links: + current: + href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/customers?page=1&pageSize=2 + self: + href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/customers + next: + href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/customers?page=2&pageSize=2 + '400': + $ref: '#/components/responses/Malformed-Query' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2510,91 +7969,550 @@ paths: $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/Not-Found' + '409': + $ref: '#/components/responses/Conflict' '429': $ref: '#/components/responses/Too-Many-Requests' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/bankFeedAccounts/mapping': + description: "The *List customers* endpoint returns a list of [customers](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) for a given company's connection.\n\n[Customers](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB.\n\nBefore using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-company-data).\n " + operationId: list-customers + '/companies/{companyId}/data/customers/{customerId}': parameters: - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' + - $ref: '#/components/parameters/customerId' get: tags: - - Account mapping - summary: List bank feed accounts - description: "\uFEFF\x54\x68\x65\x20\x2A\x4C\x69\x73\x74\x20\x62\x61\x6E\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x72\x65\x74\x75\x72\x6E\x73\x20\x69\x6E\x66\x6F\x72\x6D\x61\x74\x69\x6F\x6E\x20\x61\x62\x6F\x75\x74\x20\x61\x20\x73\x6F\x75\x72\x63\x65\x20\x62\x61\x6E\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x61\x6E\x64\x20\x61\x6E\x79\x20\x63\x75\x72\x72\x65\x6E\x74\x20\x6F\x72\x20\x70\x6F\x74\x65\x6E\x74\x69\x61\x6C\x20\x74\x61\x72\x67\x65\x74\x20\x6D\x61\x70\x70\x69\x6E\x67\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x2E\n\n\x41\x20\x62\x61\x6E\x6B\x20\x66\x65\x65\x64\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x6D\x61\x70\x70\x69\x6E\x67\x20\x69\x73\x20\x61\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x20\x6C\x69\x6E\x6B\x20\x62\x65\x74\x77\x65\x65\x6E\x20\x74\x68\x65\x20\x73\x6F\x75\x72\x63\x65\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x28\x70\x72\x6F\x76\x69\x64\x65\x64\x20\x62\x79\x20\x74\x68\x65\x20\x43\x6F\x64\x61\x74\x20\x75\x73\x65\x72\x29\x20\x61\x6E\x64\x20\x74\x68\x65\x20\x74\x61\x72\x67\x65\x74\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x28\x74\x68\x65\x20\x65\x6E\x64\x20\x75\x73\x65\x72\x27\x73\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x69\x6E\x20\x74\x68\x65\x20\x75\x6E\x64\x65\x72\x6C\x79\x69\x6E\x67\x20\x73\x6F\x66\x74\x77\x61\x72\x65\x29\x2E\n\n\x3E\x20\x2A\x2A\x46\x6F\x72\x20\x63\x75\x73\x74\x6F\x6D\x20\x62\x75\x69\x6C\x64\x73\x20\x6F\x6E\x6C\x79\x2A\x2A\n\x3E\x20\n\x3E\x20\x4F\x6E\x6C\x79\x20\x75\x73\x65\x20\x74\x68\x69\x73\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x69\x66\x20\x79\x6F\x75\x20\x61\x72\x65\x20\x62\x75\x69\x6C\x64\x69\x6E\x67\x20\x79\x6F\x75\x72\x20\x6F\x77\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x20\x55\x49\x2E" - operationId: get-bank-account-mapping + - Customers + summary: Get customer responses: '200': description: Success content: application/json: schema: - $ref: '#/components/schemas/BankFeedMapping/definitions/bankFeedMappings' + $ref: '#/components/schemas/Customer' examples: - Example: + Clear Books: value: - - sourceAccountId: account-001 - status: pending - targetAccountOptions: - - name: Money Bank account - id: d21e25d6-98c5-4bfb-b469-105833bea3c8 - accountNumber: '789' - sortCode: '123456' - - name: Bank of Dave account - id: d06ff4b2-e4f2-4681-9841-014bd008cdab - accountNumber: '99887766' - sortCode: '998866' - - name: LuxLend account - id: c8f252fc-84f3-4a8b-ace8-ae99f41a81ae - accountNumber: '123456789' - sortCode: '123456' - sourceAccountName: account-001 - sourceAccountNumber: '12345670' - sourceBalance: 99.99 - sourceCurrency: GBP - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - post: - tags: - - Account mapping - summary: Create bank feed account mapping - description: "\uFEFF\x54\x68\x65\x20\x2A\x43\x72\x65\x61\x74\x65\x20\x62\x61\x6E\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x6D\x61\x70\x70\x69\x6E\x67\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x63\x72\x65\x61\x74\x65\x73\x20\x61\x20\x6E\x65\x77\x20\x6D\x61\x70\x70\x69\x6E\x67\x20\x62\x65\x74\x77\x65\x65\x6E\x20\x61\x20\x73\x6F\x75\x72\x63\x65\x20\x62\x61\x6E\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x61\x6E\x64\x20\x61\x20\x70\x6F\x74\x65\x6E\x74\x69\x61\x6C\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x69\x6E\x20\x74\x68\x65\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x73\x6F\x66\x74\x77\x61\x72\x65\x20\x28\x74\x61\x72\x67\x65\x74\x20\x61\x63\x63\x6F\x75\x6E\x74\x29\x2E\n\n\x41\x20\x62\x61\x6E\x6B\x20\x66\x65\x65\x64\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x6D\x61\x70\x70\x69\x6E\x67\x20\x69\x73\x20\x61\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x20\x6C\x69\x6E\x6B\x20\x62\x65\x74\x77\x65\x65\x6E\x20\x74\x68\x65\x20\x73\x6F\x75\x72\x63\x65\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x28\x70\x72\x6F\x76\x69\x64\x65\x64\x20\x62\x79\x20\x74\x68\x65\x20\x43\x6F\x64\x61\x74\x20\x75\x73\x65\x72\x29\x20\x61\x6E\x64\x20\x74\x68\x65\x20\x74\x61\x72\x67\x65\x74\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x28\x74\x68\x65\x20\x65\x6E\x64\x20\x75\x73\x65\x72\x27\x73\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x69\x6E\x20\x74\x68\x65\x20\x75\x6E\x64\x65\x72\x6C\x79\x69\x6E\x67\x20\x73\x6F\x66\x74\x77\x61\x72\x65\x29\x2E\n\n\x54\x6F\x20\x66\x69\x6E\x64\x20\x76\x61\x6C\x69\x64\x20\x74\x61\x72\x67\x65\x74\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x6F\x70\x74\x69\x6F\x6E\x73\x2C\x20\x66\x69\x72\x73\x74\x20\x63\x61\x6C\x6C\x20\x74\x68\x65\x20\x5B\x4C\x69\x73\x74\x20\x62\x61\x6E\x6B\x20\x66\x65\x65\x64\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x6D\x61\x70\x70\x69\x6E\x67\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x2F\x62\x61\x6E\x6B\x2D\x66\x65\x65\x64\x73\x2D\x61\x70\x69\x23\x2F\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E\x73\x2F\x67\x65\x74\x2D\x62\x61\x6E\x6B\x2D\x61\x63\x63\x6F\x75\x6E\x74\x2D\x6D\x61\x70\x70\x69\x6E\x67\x29\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x2E\n\n\x3E\x20\x2A\x2A\x46\x6F\x72\x20\x63\x75\x73\x74\x6F\x6D\x20\x62\x75\x69\x6C\x64\x73\x20\x6F\x6E\x6C\x79\x2A\x2A\n\x3E\n\x3E\x20\x4F\x6E\x6C\x79\x20\x75\x73\x65\x20\x74\x68\x69\x73\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x69\x66\x20\x79\x6F\x75\x20\x61\x72\x65\x20\x62\x75\x69\x6C\x64\x69\x6E\x67\x20\x79\x6F\x75\x72\x20\x6F\x77\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x20\x55\x49\x2E\n\n\x23\x23\x23\x23\x20\x41\x63\x63\x6F\x75\x6E\x74\x20\x6D\x61\x70\x70\x69\x6E\x67\x20\x76\x61\x72\x69\x61\x62\x69\x6C\x69\x74\x79\n\n\x54\x68\x65\x20\x6D\x65\x74\x68\x6F\x64\x20\x6F\x66\x20\x6D\x61\x70\x70\x69\x6E\x67\x20\x74\x68\x65\x20\x73\x6F\x75\x72\x63\x65\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x74\x6F\x20\x74\x68\x65\x20\x74\x61\x72\x67\x65\x74\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x76\x61\x72\x69\x65\x73\x20\x64\x65\x70\x65\x6E\x64\x69\x6E\x67\x20\x6F\x6E\x20\x74\x68\x65\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x73\x6F\x66\x74\x77\x61\x72\x65\x20\x79\x6F\x75\x72\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x75\x73\x65\x73\x2E\n\n\x23\x23\x23\x23\x20\x4D\x61\x70\x70\x69\x6E\x67\x20\x6F\x70\x74\x69\x6F\x6E\x73\x3A\n\n\x31\x2E\x20\x2A\x2A\x41\x50\x49\x20\x4D\x61\x70\x70\x69\x6E\x67\x2A\x2A\x3A\x20\x49\x6E\x74\x65\x67\x72\x61\x74\x65\x20\x74\x68\x65\x20\x6D\x61\x70\x70\x69\x6E\x67\x20\x6A\x6F\x75\x72\x6E\x65\x79\x20\x64\x69\x72\x65\x63\x74\x6C\x79\x20\x69\x6E\x74\x6F\x20\x79\x6F\x75\x72\x20\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x61\x20\x73\x65\x61\x6D\x6C\x65\x73\x73\x20\x75\x73\x65\x72\x20\x65\x78\x70\x65\x72\x69\x65\x6E\x63\x65\x2E\n\x32\x2E\x20\x2A\x2A\x43\x6F\x64\x61\x74\x20\x55\x49\x20\x4D\x61\x70\x70\x69\x6E\x67\x2A\x2A\x3A\x20\x49\x66\x20\x79\x6F\x75\x20\x70\x72\x65\x66\x65\x72\x20\x61\x20\x71\x75\x69\x63\x6B\x65\x72\x20\x73\x65\x74\x75\x70\x2C\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x75\x74\x69\x6C\x69\x7A\x65\x20\x43\x6F\x64\x61\x74\x27\x73\x20\x70\x72\x6F\x76\x69\x64\x65\x64\x20\x75\x73\x65\x72\x20\x69\x6E\x74\x65\x72\x66\x61\x63\x65\x20\x66\x6F\x72\x20\x6D\x61\x70\x70\x69\x6E\x67\x2E\n\x33\x2E\x20\x2A\x2A\x41\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x50\x6C\x61\x74\x66\x6F\x72\x6D\x20\x4D\x61\x70\x70\x69\x6E\x67\x2A\x2A\x3A\x20\x46\x6F\x72\x20\x73\x6F\x6D\x65\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x73\x6F\x66\x74\x77\x61\x72\x65\x2C\x20\x74\x68\x65\x20\x6D\x61\x70\x70\x69\x6E\x67\x20\x70\x72\x6F\x63\x65\x73\x73\x20\x6D\x75\x73\x74\x20\x62\x65\x20\x63\x6F\x6E\x64\x75\x63\x74\x65\x64\x20\x77\x69\x74\x68\x69\x6E\x20\x74\x68\x65\x20\x73\x6F\x66\x74\x77\x61\x72\x65\x20\x69\x74\x73\x65\x6C\x66\x2E\n\n\x23\x23\x23\x20\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2D\x73\x70\x65\x63\x69\x66\x69\x63\x20\x62\x65\x68\x61\x76\x69\x6F\x72\n\n\x7C\x20\x42\x61\x6E\x6B\x20\x46\x65\x65\x64\x20\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x7C\x20\x41\x50\x49\x20\x4D\x61\x70\x70\x69\x6E\x67\x20\x7C\x20\x43\x6F\x64\x61\x74\x20\x55\x49\x20\x4D\x61\x70\x70\x69\x6E\x67\x20\x7C\x20\x41\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x50\x6C\x61\x74\x66\x6F\x72\x6D\x20\x4D\x61\x70\x70\x69\x6E\x67\x20\x7C\n\x7C\x20\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x20\x7C\x20\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x20\x7C\x20\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x20\x7C\x20\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x20\x7C\n\x7C\x20\x58\x65\x72\x6F\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7C\x20\u2705\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7C\x20\u2705\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7C\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7C\n\x7C\x20\x46\x72\x65\x65\x41\x67\x65\x6E\x74\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7C\x20\u2705\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7C\x20\u2705\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7C\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7C\n\x7C\x20\x4F\x72\x61\x63\x6C\x65\x20\x4E\x65\x74\x53\x75\x69\x74\x65\x20\x20\x20\x20\x20\x20\x20\x7C\x20\u2705\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7C\x20\u2705\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7C\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7C\n\x7C\x20\x45\x78\x61\x63\x74\x20\x4F\x6E\x6C\x69\x6E\x65\x20\x28\x4E\x4C\x29\x20\x20\x20\x20\x20\x7C\x20\u2705\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7C\x20\u2705\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7C\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7C\n\x7C\x20\x51\x75\x69\x63\x6B\x42\x6F\x6F\x6B\x73\x20\x4F\x6E\x6C\x69\x6E\x65\x20\x20\x20\x20\x20\x7C\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7C\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7C\x20\u2705\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7C\n\x7C\x20\x53\x61\x67\x65\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7C\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7C\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7C\x20\u2705\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7C" - operationId: create-bank-account-mapping - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/BankFeedAccountMapping' - examples: - Example: - value: - sourceAccountId: acc-002 - targetAccountId: account-081 - responses: - '200': - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/BankFeedAccountMappingResponse' - examples: {} - '400': - $ref: '#/components/responses/BadRequest' + id: c8180244-74ac-40cf-a5df-6d83661c44d7 + customerName: Arjun Kuvalis + contactName: Werner Langworth + emailAddress: Arjun34@hotmail.com + defaultCurrency: GBP + phone: 014605 64820 + addresses: + - type: Delivery + line1: Suite 214 + line2: 8439 Lueilwitz Passage + city: Fernandohaven + region: Northern Ireland + country: United Kingdom + postalCode: JG04 7PV + - type: Delivery + line1: Suite 096 + line2: 864 Halie Course + city: Juliochester + region: England + country: United Kingdom + postalCode: DZ8 4BF + - type: Delivery + line1: Suite 001 + line2: 416 Stokes Fords + city: Naderborough + region: Wales + country: United Kingdom + postalCode: XG25 0XX + contacts: + - name: Werner Langworth + email: Werner_Langworth@hotmail.com + phone: [] + address: + type: Delivery + line1: Apt. 145 + line2: 317 Williamson Freeway + city: Hortenseville + region: Scotland + country: United Kingdom + postalCode: CV4 2HR + status: Active + - name: Belle Glover + email: Belle51@yahoo.com + phone: [] + address: + type: Delivery + line1: Suite 075 + line2: 9921 Dickens Walk + city: South Ali + region: Scotland + country: United Kingdom + postalCode: TI04 4OO + status: Active + registrationNumber: NI7JEJVM + taxNumber: '7505220209.583549' + status: Active + modifiedDate: '2023-04-26T12:38:16Z' + sourceModifiedDate: '2022-07-03T01:27:00' + metadata: + isDeleted: false + Dynamics 365 Business Central: + value: + id: 0e2f7751-7696-ed11-bff5-6045bd0d2ad6 + customerName: '' + contactName: '' + emailAddress: '' + defaultCurrency: GBP + phone: '' + addresses: + - type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: '' + postalCode: '' + contacts: + - name: '' + email: '' + phone: [] + address: + type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: '' + postalCode: '' + status: Active + taxNumber: '' + status: Active + modifiedDate: '2023-03-27T14:21:25Z' + sourceModifiedDate: '2023-01-17T14:50:54Z' + metadata: + isDeleted: false + Exact (Netherlands): + value: + id: 555f8251-c65a-433a-a813-5dbe04321d1e + customerName: Ab Netherlands + defaultCurrency: EUR + addresses: + - type: Billing + country: NL + contacts: [] + status: Active + modifiedDate: '2022-10-26T13:32:05Z' + sourceModifiedDate: '2021-06-14T15:26:37Z' + Exact (UK): + value: + id: 5f20075a-a28e-434d-81a6-2db0dc170e87 + customerName: Abdi 99 + emailAddress: email@codat.io + defaultCurrency: GBP + addresses: + - type: Billing + line1: Ink Rooms + city: London + country: GB + postalCode: WC1X 0BE + contacts: [] + registrationNumber: '123456789' + taxNumber: GB339 0727 47 + status: Active + modifiedDate: '2022-10-26T13:33:08Z' + sourceModifiedDate: '2020-02-26T11:23:50Z' + FreeAgent: + value: + id: '11526230' + customerName: '-' + contactName: Test 1 + addresses: + - type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + contacts: + - name: Test 1 + phone: [] + address: + type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + status: Unknown + status: Active + modifiedDate: '2023-04-25T14:19:12Z' + sourceModifiedDate: '2023-04-17T06:02:46Z' + metadata: + isDeleted: false + FreshBooks: + value: + id: '634509' + customerName: A test customer 14 (updated) + contactName: test person name + emailAddress: test14@example.com + defaultCurrency: GBP + phone: 01876 541245 + addresses: + - type: Billing + line1: Line 1 + line2: Line 2 + city: Some city + region: A region + country: Country 1 + postalCode: SW1 2JQ + contacts: + - name: test person1 + email: test14A@example.com + phone: + - number: '24681012' + type: Primary + - number: '121086420' + type: Unknown + status: Active + - name: test person2 + email: test14B@example.com + phone: + - number: '123456789' + type: Primary + - number: '987654321' + type: Unknown + status: Active + - name: test person name + email: test14@example.com + phone: + - number: 01876 541245 + type: Unknown + status: Active + status: Active + modifiedDate: '2023-03-24T16:07:23Z' + sourceModifiedDate: '2022-05-18T09:23:56' + metadata: + isDeleted: false + KashFlow: + value: + id: '92227673' + customerName: Chekko Customer Test 01 + contactName: '' + emailAddress: '' + phone: '' + addresses: [] + contacts: + - name: '' + email: '' + phone: [] + status: Active + taxNumber: '' + status: Active + modifiedDate: '2022-09-30T10:29:15Z' + sourceModifiedDate: '0001-01-01T00:00:00' + Oracle NetSuite: + value: + id: '773' + customerName: 119 Test Customer + contactName: Mr Test Customer + defaultCurrency: GBP + addresses: [] + contacts: [] + status: Active + modifiedDate: '2023-01-30T14:48:02Z' + sourceModifiedDate: '2022-01-11T12:28:49' + QuickBooks Desktop: + value: + id: 150000-933272658 + customerName: 'Abercrombie, Kristy' + contactName: Kristy Abercrombie + emailAddress: kristy@samplename.com + defaultCurrency: GBP + phone: 415-555-6579 + addresses: + - type: Delivery + line1: Kristy Abercrombie + line2: 5647 Cypress Hill Rd + city: Bayshore + region: CA + postalCode: '94326' + - type: Billing + line1: Kristy Abercrombie + line2: 5647 Cypress Hill Rd + city: Bayshore + region: CA + postalCode: '94326' + contacts: + - name: 'Abercrombie, Kristy' + email: kristy@samplename.com + phone: + - number: 415-555-6579 + type: Primary + status: Active + - name: Kristy Abercrombie + phone: [] + status: Active + - name: Steve Darcangelo + phone: [] + status: Active + status: Active + modifiedDate: '2023-04-26T09:07:55Z' + sourceModifiedDate: '2023-12-16T05:06:42' + metadata: + isDeleted: false + QuickBooks Online: + value: + id: '9' + customerName: Abe + contactName: Abraham's Company + emailAddress: ab@email.com + defaultCurrency: GBP + addresses: [] + contacts: + - name: Abe + email: ab@email.com + phone: + - number: '01111111111' + type: Mobile + status: Active + registrationNumber: XXXX9900001 + taxNumber: XXXX9900001 + status: Active + modifiedDate: '2023-01-18T11:02:35Z' + sourceModifiedDate: '2022-12-08T15:42:59Z' + QuickBooks Online Sandbox: + value: + id: '66' + customerName: Abercrombie International Group + contactName: Kristy Abercrombie + defaultCurrency: GBP + addresses: + - type: Billing + line1: 123 Main St + city: 'New York, NY' + contacts: + - name: Abercrombie International Group (deleted) + phone: [] + address: + type: Billing + line1: 123 Main St + city: 'New York, NY' + status: Archived + status: Archived + modifiedDate: '2023-04-26T09:35:56Z' + sourceModifiedDate: '2016-09-12T18:53:19Z' + metadata: + isDeleted: false + Sage 200cloud: + value: + id: A1D001 + customerName: A1 Design Services + contactName: Lee Dalkin + emailAddress: newbusinessadvice@sage.com + defaultCurrency: GBP + phone: 01742 876 234 + addresses: + - type: Delivery + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: '' + postalCode: BP12 7HT + - type: Delivery + line1: 23a Union Street + line2: '' + city: Manchester + region: '' + country: '' + postalCode: M2 6JK + - type: Billing + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: Great Britain + postalCode: BP12 7HT + contacts: + - name: Lee Dalkin + email: newbusinessadvice@sage.com + phone: + - number: 01742 876 234 + type: Landline + - number: 01742 876 235 + type: Landline + - number: 01742 876 236 + type: Fax + status: Active + - name: Malcolm Leverret + email: '' + phone: [] + status: Active + - name: Jim Thomas + email: Jim@a1designservices.co.uk + phone: + - number: 01742 876 234 + type: Landline + - number: 01742 876 235 + type: Fax + status: Active + - name: Jullian Plawsworth + email: Jullian@a1designservices.co.uk + phone: + - number: 0151 349 3939 + type: Landline + - number: 0151 349 3940 + type: Fax + status: Active + registrationNumber: '' + taxNumber: GB238 3839 38 + status: Active + modifiedDate: '2022-10-14T09:35:53Z' + sourceModifiedDate: '2022-04-27T15:17:36Z' + Sage 50 (UK): + value: + id: A1D001 + customerName: A1 Design Services + contactName: Ian Cairns + emailAddress: newbusinessadvice@sage.com + defaultCurrency: GBP + phone: 01742 876 234 + addresses: + - type: Delivery + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: GB + postalCode: BP12 7HT + - type: Delivery + line1: 23a Union Street + line2: '' + city: Manchester + region: '' + country: GB + postalCode: M2 6JK + - type: Unknown + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: GB + postalCode: BP12 7HT + contacts: [] + taxNumber: GB238 3839 38 + status: Active + modifiedDate: '2023-03-30T14:42:41Z' + sourceModifiedDate: '2022-11-25T09:43:54Z' + metadata: + isDeleted: false + Sage Business Cloud Accounting: + value: + id: 260f6a3f94a243738f2d5e08496a41a8 + customerName: 100 test name + contactName: Main Contact + emailAddress: email@codat.io + defaultCurrency: GBP + phone: contact phone number + addresses: + - type: Billing + line1: Aruba Address line 1 + line2: Aruba Address line 2 + city: Aruba City + region: Aruba Province + country: Aruba (AW) + postalCode: Aruba Post + contacts: + - phone: + - number: contact mobile number + type: Mobile + - number: contact fax number + type: Fax + status: Unknown + status: Active + modifiedDate: '2022-10-24T14:52:54Z' + sourceModifiedDate: '2021-05-10T16:31:51Z' + Sage Intacct: + value: + id: '188' + customerName: 33Across + contactName: Yuna Conn + defaultCurrency: USD + phone: 520-393-4468 + addresses: + - type: Unknown + line1: 155 Westend Point + line2: '' + city: Albuquerque + region: NM + country: United States + postalCode: '87140' + contacts: + - name: 'Conn, Yuna' + phone: + - number: 520-393-4468 + type: Primary + address: + type: Unknown + line1: 155 Westend Point + line2: '' + city: Albuquerque + region: NM + country: United States + postalCode: '87140' + status: Unknown + taxNumber: '' + status: Active + modifiedDate: '2023-04-04T16:32:21Z' + sourceModifiedDate: '2022-09-06T12:58:27' + metadata: + isDeleted: false + Wave: + value: + id: QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O0N1c3RvbWVyOjMyMzkzNTA4 + customerName: ABC Textiles + contactName: '' + emailAddress: c.taylor@codat.io + defaultCurrency: USD + addresses: [] + contacts: [] + status: Active + modifiedDate: '2022-11-16T18:15:30Z' + sourceModifiedDate: '2019-10-17T07:59:04Z' + Xero: + value: + id: e4c9d0e2-c285-4e85-b579-6d28b180c730 + customerName: 24 Locks + emailAddress: '' + addresses: [] + contacts: [] + status: Active + modifiedDate: '2023-03-15T20:35:10Z' + sourceModifiedDate: '2023-02-17T18:03:42' + metadata: + isDeleted: false + Zoho Books: + value: + id: '104957000000032105' + customerName: A B + contactName: Contact (First Name) Contact (Last Name) + emailAddress: contactperson@whateveryouwantidontcare12345.com + defaultCurrency: GBP + phone: Work Phone + addresses: [] + contacts: + - name: Contact (First Name) Contact (Last Name) + email: contactperson@whateveryouwantidontcare12345.com + phone: + - number: Work Phone + type: Landline + - number: Mobile + type: Mobile + status: Active + status: Active + modifiedDate: '2022-10-03T08:40:37Z' + sourceModifiedDate: '2022-06-09T14:36:47' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2603,227 +8521,45 @@ paths: $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/Not-Found' + '409': + $ref: '#/components/responses/Conflict' '429': $ref: '#/components/responses/Too-Many-Requests' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/bankFeeds/info': - parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - get: - summary: Get company information - description: |- - Use the *Get company information* endpoint to return information about the company available from the underlying accounting software. + description: | + The *Get customer* endpoint returns a single customer for a given customerId. - ### Supported Integrations - | Integration | Supported | - |-----------------------|-----------| - | Oracle NetSuite | Yes | - | Xero | Yes | - | Exact | No | - | FreeAgent | No | - | Sage | No | - | QuickBooks Online | No | - operationId: get-company-information - tags: - - Company information - responses: - '200': - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/CompanyInformation' - examples: {} - '400': - $ref: '#/components/responses/BadRequest' - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/bankFeeds/otp': + [Customers](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. + + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-company-data). + operationId: get-customer + '/companies/{companyId}/connections/{connectionId}/push/customers': parameters: - $ref: '#/components/parameters/companyId' - $ref: '#/components/parameters/connectionId' post: tags: - - Source accounts - summary: Generate one-time password - description: | - The *Generate OTP* endpoint generates a one-time password (OTP) for a bank feed connection. The OTP is returned along with an expiry time, after which it will no longer be valid. - - > **For Sage only** - > - > Only call this endpoint for connections to Sage. Calling it for other integrations will return an error. - operationId: generate-otp - responses: - '200': - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/GenerateOtpResponse' - examples: {} - '400': - $ref: '#/components/responses/BadRequest' - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/push/bankAccounts/{accountId}/bankTransactions': - post: - tags: - - Transactions - summary: Create bank transactions - description: "\uFEFF\x54\x68\x65\x20\x2A\x43\x72\x65\x61\x74\x65\x20\x62\x61\x6E\x6B\x20\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E\x73\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x63\x72\x65\x61\x74\x65\x73\x20\x6E\x65\x77\x20\x5B\x62\x61\x6E\x6B\x20\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x62\x61\x6E\x6B\x2D\x66\x65\x65\x64\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x42\x61\x6E\x6B\x54\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E\x73\x29\x20\x66\x6F\x72\x20\x61\x20\x67\x69\x76\x65\x6E\x20\x63\x6F\x6D\x70\x61\x6E\x79\x27\x73\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x2E\n\n\x5B\x42\x61\x6E\x6B\x20\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x62\x61\x6E\x6B\x2D\x66\x65\x65\x64\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x42\x61\x6E\x6B\x54\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E\x73\x29\x20\x61\x72\x65\x20\x72\x65\x63\x6F\x72\x64\x73\x20\x6F\x66\x20\x6D\x6F\x6E\x65\x74\x61\x72\x79\x20\x61\x6D\x6F\x75\x6E\x74\x73\x20\x74\x68\x61\x74\x20\x68\x61\x76\x65\x20\x6D\x6F\x76\x65\x64\x20\x69\x6E\x20\x61\x6E\x64\x20\x6F\x75\x74\x20\x6F\x66\x20\x61\x6E\x20\x53\x4D\x42\x27\x73\x20\x62\x61\x6E\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x2E\n\n\x2A\x2A\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2D\x73\x70\x65\x63\x69\x66\x69\x63\x20\x62\x65\x68\x61\x76\x69\x6F\x72\x2A\x2A\n\n\x54\x68\x65\x20\x72\x65\x71\x75\x69\x72\x65\x64\x20\x70\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x20\x6D\x61\x79\x20\x76\x61\x72\x79\x20\x62\x61\x73\x65\x64\x20\x6F\x6E\x20\x74\x68\x65\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2E\x20\x46\x6F\x72\x20\x64\x65\x74\x61\x69\x6C\x65\x64\x20\x72\x65\x71\x75\x69\x72\x65\x6D\x65\x6E\x74\x73\x20\x73\x70\x65\x63\x69\x66\x69\x63\x20\x74\x6F\x20\x65\x61\x63\x68\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x73\x6F\x66\x74\x77\x61\x72\x65\x2C\x20\x72\x65\x66\x65\x72\x20\x74\x6F\x20\x74\x68\x65\x20\x41\x50\x49\x20\x72\x65\x66\x65\x72\x65\x6E\x63\x65\x20\x65\x78\x61\x6D\x70\x6C\x65\x73\x2E\n\x41\x6C\x74\x65\x72\x6E\x61\x74\x69\x76\x65\x6C\x79\x2C\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x76\x69\x65\x77\x20\x74\x68\x65\x20\x5B\x47\x65\x74\x20\x63\x72\x65\x61\x74\x65\x20\x62\x61\x6E\x6B\x20\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E\x20\x6D\x6F\x64\x65\x6C\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x62\x61\x6E\x6B\x2D\x66\x65\x65\x64\x73\x2D\x61\x70\x69\x23\x2F\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E\x73\x2F\x67\x65\x74\x2D\x63\x72\x65\x61\x74\x65\x2D\x62\x61\x6E\x6B\x2D\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E\x73\x2D\x6D\x6F\x64\x65\x6C\x29\x20\x66\x6F\x72\x20\x6D\x6F\x72\x65\x20\x69\x6E\x66\x6F\x72\x6D\x61\x74\x69\x6F\x6E\x2E" - operationId: create-bank-transactions + - Customers + summary: Create customer parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - - $ref: '#/components/parameters/accountId' - $ref: '#/components/parameters/timeoutInMinutes' - - name: allowSyncOnPushComplete - in: query - schema: - type: boolean - default: true - description: Allow a sync upon push completion. + - $ref: '#/components/parameters/allowSyncOnPushComplete' requestBody: content: application/json: schema: - $ref: '#/components/schemas/CreateBankTransactions' - examples: - Xero: - value: - accountId: 49cd5a42-b311-4750-9361-52e2ed1d4653 - transactions: - - id: '716422529' - date: '2023-08-22T10:21:00' - description: Repayment of Credit Card - counterparty: Bank of Example - reference: Ref-12345 - reconciled: true - amount: 100 - balance: 100 - transactionType: Credit - - id: '716422530' - date: '2023-08-22T10:22:00' - description: Amazon Purchase - counterparty: Amazon - reference: Ref-12346 - reconciled: false - amount: -100 - balance: 0 - transactionType: Debit - - id: '716422531' - date: '2023-08-22T10:23:00' - description: Office Supplies - counterparty: Office Mart - reference: Ref-12347 - reconciled: false - amount: -60 - balance: -60 - transactionType: Debit - QuickBooks Online Bank Feeds: - value: - accountId: 49cd5a42-b311-4750-9361-52e2ed1d4653 - transactions: - - id: '716422529' - date: '2023-08-22T10:21:00' - description: Repayment of Credit Card - amount: 100 - balance: 100 - transactionType: Credit - - id: '716422530' - date: '2023-08-22T10:22:00' - description: Amazon Purchase - amount: -100 - balance: 0 - transactionType: Debit - - id: '716422531' - date: '2023-08-22T10:23:00' - description: Office Supplies - amount: -60 - balance: -60 - transactionType: Debit - FreeAgent: - value: - accountId: 49cd5a42-b311-4750-9361-52e2ed1d4653 - transactions: - - id: '716422529' - date: '2023-08-22T10:21:00' - description: Repayment of Credit Card - amount: 100 - transactionType: Credit - - id: '716422530' - date: '2023-08-22T10:22:00' - description: Amazon Purchase - amount: -100 - transactionType: Debit - - id: '716422531' - date: '2023-08-22T10:23:00' - description: Office Supplies - amount: -60 - transactionType: Debit - Sage: - value: - accountId: 49cd5a42-b311-4750-9361-52e2ed1d4653 - transactions: - - id: '716422529' - date: '2023-08-22T10:21:00' - description: Repayment of Credit Card - counterparty: Bank of Example - reference: Ref-12345 - amount: 100 - balance: 100 - transactionType: Credit - - id: '716422530' - date: '2023-08-22T10:22:00' - description: Amazon Purchase - counterparty: Amazon - reference: Ref-12346 - amount: -100 - balance: 0 - transactionType: Debit - - id: '716422531' - date: '2023-08-22T10:23:00' - description: Office Supplies - counterparty: Office Mart - reference: Ref-12347 - amount: -60 - balance: -60 - transactionType: Debit + $ref: '#/components/schemas/Customer' responses: '200': description: Success content: application/json: schema: - $ref: '#/components/schemas/CreateBankTransactionsResponse' + $ref: '#/components/schemas/CreateCustomerResponse' + examples: {} '400': $ref: '#/components/responses/BadRequest' '401': @@ -2840,76 +8576,43 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/options/bankAccounts/{accountId}/bankTransactions': - get: - tags: - - Transactions - summary: Get create bank transactions model + operationId: create-customer description: |- - The *Get create bank account transactions model* endpoint returns the expected data for the request payload when creating [bank account transactions](https://docs.codat.io/bank-feeds-api#/schemas/BankTransactions) for a given company and integration. - - [Bank account transactions](https://docs.codat.io/bank-feeds-api#/schemas/BankTransactions) are records of money that has moved in and out of an SMB's bank account. - - **Integration-specific behavior** + The *Create customer* endpoint creates a new [customer](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) for a given company's connection. - See the *response examples* for integration-specific indicative models. - operationId: get-create-bank-transactions-model - parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - - $ref: '#/components/parameters/accountId' - responses: - '200': - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/PushOption' - examples: {} - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/push/{pushOperationKey}': - parameters: - - $ref: '#/components/parameters/companyId' - - schema: - type: string - format: uuid - name: pushOperationKey - in: path - required: true - description: Push operation key. - get: - summary: Get create operation - tags: - - Transactions - operationId: get-create-operation - x-speakeasy-name-override: get-create-operation - description: |- - The **Get create operation** endpoint returns a specific [write operation](/using-the-api/push) identified by the `pushOperationKey` that was performed on the company. + [Customers](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. - Write operations are actions that send requests to Codat, enabling the creation, updating, deletion of records, or uploading attachments in the connected accounting software. + **Integration-specific behavior** - For bank feeds, your push operations will only relate to the `bankTransactions` data type. + Required data may vary by integration. To see what data to post, first call [Get create/update customer model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-customers-model). + '/companies/{companyId}/connections/{connectionId}/push/customers/{customerId}': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/connectionId' + - $ref: '#/components/parameters/customerId' + put: + tags: + - Customers + summary: Update customer + parameters: + - $ref: '#/components/parameters/timeoutInMinutes' + - $ref: '#/components/parameters/allowSyncOnPushComplete' + - $ref: '#/components/parameters/forceUpdate' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Customer' responses: '200': - description: OK + description: Success content: application/json: schema: - $ref: '#/components/schemas/PushOperation' + $ref: '#/components/schemas/UpdateCustomerResponse' examples: {} + '400': + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2924,29 +8627,799 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/push': + description: |- + The *Update customer* endpoint updates an existing [customer](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) for a given company's connection. + + [Customers](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. + + **Integration-specific behavior** + + Required data may vary by integration. To see what data to post, first call [Get create/update customer model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-customers-model). + operationId: update-customer + '/companies/{companyId}/data/suppliers': parameters: - $ref: '#/components/parameters/companyId' get: + tags: + - Suppliers + summary: List suppliers parameters: - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/pageSize' - $ref: '#/components/parameters/query' - $ref: '#/components/parameters/orderBy' - summary: List create operations - tags: - - Transactions - operationId: list-create-operations - x-speakeasy-name-override: list-create-operations - description: "The **List create operations** endpoint returns a list of [write operations](/using-the-api/push) performed on the company.\n\nWrite operations are actions that send requests to Codat, enabling the creation, updating, deletion of records, or uploading attachments in the connected accounting software. \n\nFor bank feeds, use this endpoint to view write operations related to the `bankTransactions` data type." responses: '200': - description: OK + description: Success content: application/json: schema: - $ref: '#/components/schemas/PushOperations' - examples: {} + $ref: '#/components/schemas/Suppliers' + examples: + Clear Books: + value: + results: + - id: owQ2Gqgj9f + supplierName: Abshire - Kshlerin + contactName: Faye Hansen + emailAddress: hello@Abshire-Kshlerin.info + phone: 01338 858162 + addresses: + - type: Delivery + line1: Suite 431 + line2: 289 Giles Lake + city: Cesarmouth + region: Northern Ireland + country: United Kingdom + postalCode: BG40 9GP + registrationNumber: VYL1XZXR + taxNumber: '1396267523.0914588' + status: Active + modifiedDate: '2023-04-26T12:38:17Z' + sourceModifiedDate: '1660-11-28T23:18:00' + defaultCurrency: GBP + metadata: + isDeleted: false + - id: FyUkHbZxhn + supplierName: Arjun Kuvalis + contactName: Werner Langworth + emailAddress: Arjun34@hotmail.com + phone: 0116 796 3163 + addresses: + - type: Delivery + line1: Suite 214 + line2: 8439 Lueilwitz Passage + city: Fernandohaven + region: Northern Ireland + country: United Kingdom + postalCode: JG04 7PV + - type: Delivery + line1: Suite 096 + line2: 864 Halie Course + city: Juliochester + region: England + country: United Kingdom + postalCode: DZ8 4BF + - type: Delivery + line1: Suite 001 + line2: 416 Stokes Fords + city: Naderborough + region: Wales + country: United Kingdom + postalCode: XG25 0XX + registrationNumber: NI7JEJVM + taxNumber: '7505220209.583549' + status: Active + modifiedDate: '2023-04-26T12:38:17Z' + sourceModifiedDate: '0177-04-27T11:56:00' + defaultCurrency: GBP + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 100 + _links: + current: + href: /companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/suppliers?page=1&pageSize=2 + self: + href: /companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/suppliers + next: + href: /companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/suppliers?page=2&pageSize=2 + Dynamics 365 Business Central: + value: + results: + - id: 78623f13-931e-eb11-bbf8-0022481b3585 + supplierName: '' + contactName: '' + emailAddress: '' + phone: '' + addresses: + - type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: GB + postalCode: '' + taxNumber: '' + status: Active + modifiedDate: '2023-03-27T14:21:12Z' + sourceModifiedDate: '2020-11-04T11:44:22Z' + defaultCurrency: GBP + metadata: + isDeleted: false + - id: be49ec62-6754-ed11-946f-0022481b67d1 + supplierName: '' + contactName: '' + emailAddress: '' + phone: '' + addresses: + - type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: GB + postalCode: '' + taxNumber: '' + status: Active + modifiedDate: '2023-03-27T14:21:12Z' + sourceModifiedDate: '2022-10-25T13:17:36Z' + defaultCurrency: GBP + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 31 + _links: + current: + href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/data/suppliers?page=1&pageSize=2 + self: + href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/data/suppliers + next: + href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/data/suppliers?page=2&pageSize=2 + Exact (Netherlands): + value: + results: + - id: 3150917c-1d92-4d77-9018-31b5c4758ca9 + supplierName: Abe + contactName: Kelly's Contact Name + emailAddress: sales@kellysupplies.com + phone: 07999 999999 + addresses: + - type: Billing + line1: Unit 51 + city: Bakersfield + region: California + country: US + postalCode: '933081' + registrationNumber: '8409314368' + status: Active + modifiedDate: '2022-10-26T13:32:05Z' + sourceModifiedDate: '2022-07-15T12:01:15Z' + defaultCurrency: EUR + - id: 00014c12-2616-481a-a2e8-31bdf2497775 + supplierName: Ann's test supplier 2 + contactName: Ann's contact name + emailAddress: anna@anna888888.com + phone: '55555555' + addresses: + - type: Billing + line1: line1 + line2: line2 + city: city + region: region + country: RU + postalCode: postal + registrationNumber: '55566677788899944455' + taxNumber: RU4444444 + status: Active + modifiedDate: '2022-10-26T13:32:05Z' + sourceModifiedDate: '2021-06-09T12:04:08Z' + defaultCurrency: USD + pageNumber: 1 + pageSize: 2 + totalResults: 73 + _links: + current: + href: /companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/suppliers?page=1&pageSize=2 + self: + href: /companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/suppliers + next: + href: /companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/suppliers?page=2&pageSize=2 + Exact (UK): + value: + results: + - id: 0185fea2-0298-445b-909a-0db685118a9e + supplierName: a + addresses: + - type: Billing + country: GB + status: Active + modifiedDate: '2022-10-26T13:33:13Z' + sourceModifiedDate: '2017-08-02T10:58:54Z' + defaultCurrency: GBP + - id: 64ae712f-4155-48bb-9fce-98232c51d979 + supplierName: aa + addresses: + - type: Billing + country: GB + status: Active + modifiedDate: '2022-10-26T13:33:13Z' + sourceModifiedDate: '2020-05-01T14:05:46Z' + defaultCurrency: GBP + pageNumber: 1 + pageSize: 2 + totalResults: 118 + _links: + current: + href: /companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/suppliers?page=1&pageSize=2 + self: + href: /companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/suppliers + next: + href: /companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/suppliers?page=2&pageSize=2 + FreeAgent: + value: + results: + - id: '11526230' + supplierName: '-' + contactName: Test 1 + addresses: + - type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + status: Active + modifiedDate: '2023-04-25T14:19:08Z' + sourceModifiedDate: '2023-04-17T06:02:46' + metadata: + isDeleted: false + - id: '9677150' + supplierName: '-' + contactName: Test 1 + addresses: + - type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + status: Active + modifiedDate: '2023-04-25T14:19:08Z' + sourceModifiedDate: '2023-04-24T06:19:23' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 159 + _links: + current: + href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/data/suppliers?page=1&pageSize=2 + self: + href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/data/suppliers + next: + href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/data/suppliers?page=2&pageSize=2 + FreshBooks: + value: + results: + - id: api vendor + supplierName: api vendor + addresses: [] + status: Active + modifiedDate: '2023-03-24T16:07:25Z' + metadata: + isDeleted: false + - id: DUndsRykrmy8kFsc+FvYk29YkJze4zSjGecoF4YcUEhVU7auJ5JkQA0VjXptZ7XQ+D4n6WoxFIkaGY2V/t4flA== + supplierName: 'Chekko Test merchant 100 - Test Very long name: ORIG CO NAME:AMERICAN EXPRESS ORIG ID:9493560001 DESC DATE:220307 CO ENTRY DESCR:ACH PMT SEC:CCD TRACE#:021000023255482 EED:220307 IND ID:A4670 IND NAME:Rick Sanchez' + addresses: [] + status: Active + modifiedDate: '2023-03-24T16:07:25Z' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 7 + _links: + current: + href: /companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/suppliers?page=1&pageSize=2 + self: + href: /companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/suppliers + next: + href: /companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/suppliers?page=2&pageSize=2 + KashFlow: + value: + results: + - id: '6202387' + supplierName: Dell + contactName: '' + emailAddress: '' + phone: '' + addresses: [] + taxNumber: '' + status: Unknown + modifiedDate: '2022-09-30T10:29:15Z' + sourceModifiedDate: '2017-05-09T00:00:00' + - id: '9338173' + supplierName: Home + contactName: '' + emailAddress: '' + phone: '' + addresses: [] + taxNumber: '' + status: Unknown + modifiedDate: '2022-09-30T10:29:15Z' + sourceModifiedDate: '1990-01-01T00:00:00' + pageNumber: 1 + pageSize: 2 + totalResults: 7 + _links: + current: + href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/data/suppliers?page=1&pageSize=2 + self: + href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/data/suppliers + next: + href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/data/suppliers?page=2&pageSize=2 + Oracle NetSuite: + value: + results: + - id: '779' + supplierName: Test Vendor + contactName: Test Vendor + emailAddress: '' + phone: '' + addresses: [] + status: Active + modifiedDate: '2023-01-30T14:47:02Z' + sourceModifiedDate: '2022-02-04T14:24:43' + defaultCurrency: GBP + - id: '726' + supplierName: Vendor -.A + contactName: Vendor -.A + emailAddress: '' + phone: '' + addresses: [] + status: Active + modifiedDate: '2023-01-30T14:47:02Z' + sourceModifiedDate: '2021-03-26T09:53:15' + defaultCurrency: GBP + pageNumber: 1 + pageSize: 2 + totalResults: 6 + _links: + current: + href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/suppliers?page=1&pageSize=2 + self: + href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/suppliers + next: + href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/suppliers?page=2&pageSize=2 + QuickBooks Desktop: + value: + results: + - id: A60000-1197760912 + supplierName: A Cheung Limited + contactName: Angela Cheung + emailAddress: AC@CheungLimited.com + phone: 510 555 5723 + addresses: + - type: Billing + line1: 'A Cheung Limited, Angela Cheung' + line2: 3818 Bear Rd. West + city: Berkeley + region: CA + postalCode: '94688' + status: Active + modifiedDate: '2023-04-26T09:09:03Z' + sourceModifiedDate: '2023-12-16T05:06:44' + defaultCurrency: GBP + metadata: + isDeleted: false + - id: A40000-1197774038 + supplierName: Bank of Anycity + contactName: Lisa D. Holzhauser + emailAddress: lisah@samplename.com + phone: 415-555-9135 + addresses: + - type: Billing + line1: 'Bank of Anycity, Lisa Holzhauser' + line2: 1935 Main Street + city: Middlefield + region: CA + postalCode: '94482' + status: Active + modifiedDate: '2023-04-26T09:09:03Z' + sourceModifiedDate: '2023-12-16T05:06:44' + defaultCurrency: GBP + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 54 + _links: + current: + href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/suppliers?page=1&pageSize=2 + self: + href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/suppliers + next: + href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/suppliers?page=2&pageSize=2 + QuickBooks Online: + value: + results: + - id: '41' + supplierName: AI Support + contactName: AI Support + addresses: + - type: Billing + line1: test + region: string + country: Djibouti + status: Active + modifiedDate: '2023-01-18T11:02:36Z' + sourceModifiedDate: '2022-12-07T10:48:18Z' + defaultCurrency: GBP + - id: '42' + supplierName: AI Support 2 + contactName: AI Support 2 + addresses: + - type: Billing + line1: test + region: string + country: DJ + status: Active + modifiedDate: '2023-01-18T11:02:36Z' + sourceModifiedDate: '2021-08-31T08:45:02Z' + defaultCurrency: GBP + pageNumber: 1 + pageSize: 2 + totalResults: 23 + _links: + current: + href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/suppliers?page=1&pageSize=2 + self: + href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/suppliers + next: + href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/suppliers?page=2&pageSize=2 + QuickBooks Online Sandbox: + value: + results: + - id: '129' + supplierName: Ally Johnson + contactName: Miss Smith + phone: 0728 38474 + addresses: + - type: Billing + line1: 100 London Road + line2: Angel + city: London + region: Greater London + country: England + postalCode: EC1M + status: Active + modifiedDate: '2023-04-26T09:35:55Z' + sourceModifiedDate: '2023-04-13T01:51:08Z' + defaultCurrency: GBP + metadata: + isDeleted: false + - id: '88' + supplierName: Andrew Haberbosch + addresses: [] + status: Active + modifiedDate: '2023-04-26T09:35:55Z' + sourceModifiedDate: '2022-07-06T15:55:28Z' + defaultCurrency: GBP + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 64 + _links: + current: + href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/suppliers?page=1&pageSize=2 + self: + href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/suppliers + next: + href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/suppliers?page=2&pageSize=2 + Sage 200cloud: + value: + results: + - id: '776' + supplierName: Aaren + contactName: '' + emailAddress: '' + phone: '' + addresses: + - type: Unknown + line1: '' + line2: '' + city: '' + region: '' + country: Great Britain + postalCode: '' + taxNumber: '' + status: Archived + modifiedDate: '2022-10-14T09:35:58Z' + defaultCurrency: GBP + metadata: + isDeleted: true + - id: '914' + supplierName: Aaren + contactName: '' + emailAddress: '' + phone: '' + addresses: + - type: Unknown + line1: '' + line2: '' + city: '' + region: '' + country: Great Britain + postalCode: '' + taxNumber: '' + status: Archived + modifiedDate: '2022-10-14T09:35:58Z' + defaultCurrency: GBP + metadata: + isDeleted: true + pageNumber: 1 + pageSize: 2 + totalResults: 943 + _links: + current: + href: /companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/suppliers?page=1&pageSize=2 + self: + href: /companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/suppliers + next: + href: /companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/suppliers?page=2&pageSize=2 + Sage 50 (UK): + value: + results: + - id: CON001 + supplierName: Concept Stationery Supplies + contactName: Mark Ramsay + emailAddress: newbusinessadvice@sage.com + phone: 0191 643 4343 + addresses: + - type: Delivery + line1: 66 New Street + line2: Ridgeway + city: Newcastle Upon Tyne + region: '' + country: GB + postalCode: NE1 4GF + - type: Unknown + line1: 66 New Street + line2: Ridgeway + city: Newcastle upon Tyne + region: '' + country: GB + postalCode: NE1 4GF + taxNumber: GB988 3453 23 + status: Active + modifiedDate: '2023-03-30T14:42:38Z' + sourceModifiedDate: '2022-11-25T09:43:54Z' + defaultCurrency: GBP + metadata: + isDeleted: false + - id: MCN001 + supplierName: McNally Computer Supplies + contactName: Stuart Lynn + emailAddress: newbusinessadvice@sage.com + phone: 0191 415 3434 + addresses: + - type: Delivery + line1: Station Lane Ind Est + line2: Birtley + city: Chester le Street + region: County Durham + country: GB + postalCode: DH1 3RG + - type: Unknown + line1: Station Lane Ind Est + line2: Birtley + city: Chester le Street + region: County Durham + country: GB + postalCode: DH1 3RG + taxNumber: GB455 2385 34 + status: Active + modifiedDate: '2023-03-30T14:42:38Z' + sourceModifiedDate: '2022-12-05T13:37:26Z' + defaultCurrency: GBP + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 15 + _links: + current: + href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/suppliers?page=1&pageSize=2 + self: + href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/suppliers + next: + href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/suppliers?page=2&pageSize=2 + Sage Business Cloud Accounting: + value: + results: + - id: 65179671e9ef424caff8b9006cd111c8 + supplierName: 5555 Abdul's Test Name + contactName: Main Contact + addresses: + - type: Billing + country: United Kingdom (GB) + status: Active + modifiedDate: '2022-10-24T14:52:54Z' + sourceModifiedDate: '2020-02-25T17:23:33Z' + defaultCurrency: GBP + - id: cf7f44d693904944a6a7cf3de0887964 + supplierName: Abdi Supplier + contactName: Abdi + emailAddress: abdisupplier@company.com + addresses: + - type: Billing + line1: 1 Place House + city: London + country: United Kingdom (GB) + postalCode: WC1X 1AH + status: Active + modifiedDate: '2022-10-24T14:52:54Z' + sourceModifiedDate: '2020-02-13T10:38:19Z' + defaultCurrency: GBP + pageNumber: 1 + pageSize: 2 + totalResults: 64 + _links: + current: + href: /companies/390083e2-351b-407c-a3be-55081c36c182/data/suppliers?page=1&pageSize=2 + self: + href: /companies/390083e2-351b-407c-a3be-55081c36c182/data/suppliers + next: + href: /companies/390083e2-351b-407c-a3be-55081c36c182/data/suppliers?page=2&pageSize=2 + Sage Intacct: + value: + results: + - id: '3' + supplierName: ADP + contactName: 'Jones, William' + phone: 214-760-9491 + addresses: + - type: Unknown + line1: 208 S Akard St + line2: '' + city: Dallas + region: TX + country: United States + postalCode: '75265' + registrationNumber: '' + taxNumber: 85-3678274 + status: Active + modifiedDate: '2023-04-04T16:32:20Z' + sourceModifiedDate: '2023-02-16T09:48:27' + defaultCurrency: USD + metadata: + isDeleted: false + - id: '29' + supplierName: Advisor Printing + contactName: 'Roach, Nathan' + phone: 130-202-4796 + addresses: + - type: Unknown + line1: 5 Carey Hill + line2: '' + city: Drayton Valley + region: Alberta + country: Canada + postalCode: G8V + registrationNumber: '' + taxNumber: '' + status: Active + modifiedDate: '2023-04-04T16:32:20Z' + sourceModifiedDate: '2022-06-15T11:38:29' + defaultCurrency: CAD + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 77 + _links: + current: + href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/suppliers?page=1&pageSize=2 + self: + href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/suppliers + next: + href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/suppliers?page=2&pageSize=2 + Wave: + value: + results: + - id: QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O1ZlbmRvcjo2NjA0Nzk0 + supplierName: Computer Shop + contactName: '' + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2022-11-16T18:15:24Z' + sourceModifiedDate: '2020-04-07T13:28:02Z' + defaultCurrency: GBP + - id: QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O1ZlbmRvcjo2NjA0NzQx + supplierName: Flour Mill + contactName: '' + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2022-11-16T18:15:24Z' + sourceModifiedDate: '2020-04-07T13:12:40Z' + defaultCurrency: GBP + pageNumber: 1 + pageSize: 2 + totalResults: 9 + _links: + current: + href: /companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/suppliers?page=1&pageSize=2 + self: + href: /companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/suppliers + next: + href: /companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/suppliers?page=2&pageSize=2 + Xero: + value: + results: + - id: e4c9d0e2-c285-4e85-b579-6d28b180c730 + supplierName: 24 Locks + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2023-03-15T20:36:09Z' + sourceModifiedDate: '2023-02-17T18:03:42' + metadata: + isDeleted: false + - id: bab779bc-c5fb-42cb-a888-953e8309711c + supplierName: 7-Eleven + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2023-03-15T20:36:09Z' + sourceModifiedDate: '2023-02-17T18:03:42' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 48 + _links: + current: + href: /companies/5ced9667-a310-443a-a711-958d36377141/data/suppliers?page=1&pageSize=2 + self: + href: /companies/5ced9667-a310-443a-a711-958d36377141/data/suppliers + next: + href: /companies/5ced9667-a310-443a-a711-958d36377141/data/suppliers?page=2&pageSize=2 + Zoho Books: + value: + results: + - id: '104957000001494001' + supplierName: Acme Corporation + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2022-10-03T08:40:37Z' + sourceModifiedDate: '2022-09-16T13:09:56' + defaultCurrency: GBP + - id: '104957000000648001' + supplierName: Cool company + contactName: Dre + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2022-10-03T08:40:37Z' + sourceModifiedDate: '2022-06-10T09:07:16' + defaultCurrency: CAD + pageNumber: 1 + pageSize: 2 + totalResults: 6 + _links: + current: + href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/suppliers?page=1&pageSize=2 + self: + href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/suppliers + next: + href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/suppliers?page=2&pageSize=2 '400': $ref: '#/components/responses/Malformed-Query' '401': @@ -2957,43 +9430,345 @@ paths: $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/Not-Found' + '409': + $ref: '#/components/responses/Conflict' '429': $ref: '#/components/responses/Too-Many-Requests' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/bankFeedAccounts/{sourceAccountId}/managedBankFeeds/syncs/{syncId}': + description: | + The *List suppliers* endpoint returns a list of [suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) for a given company's connection. + + [Suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. + + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-all-data-types). + + ### Supported Integrations + + | Integration | Supported | + |-------------------------------|-----------| + | Dynamics 365 Business Central | Yes | + | FreeAgent | Yes | + | Oracle NetSuite | Yes | + | QuickBooks Desktop | Yes | + | QuickBooks Online | Yes | + | Sage Intacct | Yes | + | Xero | Yes | + | Zoho Books | Yes | + operationId: list-suppliers + '/companies/{companyId}/data/suppliers/{supplierId}': parameters: - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - - name: sourceAccountId - in: path - required: true - schema: - type: string - description: The ID of the source bank account. - - name: syncId - in: path - required: true - schema: - type: string - format: uuid - description: The ID of the sync. + - $ref: '#/components/parameters/supplierId' get: tags: - - Managed bank feeds - summary: Get sync - operationId: get-managed-bank-feed-sync - x-speakeasy-name-override: get-sync - description: "The _Get sync_ endpoint returns the [sync status](https://docs.codat.io/bank-feeds-api#/schemas/SyncStatusResult) for a given 'syncId'. \n\nA sync is a single execution that fetches bank transactions from a connected bank account and records them in the company's accounting software." + - Suppliers + summary: Get supplier responses: '200': description: Success content: application/json: schema: - $ref: '#/components/schemas/SyncStatusResult' + $ref: '#/components/schemas/Supplier' + examples: + Clear Books: + value: + id: owQ2Gqgj9f + supplierName: Abshire - Kshlerin + contactName: Faye Hansen + emailAddress: hello@Abshire-Kshlerin.info + phone: 01338 858162 + addresses: + - type: Delivery + line1: Suite 431 + line2: 289 Giles Lake + city: Cesarmouth + region: Northern Ireland + country: United Kingdom + postalCode: BG40 9GP + registrationNumber: VYL1XZXR + taxNumber: '1396267523.0914588' + status: Active + modifiedDate: '2023-04-26T12:38:17Z' + sourceModifiedDate: '1660-11-28T23:18:00' + defaultCurrency: GBP + metadata: + isDeleted: false + Dynamics 365 Business Central: + value: + id: 78623f13-931e-eb11-bbf8-0022481b3585 + supplierName: '' + contactName: '' + emailAddress: '' + phone: '' + addresses: + - type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: GB + postalCode: '' + taxNumber: '' + status: Active + modifiedDate: '2023-03-27T14:21:12Z' + sourceModifiedDate: '2020-11-04T11:44:22Z' + defaultCurrency: GBP + metadata: + isDeleted: false + Exact (Netherlands): + value: + id: 3150917c-1d92-4d77-9018-31b5c4758ca9 + supplierName: Abe + contactName: Kelly's Contact Name + emailAddress: sales@kellysupplies.com + phone: 07999 999999 + addresses: + - type: Billing + line1: Unit 51 + city: Bakersfield + region: California + country: US + postalCode: '933081' + registrationNumber: '8409314368' + status: Active + modifiedDate: '2022-10-26T13:32:05Z' + sourceModifiedDate: '2022-07-15T12:01:15Z' + defaultCurrency: EUR + Exact (UK): + value: + id: 0185fea2-0298-445b-909a-0db685118a9e + supplierName: a + addresses: + - type: Billing + country: GB + status: Active + modifiedDate: '2022-10-26T13:33:13Z' + sourceModifiedDate: '2017-08-02T10:58:54Z' + defaultCurrency: GBP + FreeAgent: + value: + id: '11526230' + supplierName: '-' + contactName: Test 1 + addresses: + - type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + status: Active + modifiedDate: '2023-04-25T14:19:08Z' + sourceModifiedDate: '2023-04-17T06:02:46' + metadata: + isDeleted: false + FreshBooks: + value: + id: api vendor + supplierName: api vendor + addresses: [] + status: Active + modifiedDate: '2023-03-24T16:07:25Z' + metadata: + isDeleted: false + KashFlow: + value: + id: '6202387' + supplierName: Dell + contactName: '' + emailAddress: '' + phone: '' + addresses: [] + taxNumber: '' + status: Unknown + modifiedDate: '2022-09-30T10:29:15Z' + sourceModifiedDate: '2017-05-09T00:00:00' + Oracle NetSuite: + value: + id: '779' + supplierName: Test Vendor + contactName: Test Vendor + emailAddress: '' + phone: '' + addresses: [] + status: Active + modifiedDate: '2023-01-30T14:47:02Z' + sourceModifiedDate: '2022-02-04T14:24:43' + defaultCurrency: GBP + QuickBooks Desktop: + value: + id: A60000-1197760912 + supplierName: A Cheung Limited + contactName: Angela Cheung + emailAddress: AC@CheungLimited.com + phone: 510 555 5723 + addresses: + - type: Billing + line1: 'A Cheung Limited, Angela Cheung' + line2: 3818 Bear Rd. West + city: Berkeley + region: CA + postalCode: '94688' + status: Active + modifiedDate: '2023-04-26T09:09:03Z' + sourceModifiedDate: '2023-12-16T05:06:44' + defaultCurrency: GBP + metadata: + isDeleted: false + QuickBooks Online: + value: + id: '41' + supplierName: AI Support + contactName: AI Support + addresses: + - type: Billing + line1: test + region: string + country: Djibouti + status: Active + modifiedDate: '2023-01-18T11:02:36Z' + sourceModifiedDate: '2022-12-07T10:48:18Z' + defaultCurrency: GBP + QuickBooks Online Sandbox: + value: + id: '129' + supplierName: Ally Johnson + contactName: Miss Smith + phone: 0728 38474 + addresses: + - type: Billing + line1: 100 London Road + line2: Angel + city: London + region: Greater London + country: England + postalCode: EC1M + status: Active + modifiedDate: '2023-04-26T09:35:55Z' + sourceModifiedDate: '2023-04-13T01:51:08Z' + defaultCurrency: GBP + metadata: + isDeleted: false + Sage 200cloud: + value: + id: '776' + supplierName: Aaren + contactName: '' + emailAddress: '' + phone: '' + addresses: + - type: Unknown + line1: '' + line2: '' + city: '' + region: '' + country: Great Britain + postalCode: '' + taxNumber: '' + status: Archived + modifiedDate: '2022-10-14T09:35:58Z' + defaultCurrency: GBP + metadata: + isDeleted: true + Sage 50 (UK): + value: + id: CON001 + supplierName: Concept Stationery Supplies + contactName: Mark Ramsay + emailAddress: newbusinessadvice@sage.com + phone: 0191 643 4343 + addresses: + - type: Delivery + line1: 66 New Street + line2: Ridgeway + city: Newcastle Upon Tyne + region: '' + country: GB + postalCode: NE1 4GF + - type: Unknown + line1: 66 New Street + line2: Ridgeway + city: Newcastle upon Tyne + region: '' + country: GB + postalCode: NE1 4GF + taxNumber: GB988 3453 23 + status: Active + modifiedDate: '2023-03-30T14:42:38Z' + sourceModifiedDate: '2022-11-25T09:43:54Z' + defaultCurrency: GBP + metadata: + isDeleted: false + Sage Business Cloud Accounting: + value: + id: 65179671e9ef424caff8b9006cd111c8 + supplierName: 5555 Abdul's Test Name + contactName: Main Contact + addresses: + - type: Billing + country: United Kingdom (GB) + status: Active + modifiedDate: '2022-10-24T14:52:54Z' + sourceModifiedDate: '2020-02-25T17:23:33Z' + defaultCurrency: GBP + Sage Intacct: + value: + id: '3' + supplierName: ADP + contactName: 'Jones, William' + phone: 214-760-9491 + addresses: + - type: Unknown + line1: 208 S Akard St + line2: '' + city: Dallas + region: TX + country: United States + postalCode: '75265' + registrationNumber: '' + taxNumber: 85-3678274 + status: Active + modifiedDate: '2023-04-04T16:32:20Z' + sourceModifiedDate: '2023-02-16T09:48:27' + defaultCurrency: USD + metadata: + isDeleted: false + Wave: + value: + id: QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O1ZlbmRvcjo2NjA0Nzk0 + supplierName: Computer Shop + contactName: '' + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2022-11-16T18:15:24Z' + sourceModifiedDate: '2020-04-07T13:28:02Z' + defaultCurrency: GBP + Xero: + value: + id: e4c9d0e2-c285-4e85-b579-6d28b180c730 + supplierName: 24 Locks + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2023-03-15T20:36:09Z' + sourceModifiedDate: '2023-02-17T18:03:42' + metadata: + isDeleted: false + Zoho Books: + value: + id: '104957000001494001' + supplierName: Acme Corporation + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2022-10-03T08:40:37Z' + sourceModifiedDate: '2022-09-16T13:09:56' + defaultCurrency: GBP '401': $ref: '#/components/responses/Unauthorized' '402': @@ -3002,38 +9777,66 @@ paths: $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/Not-Found' + '409': + $ref: '#/components/responses/Conflict' '429': $ref: '#/components/responses/Too-Many-Requests' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/bankFeedAccounts/{sourceAccountId}/managedBankFeeds/syncs/latest': + description: | + The *Get supplier* endpoint returns a single supplier for a given supplierId. + + [Suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. + + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-all-data-types). + + ### Supported Integrations + + | Integration | Supported | + |-------------------------------|-----------| + | Dynamics 365 Business Central | Yes | + | FreeAgent | Yes | + | Oracle NetSuite | Yes | + | QuickBooks Desktop | Yes | + | QuickBooks Online | Yes | + | Sage Intacct | Yes | + | Xero | Yes | + | Zoho Books | Yes | + operationId: get-supplier + '/companies/{companyId}/connections/{connectionId}/push/suppliers': parameters: - $ref: '#/components/parameters/companyId' - $ref: '#/components/parameters/connectionId' - - name: sourceAccountId - in: path - required: true - schema: - type: string - description: The ID of the source bank account. - get: + post: tags: - - Managed bank feeds - summary: Get latest sync - operationId: get-latest-managed-bank-feed-sync - x-speakeasy-name-override: get-latest-sync - description: "The _Get latest sync_ endpoint returns the status for a given source account's [most recent sync](https://docs.codat.io/bank-feeds-api#/schemas/SyncStatusResult). \n\nA sync is a single execution that fetches bank transactions from a connected bank account and records them in the company's accounting software." + - Suppliers + parameters: + - $ref: '#/components/parameters/timeoutInMinutes' + - $ref: '#/components/parameters/allowSyncOnPushComplete' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Supplier' + examples: + Sage Intacct: + value: + id: '73593' + supplierName: test 20230420 1004 + contactName: Joe Bloggs + status: Active responses: '200': description: Success content: application/json: schema: - $ref: '#/components/schemas/SyncStatusResult' - '204': - description: No Content + $ref: '#/components/schemas/CreateSupplierResponse' + examples: {} + '400': + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -3048,35 +9851,54 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/bankFeedAccounts/{sourceAccountId}/managedBankFeeds/syncs': + summary: Create supplier + description: | + The *Create supplier* endpoint creates a new [supplier](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) for a given company's connection. + + [Suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. + + **Integration-specific behavior** + + Required data may vary by integration. To see what data to post, first call [Get create/update supplier model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-suppliers-model). + + ### Supported Integrations + + | Integration | Supported | + |-------------------------------|-----------| + | Dynamics 365 Business Central | Yes | + | FreeAgent | Yes | + | Oracle NetSuite | Yes | + | QuickBooks Desktop | Yes | + | QuickBooks Online | Yes | + | Sage Intacct | Yes | + | Xero | Yes | + | Zoho Books | Yes | + operationId: create-supplier + '/companies/{companyId}/connections/{connectionId}/push/suppliers/{supplierId}': parameters: - $ref: '#/components/parameters/companyId' - $ref: '#/components/parameters/connectionId' - - name: sourceAccountId - in: path - required: true - schema: - type: string - description: The ID of the source bank account. - post: + - $ref: '#/components/parameters/supplierId' + put: tags: - - Managed bank feeds - summary: Run ad-hoc sync - operationId: run-managed-bank-feed-ad-hoc-sync - x-speakeasy-name-override: run-ad-hoc-sync - description: |- - The _Run ad-hoc sync_ endpoint immediately runs a sync with a fetch period from the last successful sync to the execution time of the new sync. - - A sync is a single execution that fetches bank transactions from a connected bank account and records them in the company's accounting software. - - Use either the [_Get latest sync_](https://docs.codat.io/bank-feeds-api#/operations/get-latest-managed-bank-feed-sync) endpoint or the [_Get sync_](https://docs.codat.io/bank-feeds-api#/operations/fetch-managed-bank-feed-sync-by-id) endpoint to get the result of this sync. + - Suppliers + parameters: + - $ref: '#/components/parameters/timeoutInMinutes' + - $ref: '#/components/parameters/allowSyncOnPushComplete' + - $ref: '#/components/parameters/forceUpdate' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Supplier' responses: - '201': - description: Created + '200': + description: Success content: application/json: schema: - $ref: '#/components/schemas/StartScheduledSyncResult' + $ref: '#/components/schemas/UpdateSupplierResponse' + examples: {} '400': $ref: '#/components/responses/BadRequest' '401': @@ -3087,1158 +9909,1912 @@ paths: $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/Not-Found' - '409': - $ref: '#/components/responses/Conflict' '429': $ref: '#/components/responses/Too-Many-Requests' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' + summary: Update supplier + description: | + The *Update supplier* endpoint updates an existing [supplier](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) for a given company's connection. + + [Suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. + + **Integration-specific behavior** + + Required data may vary by integration. To see what data to post, first call [Get create/update supplier model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-suppliers-model). + + ### Supported Integrations + + | Integration | Supported | + |-------------------|-----------| + | FreeAgent | Yes | + | QuickBooks Online | Yes | + | Xero | Yes | + operationId: update-supplier webhooks: - client.rateLimit.reached: + expenses.sync.successful: post: - description: Called when your client’s request count to Codat's API surpasses the allocated quota. + description: Called when an expense sync successfully completes without any errors or warnings. requestBody: content: application/json: schema: - $ref: '#/components/schemas/ClientRateLimitWebhook' + $ref: '#/components/schemas/ExpensesSyncWebhook' examples: - Reached: + Successful: value: - id: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b - eventType: client.rateLimit.reached + id: ba29118f-5406-4e59-b05c-ba307ca38d01 + eventType: expenses.sync.successful generatedDate: '2024-09-01T00:00:00Z' payload: - dailyQuota: 12000 - quotaRemaining: 0 - expiryDate: '2024-09-01T12:14:14Z' + referenceCompany: + id: 0498e921-9b53-4396-a412-4f2f5983b0a2 + name: Toft stores + description: Syncing expenses + syncId: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd + transactions: + - id: f47ac10b-58cc-4372-a567-0e02b2c3d479 + status: Completed + errorMessage: null + - id: e7f8a3d5-0c3c-4c9b-b5d3-56b4a43b62e4 + status: Completed + errorMessage: null responses: '200': description: Return a 200 status to indicate that the webhook was received successfully. - client.rateLimit.reset: + expenses.sync.unsuccessful: post: - description: 'Called when your client''s rate limit quota is reset, allowing additional requests to Codat''s API.' + description: 'Called when an expense sync fails to complete successfully, resulting in at least one error or warning.' requestBody: content: application/json: schema: - $ref: '#/components/schemas/ClientRateLimitWebhook' + $ref: '#/components/schemas/ExpensesSyncWebhook' examples: - Reset: + Unsuccessful: value: - id: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b - eventType: client.rateLimit.reset + id: ba29118f-5406-4e59-b05c-ba307ca38d01 + eventType: expenses.sync.unsuccessful generatedDate: '2024-09-01T00:00:00Z' payload: - dailyQuota: 12000 - quotaRemaining: 11993 - expiryDate: '2024-09-01T23:59:99Z' + referenceCompany: + id: 0498e921-9b53-4396-a412-4f2f5983b0a2 + name: Toft stores + description: Syncing expenses + syncId: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd + transactions: + - id: f47ac10b-58cc-4372-a567-0e02b2c3d479 + status: Completed + errorMessage: null + - id: e7f8a3d5-0c3c-4c9b-b5d3-56b4a43b62e4 + status: Failed + errorMessage: Insufficient funds responses: '200': description: Return a 200 status to indicate that the webhook was received successfully. - bankFeeds.sourceAccount.connected: + client.rateLimit.reached: post: - description: Triggered when a bank feed source account has become connected to a target account. This occurs when a user sets up mapping between the two. - x-svix-feature-flag: bank-feeds + description: Called when your client’s request count to Codat's API surpasses the allocated quota. requestBody: content: application/json: schema: - $ref: '#/components/schemas/SourceAccountWebhook' + $ref: '#/components/schemas/ClientRateLimitWebhook' examples: - Connected: + Reached: value: - id: ba29118f-5406-4e59-b05c-ba307ca38d01 - eventType: bankFeeds.sourceAccount.connected - generatedDate: '2022-10-23T00:00:00.000Z' + id: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b + eventType: client.rateLimit.reached + generatedDate: '2024-09-01T00:00:00Z' payload: - referenceCompany: - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - name: Toft stores - description: Requested early access to the new financing scheme. - links: - portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' - connectionId: 2e9d2c44-f675-40ba-8049-353bfcb5e171 - sourceAccount: - id: acc-002 - accountName: account-081 - sortCode: '040004' - accountNumber: '12345678' - currency: GBP - balance: 99.99 - modifiedDate: '2023-01-09T14:14:14.1057478Z' - status: pending + dailyQuota: 12000 + quotaRemaining: 0 + expiryDate: '2024-09-01T12:14:14Z' responses: '200': description: Return a 200 status to indicate that the webhook was received successfully. - bankFeeds.sourceAccount.disconnected: + client.rateLimit.reset: post: - description: Called when a bank feed source account has become disconnected. - x-svix-feature-flag: bank-feeds + description: 'Called when your client''s rate limit quota is reset, allowing additional requests to Codat''s API.' requestBody: content: application/json: schema: - $ref: '#/components/schemas/SourceAccountWebhook' + $ref: '#/components/schemas/ClientRateLimitWebhook' examples: - Disconnected: + Reset: value: - id: ba29118f-5406-4e59-b05c-ba307ca38d01 - eventType: bankFeeds.sourceAccount.disconnected - generatedDate: '2022-10-23T00:00:00.000Z' + id: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b + eventType: client.rateLimit.reset + generatedDate: '2024-09-01T00:00:00Z' payload: - referenceCompany: - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - name: Toft stores - description: Requested early access to the new financing scheme. - links: - portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' - connectionId: 2e9d2c44-f675-40ba-8049-353bfcb5e171 - sourceAccount: - id: acc-002 - accountName: account-081 - sortCode: '040004' - accountNumber: '12345678' - currency: GBP - balance: 99.99 - modifiedDate: '2023-01-09T14:14:14.1057478Z' - status: pending + dailyQuota: 12000 + quotaRemaining: 11993 + expiryDate: '2024-09-01T23:59:99Z' responses: '200': description: Return a 200 status to indicate that the webhook was received successfully. components: schemas: - BankAccountCredentials: - title: Bank Account Credentials - description: Result of generate credentials + Account: + title: 'Accounting: Account' + description: "\uFEFF\x3E\x20\x2A\x2A\x4C\x61\x6E\x67\x75\x61\x67\x65\x20\x74\x69\x70\x3A\x2A\x2A\x20\x41\x63\x63\x6F\x75\x6E\x74\x73\x20\x61\x72\x65\x20\x61\x6C\x73\x6F\x20\x72\x65\x66\x65\x72\x72\x65\x64\x20\x74\x6F\x20\x61\x73\x20\x2A\x2A\x63\x68\x61\x72\x74\x20\x6F\x66\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x2A\x2A\x2C\x20\x2A\x2A\x6E\x6F\x6D\x69\x6E\x61\x6C\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x2A\x2A\x2C\x20\x61\x6E\x64\x20\x2A\x2A\x67\x65\x6E\x65\x72\x61\x6C\x20\x6C\x65\x64\x67\x65\x72\x2A\x2A\x2E\n\n\x23\x23\x20\x4F\x76\x65\x72\x76\x69\x65\x77\n\n\x41\x63\x63\x6F\x75\x6E\x74\x73\x20\x61\x72\x65\x20\x74\x68\x65\x20\x63\x61\x74\x65\x67\x6F\x72\x69\x65\x73\x20\x61\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x75\x73\x65\x73\x20\x74\x6F\x20\x72\x65\x63\x6F\x72\x64\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E\x73\x2E\x20\x46\x72\x6F\x6D\x20\x74\x68\x65\x20\x41\x63\x63\x6F\x75\x6E\x74\x73\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x73\x2C\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x72\x65\x74\x72\x69\x65\x76\x65\x20\x61\x20\x6C\x69\x73\x74\x20\x6F\x66\x20\x61\x6C\x6C\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x20\x66\x6F\x72\x20\x61\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2E\n\n\x54\x68\x65\x20\x63\x61\x74\x65\x67\x6F\x72\x69\x65\x73\x20\x66\x6F\x72\x20\x61\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x69\x6E\x63\x6C\x75\x64\x65\x3A\n\x2A\x20\x41\x73\x73\x65\x74\n\x2A\x20\x45\x78\x70\x65\x6E\x73\x65\n\x2A\x20\x49\x6E\x63\x6F\x6D\x65\n\x2A\x20\x4C\x69\x61\x62\x69\x6C\x69\x74\x79\n\x2A\x20\x45\x71\x75\x69\x74\x79\x2E\n\n\x54\x68\x65\x20\x73\x61\x6D\x65\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x6D\x61\x79\x20\x68\x61\x76\x65\x20\x61\x20\x64\x69\x66\x66\x65\x72\x65\x6E\x74\x20\x63\x61\x74\x65\x67\x6F\x72\x79\x20\x62\x61\x73\x65\x64\x20\x6F\x6E\x20\x74\x68\x65\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x69\x74\x20\x69\x73\x20\x75\x73\x65\x64\x20\x69\x6E\x2E\x20\x46\x6F\x72\x20\x65\x78\x61\x6D\x70\x6C\x65\x2C\x20\x61\x20\x63\x75\x72\x72\x65\x6E\x74\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x28\x6B\x6E\x6F\x77\x6E\x20\x61\x73\x20\x63\x68\x65\x63\x6B\x69\x6E\x67\x20\x69\x6E\x20\x74\x68\x65\x20\x55\x53\x29\x20\x73\x68\x6F\x75\x6C\x64\x20\x62\x65\x20\x63\x61\x74\x65\x67\x6F\x72\x69\x7A\x65\x64\x20\x61\x73\x20\x60\x41\x73\x73\x65\x74\x2E\x43\x75\x72\x72\x65\x6E\x74\x60\x20\x66\x6F\x72\x20\x58\x65\x72\x6F\x2C\x20\x61\x6E\x64\x20\x60\x41\x73\x73\x65\x74\x2E\x42\x61\x6E\x6B\x2E\x43\x68\x65\x63\x6B\x69\x6E\x67\x60\x20\x66\x6F\x72\x20\x51\x75\x69\x63\x6B\x42\x6F\x6F\x6B\x73\x20\x4F\x6E\x6C\x69\x6E\x65\x2E\n\n\x41\x74\x20\x74\x68\x65\x20\x73\x61\x6D\x65\x20\x74\x69\x6D\x65\x2C\x20\x65\x61\x63\x68\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x6D\x61\x79\x20\x68\x61\x76\x65\x20\x69\x74\x73\x20\x6F\x77\x6E\x20\x72\x65\x71\x75\x69\x72\x65\x6D\x65\x6E\x74\x73\x20\x74\x6F\x20\x74\x68\x65\x20\x63\x61\x74\x65\x67\x6F\x72\x69\x65\x73\x2E\x20\x46\x6F\x72\x20\x65\x78\x61\x6D\x70\x6C\x65\x2C\x20\x61\x20\x50\x61\x79\x70\x61\x6C\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x69\x6E\x20\x58\x65\x72\x6F\x20\x69\x73\x20\x6F\x66\x20\x74\x68\x65\x20\x60\x41\x73\x73\x65\x74\x2E\x42\x61\x6E\x6B\x60\x20\x63\x61\x74\x65\x67\x6F\x72\x79\x20\x61\x6E\x64\x20\x74\x68\x65\x72\x65\x66\x6F\x72\x65\x20\x72\x65\x71\x75\x69\x72\x65\x73\x20\x61\x64\x64\x69\x74\x69\x6F\x6E\x61\x6C\x20\x70\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x20\x74\x6F\x20\x62\x65\x20\x70\x72\x6F\x76\x69\x64\x65\x64\x2E\n\n\x54\x6F\x20\x64\x65\x74\x65\x72\x6D\x69\x6E\x65\x20\x74\x68\x65\x20\x6C\x69\x73\x74\x20\x6F\x66\x20\x61\x6C\x6C\x6F\x77\x65\x64\x20\x63\x61\x74\x65\x67\x6F\x72\x69\x65\x73\x20\x66\x6F\x72\x20\x61\x20\x73\x70\x65\x63\x69\x66\x69\x63\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2C\x20\x79\x6F\x75\x20\x63\x61\x6E\x3A\n\x2D\x20\x46\x6F\x6C\x6C\x6F\x77\x20\x6F\x75\x72\x20\x5B\x43\x72\x65\x61\x74\x65\x2C\x20\x75\x70\x64\x61\x74\x65\x2C\x20\x64\x65\x6C\x65\x74\x65\x20\x64\x61\x74\x61\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x75\x73\x69\x6E\x67\x2D\x74\x68\x65\x2D\x61\x70\x69\x2F\x70\x75\x73\x68\x29\x20\x67\x75\x69\x64\x65\x20\x61\x6E\x64\x20\x75\x73\x65\x20\x74\x68\x65\x20\x5B\x47\x65\x74\x20\x63\x72\x65\x61\x74\x65\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x6D\x6F\x64\x65\x6C\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E\x73\x2F\x67\x65\x74\x2D\x63\x72\x65\x61\x74\x65\x2D\x63\x68\x61\x72\x74\x4F\x66\x41\x63\x63\x6F\x75\x6E\x74\x73\x2D\x6D\x6F\x64\x65\x6C\x29\x2E\n\x2D\x20\x52\x65\x66\x65\x72\x20\x74\x6F\x20\x74\x68\x65\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x27\x73\x20\x6F\x77\x6E\x20\x64\x6F\x63\x75\x6D\x65\x6E\x74\x61\x74\x69\x6F\x6E\x2E\n\n\x3E\x20\x2A\x2A\x41\x63\x63\x6F\x75\x6E\x74\x73\x20\x77\x69\x74\x68\x20\x6E\x6F\x20\x63\x61\x74\x65\x67\x6F\x72\x79\x2A\x2A\n\x3E\n\x3E\x20\x49\x66\x20\x61\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x69\x73\x20\x70\x75\x6C\x6C\x65\x64\x20\x66\x72\x6F\x6D\x20\x74\x68\x65\x20\x63\x68\x61\x72\x74\x20\x6F\x66\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x20\x61\x6E\x64\x20\x69\x74\x73\x20\x6E\x6F\x6D\x69\x6E\x61\x6C\x20\x63\x6F\x64\x65\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x6C\x69\x65\x20\x77\x69\x74\x68\x69\x6E\x20\x74\x68\x65\x20\x63\x61\x74\x65\x67\x6F\x72\x79\x20\x6C\x61\x79\x6F\x75\x74\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x27\x73\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x2C\x20\x74\x68\x65\x6E\x20\x74\x68\x65\x20\x2A\x2A\x74\x79\x70\x65\x2A\x2A\x20\x69\x73\x20\x60\x55\x6E\x6B\x6E\x6F\x77\x6E\x60\x2E\x20\x54\x68\x65\x20\x2A\x2A\x66\x75\x6C\x6C\x79\x51\x75\x61\x6C\x69\x66\x69\x65\x64\x43\x61\x74\x65\x67\x6F\x72\x79\x2A\x2A\x20\x61\x6E\x64\x20\x2A\x2A\x66\x75\x6C\x6C\x79\x51\x75\x61\x6C\x69\x66\x69\x65\x64\x4E\x61\x6D\x65\x2A\x2A\x20\x66\x69\x65\x6C\x64\x73\x20\x72\x65\x74\x75\x72\x6E\x20\x60\x6E\x75\x6C\x6C\x60\x2E\n\x3E\n\x3E\x20\x54\x68\x69\x73\x20\x61\x70\x70\x72\x6F\x61\x63\x68\x20\x67\x69\x76\x65\x73\x20\x61\x20\x74\x72\x75\x65\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x61\x74\x69\x6F\x6E\x20\x6F\x66\x20\x74\x68\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x27\x73\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x20\x77\x68\x69\x6C\x73\x74\x20\x70\x72\x65\x76\x65\x6E\x74\x69\x6E\x67\x20\x64\x69\x73\x74\x6F\x72\x74\x69\x6E\x67\x20\x66\x69\x6E\x61\x6E\x63\x69\x61\x6C\x73\x20\x73\x75\x63\x68\x20\x61\x73\x20\x61\x20\x63\x6F\x6D\x70\x61\x6E\x79\x27\x73\x20\x70\x72\x6F\x66\x69\x74\x20\x61\x6E\x64\x20\x6C\x6F\x73\x73\x20\x61\x6E\x64\x20\x62\x61\x6C\x61\x6E\x63\x65\x20\x73\x68\x65\x65\x74\x20\x72\x65\x70\x6F\x72\x74\x73\x2E" + allOf: + - properties: + id: + type: string + description: 'Identifier for the account, unique for the company.' + example: 1b6266d1-1e44-46c5-8eb5-a8f98e03124e + - $ref: '#/components/schemas/Account/definitions/accountPrototype' + - properties: + metadata: + title: Metadata + type: object + x-internal: true + properties: + isDeleted: + type: boolean + description: Indicates whether the record has been deleted in the third-party system this record originated from. + nullable: true + - title: Modified dates + x-internal: true + allOf: + - title: ModifiedDate + x-internal: true + type: object + properties: + modifiedDate: + allOf: + - $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + - description: |- + The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + + Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + + This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + + In Codat's data model, dates and times are represented using the ISO 8601 standard. + - title: Source Modified Date + x-internal: true + type: object + nullable: true + properties: + sourceModifiedDate: + allOf: + - $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + - description: "The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. \n\nIt is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when:\n - Pulling attachments\n - The accounting software does not provide modification dates for a data type\n - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred\n - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records\n\nIn Codat's data model, dates and times are represented using the ISO 8601 standard." + definitions: + accountPrototype: + title: Account prototype + type: object + properties: + nominalCode: + type: string + nullable: true + description: Reference given to each nominal account for a business. It ensures money is allocated to the correct account. This code isn't a unique identifier in the Codat system. + example: '610' + name: + type: string + nullable: true + description: Name of the account. + example: Accounts Receivable + description: + type: string + nullable: true + description: Description for the account. + example: Invoices the business has issued but has not yet collected payment on. + fullyQualifiedCategory: + type: string + nullable: true + description: "Full category of the account. \r\n\r\nFor example, `Liability.Current` or `Income.Revenue`. To determine a list of possible categories for each integration, see our examples, follow our [Create, update, delete data](https://docs.codat.io/using-the-api/push) guide, or refer to the integration's own documentation." + example: Asset.Current + fullyQualifiedName: + type: string + nullable: true + description: |- + Full name of the account, for example: + - `Cash On Hand` + - `Rents Held In Trust` + - `Fixed Asset` + examples: + - Cash On Hand + - Fixed Asset + currency: + title: Currency + x-internal: true + type: string + description: "The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.\n\n## Unknown currencies\n\nIn line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction. \n\nThere are only a very small number of edge cases where this currency code is returned by the Codat system." + format: ISO4217 + examples: + - GBP + - USD + - EUR + currentBalance: + type: number + format: decimal + nullable: true + description: Current balance in the account. + example: 0 + type: + $ref: '#/components/schemas/Account/definitions/accountType' + status: + $ref: '#/components/schemas/Account/definitions/accountStatus' + isBankAccount: + type: boolean + description: Confirms whether the account is a bank account or not. + validDatatypeLinks: + type: array + nullable: true + description: 'The validDatatypeLinks can be used to determine whether an account can be correctly mapped to another object; for example, accounts with a `type` of `income` might only support being used on an Invoice and Direct Income. For more information, see [Valid Data Type Links](/sync-for-expenses-api#/schemas/ValidDataTypeLinks).' + items: + title: Valid data type links + description: "When querying Codat's data model, some data types return `validDatatypeLinks` metadata in the JSON response. This indicates where that object can be used as a reference—a _valid link_—when creating or updating other data.\n\nFor example, `validDatatypeLinks` might indicate the following references:\n\n- Which tax rates are valid to use on the line item of a bill.\n- Which items can be used when creating an invoice. \n\nYou can use `validDatatypeLinks` to present your SMB customers with only valid choices when selecting objects from a list, for example.\n\n## `validDatatypeLinks` example\n\nThe following example uses the `Accounting.Accounts` data type. It shows that, on the linked integration, this account is valid as the account on a payment or bill payment; and as the account referenced on the line item of a direct income or direct cost. Because there is no valid link to Invoices or Bills, using this account on those data types will result in an error.\n\n```json validDatatypeLinks for an account\n{\n \"id\": \"bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4\",\n \"nominalCode\": \"090\",\n \"name\": \"Business Bank Account\",\n #...\n \"validDatatypeLinks\": [\n {\n \"property\": \"Id\",\n \"links\": [\n \"Payment.AccountRef.Id\",\n \"BillPayment.AccountRef.Id\",\n \"DirectIncome.LineItems.AccountRef.Id\",\n \"DirectCost.LineItems.AccountRef.Id\"\n ]\n }\n ]\n }\n```\n\n\n\n## Support for `validDatatypeLinks`\n\nCodat currently supports `validDatatypeLinks` for some data types on our Xero, QuickBooks Online, QuickBooks Desktop, Exact (NL), and Sage Business Cloud integrations. \n\nIf you'd like us to extend support to more data types or integrations, suggest or vote for this on our Product Roadmap." + type: object + properties: + property: + type: string + nullable: true + description: The property from the account that can be linked. + links: + type: array + nullable: true + description: Supported `dataTypes` that the record can be linked to. + items: + type: string + supplementalData: + $ref: '#/components/schemas/SupplementalData' + accountRef: + title: Account reference + type: object + description: 'Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account.' + properties: + id: + type: string + description: '''id'' from the Accounts data type.' + name: + type: string + description: '''name'' from the Accounts data type.' + accountType: + title: Account type + enum: + - Unknown + - Asset + - Expense + - Income + - Liability + - Equity + type: string + description: Type of account + example: Asset + accountStatus: + title: Account status + enum: + - Unknown + - Active + - Archived + - Pending + type: string + description: Status of the account + example: Active + type: object + AccountMappingInfo: + title: Account mapping info + x-internal: true + type: object + additionalProperties: false + x-examples: + Example AccountInfo: + id: 313a4dbe-b3a4-42f0-a5f5-43e382e62db9 + nominalCode: '720' + name: Travel + currency: GBP + accountType: Expense + fullyQualifiedCategory: Expense.Overhead + isBankAccount: false + validTransactionTypes: + - Payment + - Refund + validFor: + - expense-transactions.Payment + - expense-transactions.Refund + - reimbursable-expense-transactions + properties: + id: + type: string + description: Unique identifier of account. + example: 127f3b99-8dc2-4b7e-854c-91ef9bd2757b + nullable: false + nominalCode: + type: string + description: Code used to identify each nominal account in the accounting software. + example: '300' + nullable: true + name: + type: string + description: Name of the account as it appears in the company's accounting software. + example: Purchases + nullable: false + currency: + type: string + description: Currency of the account. + example: GBP + nullable: false + accountType: + type: string + description: Type of the account. + example: Expense + enum: + - Asset + - Liability + - Income + - Expense + - Equity + nullable: false + fullyQualifiedCategory: + type: string + description: Full account type and category of the account + example: Expense.DirectCosts + nullable: false + isBankAccount: + type: boolean + description: Confirms whether the account is a bank account or not. + validTransactionTypes: + $ref: '#/components/schemas/validTransactionTypes' + description: Supported transaction types for the account. + validFor: + $ref: '#/components/schemas/validFor' + description: Supported endpoints for the account. + AdjustmentTransactionLine: + x-internal: true + title: Adjustment transaction line + type: object + properties: + amount: + type: number + format: decimal + example: 50 + description: Amount of the line. A positive line represents a debit; a negative line represents a credit. + accountRef: + $ref: '#/components/schemas/RecordRef' + description: + type: string + description: 'Any private, company notes about the transaction.' + example: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + trackingRefs: + type: array + minItems: 1 + maxItems: 10 + nullable: true + items: + $ref: '#/components/schemas/TrackingRefAdjustmentTransaction' + invoiceTo: + $ref: '#/components/schemas/InvoiceTo' + required: + - amount + - accountRef + AdjustmentTransactionRequest: + title: Adjustment transaction + type: object + properties: + id: + type: string + format: uuid + description: Your unique identifier for the transaction. + date: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: Date of the transaction. + currency: + type: string + description: Currency the transaction was recorded in. + currencyRate: + $ref: '#/components/schemas/ExpenseTransaction/properties/currencyRate' + reference: + type: string + nullable: true + description: User-friendly reference for the adjustment transaction. + lines: + type: array + description: Array of transaction lines. + minItems: 1 + maxItems: 100 + items: + $ref: '#/components/schemas/AdjustmentTransactionLine' + required: + - id + - date + - currency + - lines + AdjustmentTransactionResponse: + title: Adjustment response + x-internal: true + type: object + properties: + syncId: + type: string + example: cd937d46-8e41-43a9-9477-a79158ffd98a + format: uuid + description: Unique id of sync created + apAccountRef: + x-internal: true + type: object + title: Accounts Payable account reference + nullable: true + properties: + id: + type: string + example: 8000004C-1724173136 + description: Unique identifier for the Accounts Payable account associated with the transaction. The `apAccountRef` object is currently supported only for QuickBooks Desktop. + Attachment: + title: Attachment + type: object + x-examples: + Attachment Example: + companyId: bf1e0242-5b7a-418b-a307-9e09dbf9f39a + id: '1400000000122699154' + transactionId: f8f00edd-ddb0-4ca5-b36b-8f932e6b5160 + properties: + companyId: + type: string + format: uuid + description: Unique ID of company in Codat + id: + type: string + description: Unique identifier of attachment + transactionId: + type: string + description: Unique identifier of transaction + AttachmentUpload: + title: Attachment upload + type: object + x-internal: true + required: + - file + properties: + file: + $ref: '#/components/schemas/AttachmentUpload/definitions/codatFile' + definitions: + codatFile: + type: string + description: The file to be uploaded as an attachment. + format: binary + BankAccount: + title: 'Accounting: Bank account' + description: "> **Accessing Bank Accounts through Banking API**\n> \n> This datatype was originally used for accessing bank account data both in accounting integrations and open banking aggregators. \n> \n> To view bank account data through the Banking API, please refer to the new [Banking: Account](https://docs.codat.io/sync-for-expenses-api#/schemas/Account) data type.\n\n## Overview\n\nA list of bank accounts associated with a company and a specific data connection.\n\nBank accounts data includes:\n* The name and ID of the account in the accounting software.\n* The currency and balance of the account.\n* The sort code and account number." + type: object + allOf: + - properties: + id: + type: string + description: 'Identifier for the account, unique for the company in the accounting software.' + - $ref: '#/components/schemas/BankAccount/definitions/bankAccountPrototype' + - properties: + metadata: + $ref: '#/components/schemas/Account/allOf/2/properties/metadata' + supplementalData: + $ref: '#/components/schemas/SupplementalData' + - $ref: '#/components/schemas/Account/allOf/3' + definitions: + bankAccountPrototype: + title: Bank account prototype + type: object + properties: + accountName: + type: string + nullable: true + description: Name of the bank account in the accounting software. + accountType: + title: Bank Account Type + x-internal: true + enum: + - Unknown + - Credit + - Debit + type: string + description: "The type of transactions and balances on the account. \nFor Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities. \nFor Debit accounts, positive balances are assets, and positive transactions **increase** assets." + nominalCode: + type: string + nullable: true + description: Code used to identify each nominal account for a business. + sortCode: + type: string + nullable: true + description: |- + Sort code for the bank account. + + Xero integrations + The sort code is only displayed when the currency = GBP and the sort code and account number sum to 14 digits. For non-GBP accounts, this field is not populated. + accountNumber: + type: string + nullable: true + description: |- + Account number for the bank account. + + Xero integrations + Only a UK account number shows for bank accounts with GBP currency and a combined total of sort code and account number that equals 14 digits, For non-GBP accounts, the full bank account number is populated. + + FreeAgent integrations + For Credit accounts, only the last four digits are required. For other types, the field is optional. + iBan: + type: string + nullable: true + description: International bank account number of the account. Often used when making or receiving international payments. + currency: + $ref: '#/components/schemas/Account/definitions/accountPrototype/properties/currency' + description: Base currency of the bank account. + balance: + type: number + format: decimal + nullable: true + description: Balance of the bank account. + institution: + type: string + nullable: true + description: The institution of the bank account. + availableBalance: + type: number + format: decimal + nullable: true + description: Total available balance of the bank account as reported by the underlying data source. This may take into account overdrafts or pending transactions for example. + overdraftLimit: + type: number + format: decimal + nullable: true + description: |- + Pre-arranged overdraft limit of the account. + + The value is always positive. For example, an overdraftLimit of `1000` means that the balance of the account can go down to `-1000`. + status: + $ref: '#/components/schemas/BankAccount/definitions/bankAccountStatus' + bankAccountCreateResponse: + title: Create bank account response + allOf: + - properties: + data: + allOf: + - $ref: '#/components/schemas/BankAccount' + - deprecated: true + - $ref: '#/components/schemas/PushOperation' + bankAccountRef: + title: Bank account reference + type: object + properties: + id: + type: string + description: Bank account 'id' for the account transaction. + name: + type: string + description: bank account 'name' for the account transaction. + description: Links to the Account transactions data type. + bankAccounts: + title: 'Accounting: Bank accounts' + allOf: + - type: object + properties: + results: + type: array + items: + $ref: '#/components/schemas/BankAccount' + - $ref: '#/components/schemas/PagingInfo' + bankAccountStatus: + title: Account status + enum: + - Unknown + - Active + - Archived + - Pending + type: string + description: Status of the bank account. + example: Active + ClientRateLimitWebhook: + title: Client rate limit webhook + type: object + properties: + id: + type: string + format: uuid + example: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b + description: Unique identifier of the event. + eventType: + type: string + description: The type of event. + examples: + - client.rateLimit.reset + - client.rateLimit.reached + generatedDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: The date time in UTC the event was generated in Codat. + payload: + $ref: '#/components/schemas/ClientRateLimitWebhook/definitions/clientRateLimitWebhookPayload' + definitions: + clientRateLimitWebhookPayload: + title: Client rate limit webhook payload + type: object + properties: + dailyQuota: + type: integer + description: The number of available requests per day. + quotaRemaining: + type: integer + description: Total number of requests remaining for your client. + expiryDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: The date time in UTC when your daily quota is reset. + Companies: + title: Companies + x-internal: true + allOf: + - type: object + properties: + results: + type: array + items: + $ref: '#/components/schemas/Company' + - $ref: '#/components/schemas/PagingInfo' + Company: + title: Company + description: "\uFEFF\x49\x6E\x20\x43\x6F\x64\x61\x74\x2C\x20\x61\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x61\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x64\x61\x74\x61\x2E\x20\x45\x61\x63\x68\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x68\x61\x76\x65\x20\x6D\x75\x6C\x74\x69\x70\x6C\x65\x20\x5B\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x29\x20\x74\x6F\x20\x64\x69\x66\x66\x65\x72\x65\x6E\x74\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x73\x20\x73\x75\x63\x68\x20\x61\x73\x20\x6F\x6E\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x5B\x58\x65\x72\x6F\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x2F\x78\x65\x72\x6F\x2F\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x2D\x78\x65\x72\x6F\x29\x20\x66\x6F\x72\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x64\x61\x74\x61\x2C\x20\x74\x77\x6F\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x74\x6F\x20\x5B\x50\x6C\x61\x69\x64\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x62\x61\x6E\x6B\x69\x6E\x67\x2F\x70\x6C\x61\x69\x64\x2F\x62\x61\x6E\x6B\x69\x6E\x67\x2D\x70\x6C\x61\x69\x64\x29\x20\x66\x6F\x72\x20\x74\x77\x6F\x20\x62\x61\x6E\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x20\x61\x6E\x64\x20\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x5B\x5A\x65\x74\x74\x6C\x65\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x63\x6F\x6D\x6D\x65\x72\x63\x65\x2F\x7A\x65\x74\x74\x6C\x65\x2F\x63\x6F\x6D\x6D\x65\x72\x63\x65\x2D\x7A\x65\x74\x74\x6C\x65\x29\x20\x66\x6F\x72\x20\x50\x4F\x53\x20\x64\x61\x74\x61\x2E\n\n\x54\x79\x70\x69\x63\x61\x6C\x6C\x79\x20\x65\x61\x63\x68\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x69\x73\x20\x6F\x6E\x65\x20\x6F\x66\x20\x79\x6F\x75\x72\x20\x63\x75\x73\x74\x6F\x6D\x65\x72\x73\x2E\n\n\x57\x68\x65\x6E\x20\x79\x6F\x75\x20\x63\x72\x65\x61\x74\x65\x20\x61\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2C\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x73\x70\x65\x63\x69\x66\x79\x20\x61\x20\x60\x6E\x61\x6D\x65\x60\x20\x61\x6E\x64\x20\x77\x65\x20\x77\x69\x6C\x6C\x20\x61\x75\x74\x6F\x6D\x61\x74\x69\x63\x61\x6C\x6C\x79\x20\x67\x65\x6E\x65\x72\x61\x74\x65\x20\x61\x20\x75\x6E\x69\x71\x75\x65\x20\x60\x69\x64\x60\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2E\x20\x59\x6F\x75\x20\x63\x61\x6E\x20\x61\x6C\x73\x6F\x20\x61\x64\x64\x20\x61\x20\x60\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x60\x20\x74\x6F\x20\x73\x74\x6F\x72\x65\x20\x61\x6E\x79\x20\x61\x64\x64\x69\x74\x69\x6F\x6E\x61\x6C\x20\x69\x6E\x66\x6F\x72\x6D\x61\x74\x69\x6F\x6E\x20\x61\x62\x6F\x75\x74\x20\x74\x68\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2E" + type: object + allOf: + - $ref: '#/components/schemas/Company/definitions/companyDetails' + - type: object + properties: + dataConnections: + type: array + items: + $ref: '#/components/schemas/Connection' + definitions: + companyDetails: + title: Company details + type: object + properties: + id: + $ref: '#/components/parameters/companyId/schema' + name: + type: string + description: The name of the company + example: Codat Ltd. + description: + $ref: '#/components/schemas/CompanyRequestBody/properties/description' + nullable: true + redirect: + type: string + format: uri + description: 'The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company.' + example: 'https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739' + lastSync: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + nullable: true + created: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + createdByUserName: + type: string + description: Name of user that created the company in Codat. + nullable: true + products: + type: array + items: + type: string + description: An array of products that are currently enabled for the company. + tags: + title: Tags + type: object + maxProperties: 10 + propertyNames: + pattern: '^.{1,27}$' + additionalProperties: + type: string + maxLength: 100 + description: A collection of user-defined key-value pairs that store custom metadata against the company. + referenceParentCompany: + $ref: '#/components/schemas/Company/definitions/companyReference' + nullable: true + description: The parent entity or controlling organization of this company. Null if the company has no parent. + referenceSubsidiaryCompanies: + type: array + nullable: false + description: A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + minItems: 0 + items: + $ref: '#/components/schemas/Company/definitions/companyReference' + required: + - id + - name + - redirect + companyReference: + title: Company reference + type: object + properties: + id: + $ref: '#/components/parameters/companyId/schema' + name: + $ref: '#/components/schemas/Company/definitions/companyDetails/properties/name' + description: + $ref: '#/components/schemas/Company/definitions/companyDetails/properties/description' + links: + type: object + description: A collection of links for the company. + properties: + portal: + type: string + format: uri + description: Link to the company page in the portal. + tags: + $ref: '#/components/schemas/Company/definitions/companyDetails/properties/tags' + examples: + - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 + name: string + redirect: 'https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739' + lastSync: '2022-01-01T12:00:00.000Z' + created: '2022-01-01T12:00:00.000Z' + createdByUserName: string + tags: + region: us + uid: f6b0c253-16c7-4da1-a0c5-9c871e9c9d6c + dataConnections: + - id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd + integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c + integrationKey: dfxm + sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee + platformName: Basiq + linkUrl: 'https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' + status: Linked + lastSync: '2022-10-27T10:22:43.6464237Z' + created: '2022-10-27T09:53:29Z' + sourceType: Banking + products: + - spend-insights + - lending + CompanyConfiguration: + required: + - bankAccount + - supplier + - customer + title: Company configuration + type: object + x-examples: + Config Example: + bankAccount: + id: '89' + supplier: + id: '124' + customer: + id: '140' + properties: + bankAccount: + $ref: '#/components/schemas/CompanyConfiguration/definitions/BankAccountDetails' + supplier: + $ref: '#/components/schemas/CompanyConfiguration/definitions/SupplierDetails' + customer: + $ref: '#/components/schemas/CompanyConfiguration/definitions/CustomerDetails' + definitions: + BankAccountDetails: + title: Bank account details + type: object + properties: + id: + type: string + description: The id of the account from which purchases are made + example: '32' + SupplierDetails: + title: Supplier details + type: object + properties: + id: + $ref: '#/components/schemas/Supplier/allOf/0/properties/id' + CustomerDetails: + title: Customer details + type: object + properties: + id: + $ref: '#/components/schemas/Customer/allOf/0/properties/id' + CompanyInformation: + title: 'Accounting: Company information' + description: "Company info provides standard details about a linked company such as their address, phone number, and company registration.\n\n> **Company information or companies?**\n> \n> Company information is standard information that is held in the accounting software about a company. `Companies` is an endpoint that lists businesses in the Codat system that have linked and shared their data sources." type: object properties: - username: + companyName: + type: string + nullable: true + description: Name of the linked company. + accountingPlatformRef: + type: string + nullable: true + description: Identifier or reference for the company in the accounting software. + companyLegalName: + type: string + nullable: true + description: Registered legal name of the linked company. + addresses: + type: array + nullable: true + description: An array of Addresses. + items: + title: 'Accounting: Address' + x-internal: true + type: object + properties: + type: + $ref: '#/components/schemas/CompanyInformation/properties/addresses/items/definitions/accountingAddressType' + line1: + type: string + nullable: true + description: Line 1 of the customer address. + line2: + type: string + nullable: true + description: Line 2 of the customer address. + city: + type: string + nullable: true + description: City of the customer address. + region: + type: string + nullable: true + description: Region of the customer address. + country: + type: string + nullable: true + description: Country of the customer address. + postalCode: + type: string + nullable: true + description: Postal code or zip code. + required: + - type + definitions: + accountingAddressType: + description: The type of the address + type: string + enum: + - Unknown + - Billing + - Delivery + phoneNumbers: + type: array + nullable: true + description: An array of phone numbers. + items: + title: Phone + type: object + x-internal: true + properties: + number: + type: string + nullable: true + examples: + - +44 25691 154789 + - (877) 492-8687 + - 01224 658 999 + description: A phone number. + type: + description: The type of phone number + type: string + enum: + - Primary + - Landline + - Mobile + - Fax + - Unknown + required: + - type + webLinks: + type: array + nullable: true + description: An array of weblinks. + items: + title: Weblink + description: Weblink associated with the company. + type: object + properties: + type: + description: The type of the weblink. + type: string + enum: + - Website + - Social + - Unknown + url: + description: The full URL for the weblink. + type: string + format: url + example: + type: Website + url: 'https://codat.io' + ledgerLockDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: 'If set in the accounting software, the date (in the ISO 8601 date/time format) after which accounting transactions cannot be edited. Commonly used when books are closed at year-end.' + registrationNumber: type: string - example: S0MW-TR0P-7DS0 - description: Username used by the bank feeds platform to retrieve transactions - password: + nullable: true + description: Registration number given to the linked company by the companies authority in the country of origin. In the UK this is Companies House. + taxNumber: + type: string + nullable: true + description: Company tax number. + financialYearStartDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: Start date of the financial year for the company. + baseCurrency: type: string - example: cO0ajh0uGyTN0Pwh - description: Password to enable the bank feeds platform to securely retrieve transactions. + nullable: true + description: Currency set in the accounting software of the linked company. Used by the currency rate. + sourceUrls: + type: object + additionalProperties: + type: string + nullable: true + nullable: true + description: |- + URL addresses for the accounting source. + + For example, for Xero integrations two URLs are returned. These have many potential use cases, such as [deep linking](https://developer.xero.com/documentation/api-guides/deep-link-xero). + createdDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: Date the linked company was created in the accounting software. + supplementalData: + $ref: '#/components/schemas/SupplementalData' examples: - - QuickBooks Online Bank Feeds: null - username: S0MW-TR0P-7DS0 - password: cO0ajh0uGyTN0Pwh - BankAccounts: + - companyName: ACME Corporation + accountingPlatformRef: 4444e827-401b-4925-92cb-d79086bf3b6b + companyLegalName: ACME Corporation Ltd. + addresses: + - type: Billing + line1: Warner House + line2: 98 Theobald's Road + city: London + region: '' + country: United Kingdom + postalcode: WC1X 8WB + - type: Unknown + line1: 123 Sierra Way + line2: '' + city: San Pablo + region: CA + country: '' + postalCode: '87999' + phoneNumbers: + - number: 010 1234 5678 + type: Landline + webLinks: + - type: Website + url: 'https://www.wbsl.com/' + ledgerLockDate: '2019-03-04T12:08:01.881Z' + registrationNumber: '1234567890' + taxNumber: GB 123456789 + financialYearStartDate: '2019-04-01T00:00:00Z' + baseCurrency: USD + sourceUrls: + url1: 'https://go.xero.com/organisationlogin/default.aspx?shortcode=!rxs0Q' + url2: 'https://reporting.xero.com/!rxs0Q' + createdDate: '2020-02-03T16:42:02Z' + CompanyRequestBody: + title: Create company request x-internal: true - title: 'Accounting: Bank accounts' - allOf: - - type: object - properties: - results: - type: array - items: - title: 'Accounting: Bank account' - description: "> **Accessing Bank Accounts through Banking API**\n> \n> This datatype was originally used for accessing bank account data both in accounting integrations and open banking aggregators. \n> \n> To view bank account data through the Banking API, please refer to the new [Banking: Account](https://docs.codat.io/bank-feeds-api#/schemas/Account) data type.\n\n## Overview\n\nA list of bank accounts associated with a company and a specific data connection.\n\nBank accounts data includes:\n* The name and ID of the account in the accounting software.\n* The currency and balance of the account.\n* The sort code and account number." - type: object - allOf: - - properties: - id: - type: string - description: 'Identifier for the account, unique for the company in the accounting software.' - - $ref: '#/components/schemas/BankAccounts/allOf/0/properties/results/items/definitions/bankAccountPrototype' - - properties: - metadata: - title: Metadata - type: object - x-internal: true - properties: - isDeleted: - type: boolean - description: Indicates whether the record has been deleted in the third-party system this record originated from. - nullable: true - supplementalData: - title: Supplemental data - type: object - x-internal: true - description: "Supplemental data is additional data you can include in our standard data types. \n\nIt is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data." - properties: - content: - type: object - additionalProperties: - type: object - additionalProperties: true - nullable: true - - title: Modified dates - x-internal: true - allOf: - - title: ModifiedDate - x-internal: true - type: object - properties: - modifiedDate: - allOf: - - $ref: '#/components/schemas/DateTime' - - description: |- - The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. - - Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. - - This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). - - In Codat's data model, dates and times are represented using the ISO 8601 standard. - - title: Source Modified Date - x-internal: true - type: object - nullable: true - properties: - sourceModifiedDate: - allOf: - - $ref: '#/components/schemas/DateTime' - - description: "The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. \n\nIt is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when:\n - Pulling attachments\n - The accounting software does not provide modification dates for a data type\n - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred\n - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records\n\nIn Codat's data model, dates and times are represented using the ISO 8601 standard." - definitions: - bankAccountPrototype: - title: Bank account prototype - type: object - properties: - accountName: - type: string - nullable: true - description: Name of the bank account in the accounting software. - accountType: - title: Bank Account Type - x-internal: true - enum: - - Unknown - - Credit - - Debit - type: string - description: "The type of transactions and balances on the account. \nFor Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities. \nFor Debit accounts, positive balances are assets, and positive transactions **increase** assets." - nominalCode: - type: string - nullable: true - description: Code used to identify each nominal account for a business. - sortCode: - type: string - nullable: true - description: |- - Sort code for the bank account. - - Xero integrations - The sort code is only displayed when the currency = GBP and the sort code and account number sum to 14 digits. For non-GBP accounts, this field is not populated. - accountNumber: - type: string - nullable: true - description: |- - Account number for the bank account. - - Xero integrations - Only a UK account number shows for bank accounts with GBP currency and a combined total of sort code and account number that equals 14 digits, For non-GBP accounts, the full bank account number is populated. - - FreeAgent integrations - For Credit accounts, only the last four digits are required. For other types, the field is optional. - iBan: - type: string - nullable: true - description: International bank account number of the account. Often used when making or receiving international payments. - currency: - $ref: '#/components/schemas/SourceAccount/properties/currency' - description: Base currency of the bank account. - balance: - type: number - format: decimal - nullable: true - description: Balance of the bank account. - institution: - type: string - nullable: true - description: The institution of the bank account. - availableBalance: - type: number - format: decimal - nullable: true - description: Total available balance of the bank account as reported by the underlying data source. This may take into account overdrafts or pending transactions for example. - overdraftLimit: - type: number - format: decimal - nullable: true - description: |- - Pre-arranged overdraft limit of the account. - - The value is always positive. For example, an overdraftLimit of `1000` means that the balance of the account can go down to `-1000`. - status: - $ref: '#/components/schemas/BankAccounts/allOf/0/properties/results/items/definitions/bankAccountStatus' - bankAccountCreateResponse: - title: Create bank account response - allOf: - - properties: - data: - allOf: - - $ref: '#/components/schemas/BankAccounts/allOf/0/properties/results/items' - - deprecated: true - - $ref: '#/components/schemas/PushOperation' - bankAccountRef: - title: Bank account reference - type: object - properties: - id: - type: string - description: Bank account 'id' for the account transaction. - name: - type: string - description: bank account 'name' for the account transaction. - description: Links to the Account transactions data type. - bankAccounts: - title: 'Accounting: Bank accounts' - allOf: - - type: object - properties: - results: - type: array - items: - $ref: '#/components/schemas/BankAccounts/allOf/0/properties/results/items' - - $ref: '#/components/schemas/Companies/allOf/1' - bankAccountStatus: - title: Account status - enum: - - Unknown - - Active - - Archived - - Pending - type: string - description: Status of the bank account. - example: Active - - $ref: '#/components/schemas/Companies/allOf/1' - BankFeedAccountMapping: - title: Bank feed account mapping type: object - additionalProperties: false properties: - sourceAccountId: + name: type: string - description: Unique ID for the source account - targetAccountId: + description: Name of company being connected. + pattern: '^[A-Za-z0-9\s\-'',&@.,?!\s]+$' + minLength: 1 + example: Bank of Dave + description: type: string - nullable: true - description: Unique ID for the target account - feedStartDate: - $ref: '#/components/schemas/DateTime' - nullable: true - description: The date from which bank transactions can be provided to the platform. + example: Requested early access to the new financing scheme. + description: 'Additional information about the company. This can be used to store foreign IDs, references, etc.' + tags: + $ref: '#/components/schemas/Company/definitions/companyDetails/properties/tags' required: - - sourceAccountId - examples: - - sourceAccountId: acc-002 - targetAccountId: account-081 - BankFeedAccountMappingResponse: - title: Bank feed account mapping response + - name + CompanySyncStatus: + title: Company sync status type: object additionalProperties: false + x-examples: + Success Data Pushed: + companyId: 20803807-4e9a-4cb7-b67b-9f889a3916e1 + syncId: aa4c9dfd-e945-4424-9628-9e724f14c267 + syncStatusCode: 2000 + syncStatus: Complete + errorMessage: '' + syncExceptionMessage: '' + syncUtc: '2023-01-24T14:15:22Z' + dataPushed: true + Success No Data Pushed: + companyId: 20803807-4e9a-4cb7-b67b-9f889a3916e1 + syncId: aa4c9dfd-e945-4424-9628-9e724f14c267 + syncStatusCode: 2040 + syncStatus: Complete + errorMessage: '' + syncExceptionMessage: '' + syncUtc: '2023-01-24T14:15:22Z' + dataPushed: false properties: - sourceAccountId: + companyId: type: string - description: Unique ID for the source account. - targetAccountId: + description: Unique identifier for your SMB in Codat. + example: d4d73051-ed31-42b6-99f6-d288cd940992 + nullable: true + syncId: type: string + description: Unique identifier of the sync. + example: a6a22aff-a43a-411d-a910-2dae73217cce nullable: true - description: Unique ID for the target account. - status: + syncStatusCode: + type: integer + format: int32 + description: Status code of the sync. + example: 2000 + syncStatus: + type: string + description: Text status of the sync. + examples: + - Complete + - PushError + - Started + - NotStarted + - Pushing + nullable: true + errorMessage: type: string + description: Error message of the sync. nullable: true - description: Status of the POST request. - error: + syncExceptionMessage: type: string + description: Exception message of the sync. nullable: true - description: Error returned during the post request - examples: - - sourceAccountId: acc-002 - targetAccountId: account-081 - status: Failed - error: A feed connection already exists to this account - BankFeedMapping: - title: Bank feed mapping + syncUtc: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: Datetime of the sync. + nullable: true + dataPushed: + type: boolean + description: Boolean of whether the sync resulted in data being pushed. + CompanyUpdateRequest: + title: Update company request + x-internal: true + type: object + properties: + name: + type: string + description: Name of company being connected. + pattern: '^[A-Za-z0-9\s\-'',&@.,?!\s]+$' + minLength: 1 + example: Bank of Dave + description: + $ref: '#/components/schemas/CompanyRequestBody/properties/description' + tags: + $ref: '#/components/schemas/Company/definitions/companyDetails/properties/tags' + Connection: + title: Connection + description: "\uFEFF\x41\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x61\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x27\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x61\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x20\x61\x6E\x64\x20\x61\x6C\x6C\x6F\x77\x73\x20\x79\x6F\x75\x20\x74\x6F\x20\x73\x79\x6E\x63\x68\x72\x6F\x6E\x69\x7A\x65\x20\x64\x61\x74\x61\x20\x28\x70\x75\x6C\x6C\x20\x61\x6E\x64\x2F\x6F\x72\x20\x70\x75\x73\x68\x29\x20\x77\x69\x74\x68\x20\x74\x68\x61\x74\x20\x73\x6F\x75\x72\x63\x65\x2E\n\n\x41\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x68\x61\x76\x65\x20\x6D\x75\x6C\x74\x69\x70\x6C\x65\x20\x64\x61\x74\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x64\x65\x70\x65\x6E\x64\x69\x6E\x67\x20\x6F\x6E\x20\x74\x68\x65\x20\x74\x79\x70\x65\x20\x6F\x66\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x20\x69\x74\x20\x69\x73\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6E\x67\x20\x74\x6F\x2E\x20\x46\x6F\x72\x20\x65\x78\x61\x6D\x70\x6C\x65\x2C\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x6C\x69\x6E\x6B\x20\x74\x6F\x3A\n\n\x2D\x20\x5B\x41\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x64\x61\x74\x61\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x2D\x61\x70\x69\x2F\x6F\x76\x65\x72\x76\x69\x65\x77\x29\x20\x2D\x20\x31\x20\x61\x63\x74\x69\x76\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x2E\n\x2D\x20\x5B\x42\x61\x6E\x6B\x69\x6E\x67\x20\x64\x61\x74\x61\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x62\x61\x6E\x6B\x69\x6E\x67\x2D\x61\x70\x69\x2F\x6F\x76\x65\x72\x76\x69\x65\x77\x29\x20\x2D\x20\x4D\x75\x6C\x74\x69\x70\x6C\x65\x20\x61\x63\x74\x69\x76\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x2E\n\x2D\x20\x5B\x43\x6F\x6D\x6D\x65\x72\x63\x65\x20\x64\x61\x74\x61\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x63\x6F\x6D\x6D\x65\x72\x63\x65\x2D\x61\x70\x69\x2F\x6F\x76\x65\x72\x76\x69\x65\x77\x29\x20\x2D\x20\x4D\x75\x6C\x74\x69\x70\x6C\x65\x20\x61\x63\x74\x69\x76\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x2E\n\x41\x6E\x79\x20\x63\x6F\x6D\x62\x69\x6E\x61\x74\x69\x6F\x6E\x20\x6F\x66\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x2C\x20\x62\x61\x6E\x6B\x69\x6E\x67\x2C\x20\x61\x6E\x64\x20\x63\x6F\x6D\x6D\x65\x72\x63\x65\x20\x64\x61\x74\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x69\x73\x20\x61\x6C\x6C\x6F\x77\x65\x64\x2E\n\n\x42\x65\x66\x6F\x72\x65\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x75\x73\x65\x20\x61\x20\x64\x61\x74\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x70\x75\x6C\x6C\x20\x6F\x72\x20\x70\x75\x73\x68\x20\x64\x61\x74\x61\x2C\x20\x74\x68\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x6D\x75\x73\x74\x20\x67\x72\x61\x6E\x74\x20\x79\x6F\x75\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x64\x61\x74\x61\x20\x62\x79\x20\x5B\x6C\x69\x6E\x6B\x69\x6E\x67\x20\x74\x68\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x61\x75\x74\x68\x2D\x66\x6C\x6F\x77\x2F\x6F\x76\x65\x72\x76\x69\x65\x77\x29\x2E" type: object - additionalProperties: false properties: - sourceAccountId: + id: + $ref: '#/components/parameters/connectionId/schema' + integrationId: type: string - description: Unique ID for the source account. - sourceAccountName: + format: uuid + example: fd321cb6-7963-4506-b873-e99593a45e30 + description: A Codat ID representing the integration. + integrationKey: type: string - description: Name for the source account. - sourceAccountNumber: + description: A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. + sourceId: type: string - description: Account number for the source account. - sourceBalance: - type: number - format: decimal - description: Balance for the source account. - sourceCurrency: - $ref: '#/components/schemas/SourceAccount/properties/currency' - targetAccountId: + format: uuid + example: 35b92968-9851-4095-ad60-395c95cbcba4 + description: 'A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`.' + sourceType: + title: Source Type + description: The type of platform of the connection. type: string - nullable: true - description: Unique ID for the target account in the accounting software. - targetAccountName: + enum: + - Accounting + - Banking + - BankFeed + - Commerce + - Expense + - Other + - Unknown + example: Accounting + platformName: type: string - description: Name for the target account in the accounting software. - status: + description: Name of integration connected to company. + linkUrl: type: string - description: The status. - targetAccountOptions: + format: uri + description: The link URL your customers can use to authorize access to their business application. + example: 'https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/2e2eb431-c1fa-4dc9-93fa-d29781c12bcd/start' + status: + $ref: '#/components/schemas/Connection/definitions/dataConnectionStatus' + lastSync: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + nullable: true + created: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + dataConnectionErrors: type: array nullable: true - description: An array of potential target accounts. items: - $ref: '#/components/schemas/BankFeedMapping/definitions/targetAccountOption' - feedStartDate: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/Connection/definitions/dataConnectionError' + connectionInfo: + type: object nullable: true - description: The date from which bank transactions can be provided to the platform. - description: 'A bank feed connection between a source account and a target account, including potential target accounts.' + additionalProperties: true + additionalProperties: false + required: + - id + - integrationId + - integrationKey + - sourceId + - platformName + - linkUrl + - status + - created + - sourceType definitions: - targetAccountOption: - title: Target Account Option + dataConnectionStatus: + title: Data connection status + description: The current authorization status of the data connection. + type: string + enum: + - PendingAuth + - Linked + - Unlinked + - Deauthorized + dataConnectionError: + title: Data connection error type: object properties: - id: - type: string - description: Id of the target account. - name: - type: string - nullable: true - description: Name of the target account. - balance: - type: number - format: decimal - nullable: true - description: The balance of the account. - sortCode: - type: string - nullable: true - description: The sort code of the account. - accountNumber: - type: string - nullable: true - description: The account number of the account. - bankFeedMappings: - title: Bank feed mappings - type: array - items: - $ref: '#/components/schemas/BankFeedMapping' - additionalProperties: false - examples: - - sourceAccountId: acc-002 - targetAccountId: account-081 - sourceCurrency: USD - status: Success - feedStartDate: '2023-01-09T14:14:14.1057478Z' - sourceAccountName: ACME Bank - sourceAccountNumber: 1234-5678 - sourceBalance: 500 - targetAccountName: ACME Bank - - sourceAccountId: c53fd75a-dddb-4493-839a-5090b008f625 - status: pending - targetAccountOptions: - - name: account-081 - id: 044096a7-1478-4554-8820-f478caad1b00 - balance: 100.99 - sortCode: '602336' - accountNumber: '23203' - sourceAccountName: bank name here - sourceAccountNumber: '5670' - sourceBalance: 1550 - sourceCurrency: GBP - BankTransactions: - title: Bank transactions + statusCode: + type: string + description: The HTTP status code returned by the source platform when the error occurred. + statusText: + type: string + description: A non-numeric status code/text returned by the source platform when the error occurred. + errorMessage: + type: string + description: A message about a error returned by Codat. + erroredOnUtc: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + status: + title: Error status + description: The current status of a transient error. Null statuses indicate that the error is not transient. + type: string + nullable: true + enum: + - Active + - Resolved + resolvedOnUtc: + description: The datetime in Utc that the error was resolved. + nullable: true + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + dataConnectionSourceType: + title: Source Type + description: The type of platform of the connection. + type: string + enum: + - Accounting + - Banking + - BankFeed + - Commerce + - Expense + - Other + - Unknown + example: Accounting + example: + id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd + integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c + integrationKey: dfxm + sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee + platformName: Basiq + linkUrl: 'https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' + status: Linked + lastSync: '2022-10-27T10:22:43.6464237Z' + created: '2022-10-27T09:53:29Z' + sourceType: Banking + Connections: + title: Connections + x-internal: true + allOf: + - type: object + properties: + results: + type: array + items: + $ref: '#/components/schemas/Connection' + - $ref: '#/components/schemas/PagingInfo' + CreateAccountResponse: + title: Create account response + x-internal: true + allOf: + - type: object + properties: + data: + allOf: + - $ref: '#/components/schemas/Account' + - deprecated: true + - $ref: '#/components/schemas/PushOperation' + CreateAdjustmentRequest: + title: Create adjustment request + x-internal: true + type: array + minItems: 1 + maxItems: 50 + items: + $ref: '#/components/schemas/AdjustmentTransactionRequest' + CreateBankAccountResponse: + title: Create bank account response + x-internal: true + allOf: + - type: object + properties: + data: + allOf: + - $ref: '#/components/schemas/BankAccount' + - deprecated: true + - $ref: '#/components/schemas/PushOperation' + CreateCustomerResponse: + title: Create customer response + x-internal: true + allOf: + - type: object + properties: + data: + allOf: + - $ref: '#/components/schemas/Customer' + - deprecated: true + - $ref: '#/components/schemas/PushOperation' + CreateExpenseRequest: + title: Create expense request + x-internal: true type: array - maxItems: 1000 + minItems: 1 + maxItems: 50 items: - title: Bank transaction - type: object - properties: - id: - type: string - description: 'Identifier for the bank account transaction, unique for the company in the accounting software.' - example: '716422529' - date: - title: Local date time - type: string - examples: - - '2023-08-22T10:21:00' - - '2023-08-22' - description: |- - In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - - ``` - 2023-08-22T10:21:00 - 2023-08-22 - ``` - - When pushing bank transaction data to Codat, the date is treated as a local date. This means: - - - The date/time is used exactly as provided, without any timezone conversion. - - If a timezone offset is included (e.g., `2023-08-22T10:21:00-05:00`), the offset will be ignored and only the local date/time portion will be used. - - We recommend providing dates without a timezone suffix for clarity (e.g., `2023-08-22T10:21:00` rather than `2023-08-22T10:21:00Z`). - description: - type: string - nullable: true - description: Description of the bank transaction. - example: Debit for Payment Id sdp-1-57379a43-c4b8-49f5-bd7c-699189ee7a60 - counterparty: - type: string - nullable: true - description: The giving or receiving party such as a person or organization. - example: ACME INC - reference: - type: string - nullable: true - description: An optional reference to the bank transaction. - example: reference for transaction - reconciled: - type: boolean - nullable: true - description: '`True` if the bank transaction has been [reconciled](https://www.xero.com/uk/guides/what-is-bank-reconciliation/) in the accounting software.' - example: false - amount: - type: number - format: decimal - description: The amount transacted in the bank transaction. - example: 999.99 - balance: - type: number - format: decimal - description: 'The remaining balance in the account with ID `accountId`. This field is optional for QuickBooks Online but is required for Xero, Sage, NetSuite, Exact, and FreeAgent.' - example: -999.99 - transactionType: - title: Bank transaction type - nullable: true - description: Type of transaction for the bank statement line. - type: string - enum: - - Unknown - - Credit - - Debit - - Int - - Div - - Fee - - SerChg - - Dep - - Atm - - Pos - - Xfer - - Check - - Payment - - Cash - - DirectDep - - DirectDebit - - RepeatPmt - - Other - ClientRateLimitWebhook: - title: Client rate limit webhook + $ref: '#/components/schemas/ExpenseTransaction' + CreateExpenseResponse: + title: Create expense response + x-internal: true type: object properties: - id: + syncId: type: string + example: cd937d46-8e41-43a9-9477-a79158ffd98a format: uuid - example: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b - description: Unique identifier of the event. - eventType: + description: Unique id of sync created + CreateReimbursableExpenseResponse: + title: Create reimbursable expense response + x-internal: true + type: object + properties: + syncId: type: string - description: The type of event. - examples: - - client.rateLimit.reset - - client.rateLimit.reached - generatedDate: - $ref: '#/components/schemas/DateTime' - description: The date time in UTC the event was generated in Codat. - payload: - $ref: '#/components/schemas/ClientRateLimitWebhook/definitions/clientRateLimitWebhookPayload' - definitions: - clientRateLimitWebhookPayload: - title: Client rate limit webhook payload - type: object - properties: - dailyQuota: - type: integer - description: The number of available requests per day. - quotaRemaining: - type: integer - description: Total number of requests remaining for your client. - expiryDate: - $ref: '#/components/schemas/DateTime' - description: The date time in UTC when your daily quota is reset. - Companies: - title: Companies + example: cd937d46-8e41-43a9-9477-a79158ffd98a + format: uuid + description: Unique id of sync created + CreateSupplierResponse: + title: Create supplier response x-internal: true allOf: - type: object properties: - results: - type: array - items: - $ref: '#/components/schemas/Company' - - type: object - title: Pagination information - x-internal: true - properties: - pageNumber: - type: integer - description: Current page number. - pageSize: - type: integer - description: Number of items to return in results array. - maximum: 2000 - totalResults: - type: integer - description: Total number of items. - _links: - $ref: '#/components/schemas/Companies/allOf/1/definitions/links' - definitions: - links: - title: Hal Links - type: object - required: - - self - - current - properties: - self: - $ref: '#/components/schemas/Companies/allOf/1/definitions/halRef' - current: - $ref: '#/components/schemas/Companies/allOf/1/definitions/halRef' - next: - $ref: '#/components/schemas/Companies/allOf/1/definitions/halRef' - previous: - $ref: '#/components/schemas/Companies/allOf/1/definitions/halRef' - examples: - - self: - href: /companies - current: - href: /companies?page=1&pageSize=10 - halRef: - title: Hypertext reference - type: object - properties: - href: - type: string - format: uri-reference - description: Uri hypertext reference. - required: - - pageNumber - - pageSize - - totalResults - - _links - examples: - - pageNumber: 1 - pageSize: 10 - totalResults: 1 - _links: - self: - href: '/companies/{id}/data/{dataType}' - current: - href: '/companies/{id}/data/{dataType}?page=1&pageSize=10' - Company: - title: Company - description: "\uFEFF\x49\x6E\x20\x43\x6F\x64\x61\x74\x2C\x20\x61\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x61\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x64\x61\x74\x61\x2E\x20\x45\x61\x63\x68\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x68\x61\x76\x65\x20\x6D\x75\x6C\x74\x69\x70\x6C\x65\x20\x5B\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x62\x61\x6E\x6B\x2D\x66\x65\x65\x64\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x29\x20\x74\x6F\x20\x64\x69\x66\x66\x65\x72\x65\x6E\x74\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x73\x20\x73\x75\x63\x68\x20\x61\x73\x20\x6F\x6E\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x5B\x58\x65\x72\x6F\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x2F\x78\x65\x72\x6F\x2F\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x2D\x78\x65\x72\x6F\x29\x20\x66\x6F\x72\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x64\x61\x74\x61\x2C\x20\x74\x77\x6F\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x74\x6F\x20\x5B\x50\x6C\x61\x69\x64\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x62\x61\x6E\x6B\x69\x6E\x67\x2F\x70\x6C\x61\x69\x64\x2F\x62\x61\x6E\x6B\x69\x6E\x67\x2D\x70\x6C\x61\x69\x64\x29\x20\x66\x6F\x72\x20\x74\x77\x6F\x20\x62\x61\x6E\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x20\x61\x6E\x64\x20\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x5B\x5A\x65\x74\x74\x6C\x65\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x63\x6F\x6D\x6D\x65\x72\x63\x65\x2F\x7A\x65\x74\x74\x6C\x65\x2F\x63\x6F\x6D\x6D\x65\x72\x63\x65\x2D\x7A\x65\x74\x74\x6C\x65\x29\x20\x66\x6F\x72\x20\x50\x4F\x53\x20\x64\x61\x74\x61\x2E\n\n\x54\x79\x70\x69\x63\x61\x6C\x6C\x79\x20\x65\x61\x63\x68\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x69\x73\x20\x6F\x6E\x65\x20\x6F\x66\x20\x79\x6F\x75\x72\x20\x63\x75\x73\x74\x6F\x6D\x65\x72\x73\x2E\n\n\x57\x68\x65\x6E\x20\x79\x6F\x75\x20\x63\x72\x65\x61\x74\x65\x20\x61\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2C\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x73\x70\x65\x63\x69\x66\x79\x20\x61\x20\x60\x6E\x61\x6D\x65\x60\x20\x61\x6E\x64\x20\x77\x65\x20\x77\x69\x6C\x6C\x20\x61\x75\x74\x6F\x6D\x61\x74\x69\x63\x61\x6C\x6C\x79\x20\x67\x65\x6E\x65\x72\x61\x74\x65\x20\x61\x20\x75\x6E\x69\x71\x75\x65\x20\x60\x69\x64\x60\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2E\x20\x59\x6F\x75\x20\x63\x61\x6E\x20\x61\x6C\x73\x6F\x20\x61\x64\x64\x20\x61\x20\x60\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x60\x20\x74\x6F\x20\x73\x74\x6F\x72\x65\x20\x61\x6E\x79\x20\x61\x64\x64\x69\x74\x69\x6F\x6E\x61\x6C\x20\x69\x6E\x66\x6F\x72\x6D\x61\x74\x69\x6F\x6E\x20\x61\x62\x6F\x75\x74\x20\x74\x68\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2E" + data: + allOf: + - $ref: '#/components/schemas/Supplier' + - deprecated: true + - $ref: '#/components/schemas/PushOperation' + Customer: + title: 'Accounting: Customer' + description: | + ## Overview + + A customer is a person or organisation that buys goods or services. From the Customers endpoints, you can retrieve a [list of all the customers of a company](https://api.codat.io/swagger/index.html#/Customers/get_companies__companyId__data_customers). + + Customers' data links to accounts receivable [invoices](https://docs.codat.io/sync-for-expenses-api#/schemas/Invoice). type: object allOf: - - $ref: '#/components/schemas/Company/definitions/companyDetails' - type: object - properties: - dataConnections: - type: array - items: - $ref: '#/components/schemas/Connection' - definitions: - companyDetails: - title: Company details - type: object properties: id: - $ref: '#/components/parameters/companyId/schema' - name: type: string - description: The name of the company - example: Codat Ltd. - description: - $ref: '#/components/schemas/CompanyRequestBody/properties/description' + description: 'Identifier for the customer, unique to the company in the accounting software.' + customerName: + type: string nullable: true - redirect: + description: 'Name of the customer as recorded in the accounting system, typically the company name.' + contactName: type: string - format: uri - description: 'The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company.' - example: 'https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739' - lastSync: - $ref: '#/components/schemas/DateTime' nullable: true - created: - $ref: '#/components/schemas/DateTime' - createdByUserName: + description: Name of the main contact for the identified customer. + emailAddress: type: string - description: Name of user that created the company in Codat. nullable: true - products: + description: Email address the customer can be contacted by. + defaultCurrency: + $ref: '#/components/schemas/Account/definitions/accountPrototype/properties/currency' + description: Default currency the transactional data of the customer is recorded in. + phone: + type: string + nullable: true + description: Phone number the customer can be contacted by. + addresses: type: array - items: - type: string - description: An array of products that are currently enabled for the company. - tags: - title: Tags - type: object - maxProperties: 10 - propertyNames: - pattern: '^.{1,27}$' - additionalProperties: - type: string - maxLength: 100 - description: A collection of user-defined key-value pairs that store custom metadata against the company. - referenceParentCompany: - $ref: '#/components/schemas/Company/definitions/companyReference' nullable: true - description: The parent entity or controlling organization of this company. Null if the company has no parent. - referenceSubsidiaryCompanies: + description: An array of Addresses. + items: + $ref: '#/components/schemas/CompanyInformation/properties/addresses/items' + contacts: type: array - nullable: false - description: A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. - minItems: 0 + nullable: true + description: An array of Contacts. items: - $ref: '#/components/schemas/Company/definitions/companyReference' - required: - - id - - name - - redirect - companyReference: - title: Company reference + $ref: '#/components/schemas/Customer/definitions/contact' + registrationNumber: + type: string + nullable: true + description: 'Company number. In the UK, this is typically the Companies House company registration number.' + taxNumber: + type: string + nullable: true + description: Company tax number. + status: + $ref: '#/components/schemas/Customer/definitions/customerStatus' + description: Current state of the customer. + metadata: + $ref: '#/components/schemas/Account/allOf/2/properties/metadata' + supplementalData: + $ref: '#/components/schemas/SupplementalData' + - $ref: '#/components/schemas/Account/allOf/3' + required: + - status + definitions: + accountingCustomerRef: type: object properties: id: - $ref: '#/components/parameters/companyId/schema' - name: - $ref: '#/components/schemas/Company/definitions/companyDetails/properties/name' - description: - $ref: '#/components/schemas/Company/definitions/companyDetails/properties/description' - links: - type: object - description: A collection of links for the company. - properties: - portal: - type: string - format: uri - description: Link to the company page in the portal. - tags: - $ref: '#/components/schemas/Company/definitions/companyDetails/properties/tags' - examples: - - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - name: string - redirect: 'https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739' - lastSync: '2022-01-01T12:00:00.000Z' - created: '2022-01-01T12:00:00.000Z' - createdByUserName: string - tags: - region: us - uid: f6b0c253-16c7-4da1-a0c5-9c871e9c9d6c - dataConnections: - - id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd - integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c - integrationKey: dfxm - sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee - platformName: Basiq - linkUrl: 'https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' - status: Linked - lastSync: '2022-10-27T10:22:43.6464237Z' - created: '2022-10-27T09:53:29Z' - sourceType: Banking - products: - - spend-insights - - lending - CompanyAccessToken: - title: Company access token - description: Details of the access token provisioned for a company. - type: object - allOf: - - $ref: '#/components/schemas/CompanyAccessToken/definitions/accessToken' - definitions: - accessToken: - title: Access token + minLength: 1 + type: string + description: '`id` from the Customers data type' + companyName: + type: string + nullable: true + description: '`customerName` from the Customer data type' + required: + - id + customerStatus: + description: Status of customer. + type: string + enum: + - Unknown + - Active + - Archived + contact: type: object properties: - expiresIn: - type: integer - description: The number of seconds until the access token expires. - example: 86400 - accessToken: + name: type: string - description: The access token for the company. - tokenType: + nullable: true + description: Name of a contact for a customer. + email: type: string - description: The type of token. - example: Bearer + nullable: true + description: Email of a contact for a customer. + phone: + type: array + nullable: true + description: An array of Phone numbers. + items: + $ref: '#/components/schemas/CompanyInformation/properties/phoneNumbers/items' + address: + $ref: '#/components/schemas/CompanyInformation/properties/addresses/items' + description: An object of Address information. + status: + $ref: '#/components/schemas/Customer/definitions/customerStatus' + modifiedDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' required: - - expiresIn - - accessToken - - tokenType + - status + Customers: + title: Customers + x-internal: true + allOf: + - type: object + properties: + results: + type: array + items: + $ref: '#/components/schemas/Customer' + - $ref: '#/components/schemas/PagingInfo' + DataStatus: + title: Data status + description: Describes the state of data in the Codat cache for a company and data type + type: object + required: + - dataType + - currentStatus + properties: + dataType: + title: Data types + x-internal: true + type: string + description: Available data types + enum: + - accountTransactions + - balanceSheet + - bankAccounts + - bankTransactions + - billCreditNotes + - billPayments + - bills + - cashFlowStatement + - chartOfAccounts + - company + - creditNotes + - customers + - directCosts + - directIncomes + - invoices + - itemReceipts + - items + - journalEntries + - journals + - paymentMethods + - payments + - profitAndLoss + - purchaseOrders + - salesOrders + - suppliers + - taxRates + - trackingCategories + - transfers + - banking-accountBalances + - banking-accounts + - banking-transactionCategories + - banking-transactions + - commerce-companyInfo + - commerce-customers + - commerce-disputes + - commerce-locations + - commerce-orders + - commerce-paymentMethods + - commerce-payments + - commerce-productCategories + - commerce-products + - commerce-taxComponents + - commerce-transactions + example: invoices + lastSuccessfulSync: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + currentStatus: + $ref: '#/components/schemas/PullOperation/properties/status' + latestSyncId: + type: string + description: Unique identifier for most recent sync of data type. + format: uuid + example: ad474a37-2003-478e-baee-9af9f1ec2fe3 + latestSuccessfulSyncId: + type: string + description: Unique identifier for the most recent successful sync of data type. + format: uuid + example: 8220fc90-55b6-47bc-9417-48ac6ea93101 examples: - - expiresIn: 86400 - accessToken: string - tokenType: Bearer - CompanyInformation: - title: Company information - description: Information about the company from the underlying accounting software. + - dataType: string + lastSuccessfulSync: '2022-01-01T13:00:00.000Z' + currentStatus: string + latestSyncId: ad474a37-2003-478e-baee-9af9f1ec2fe3 + latestSuccessfulSyncId: 8220fc90-55b6-47bc-9417-48ac6ea93101 + DataStatusResponse: + x-internal: true + title: Data status response + type: object + additionalProperties: + $ref: '#/components/schemas/DataStatus' + DataType: + x-internal: true + $ref: '#/components/schemas/DataStatus/properties/dataType' + ErrorMessage: + title: Error message type: object + x-internal: true properties: - companyName: + statusCode: + type: integer + description: The HTTP status code returned by the error. + service: type: string - nullable: false - description: Name of the linked company. - baseCurrency: + description: Codat's service the returned the error. + error: type: string - nullable: false - description: Currency set in the accounting software of the linked company. - planType: + description: A brief description of the error. + correlationId: type: string + description: Unique identifier used to propagate to all downstream services and determine the source of the error. + validation: + $ref: '#/components/schemas/ErrorMessage/definitions/errorValidation' + canBeRetried: + type: string + description: '`True` if the error occurred transiently and can be retried.' + detailedErrorCode: + type: integer + description: Machine readable error code used to automate processes based on the code returned. + definitions: + errorValidation: + title: Validation error + type: object nullable: true - description: 'Accounting software subscription type such as Trial, Demo, Standard.' - multicurrencyEnabled: - type: boolean - description: Boolean showing if the organisation has multicurrency enabled. - currencies: - type: array - nullable: true - description: Array of enabled currencies for the linked company. - items: - type: string - CompanyRequestBody: - title: Create company request - x-internal: true + description: 'A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here.' + properties: + errors: + type: array + nullable: true + items: + $ref: '#/components/schemas/ErrorMessage/definitions/errorValidationItem' + warnings: + type: array + nullable: true + items: + $ref: '#/components/schemas/ErrorMessage/definitions/errorValidationItem' + errorValidationItem: + title: Validation error item + type: object + properties: + itemId: + type: string + nullable: true + description: Unique identifier for a validation item. + message: + type: string + nullable: true + description: A message outlining validation item's issue. + validatorName: + type: string + nullable: true + description: Name of validator. + ExpenseContactRef: type: object + title: Supplier/customer reference + x-internal: true properties: - name: + id: type: string - description: Name of company being connected. - pattern: '^[A-Za-z0-9\s\-'',&@.,?!\s]+$' - minLength: 1 - example: Bank of Dave - description: + example: 40e3e57c-2322-4898-966c-ca41adfd23fd + description: Identifier of supplier or customer. + type: type: string - example: Requested early access to the new financing scheme. - description: 'Additional information about the company. This can be used to store foreign IDs, references, etc.' - tags: - $ref: '#/components/schemas/Company/definitions/companyDetails/properties/tags' + description: The type of contact. + example: Supplier + default: Supplier + enum: + - Supplier required: - - name - CompanyUpdateRequest: - title: Update company request - x-internal: true - type: object - properties: - name: - type: string - description: Name of company being connected. - pattern: '^[A-Za-z0-9\s\-'',&@.,?!\s]+$' - minLength: 1 - example: Bank of Dave - description: - $ref: '#/components/schemas/CompanyRequestBody/properties/description' - tags: - $ref: '#/components/schemas/Company/definitions/companyDetails/properties/tags' - Connection: - title: Connection - description: "\uFEFF\x41\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x61\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x27\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x62\x61\x6E\x6B\x2D\x66\x65\x65\x64\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x61\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x20\x61\x6E\x64\x20\x61\x6C\x6C\x6F\x77\x73\x20\x79\x6F\x75\x20\x74\x6F\x20\x73\x79\x6E\x63\x68\x72\x6F\x6E\x69\x7A\x65\x20\x64\x61\x74\x61\x20\x28\x70\x75\x6C\x6C\x20\x61\x6E\x64\x2F\x6F\x72\x20\x70\x75\x73\x68\x29\x20\x77\x69\x74\x68\x20\x74\x68\x61\x74\x20\x73\x6F\x75\x72\x63\x65\x2E\n\n\x41\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x68\x61\x76\x65\x20\x6D\x75\x6C\x74\x69\x70\x6C\x65\x20\x64\x61\x74\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x64\x65\x70\x65\x6E\x64\x69\x6E\x67\x20\x6F\x6E\x20\x74\x68\x65\x20\x74\x79\x70\x65\x20\x6F\x66\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x20\x69\x74\x20\x69\x73\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6E\x67\x20\x74\x6F\x2E\x20\x46\x6F\x72\x20\x65\x78\x61\x6D\x70\x6C\x65\x2C\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x6C\x69\x6E\x6B\x20\x74\x6F\x3A\n\n\x2D\x20\x5B\x41\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x64\x61\x74\x61\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x2D\x61\x70\x69\x2F\x6F\x76\x65\x72\x76\x69\x65\x77\x29\x20\x2D\x20\x31\x20\x61\x63\x74\x69\x76\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x2E\n\x2D\x20\x5B\x42\x61\x6E\x6B\x69\x6E\x67\x20\x64\x61\x74\x61\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x62\x61\x6E\x6B\x69\x6E\x67\x2D\x61\x70\x69\x2F\x6F\x76\x65\x72\x76\x69\x65\x77\x29\x20\x2D\x20\x4D\x75\x6C\x74\x69\x70\x6C\x65\x20\x61\x63\x74\x69\x76\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x2E\n\x2D\x20\x5B\x43\x6F\x6D\x6D\x65\x72\x63\x65\x20\x64\x61\x74\x61\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x63\x6F\x6D\x6D\x65\x72\x63\x65\x2D\x61\x70\x69\x2F\x6F\x76\x65\x72\x76\x69\x65\x77\x29\x20\x2D\x20\x4D\x75\x6C\x74\x69\x70\x6C\x65\x20\x61\x63\x74\x69\x76\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x2E\n\x41\x6E\x79\x20\x63\x6F\x6D\x62\x69\x6E\x61\x74\x69\x6F\x6E\x20\x6F\x66\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x2C\x20\x62\x61\x6E\x6B\x69\x6E\x67\x2C\x20\x61\x6E\x64\x20\x63\x6F\x6D\x6D\x65\x72\x63\x65\x20\x64\x61\x74\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x69\x73\x20\x61\x6C\x6C\x6F\x77\x65\x64\x2E\n\n\x42\x65\x66\x6F\x72\x65\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x75\x73\x65\x20\x61\x20\x64\x61\x74\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x70\x75\x6C\x6C\x20\x6F\x72\x20\x70\x75\x73\x68\x20\x64\x61\x74\x61\x2C\x20\x74\x68\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x6D\x75\x73\x74\x20\x67\x72\x61\x6E\x74\x20\x79\x6F\x75\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x64\x61\x74\x61\x20\x62\x79\x20\x5B\x6C\x69\x6E\x6B\x69\x6E\x67\x20\x74\x68\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x61\x75\x74\x68\x2D\x66\x6C\x6F\x77\x2F\x6F\x76\x65\x72\x76\x69\x65\x77\x29\x2E" + - id + ExpensesSyncWebhook: + title: Expenses sync webhook type: object properties: id: - $ref: '#/components/parameters/connectionId/schema' - integrationId: type: string format: uuid - example: fd321cb6-7963-4506-b873-e99593a45e30 - description: A Codat ID representing the integration. - integrationKey: + example: ba29118f-5406-4e59-b05c-ba307ca38d01 + description: Unique identifier of the event. + eventType: type: string - description: A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. - sourceId: + description: The type of event. + examples: + - expenses.sync.successful + - expenses.sync.unsuccessful + generatedDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: The date time in UTC the event was generated in Codat. + payload: + $ref: '#/components/schemas/ExpensesSyncWebhook/definitions/expensesSyncWebhookPayload' + definitions: + transaction: + title: Transaction + type: object + properties: + id: + type: string + description: Unique identifier of the transaction. + status: + type: string + enum: + - Unknown + - PushError + - Completed + - Failed + - Pending + description: Status of transaction. + errorMessage: + type: string + nullable: true + description: Error message for failed transaction. + expensesSyncWebhookPayload: + title: Expenses sync webhook payload + type: object + properties: + referenceCompany: + $ref: '#/components/schemas/Company/definitions/companyReference' + syncId: + type: string + description: Unique identifier of the sync. + transactions: + type: array + items: + $ref: '#/components/schemas/ExpensesSyncWebhook/definitions/transaction' + ExpenseTransaction: + title: Expense transaction + type: object + properties: + id: type: string + example: 4d7c6929-7770-412b-91bb-44d3bc71d111 format: uuid - example: 35b92968-9851-4095-ad60-395c95cbcba4 - description: 'A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`.' - sourceType: - title: Source Type - description: The type of platform of the connection. + description: Your unique identifier for the transaction. + type: type: string + example: Payment + description: The type of transaction. enum: - - Accounting - - Banking - - BankFeed - - Commerce - - Expense - - Other - - Unknown - example: Accounting - platformName: + - Payment + - Refund + - Reward + - Chargeback + issueDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: Date of the transaction was recorded. + currency: type: string - description: Name of integration connected to company. - linkUrl: + example: GBP + description: Currency the transaction was recorded in. + currencyRate: + title: Currency rate + type: number + format: decimal + nullable: true + description: "Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.\n\nCurrency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit. \n\nIt is not possible to perform the currency conversion with two or more non-base currencies participating in the transaction. For example, if a company's base currency is USD, and it has a bill issued in EUR, then the bill payment must happen in USD or EUR.\n\nWhere the currency rate is provided by the underlying accounting software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). \n\nFor accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places.\n\n## Examples with base currency of GBP\n\n| Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) |\n| :--------------- | :------------- | :------------ | :------------------------- |\n| **USD** | $20 | 0.781 | £15.62 |\n| **EUR** | €20 | 0.885 | £17.70 |\n| **RUB** | ₽20 | 0.011 | £0.22 |\n\n## Examples with base currency of USD\n\n| Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) |\n| :--------------- | :------------- | :------------ | :------------------------- |\n| **GBP** | £20 | 1.277 | $25.54 |\n| **EUR** | €20 | 1.134 | $22.68 |\n| **RUB** | ₽20 | 0.015 | $0.30 |\n\n\n### Integration-specific details\n\n| Integration | Scenario | System behavior |\n|-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. |" + contactRef: + description: Supplier or customer for the purchase to be associated to. + $ref: '#/components/schemas/ExpenseContactRef' + bankAccountRef: + type: object + title: Bank account reference + properties: + id: + type: string + example: 787dfb37-5707-4dc0-8a86-8d74e4cc78ea + description: Identifier of the bank account. + reference: type: string - format: uri - description: The link URL your customers can use to authorize access to their business application. - example: 'https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/2e2eb431-c1fa-4dc9-93fa-d29781c12bcd/start' - status: - $ref: '#/components/schemas/Connection/definitions/dataConnectionStatus' - lastSync: - $ref: '#/components/schemas/DateTime' nullable: true - created: - $ref: '#/components/schemas/DateTime' - dataConnectionErrors: + description: User-friendly reference for the expense transaction. + merchantName: + type: string + example: Amazon UK + description: Name of the merchant where the purchase took place + lines: type: array - nullable: true + description: Array of transaction lines. + minItems: 1 + maxItems: 100 items: - $ref: '#/components/schemas/Connection/definitions/dataConnectionError' - connectionInfo: - type: object + $ref: '#/components/schemas/ExpenseTransactionLine' + notes: + type: string + description: 'Any private, company notes about the transaction.' + example: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + postAsDraft: + type: boolean nullable: true - additionalProperties: true - additionalProperties: false + description: 'This optional property, when set to true, posts the transaction to a drafted state. Note that postAsDraft is only supported in Microsoft Dynamics 365 Business Central.' required: - id - - integrationId - - integrationKey - - sourceId - - platformName - - linkUrl - - status - - created - - sourceType - definitions: - dataConnectionStatus: - title: Data connection status - description: The current authorization status of the data connection. - type: string - enum: - - PendingAuth - - Linked - - Unlinked - - Deauthorized - dataConnectionError: - title: Data connection error - type: object - properties: - statusCode: - type: string - description: The HTTP status code returned by the source platform when the error occurred. - statusText: - type: string - description: A non-numeric status code/text returned by the source platform when the error occurred. - errorMessage: - type: string - description: A message about a error returned by Codat. - erroredOnUtc: - $ref: '#/components/schemas/DateTime' - status: - title: Error status - description: The current status of a transient error. Null statuses indicate that the error is not transient. - type: string - nullable: true - enum: - - Active - - Resolved - resolvedOnUtc: - description: The datetime in Utc that the error was resolved. - nullable: true - $ref: '#/components/schemas/DateTime' - dataConnectionSourceType: - title: Source Type - description: The type of platform of the connection. - type: string - enum: - - Accounting - - Banking - - BankFeed - - Commerce - - Expense - - Other - - Unknown - example: Accounting - example: - id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd - integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c - integrationKey: dfxm - sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee - platformName: Basiq - linkUrl: 'https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' - status: Linked - lastSync: '2022-10-27T10:22:43.6464237Z' - created: '2022-10-27T09:53:29Z' - sourceType: Banking - Connections: - title: Connections + - type + - issueDate + - currency + examples: + - id: a44135b0-6882-489a-83fe-a0c57a4afb19 + type: Payment + issueDate: '2024-05-21T00:00:00+00:00' + currency: GBP + currencyRate: 1 + contactRef: + id: '430' + type: Supplier + bankAccountRef: + id: '97' + merchantName: Amazon UK + notes: amazon purchase + lines: + - netAmount: 100 + taxAmount: 20 + taxRateRef: + id: 23_Bills + accountRef: + id: '35' + trackingRefs: + - id: DEPARTMENT_3 + - dataType: trackingCategories + invoiceTo: + id: '504' + type: customer + ExpenseTransactionLine: x-internal: true - allOf: - - type: object - properties: - results: - type: array - items: - $ref: '#/components/schemas/Connection' - - $ref: '#/components/schemas/Companies/allOf/1' - CreateBankTransactions: - title: Create bank transactions + title: Expense transaction line type: object + x-examples: + ExpenseTransactionLine: + netAmount: 100 + taxAmount: 20 + taxRateRef: + id: 08d37c46-8d5d-441b-8bad-76286c43047e + accountRef: + id: 16989b16-96d4-401a-9054-f5c620c655a6 + trackingRefs: + - id: e9a1b63d-9ff0-40e7-8038-016354b987e6 + invoiceTo: + id: 80000002-1674552702 + type: customer properties: - accountId: - type: string - description: Unique identifier for a bank account. - examples: - - 13d946f0-c5d5-42bc-b092-97ece17923ab - - 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2 - - '7110701885' - - EILBDVJVNUAGVKRQ - - Checking 0202 - transactions: - $ref: '#/components/schemas/BankTransactions' + netAmount: + type: number + format: decimal + example: 100 + description: 'Amount of the line, exclusive of tax.' + taxAmount: + type: number + format: decimal + example: 20 + description: Amount of tax for the line. + taxRateRef: + $ref: '#/components/schemas/RecordRef' + accountRef: + description: The `accountRef` contains the `id` of the account the transaction is against. The `accountRef` object is required for all integrations except QBD which currently supports either itemRef or accountRef. + $ref: '#/components/schemas/RecordRef' + itemRef: + $ref: '#/components/schemas/ItemRef' + trackingRefs: + type: array + minItems: 1 + maxItems: 10 + nullable: true + items: + $ref: '#/components/schemas/TrackingRef' + invoiceTo: + $ref: '#/components/schemas/InvoiceTo' required: - - accountId - - transactions - CreateBankTransactionsResponse: - title: Create bank transaction response - x-internal: true - allOf: - - type: object - properties: - data: - $ref: '#/components/schemas/CreateBankTransactions' - - $ref: '#/components/schemas/PushOperation' - DataType: - title: Data types + - netAmount + IntegrationType: + title: Integration type x-internal: true type: string - description: Available data types + description: Type of transaction that has been processed e.g. Expense or Bank Feed. enum: - - accountTransactions - - balanceSheet - - bankAccounts - - bankTransactions - - billCreditNotes - - billPayments - - bills - - cashFlowStatement - - chartOfAccounts - - company - - creditNotes - - customers - - directCosts - - directIncomes - - invoices - - itemReceipts - - items - - journalEntries - - journals - - paymentMethods - - payments - - profitAndLoss - - purchaseOrders - - salesOrders - - suppliers - - taxRates - - trackingCategories - - transfers - - banking-accountBalances - - banking-accounts - - banking-transactionCategories - - banking-transactions - - commerce-companyInfo - - commerce-customers - - commerce-disputes - - commerce-locations - - commerce-orders - - commerce-paymentMethods - - commerce-payments - - commerce-productCategories - - commerce-products - - commerce-taxComponents - - commerce-transactions - example: invoices - DateTime: - title: Date time - type: string - examples: - - '2022-10-23T00:00:00Z' - - '2022-10-23' - description: "In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:\n\n```\n2020-10-08T22:40:50Z\n2021-01-01T00:00:00\n```\n\n\n\nWhen syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:\n\n- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`\n- Unqualified local time: `2021-11-15T01:00:00`\n- UTC time offsets: `2021-11-15T01:00:00-05:00`\n\n> Time zones\n> \n> Not all dates from Codat will contain information about time zones. \n> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced." - ErrorMessage: - title: Error message - type: object + - expenses + - bankfeeds + default: expenses + example: expenses + nullable: true + InvoiceTo: + title: Billable customer reference x-internal: true + type: object + nullable: true + description: Unique identifier for the customer billed for the transaction. The `invoiceTo` object is currently supported only for QuickBooks Online and QuickBooks Desktop. properties: - statusCode: - type: integer - description: The HTTP status code returned by the error. - service: + id: type: string - description: Codat's service the returned the error. - error: + example: 80000002-1674552702 + description: identifier of customer. + type: type: string - description: A brief description of the error. - correlationId: + example: customer + description: The type of contact. + enum: + - customer + ItemRef: + x-internal: true + type: object + title: Item reference + nullable: true + properties: + id: type: string - description: Unique identifier used to propagate to all downstream services and determine the source of the error. - validation: - $ref: '#/components/schemas/ErrorMessage/definitions/errorValidation' - canBeRetried: + example: 80000002-1675158984 + description: 'Unique identifier for the item associated with the transaction. The `itemRef` object is currently supported only for QuickBooks Desktop. You can specify either `itemRef` or `accountRef`, but not both.' + MappingOptions: + title: Mapping options + type: object + additionalProperties: false + x-examples: {} + properties: + expenseProvider: type: string - description: '`True` if the error occurred transiently and can be retried.' - detailedErrorCode: + description: Name of the expense integration. + example: Partner Expense + nullable: true + accounts: + type: array + description: Array of available accounts for mapping. + nullable: true + items: + $ref: '#/components/schemas/AccountMappingInfo' + trackingCategories: + type: array + description: Array of available tracking categories for mapping. + nullable: true + items: + $ref: '#/components/schemas/TrackingCategoryMappingInfo' + taxRates: + type: array + description: Array of available tax rates for mapping. + nullable: true + items: + $ref: '#/components/schemas/TaxRateMappingInfo' + PagingInfo: + type: object + title: Pagination information + x-internal: true + properties: + pageNumber: type: integer - description: Machine readable error code used to automate processes based on the code returned. + description: Current page number. + pageSize: + type: integer + description: Number of items to return in results array. + maximum: 2000 + totalResults: + type: integer + description: Total number of items. + _links: + $ref: '#/components/schemas/PagingInfo/definitions/links' definitions: - errorValidation: - title: Validation error + links: + title: Hal Links type: object - nullable: true - description: 'A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here.' + required: + - self + - current properties: - errors: - type: array - nullable: true - items: - $ref: '#/components/schemas/ErrorMessage/definitions/errorValidationItem' - warnings: - type: array - nullable: true - items: - $ref: '#/components/schemas/ErrorMessage/definitions/errorValidationItem' - errorValidationItem: - title: Validation error item + self: + $ref: '#/components/schemas/PagingInfo/definitions/halRef' + current: + $ref: '#/components/schemas/PagingInfo/definitions/halRef' + next: + $ref: '#/components/schemas/PagingInfo/definitions/halRef' + previous: + $ref: '#/components/schemas/PagingInfo/definitions/halRef' + examples: + - self: + href: /companies + current: + href: /companies?page=1&pageSize=10 + halRef: + title: Hypertext reference type: object properties: - itemId: - type: string - nullable: true - description: Unique identifier for a validation item. - message: - type: string - nullable: true - description: A message outlining validation item's issue. - validatorName: + href: type: string - nullable: true - description: Name of validator. - GenerateOtpResponse: - title: OTP response - type: object - description: Response containing a one-time password and its expiry time. - additionalProperties: false - properties: - otp: - type: string - description: The one-time password. - expiry: - $ref: '#/components/schemas/DateTime' - description: The expiry date and time of the OTP in UTC. + format: uri-reference + description: Uri hypertext reference. required: - - otp - - expiry + - pageNumber + - pageSize + - totalResults + - _links examples: - - otp: GT40U4 - expiry: '2026-04-08T10:30:00Z' + - pageNumber: 1 + pageSize: 10 + totalResults: 1 + _links: + self: + href: '/companies/{id}/data/{dataType}' + current: + href: '/companies/{id}/data/{dataType}?page=1&pageSize=10' PullOperation: title: Pull operation description: |- @@ -4302,9 +11878,9 @@ components: nullable: true description: A message about a transient or persistent error returned by Codat or the source platform. requested: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' completed: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' progress: type: integer description: An integer signifying the progress of the pull operation. @@ -4345,7 +11921,7 @@ components: type: array items: $ref: '#/components/schemas/PullOperation' - - $ref: '#/components/schemas/Companies/allOf/1' + - $ref: '#/components/schemas/PagingInfo' PushOperation: title: Push operation type: object @@ -4358,7 +11934,7 @@ components: items: $ref: '#/components/schemas/PushOperation/definitions/pushOperationChange' dataType: - $ref: '#/components/schemas/DataType' + $ref: '#/components/schemas/DataStatus/properties/dataType' description: 'The type of data being pushed, eg invoices, customers.' companyId: $ref: '#/components/parameters/companyId/schema' @@ -4369,10 +11945,10 @@ components: dataConnectionKey: $ref: '#/components/parameters/connectionId/schema' requestedOnUtc: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' description: The datetime when the push was requested. completedOnUtc: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' description: 'The datetime when the push was completed, null if Pending.' timeoutInMinutes: type: integer @@ -4455,7 +12031,7 @@ components: type: string description: Unique identifier for a push operation. dataType: - $ref: '#/components/schemas/DataType' + $ref: '#/components/schemas/DataStatus/properties/dataType' nullable: true additionalProperties: false pushOperationStatus: @@ -4488,7 +12064,7 @@ components: type: array items: $ref: '#/components/schemas/PushOperation' - - $ref: '#/components/schemas/Companies/allOf/1' + - $ref: '#/components/schemas/PagingInfo' PushOption: title: Push option x-internal: true @@ -4616,534 +12192,799 @@ components: $ref: '#/components/schemas/PushOption/definitions/pushOptionProperty/properties/description' required: $ref: '#/components/schemas/PushOption/definitions/pushOptionProperty/properties/required' - SourceAccount: - title: Source account (v1) + RecordRef: + x-internal: true type: object - description: The target bank account in a supported accounting software for ingestion into a bank feed. - additionalProperties: false + title: Record reference properties: id: type: string - description: Unique ID for the bank account. - accountName: - type: string - nullable: true - description: The bank account name. - accountType: - type: string - nullable: true - description: The type of bank account e.g. Credit. - accountNumber: - type: string - nullable: true - description: The account number. - sortCode: - type: string - nullable: true - description: The sort code. - currency: - title: Currency - x-internal: true + example: 40e3e57c-2322-4898-966c-ca41adfd23fd + description: Identifier of linked reference from mapping options. + ReimbursableExpenseTransactionLine: + x-internal: true + title: Reimbursable expense transaction line + type: object + properties: + description: type: string - description: "The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.\n\n## Unknown currencies\n\nIn line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction. \n\nThere are only a very small number of edge cases where this currency code is returned by the Codat system." - format: ISO4217 - examples: - - GBP - - USD - - EUR - balance: + example: 2-night hotel stay + description: line description + netAmount: type: number format: decimal + example: 100 + description: 'Amount of the line, exclusive of tax.' + taxAmount: + type: number + format: decimal + example: 20 + description: Amount of tax for the line. + taxRateRef: + $ref: '#/components/schemas/RecordRef' + accountRef: + description: The `accountRef` contains the `id` of the account the transaction is against. The `accountRef` object is required for all integrations except QBD which currently supports either itemRef or accountRef. + $ref: '#/components/schemas/RecordRef' + itemRef: + $ref: '#/components/schemas/ItemRef' + trackingRefs: + type: array + minItems: 1 + maxItems: 10 nullable: true - description: The latest balance for the bank account. - modifiedDate: - $ref: '#/components/schemas/DateTime' - nullable: true - description: The last date the bank account was modified. - status: - type: string - nullable: true - description: Status of the source account. - enum: - - pending - - connected - - connecting - - disconnected - - unknown - feedStartDate: - $ref: '#/components/schemas/DateTime' - nullable: true + items: + $ref: '#/components/schemas/TrackingRef' + invoiceTo: + $ref: '#/components/schemas/InvoiceTo' required: - - id + - netAmount + ReimbursableExpenseTransactionRequest: + title: Reimbursable expense transaction request + type: array + minItems: 1 + maxItems: 50 + items: + $ref: '#/components/schemas/ReimbursableExpenseTransactionRequest/definitions/reimbursableExpenseTransaction' definitions: - sourceAccountPrototype: - title: Source account (v1) + reimbursableExpenseTransaction: + title: Reimbursable expense transaction type: object properties: id: - $ref: '#/components/schemas/SourceAccount/properties/id' - accountName: - $ref: '#/components/schemas/SourceAccount/properties/accountName' - accountType: - $ref: '#/components/schemas/SourceAccount/properties/accountType' - accountNumber: - $ref: '#/components/schemas/SourceAccount/properties/accountNumber' - sortCode: - $ref: '#/components/schemas/SourceAccount/properties/sortCode' + type: string + example: 4d7c6929-7770-412b-91bb-44d3bc71d111 + format: uuid + description: Your unique identifier for the transaction. + reference: + type: string + nullable: true + description: User-friendly reference for the reimbursable expense. + contactRef: + $ref: '#/components/schemas/ReimbursementContactRef' + apAccountRef: + $ref: '#/components/schemas/apAccountRef' + issueDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: Date of the transaction was recorded. + dueDate: + description: Date the supplier is due to be paid. + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' currency: - $ref: '#/components/schemas/SourceAccount/properties/currency' - balance: - $ref: '#/components/schemas/SourceAccount/properties/balance' - modifiedDate: - $ref: '#/components/schemas/SourceAccount/properties/modifiedDate' + type: string + example: GBP + description: Currency the transaction was recorded in. + currencyRate: + $ref: '#/components/schemas/ExpenseTransaction/properties/currencyRate' + notes: + type: string + description: 'Any private, company notes about the transaction.' + example: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + lines: + type: array + description: Array of transaction lines. + minItems: 1 + maxItems: 100 + items: + $ref: '#/components/schemas/ReimbursableExpenseTransactionLine' required: - id - sourceAccounts: - title: Source accounts - type: array - items: - $ref: '#/components/schemas/SourceAccount' - examples: - - id: acc-002 - accountName: account-081 - sortCode: '123456' - accountType: Credit - accountNumber: '12345670' - currency: GBP - balance: 99.99 - modifiedDate: '2023-01-09T14:14:14.1057478Z' - status: pending - - id: acc-003 - accountName: account-095 - sortCode: '123456' - accountType: Credit - accountNumber: '12345671' - currency: USD - balance: 0 - modifiedDate: '2023-01-09T14:14:14.1057478Z' - status: pending - SourceAccountBatchCreateResponse: - title: Batch source account request creation response - description: Account ID and resulting object of the batch `Create source account` request. + - contactRef + - issueDate + - dueDate + - currency + ReimbursementContactRef: type: object + title: Contact reference + x-internal: true properties: - sourceAccountId: + id: type: string - description: Unique ID for the source account. - examples: - - '12345' - result: - $ref: '#/components/schemas/SourceAccountBatchCreateResponse/definitions/sourceAccountBatchCreateResult' + example: 40e3e57c-2322-4898-966c-ca41adfd23fd + description: Identifier of contact. + required: + - id + SupplementalData: + title: Supplemental data + type: object + x-internal: true + description: "Supplemental data is additional data you can include in our standard data types. \n\nIt is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data." + properties: + content: + type: object + additionalProperties: + type: object + additionalProperties: true + nullable: true + Supplier: + title: 'Accounting: Supplier' + description: |- + ## Overview + + From the **Suppliers** endpoints, you can retrieve a list of [all the suppliers for a company](https://docs.codat.io/sync-for-expenses-api#/operations/list-suppliers). Suppliers' data links to accounts payable [bills](https://docs.codat.io/sync-for-expenses-api#/schemas/Bill). + type: object + allOf: + - type: object + properties: + id: + type: string + description: 'Identifier for the supplier, unique to the company in the accounting software.' + supplierName: + type: string + nullable: true + description: 'Name of the supplier as recorded in the accounting system, typically the company name.' + contactName: + type: string + nullable: true + description: Name of the main contact for the supplier. + emailAddress: + type: string + nullable: true + description: Email address that the supplier may be contacted on. + phone: + type: string + nullable: true + description: Phone number that the supplier may be contacted on. + examples: + - +44 25691 154789 + - (877) 492-8687 + - 01224 658 999 + addresses: + type: array + nullable: true + description: An array of Addresses. + items: + $ref: '#/components/schemas/CompanyInformation/properties/addresses/items' + registrationNumber: + type: string + nullable: true + description: 'Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House.' + taxNumber: + type: string + nullable: true + description: Supplier's company tax number. + status: + $ref: '#/components/schemas/Supplier/definitions/supplierStatus' + defaultCurrency: + type: string + nullable: true + description: Default currency the supplier's transactional data is recorded in. + metadata: + $ref: '#/components/schemas/Account/allOf/2/properties/metadata' + supplementalData: + $ref: '#/components/schemas/SupplementalData' + - $ref: '#/components/schemas/Account/allOf/3' + required: + - status definitions: - sourceAccountBatchCreateResult: - title: Source Account Batch Create Result - description: Status details and corresponding object of the `Create account` operation. + supplierRef: + title: Supplier reference + description: Reference to the supplier the record relates to. type: object properties: - statusCode: - type: integer - description: The HTTP status code for the creation of the source account - error: + id: + minLength: 1 + type: string + description: The supplier's unique ID + supplierName: type: string nullable: true - description: A brief description of the error. - account: - $ref: '#/components/schemas/SourceAccount' - SourceAccountBatchErrorResponse: - title: Batch source account creation error - description: Describes the error that occured when trying to create the specified source account. + description: The supplier's name + required: + - id + supplierStatus: + description: Status of the supplier. + type: string + enum: + - Unknown + - Active + - Archived + examples: + - id: C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F + supplierName: Kelly's Industrial Supplies + contactName: Kelly's Industrial Supplies + emailAddress: sales@kellysupplies.com + phone: 07999 999999 + addresses: + - type: Billing + line1: Unit 51 + line2: Bakersfield Industrial Estate + city: Bakersfield + region: California + country: USA + postalcode: '93308' + registrationNumber: string + taxNumber: string + status: Unknown + defaultCurrency: string + metadata: + isDeleted: true + supplementalData: + content: + property1: + property1: null + property2: null + property2: + property1: null + property2: null + modifiedDate: '2022-10-23T00:00:00Z' + sourceModifiedDate: '2022-10-23T00:00:00Z' + Suppliers: + title: Suppliers + x-internal: true + allOf: + - type: object + properties: + results: + type: array + items: + $ref: '#/components/schemas/Supplier' + - $ref: '#/components/schemas/PagingInfo' + SyncCompleteWebhook: + title: Sync complete webhook + x-internal: true + description: Webhook request body used to notify that a sync has completed. + type: object + properties: + ClientId: + $ref: '#/components/schemas/SyncFailedWebhook/properties/ClientId' + ClientName: + $ref: '#/components/schemas/SyncFailedWebhook/properties/ClientName' + CompanyId: + $ref: '#/components/parameters/companyId/schema' + RuleId: + $ref: '#/components/schemas/SyncFailedWebhook/properties/RuleId' + RuleType: + $ref: '#/components/schemas/SyncFailedWebhook/properties/RuleType' + AlertId: + $ref: '#/components/schemas/SyncFailedWebhook/properties/AlertId' + Message: + $ref: '#/components/schemas/SyncFailedWebhook/properties/Message' + Data: + $ref: '#/components/schemas/SyncCompleteWebhook/definitions/SyncCompleteWebhookData' + definitions: + SyncCompleteWebhookData: + type: object + title: Sync complete webhook data + properties: + syncId: + $ref: '#/components/schemas/SyncFailedWebhook/definitions/SyncFailedWebhookData/properties/syncId' + syncType: + $ref: '#/components/schemas/SyncFailedWebhook/definitions/SyncFailedWebhookData/properties/syncType' + examples: + - ClientId: 30e0f9d2-52c0-4c9f-a806-bcd98a3bcd7e + ClientName: Expense Sync + CompanyId: 1f9559e7-8368-48c9-bdf4-f158e16b8b85 + AlertId: 33a4f8e9-09ae-4334-9b00-7bbe83024672 + RuleId: 5c27631d-3b63-4b50-8228-ee502fd113eb + RuleType: Sync Completed + Message: Sync 321363b4-efa9-4fbc-b71c-0b58d62f3248 for company 1f9559e7-8368-48c9-bdf4-f158e16b8b85 of type Expense completed successfully. + Data: + syncId: 321363b4-efa9-4fbc-b71c-0b58d62f3248 + syncType: Expense + SyncFailedWebhook: + title: Sync failed webhook + x-internal: true + description: Webhook request body used to notify that a sync has failed. type: object properties: - sourceAccountId: + ClientId: + title: Client ID type: string - description: Unique ID for the source account. - examples: - - '12345' - result: + format: uuid + description: Unique identifier for your client in Codat. + ClientName: + type: string + description: Name of your client in Codat. + CompanyId: + $ref: '#/components/parameters/companyId/schema' + RuleId: + type: string + format: uuid + description: Unique identifier for the rule. + deprecated: true + RuleType: + type: string + x-stoplight: + id: 34d52a089f08a + description: The type of rule. + AlertId: + type: string + format: uuid + description: Unique identifier of the webhook event. + Message: + type: string + description: A human-readable message about the webhook. + Data: + $ref: '#/components/schemas/SyncFailedWebhook/definitions/SyncFailedWebhookData' + definitions: + SyncFailedWebhookData: type: object + title: Sync failed webhook data properties: - statusCode: - description: The error status code for the attempted creation of the source account. + syncId: type: string - examples: - - 409 - error: - description: The error description for the attempted creation of the source account. + format: uuid + example: a9367074-b5c3-42c4-9be4-be129f43577e + description: Unique identifier for the failed sync. + syncType: type: string - examples: - - A bank account already exists with the same Id - SourceAccountV2: - title: Source account (v2) + description: The type of sync being performed. + FailureStage: + type: string + description: The stage of the job the sync failed. + examples: + - ClientId: 30e0f9d2-52c0-4c9f-a806-bcd98a3bcd7e + ClientName: Expense Sync + CompanyId: 1f9559e7-8368-48c9-bdf4-f158e16b8b85 + RuleId: 289c80dc-2aee-4b71-afff-9acd8d051080 + RuleType: Sync Failed + AlertId: 72c1103b-7f17-4a3a-8db5-67c2d360a516 + Message: Sync 3bead2a1-1b3d-4d90-8077-cddc5ca68b01 for company 1f9559e7-8368-48c9-bdf4-f158e16b8b85 of type Expense has failed at step Pushing. + Data: + syncId: 3bead2a1-1b3d-4d90-8077-cddc5ca68b01 + syncType: Expense + FailureStage: Pushing + SyncInitiated: + title: Sync initiated + type: object + properties: + syncId: + type: string + format: uuid + description: Unique identifier for the sync initiated. + additionalProperties: false + TaxRateMappingInfo: + title: Tax rate mapping info + x-internal: true + type: object + additionalProperties: false + x-examples: + UK Tax Rate: + id: 23_Bills + name: 20% Bill tax Bills + code: 20% Bill tax + effectiveTaxRate: 20 + totalTaxRate: 20 + validTransactionTypes: + - Payment + - Reward + properties: + id: + type: string + description: Unique identifier of tax rate. + example: 23_Bills + nullable: false + name: + type: string + description: Name of the tax rate in the accounting software. + example: 20% Bill tax Bills + nullable: false + code: + type: string + description: Code for the tax rate from the accounting software. + example: 20% Bill tax + nullable: true + effectiveTaxRate: + type: number + format: decimal + description: Effective tax rate. + example: 20 + totalTaxRate: + type: number + format: decimal + description: Total (not compounded) sum of the components of a tax rate. + example: 20 + validTransactionTypes: + $ref: '#/components/schemas/validTransactionTypes' + description: Supported transaction types for the tax rate. + TrackingCategoryMappingInfo: + title: Tracking category mapping info + x-internal: true type: object - description: The target bank account in a supported accounting software for ingestion into a bank feed. additionalProperties: false + x-examples: + Tracking Category with parentId: + id: DEPARTMENT_1 + name: TestLocation + hasChildren: false + parentId: DEPARTMENTS + Parent Tracking Category: + id: DEPARTMENTS + name: Departments + hasChildren: true properties: id: type: string - description: Unique ID for the bank account. - accountName: + description: Unique identifier of the tracking category. + example: DEPARTMENT_2 + nullable: false + name: type: string - description: The bank account name. - accountType: + description: Name of the tracking category as it appears in the accounting software. + example: New York + nullable: false + hasChildren: + type: boolean + description: Boolean of whether the tracking category has child categories. + parentId: + type: string + description: ID of the parent tracking category + example: DEPARTMENTS + nullable: true + TrackingRef: + type: object + title: Tracking reference + x-internal: true + properties: + id: + type: string + example: e9a1b63d-9ff0-40e7-8038-016354b987e6 + description: Unique identifier of the linked reference from mapping options or the unique identifier of the linked customer. + dataType: type: string - description: 'The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard.' + example: trackingCategories + default: trackingCategories + description: The type of the linked reference enum: - - checking - - savings - - loan - - creditCard - - prepaidCard - accountNumber: + - trackingCategories + - customers + TrackingRefAdjustmentTransaction: + type: object + title: Tracking reference + x-internal: true + properties: + id: type: string - description: The account number. - sortCode: + example: e9a1b63d-9ff0-40e7-8038-016354b987e6 + description: Unique identifier of the linked reference from mapping options or the unique identifier of the linked customer or supplier. + dataType: type: string + example: trackingCategories + default: trackingCategories + description: The type of the linked reference + enum: + - trackingCategories + - customers + - suppliers + Transaction: + title: Transaction + type: object + additionalProperties: false + properties: + transactionId: + type: string + description: Your unique idenfier of the transaction. + example: aa02271d-ed5f-47f5-be76-778d5905225a nullable: true - description: The sort code. - routingInfo: - $ref: '#/components/schemas/SourceAccountV2/definitions/routingInfo' - currency: - $ref: '#/components/schemas/SourceAccount/properties/currency' - balance: - type: number - format: decimal - description: The latest balance for the bank account. - accountInfo: - $ref: '#/components/schemas/SourceAccountV2/definitions/accountInfo' - modifiedDate: - $ref: '#/components/schemas/DateTime' - nullable: true - description: The last date the bank account was modified. status: + $ref: '#/components/schemas/TransactionStatus' + message: type: string + description: Metadata such as validation errors or the resulting record created in the accounting software. nullable: true - description: Status of the source account. - enum: - - pending - - connected - - connecting - - disconnected - - unknown - feedStartDate: - nullable: true - title: Date + integrationType: + $ref: '#/components/schemas/IntegrationType' + x-examples: + Successful Transaction: + transactionId: 8fdba4ed-e327-4925-be1a-b7a2b04627f7 + status: Completed + integrationType: expense + Unsuccessful Transaction: + transactionId: 3d694cd1-4cd9-4136-91db-32408195c6fc + status: ValidationError + message: The line item total -208.10((-195.01 + -1.09) + (-10.01 + -1.99)) must equal the transaction total -1.1 + integrationType: string + TransactionResponse: + title: Transaction response + x-internal: true + type: array + items: + $ref: '#/components/schemas/Transaction' + Transactions: + title: Transactions + x-internal: true + additionalProperties: false + allOf: + - type: object + properties: + results: + type: array + items: + $ref: '#/components/schemas/Transaction' + - $ref: '#/components/schemas/PagingInfo' + x-examples: + Example 1: + results: + - transactionId: aa02271d-ed5f-47f5-be76-778d5905225a + status: Completed + integrationType: expenses + - transactionId: 730177a2-8505-410a-9ebc-c2dd52e4bea9 + status: Completed + integrationType: expenses + pageNumber: 1 + pageSize: 100 + totalResults: 2 + links: + self: + href: string + current: + href: string + TransactionStatus: + title: Transaction status + x-internal: true + type: string + description: Status of the transaction. + enum: + - Unknown + - Pending + - ValidationError + - Completed + - PushError + example: Completed + nullable: true + TransferTransactionRequest: + title: Transfer + type: object + properties: + description: type: string - example: '2022-10-23' - description: |- - In Codat's data model, dates are represented using the ISO 8601 standard. Date fields are formatted as strings; for example: - ``` - 2020-10-08 - ``` - required: - - id - - accountName - - accountType - - accountNumber - - currency - - balance - definitions: - sourceAccountV2Prototype: - title: Source account (v2) + description: 'Any private, company notes about the transaction.' + example: Transfer from bank account Y to bank account Z + date: + allOf: + - description: Date of the transfer transaction as recorded in the accounting software. + - title: Date time + type: string + examples: + - '2022-10-23T00:00:00Z' + - '2022-10-23' + description: "In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:\n\n```\n2020-10-08T22:40:50Z\n2021-01-01T00:00:00\n```\n\n\n\nWhen syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:\n\n- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`\n- Unqualified local time: `2021-11-15T01:00:00`\n- UTC time offsets: `2021-11-15T01:00:00-05:00`\n\n> Time zones\n> \n> Not all dates from Codat will contain information about time zones. \n> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced." + from: type: object properties: - id: - $ref: '#/components/schemas/SourceAccountV2/properties/id' - accountName: - $ref: '#/components/schemas/SourceAccountV2/properties/accountName' - accountType: - $ref: '#/components/schemas/SourceAccountV2/properties/accountType' - accountNumber: - $ref: '#/components/schemas/SourceAccountV2/properties/accountNumber' - routingInfo: - $ref: '#/components/schemas/SourceAccountV2/definitions/routingInfo' - sortCode: - $ref: '#/components/schemas/SourceAccountV2/properties/sortCode' - currency: - $ref: '#/components/schemas/SourceAccount/properties/currency' - balance: - $ref: '#/components/schemas/SourceAccountV2/properties/balance' - modifiedDate: - $ref: '#/components/schemas/SourceAccountV2/properties/modifiedDate' - accountInfo: - $ref: '#/components/schemas/SourceAccountV2/definitions/accountInfo' + accountRef: + type: object + title: Account reference + description: Reference of the account you are transferring money from. + properties: + id: + type: string + description: '''id'' from the Accounts data type.' + required: + - id + amount: + type: number + format: decimal + description: Amount that has been transferred from the account in the native currency of the account. required: - - id - - accountName - - accountType - - accountNumber - - currency - - balance - accountInfo: - title: Account Info + - accountRef + - amount + to: type: object - nullable: true properties: - description: - type: string - nullable: true - description: Description of the account. - nickname: - type: string - nullable: true - description: Name given to the account by the user. Used in UIs to assist in account selection. - accountOpenDate: - $ref: '#/components/schemas/SourceAccountV2/properties/feedStartDate' - nullable: true - description: Date when the account was opened or created at the provider - availableBalance: + accountRef: + type: object + title: Account reference + description: Reference of the account you are transferring money to. + properties: + id: + type: string + description: '''id'' from the Accounts data type.' + required: + - id + amount: type: number format: decimal - nullable: true - description: Balance of funds available for use. This includes pending activity. - sourceAccounts: - title: Source accounts - type: array - items: - $ref: '#/components/schemas/SourceAccountV2' - routingInfo: - title: Routing Info - type: object - description: Routing information for the bank. This does not include account number. - properties: - bankCode: - type: string - nullable: true - description: The numeric identifier of the routing number - type: - type: string - nullable: true - default: bankcode - enum: - - rtn - - aba - - swift - - bsb - - iban - - nz2 - - trno - - sortcode - - blz - - ifsc - - bankcode - - apca - - clabe - description: The type of routing number. - examples: - - id: acc-001 - accountName: account-081 - accountType: checking - accountNumber: '12345670' - routingInfo: - bankCode: 021001088 - type: bankcode - currency: GBP - balance: 99.99 - accountInfo: - description: account description 1 - nickname: account 123 - accountOpenDate: '2023-05-06' - availableBalance: 10 - modifiedDate: '2024-08-02T00:00:00.000Z' - status: pending - feedStartDate: '2024-05-01' - - id: acc-002 - accountName: account-083 - accountType: savings - accountNumber: '23456789' - routingInfo: - bankCode: 021001088 - type: bankcode - currency: GBP - balance: 400 - accountInfo: - description: account description 2 - nickname: account 1290 - accountOpenDate: '2023-05-23' - availableBalance: 400 - modifiedDate: '2024-08-02T00:00:00.000Z' - status: pending - feedStartDate: '2024-05-01' - SourceAccountV2BatchCreateResponse: - title: Batch source account (v2) creation response - description: Account ID and resulting object of the batch `Create source account` request. + description: Amount that has been transferred to the account in the native currency of the account. + required: + - accountRef + - amount + required: + - date + - from + - to + TransferTransactionResponse: + title: Create transfer response + x-internal: true type: object properties: - sourceAccountId: + syncId: type: string - description: Unique ID for the source account. - examples: - - '12345' - result: - $ref: '#/components/schemas/SourceAccountV2BatchCreateResponse/definitions/sourceAccountV2BatchCreateResult' - definitions: - sourceAccountV2BatchCreateResult: - title: Source Account V2 Batch CreateResult - description: Status details and corresponding object of the `Create account` operation. - type: object + example: cd937d46-8e41-43a9-9477-a79158ffd98a + format: uuid + description: Unique id of sync created + UpdateCustomerResponse: + title: Update customer response + x-internal: true + allOf: + - type: object properties: - statusCode: - type: integer - description: The HTTP status code for the creation of the source account - error: - type: string - nullable: true - description: A brief description of the error. - account: - $ref: '#/components/schemas/SourceAccountV2' - SourceAccountWebhook: - title: Source account status changed webhook + data: + allOf: + - $ref: '#/components/schemas/Customer' + - deprecated: true + - $ref: '#/components/schemas/PushOperation' + UpdateExpenseRequest: + title: Updating expense transaction request type: object properties: - id: + type: type: string - format: uuid - example: ba29118f-5406-4e59-b05c-ba307ca38d01 - description: Unique identifier of the event. - eventType: + example: Payment + description: The type of transaction. + enum: + - Payment + - Refund + - Reward + - Chargeback + issueDate: type: string - description: The type of event. - examples: - - bankFeeds.sourceAccount.connected - - bankFeeds.sourceAccount.disconnected - generatedDate: - $ref: '#/components/schemas/DateTime' - description: The date time in UTC the event was generated in Codat. - payload: - $ref: '#/components/schemas/SourceAccountWebhook/definitions/sourceAccountWebhookPayload' - definitions: - sourceAccountWebhookPayload: - title: Payload + description: Date the transaction was recorded. + example: '2022-06-28T00:00:00.000Z' + currency: + type: string + example: GBP + description: Currency the transaction was recorded in. + currencyRate: + $ref: '#/components/schemas/ExpenseTransaction/properties/currencyRate' + contactRef: + description: Supplier or Customer for the purchase to be associated to. + $ref: '#/components/schemas/ExpenseContactRef' + bankAccountRef: type: object + title: Bank account reference properties: - referenceCompany: - $ref: '#/components/schemas/Company/definitions/companyReference' - companyId: - $ref: '#/components/parameters/companyId/schema' - deprecated: true - connectionId: - $ref: '#/components/parameters/connectionId/schema' - sourceAccount: - oneOf: - - $ref: '#/components/schemas/SourceAccountV2' - - $ref: '#/components/schemas/SourceAccount' - StartScheduledSyncResult: - title: Start scheduled sync result - type: object - description: Represents the result of an ad-hoc sync request. - properties: - syncId: + id: + type: string + example: 787dfb37-5707-4dc0-8a86-8d74e4cc78ea + description: Identifier of the bank account. + merchantName: type: string - format: uuid - description: The unique identifier for the created sync. + description: Name of the merchant where the purchase took place + example: Amazon UK + lines: + type: array + description: Array of transaction lines. + items: + $ref: '#/components/schemas/ExpenseTransactionLine' + notes: + type: string + description: 'Any private, company notes about the transaction.' + example: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' required: - - syncId - SyncStatusResult: - title: Sync status + - type + - issueDate + - currency + UpdateExpenseResponse: + title: Update expense response + x-internal: true type: object - description: Represents the status of a managed bank feed sync. properties: syncId: type: string - format: uuid - description: The unique identifier for the sync. - clientId: - type: string - format: uuid - description: The ID of the client associated with the company that owns the source bank account. - companyId: - type: string - format: uuid - description: The ID of the company that owns the source bank account. - companyName: - type: string - description: The name of the company that owns the source bank account. - dataConnectionId: - type: string - format: uuid - description: The ID of the target accounting data connection. - sourceAccountId: - type: string - description: The ID of the source bank account from which transactions are fetched. - periodStartUtc: - type: string - format: date-time - description: The start of the sync period. - periodEndUtc: - type: string - format: date-time - description: The end of the sync period. - executionStartUtc: - type: string - format: date-time - description: The UTC timestamp when the sync started executing. - status: - type: string - description: 'The current status of the sync. Known values are `Started`, `Failed`, `SuccessDataPushed`, `SuccessNoDataPushed`, `PartialSuccessDataPushed`.' - example: SuccessDataPushed - executionEndUtc: + description: Unique identifier for the update expense sync. + example: 1ad0695c-4566-4715-918c-adbb03eac81e + UpdateReimbursableExpenseTransactionRequest: + title: Updating reimbursable expense transaction request + type: object + properties: + reference: type: string - format: date-time nullable: true - description: 'The UTC timestamp when the sync execution ended, if completed (i.e. `status` is any value other than `Started`).' - errorMessage: + description: User-friendly reference for the reimbursable expense. + contactRef: + $ref: '#/components/schemas/ReimbursementContactRef' + apAccountRef: + $ref: '#/components/schemas/apAccountRef' + issueDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: Date of the transaction was recorded. + dueDate: + description: Date the supplier is due to be paid. + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + currency: type: string - nullable: true - description: Error message if the sync failed. - errorCode: + example: GBP + description: Currency the transaction was recorded in. + currencyRate: + $ref: '#/components/schemas/ExpenseTransaction/properties/currencyRate' + notes: type: string - nullable: true - description: Error code if the sync failed. - pushOperationKeys: + description: 'Any private, company notes about the transaction.' + example: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + lines: type: array + description: Array of transaction lines. + minItems: 1 + maxItems: 100 items: - type: string - format: uuid - nullable: true - description: 'List of write operation keys associated with the sync, if the sync resulted in write attempts.' + $ref: '#/components/schemas/ReimbursableExpenseTransactionLine' required: - - syncId - - clientId - - companyId - - companyName - - dataConnectionId - - sourceAccountId - - periodStartUtc - - periodEndUtc - - executionStartUtc - - status + - contactRef + - issueDate + - dueDate + - currency + UpdateSupplierResponse: + title: Update supplier response + x-internal: true + allOf: + - type: object + properties: + data: + allOf: + - $ref: '#/components/schemas/Supplier' + - deprecated: true + - $ref: '#/components/schemas/PushOperation' + validFor: + title: Valid endpoints + x-internal: true + type: array + description: Supported endpoints for the account. + nullable: false + items: + type: string + enum: + - expense-transactions.Payment + - expense-transactions.Refund + - expense-transactions.Reward + - expense-transactions.Chargeback + - reimbursable-expense-transactions + - transfer-transactions + - adjustment-transactions + example: expense-transactions.Payment + validTransactionTypes: + title: Valid transaction types + x-internal: true + type: array + description: Supported transaction types for the account. + nullable: false + items: + type: string + enum: + - Payment + - Refund + - Reward + - Chargeback + example: Payment parameters: - companyId: - name: companyId + syncId: + name: syncId in: path required: true schema: type: string format: uuid - example: 8a210b68-6988-11ed-a1eb-0242ac120002 - description: Unique identifier for your SMB in Codat. - description: Unique identifier for a company. - connectionId: - name: connectionId + example: 6fb40d5e-b13e-11ed-afa1-0242ac120002 + description: Unique identifier for a sync. + transactionId: + name: transactionId in: path required: true schema: type: string format: uuid - example: 2e9d2c44-f675-40ba-8049-353bfcb5e171 - description: Unique identifier for a company's data connection. - description: Unique identifier for a connection. - accountId: - name: accountId - in: path - required: true - schema: - type: string - examples: - - 13d946f0-c5d5-42bc-b092-97ece17923ab - - 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2 - - 7110701885 - - EILBDVJVNUAGVKRQ - description: Unique identifier for an account. + example: 336694d8-2dca-4cb5-a28d-3ccb83e55eee + description: The unique identifier for your SMB's transaction. page: name: page in: query @@ -5181,6 +13022,26 @@ components: type: string example: '-modifiedDate' description: 'Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).' + companyId: + name: companyId + in: path + required: true + schema: + type: string + format: uuid + example: 8a210b68-6988-11ed-a1eb-0242ac120002 + description: Unique identifier for your SMB in Codat. + description: Unique identifier for a company. + connectionId: + name: connectionId + in: path + required: true + schema: + type: string + format: uuid + example: 2e9d2c44-f675-40ba-8049-353bfcb5e171 + description: Unique identifier for a company's data connection. + description: Unique identifier for a connection. dataType: name: dataType description: The key of a Codat data type @@ -5188,15 +13049,30 @@ components: required: true schema: $ref: '#/components/schemas/DataType' - datasetId: - name: datasetId + supplierId: + name: supplierId in: path required: true schema: type: string - format: uuid - description: Unique identifier for the dataset that completed its sync. - description: Unique identifier for the dataset that completed its sync. + examples: + - 13d946f0-c5d5-42bc-b092-97ece17923ab + - 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2 + - 7110701885 + - EILBDVJVNUAGVKRQ + description: Unique identifier for a supplier. + customerId: + name: customerId + in: path + required: true + schema: + type: string + examples: + - 13d946f0-c5d5-42bc-b092-97ece17923ab + - 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2 + - 7110701885 + - EILBDVJVNUAGVKRQ + description: Unique identifier for a customer. timeoutInMinutes: name: timeoutInMinutes in: query @@ -5204,6 +13080,20 @@ components: type: integer format: int32 description: Time limit for the push operation to complete before it is timed out. + allowSyncOnPushComplete: + name: allowSyncOnPushComplete + in: query + schema: + type: boolean + default: true + description: Allow a sync upon push completion. + forceUpdate: + name: forceUpdate + in: query + schema: + type: boolean + default: false + description: 'When updating data in the destination platform Codat checks the `sourceModifiedDate` against the `lastupdated` date from the accounting software, if they''re different Codat will return an error suggesting you should initiate another pull of the data. If this is set to `true` then the update will override this check.' responses: BadRequest: description: The request made is not valid. @@ -5341,6 +13231,21 @@ components: correlationId: bc997528a9d7abb9161ef45f05d38599 canBeRetried: Unknown detailedErrorCode: 0 + Unprocessable-Content: + description: The requests made can't be processed. This may be due to differences in platform support. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + examples: + Conflict: + value: + statusCode: 422 + service: ExpenseSyncApi + error: Expense transaction updates are not supported for platforms other than Xero. + correlationId: 7c8e23841d211c87f49f30b248f70c93 + canBeRetried: Unknown + detailedErrorCode: 0 Too-Many-Requests: description: Too many requests were made in a given amount of time. Wait a short period and then try again. content: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 80ee4e99e..6a29c3b91 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.761.5 +speakeasyVersion: 1.761.9 sources: accounting-source: sourceNamespace: accounting-source @@ -75,8 +75,8 @@ sources: - "1.1" sync-for-expenses-source: sourceNamespace: sync-for-expenses-source - sourceRevisionDigest: sha256:5dfc2374e127deec41d3939693c268068f3649d794687399f56d9e49685e9c5f - sourceBlobDigest: sha256:87c0a544209788904d0cba68b864dbfc7f554dc69335339c71f52f146931ae26 + sourceRevisionDigest: sha256:11af6475e2c0576d71adee597a3315d14622ac764c9627301b129c2701d72041 + sourceBlobDigest: sha256:34aa4d8a3385871bfb861e1ac69865cc6dbd2d2f776983533959baedd2a3da0e tags: - latest - prealpha @@ -156,10 +156,10 @@ targets: sync-for-expenses-library: source: sync-for-expenses-source sourceNamespace: sync-for-expenses-source - sourceRevisionDigest: sha256:5dfc2374e127deec41d3939693c268068f3649d794687399f56d9e49685e9c5f - sourceBlobDigest: sha256:87c0a544209788904d0cba68b864dbfc7f554dc69335339c71f52f146931ae26 + sourceRevisionDigest: sha256:11af6475e2c0576d71adee597a3315d14622ac764c9627301b129c2701d72041 + sourceBlobDigest: sha256:34aa4d8a3385871bfb861e1ac69865cc6dbd2d2f776983533959baedd2a3da0e codeSamplesNamespace: sync-for-expenses-source-python-code-samples - codeSamplesRevisionDigest: sha256:e3caf5ee3c300a67f60328a4414edc58c832b4024f36ea2d17998e1065218710 + codeSamplesRevisionDigest: sha256:141e93bf0e80c81b7d6e8217483f61a7e04c8c460545ca5b84897def8e172749 sync-for-payables-library: source: sync-for-payables-source sourceNamespace: sync-for-payables-source diff --git a/sync-for-expenses/.speakeasy/gen.lock b/sync-for-expenses/.speakeasy/gen.lock index 85f99c5d0..e8e069927 100755 --- a/sync-for-expenses/.speakeasy/gen.lock +++ b/sync-for-expenses/.speakeasy/gen.lock @@ -1,32 +1,32 @@ lockVersion: 2.0.0 id: a2c830ee-4f93-4e8e-8f01-48d0991317f5 management: - docChecksum: 0045f2c288d7f2842402371b22686871 + docChecksum: 30019a7a4b59fe2bee4f34a5b4a56669 docVersion: prealpha - speakeasyVersion: 1.750.0 - generationVersion: 2.856.1 - releaseVersion: 8.0.0 - configChecksum: a08c372ed640798001bf6718f37793b4 + speakeasyVersion: 1.761.9 + generationVersion: 2.881.4 + releaseVersion: 8.0.1 + configChecksum: 174b092eae7cab080c89636a960ce92a repoURL: https://github.com/codatio/client-sdk-python.git repoSubDirectory: sync-for-expenses installationURL: https://github.com/codatio/client-sdk-python.git#subdirectory=sync-for-expenses published: true persistentEdits: - generation_id: f248ae62-923b-4e20-bb6b-4e590eaade4a - pristine_commit_hash: 46305a5c242f2facf3f36f1162df8807ce9981f7 - pristine_tree_hash: 5b7741f5bfbd5b1da1fa14b021da34511201f3f4 + generation_id: b3dcb2e5-d2a4-457a-9dcc-d02ca9858709 + pristine_commit_hash: 5804f398d155944e63fd5c83381771fcc92f1e70 + pristine_tree_hash: adfdb7ecc2f08cc623488234d65cd60e11d10a8c features: python: additionalDependencies: 1.0.0 constsAndDefaults: 1.0.7 - core: 6.0.16 + core: 6.0.21 decimal: 1.0.0 defaultEnabledRetries: 0.2.0 deprecations: 3.0.2 enumUnions: 0.1.1 envVarSecurityUsage: 0.3.2 examples: 3.0.3 - globalSecurity: 3.0.5 + globalSecurity: 3.0.7 globalSecurityCallbacks: 1.0.0 globalServerURLs: 3.2.1 inputOutputModels: 3.0.0 @@ -35,7 +35,7 @@ features: nameOverrides: 3.0.3 nullables: 1.0.2 responseFormat: 1.1.0 - retries: 3.0.4 + retries: 3.0.5 sdkHooks: 1.2.1 serverEventsSentinels: 0.1.0 uploadStreams: 1.0.0 @@ -407,8 +407,8 @@ trackedFiles: pristine_git_object: c79edb11bd2ca64d886d93cb120d12da03228300 docs/models/shared/connection.md: id: 906ff4b2d85c - last_write_checksum: sha1:fff47ac387831f68ff55601894c3fcc54117de63 - pristine_git_object: 108eb913c296dbb0b3b3363f54f8728dc81004f1 + last_write_checksum: sha1:62b78fe1ed5377f7325ba18226243b02c601669a + pristine_git_object: 515e432112d59f998acd19a858856d2042b6745e docs/models/shared/connections.md: id: f1fe5197905a last_write_checksum: sha1:4b2bee44d11f447b172efd1f9173e9dc635bf06c @@ -903,8 +903,8 @@ trackedFiles: pristine_git_object: 61b9570dea04a5d30f10901415117b1211dea708 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:fe62966cb5fbff0364ec9f12a0a76a945521e241 - pristine_git_object: 7d51a3d5a7b93a6aa049124090d0012843d6bef5 + last_write_checksum: sha1:012ac2e65f28008fca761c40ba0f506b6840ccd4 + pristine_git_object: abdbe034c548bbe194055667ec9ebe871514ff07 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:c9d3fb80d212f12afe5780a4498271a24b7c7dd4 @@ -931,64 +931,64 @@ trackedFiles: pristine_git_object: fbff2b21de688cd60f00e9ebcfe18f1e852700ee src/codat_sync_for_expenses/_version.py: id: 4eaecdcaa585 - last_write_checksum: sha1:60dbb7355c2504e3ffb5f1f86bef33718cae549b - pristine_git_object: 42f0553d1dd39cbf042c9222f721b2742169c2d7 + last_write_checksum: sha1:5d19cf39d0b3e789fde1ba2b897ce3551bdc253f + pristine_git_object: 80f9198437c33c1cc9e2988d227f7d2ccdc04969 src/codat_sync_for_expenses/accounts.py: id: d2880ef8ea4c - last_write_checksum: sha1:ebcec1b930f34213940f9c54c8b813057be4a5d6 - pristine_git_object: a82a8984f5c350bf70358f697c43c522fa61efa4 + last_write_checksum: sha1:a3b3d3a7ea3724bdb7f8cee6a5bfff88f6038268 + pristine_git_object: 9a5c1d0be95ddb1666d35e5ad9d78e238125af7e src/codat_sync_for_expenses/adjustments.py: id: 34292198560a - last_write_checksum: sha1:e193645fa4bb2f7884ce1c214ff38dbdae64c0d0 - pristine_git_object: c34ec16b6c7b9ec48302fc788d675ed11619c913 + last_write_checksum: sha1:1e6e8650790205c743d16c183a4d49ffd1c52645 + pristine_git_object: d6ed505d43fe8f94b5c28997827d42a108dc66a5 src/codat_sync_for_expenses/attachments.py: id: 8915e70e4d2c - last_write_checksum: sha1:1cdaa720ff4165b697beb77e0ce3125a1fc9df9f - pristine_git_object: 5dd33e2a07b1aaf75a649e6e789d6b5122574722 + last_write_checksum: sha1:18bdfef10a1ead630c3494d602de20c0b08dd67b + pristine_git_object: 7838d7242e7234c5a56883db99794a5160fde200 src/codat_sync_for_expenses/bank_accounts.py: id: 6e28d646eece - last_write_checksum: sha1:47f2fd372ffbc0aaff9fe058cb1bc5def2f31e4a - pristine_git_object: 01843dadae90e787bda04bf1039d57dd0bccc112 + last_write_checksum: sha1:9e174442e5761f22d144d2d7a8ee0c2f867ff778 + pristine_git_object: 9a9bb7bd718aecfbf87f59986060f5d7dbb32c0d src/codat_sync_for_expenses/basesdk.py: id: 8428daa15a92 - last_write_checksum: sha1:d087d87d2542fe76ea6ca52bda1ba81288161290 - pristine_git_object: 8355740f1b3e04767695a464e662d0c3411dfc44 + last_write_checksum: sha1:a5e2b60be60bd1dfb158fab91adfd339a086a68d + pristine_git_object: f4d1f7647534014a9d920c6d1cc553bfbfa63d21 src/codat_sync_for_expenses/companies.py: id: d3bd5734ad43 - last_write_checksum: sha1:6ab8c9ace191b185b3c60a2fc567bb3ba164d587 - pristine_git_object: 3a88801d0b7ceefe2a13ff0e1997b6acf47c6735 + last_write_checksum: sha1:8abbb6d36e94993117197a4199e086650f6af7d2 + pristine_git_object: 9e5e6957f734ba7047173282c10385f41f8ce981 src/codat_sync_for_expenses/company_info.py: id: 4ff54297bd2f - last_write_checksum: sha1:38c3fa5ecfc3bf938581ede8c23a8324e1d13315 - pristine_git_object: f0df70fded36653b70a7b181070cbb379fb99c32 + last_write_checksum: sha1:6a2590829db741ed7b5f633650506544864726ac + pristine_git_object: ffb248d4b3b0ebd084c340ba5f6d327e9cc5e75f src/codat_sync_for_expenses/configuration.py: id: d6d264878c9b - last_write_checksum: sha1:ea0b07bcdae0e3bea48ca5d3c6612933ffca627c - pristine_git_object: a73937af330bc551f180eee7469b2fb17fbf6e7a + last_write_checksum: sha1:c0c9c9e7cff9954edd8156962fac6b145a04101d + pristine_git_object: c2a5f51b1dde8a8deadd94c121db8fdc6c5e774a src/codat_sync_for_expenses/connections.py: id: f600c6870ded - last_write_checksum: sha1:68a9568f2b6ad8393692b284cd221af7ec7e185d - pristine_git_object: ae747c57c147cec29b9b8cd55f8e4fa9ac63b136 + last_write_checksum: sha1:a48d2ecd2a06f6c4f7985d705b13f48df16e59b1 + pristine_git_object: 9fa7bedf98d3702c403d1ad18ab96e6547a8a9bc src/codat_sync_for_expenses/customers.py: id: 3de95af1cfe4 - last_write_checksum: sha1:46550176cfc9d87fd70d6010603fe19aceae0e73 - pristine_git_object: 2197110dededf0b8de0def43d25afc1ad31c4215 + last_write_checksum: sha1:f8fdc03b0ec01ae19a563ca1e9de3c14a64fca4d + pristine_git_object: fd58f3fbc90ecbf88bbaf697bfe1c38565bc0743 src/codat_sync_for_expenses/expenses.py: id: 1a81e5617a14 - last_write_checksum: sha1:3e4dbdae451765d6de4b79c0d29e1a9bd61483ee - pristine_git_object: cc3b70604c14ea2a3afda1d2a12999708f566f4c + last_write_checksum: sha1:3ed65627bda4ac2c182bd78852150101105b89b0 + pristine_git_object: 985549d7c89d0de7ff5c526616e09cb080c54041 src/codat_sync_for_expenses/httpclient.py: id: 5700e3065fa5 last_write_checksum: sha1:5e55338d6ee9f01ab648cad4380201a8a3da7dd7 pristine_git_object: 89560b566073785535643e694c112bedbd3db13d src/codat_sync_for_expenses/manage_data.py: id: 07d9d6fa02aa - last_write_checksum: sha1:76f43524100ca219155fe2b989687be23ff387e2 - pristine_git_object: 05e9ac0e7020865e3e769976bbe8ace907ca99cc + last_write_checksum: sha1:7e157d29acfd8cfc85bd9d4fe5a920beaf5c8fa8 + pristine_git_object: 376c3b62354217d5057b5102b191c24a5da34d3d src/codat_sync_for_expenses/mapping_options.py: id: 8f4196c6c67a - last_write_checksum: sha1:536aff6ff4790a32be3b1dd159fefb346fb680e7 - pristine_git_object: b5c7e39ec3e423a8644d51023f5bedb48f16a8a2 + last_write_checksum: sha1:845541d1ef3467b6e8f3c264a3776d4ec8e82c41 + pristine_git_object: 4e8b9a0555ade68584645015799bdfe0bbdf1148 src/codat_sync_for_expenses/models/__init__.py: id: e3eca998ee77 last_write_checksum: sha1:9a8939813e0fb58048e96b0a5815d0c70598a72c @@ -1315,8 +1315,8 @@ trackedFiles: pristine_git_object: a54c3cd6db11ad15d574b9a0f48f2ce210b7d175 src/codat_sync_for_expenses/models/shared/connection.py: id: f66117ee0d9d - last_write_checksum: sha1:3d341da3057e7c16eca567a54a30d342e7761cee - pristine_git_object: 397e522695936a1ea9fb877cf7d159d286f6f4ac + last_write_checksum: sha1:477a5cca5d433f88cc2f370f3cf39b3be1fb1640 + pristine_git_object: adb64d4b50296f1c3275cd024926fe3f7f39695b src/codat_sync_for_expenses/models/shared/connections.py: id: d6554abbbb75 last_write_checksum: sha1:25b7d0e141aceb7d6029da45fec09f0c504a98c2 @@ -1627,16 +1627,16 @@ trackedFiles: pristine_git_object: 3751f5020669efcbc816d484ee23fd606eea31a4 src/codat_sync_for_expenses/push_operations.py: id: d47dd9babd68 - last_write_checksum: sha1:bdacb2bbe086669570485f2a463fe05f0521fad4 - pristine_git_object: e3736b5651c4123ef146c9f9d4228c890189ea83 + last_write_checksum: sha1:12333b599ffb60f586a802b58fbe95d1051e0ccb + pristine_git_object: 236ddb112255ea823c3039c4918fd956959c2468 src/codat_sync_for_expenses/py.typed: id: e310e43dfdd2 last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 src/codat_sync_for_expenses/reimbursements.py: id: acc1858c3fb3 - last_write_checksum: sha1:b8c361ffd4008f43f749c147e889eba1294167fa - pristine_git_object: b4f062a1ab3ce110132af7ea446fc75cec4a4231 + last_write_checksum: sha1:40c4f26d18ba76ec17e60ec586a3d8dbe664b78d + pristine_git_object: 0b774fd7e7f5b63c1d3f8d32527088402d3937d7 src/codat_sync_for_expenses/sdk.py: id: 5078dc18b55d last_write_checksum: sha1:fa3db0ca7da31db0a3b965ea227cb9485ac18632 @@ -1647,20 +1647,20 @@ trackedFiles: pristine_git_object: c775d7e3c066e387d574111dafb5c6761d6d758f src/codat_sync_for_expenses/suppliers.py: id: 8b0ba331d831 - last_write_checksum: sha1:cdc848e1897fca545a889c650eee9d9ae40f34a0 - pristine_git_object: aa59544a19462a1c213a660c5632931624da96b5 + last_write_checksum: sha1:3383eb601ec2c131de6878d632de91d36014c9e1 + pristine_git_object: e4d2e5578613e768efc0fdc02f9f70fb6b81053b src/codat_sync_for_expenses/sync.py: id: 823586a122d7 - last_write_checksum: sha1:1ab1aff430bb318d0de8cd234f772ea5b3e5a916 - pristine_git_object: d7ecb923f19034abba3e828029032e22fd2330aa + last_write_checksum: sha1:dd8b0a4b02c67421ba7f6d99909db620c7387b94 + pristine_git_object: 98bdcbf0940abc2e2198e4e29e14f77a9fc5f73f src/codat_sync_for_expenses/transaction_status.py: id: 90c0b74e6ab7 - last_write_checksum: sha1:147d51667c31dc1407e8ff7a629c7fd0c5745a69 - pristine_git_object: b7cedfb4a4f856c859b81c2d571fb2ed9a25ac56 + last_write_checksum: sha1:931822c24e05028755a831275bb722ef013d046b + pristine_git_object: 6938a60cde28f1074f26f76b4eb7a4789d38f1f6 src/codat_sync_for_expenses/transfers.py: id: 762c7677672c - last_write_checksum: sha1:5c6789fa292c55469b6b772d4c61fe6c56a456d8 - pristine_git_object: 373ec19a755164f21aee97767dd64cfbca371aeb + last_write_checksum: sha1:f3b0e86661cbb1fbd5915b788cb08bfa25475d6c + pristine_git_object: 47ee0b46c61b807f9d392f36cc4384072c3b4d13 src/codat_sync_for_expenses/types/__init__.py: id: b28e148a29db last_write_checksum: sha1:140ebdd01a46f92ffc710c52c958c4eba3cf68ed @@ -1691,8 +1691,8 @@ trackedFiles: pristine_git_object: 3324e1bc2668c54c4d5f5a1a845675319757a828 src/codat_sync_for_expenses/utils/eventstreaming.py: id: 3f45f5d8ab8b - last_write_checksum: sha1:ffa870a25a7e4e2015bfd7a467ccd3aa1de97f0e - pristine_git_object: f2052fc22d9fd6c663ba3dce019fe234ca37108b + last_write_checksum: sha1:620d78a8b4e3b854e08d136e02e40a01a786bd70 + pristine_git_object: 3bdcd6d3d4fc772cb7f5fca8685dcdc8c85e13e8 src/codat_sync_for_expenses/utils/forms.py: id: 994366b7c5ee last_write_checksum: sha1:15fa7e9ab1611e062a9984cf06cb20969713d295 @@ -1707,8 +1707,8 @@ trackedFiles: pristine_git_object: b661aff65d38b77d035149699aea09b2785d2fc6 src/codat_sync_for_expenses/utils/metadata.py: id: c7a7a7f47cab - last_write_checksum: sha1:c6a560bd0c63ab158582f34dadb69433ea73b3d4 - pristine_git_object: 173b3e5ce658675c2f504222a56b3daaaa68107d + last_write_checksum: sha1:e703e5cbb5255144aacf86898d1420529afaaff8 + pristine_git_object: 5abddd588837ac297050ca3b543627faadb350a9 src/codat_sync_for_expenses/utils/queryparams.py: id: 0df03c7633a7 last_write_checksum: sha1:b94c3f314fd3da0d1d215afc2731f48748e2aa59 @@ -1723,12 +1723,12 @@ trackedFiles: pristine_git_object: af07d4e941007af4213c5ec9047ef8a2fca04e5e src/codat_sync_for_expenses/utils/security.py: id: 1c5e552f39c9 - last_write_checksum: sha1:435dd8b180cefcd733e635b9fa45512da091d9c0 - pristine_git_object: 17996bd54b8624009802fbbdf30bcb4225b8dfed + last_write_checksum: sha1:c11eef495b6aaa249178c24c796940cc540b7a00 + pristine_git_object: 42d8d78e9981eed7507670014d99588e27ab325a src/codat_sync_for_expenses/utils/serializers.py: id: ef50cb660918 - last_write_checksum: sha1:ce1d8d7f500a9ccba0aeca5057cee9c271f4dfd7 - pristine_git_object: 14321eb479de81d0d9580ec8291e0ff91bf29e57 + last_write_checksum: sha1:61009f2e4ef6613a1a5af813fe020373dae5a492 + pristine_git_object: d2149f8b909cb96628db140ac3cddb1b1e981367 src/codat_sync_for_expenses/utils/unmarshal_json_response.py: id: 18372fc36b7e last_write_checksum: sha1:820e522b0636ff7a98f8faa121d96366cad2343a @@ -4129,7 +4129,18 @@ examples: application/json: {"canBeRetried": "Unknown", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "detailedErrorCode": 0, "error": "Error processing request - not valid.", "service": "PublicApi", "statusCode": 400} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: "## Python SDK Changes:\n* `codat_sync_expenses.connections.create_partner_expense_connection()`: `response.connection_info.Map` **Changed** (Breaking ⚠️)\n* `codat_sync_expenses.companies.create()`: `response.data_connections[].connection_info.Map` **Changed** (Breaking ⚠️)\n* `codat_sync_expenses.companies.get()`: `response.data_connections[].connection_info.Map` **Changed** (Breaking ⚠️)\n* `codat_sync_expenses.companies.list()`: \n * `request.tags` **Added**\n * `response.results[].data_connections[].connection_info.Map` **Changed** (Breaking ⚠️)\n* `codat_sync_expenses.companies.update()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.data_connections[].connection_info.Map` **Changed** (Breaking ⚠️)\n* `codat_sync_expenses.connections.create()`: `response.connection_info.Map` **Changed** (Breaking ⚠️)\n* `codat_sync_expenses.connections.get()`: `response.connection_info.Map` **Changed** (Breaking ⚠️)\n* `codat_sync_expenses.connections.list()`: `response.results[].connection_info.Map` **Changed** (Breaking ⚠️)\n* `codat_sync_expenses.connections.unlink()`: `response.connection_info.Map` **Changed** (Breaking ⚠️)\n* `codat_sync_expenses.companies.replace()`: **Added**\n* `codat_sync_expenses.manage_data.get()`: `response.account_transactions.last_successful_sync` **Changed**\n* `codat_sync_expenses.manage_data.refresh_all_data_types()`: `error.status[400]` **Added**\n* `codat_sync_expenses.manage_data.refresh_data_type()`: `error.status[400]` **Added**\n" +releaseNotes: | + ## Python SDK Changes: + * `codat_sync_expenses.companies.create()`: `response.data_connections[].integration_key` **Changed** + * `codat_sync_expenses.companies.get()`: `response.data_connections[].integration_key` **Changed** + * `codat_sync_expenses.companies.list()`: `response.results[].data_connections[].integration_key` **Changed** + * `codat_sync_expenses.companies.replace()`: `response.data_connections[].integration_key` **Changed** + * `codat_sync_expenses.companies.update()`: `response.data_connections[].integration_key` **Changed** + * `codat_sync_expenses.connections.create()`: `response.integration_key` **Changed** + * `codat_sync_expenses.connections.create_partner_expense_connection()`: `response.integration_key` **Changed** + * `codat_sync_expenses.connections.get()`: `response.integration_key` **Changed** + * `codat_sync_expenses.connections.list()`: `response.results[].integration_key` **Changed** + * `codat_sync_expenses.connections.unlink()`: `response.integration_key` **Changed** generatedFiles: - .gitattributes - .python-version diff --git a/sync-for-expenses/.speakeasy/gen.yaml b/sync-for-expenses/.speakeasy/gen.yaml index e06553388..bd63c1a02 100644 --- a/sync-for-expenses/.speakeasy/gen.yaml +++ b/sync-for-expenses/.speakeasy/gen.yaml @@ -27,7 +27,7 @@ generation: skipResponseBodyAssertions: false telemetryEnabled: true python: - version: 8.0.0 + version: 8.0.1 additionalDependencies: dev: {} main: {} diff --git a/sync-for-expenses/RELEASES.md b/sync-for-expenses/RELEASES.md index 5ec12f583..3678c7f42 100644 --- a/sync-for-expenses/RELEASES.md +++ b/sync-for-expenses/RELEASES.md @@ -756,4 +756,14 @@ Based on: ### Generated - [python v8.0.0] sync-for-expenses ### Releases -- [PyPI v8.0.0] https://pypi.org/project/codat-sync-for-expenses/8.0.0 - sync-for-expenses \ No newline at end of file +- [PyPI v8.0.0] https://pypi.org/project/codat-sync-for-expenses/8.0.0 - sync-for-expenses + +## 2026-04-22 11:07:21 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.761.9 (2.881.4) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v8.0.1] sync-for-expenses +### Releases +- [PyPI v8.0.1] https://pypi.org/project/codat-sync-for-expenses/8.0.1 - sync-for-expenses \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/connection.md b/sync-for-expenses/docs/models/shared/connection.md index 108eb913c..515e43211 100644 --- a/sync-for-expenses/docs/models/shared/connection.md +++ b/sync-for-expenses/docs/models/shared/connection.md @@ -21,7 +21,7 @@ Before you can use a data connection to pull or push data, the company must gran | `data_connection_errors` | List[[shared.DataConnectionError](../../models/shared/dataconnectionerror.md)] | :heavy_minus_sign: | N/A | | | `id` | *str* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `integration_id` | *str* | :heavy_check_mark: | A Codat ID representing the integration. | fd321cb6-7963-4506-b873-e99593a45e30 | -| `integration_key` | *str* | :heavy_check_mark: | A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. | | +| `integration_key` | *Optional[str]* | :heavy_minus_sign: | A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. | | | `last_sync` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `link_url` | *str* | :heavy_check_mark: | The link URL your customers can use to authorize access to their business application. | https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/2e2eb431-c1fa-4dc9-93fa-d29781c12bcd/start | | `platform_name` | *str* | :heavy_check_mark: | Name of integration connected to company. | | diff --git a/sync-for-expenses/pyproject.toml b/sync-for-expenses/pyproject.toml index 7d51a3d5a..abdbe034c 100644 --- a/sync-for-expenses/pyproject.toml +++ b/sync-for-expenses/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "codat-sync-for-expenses" -version = "8.0.0" +version = "8.0.1" description = "Push expenses to accounting software." authors = [{ name = "Speakeasy" },] readme = "README-PYPI.md" diff --git a/sync-for-expenses/src/codat_sync_for_expenses/_version.py b/sync-for-expenses/src/codat_sync_for_expenses/_version.py index 42f0553d1..80f919843 100644 --- a/sync-for-expenses/src/codat_sync_for_expenses/_version.py +++ b/sync-for-expenses/src/codat_sync_for_expenses/_version.py @@ -3,11 +3,11 @@ import importlib.metadata __title__: str = "codat-sync-for-expenses" -__version__: str = "8.0.0" +__version__: str = "8.0.1" __openapi_doc_version__: str = "prealpha" -__gen_version__: str = "2.856.1" +__gen_version__: str = "2.881.4" __user_agent__: str = ( - "speakeasy-sdk/python 8.0.0 2.856.1 prealpha codat-sync-for-expenses" + "speakeasy-sdk/python 8.0.1 2.881.4 prealpha codat-sync-for-expenses" ) try: diff --git a/sync-for-expenses/src/codat_sync_for_expenses/accounts.py b/sync-for-expenses/src/codat_sync_for_expenses/accounts.py index a82a8984f..9a5c1d0be 100644 --- a/sync-for-expenses/src/codat_sync_for_expenses/accounts.py +++ b/sync-for-expenses/src/codat_sync_for_expenses/accounts.py @@ -100,18 +100,7 @@ def create( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -221,18 +210,7 @@ async def create_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -338,17 +316,7 @@ def get_create_model( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -454,17 +422,7 @@ async def get_create_model_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/sync-for-expenses/src/codat_sync_for_expenses/adjustments.py b/sync-for-expenses/src/codat_sync_for_expenses/adjustments.py index c34ec16b6..d6ed505d4 100644 --- a/sync-for-expenses/src/codat_sync_for_expenses/adjustments.py +++ b/sync-for-expenses/src/codat_sync_for_expenses/adjustments.py @@ -105,18 +105,7 @@ def create( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -233,18 +222,7 @@ async def create_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/sync-for-expenses/src/codat_sync_for_expenses/attachments.py b/sync-for-expenses/src/codat_sync_for_expenses/attachments.py index 5dd33e2a0..7838d7242 100644 --- a/sync-for-expenses/src/codat_sync_for_expenses/attachments.py +++ b/sync-for-expenses/src/codat_sync_for_expenses/attachments.py @@ -113,18 +113,7 @@ def upload( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -247,18 +236,7 @@ async def upload_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/sync-for-expenses/src/codat_sync_for_expenses/bank_accounts.py b/sync-for-expenses/src/codat_sync_for_expenses/bank_accounts.py index 01843dada..9a9bb7bd7 100644 --- a/sync-for-expenses/src/codat_sync_for_expenses/bank_accounts.py +++ b/sync-for-expenses/src/codat_sync_for_expenses/bank_accounts.py @@ -101,18 +101,7 @@ def create( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -223,18 +212,7 @@ async def create_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -341,17 +319,7 @@ def get_create_model( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -458,17 +426,7 @@ async def get_create_model_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/sync-for-expenses/src/codat_sync_for_expenses/basesdk.py b/sync-for-expenses/src/codat_sync_for_expenses/basesdk.py index 8355740f1..f4d1f7647 100644 --- a/sync-for-expenses/src/codat_sync_for_expenses/basesdk.py +++ b/sync-for-expenses/src/codat_sync_for_expenses/basesdk.py @@ -6,6 +6,7 @@ AfterErrorContext, AfterSuccessContext, BeforeRequestContext, + HookContext, ) from codat_sync_for_expenses.models import errors from codat_sync_for_expenses.utils import ( @@ -67,6 +68,7 @@ def _build_request_async( url_override: Optional[str] = None, http_headers: Optional[Mapping[str, str]] = None, allow_empty_value: Optional[List[str]] = None, + allowed_fields: Optional[List[str]] = None, ) -> httpx.Request: client = self.sdk_configuration.async_client return self._build_request_with_client( @@ -88,6 +90,7 @@ def _build_request_async( url_override, http_headers, allow_empty_value, + allowed_fields, ) def _build_request( @@ -111,6 +114,7 @@ def _build_request( url_override: Optional[str] = None, http_headers: Optional[Mapping[str, str]] = None, allow_empty_value: Optional[List[str]] = None, + allowed_fields: Optional[List[str]] = None, ) -> httpx.Request: client = self.sdk_configuration.client return self._build_request_with_client( @@ -132,6 +136,7 @@ def _build_request( url_override, http_headers, allow_empty_value, + allowed_fields, ) def _build_request_with_client( @@ -156,6 +161,7 @@ def _build_request_with_client( url_override: Optional[str] = None, http_headers: Optional[Mapping[str, str]] = None, allow_empty_value: Optional[List[str]] = None, + allowed_fields: Optional[List[str]] = None, ) -> httpx.Request: query_params = {} @@ -189,7 +195,9 @@ def _build_request_with_client( security = security() if security is not None: - security_headers, security_query_params = utils.get_security(security) + security_headers, security_query_params = utils.get_security( + security, allowed_fields + ) headers = {**headers, **security_headers} query_params = {**query_params, **security_query_params} @@ -226,15 +234,15 @@ def _build_request_with_client( data=serialized_request_body.data, files=serialized_request_body.files, headers=headers, - timeout=timeout, + timeout=timeout if timeout is not None else httpx.USE_CLIENT_DEFAULT, ) def do_request( self, - hook_ctx, - request, - error_status_codes, - stream=False, + hook_ctx: HookContext, + request: httpx.Request, + is_error_status_code: Callable[[int], bool], + stream: bool = False, retry_config: Optional[Tuple[RetryConfig, List[str]]] = None, ) -> httpx.Response: client = self.sdk_configuration.client @@ -246,6 +254,8 @@ def do(): http_res = None try: req = hooks.before_request(BeforeRequestContext(hook_ctx), request) + if "timeout" in request.extensions and "timeout" not in req.extensions: + req.extensions["timeout"] = request.extensions["timeout"] logger.debug( "Request:\nMethod: %s\nURL: %s\nHeaders: %s\nBody: %s", req.method, @@ -276,19 +286,6 @@ def do(): "" if stream else http_res.text, ) - if utils.match_status_codes(error_status_codes, http_res.status_code): - result, err = hooks.after_error( - AfterErrorContext(hook_ctx), http_res, None - ) - if err is not None: - logger.debug("Request Exception", exc_info=True) - raise err - if result is not None: - http_res = result - else: - logger.debug("Raising unexpected SDK error") - raise errors.SDKError("Unexpected error occurred", http_res) - return http_res if retry_config is not None: @@ -296,17 +293,27 @@ def do(): else: http_res = do() - if not utils.match_status_codes(error_status_codes, http_res.status_code): + if is_error_status_code(http_res.status_code): + result, err = hooks.after_error(AfterErrorContext(hook_ctx), http_res, None) + if err is not None: + logger.debug("Request Exception", exc_info=True) + raise err + if result is not None: + http_res = result + else: + logger.debug("Raising unexpected SDK error") + raise errors.SDKError("Unexpected error occurred", http_res) + else: http_res = hooks.after_success(AfterSuccessContext(hook_ctx), http_res) return http_res async def do_request_async( self, - hook_ctx, - request, - error_status_codes, - stream=False, + hook_ctx: HookContext, + request: httpx.Request, + is_error_status_code: Callable[[int], bool], + stream: bool = False, retry_config: Optional[Tuple[RetryConfig, List[str]]] = None, ) -> httpx.Response: client = self.sdk_configuration.async_client @@ -321,6 +328,8 @@ async def do(): hooks.before_request, BeforeRequestContext(hook_ctx), request ) + if "timeout" in request.extensions and "timeout" not in req.extensions: + req.extensions["timeout"] = request.extensions["timeout"] logger.debug( "Request:\nMethod: %s\nURL: %s\nHeaders: %s\nBody: %s", req.method, @@ -354,20 +363,6 @@ async def do(): "" if stream else http_res.text, ) - if utils.match_status_codes(error_status_codes, http_res.status_code): - result, err = await run_sync_in_thread( - hooks.after_error, AfterErrorContext(hook_ctx), http_res, None - ) - - if err is not None: - logger.debug("Request Exception", exc_info=True) - raise err - if result is not None: - http_res = result - else: - logger.debug("Raising unexpected SDK error") - raise errors.SDKError("Unexpected error occurred", http_res) - return http_res if retry_config is not None: @@ -377,7 +372,20 @@ async def do(): else: http_res = await do() - if not utils.match_status_codes(error_status_codes, http_res.status_code): + if is_error_status_code(http_res.status_code): + result, err = await run_sync_in_thread( + hooks.after_error, AfterErrorContext(hook_ctx), http_res, None + ) + + if err is not None: + logger.debug("Request Exception", exc_info=True) + raise err + if result is not None: + http_res = result + else: + logger.debug("Raising unexpected SDK error") + raise errors.SDKError("Unexpected error occurred", http_res) + else: http_res = await run_sync_in_thread( hooks.after_success, AfterSuccessContext(hook_ctx), http_res ) diff --git a/sync-for-expenses/src/codat_sync_for_expenses/companies.py b/sync-for-expenses/src/codat_sync_for_expenses/companies.py index 3a88801d0..9e5e6957f 100644 --- a/sync-for-expenses/src/codat_sync_for_expenses/companies.py +++ b/sync-for-expenses/src/codat_sync_for_expenses/companies.py @@ -95,17 +95,7 @@ def create( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -210,17 +200,7 @@ async def create_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -321,17 +301,7 @@ def delete( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -432,17 +402,7 @@ async def delete_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -543,17 +503,7 @@ def get( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -654,17 +604,7 @@ async def get_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -777,18 +717,7 @@ def list( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -901,18 +830,7 @@ async def list_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1019,17 +937,7 @@ def replace( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1136,17 +1044,7 @@ async def replace_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1254,17 +1152,7 @@ def update( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1372,17 +1260,7 @@ async def update_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/sync-for-expenses/src/codat_sync_for_expenses/company_info.py b/sync-for-expenses/src/codat_sync_for_expenses/company_info.py index f0df70fde..ffb248d4b 100644 --- a/sync-for-expenses/src/codat_sync_for_expenses/company_info.py +++ b/sync-for-expenses/src/codat_sync_for_expenses/company_info.py @@ -87,18 +87,7 @@ def get( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "409", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -195,18 +184,7 @@ async def get_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "409", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/sync-for-expenses/src/codat_sync_for_expenses/configuration.py b/sync-for-expenses/src/codat_sync_for_expenses/configuration.py index a73937af3..c2a5f51b1 100644 --- a/sync-for-expenses/src/codat_sync_for_expenses/configuration.py +++ b/sync-for-expenses/src/codat_sync_for_expenses/configuration.py @@ -90,17 +90,7 @@ def get( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -200,17 +190,7 @@ async def get_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -317,18 +297,7 @@ def set( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -435,18 +404,7 @@ async def set_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/sync-for-expenses/src/codat_sync_for_expenses/connections.py b/sync-for-expenses/src/codat_sync_for_expenses/connections.py index ae747c57c..9fa7bedf9 100644 --- a/sync-for-expenses/src/codat_sync_for_expenses/connections.py +++ b/sync-for-expenses/src/codat_sync_for_expenses/connections.py @@ -97,17 +97,7 @@ def create( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -214,17 +204,7 @@ async def create_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -324,18 +304,7 @@ def create_partner_expense_connection( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -435,18 +404,7 @@ async def create_partner_expense_connection_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -545,17 +503,7 @@ def delete( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -654,17 +602,7 @@ async def delete_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -761,17 +699,7 @@ def get( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -868,17 +796,7 @@ async def get_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -976,18 +894,7 @@ def list( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1085,18 +992,7 @@ async def list_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1201,17 +1097,7 @@ def unlink( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1316,17 +1202,7 @@ async def unlink_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/sync-for-expenses/src/codat_sync_for_expenses/customers.py b/sync-for-expenses/src/codat_sync_for_expenses/customers.py index 2197110de..fd58f3fbc 100644 --- a/sync-for-expenses/src/codat_sync_for_expenses/customers.py +++ b/sync-for-expenses/src/codat_sync_for_expenses/customers.py @@ -100,18 +100,7 @@ def create( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -221,18 +210,7 @@ async def create_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -334,18 +312,7 @@ def get( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "409", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -447,18 +414,7 @@ async def get_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "409", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -560,19 +516,7 @@ def list( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "409", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -676,19 +620,7 @@ async def list_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "409", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -800,18 +732,7 @@ def update( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -921,18 +842,7 @@ async def update_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/sync-for-expenses/src/codat_sync_for_expenses/expenses.py b/sync-for-expenses/src/codat_sync_for_expenses/expenses.py index cc3b70604..985549d7c 100644 --- a/sync-for-expenses/src/codat_sync_for_expenses/expenses.py +++ b/sync-for-expenses/src/codat_sync_for_expenses/expenses.py @@ -113,18 +113,7 @@ def create( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -247,18 +236,7 @@ async def create_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -385,19 +363,7 @@ def update( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -526,19 +492,7 @@ async def update_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/sync-for-expenses/src/codat_sync_for_expenses/manage_data.py b/sync-for-expenses/src/codat_sync_for_expenses/manage_data.py index 05e9ac0e7..376c3b623 100644 --- a/sync-for-expenses/src/codat_sync_for_expenses/manage_data.py +++ b/sync-for-expenses/src/codat_sync_for_expenses/manage_data.py @@ -87,17 +87,7 @@ def get( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -196,17 +186,7 @@ async def get_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -306,17 +286,7 @@ def get_pull_operation( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -414,17 +384,7 @@ async def get_pull_operation_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -522,18 +482,7 @@ def list_pull_operations( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -631,18 +580,7 @@ async def list_pull_operations_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -744,18 +682,7 @@ def refresh_all_data_types( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -857,18 +784,7 @@ async def refresh_all_data_types_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -968,18 +884,7 @@ def refresh_data_type( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1079,18 +984,7 @@ async def refresh_data_type_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/sync-for-expenses/src/codat_sync_for_expenses/mapping_options.py b/sync-for-expenses/src/codat_sync_for_expenses/mapping_options.py index b5c7e39ec..4e8b9a055 100644 --- a/sync-for-expenses/src/codat_sync_for_expenses/mapping_options.py +++ b/sync-for-expenses/src/codat_sync_for_expenses/mapping_options.py @@ -88,17 +88,7 @@ def get_mapping_options( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -196,17 +186,7 @@ async def get_mapping_options_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/sync-for-expenses/src/codat_sync_for_expenses/models/shared/connection.py b/sync-for-expenses/src/codat_sync_for_expenses/models/shared/connection.py index 397e52269..adb64d4b5 100644 --- a/sync-for-expenses/src/codat_sync_for_expenses/models/shared/connection.py +++ b/sync-for-expenses/src/codat_sync_for_expenses/models/shared/connection.py @@ -67,8 +67,6 @@ class ConnectionTypedDict(TypedDict): r"""Unique identifier for a company's data connection.""" integration_id: str r"""A Codat ID representing the integration.""" - integration_key: str - r"""A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future.""" link_url: str r"""The link URL your customers can use to authorize access to their business application.""" platform_name: str @@ -81,6 +79,8 @@ class ConnectionTypedDict(TypedDict): r"""The current authorization status of the data connection.""" connection_info: NotRequired[Nullable[Dict[str, Any]]] data_connection_errors: NotRequired[Nullable[List[DataConnectionErrorTypedDict]]] + integration_key: NotRequired[str] + r"""A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future.""" last_sync: NotRequired[str] r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: @@ -145,9 +145,6 @@ class Connection(BaseModel): integration_id: Annotated[str, pydantic.Field(alias="integrationId")] r"""A Codat ID representing the integration.""" - integration_key: Annotated[str, pydantic.Field(alias="integrationKey")] - r"""A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future.""" - link_url: Annotated[str, pydantic.Field(alias="linkUrl")] r"""The link URL your customers can use to authorize access to their business application.""" @@ -172,6 +169,11 @@ class Connection(BaseModel): pydantic.Field(alias="dataConnectionErrors"), ] = UNSET + integration_key: Annotated[ + Optional[str], pydantic.Field(alias="integrationKey") + ] = None + r"""A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future.""" + last_sync: Annotated[Optional[str], pydantic.Field(alias="lastSync")] = None r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: @@ -196,7 +198,9 @@ class Connection(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["connectionInfo", "dataConnectionErrors", "lastSync"]) + optional_fields = set( + ["connectionInfo", "dataConnectionErrors", "integrationKey", "lastSync"] + ) nullable_fields = set(["connectionInfo", "dataConnectionErrors"]) serialized = handler(self) m = {} diff --git a/sync-for-expenses/src/codat_sync_for_expenses/push_operations.py b/sync-for-expenses/src/codat_sync_for_expenses/push_operations.py index e3736b565..236ddb112 100644 --- a/sync-for-expenses/src/codat_sync_for_expenses/push_operations.py +++ b/sync-for-expenses/src/codat_sync_for_expenses/push_operations.py @@ -88,17 +88,7 @@ def get( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -196,17 +186,7 @@ async def get_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -304,18 +284,7 @@ def list( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -413,18 +382,7 @@ async def list_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/sync-for-expenses/src/codat_sync_for_expenses/reimbursements.py b/sync-for-expenses/src/codat_sync_for_expenses/reimbursements.py index b4f062a1a..0b774fd7e 100644 --- a/sync-for-expenses/src/codat_sync_for_expenses/reimbursements.py +++ b/sync-for-expenses/src/codat_sync_for_expenses/reimbursements.py @@ -109,18 +109,7 @@ def create( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -241,18 +230,7 @@ async def create_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -375,18 +353,7 @@ def update( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -509,18 +476,7 @@ async def update_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/sync-for-expenses/src/codat_sync_for_expenses/suppliers.py b/sync-for-expenses/src/codat_sync_for_expenses/suppliers.py index aa59544a1..e4d2e5578 100644 --- a/sync-for-expenses/src/codat_sync_for_expenses/suppliers.py +++ b/sync-for-expenses/src/codat_sync_for_expenses/suppliers.py @@ -114,18 +114,7 @@ def create( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -249,18 +238,7 @@ async def create_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -375,18 +353,7 @@ def get( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "409", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -501,18 +468,7 @@ async def get_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "409", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -627,19 +583,7 @@ def list( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "409", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -756,19 +700,7 @@ async def list_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "409", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -889,18 +821,7 @@ def update( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1019,18 +940,7 @@ async def update_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/sync-for-expenses/src/codat_sync_for_expenses/sync.py b/sync-for-expenses/src/codat_sync_for_expenses/sync.py index d7ecb923f..98bdcbf09 100644 --- a/sync-for-expenses/src/codat_sync_for_expenses/sync.py +++ b/sync-for-expenses/src/codat_sync_for_expenses/sync.py @@ -87,17 +87,7 @@ def get( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -194,17 +184,7 @@ async def get_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -302,17 +282,7 @@ def get_last_successful_sync( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -410,17 +380,7 @@ async def get_last_successful_sync_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -517,17 +477,7 @@ def get_latest_sync( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -624,17 +574,7 @@ async def get_latest_sync_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -731,17 +671,7 @@ def list( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -838,17 +768,7 @@ async def list_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/sync-for-expenses/src/codat_sync_for_expenses/transaction_status.py b/sync-for-expenses/src/codat_sync_for_expenses/transaction_status.py index b7cedfb4a..6938a60cd 100644 --- a/sync-for-expenses/src/codat_sync_for_expenses/transaction_status.py +++ b/sync-for-expenses/src/codat_sync_for_expenses/transaction_status.py @@ -88,17 +88,7 @@ def get( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -196,17 +186,7 @@ async def get_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -304,18 +284,7 @@ def list( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -413,18 +382,7 @@ async def list_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/sync-for-expenses/src/codat_sync_for_expenses/transfers.py b/sync-for-expenses/src/codat_sync_for_expenses/transfers.py index 373ec19a7..47ee0b46c 100644 --- a/sync-for-expenses/src/codat_sync_for_expenses/transfers.py +++ b/sync-for-expenses/src/codat_sync_for_expenses/transfers.py @@ -113,18 +113,7 @@ def create( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -247,18 +236,7 @@ async def create_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/sync-for-expenses/src/codat_sync_for_expenses/utils/eventstreaming.py b/sync-for-expenses/src/codat_sync_for_expenses/utils/eventstreaming.py index f2052fc22..3bdcd6d3d 100644 --- a/sync-for-expenses/src/codat_sync_for_expenses/utils/eventstreaming.py +++ b/sync-for-expenses/src/codat_sync_for_expenses/utils/eventstreaming.py @@ -32,9 +32,12 @@ def __init__( decoder: Callable[[str], T], sentinel: Optional[str] = None, client_ref: Optional[object] = None, + data_required: bool = True, ): self.response = response - self.generator = stream_events(response, decoder, sentinel) + self.generator = stream_events( + response, decoder, sentinel, data_required=data_required + ) self.client_ref = client_ref self._closed = False @@ -68,9 +71,12 @@ def __init__( decoder: Callable[[str], T], sentinel: Optional[str] = None, client_ref: Optional[object] = None, + data_required: bool = True, ): self.response = response - self.generator = stream_events_async(response, decoder, sentinel) + self.generator = stream_events_async( + response, decoder, sentinel, data_required=data_required + ) self.client_ref = client_ref self._closed = False @@ -116,6 +122,7 @@ async def stream_events_async( response: httpx.Response, decoder: Callable[[str], T], sentinel: Optional[str] = None, + data_required: bool = True, ) -> AsyncGenerator[T, None]: buffer = bytearray() position = 0 @@ -138,7 +145,11 @@ async def stream_events_async( block = buffer[position:i] position = i + len(seq) event, discard, event_id = _parse_event( - raw=block, decoder=decoder, sentinel=sentinel, event_id=event_id + raw=block, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, ) if event is not None: yield event @@ -151,7 +162,11 @@ async def stream_events_async( position = 0 event, discard, _ = _parse_event( - raw=buffer, decoder=decoder, sentinel=sentinel, event_id=event_id + raw=buffer, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, ) if event is not None: yield event @@ -161,6 +176,7 @@ def stream_events( response: httpx.Response, decoder: Callable[[str], T], sentinel: Optional[str] = None, + data_required: bool = True, ) -> Generator[T, None, None]: buffer = bytearray() position = 0 @@ -183,7 +199,11 @@ def stream_events( block = buffer[position:i] position = i + len(seq) event, discard, event_id = _parse_event( - raw=block, decoder=decoder, sentinel=sentinel, event_id=event_id + raw=block, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, ) if event is not None: yield event @@ -196,7 +216,11 @@ def stream_events( position = 0 event, discard, _ = _parse_event( - raw=buffer, decoder=decoder, sentinel=sentinel, event_id=event_id + raw=buffer, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, ) if event is not None: yield event @@ -208,6 +232,7 @@ def _parse_event( decoder: Callable[[str], T], sentinel: Optional[str] = None, event_id: Optional[str] = None, + data_required: bool = True, ) -> Tuple[Optional[T], bool, Optional[str]]: block = raw.decode() lines = re.split(r"\r?\n|\r", block) @@ -250,6 +275,10 @@ def _parse_event( if sentinel and data == f"{sentinel}\n": return None, True, event_id + # Skip data-less events when data is required + if not data and publish and data_required: + return None, False, event_id + if data: data = data[:-1] try: diff --git a/sync-for-expenses/src/codat_sync_for_expenses/utils/metadata.py b/sync-for-expenses/src/codat_sync_for_expenses/utils/metadata.py index 173b3e5ce..5abddd588 100644 --- a/sync-for-expenses/src/codat_sync_for_expenses/utils/metadata.py +++ b/sync-for-expenses/src/codat_sync_for_expenses/utils/metadata.py @@ -15,6 +15,7 @@ class SecurityMetadata: scheme_type: Optional[str] = None sub_type: Optional[str] = None field_name: Optional[str] = None + composite: bool = False def get_field_name(self, default: str) -> str: return self.field_name or default diff --git a/sync-for-expenses/src/codat_sync_for_expenses/utils/security.py b/sync-for-expenses/src/codat_sync_for_expenses/utils/security.py index 17996bd54..42d8d78e9 100644 --- a/sync-for-expenses/src/codat_sync_for_expenses/utils/security.py +++ b/sync-for-expenses/src/codat_sync_for_expenses/utils/security.py @@ -5,6 +5,7 @@ Any, Dict, List, + Optional, Tuple, ) from pydantic import BaseModel @@ -16,7 +17,9 @@ ) -def get_security(security: Any) -> Tuple[Dict[str, str], Dict[str, List[str]]]: +def get_security( + security: Any, allowed_fields: Optional[List[str]] = None +) -> Tuple[Dict[str, str], Dict[str, List[str]]]: headers: Dict[str, str] = {} query_params: Dict[str, List[str]] = {} @@ -27,7 +30,14 @@ def get_security(security: Any) -> Tuple[Dict[str, str], Dict[str, List[str]]]: raise TypeError("security must be a pydantic model") sec_fields: Dict[str, FieldInfo] = security.__class__.model_fields - for name in sec_fields: + sec_field_names = ( + list(sec_fields.keys()) if allowed_fields is None else allowed_fields + ) + + for name in sec_field_names: + if name not in sec_fields: + continue + sec_field = sec_fields[name] value = getattr(security, name) @@ -49,6 +59,9 @@ def get_security(security: Any) -> Tuple[Dict[str, str], Dict[str, List[str]]]: else: _parse_security_scheme(headers, query_params, metadata, name, value) + if not metadata.composite: + return headers, query_params + return headers, query_params @@ -59,15 +72,24 @@ def _parse_security_option( raise TypeError("security option must be a pydantic model") opt_fields: Dict[str, FieldInfo] = option.__class__.model_fields + for name in opt_fields: opt_field = opt_fields[name] metadata = find_field_metadata(opt_field, SecurityMetadata) if metadata is None or not metadata.scheme: continue - _parse_security_scheme( - headers, query_params, metadata, name, getattr(option, name) - ) + + value = getattr(option, name) + if ( + metadata.scheme_type == "http" + and metadata.sub_type == "basic" + and not isinstance(value, BaseModel) + ): + _parse_basic_auth_scheme(headers, option) + return + + _parse_security_scheme(headers, query_params, metadata, name, value) def _parse_security_scheme( diff --git a/sync-for-expenses/src/codat_sync_for_expenses/utils/serializers.py b/sync-for-expenses/src/codat_sync_for_expenses/utils/serializers.py index 14321eb47..d2149f8b9 100644 --- a/sync-for-expenses/src/codat_sync_for_expenses/utils/serializers.py +++ b/sync-for-expenses/src/codat_sync_for_expenses/utils/serializers.py @@ -17,8 +17,7 @@ def serialize_decimal(as_str: bool): def serialize(d): - # Optional[T] is a Union[T, None] - if is_union(type(d)) and type(None) in get_args(type(d)) and d is None: + if d is None: return None if isinstance(d, Unset): return d @@ -46,8 +45,7 @@ def validate_decimal(d): def serialize_float(as_str: bool): def serialize(f): - # Optional[T] is a Union[T, None] - if is_union(type(f)) and type(None) in get_args(type(f)) and f is None: + if f is None: return None if isinstance(f, Unset): return f @@ -75,8 +73,7 @@ def validate_float(f): def serialize_int(as_str: bool): def serialize(i): - # Optional[T] is a Union[T, None] - if is_union(type(i)) and type(None) in get_args(type(i)) and i is None: + if i is None: return None if isinstance(i, Unset): return i @@ -104,8 +101,7 @@ def validate_int(b): def validate_const(v): def validate(c): - # Optional[T] is a Union[T, None] - if is_union(type(c)) and type(None) in get_args(type(c)) and c is None: + if c is None: return None if v != c: