diff --git a/.speakeasy/logs/changes/changes.html b/.speakeasy/logs/changes/changes.html index 8231b2857..b6a88b4cc 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..f7ee4d86b 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_platform.companies.create()`: `response.data_connections[].integration_key` **Changed** +* `codat_platform.companies.get()`: `response.data_connections[].integration_key` **Changed** +* `codat_platform.companies.list()`: `response.results[].data_connections[].integration_key` **Changed** +* `codat_platform.companies.replace()`: `response.data_connections[].integration_key` **Changed** +* `codat_platform.companies.update()`: `response.data_connections[].integration_key` **Changed** +* `codat_platform.connections.create()`: `response.integration_key` **Changed** +* `codat_platform.connections.get()`: `response.integration_key` **Changed** +* `codat_platform.connections.list()`: `response.results[].integration_key` **Changed** +* `codat_platform.connections.unlink()`: `response.integration_key` **Changed** +* `codat_platform.connections.update_authorization()`: `response.integration_key` **Changed** diff --git a/.speakeasy/logs/changes/new.openapi.yaml b/.speakeasy/logs/changes/new.openapi.yaml index e9a1f1efb..8ffae8ebd 100644 --- a/.speakeasy/logs/changes/new.openapi.yaml +++ b/.speakeasy/logs/changes/new.openapi.yaml @@ -1,19 +1,19 @@ openapi: 3.1.0 +x-stoplight: + id: 466k6ayziv9at servers: - description: Production url: 'https://api.codat.io' info: - title: Bank Feeds + title: Platform API version: 3.0.0 - contact: - email: support@codat.io - name: Codat + summary: Platform API description: |- - Bank Feeds solution enables your SMB users to set up bank feeds from accounts in your application to supported accounting software. + An API for the common components of all of Codat's products. - A bank feed is a connection between a source bank account in your application and a target bank account in a supported accounting software. + These end points cover creating and managing your companies, data connections, and integrations. - [Explore solution](https://docs.codat.io/bank-feeds-api/overview) | [See OpenAPI spec](https://github.com/codatio/oas) + [Read about the building blocks of Codat...](https://docs.codat.io/core-concepts/companies) | [See our OpenAPI spec](https://github.com/codatio/oas) --- @@ -23,11 +23,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. | + | Connection management | Configure connection management UI and retrieve access tokens for authentication. | + | Webhooks | Create and manage webhooks that listen to Codat's events. | + | Integrations | Get a list of integrations supported by Codat and their logos. | + | Refresh data | Initiate data refreshes, view pull status and history. | + | Settings | Manage company profile configuration, sync settings, and API keys. | + | Push data | Initiate and monitor Create, Update, and Delete operations. | + | Supplemental data | Configure and pull additional data you can include in Codat's standard data types. | + | Custom data type | Configure and pull additional data types that are not included in Codat's standardized data model. | + contact: + name: Codat + email: support@codat.io termsOfService: 'https://www.codat.io/legals/' security: - auth_header: [] @@ -68,7 +75,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: platform-api x-codat-keep-docs-paths-local: true x-codat-speakeasy-pagination: type: offsetLimit @@ -81,105 +88,28 @@ x-codat-speakeasy-pagination: tags: - name: Companies description: Create and manage your SMB users' companies. + - name: Connection management + description: Configure UI and retrieve access tokens for authentication used by **Connections SDK**. - name: Connections description: Create new and manage existing data connections for a company. - - 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. + - name: Webhooks + description: Create and manage webhooks that listen to Codat's events. + - name: Integrations + description: Get a list of integrations supported by Codat and their logos. + - name: Refresh data + description: 'Initiate data refreshes, view pull status and history.' + - name: Settings + description: 'Manage company profile configuration, sync settings, and API keys.' + - name: Push data + description: 'Initiate and monitor Create, Update, and Delete operations.' + - name: Read data + description: View validation outcomes for completed read data operations. + - name: Supplemental data + description: Configure and pull additional data you can include in Codat's standard data types. + - name: Custom data type + description: Configure and pull additional data types that are not included in Codat's standardized data model. 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 +277,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/platform-api#/schemas/Company) associated to your instances.\n\nA [company](https://docs.codat.io/platform-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/platform-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,11 +289,94 @@ 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).' + 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/Bad-Request' + '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/platform-api#/schemas/Company) that represents your customer in Codat. \n\nA [company](https://docs.codat.io/platform-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/platform-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}': 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" + description: "\uFEFFThe *Get company* endpoint returns a single company for a given `companyId`.\n\nA [company](https://docs.codat.io/platform-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/platform-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' tags: @@ -466,7 +479,7 @@ paths: 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" + description: "\uFEFFThe *Delete company* endpoint permanently deletes a [company](https://docs.codat.io/platform-api#/schemas/Company), its [connections](https://docs.codat.io/platform-api#/schemas/Connection) and any cached data. This operation is irreversible.\n\nA [company](https://docs.codat.io/platform-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/platform-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: @@ -488,7 +501,7 @@ paths: $ref: '#/components/responses/Service-Unavailable' 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/platform-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/platform-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 +544,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/platform-api#/schemas/Company) represents a business sharing access to their data." operationId: update-company parameters: - $ref: '#/components/parameters/companyId' @@ -571,32 +584,130 @@ 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 + '/companies/{companyId}/products/{productIdentifier}': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/productIdentifier' + put: + summary: Add product + operationId: add-product + x-speakeasy-name-override: add-product 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. + Use the *Add product* endpoint to enable a product for the company specified by `companyId`. - 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. - parameters: - - $ref: '#/components/parameters/companyId' + > Note: This feature is currently in alpha and available only to participants in the development program. tags: - Companies responses: - '200': + '204': + description: OK + '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: Remove product + operationId: remove-product + x-speakeasy-name-override: remove-product + description: |- + Use the *Remove product* endpoint to disable a product for the company specified by `companyId`. + + > Note: This feature is currently in alpha and available only to participants in the development program. + tags: + - Companies + responses: + '204': + description: OK + '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}/products/{productIdentifier}/refresh': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/productIdentifier' + post: + summary: Refresh product data + operationId: refresh-product-data + x-speakeasy-name-override: refresh-product-data + description: |- + Use the **Refresh product data** endpoint to manually refresh data for a custom product for a specific company. + + ### Tips and traps + + - This endpoint only supports refreshing data for **custom products** and can't be used for Codat's standard solutions. Refer to [individual solutions' documentation](https://docs.codat.io/) instead. + - If a data sync is already in progress for a custom product, the refresh request will return a `Bad request (400)` response. + - If a company has multiple custom products enabled, you can refresh data for each product individually. + - Optionally include a request body with `dataTypes` to refresh only selected data types for the specified product. If omitted, the product's scheduled refresh is triggered as usual. + - When specifying `dataTypes`, each value must be a valid data type supported by the product. Invalid values will result in a `Bad request (400)` response listing valid options. + tags: + - Companies + requestBody: + required: false + description: 'Optionally specify one or more data types to refresh for the given custom product. If omitted, the product''s scheduled refresh is triggered as usual. When provided, each data type must be valid for the specified product.' + content: + application/json: + schema: + type: object + properties: + dataTypes: + type: array + description: One or more data types to refresh for the product. + items: + type: string + additionalProperties: false + examples: + Filter specific data types: + value: + dataTypes: + - invoices + - payments + responses: + '202': description: OK + '400': + description: Bad Request content: application/json: schema: - $ref: '#/components/schemas/CompanyAccessToken' + $ref: '#/components/schemas/ErrorMessage' examples: - Simple company: + Standard product not supported: value: - expiresIn: 86400 - accessToken: string - tokenType: Bearer + statusCode: 400 + service: PublicApi + error: 'Bank Feeds doesn''t support data refreshing. For more information, refer to your solution’s documentation [here](https://docs.codat.io).' + correlationId: bc997528a9d7abb9161ef45f05d38599 + canBeRetried: Unknown + detailedErrorCode: 0 + Read in progress: + value: + statusCode: 400 + service: PublicApi + error: Data cannot be refreshed while a read operation is in progress. Allow the read to complete before attempting to refresh. + correlationId: bc997528a9d7abb9161ef45f05d38599 + canBeRetried: Unknown + detailedErrorCode: 0 '401': $ref: '#/components/responses/Unauthorized' '402': @@ -688,12 +799,7 @@ paths: type: object properties: platformKey: - type: string - minLength: 4 - maxLength: 4 - pattern: '[a-z]{4}' - example: gbol - description: 'A unique 4-letter key to represent a platform in each integration. View [accounting](https://docs.codat.io/integrations/accounting/overview#platform-keys), [banking](https://docs.codat.io/integrations/banking/overview#platform-keys), and [commerce](https://docs.codat.io/integrations/commerce/overview#platform-keys) platform keys.' + $ref: '#/components/parameters/platformKey/schema' responses: '200': description: OK @@ -833,455 +939,30 @@ paths: content: application/json: schema: - title: Update connection - x-internal: true - type: object - properties: - status: - $ref: '#/components/schemas/Connection/definitions/dataConnectionStatus' - description: The current authorization status of the data connection. - nullable: true - additionalProperties: false + $ref: '#/components/schemas/UpdateConnectionStatus' examples: Example: value: status: Unlinked description: '' - '/companies/{companyId}/connections/{connectionId}/data/bankAccounts': + '/companies/{companyId}/connections/{connectionId}/authorization': parameters: - $ref: '#/components/parameters/companyId' - $ref: '#/components/parameters/connectionId' - get: - x-internal: true + put: + summary: Update authorization + operationId: update-connection-authorization + x-speakeasy-name-override: update-authorization + description: Update data connection's authorization. tags: - - Bank accounts - summary: List bank accounts - operationId: list-bank-accounts - parameters: - - $ref: '#/components/parameters/page' - - $ref: '#/components/parameters/pageSize' - - $ref: '#/components/parameters/query' - - $ref: '#/components/parameters/orderBy' + - Connections responses: '200': - description: Success + description: OK content: application/json: schema: - $ref: '#/components/schemas/BankAccounts' - 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: - 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' + $ref: '#/components/schemas/Connection' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -1290,865 +971,46 @@ 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' + requestBody: + content: + application/json: + schema: + type: object + additionalProperties: + type: string + description: '' + '/companies/{companyId}/accessToken': + get: + summary: Get company access token + operationId: get-company-access-token + x-speakeasy-name-override: get-access-token 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. + Use the _Get company access token_ endpoint to return an access token for the specified company ID. The token is valid for one day. - 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': - parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - get: - summary: Get create/update bank account model - x-internal: true + 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. + parameters: + - $ref: '#/components/parameters/companyId' tags: - - Bank accounts + - Companies responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/PushOption' + $ref: '#/components/schemas/CompanyAccessToken' 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 - 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 - FreeAgent: - 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 - sortCode: - type: String - displayName: Sort Code - description: The sort code for the bank account - required: false - validation: - warnings: - - field: SortCode - details: Must have a length between 0 and 8 characters - information: [] - accountNumber: - type: String - displayName: Account Number - description: The account number for the bank account - required: false - iBan: - type: String - displayName: IBAN - description: The international bank account number of the account. Often used when making or receiving international payments - required: false - currency: - type: String - displayName: Currency - description: The currency of the bank account - options: - - value: AED - type: String - displayName: AED - required: false - - value: AMD - type: String - displayName: AMD - required: false - - value: AOA - type: String - displayName: AOA - required: false - - value: ARS - type: String - displayName: ARS - required: false - - value: AUD - type: String - displayName: AUD - required: false - - value: AWG - type: String - displayName: AWG - required: false - - value: AZN - type: String - displayName: AZN - required: false - - value: BBD - type: String - displayName: BBD - required: false - - value: BDT - type: String - displayName: BDT - required: false - - value: BGN - type: String - displayName: BGN - required: false - - value: BRL - type: String - displayName: BRL - required: false - - value: BWP - type: String - displayName: BWP - required: false - - value: CAD - type: String - displayName: CAD - required: false - - value: CHF - type: String - displayName: CHF - required: false - - value: CLP - type: String - displayName: CLP - required: false - - value: CNY - type: String - displayName: CNY - required: false - - value: COP - type: String - displayName: COP - required: false - - value: CRC - type: String - displayName: CRC - required: false - - value: CUC - type: String - displayName: CUC - required: false - - value: CUP - type: String - displayName: CUP - required: false - - value: CZK - type: String - displayName: CZK - required: false - - value: DKK - type: String - displayName: DKK - required: false - - value: DOP - type: String - displayName: DOP - required: false - - value: EGP - type: String - displayName: EGP - required: false - - value: EUR - type: String - displayName: EUR - required: false - - value: FJD - type: String - displayName: FJD - required: false - - value: GBP - type: String - displayName: GBP - required: false - - value: GEL - type: String - displayName: GEL - required: false - - value: GHS - type: String - displayName: GHS - required: false - - value: GTQ - type: String - displayName: GTQ - required: false - - value: GYD - type: String - displayName: GYD - required: false - - value: HKD - type: String - displayName: HKD - required: false - - value: HNL - type: String - displayName: HNL - required: false - - value: HRK - type: String - displayName: HRK - required: false - - value: HUF - type: String - displayName: HUF - required: false - - value: IDR - type: String - displayName: IDR - required: false - - value: ILS - type: String - displayName: ILS - required: false - - value: INR - type: String - displayName: INR - required: false - - value: ISK - type: String - displayName: ISK - required: false - - value: JMD - type: String - displayName: JMD - required: false - - value: JPY - type: String - displayName: JPY - required: false - - value: KES - type: String - displayName: KES - required: false - - value: KRW - type: String - displayName: KRW - required: false - - value: KWD - type: String - displayName: KWD - required: false - - value: KYD - type: String - displayName: KYD - required: false - - value: KZT - type: String - displayName: KZT - required: false - - value: LAK - type: String - displayName: LAK - required: false - - value: LBP - type: String - displayName: LBP - required: false - - value: LKR - type: String - displayName: LKR - required: false - - value: LTL - type: String - displayName: LTL - required: false - - value: LVL - type: String - displayName: LVL - required: false - - value: MAD - type: String - displayName: MAD - required: false - - value: MDL - type: String - displayName: MDL - required: false - - value: MGA - type: String - displayName: MGA - required: false - - value: MUR - type: String - displayName: MUR - required: false - - value: MVR - type: String - displayName: MVR - required: false - - value: MWK - type: String - displayName: MWK - required: false - - value: MXN - type: String - displayName: MXN - required: false - - value: MYR - type: String - displayName: MYR - required: false - - value: MZN - type: String - displayName: MZN - required: false - - value: NAD - type: String - displayName: NAD - required: false - - value: NGN - type: String - displayName: NGN - required: false - - value: NOK - type: String - displayName: NOK - required: false - - value: NPR - type: String - displayName: NPR - required: false - - value: NZD - type: String - displayName: NZD - required: false - - value: OMR - type: String - displayName: OMR - required: false - - value: PEN - type: String - displayName: PEN - required: false - - value: PHP - type: String - displayName: PHP - required: false - - value: PKR - type: String - displayName: PKR - required: false - - value: PLN - type: String - displayName: PLN - required: false - - value: QAR - type: String - displayName: QAR - required: false - - value: RON - type: String - displayName: RON - required: false - - value: RSD - type: String - displayName: RSD - required: false - - value: RUB - type: String - displayName: RUB - required: false - - value: RWF - type: String - displayName: RWF - required: false - - value: SAR - type: String - displayName: SAR - required: false - - value: SCR - type: String - displayName: SCR - required: false - - value: SEK - type: String - displayName: SEK - required: false - - value: SGD - type: String - displayName: SGD - required: false - - value: THB - type: String - displayName: THB - required: false - - value: TND - type: String - displayName: TND - required: false - - value: TRY - type: String - displayName: TRY - required: false - - value: TTD - type: String - displayName: TTD - required: false - - value: TWD - type: String - displayName: TWD - required: false - - value: TZS - type: String - displayName: TZS - required: false - - value: UAH - type: String - displayName: UAH - required: false - - value: UGX - type: String - displayName: UGX - required: false - - value: USD - type: String - displayName: USD - required: false - - value: UYU - type: String - displayName: UYU - required: false - - value: VEF - type: String - displayName: VEF - required: false - - value: VND - type: String - displayName: VND - required: false - - value: VUV - type: String - displayName: VUV - required: false - - value: XAF - type: String - displayName: XAF - required: false - - value: XCD - type: String - displayName: XCD - required: false - - value: XOF - type: String - displayName: XOF - required: false - - value: ZAR - type: String - displayName: ZAR - required: false - - value: ZMK - type: String - displayName: ZMK - required: false - required: true - balance: - type: Number - displayName: Balance - description: The balance of the bank account - required: false - validation: - warnings: [] - information: - - field: Balance - details: 'The opening balance, in the account currency' - institution: - type: String - displayName: Institution - description: The institution of the bank account - required: false - required: true - KashFlow: - value: - type: Object - displayName: Bank Account - description: An account that bank transactions may be recorded against - properties: - accountName: - type: String - displayName: Account Name - description: Name of the bank account as it appears in Kashflow. - required: true - balance: - type: Number - displayName: Balance - description: 'The opening balance, in the account currency.' - required: false - currency: - type: String - displayName: Currency - description: The currency of the bank account. - required: true - required: true - QuickBooks Desktop: - value: - type: Object - displayName: Bank Account - description: An account that bank transactions may be recorded against - 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: [] - accountName: - type: String - displayName: Name - description: The name of the bank account in the originating system - required: true - validation: - warnings: - - field: AccountName - details: Max length of 31 characters. - information: [] - currency: - type: String - displayName: Currency - description: The currency of the bank 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' - balance: - type: Number - displayName: Balance - description: The balance of the bank account - required: false - required: true - QuickBooks Online Sandbox: - value: - type: Object - displayName: Bank Account - description: An account that bank transactions may be recorded against - properties: - accountName: - type: String - displayName: Account Name - description: Name of account as it appears in the chart of accounts or general ledger. - required: true - accountNumber: - type: String - displayName: Account Number - description: User-defined account number to help the user in identifying the account within the chart-of-accounts and in deciding what should be posted to the account. - required: true - currency: - type: String - displayName: Currency - description: Currency of the bank account. - required: true - required: true - Sage Business Cloud Accounting: - 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: Must be provided. - - field: AccountName - details: Should not be longer than 50 characters. - currency: - type: String - displayName: Currency - description: The currency of the bank account - required: true - validation: - warnings: [] - information: - - field: Currency - details: Must be provided. - - field: Currency - details: Must match the company's base currency. - sortCode: - type: String - displayName: Sort Code - description: The sort code for the bank account - required: false - validation: - warnings: [] - information: - - field: SortCode - details: Should be a 6 digit number. - accountNumber: - type: String - displayName: Account Number - description: The account number for the bank account - required: false - validation: - warnings: [] - information: - - field: AccountNumber - details: Should not be longer than 25 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 - validation: - warnings: [] - information: - - field: IBan - details: Should be in the international bank account number format. - 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: Should be a number between 1 and 99999999. - required: true - Sandbox: + Simple company: 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 - accountType: - type: String - displayName: Account Type - description: The type of account - required: true - nominalCode: - type: String - displayName: Nominal Code - description: The external reference given to each nominal account for a business - required: true - sortCode: - type: String - displayName: Sort Code - description: The sort code for the bank account - required: true - accountNumber: - type: String - displayName: Account Number - description: The account number for the bank account - required: true - iBan: - type: String - displayName: IBAN - description: The international bank account number of the account. Often used when making or receiving international payments - required: true - currency: - type: String - displayName: Currency - description: The currency of the bank account - required: true - balance: - type: Number - displayName: Balance - description: The balance of the bank account - required: true - availableBalance: - type: Number - displayName: Available Balance - description: The available balance of the bank account - required: true - overdraftLimit: - type: Number - displayName: Overdraft Limit - description: The pre-arranged overdraft limit of the account - required: true - institution: - type: String - displayName: Institution - description: The institution of the bank account - 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 + expiresIn: 86400 + accessToken: string + tokenType: Bearer '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2163,35 +1025,37 @@ 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/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': + '/companies/{companyId}/syncSettings': parameters: - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - post: - x-internal: true + get: + summary: Get company sync settings 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: {} + - Companies + operationId: get-company-syncSettings + x-speakeasy-name-override: get-company-sync-settings + description: 'Retrieve the [sync settings](https://docs.codat.io/knowledge-base/advanced-sync-settings) for a specific company. This includes how often data types should be queued to be updated, and how much history should be fetched.' responses: '200': - description: Success + description: OK content: application/json: schema: - $ref: '#/components/schemas/BankAccounts/allOf/0/properties/results/items/definitions/bankAccountCreateResponse' - examples: {} - '400': - $ref: '#/components/responses/BadRequest' + $ref: '#/components/schemas/CompanySyncSettings' + examples: + Example: + value: + companyId: 8a210b68-6988-11ed-a1eb-0242ac120002 + settings: + - dataType: invoices + fetchOnFirstLink: true + syncSchedule: 24 + syncOrder: 0 + syncFromUtc: '2020-01-01T12:00:00.000Z' + syncFromWindow: 24 + monthsToSync: 24 + isLocked: true + overridesDefaults: true '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2206,58 +1070,18 @@ paths: $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: + summary: Set company sync settings + description: Set the sync settings for a specific company. 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' + - Companies + operationId: set-company-syncSettings + x-speakeasy-name-override: set-company-sync-settings 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' + '204': + description: No Content '400': - $ref: '#/components/responses/BadRequest' + $ref: '#/components/responses/Bad-Request' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2266,84 +1090,65 @@ paths: $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' + allOf: + - properties: + companyId: + type: string + format: uuid + example: 8a210b68-6988-11ed-a1eb-0242ac120002 + description: Unique identifier for your SMB in Codat. + settings: + type: array + items: + $ref: '#/components/schemas/SyncSetting' + overridesDefaults: + type: boolean + default: true + description: 'Set to `True` if you want to override default [sync settings](https://docs.codat.io/knowledge-base/advanced-sync-settings).' + required: + - companyId + - settings + - overridesDefaults + type: object + description: |- + Include a `syncSetting` object for each data type. + `syncFromWindow`, `syncFromUTC` & `monthsToSync` only need to be included if you wish to set a value for them. + '/companies/{companyId}/connectionManagement/accessToken': + parameters: + - $ref: '#/components/parameters/companyId' + get: + summary: Get access token (old) + operationId: get-connection-management-access-token + deprecated: true + x-speakeasy-deprecation-message: | + The endpoint for generating company-specific connection management access tokens has been deprecated. + Codat now supports a global company access token, providing seamless access across multiple products. + Update your integration to use the global token for improved efficiency and consistency. + x-speakeasy-deprecation-replacement: get-company-access-token + tags: + - Connection management + description: "\uFEFFThe new [Get company access token](https://docs.codat.io/platform-api#/operations/get-company-access-token) endpoint replaces this endpoint and includes additional functionality." responses: '200': description: Success content: application/json: schema: - oneOf: - - $ref: '#/components/schemas/SourceAccountV2' - - $ref: '#/components/schemas/SourceAccount' - examples: {} - '400': - $ref: '#/components/responses/BadRequest' + $ref: '#/components/schemas/ConnectionManagementAccessToken' + examples: + Access token: + value: + accessToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2358,22 +1163,22 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' + /connectionManagement/corsSettings: get: + summary: Get CORS settings (old) + operationId: get-connection-management-cors-settings + x-speakeasy-group: cors + deprecated: true + x-speakeasy-deprecation-message: | + The new [Get CORS settings](https://docs.codat.io/platform-api#/operations/get-cors-settings) endpoint replaces this endpoint and includes additional functionality. + Update your integrations to use the new path `/corsSettings` as the existing route will be removed in a future release. + x-speakeasy-deprecation-replacement: get-cors-settings 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 + - Settings + description: "\uFEFFThe *Get CORS settings* endpoint returns the allowed origins (i.e. your domains) you want to allow cross-origin resource sharing ([CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)) with Codat. \n\nEnabling CORS with Codat is required by our 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 access Codat's API endpoints." responses: '200': - description: Success - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/SourceAccountV2/definitions/sourceAccounts' - - $ref: '#/components/schemas/SourceAccount/definitions/sourceAccounts' - examples: {} + $ref: '#/components/responses/ConnectionManagementAllowedOrigins' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2388,34 +1193,30 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/{accountId}': - patch: + post: + summary: Set CORS settings (old) + operationId: set-connection-management-cors-settings + x-speakeasy-name-override: set + x-speakeasy-group: cors + deprecated: true + x-speakeasy-deprecation-message: | + The new [Set CORS settings](https://docs.codat.io/platform-api#/operations/set-cors-settings) endpoint replaces this endpoint and includes additional functionality. + Update your integrations to use the new path `/corsSettings` as the existing route will be removed in a future release. + x-speakeasy-deprecation-replacement: set-cors-settings 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' + - Settings + description: "\uFEFFThe *Set CORS settings* endpoint allows you to register allowed origins (i.e. your domains) for use in cross-origin resource sharing ([CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)).\n \nEnabling CORS with Codat is required by our 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 access Codat's API endpoints. " requestBody: content: application/json: schema: - $ref: '#/components/schemas/SourceAccount' - examples: {} + $ref: '#/components/schemas/ConnectionManagementAllowedOrigins' + examples: + Allowed origins: + $ref: '#/components/examples/connectionManagementAllowedOriginsResponse' responses: '200': - description: Success - content: - application/json: - x-speakeasy-usage-example: true - schema: - $ref: '#/components/schemas/SourceAccount' - examples: {} - '400': - $ref: '#/components/responses/BadRequest' + $ref: '#/components/responses/ConnectionManagementAllowedOrigins' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2430,22 +1231,16 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - delete: + /corsSettings: + get: + summary: Get CORS settings + operationId: get-cors-settings 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' + - Settings + description: "\uFEFFThe *Get CORS settings* endpoint returns the allowed origins (i.e. your domains) you want to allow cross-origin resource sharing ([CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)) with Codat. \n\nEnabling CORS with Codat is required by our 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 access Codat's API endpoints." responses: - '204': - description: No Content + '200': + $ref: '#/components/responses/ConnectionManagementAllowedOrigins' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2460,27 +1255,24 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/credentials': post: + summary: Set CORS settings + operationId: set-cors-settings + x-speakeasy-name-override: set 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' + - Settings + description: "\uFEFFThe *Set CORS settings* endpoint allows you to register allowed origins (i.e. your domains) for use in cross-origin resource sharing ([CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)).\n \nEnabling CORS with Codat is required by our 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 access Codat's API endpoints." requestBody: - required: true content: - application/json: {} + application/json: + schema: + $ref: '#/components/schemas/ConnectionManagementAllowedOrigins' + examples: + Allowed origins: + $ref: '#/components/examples/connectionManagementAllowedOriginsResponse' responses: '200': - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/BankAccountCredentials' + $ref: '#/components/responses/ConnectionManagementAllowedOrigins' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2495,22 +1287,18 @@ paths: $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' + '/companies/{companyId}/data/all': + parameters: + - $ref: '#/components/parameters/companyId' + post: + summary: Refresh all data + operationId: refresh-company-data + x-speakeasy-name-override: all responses: '204': description: No Content + '400': + $ref: '#/components/responses/Malformed-Query' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2525,45 +1313,335 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/bankFeedAccounts/mapping': + 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: + - Refresh data + '/companies/{companyId}/data/queue/{dataType}': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/dataType' + post: + summary: Refresh data type + operationId: refresh-data-type + x-speakeasy-name-override: by-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: + - Refresh 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}/dataStatus': parameters: - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' get: + summary: Get data status + operationId: get-company-data-status + description: Get the state of each data type for a company 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 + - Refresh data responses: '200': - description: Success + description: OK content: application/json: schema: - $ref: '#/components/schemas/BankFeedMapping/definitions/bankFeedMappings' + $ref: '#/components/schemas/DataStatuses' 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 + 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': @@ -2578,32 +1656,47 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - post: + '/companies/{companyId}/data/history': + parameters: + - $ref: '#/components/parameters/companyId' + get: + summary: List pull operations 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 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/BankFeedAccountMapping' - examples: - Example: - value: - sourceAccountId: acc-002 - targetAccountId: account-081 + - Refresh data + operationId: list-pull-operations + x-speakeasy-name-override: list-pull-operations responses: '200': - description: Success + description: OK content: application/json: schema: - $ref: '#/components/schemas/BankFeedAccountMappingResponse' - examples: {} + $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/BadRequest' + $ref: '#/components/responses/Malformed-Query' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2618,37 +1711,30 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/bankFeeds/info': + 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' - - $ref: '#/components/parameters/connectionId' + - $ref: '#/components/parameters/datasetId' 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 + summary: Get pull operation + operationId: get-pull-operation + x-speakeasy-name-override: get-pull-operation tags: - - Company information + - Refresh data responses: '200': - description: Success + description: OK content: application/json: schema: - $ref: '#/components/schemas/CompanyInformation' + $ref: '#/components/schemas/PullOperation' examples: {} - '400': - $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2663,178 +1749,125 @@ paths: $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: + description: Retrieve information about a single dataset or pull operation. + /webhooks: + get: + summary: List webhook consumers + operationId: list-webhook-consumers + x-speakeasy-name-override: list-consumers + description: "\uFEFFUse the *List webhook consumers* endpoint to return a list of all webhook consumers that currently exist for your client.\n\n[Webhook consumer](https://docs.codat.io/platform-api#/schemas/WebhookConsumer) is an HTTP endpoint that you configure to subscribe to specific events. See our documentation for more details on [Codat's webhook service](https://docs.codat.io/using-the-api/webhooks/overview)." 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 + - Webhooks responses: '200': - description: Success + description: OK content: application/json: schema: - $ref: '#/components/schemas/GenerateOtpResponse' - examples: {} + $ref: '#/components/schemas/WebhookConsumer/definitions/webhookConsumers' + examples: + Webhook consumers: + value: + results: + - id: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 + url: 'https://example.com/webhoook-consumers/sync-complete' + eventTypes: + - DataSyncCompleted + disabled: false + - id: ca3cac86-7925-4759-abc2-96405780fdfa + url: 'https://example.com/webhoook-consumers/dataset-changed' + eventTypes: + - DatasetDataChanged + disabled: true '400': - $ref: '#/components/responses/BadRequest' + $ref: '#/components/responses/Bad-Request' '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: + summary: Create webhook consumer + operationId: create-webhook-consumer + x-speakeasy-name-override: create-consumer + description: "\uFEFFUse the *Create webhook consumer* endpoint to create a new webhook consumer that will listen to messages we send you.\n\n[Webhook consumer](https://docs.codat.io/platform-api#/schemas/WebhookConsumer) is an HTTP endpoint that you configure to subscribe to specific events. See our documentation for more details on [Codat's webhook service](https://docs.codat.io/using-the-api/webhooks/overview).\n\n### Tips and traps\n- The number of webhook consumers you can create is limited to 50. If you have reached the maximum number of consumers, use the [*Delete webhook consumer*](https://docs.codat.io/platform-api#/operations/delete-webhook-consumer) endpoint to delete an unused consumer first." 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. + - Webhooks requestBody: content: application/json: schema: - $ref: '#/components/schemas/CreateBankTransactions' + $ref: '#/components/schemas/WebhookConsumer/definitions/webhookConsumerPrototype' 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: + Subscribe consumer to one or more event types: 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: + url: 'https://example.com/webhoook-consumer' + eventTypes: + - DataSyncCompleted + - Dataset data changed + Subscribe consumer with disabled endpoint: 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 + url: 'https://example.com/webhoook-consumer' + eventTypes: + - DataSyncCompleted + disabled: true responses: - '200': - description: Success + '201': + description: OK content: application/json: schema: - $ref: '#/components/schemas/CreateBankTransactionsResponse' + $ref: '#/components/schemas/WebhookConsumer' + examples: + Subscribe consumer to one or more event types: + value: + id: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 + url: 'https://example.com/webhoook-consumer' + eventTypes: + - DataSyncCompleted + - DatasetDataChanged + disabled: false + Subscribe consumer with disabled endpoint: + value: + id: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 + url: 'https://example.com/webhoook-consumer' + eventTypes: + - DataSyncCompleted + disabled: true '400': - $ref: '#/components/responses/BadRequest' + $ref: '#/components/responses/Bad-Request' + '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' + '/webhooks/{webhookId}': + parameters: + - $ref: '#/components/parameters/webhookId' + delete: + summary: Delete webhook consumer + operationId: delete-webhook-consumer + x-speakeasy-name-override: delete-consumer + description: "\uFEFFUse the *Delete webhook consumer* endpoint to delete an existing webhoook consumer, providing its valid `id` as a parameter.\n\n[Webhook consumer](https://docs.codat.io/platform-api#/schemas/WebhookConsumer) is an HTTP endpoint that you configure to subscribe to specific events. See our documentation for more details on [Codat's webhook service](https://docs.codat.io/using-the-api/webhooks/overview)." + tags: + - Webhooks + responses: + '204': + description: No content '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2849,120 +1882,86 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/options/bankAccounts/{accountId}/bankTransactions': - get: + /webhooks/integrationKeys/zapier: + post: + summary: Rotate Zapier key + operationId: rotate-zapier-key + x-speakeasy-ignore: true + description: "\uFEFFThe *Rotate Zapier key* endpoint returns the Zapier integration key needed to configure Zaps triggered by Codat's webhooks. \n\nIf a key has already been created, calling this will revoke that existing key.\n\nThe key changes each time this endpoint is called. If you are already using our Zapier integration and called this endpoint again, you need to reauthenticate using the latest integration key returned in the response.\n\nOur Zapier integration makes it simple for you to set up and receive user notifications in your preferred ways, such as via email or Slack. See our [Zapier documentation](https://docs.codat.io/using-the-api/webhooks/zapier-integration) for detailed instructions on setting up this integration.\n\n" 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. - - [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** - - 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' + - Webhooks responses: - '200': - description: Success + '201': + description: OK content: application/json: schema: - $ref: '#/components/schemas/PushOption' - examples: {} + $ref: '#/components/schemas/WebhookZapierKey' + examples: + Integration key: + value: + key: sk_integ_WM4dfoK1nKZnDE_kceze6hWDjbRwOZwG.us '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. + /integrations: get: - summary: Get create operation + summary: List integrations + description: List your available integrations 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. + - Integrations + operationId: list-integrations responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/PushOperation' - examples: {} + $ref: '#/components/schemas/Integrations' + '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': - 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 + '/integrations/{platformKey}': + parameters: + - $ref: '#/components/parameters/platformKey' + get: + summary: Get integration 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. - - 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, use this endpoint to view write operations related to the `bankTransactions` data type. + - Integrations + operationId: get-integration + description: 'Get single integration, by platformKey' responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/PushOperations' - examples: {} - '400': - $ref: '#/components/responses/Malformed-Query' + $ref: '#/components/schemas/Integration' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2977,40 +1976,23 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/bankFeedAccounts/{sourceAccountId}/managedBankFeeds/syncs/{syncId}': + '/integrations/{platformKey}/branding': 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/platformKey' get: + summary: Get branding 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'. - - A sync is a single execution that fetches bank transactions from a connected bank account and records them in the company's accounting software. + - Integrations + operationId: get-integrations-branding + x-speakeasy-name-override: get-branding + description: Get branding for platform. responses: '200': - description: Success + description: OK content: application/json: schema: - $ref: '#/components/schemas/SyncStatusResult' + $ref: '#/components/schemas/Branding' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -3025,153 +2007,1267 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/bankFeedAccounts/{sourceAccountId}/managedBankFeeds/syncs/latest': - 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. + /profile: get: + summary: Get profile 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. + - Settings responses: '200': - description: Success + description: OK content: application/json: schema: - $ref: '#/components/schemas/SyncStatusResult' - '204': - description: No Content + $ref: '#/components/schemas/Profile' + 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}/bankFeedAccounts/{sourceAccountId}/managedBankFeeds/syncs': - 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: - 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. + operationId: get-profile + x-speakeasy-name-override: get-profile + description: Fetch your Codat profile. + put: + summary: Update profile + operationId: update-profile + x-speakeasy-name-override: update-profile responses: - '201': - description: Created + '200': + description: OK content: application/json: schema: - $ref: '#/components/schemas/StartScheduledSyncResult' - '400': - $ref: '#/components/responses/BadRequest' + $ref: '#/components/schemas/Profile' + examples: {} '401': $ref: '#/components/responses/Unauthorized' '402': $ref: '#/components/responses/Payment-Required' '403': $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' -webhooks: - client.rateLimit.reached: - post: - description: Called when your client’s request count to Codat's API surpasses the allocated quota. + tags: + - Settings + description: Update your Codat profile requestBody: content: application/json: schema: - $ref: '#/components/schemas/ClientRateLimitWebhook' - examples: - Reached: - value: - id: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b - eventType: client.rateLimit.reached - generatedDate: '2024-09-01T00:00:00Z' - payload: - dailyQuota: 12000 - quotaRemaining: 0 - expiryDate: '2024-09-01T12:14:14Z' + $ref: '#/components/schemas/Profile' + examples: {} + description: All fields should be included when updating your profile. + /profile/syncSettings: + get: + summary: Get sync settings + tags: + - Settings + operationId: get-profile-syncSettings + x-speakeasy-name-override: get-sync-settings + description: 'Retrieve the [sync settings](https://docs.codat.io/knowledge-base/advanced-sync-settings) for your client. This includes how often data types should be queued to be updated, and how much history should be fetched.' responses: '200': - description: Return a 200 status to indicate that the webhook was received successfully. - client.rateLimit.reset: - post: - 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/ClientRateLimitWebhook' - examples: - Reset: - value: - id: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b - eventType: client.rateLimit.reset - generatedDate: '2024-09-01T00:00:00Z' + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/SyncSettings' + examples: + Example: + value: + clientId: 367f7975-267b-439b-90c6-a6040ee680f3 + settings: + - dataType: invoices + fetchOnFirstLink: true + syncSchedule: 24 + syncOrder: 0 + syncFromUtc: '2020-01-01T12:00:00.000Z' + syncFromWindow: 24 + monthsToSync: 24 + isLocked: true + overridesDefaults: true + '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' + post: + summary: Update all sync settings + description: Update sync settings for all data types. + tags: + - Settings + operationId: update-profile-syncSettings + x-speakeasy-name-override: update-sync-settings + responses: + '204': + description: No Content + '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' + requestBody: + content: + application/json: + schema: + allOf: + - properties: + clientId: + $ref: '#/components/schemas/ClientId' + settings: + type: array + items: + $ref: '#/components/schemas/SyncSetting' + overridesDefaults: + type: boolean + default: true + description: 'Set to `True` if you want to override default [sync settings](https://docs.codat.io/knowledge-base/advanced-sync-settings).' + required: + - clientId + - settings + - overridesDefaults + type: object + description: |- + Include a `syncSetting` object for each data type. + `syncFromWindow`, `syncFromUTC` & `monthsToSync` only need to be included if you wish to set a value for them. + /apiKeys: + get: + summary: List API keys + description: |- + Use the *List API keys* endpoint to return a list of all API keys that currently exist for your client. This includes keys created via the Portal UI or the *Create API keys* endpoint. + + [API keys](https://docs.codat.io/platform-api#/schemas/apiKeys) are tokens used to control access to the API. Include this token in the `Authorization` header parameter when making API calls, following the word "Basic" and a space with your API key. + + You can [read more](https://docs.codat.io/using-the-api/authentication) about authentication at Codat and managing API keys via the Portal UI or API. + operationId: list-api-keys + x-speakeasy-name-override: list-api-keys + tags: + - Settings + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/ApiKeys' + examples: + Example: + value: + results: + - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 + apiKey: ztHQGvnC4XN2CgUhaDWEG4ySLUJqWjp7zkbZkGHd + createdDate: '2022-04-11T13:49:37Z' + - id: c438836a-61fe-443f-8a19-24cc18be21e4 + name: azure-invoice-finance-processor + apiKey: ztHQGvnC4XN2CgUhaDWEG4ySLUJqWjp7zkbZkGHd + createdDate: '2022-04-23T09:43:48Z' + '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' + post: + summary: Create API key + operationId: create-api-key + x-speakeasy-name-override: create-api-key + description: |- + Use the *Create API keys* endpoint to generate a new API key for your client. + + [API keys](https://docs.codat.io/platform-api#/schemas/apiKeys) are tokens used to control access to the API. Include this token in the `Authorization` header parameter when making API calls, following the word "Basic" and a space with your API key. + + You can [read more](https://docs.codat.io/using-the-api/authentication) about authentication at Codat and managing API keys via the Portal UI or API. + + ### Tips and pitfalls + + * Your first API key is created for you. Access this key via [Codat's Portal](https://app.codat.io/developers/api-keys). + * If you require multiple API keys, perform multiple calls to the *Create API keys* endpoint. + * The number of API keys is limited to 10. If you have reached the maximum amount of keys, use the *Delete API key* endpoint to delete an unused key first. + tags: + - Settings + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateApiKey' + examples: + Create API key with name: + value: + name: azure-invoice-finance-processor + responses: + '201': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/ApiKeyDetails' + examples: + API key details: + value: + id: 0498e921-9b53-4396-a412-4f2f5983b0a2 + apiKey: ztHQGvnC4XN2CgUhaDWEG4ySLUJqWjp7zkbZkGHd + createdDate: '2022-04-11T13:49:37Z' + API key details with name: + value: + id: 0498e921-9b53-4396-a412-4f2f5983b0a2 + name: azure-invoice-finance-processor + apiKey: ztHQGvnC4XN2CgUhaDWEG4ySLUJqWjp7zkbZkGHd + createdDate: '2022-04-11T13:49:37Z' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + examples: + Max length for name reached: + value: + statusCode: 400 + service: PublicApi + error: Max string length (50) for `name` reached. + correlationId: bc997528a9d7abb9161ef45f05d38599 + canBeRetried: Unknown + detailedErrorCode: 0 + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '409': + description: Conflict + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + examples: + Max length for name reached: + value: + statusCode: 400 + service: PublicApi + error: 'Maximum number of API keys reached. To create a new API key, delete an unused key and try again.' + correlationId: bc997528a9d7abb9161ef45f05d38599 + canBeRetried: Unknown + detailedErrorCode: 0 + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + '/apiKeys/{apiKeyId}': + delete: + summary: Delete API key + operationId: delete-api-key + x-speakeasy-name-override: delete-api-key + parameters: + - name: apiKeyId + in: path + required: true + schema: + type: string + example: 8a210b68-6988-11ed-a1eb-0242ac120002 + description: Unique identifier for api key. + description: |- + Use the *Delete API keys* endpoint to delete an existing API key, providing its valid `id` as a parameter. Note that this operation is not reversible. + + [API keys](https://docs.codat.io/platform-api#/schemas/apiKeys) are tokens used to control access to the API. Include this token in the `Authorization` header parameter when making API calls, following the word "Basic" and a space with your API key. + + You can [read more](https://docs.codat.io/using-the-api/authentication) about authentication at Codat and managing API keys via the Portal UI or API. + + ### Tips and pitfalls + + * It is possible to delete the last remaining API key. If this happens, a new key can be created via the [API key management page](https://app.codat.io/developers/api-keys) of the Portal. + * It is possible to delete the API key used to authenticate the *Delete API key* request. + tags: + - Settings + responses: + '204': + description: No Content + $ref: '#/components/responses/Too-Many-Requests' + '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}/sync/{datasetId}/validation': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/datasetId' + get: + summary: Get validation results + tags: + - Read data + operationId: get-read-validation-results + x-speakeasy-name-override: get-validation-results + description: |- + Use the **Get validation results** endpoint to review warnings and errors encountered during the data type validation phase. + + The validation result [schema](https://docs.codat.io/platform-api#/schemas/ValidationResult) contains two message arrays: + + - **`warnings`** array lists potential issues with the data type that may require attention but don't block usage. + - **`errors`** array contains critical issues that must be resolved before the data type can be used. + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationResult' + examples: + Validation result: + value: + errors: + - ruleId: accounting-bill-030 + itemId: fc2f2d1a-ff4d-40c6-a7fb-4bd7d04f4008 + message: A bill's lines summed (69.99) should be the same as TotalAmount (70.00). + validatorName: BillValidator + warnings: + - ruleId: accounting-bill-032 + itemId: 1d3979e5-7c28-432e-b562-04e9013c1ea0 + message: A bill's lines sub total amount summed (3201.20) should be the same as SubTotal (3201.25) + validatorName: BillValidator + '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/{dataType}': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/connectionId' + - $ref: '#/components/parameters/dataType' + get: + summary: Get push options + tags: + - Push data + operationId: get-create-update-model-options-by-data-type + x-speakeasy-name-override: get-model-options + responses: + '200': + description: OK + 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' + description: |- + This is the generic documentation for creation and updating of data. See the equivalent endpoint for a given data type for more specific information. + + Before pushing data into accounting software, it is often necessary to collect some details from the user as to how they would like the data to be inserted. This includes names and amounts on transactional entities, but also factors such as categorisation of entities, which is often handled differently between different accounting software. A good example of this is specifying where on the balance sheet/profit and loss reports the user would like a newly-created nominal account to appear. + + Codat tries not to limit users to pushing to a very limited number of standard categories, so we have implemented "options" endpoints, which allow us to expose to our clients the fields which are required to be pushed for a specific linked company, and the options which may be selected for each field. + '/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 data + operationId: get-company-push-history + x-speakeasy-name-override: list-operations + description: |- + The **List push operations** endpoint returns a list of [push operations](/using-the-api/push) 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. + 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 data + operationId: get-push-operation + x-speakeasy-name-override: get-operation + description: |- + The **Get push operation** endpoint returns a specific [push 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. + 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' + '/integrations/{platformKey}/dataTypes/{dataType}/supplementalDataConfig': + parameters: + - $ref: '#/components/parameters/platformKey' + - name: dataType + in: path + required: true + description: Supported supplemental data data type. + schema: + x-internal: true + type: string + description: Data types that support supplemental data + enum: + - chartOfAccounts + - bills + - company + - creditNotes + - customers + - invoices + - items + - journalEntries + - suppliers + - taxRates + - commerce-companyInfo + - commerce-customers + - commerce-disputes + - commerce-locations + - commerce-orders + - commerce-payments + - commerce-paymentMethods + - commerce-products + - commerce-productCategories + - commerce-taxComponents + - commerce-transactions + example: invoices + put: + summary: Configure + description: |- + The *Configure* endpoint allows you to maintain or change configuration required to return supplemental data for each integration and data type combination. + + [Supplemental data](https://docs.codat.io/using-the-api/supplemental-data/overview) is additional data you can include in Codat's standard data types. + + **Integration-specific behavior** + See the *examples* for integration-specific frequently requested properties. + operationId: configure-supplemental-data + x-speakeasy-name-override: configure + tags: + - Supplemental data + responses: + '200': + description: OK + '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/SupplementalDataConfiguration' + examples: + Xero - Accounts: + value: + yourKeyNameForAccounts: + dataSource: /Accounts + pullData: + yourNameForTaxType: TaxType + yourNameForSystemAccount: SystemAccount + Xero - Invoices: + value: + yourKeyNameForInvoices: + dataSource: /Invoices + pullData: + yourNameForExpectedPaymentDate: ExpectedPaymentDate + yourNameForHasAttachments: HasAttachments + Xero - Items: + value: + yourKeyNameForItems: + dataSource: /Items + pullData: + yourNameForQuantityOnHand: QuantityOnHand + yourNameForTotalCostPool: TotalCostPool + Xero - Contacts: + value: + yourKeyNameForContacts: + dataSource: /Contacts + pullData: + yourNameForBankAccounts: BankAccountDetails + Xero - Tax rates: + value: + yourKeyNameForTaxRates: + dataSource: /TaxRates + pullData: + yourNameForCanApplyToLiabilities: CanApplyToLiabilities + yourNameForCanApplyToAssets: CanApplyToAssets + yourNameForCanApplyToEquity: CanApplyToEquity + yourNameForCanApplyToExpenses: CanApplyToExpenses + yourNameForCanApplyToRevenue: CanApplyToRevenue + QBO - Customers: + value: + yourKeyNameForCustomers: + dataSource: /Customer + pullData: + yourNameForSalesTermRef: SalesTermRef.value + yourNameForParentRef: ParentRef.value + QBO - Invoices: + value: + yourKeyNameForInvoices: + dataSource: /Invoice + pullData: + yourNameForSalesTermRef: SalesTermRef.value + description: The configuration for the specified platform and data type. + get: + summary: Get configuration + description: |- + The *Get configuration* endpoint returns supplemental data configuration previously created for each integration and data type combination. + + [Supplemental data](https://docs.codat.io/using-the-api/supplemental-data/overview) is additional data you can include in Codat's standard data types. + operationId: get-supplemental-data-configuration + x-speakeasy-name-override: get-configuration + tags: + - Supplemental data + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/SupplementalDataConfiguration' + '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' + '/integrations/{platformKey}/dataTypes/custom/{customDataIdentifier}': + parameters: + - $ref: '#/components/parameters/platformKey' + - $ref: '#/components/parameters/customDataIdentifier' + put: + summary: Configure custom data type + description: |- + The *Configure custom data type* endpoint allows you to maintain or change the configuration required to return a custom data type for a specific integration. + + A [custom data type](https://docs.codat.io/using-the-api/custom-data) is an additional data type you can create that is not included in Codat's standardized data model. + + ### Tips and traps + + - You can only configure a single custom data type for a single platform at a time. Use the endpoint multiple times if you need to configure it for multiple platforms. + + - You can only indicate a single data source for each customer data type. + + - Make your custom configuration as similar as possible to our standard data types so you can interact with them in exactly the same way. + operationId: configure-custom-data-type + x-speakeasy-name-override: configure + tags: + - Custom data type + requestBody: + description: Custom data type configuration for the specified platform. + content: + application/json: + schema: + $ref: '#/components/schemas/CustomDataTypeConfiguration' + examples: + Dynamics 365 Business Central: + value: + dataSource: api/purchaseOrders + requiredData: + currency: '$[*].currencyCode' + number: '$[*].number' + date: '$[*].orderDate' + totalexvat: '$[*].totalAmountExcludingTax' + totaltax: '$[*].totalTaxAmount' + vendor: '$[*].number' + keyBy: + - '$[*].id' + sourceModifiedDate: + - '$[*].lastModifiedDateTime' + Xero Simple Record: + value: + dataSource: /api.xro/2.0/Accounts + requiredData: + code: $.Code + accountId: $.AccountID + type: $.Type + SysAcc: $.SystemAccount + keyBy: + - $.AccountID + Xero Mapping Arrays: + value: + dataSource: /api.xro/2.0/Invoices + requiredData: + invNumber: $.InvoiceNumber + type: $.Type + InvoiceID: $.InvoiceID + lines: '$.LineItems[*]' + keyBy: + - $.InvoiceID + sourceModifiedDate: + - $.UpdatedDateUTC + QuickBooks Online: + value: + dataSource: /query?query=select * from Account + requiredData: + id: $.Id + Currentbal: $.CurrentBalance + SubAcc: $.SubAccount + keyBy: + - $.Id + sourceModifiedDate: + - $.time + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/CustomDataTypeConfiguration' + examples: + Dynamics 365 Business Central: + value: + dataSource: api/purchaseOrders + requiredData: + currency: '$[*].currencyCode' + number: '$[*].number' + date: '$[*].orderDate' + totalexvat: '$[*].totalAmountExcludingTax' + totaltax: '$[*].totalTaxAmount' + vendor: '$[*].number' + keyBy: + - '$[*].id' + sourceModifiedDate: + - '$[*].lastModifiedDateTime' + Xero Simple Record: + value: + dataSource: /api.xro/2.0/Accounts + requiredData: + code: $.Code + accountId: $.AccountID + type: $.Type + SysAcc: $.SystemAccount + keyBy: + - $.AccountID + Xero Mapping Arrays: + value: + dataSource: /api.xro/2.0/Invoices + requiredData: + invNumber: $.InvoiceNumber + type: $.Type + InvoiceID: $.InvoiceID + lines: '$.LineItems[*]' + keyBy: + - $.InvoiceID + sourceModifiedDate: + - $.UpdatedDateUTC + QuickBooks Online: + value: + dataSource: /query?query=select * from Account + requiredData: + id: $.Id + Currentbal: $.CurrentBalance + SubAcc: $.SubAccount + keyBy: + - $.Id + sourceModifiedDate: + - $.time + '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' + get: + summary: Get custom data configuration + description: |- + The *Get custom data configuration* endpoint returns existing configuration details for the specified custom data type and integration pair you previously configured. + + A [custom data type](https://docs.codat.io/using-the-api/custom-data) is an additional data type you can create that is not included in Codat's standardized data model. + operationId: get-custom-data-type-configuration + x-speakeasy-name-override: get-configuration + tags: + - Custom data type + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/CustomDataTypeRecords' + '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}/data/queue/custom/{customDataIdentifier}': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/connectionId' + - $ref: '#/components/parameters/customDataIdentifier' + post: + summary: Refresh custom data type + description: The *Refresh custom data type* endpoint refreshes the specified custom data type for a given company. This is an asynchronous operation that will sync updated data from the linked integration into Codat for you to view. + operationId: refresh-custom-data-type + x-speakeasy-name-override: refresh + tags: + - Custom data type + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/PullOperation' + '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' + '451': + $ref: '#/components/responses/Legal-Reasons' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + '/companies/{companyId}/connections/{connectionId}/data/custom/{customDataIdentifier}': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/connectionId' + - $ref: '#/components/parameters/customDataIdentifier' + get: + summary: List custom data type records + description: |- + The *List custom data type records* endpoint returns a paginated list of records pulled for the specified custom data type you previously configured. + + A [custom data type](https://docs.codat.io/using-the-api/custom-data) is an additional data type you can create that is not included in Codat's standardized data model.s endpoint returns a paginated list of records whose schema is defined [Configure custom data type](https://docs.codat.io/platform-api#/operations/configure-custom-data-type) + operationId: list-custom-data-type-records + parameters: + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + tags: + - Custom data type + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/CustomDataTypeRecords' + '400': + $ref: '#/components/responses/Bad-Request' + '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' + '451': + $ref: '#/components/responses/Legal-Reasons' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' +webhooks: + company.created: + post: + description: Called when a company is created in Codat. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyWebhook' + examples: + Company created: + value: + id: ba29118f-5406-4e59-b05c-ba307ca38d01 + eventType: company.created + generatedDate: '2024-08-08T17:10:34.015Z' + payload: + id: 0498e921-9b53-4396-a412-4f2f5983b0a2 + name: Bank of Dave + description: Requested a loan for refurb. + redirect: 'https://link.codat.io/company/0498e921-9b53-4396-a412-4f2f5983b0a2' + lastSync: '2022-01-01T12:00:00.000Z' + created: '2022-01-01T12:00:00.000Z' + tags: + customerRegion: us + uid: 335a086e-8563-4b03-94e3-39544225ecb6 + responses: + '200': + description: Return a 200 status to indicate that the webhook was received successfully. + company.deleted: + post: + description: Called when a company is deleted in Codat. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyWebhook' + examples: + Company deleted: + value: + id: ba29118f-5406-4e59-b05c-ba307ca38d01 + eventType: company.deleted + generatedDate: '2024-08-08T17:10:34.015Z' + payload: + id: 0498e921-9b53-4396-a412-4f2f5983b0a2 + name: Bank of Dave + description: Requested a loan for refurb. + redirect: 'https://link.codat.io/company/0498e921-9b53-4396-a412-4f2f5983b0a2' + lastSync: '2022-01-01T12:00:00.000Z' + created: '2022-01-01T12:00:00.000Z' + tags: + customerRegion: uk + uid: f6b0c253-16c7-4da1-a0c5-9c871e9c9d6c + responses: + '200': + description: Return a 200 status to indicate that the webhook was received successfully. + connection.created: + post: + description: Called when a connection is created by the SMB. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConnectionWebhook' + examples: + Connection created: + value: + id: ba29118f-5406-4e59-b05c-ba307ca38d01 + eventType: connection.created + generatedDate: '2024-08-08T17:10:34.015Z' + payload: + referenceCompany: + id: 0498e921-9b53-4396-a412-4f2f5983b0a2 + name: Bank of Dave + description: internal_id_mxO7rLfo + links: + portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' + tags: + customerRegion: us + uid: 335a086e-8563-4b03-94e3-39544225ecb6 + connection: + 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/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' + status: PendingAuth + lastSync: '2022-10-27T10:22:43.6464237Z' + created: '2022-10-27T09:53:29Z' + sourceType: Banking + responses: + '200': + description: Return a 200 status to indicate that the webhook was received successfully. + connection.connected: + post: + description: Called when a connection is successfully linked by the SMB. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConnectionWebhook' + examples: + Connection connected: + value: + id: ba29118f-5406-4e59-b05c-ba307ca38d01 + eventType: connection.connected + generatedDate: '2024-08-08T17:10:34.015Z' + payload: + referenceCompany: + id: 0498e921-9b53-4396-a412-4f2f5983b0a2 + name: Bank of Dave + description: internal_id_mxO7rLfo + links: + portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' + tags: + customerRegion: us + uid: 335a086e-8563-4b03-94e3-39544225ecb6 + connection: + 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/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' + status: Linked + lastSync: '2022-10-27T10:22:43.6464237Z' + created: '2022-10-27T09:53:29Z' + sourceType: Banking + responses: + '200': + description: Return a 200 status to indicate that the webhook was received successfully. + connection.failed: + post: + description: Called when a connection failed linking to the SMB. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConnectionWebhook' + examples: + Connection failed: + value: + id: ba29118f-5406-4e59-b05c-ba307ca38d01 + eventType: connection.failed + generatedDate: '2024-08-08T17:10:34.015Z' payload: - dailyQuota: 12000 - quotaRemaining: 11993 - expiryDate: '2024-09-01T23:59:99Z' + referenceCompany: + id: 0498e921-9b53-4396-a412-4f2f5983b0a2 + name: Bank of Dave + description: internal_id_mxO7rLfo + links: + portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' + tags: + customerRegion: us + uid: 335a086e-8563-4b03-94e3-39544225ecb6 + connection: + 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/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' + status: PendingAuth + created: '2022-10-27T09:53:29Z' + sourceType: Banking + dataConnectionErrors: + - statusCode: '403' + statusText: User cancelled linking + errorMessage: User cancelled + erroredOnUtc: '2022-10-27T09:53:29Z' + status: Active + responses: + '200': + description: Return a 200 status to indicate that the webhook was received successfully. + connection.disconnected: + post: + description: Called when a connection is disconnected either due to being unlinked or de-authorized by the SMB or integration. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConnectionWebhook' + examples: + Unlinked: + value: + id: ba29118f-5406-4e59-b05c-ba307ca38d01 + eventType: connection.disconnected + generatedDate: '2024-08-08T17:10:34.015Z' + payload: + referenceCompany: + id: 0498e921-9b53-4396-a412-4f2f5983b0a2 + name: Bank of Dave + description: internal_id_mxO7rLfo + links: + portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' + tags: + customerRegion: us + uid: 335a086e-8563-4b03-94e3-39544225ecb6 + connection: + 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/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' + status: Unlinked + lastSync: '2022-10-27T10:22:43.6464237Z' + created: '2022-10-27T09:53:29Z' + sourceType: Banking + De-authorized: + value: + id: ba29118f-5406-4e59-b05c-ba307ca38d01 + eventType: connection.disconnected + generatedDate: '2024-08-08T17:10:34.015Z' + payload: + referenceCompany: + id: 0498e921-9b53-4396-a412-4f2f5983b0a2 + name: Bank of Dave + description: internal_id_mxO7rLfo + links: + portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' + tags: + customerRegion: us + uid: 335a086e-8563-4b03-94e3-39544225ecb6 + connection: + 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/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' + status: Deauthorized + lastSync: '2022-10-27T10:22:43.6464237Z' + created: '2022-10-27T09:53:29Z' + sourceType: Banking + dataConnectionErrors: + - statusCode: '401' + statusText: The integration de-authorized access to the connection. + errorMessage: The integration de-authorized access to the connection. + erroredOnUtc: '2022-12-27T09:53:29Z' + status: Active + responses: + '200': + description: Return a 200 status to indicate that the webhook was received successfully. + connection.reconnected: + post: + description: Called when a connection is reconnected after becoming disconnected. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConnectionWebhook' + examples: + Reconnected: + value: + id: ba29118f-5406-4e59-b05c-ba307ca38d01 + eventType: connection.reconnected + generatedDate: '2024-08-08T17:10:34.015Z' + payload: + referenceCompany: + id: 0498e921-9b53-4396-a412-4f2f5983b0a2 + name: Bank of Dave + description: internal_id_mxO7rLfo + links: + portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' + tags: + customerRegion: us + uid: 335a086e-8563-4b03-94e3-39544225ecb6 + connection: + 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/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' + status: Linked + lastSync: '2022-10-27T10:22:43.6464237Z' + created: '2022-10-27T09:53:29Z' + sourceType: Banking responses: '200': description: Return a 200 status to indicate that the webhook was received successfully. - bankFeeds.sourceAccount.connected: + connection.deleted: 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 a connection is deleted. requestBody: content: application/json: schema: - $ref: '#/components/schemas/SourceAccountWebhook' + $ref: '#/components/schemas/ConnectionWebhook' examples: - Connected: + Deleted: value: id: ba29118f-5406-4e59-b05c-ba307ca38d01 - eventType: bankFeeds.sourceAccount.connected + eventType: connection.deleted + generatedDate: '2024-08-08T17:10:34.015Z' + payload: + referenceCompany: + id: 0498e921-9b53-4396-a412-4f2f5983b0a2 + name: Bank of Dave + description: internal_id_mxO7rLfo + links: + portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' + tags: + customerRegion: us + uid: 335a086e-8563-4b03-94e3-39544225ecb6 + connection: + 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/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' + status: Linked + lastSync: '2022-10-27T10:22:43.6464237Z' + created: '2022-10-27T09:53:29Z' + sourceType: Banking + responses: + '200': + description: Return a 200 status to indicate that the webhook was received successfully. + read.completed: + post: + description: Called when the fetch of data types for a product has completed. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ReadCompletedWebhook' + examples: + Read completed with validation warnings: + value: + id: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b + eventType: read.completed + generatedDate: '2022-10-23T00:00:00.000Z' + 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' + modifiedFromDate: '2022-10-23T00:00:00.000Z' + dataTypes: + - connectionId: 2e9d2c44-f675-40ba-8049-353bfcb5e171 + dataType: invoices + recordsModified: false + status: Complete + issues: + - type: warning.validation + message: Something doesn't look right about these invoices. You can see more information in the logs. + links: + logs: 'https://api.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/sync/743ec94a-8aa4-44bb-8bd4-e1855ee0e74b/validation' + portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/pull-history' + readMore: 'https://docs.codat.io/using-the-api/get-data-troubleshooting#warning.validation' + Read completed without issues: + value: + id: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b + eventType: read.completed generatedDate: '2022-10-23T00:00:00.000Z' payload: referenceCompany: @@ -3180,33 +3276,54 @@ webhooks: 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 + modifiedFromDate: '2022-10-23T00:00:00.000Z' + dataTypes: + - connectionId: 2e9d2c44-f675-40ba-8049-353bfcb5e171 + dataType: invoices + recordsModified: false + status: Complete + issues: [] responses: '200': description: Return a 200 status to indicate that the webhook was received successfully. - bankFeeds.sourceAccount.disconnected: + read.completed.initial: post: - description: Called when a bank feed source account has become disconnected. - x-svix-feature-flag: bank-feeds + description: Called when the initial fetch of data types for a product has been completed. requestBody: content: application/json: schema: - $ref: '#/components/schemas/SourceAccountWebhook' + $ref: '#/components/schemas/ReadCompletedWebhook' examples: - Disconnected: + Initial with validation warnings: value: - id: ba29118f-5406-4e59-b05c-ba307ca38d01 - eventType: bankFeeds.sourceAccount.disconnected + id: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b + eventType: read.completed.initial + generatedDate: '2022-10-23T00:00:00.000Z' + 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' + modifiedFromDate: '2022-10-23T00:00:00.000Z' + dataTypes: + - connectionId: 2e9d2c44-f675-40ba-8049-353bfcb5e171 + dataType: invoices + recordsModified: false + status: Complete + issues: + - type: warning.validation + message: Something doesn't look right about these invoices. You can see more information in the logs. + links: + logs: 'https://api.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/sync/743ec94a-8aa4-44bb-8bd4-e1855ee0e74b/validation' + portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/pull-history' + readMore: 'https://docs.codat.io/using-the-api/get-data-troubleshooting#warning.validation' + Initial without issues: + value: + id: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b + eventType: read.completed.initial generatedDate: '2022-10-23T00:00:00.000Z' payload: referenceCompany: @@ -3215,472 +3332,339 @@ webhooks: 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 + modifiedFromDate: '2022-10-23T00:00:00.000Z' + dataTypes: + - connectionId: 2e9d2c44-f675-40ba-8049-353bfcb5e171 + dataType: invoices + recordsModified: false + status: Complete + issues: [] 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 - type: object - properties: - username: - type: string - example: S0MW-TR0P-7DS0 - description: Username used by the bank feeds platform to retrieve transactions - password: - 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: - 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. + '{dataType}.write.successful': + post: + description: | + Indicates that a `dataType` has been successfully created, updated, deleted, or had an attachment uploaded in the accounting software. - 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)). + Codat now refers to push operations as write requests. - 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. + For example, to subscribe to events where a bill is written into the accounting software, use the `bills.write.successful` webhook. - 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 + ### Supported data types and write types - 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. + | `dataType` | Create | Update | Delete | UploadAttachment | + |------------------|---------|---------|---------|------------------| + | bankAccounts | ✅ | ✅ | - | - | + | bankTransactions | ✅ | - | - | - | + | billCreditNotes | ✅ | ✅ | - | ✅ | + | billPayments | ✅ | - | ✅ | - | + | bills | ✅ | ✅ | ✅ | ✅ | + | chartOfAccounts | ✅ | - | - | - | + | creditNotes | ✅ | ✅ | - | - | + | customers | ✅ | ✅ | - | - | + | directCosts | ✅ | - | ✅ | ✅ | + | directIncomes | ✅ | - | - | ✅ | + | invoices | ✅ | ✅ | ✅ | ✅ | + | items | ✅ | - | - | - | + | journalEntries | ✅ | - | ✅ | - | + | journals | ✅ | - | - | - | + | payments | ✅ | - | - | - | + | purchaseOrders | ✅ | ✅ | - | - | + | suppliers | ✅ | ✅ | - | - | + | transfers | ✅ | - | - | ✅ | + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DataTypeWriteWebhook' + examples: + Record: + value: + id: bae71d36-ff47-420a-b4a6-f8c9ddf41140 + eventType: '{dataType}.write.successful' + generatedDate: '2023-05-03T10:00:23Z' + payload: + id: a9367074-b5c3-42c4-9be4-be129f43577e + type: Create + referenceCompany: + id: 70af3071-65d9-4ec3-b3cb-5283e8d55dac + name: Toft stores + description: cust_1MtJUT2eZvKYlo2CNaw2HvEv + connectionId: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 + requestedOnDate: '2023-05-03T10:00:00Z' + completedOnDate: '2023-05-03T10:00:23Z' + status: Success + record: + id: bil_1Nispe2eZvKYlo2Cd31jOCgZ + Attachment: + value: + id: bae71d36-ff47-420a-b4a6-f8c9ddf41140 + eventType: '{dataType}.write.successful' + generatedDate: '2023-05-03T10:00:23Z' + payload: + id: a9367074-b5c3-42c4-9be4-be129f43577e + type: UploadAttachment + referenceCompany: + id: 70af3071-65d9-4ec3-b3cb-5283e8d55dac + name: Toft stores + description: cust_1MtJUT2eZvKYlo2CNaw2HvEv + connectionId: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 + requestedOnDate: '2023-05-03T10:00:00Z' + completedOnDate: '2023-05-03T10:00:23Z' + status: Success + record: + id: bil_1Nispe2eZvKYlo2Cd31jOCgZ + attachmentId: att_1AZtxr2eZvKYlo2CJDX8whov + responses: + '200': + description: Return a 200 status to indicate that the webhook was received. + '{dataType}.write.unsuccessful': + post: + description: | + Indicates that a `dataType` has not been successfully created, updated, deleted, or had an attachment uploaded in the accounting software. - 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. + Codat now refers to push operations as write requests. - 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. + For example, to subscribe to events where a bill is written into the accounting software, use the `bills.write.unsuccessful` webhook. - 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. + ### Supported data types and write types - 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 + | `dataType` | Create | Update | Delete | UploadAttachment | + |------------------|---------|---------|---------|------------------| + | bankAccounts | ✅ | ✅ | - | - | + | bankTransactions | ✅ | - | - | - | + | billCreditNotes | ✅ | ✅ | - | ✅ | + | billPayments | ✅ | - | ✅ | - | + | bills | ✅ | ✅ | ✅ | ✅ | + | chartOfAccounts | ✅ | - | - | - | + | creditNotes | ✅ | ✅ | - | - | + | customers | ✅ | ✅ | - | - | + | directCosts | ✅ | - | ✅ | ✅ | + | directIncomes | ✅ | - | - | ✅ | + | invoices | ✅ | ✅ | ✅ | ✅ | + | items | ✅ | - | - | - | + | journalEntries | ✅ | - | ✅ | - | + | journals | ✅ | - | - | - | + | payments | ✅ | - | - | - | + | purchaseOrders | ✅ | ✅ | - | - | + | suppliers | ✅ | ✅ | - | - | + | transfers | ✅ | - | - | ✅ | + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DataTypeWriteWebhook' + examples: + Record: + value: + id: bae71d36-ff47-420a-b4a6-f8c9ddf41140 + eventType: '{dataType}.write.unsuccessful' + generatedDate: '2023-05-03T10:00:23Z' + payload: + id: a9367074-b5c3-42c4-9be4-be129f43577e + type: Update + referenceCompany: + id: 70af3071-65d9-4ec3-b3cb-5283e8d55dac + name: Toft stores + description: cust_1MtJUT2eZvKYlo2CNaw2HvEv + connectionId: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 + requestedOnDate: '2023-05-03T10:00:00Z' + completedOnDate: '2023-05-03T10:00:23Z' + status: Failed + Record timed out: + value: + id: bae71d36-ff47-420a-b4a6-f8c9ddf41140 + eventType: '{dataType}.write.unsuccessful' + generatedDate: '2023-05-03T10:00:23Z' + payload: + id: a9367074-b5c3-42c4-9be4-be129f43577e + type: Delete + referenceCompany: + id: 70af3071-65d9-4ec3-b3cb-5283e8d55dac + name: Toft stores + description: cust_1MtJUT2eZvKYlo2CNaw2HvEv + connectionId: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 + requestedOnDate: '2023-05-03T10:00:00Z' + completedOnDate: '2023-05-03T10:00:23Z' + status: TimedOut + Attachment: + value: + id: bae71d36-ff47-420a-b4a6-f8c9ddf41140 + eventType: '{dataType}.write.unsuccessful' + generatedDate: '2023-05-03T10:00:23Z' + payload: + id: a9367074-b5c3-42c4-9be4-be129f43577e + type: UploadAttachment + referenceCompany: + id: 70af3071-65d9-4ec3-b3cb-5283e8d55dac + name: Toft stores + description: cust_1MtJUT2eZvKYlo2CNaw2HvEv + connectionId: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 + requestedOnDate: '2023-05-03T10:00:00Z' + completedOnDate: '2023-05-03T10:00:23Z' + status: TimedOut + record: + id: bil_1Nispe2eZvKYlo2Cd31jOCgZ + responses: + '200': + description: Return a 200 status to indicate that the webhook was received. + client.rateLimit.reached: + post: + description: Called when your client’s request count to Codat's API surpasses the allocated quota. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ClientRateLimitWebhook' + examples: + Reached: + value: + id: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b + eventType: client.rateLimit.reached + generatedDate: '2024-09-01T00:00:00Z' + payload: + 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. + client.rateLimit.reset: + post: + 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/ClientRateLimitWebhook' + examples: + Reset: + value: + id: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b + eventType: client.rateLimit.reset + generatedDate: '2024-09-01T00:00:00Z' + payload: + 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: + ApiKeyDetails: + title: API key details + description: Details of the API key. type: object - additionalProperties: false - properties: - sourceAccountId: - type: string - description: Unique ID for the source account - targetAccountId: - 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. - required: - - sourceAccountId - examples: - - sourceAccountId: acc-002 - targetAccountId: account-081 - BankFeedAccountMappingResponse: - title: Bank feed account mapping response + allOf: + - properties: + id: + type: string + description: Unique identifier for the API key. + example: e288a972-b402-4b21-93f9-b5335ae5679c + name: + type: string + maxLength: 50 + nullable: true + description: A meaningful name assigned to the API key. + example: azure-invoice-finance-processor + apiKey: + type: string + description: The API key value used to make authenticated http requests. + example: ztHQGvnC4XN2CgUhaDWEG4ySLUJqWjp7zkbZkGHd + - nullable: true + description: Datetime in UTC the API key was created. The created date will be null if the API key created before YYYY-MM-DD. + title: Created date + type: object + x-internal: true + properties: + createdDate: + $ref: '#/components/schemas/DateTime' + description: The date the entity was created. + ApiKeys: + title: API keys + x-internal: true type: object - additionalProperties: false properties: - sourceAccountId: - type: string - description: Unique ID for the source account. - targetAccountId: - type: string - nullable: true - description: Unique ID for the target account. - status: - type: string - nullable: true - description: Status of the POST request. - error: - type: string - 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 + results: + type: array + items: + $ref: '#/components/schemas/ApiKeyDetails' + Branding: + title: Branding type: object - additionalProperties: false properties: - sourceAccountId: - type: string - description: Unique ID for the source account. - sourceAccountName: - type: string - description: Name for the source account. - sourceAccountNumber: - 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: - type: string - nullable: true - description: Unique ID for the target account in the accounting software. - targetAccountName: - type: string - description: Name for the target account in the accounting software. - status: + logo: + $ref: '#/components/schemas/Branding/definitions/brandingLogo' + button: + $ref: '#/components/schemas/Branding/definitions/brandingButton' + sourceId: type: string - description: The status. - targetAccountOptions: - type: array - nullable: true - description: An array of potential target accounts. - items: - $ref: '#/components/schemas/BankFeedMapping/definitions/targetAccountOption' - feedStartDate: - $ref: '#/components/schemas/DateTime' - 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.' + 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`.' definitions: - targetAccountOption: - title: Target Account Option + brandingLogo: + description: Logo branding references. 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: + full: + $ref: '#/components/schemas/Branding/definitions/brandingImage' + square: + $ref: '#/components/schemas/Branding/definitions/brandingImage' + brandingButton: + type: object + description: Button branding references. + properties: + default: + $ref: '#/components/schemas/Branding/definitions/brandingImage' + hover: + $ref: '#/components/schemas/Branding/definitions/brandingImage' + brandingImage: + title: Branding Image + type: object + properties: + image: + $ref: '#/components/schemas/Branding/definitions/imageReference' + examples: [] + imageReference: + type: object + title: Image Reference + description: Image reference. + properties: + src: type: string - nullable: true - description: The sort code of the account. - accountNumber: + format: uri + description: Source URL for image. + alt: 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 + description: Alternative text when image is not available. 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 + - logo: + full: + image: + src: 'https://static.codat.io/public/officialLogos/Full/8A156A5A-39CB-4F9D-856E-76EF9B9A9607.png' + alt: xero full icon + square: + image: + src: 'https://static.codat.io/public/officialLogos/Square/8A156A5A-39CB-4F9D-856E-76EF9B2W3607.png' + alt: xero square icon + button: + default: + image: + src: 'https://static.codat.io/public/officialButtons/Full/8A156A5A-39CB-4F9D-856E-76EF9Q7A9607.png' + alt: xero default button icon + hover: + image: + src: 'https://static.codat.io/public/officialLogos/Full/8A156A5A-39CB-4F9D-856E-76EF9B9A9607.png' + alt: xero hover button icon + sourceId: 35b92968-9851-4095-ad60-395c95cbcba4 + ClientId: + title: Client ID + type: string + format: uuid + description: Unique identifier for your client in Codat. ClientRateLimitWebhook: title: Client rate limit webhook type: object @@ -3725,68 +3709,10 @@ components: 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' + - $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/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." + description: "\uFEFFIn Codat, a company represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/platform-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' @@ -3802,7 +3728,7 @@ components: type: object properties: id: - $ref: '#/components/parameters/companyId/schema' + $ref: '#/paths/~1companies~1%7BcompanyId%7D~1syncSettings/post/requestBody/content/application~1json/schema/allOf/0/properties/companyId' name: type: string description: The name of the company @@ -3859,7 +3785,7 @@ components: type: object properties: id: - $ref: '#/components/parameters/companyId/schema' + $ref: '#/paths/~1companies~1%7BcompanyId%7D~1syncSettings/post/requestBody/content/application~1json/schema/allOf/0/properties/companyId' name: $ref: '#/components/schemas/Company/definitions/companyDetails/properties/name' description: @@ -3928,32 +3854,6 @@ components: - expiresIn: 86400 accessToken: string tokenType: Bearer - CompanyInformation: - title: Company information - description: Information about the company from the underlying accounting software. - 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 x-internal: true @@ -3988,9 +3888,42 @@ components: $ref: '#/components/schemas/CompanyRequestBody/properties/description' tags: $ref: '#/components/schemas/Company/definitions/companyDetails/properties/tags' + CompanySyncSettings: + title: Company sync settings + type: object + properties: + companyId: + $ref: '#/paths/~1companies~1%7BcompanyId%7D~1syncSettings/post/requestBody/content/application~1json/schema/allOf/0/properties/companyId' + settings: + type: array + items: + $ref: '#/components/schemas/SyncSetting' + overridesDefaults: + type: boolean + description: 'Set to `True` if you want to override the default [sync settings](https://docs.codat.io/knowledge-base/advanced-sync-settings).' + CompanyWebhook: + title: Company webhook + type: object + properties: + id: + type: string + format: uuid + example: ba29118f-5406-4e59-b05c-ba307ca38d01 + description: Unique identifier of the event + eventType: + type: string + description: The type of event. + examples: + - company.created + - company.deleted + generatedDate: + $ref: '#/components/schemas/DateTime' + description: The date time in UTC the event was generated in Codat. + payload: + $ref: '#/components/schemas/Company/definitions/companyDetails' 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)." + description: "\uFEFFA connection represents a [company's](https://docs.codat.io/platform-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 properties: id: @@ -4004,23 +3937,9 @@ components: 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`.' + $ref: '#/components/schemas/Branding/properties/sourceId' sourceType: - title: Source Type - description: The type of platform of the connection. - type: string - enum: - - Accounting - - Banking - - BankFeed - - Commerce - - Expense - - Other - - Unknown - example: Accounting + $ref: '#/components/schemas/Integration/definitions/sourceType' platformName: type: string description: Name of integration connected to company. @@ -4116,6 +4035,29 @@ components: lastSync: '2022-10-27T10:22:43.6464237Z' created: '2022-10-27T09:53:29Z' sourceType: Banking + ConnectionManagementAccessToken: + title: Access token + type: object + properties: + accessToken: + type: string + nullable: false + description: Access token that allows SMBs to manage connections that have access to their data. + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + ConnectionManagementAllowedOrigins: + title: Allowed origins + type: object + properties: + allowedOrigins: + type: array + description: 'An array of allowed origins (i.e. your domains) to permit cross-origin resource sharing ([CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)).n resource sharing ([CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)).' + items: + type: string + format: uri + description: A domain you want to allow CORS with Codat. + example: + allowedOrigins: + - 'https://www.bank-of-dave.com' Connections: title: Connections x-internal: true @@ -4126,84 +4068,421 @@ components: type: array items: $ref: '#/components/schemas/Connection' - - $ref: '#/components/schemas/Companies/allOf/1' - CreateBankTransactions: - title: Create bank transactions + - $ref: '#/components/schemas/PagingInfo' + ConnectionWebhook: + title: Connection webhook type: object properties: - accountId: + id: type: string - description: Unique identifier for a bank account. + format: uuid + example: ba29118f-5406-4e59-b05c-ba307ca38d01 + description: Unique identifier of the event. + eventType: + type: string + description: The type of event. 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 + - connection.created + - connection.connected + - connection.disconnected + - connection.reconnected + - connection.deleted + - connection.failed + generatedDate: + $ref: '#/components/schemas/DateTime' + description: The date time in UTC the event was generated in Codat. + payload: + $ref: '#/components/schemas/ConnectionWebhook/definitions/connectionWebhookPayload' + definitions: + connectionWebhookPayload: + title: Connection webhook payload + type: object + properties: + referenceCompany: + $ref: '#/components/schemas/Company/definitions/companyReference' + connection: + $ref: '#/components/schemas/Connection' + CreateApiKey: + title: Create API key + description: Details about the newly created API key. x-internal: true - allOf: - - type: object + type: object + properties: + name: + $ref: '#/components/schemas/ApiKeyDetails/allOf/0/properties/name' + CustomDataTypeConfiguration: + title: Custom data type configuration + type: object + description: Client's configuration details for a specific custom data type and platform pair. + properties: + dataSource: + type: string + description: Underlying endpoint of the source platform that will serve as a data source for the custom data type. This value is not validated by Codat. + requiredData: + type: object + description: Properties required to be fetched from the underlying platform for the custom data type that is being configured. This value is not validated by Codat. + additionalProperties: + type: string + description: The client's defined name for the property with the value being the source system's property name which the mapping is targeting. + keyBy: + type: array + description: An array of properties from the source system that can be used to uniquely identify the records returned for the custom data type. This value is not validated by Codat. + items: + type: string + minLength: 1 + sourceModifiedDate: + type: array + nullable: true + items: + type: string + description: Property in the source platform nominated by the client that defines the date when a record was last modified there. This value is not validated by Codat. + examples: + - dataSource: api/purchaseOrders?$filter=currencyCode eq 'NOK' + requiredData: + currencyCode: '$[*].currencyCode' + id: '$[*].id' + number: '$[*].number' + orderDate: '$[*].orderDate' + totalAmountExcludingTax: '$[*].totalAmountExcludingTax' + totalTaxAmount: '$[*].totalTaxAmount' + vendorName: '$[*].number' + keyBy: + - '$[*].id' + sourceModifiedDate: + - '$[*].lastModifiedDateTime' + CustomDataTypeRecords: + title: Custom data type records + type: object + description: Resulting records pulled from the source platform for a specific custom data type. + properties: + results: + type: array + items: + $ref: '#/components/schemas/CustomDataTypeRecords/definitions/customDataTypeRecord' + pageNumber: + $ref: '#/components/schemas/PagingInfo/properties/pageNumber' + pageSize: + $ref: '#/components/schemas/PagingInfo/properties/pageSize' + totalResults: + $ref: '#/components/schemas/PagingInfo/properties/totalResults' + definitions: + customDataTypeRecord: + title: Custom data type record + type: object properties: - data: - $ref: '#/components/schemas/CreateBankTransactions' - - $ref: '#/components/schemas/PushOperation' + id: + type: string + nullable: false + description: Unique identifier of the record. + content: + type: object + description: Values from the source system for the properties defined in the custom data type configuration. + additionalProperties: + type: object + modifiedDate: + 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. + 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/DateTime' + 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: + - dataType: string + lastSuccessfulSync: '2022-01-01T13:00:00.000Z' + currentStatus: string + latestSyncId: ad474a37-2003-478e-baee-9af9f1ec2fe3 + latestSuccessfulSyncId: 8220fc90-55b6-47bc-9417-48ac6ea93101 + DataStatuses: + 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 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 + $ref: '#/components/schemas/DataStatus/properties/dataType' + DataTypeWriteWebhook: + title: Write data type webhook + type: object + properties: + id: + type: string + format: uuid + example: ba29118f-5406-4e59-b05c-ba307ca38d01 + description: Unique identifier of the event. + eventType: + type: string + description: The type of event. + examples: + - bills.write.successful + - bills.write.unsuccessful + generatedDate: + $ref: '#/components/schemas/DateTime' + description: The date time in UTC the event was generated in Codat. + payload: + $ref: '#/components/schemas/DataTypeWriteWebhook/definitions/dataTypeWriteWebhookPayload' + definitions: + dataTypeWriteWebhookPayload: + title: Payload + type: object + properties: + id: + type: string + description: Unique identifier of the write request. This is also known as the push operation ID. + type: + $ref: '#/components/schemas/DataTypeWriteWebhook/definitions/writeType' + referenceCompany: + $ref: '#/components/schemas/Company/definitions/companyReference' + connectionId: + $ref: '#/components/parameters/connectionId/schema' + requestedOnDate: + $ref: '#/components/schemas/DateTime' + description: The date time in UTC the write request was submitted. + completedOnDate: + $ref: '#/components/schemas/DateTime' + description: The date time in UTC the write request completed. + status: + $ref: '#/components/schemas/DataTypeWriteWebhook/definitions/writeStatus' + record: + $ref: '#/components/schemas/DataTypeWriteWebhook/definitions/dataTypeWriteWebhookRecord' + nullable: true + attachmentId: + type: string + nullable: true + description: 'Unique identifier for the uploaded attachment, null if no attachment uploaded.' + dataTypeWriteWebhookRecord: + type: object + properties: + id: + type: string + description: 'The unique identifier of the data type created, updated, deleted, or had an attachment uploaded in the accounting platform.' + writeType: + title: Write type + description: Type of write request. + type: string + enum: + - Create + - Update + - Delete + - UploadAttachment + writeStatus: + title: Write request status + type: string + enum: + - Pending + - Failed + - Success + - TimedOut + description: 'The current status of the write request, which is the same as the push operation status.' DateTime: title: Date time type: string @@ -4288,24 +4567,259 @@ components: type: string nullable: true description: Name of validator. - GenerateOtpResponse: - title: OTP response + Integration: + title: Integration + description: An integration that Codat supports + examples: + - key: gbol + logoUrl: 'http://example.com' + name: Xero + enabled: true + sourceId: accounting + sourceType: 8193a927-ab7a-45a3-9dc2-d357a4932dfe + integrationId: 497a18ca-284e-40c0-985d-f72be35d468e + isOfflineConnector: true + isBeta: true + dataProvidedBy: string + datatypeFeatures: + - datatype: invoices + supportedFeatures: + - featureType: get + featureState: release type: object - description: Response containing a one-time password and its expiry time. - additionalProperties: false properties: - otp: + key: + $ref: '#/components/parameters/platformKey/schema' + logoUrl: 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 + description: Static url for integration's logo. + name: + type: string + example: Xero + description: Name of integration. + enabled: + type: boolean + description: Whether this integration is enabled for your customers to use. + sourceId: + $ref: '#/components/schemas/Branding/properties/sourceId' + sourceType: + $ref: '#/components/schemas/Integration/definitions/sourceType' + integrationId: + $ref: '#/components/schemas/Connection/properties/integrationId' + isOfflineConnector: + type: boolean + description: '`True` if the integration is to an application installed and run locally on an SMBs computer.' + isBeta: + type: boolean + description: '`True` if the integration is currently in beta release.' + dataProvidedBy: + type: string + description: The name of the data provider. + datatypeFeatures: + type: array + items: + $ref: '#/components/schemas/Integration/definitions/dataTypeFeature' + required: + - key + - logoUrl + - name + - enabled + definitions: + sourceType: + title: Source Type + description: The type of platform of the connection. + type: string + enum: + - Accounting + - Banking + - BankFeed + - Commerce + - Expense + - Other + - Unknown + example: Accounting + dataTypeFeature: + title: Data type feature + description: Describes support for a given datatype and associated operations + type: object + properties: + dataType: + $ref: '#/components/schemas/DataStatus/properties/dataType' + supportedFeatures: + type: array + items: + $ref: '#/components/schemas/Integration/definitions/supportedFeature' + required: + - datatype + - supportedFeatures + examples: + - datatype: invoices + supportedFeatures: + - featureType: Get + featureState: Release + supportedFeature: + type: object + x-internal: true + properties: + featureType: + $ref: '#/components/schemas/Integration/definitions/featureType' + featureState: + $ref: '#/components/schemas/Integration/definitions/featureState' + required: + - featureType + - featureState + featureState: + title: Feature state + type: string + example: Release + description: The current release state of the feature. + enum: + - Release + - Alpha + - Beta + - Deprecated + - NotSupported + - NotImplemented + featureType: + type: string + x-internal: true + description: The type of feature. + enum: + - Get + - Post + - Categorization + - Delete + - Put + - GetAsPdf + - DownloadAttachment + - GetAttachment + - GetAttachments + - UploadAttachment + example: Get + Integrations: + title: Integrations + x-internal: true + allOf: + - type: object + properties: + results: + type: array + items: + $ref: '#/components/schemas/Integration' + - $ref: '#/components/schemas/PagingInfo' + PagingInfo: + 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/PagingInfo/definitions/links' + definitions: + links: + title: Hal Links + type: object + required: + - self + - current + properties: + 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: + href: + type: string + format: uri-reference + description: Uri hypertext reference. required: - - otp - - expiry + - 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' + Profile: + title: Profile + description: Describes your Codat client instance examples: - - otp: GT40U4 - expiry: '2026-04-08T10:30:00Z' + - name: Bob's Burgers + logoUrl: 'https://client-images.codat.io/logo/042399f5-d104-4f38-9ce8-cac3524f4e88_5806cb1f-7342-4c0e-a0a8-99bfbc47b0ff.png' + iconUrl: 'https://client-images.codat.io/icon/042399f5-d104-4f38-9ce8-cac3524f4e88_3f5623af-d992-4c22-bc08-e58c520a8526.ico' + redirectUrl: 'https://bobs-burgers.{countrySuffix}/{companyId}' + whiteListUrls: + - 'https://bobs-burgers.com' + - 'https://bobs-burgers.co.uk' + confirmCompanyName: true + type: object + properties: + name: + type: string + example: Bob's Burgers + description: The name given to the instance. + logoUrl: + type: string + description: Static url to your organization's logo. + example: 'https://client-images.codat.io/logo/042399f5-d104-4f38-9ce8-cac3524f4e88_5806cb1f-7342-4c0e-a0a8-99bfbc47b0ff.png' + iconUrl: + type: string + description: Static url to your organization's icon. + example: 'https://client-images.codat.io/icon/042399f5-d104-4f38-9ce8-cac3524f4e88_3f5623af-d992-4c22-bc08-e58c520a8526.ico' + redirectUrl: + type: string + example: 'https://bobs-burgers.{countrySuffix}/{companyId}' + description: 'The redirect URL pasted on to the SMB once Codat''s [Hosted Link](https://docs.codat.io/auth-flow/authorize-hosted-link) has been completed by the SMB.' + whiteListUrls: + type: array + description: A list of urls that are allowed to communicate with Codat. If empty any url is allowed to communicate with Codat. + items: + type: string + format: uri + example: 'https://bobs-burgers.com' + description: A url that is allowed to communicate with Codat. + apiKey: + type: string + deprecated: true + example: sartANTjHAkLdbyDfaynoTQb7pkmj6hXHmnQKMrB + description: The API key for this Codat instance. + confirmCompanyName: + type: boolean + deprecated: true + description: '`True` if the company name has been confirmed.' + required: + - name + - redirectUrl + x-stoplight: + id: b1fyq05edangf PullOperation: title: Pull operation description: |- @@ -4412,7 +4926,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,10 +4939,10 @@ 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' + $ref: '#/paths/~1companies~1%7BcompanyId%7D~1syncSettings/post/requestBody/content/application~1json/schema/allOf/0/properties/companyId' pushOperationKey: type: string format: uuid @@ -4522,7 +5036,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 +5069,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,603 +5197,327 @@ components: $ref: '#/components/schemas/PushOption/definitions/pushOptionProperty/properties/description' required: $ref: '#/components/schemas/PushOption/definitions/pushOptionProperty/properties/required' - SourceAccount: - title: Source account (v1) + ReadCompletedWebhook: + title: Read completed webhook type: object - description: The target bank account in a supported accounting software for ingestion into a bank feed. - additionalProperties: false 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 - 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: - type: number - format: decimal - 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: + format: uuid + example: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b + description: Unique identifier of the event. + eventType: type: string - nullable: true - description: Status of the source account. - enum: - - pending - - connected - - connecting - - disconnected - - unknown - feedStartDate: + description: The type of event. + generatedDate: $ref: '#/components/schemas/DateTime' - nullable: true - required: - - id - definitions: - sourceAccountPrototype: - title: Source account (v1) - 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' - 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. - type: object - properties: - sourceAccountId: - type: string - description: Unique ID for the source account. - examples: - - '12345' - result: - $ref: '#/components/schemas/SourceAccountBatchCreateResponse/definitions/sourceAccountBatchCreateResult' + description: The date time in UTC the event was generated in Codat. + payload: + $ref: '#/components/schemas/ReadCompletedWebhook/definitions/readCompletedWebhookPayload' definitions: - sourceAccountBatchCreateResult: - title: Source Account Batch Create Result - description: Status details and corresponding object of the `Create account` operation. + readCompletedWebhookPayload: + title: Read result webhook payload type: object properties: - statusCode: - type: integer - description: The HTTP status code for the creation of the source account - error: - type: string + referenceCompany: + $ref: '#/components/schemas/Company/definitions/companyReference' + modifiedFromDate: + $ref: '#/components/schemas/DateTime' + description: The date time in UTC when the data types were last fetched and input into Codat's cache. 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. - type: object - properties: - sourceAccountId: - type: string - description: Unique ID for the source account. - examples: - - '12345' - result: + dataTypes: + type: array + items: + $ref: '#/components/schemas/ReadCompletedWebhook/definitions/dataTypeReadSummary' + dataTypeReadSummary: + title: Summary of data type reads 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) - type: object - description: The target bank account in a supported accounting software for ingestion into a bank feed. - additionalProperties: false - properties: - id: - type: string - description: Unique ID for the bank account. - accountName: - type: string - description: The bank account name. - accountType: - type: string - description: 'The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard.' - enum: - - checking - - savings - - loan - - creditCard - - prepaidCard - accountNumber: - type: string - description: The account number. - sortCode: - type: string - 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: - type: string - nullable: true - description: Status of the source account. - enum: - - pending - - connected - - connecting - - disconnected - - unknown - feedStartDate: - nullable: true - title: Date - 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) + connectionId: + $ref: '#/components/parameters/connectionId/schema' + dataType: + $ref: '#/components/schemas/DataStatus/properties/dataType' + recordsModified: + type: boolean + example: false + description: '`True` if records have been created, updated or deleted in Codat''s cache.' + status: + $ref: '#/components/schemas/PullOperation/properties/status' + issues: + type: array + nullable: true + description: A array of issues encountered during a data read. + items: + $ref: '#/components/schemas/ReadCompletedWebhook/definitions/issue' + customProductReadCompleteWebhook: + title: Read completed webhook 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' - required: - - id - - accountName - - accountType - - accountNumber - - currency - - balance - accountInfo: - title: Account Info + $ref: '#/components/schemas/ReadCompletedWebhook/properties/id' + eventType: + $ref: '#/components/schemas/ReadCompletedWebhook/properties/eventType' + generatedDate: + $ref: '#/components/schemas/ReadCompletedWebhook/properties/generatedDate' + payload: + $ref: '#/components/schemas/ReadCompletedWebhook/definitions/customProductReadCompleteWebhookPayload' + customProductReadCompleteWebhookPayload: + title: Read result webhook payload 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: - 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 + referenceCompany: + $ref: '#/components/schemas/Company/definitions/companyReference' + modifiedFromDate: + $ref: '#/components/schemas/ReadCompletedWebhook/definitions/readCompletedWebhookPayload/properties/modifiedFromDate' + dataTypes: + type: array + description: Contains all data types configured for the product or a subset of data types defined in the manual refresh call. + items: + type: object + title: Summary of data type reads + properties: + connectionId: + $ref: '#/components/parameters/connectionId/schema' + dataType: + $ref: '#/components/schemas/DataStatus/properties/dataType' + recordsModified: + $ref: '#/components/schemas/ReadCompletedWebhook/definitions/dataTypeReadSummary/properties/recordsModified' + status: + $ref: '#/components/schemas/PullOperation/properties/status' + issues: + type: array + nullable: true + description: A array of issues encountered during a data read. + items: + $ref: '#/components/schemas/ReadCompletedWebhook/definitions/issue' + issue: + title: Issue type: object - description: Routing information for the bank. This does not include account number. + description: Details of a problem encountered during a data read. 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. + description: The type of issue. + example: warning.validation + message: + type: string + description: A message describing the issue. + example: Something doesn't look right about these accounts from Xero. You can see more information in the logs. + links: + title: Links + type: object + properties: + logs: + type: string + description: 'A link to the validation logs, providing details on any errors or warnings encountered.' + example: 'https://api.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/sync/{datasetId}/validation' + portal: + type: string + description: A link to the company's past data read history in the Codat portal. + example: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/pull-history' + readMore: + type: string + description: A link to Codat's documentation with additional information on how to troubleshoot this issue. + example: 'https://docs.codat.io/using-the-api/get-data-troubleshooting#warning.validation' + SupplementalDataConfiguration: + description: '' + title: Supplemental data configuration + type: object + properties: + supplementalDataConfig: + type: object + additionalProperties: + type: object + title: Supplemental data source configuration + description: The client's defined name for the object. + properties: + dataSource: + type: string + description: 'The underlying endpoint of the source system which the configuration is targeting. ' + pullData: + type: object + description: The additional properties that are required when pulling records. + additionalProperties: + type: string + description: The client's defined name for the property with the value being the source system's property name which the mapping is targeting. + pushData: + type: object + description: The additional properties that are required to create and/or update records. + additionalProperties: + type: string + description: The client's defined name for the property with the value being the source system's property name which the mapping is targeting. 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. + - supplementalDataConfig: + orders-supplemental-data: + dataSource: /orders + pullData: + orderNumber: order_num + pushData: + orderNumber: order_num + SyncSetting: + title: SyncSetting + description: 'Describes how often, and how much history, should be fetched for the given data type when a pull operation is queued.' + examples: + - dataType: invoices + fetchOnFirstLink: true + syncSchedule: 24 + syncOrder: 0 + syncFromUtc: '2020-01-01T12:00:00.000Z' + syncFromWindow: 24 + monthsToSync: 24 + isLocked: true type: object properties: - sourceAccountId: - type: string - description: Unique ID for the source account. - examples: - - '12345' - result: - $ref: '#/components/schemas/SourceAccountV2BatchCreateResponse/definitions/sourceAccountV2BatchCreateResult' + dataType: + $ref: '#/components/schemas/DataStatus/properties/dataType' + fetchOnFirstLink: + type: boolean + description: Whether this data type should be queued after a company has authorized a connection. + syncSchedule: + type: integer + example: 24 + description: Number of hours after which this data type should be refreshed. + syncOrder: + type: integer + description: The sync in which data types are queued for a sync. + syncFromUtc: + $ref: '#/components/schemas/DateTime' + description: Date from which data should be fetched. Set this *or* `syncFromWindow`. + syncFromWindow: + type: integer + example: 24 + description: Number of months of data to be fetched. Set this *or* `syncFromUTC`. + monthsToSync: + type: integer + example: 24 + description: 'Months of data to fetch, for report data types (`balanceSheet` & `profitAndLoss`) only.' + isLocked: + type: boolean + description: '`True` if the [sync setting](https://docs.codat.io/knowledge-base/advanced-sync-settings) is locked.' + required: + - dataType + - fetchOnFirstLink + - syncSchedule + - syncOrder + SyncSettings: + title: Sync settings + x-internal: true + type: object + properties: + clientId: + $ref: '#/components/schemas/ClientId' + settings: + type: array + items: + $ref: '#/components/schemas/SyncSetting' + overridesDefaults: + type: boolean + description: 'Set to `True` if you want to override the default [sync settings](https://docs.codat.io/knowledge-base/advanced-sync-settings).' + UpdateConnectionStatus: + title: Update connection + x-internal: true + type: object + properties: + status: + $ref: '#/components/schemas/Connection/definitions/dataConnectionStatus' + description: The current authorization status of the data connection. + nullable: true + additionalProperties: false + ValidationResult: + title: Validation result + type: object + properties: + errors: + type: array + items: + $ref: '#/components/schemas/ValidationResult/definitions/validationItem' + warnings: + type: array + items: + $ref: '#/components/schemas/ValidationResult/definitions/validationItem' definitions: - sourceAccountV2BatchCreateResult: - title: Source Account V2 Batch CreateResult - description: Status details and corresponding object of the `Create account` operation. + validationItem: + title: Validation item type: object properties: - statusCode: - type: integer - description: The HTTP status code for the creation of the source account - error: + ruleId: type: string - nullable: true - description: A brief description of the error. - account: - $ref: '#/components/schemas/SourceAccountV2' - SourceAccountWebhook: - title: Source account status changed webhook + description: The unique identifier of the rule that wasn't met. + itemId: + type: string + description: The unique identifier of the item that was validated. + message: + type: string + description: The message that describes the validation warning or error. + validatorName: + type: string + description: The name of the validator that was used to validate the item. + WebhookConsumer: + title: Webhook consumer type: object + description: "\uFEFFA webhook consumer is an HTTP endpoint that developers can configure to subscribe to Codat's supported event types.\n\nSee our documentation for more details on [Codat's webhook service](https://docs.codat.io/using-the-api/webhooks/overview).\n" properties: id: type: string format: uuid - example: ba29118f-5406-4e59-b05c-ba307ca38d01 - description: Unique identifier of the event. - eventType: + example: 8a210b68-6988-11ed-a1eb-0242ac120002 + description: Unique identifier for the webhook consumer. + url: 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' + format: uri + description: The URL that will consume webhook events dispatched by Codat. + disabled: + type: boolean + description: Flag that enables or disables the endpoint from receiving events. Disabled when set to `true`. + nullable: true + default: false + eventTypes: + type: array + description: An array of event types the webhook consumer subscribes to. + items: + type: string + companyTags: + type: array + nullable: true + description: 'Company tags provide an additional way to filter messages, independent of event types. Company tags are case-sensitive, and only messages from companies with matching tags will be sent to this endpoint. Use the format `tagKey:tagValue`.' + items: + type: string + maxLength: 128 + maxItems: 10 definitions: - sourceAccountWebhookPayload: - title: Payload + webhookConsumerPrototype: + title: Create webhook consumer type: object 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: - type: string - format: uuid - description: The unique identifier for the created sync. - required: - - syncId - SyncStatusResult: - title: Sync status + url: + $ref: '#/components/schemas/WebhookConsumer/properties/url' + disabled: + $ref: '#/components/schemas/WebhookConsumer/properties/disabled' + eventTypes: + $ref: '#/components/schemas/WebhookConsumer/properties/eventTypes' + companyTags: + $ref: '#/components/schemas/WebhookConsumer/properties/companyTags' + webhookConsumers: + title: Webhook consumers + type: object + properties: + results: + type: array + maxItems: 50 + items: + $ref: '#/components/schemas/WebhookConsumer' + WebhookZapierKey: + title: Zapier integration key 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: - 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: - type: string - nullable: true - description: Error message if the sync failed. - errorCode: + key: type: string - nullable: true - description: Error code if the sync failed. - pushOperationKeys: - type: array - items: - type: string - format: uuid - nullable: true - description: 'List of write operation keys associated with the sync, if the sync resulted in write attempts.' - required: - - syncId - - clientId - - companyId - - companyName - - dataConnectionId - - sourceAccountId - - periodStartUtc - - periodEndUtc - - executionStartUtc - - status - parameters: - 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. - 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. - page: - name: page - in: query - schema: - type: integer - format: int32 - minimum: 1 - example: 1 - default: 1 - description: 'Page number. [Read more](https://docs.codat.io/using-the-api/paging).' - pageSize: - name: pageSize - in: query - schema: - type: integer - format: int32 - default: 100 - example: 100 - minimum: 1 - maximum: 5000 - description: 'Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).' - query: - name: query - in: query - required: false - schema: - type: string - example: id=e3334455-1aed-4e71-ab43-6bccf12092ee - description: 'Codat query string. [Read more](https://docs.codat.io/using-the-api/querying).' - orderBy: - name: orderBy - in: query - required: false - schema: - type: string - example: '-modifiedDate' - description: 'Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).' - dataType: - name: dataType - description: The key of a Codat data type - in: path - required: true - schema: - $ref: '#/components/schemas/DataType' - datasetId: - 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. - timeoutInMinutes: - name: timeoutInMinutes - in: query - schema: - type: integer - format: int32 - description: Time limit for the push operation to complete before it is timed out. + description: Integration key used to authorize Zapier's HTTP requests with Codat. + example: sk_integ_WM4dfoK1nKZnDE_kceze6hWDjbRwOZwG.us + examples: + - key: sk_integ_WM4dfoK1nKZnDE_kceze6hWDjbRwOZwG.us responses: - BadRequest: + Bad-Request: description: The request made is not valid. content: application/json: @@ -5294,6 +5532,15 @@ components: correlationId: bc997528a9d7abb9161ef45f05d38599 canBeRetried: Unknown detailedErrorCode: 0 + ConnectionManagementAllowedOrigins: + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/ConnectionManagementAllowedOrigins' + examples: + Allowed origins: + $ref: '#/components/examples/connectionManagementAllowedOriginsResponse' Malformed-Query: description: Your `query` parameter was not correctly formed content: @@ -5400,8 +5647,8 @@ components: correlationId: 0a40c2f31fc8f992fb88b0853e4166f3 canBeRetried: Unknown detailedErrorCode: 0 - Conflict: - description: The data type's dataset has not been requested or is still syncing. + Too-Many-Requests: + description: Too many requests were made in a given amount of time. Wait a short period and then try again. content: application/json: schema: @@ -5409,14 +5656,14 @@ components: examples: Conflict: value: - statusCode: 409 + statusCode: 429 service: PublicApi - error: The data set has not been requested. + error: You have made too many requests in a given amount of time; please retry later. correlationId: bc997528a9d7abb9161ef45f05d38599 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. + Legal-Reasons: + description: Not currently available due to compliance limitations. Reach out to your Codat contact for further assistance. content: application/json: schema: @@ -5424,10 +5671,10 @@ components: examples: Conflict: value: - statusCode: 429 - service: PublicApi - error: You have made too many requests in a given amount of time; please retry later. - correlationId: bc997528a9d7abb9161ef45f05d38599 + statusCode: 451 + service: StdznCustomData + error: Platform 'qudb' is not currently available for compliance purposes. + correlationId: f63017dabb9b87865573bea95a51e55d canBeRetried: Unknown detailedErrorCode: 0 Internal-Server-Error: @@ -5460,6 +5707,121 @@ components: correlationId: bc997528a9d7abb9161ef45f05d38599 canBeRetried: Unknown detailedErrorCode: 0 + parameters: + companyId: + name: companyId + in: path + required: true + schema: + $ref: '#/paths/~1companies~1%7BcompanyId%7D~1syncSettings/post/requestBody/content/application~1json/schema/allOf/0/properties/companyId' + 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. + customDataIdentifier: + name: customDataIdentifier + in: path + required: true + schema: + type: string + example: DynamicsPurchaseOrders + description: Unique identifier for a custom data type. + page: + name: page + in: query + schema: + type: integer + format: int32 + minimum: 1 + example: 1 + default: 1 + description: 'Page number. [Read more](https://docs.codat.io/using-the-api/paging).' + pageSize: + name: pageSize + in: query + schema: + type: integer + format: int32 + default: 100 + example: 100 + minimum: 1 + maximum: 5000 + description: 'Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).' + productIdentifier: + name: productIdentifier + in: path + required: true + schema: + type: string + examples: + - bank-feeds + - lending + - payables + - expenses + description: Human-readable product identifier for a product. + query: + name: query + in: query + required: false + schema: + type: string + example: id=e3334455-1aed-4e71-ab43-6bccf12092ee + description: 'Codat query string. [Read more](https://docs.codat.io/using-the-api/querying).' + orderBy: + name: orderBy + in: query + required: false + schema: + type: string + example: '-modifiedDate' + description: 'Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).' + dataType: + name: dataType + description: The key of a Codat data type. + in: path + required: true + schema: + $ref: '#/components/schemas/DataType' + datasetId: + 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. + platformKey: + name: platformKey + in: path + required: true + schema: + type: string + minLength: 4 + maxLength: 4 + pattern: '[a-z]{4}' + example: gbol + description: 'A unique 4-letter key to represent a platform in each integration. View [accounting](https://docs.codat.io/integrations/accounting/overview#platform-keys), [banking](https://docs.codat.io/integrations/banking/overview#platform-keys), and [commerce](https://docs.codat.io/integrations/commerce/overview#platform-keys) platform keys.' + description: A unique 4-letter key to represent a platform in each integration. + webhookId: + name: webhookId + in: path + required: true + schema: + $ref: '#/components/schemas/WebhookConsumer/properties/id' + description: Unique identifier for the webhook consumer. + examples: + connectionManagementAllowedOriginsResponse: + value: + allowedOrigins: + - 'https://www.bank-of-dave.com' securitySchemes: auth_header: name: Authorization diff --git a/.speakeasy/logs/changes/old.openapi.yaml b/.speakeasy/logs/changes/old.openapi.yaml index b20877e2f..af37f10f9 100644 --- a/.speakeasy/logs/changes/old.openapi.yaml +++ b/.speakeasy/logs/changes/old.openapi.yaml @@ -1,33 +1,17 @@ openapi: 3.1.0 +x-stoplight: + id: 466k6ayziv9at servers: - description: Production url: 'https://api.codat.io' info: - title: Bank Feeds + title: Platform API version: 3.0.0 + summary: Platform API + description: "An API for the common components of all of Codat's products.\n\nThese end points cover creating and managing your companies, data connections, and integrations.\n\n[Read about the building blocks of Codat...](https://docs.codat.io/core-concepts/companies) | [See our OpenAPI spec](https://github.com/codatio/oas) \n\n---\n\n## Endpoints\n\n| Endpoints | Description |\n| :- |:- |\n| Companies | Create and manage your SMB users' companies. |\n| Connections | Create new and manage existing data connections for a company. |\n| Connection management | Configure connection management UI and retrieve access tokens for authentication. |\n| Webhooks | Create and manage webhooks that listen to Codat's events. |\n| Integrations | Get a list of integrations supported by Codat and their logos. |\n| Refresh data | Initiate data refreshes, view pull status and history. |\n| Settings | Manage company profile configuration, sync settings, and API keys. |\n| Push data | Initiate and monitor Create, Update, and Delete operations. |\n| Supplemental data | Configure and pull additional data you can include in Codat's standard data types. |\n| Custom data type | Configure and pull additional data types that are not included in Codat's standardized data model. |\n" contact: - email: support@codat.io name: Codat - description: |- - Bank Feeds solution enables your SMB users to set up bank feeds from accounts in your application to supported accounting software. - - 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/bank-feeds-api/overview) | [See OpenAPI spec](https://github.com/codatio/oas) - - --- - - ## Endpoints - - | Endpoints | Description | - | :- |:- | - | 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. | - + email: support@codat.io termsOfService: 'https://www.codat.io/legals/' security: - auth_header: [] @@ -68,7 +52,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: platform-api x-codat-keep-docs-paths-local: true x-codat-speakeasy-pagination: type: offsetLimit @@ -81,105 +65,28 @@ x-codat-speakeasy-pagination: tags: - name: Companies description: Create and manage your SMB users' companies. + - name: Connection management + description: Configure UI and retrieve access tokens for authentication used by **Connections SDK**. - name: Connections description: Create new and manage existing data connections for a company. - - 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. + - name: Webhooks + description: Create and manage webhooks that listen to Codat's events. + - name: Integrations + description: Get a list of integrations supported by Codat and their logos. + - name: Refresh data + description: 'Initiate data refreshes, view pull status and history.' + - name: Settings + description: 'Manage company profile configuration, sync settings, and API keys.' + - name: Push data + description: 'Initiate and monitor Create, Update, and Delete operations.' + - name: Read data + description: View validation outcomes for completed read data operations. + - name: Supplemental data + description: Configure and pull additional data you can include in Codat's standard data types. + - name: Custom data type + description: Configure and pull additional data types that are not included in Codat's standardized data model. 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 +254,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\x70\x6C\x61\x74\x66\x6F\x72\x6D\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\x70\x6C\x61\x74\x66\x6F\x72\x6D\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\x70\x6C\x61\x74\x66\x6F\x72\x6D\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,11 +266,94 @@ 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).' + 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/Bad-Request' + '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\x70\x6C\x61\x74\x66\x6F\x72\x6D\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\x70\x6C\x61\x74\x66\x6F\x72\x6D\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\x70\x6C\x61\x74\x66\x6F\x72\x6D\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}': 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" + 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\x70\x6C\x61\x74\x66\x6F\x72\x6D\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\x70\x6C\x61\x74\x66\x6F\x72\x6D\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' tags: @@ -466,7 +456,7 @@ paths: 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" + 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\x70\x6C\x61\x74\x66\x6F\x72\x6D\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\x70\x6C\x61\x74\x66\x6F\x72\x6D\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\x70\x6C\x61\x74\x66\x6F\x72\x6D\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\x70\x6C\x61\x74\x66\x6F\x72\x6D\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: @@ -488,7 +478,7 @@ paths: $ref: '#/components/responses/Service-Unavailable' 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\x70\x6C\x61\x74\x66\x6F\x72\x6D\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\x70\x6C\x61\x74\x66\x6F\x72\x6D\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 +521,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\x70\x6C\x61\x74\x66\x6F\x72\x6D\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 +561,130 @@ 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." - parameters: - - $ref: '#/components/parameters/companyId' + '/companies/{companyId}/products/{productIdentifier}': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/productIdentifier' + put: + summary: Add product + operationId: add-product + x-speakeasy-name-override: add-product + description: |- + Use the *Add product* endpoint to enable a product for the company specified by `companyId`. + + > Note: This feature is currently in alpha and available only to participants in the development program. tags: - Companies responses: - '200': + '204': + description: OK + '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: Remove product + operationId: remove-product + x-speakeasy-name-override: remove-product + description: |- + Use the *Remove product* endpoint to disable a product for the company specified by `companyId`. + + > Note: This feature is currently in alpha and available only to participants in the development program. + tags: + - Companies + responses: + '204': + description: OK + '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}/products/{productIdentifier}/refresh': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/productIdentifier' + post: + summary: Refresh product data + operationId: refresh-product-data + x-speakeasy-name-override: refresh-product-data + description: |- + Use the **Refresh product data** endpoint to manually refresh data for a custom product for a specific company. + + ### Tips and traps + + - This endpoint only supports refreshing data for **custom products** and can't be used for Codat's standard solutions. Refer to [individual solutions' documentation](https://docs.codat.io/) instead. + - If a data sync is already in progress for a custom product, the refresh request will return a `Bad request (400)` response. + - If a company has multiple custom products enabled, you can refresh data for each product individually. + - Optionally include a request body with `dataTypes` to refresh only selected data types for the specified product. If omitted, the product's scheduled refresh is triggered as usual. + - When specifying `dataTypes`, each value must be a valid data type supported by the product. Invalid values will result in a `Bad request (400)` response listing valid options. + tags: + - Companies + requestBody: + required: false + description: 'Optionally specify one or more data types to refresh for the given custom product. If omitted, the product''s scheduled refresh is triggered as usual. When provided, each data type must be valid for the specified product.' + content: + application/json: + schema: + type: object + properties: + dataTypes: + type: array + description: One or more data types to refresh for the product. + items: + type: string + additionalProperties: false + examples: + Filter specific data types: + value: + dataTypes: + - invoices + - payments + responses: + '202': description: OK + '400': + description: Bad Request content: application/json: schema: - $ref: '#/components/schemas/CompanyAccessToken' + $ref: '#/components/schemas/ErrorMessage' examples: - Simple company: + Standard product not supported: value: - expiresIn: 86400 - accessToken: string - tokenType: Bearer + statusCode: 400 + service: PublicApi + error: 'Bank Feeds doesn''t support data refreshing. For more information, refer to your solution’s documentation [here](https://docs.codat.io).' + correlationId: bc997528a9d7abb9161ef45f05d38599 + canBeRetried: Unknown + detailedErrorCode: 0 + Read in progress: + value: + statusCode: 400 + service: PublicApi + error: Data cannot be refreshed while a read operation is in progress. Allow the read to complete before attempting to refresh. + correlationId: bc997528a9d7abb9161ef45f05d38599 + canBeRetried: Unknown + detailedErrorCode: 0 '401': $ref: '#/components/responses/Unauthorized' '402': @@ -685,12 +776,7 @@ paths: type: object properties: platformKey: - type: string - minLength: 4 - maxLength: 4 - pattern: '[a-z]{4}' - example: gbol - description: 'A unique 4-letter key to represent a platform in each integration. View [accounting](https://docs.codat.io/integrations/accounting/overview#platform-keys), [banking](https://docs.codat.io/integrations/banking/overview#platform-keys), and [commerce](https://docs.codat.io/integrations/commerce/overview#platform-keys) platform keys.' + $ref: '#/components/parameters/platformKey/schema' responses: '200': description: OK @@ -830,455 +916,30 @@ paths: content: application/json: schema: - title: Update connection - x-internal: true - type: object - properties: - status: - $ref: '#/components/schemas/Connection/definitions/dataConnectionStatus' - description: The current authorization status of the data connection. - nullable: true - additionalProperties: false + $ref: '#/components/schemas/UpdateConnectionStatus' examples: Example: value: status: Unlinked description: '' - '/companies/{companyId}/connections/{connectionId}/data/bankAccounts': + '/companies/{companyId}/connections/{connectionId}/authorization': parameters: - $ref: '#/components/parameters/companyId' - $ref: '#/components/parameters/connectionId' - get: - x-internal: true + put: + summary: Update authorization + operationId: update-connection-authorization + x-speakeasy-name-override: update-authorization + description: Update data connection's authorization. tags: - - Bank accounts - summary: List bank accounts - operationId: list-bank-accounts - parameters: - - $ref: '#/components/parameters/page' - - $ref: '#/components/parameters/pageSize' - - $ref: '#/components/parameters/query' - - $ref: '#/components/parameters/orderBy' + - Connections responses: '200': - description: Success + description: OK content: application/json: schema: - $ref: '#/components/schemas/BankAccounts' - 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: - 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' + $ref: '#/components/schemas/Connection' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -1287,859 +948,43 @@ 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 *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': - parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' + requestBody: + content: + application/json: + schema: + type: object + additionalProperties: + type: string + description: '' + '/companies/{companyId}/accessToken': get: - summary: Get create/update bank account model - x-internal: true + 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." + parameters: + - $ref: '#/components/parameters/companyId' tags: - - Bank accounts + - Companies responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/PushOption' + $ref: '#/components/schemas/CompanyAccessToken' 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 - 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 - FreeAgent: - 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 - sortCode: - type: String - displayName: Sort Code - description: The sort code for the bank account - required: false - validation: - warnings: - - field: SortCode - details: Must have a length between 0 and 8 characters - information: [] - accountNumber: - type: String - displayName: Account Number - description: The account number for the bank account - required: false - iBan: - type: String - displayName: IBAN - description: The international bank account number of the account. Often used when making or receiving international payments - required: false - currency: - type: String - displayName: Currency - description: The currency of the bank account - options: - - value: AED - type: String - displayName: AED - required: false - - value: AMD - type: String - displayName: AMD - required: false - - value: AOA - type: String - displayName: AOA - required: false - - value: ARS - type: String - displayName: ARS - required: false - - value: AUD - type: String - displayName: AUD - required: false - - value: AWG - type: String - displayName: AWG - required: false - - value: AZN - type: String - displayName: AZN - required: false - - value: BBD - type: String - displayName: BBD - required: false - - value: BDT - type: String - displayName: BDT - required: false - - value: BGN - type: String - displayName: BGN - required: false - - value: BRL - type: String - displayName: BRL - required: false - - value: BWP - type: String - displayName: BWP - required: false - - value: CAD - type: String - displayName: CAD - required: false - - value: CHF - type: String - displayName: CHF - required: false - - value: CLP - type: String - displayName: CLP - required: false - - value: CNY - type: String - displayName: CNY - required: false - - value: COP - type: String - displayName: COP - required: false - - value: CRC - type: String - displayName: CRC - required: false - - value: CUC - type: String - displayName: CUC - required: false - - value: CUP - type: String - displayName: CUP - required: false - - value: CZK - type: String - displayName: CZK - required: false - - value: DKK - type: String - displayName: DKK - required: false - - value: DOP - type: String - displayName: DOP - required: false - - value: EGP - type: String - displayName: EGP - required: false - - value: EUR - type: String - displayName: EUR - required: false - - value: FJD - type: String - displayName: FJD - required: false - - value: GBP - type: String - displayName: GBP - required: false - - value: GEL - type: String - displayName: GEL - required: false - - value: GHS - type: String - displayName: GHS - required: false - - value: GTQ - type: String - displayName: GTQ - required: false - - value: GYD - type: String - displayName: GYD - required: false - - value: HKD - type: String - displayName: HKD - required: false - - value: HNL - type: String - displayName: HNL - required: false - - value: HRK - type: String - displayName: HRK - required: false - - value: HUF - type: String - displayName: HUF - required: false - - value: IDR - type: String - displayName: IDR - required: false - - value: ILS - type: String - displayName: ILS - required: false - - value: INR - type: String - displayName: INR - required: false - - value: ISK - type: String - displayName: ISK - required: false - - value: JMD - type: String - displayName: JMD - required: false - - value: JPY - type: String - displayName: JPY - required: false - - value: KES - type: String - displayName: KES - required: false - - value: KRW - type: String - displayName: KRW - required: false - - value: KWD - type: String - displayName: KWD - required: false - - value: KYD - type: String - displayName: KYD - required: false - - value: KZT - type: String - displayName: KZT - required: false - - value: LAK - type: String - displayName: LAK - required: false - - value: LBP - type: String - displayName: LBP - required: false - - value: LKR - type: String - displayName: LKR - required: false - - value: LTL - type: String - displayName: LTL - required: false - - value: LVL - type: String - displayName: LVL - required: false - - value: MAD - type: String - displayName: MAD - required: false - - value: MDL - type: String - displayName: MDL - required: false - - value: MGA - type: String - displayName: MGA - required: false - - value: MUR - type: String - displayName: MUR - required: false - - value: MVR - type: String - displayName: MVR - required: false - - value: MWK - type: String - displayName: MWK - required: false - - value: MXN - type: String - displayName: MXN - required: false - - value: MYR - type: String - displayName: MYR - required: false - - value: MZN - type: String - displayName: MZN - required: false - - value: NAD - type: String - displayName: NAD - required: false - - value: NGN - type: String - displayName: NGN - required: false - - value: NOK - type: String - displayName: NOK - required: false - - value: NPR - type: String - displayName: NPR - required: false - - value: NZD - type: String - displayName: NZD - required: false - - value: OMR - type: String - displayName: OMR - required: false - - value: PEN - type: String - displayName: PEN - required: false - - value: PHP - type: String - displayName: PHP - required: false - - value: PKR - type: String - displayName: PKR - required: false - - value: PLN - type: String - displayName: PLN - required: false - - value: QAR - type: String - displayName: QAR - required: false - - value: RON - type: String - displayName: RON - required: false - - value: RSD - type: String - displayName: RSD - required: false - - value: RUB - type: String - displayName: RUB - required: false - - value: RWF - type: String - displayName: RWF - required: false - - value: SAR - type: String - displayName: SAR - required: false - - value: SCR - type: String - displayName: SCR - required: false - - value: SEK - type: String - displayName: SEK - required: false - - value: SGD - type: String - displayName: SGD - required: false - - value: THB - type: String - displayName: THB - required: false - - value: TND - type: String - displayName: TND - required: false - - value: TRY - type: String - displayName: TRY - required: false - - value: TTD - type: String - displayName: TTD - required: false - - value: TWD - type: String - displayName: TWD - required: false - - value: TZS - type: String - displayName: TZS - required: false - - value: UAH - type: String - displayName: UAH - required: false - - value: UGX - type: String - displayName: UGX - required: false - - value: USD - type: String - displayName: USD - required: false - - value: UYU - type: String - displayName: UYU - required: false - - value: VEF - type: String - displayName: VEF - required: false - - value: VND - type: String - displayName: VND - required: false - - value: VUV - type: String - displayName: VUV - required: false - - value: XAF - type: String - displayName: XAF - required: false - - value: XCD - type: String - displayName: XCD - required: false - - value: XOF - type: String - displayName: XOF - required: false - - value: ZAR - type: String - displayName: ZAR - required: false - - value: ZMK - type: String - displayName: ZMK - required: false - required: true - balance: - type: Number - displayName: Balance - description: The balance of the bank account - required: false - validation: - warnings: [] - information: - - field: Balance - details: 'The opening balance, in the account currency' - institution: - type: String - displayName: Institution - description: The institution of the bank account - required: false - required: true - KashFlow: - value: - type: Object - displayName: Bank Account - description: An account that bank transactions may be recorded against - properties: - accountName: - type: String - displayName: Account Name - description: Name of the bank account as it appears in Kashflow. - required: true - balance: - type: Number - displayName: Balance - description: 'The opening balance, in the account currency.' - required: false - currency: - type: String - displayName: Currency - description: The currency of the bank account. - required: true - required: true - QuickBooks Desktop: - value: - type: Object - displayName: Bank Account - description: An account that bank transactions may be recorded against - 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: [] - accountName: - type: String - displayName: Name - description: The name of the bank account in the originating system - required: true - validation: - warnings: - - field: AccountName - details: Max length of 31 characters. - information: [] - currency: - type: String - displayName: Currency - description: The currency of the bank 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' - balance: - type: Number - displayName: Balance - description: The balance of the bank account - required: false - required: true - QuickBooks Online Sandbox: - value: - type: Object - displayName: Bank Account - description: An account that bank transactions may be recorded against - properties: - accountName: - type: String - displayName: Account Name - description: Name of account as it appears in the chart of accounts or general ledger. - required: true - accountNumber: - type: String - displayName: Account Number - description: User-defined account number to help the user in identifying the account within the chart-of-accounts and in deciding what should be posted to the account. - required: true - currency: - type: String - displayName: Currency - description: Currency of the bank account. - required: true - required: true - Sage Business Cloud Accounting: - 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: Must be provided. - - field: AccountName - details: Should not be longer than 50 characters. - currency: - type: String - displayName: Currency - description: The currency of the bank account - required: true - validation: - warnings: [] - information: - - field: Currency - details: Must be provided. - - field: Currency - details: Must match the company's base currency. - sortCode: - type: String - displayName: Sort Code - description: The sort code for the bank account - required: false - validation: - warnings: [] - information: - - field: SortCode - details: Should be a 6 digit number. - accountNumber: - type: String - displayName: Account Number - description: The account number for the bank account - required: false - validation: - warnings: [] - information: - - field: AccountNumber - details: Should not be longer than 25 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 - validation: - warnings: [] - information: - - field: IBan - details: Should be in the international bank account number format. - 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: Should be a number between 1 and 99999999. - required: true - Sandbox: + Simple company: 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 - accountType: - type: String - displayName: Account Type - description: The type of account - required: true - nominalCode: - type: String - displayName: Nominal Code - description: The external reference given to each nominal account for a business - required: true - sortCode: - type: String - displayName: Sort Code - description: The sort code for the bank account - required: true - accountNumber: - type: String - displayName: Account Number - description: The account number for the bank account - required: true - iBan: - type: String - displayName: IBAN - description: The international bank account number of the account. Often used when making or receiving international payments - required: true - currency: - type: String - displayName: Currency - description: The currency of the bank account - required: true - balance: - type: Number - displayName: Balance - description: The balance of the bank account - required: true - availableBalance: - type: Number - displayName: Available Balance - description: The available balance of the bank account - required: true - overdraftLimit: - type: Number - displayName: Overdraft Limit - description: The pre-arranged overdraft limit of the account - required: true - institution: - type: String - displayName: Institution - description: The institution of the bank account - 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 + expiresIn: 86400 + accessToken: string + tokenType: Bearer '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2154,35 +999,37 @@ 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/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': + '/companies/{companyId}/syncSettings': parameters: - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - post: - x-internal: true + get: + summary: Get company sync settings 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: {} + - Companies + operationId: get-company-syncSettings + x-speakeasy-name-override: get-company-sync-settings + description: 'Retrieve the [sync settings](https://docs.codat.io/knowledge-base/advanced-sync-settings) for a specific company. This includes how often data types should be queued to be updated, and how much history should be fetched.' responses: '200': - description: Success + description: OK content: application/json: schema: - $ref: '#/components/schemas/BankAccounts/allOf/0/properties/results/items/definitions/bankAccountCreateResponse' - examples: {} - '400': - $ref: '#/components/responses/BadRequest' + $ref: '#/components/schemas/CompanySyncSettings' + examples: + Example: + value: + companyId: 8a210b68-6988-11ed-a1eb-0242ac120002 + settings: + - dataType: invoices + fetchOnFirstLink: true + syncSchedule: 24 + syncOrder: 0 + syncFromUtc: '2020-01-01T12:00:00.000Z' + syncFromWindow: 24 + monthsToSync: 24 + isLocked: true + overridesDefaults: true '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2197,58 +1044,18 @@ paths: $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: + summary: Set company sync settings + description: Set the sync settings for a specific company. 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' + - Companies + operationId: set-company-syncSettings + x-speakeasy-name-override: set-company-sync-settings 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' + '204': + description: No Content '400': - $ref: '#/components/responses/BadRequest' + $ref: '#/components/responses/Bad-Request' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2257,84 +1064,65 @@ paths: $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' + allOf: + - properties: + companyId: + type: string + format: uuid + example: 8a210b68-6988-11ed-a1eb-0242ac120002 + description: Unique identifier for your SMB in Codat. + settings: + type: array + items: + $ref: '#/components/schemas/SyncSetting' + overridesDefaults: + type: boolean + default: true + description: 'Set to `True` if you want to override default [sync settings](https://docs.codat.io/knowledge-base/advanced-sync-settings).' + required: + - companyId + - settings + - overridesDefaults + type: object + description: |- + Include a `syncSetting` object for each data type. + `syncFromWindow`, `syncFromUTC` & `monthsToSync` only need to be included if you wish to set a value for them. + '/companies/{companyId}/connectionManagement/accessToken': + parameters: + - $ref: '#/components/parameters/companyId' + get: + summary: Get access token (old) + operationId: get-connection-management-access-token + deprecated: true + x-speakeasy-deprecation-message: | + The endpoint for generating company-specific connection management access tokens has been deprecated. + Codat now supports a global company access token, providing seamless access across multiple products. + Update your integration to use the global token for improved efficiency and consistency. + x-speakeasy-deprecation-replacement: get-company-access-token + tags: + - Connection management + description: "\uFEFF\x54\x68\x65\x20\x6E\x65\x77\x20\x5B\x47\x65\x74\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x6B\x65\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\x70\x6C\x61\x74\x66\x6F\x72\x6D\x2D\x61\x70\x69\x23\x2F\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E\x73\x2F\x67\x65\x74\x2D\x63\x6F\x6D\x70\x61\x6E\x79\x2D\x61\x63\x63\x65\x73\x73\x2D\x74\x6F\x6B\x65\x6E\x29\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x72\x65\x70\x6C\x61\x63\x65\x73\x20\x74\x68\x69\x73\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x61\x6E\x64\x20\x69\x6E\x63\x6C\x75\x64\x65\x73\x20\x61\x64\x64\x69\x74\x69\x6F\x6E\x61\x6C\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x61\x6C\x69\x74\x79\x2E" responses: '200': description: Success content: application/json: schema: - oneOf: - - $ref: '#/components/schemas/SourceAccountV2' - - $ref: '#/components/schemas/SourceAccount' - examples: {} - '400': - $ref: '#/components/responses/BadRequest' + $ref: '#/components/schemas/ConnectionManagementAccessToken' + examples: + Access token: + value: + accessToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2349,22 +1137,22 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' + /connectionManagement/corsSettings: get: + summary: Get CORS settings (old) + operationId: get-connection-management-cors-settings + x-speakeasy-group: cors + deprecated: true + x-speakeasy-deprecation-message: | + The new [Get CORS settings](https://docs.codat.io/platform-api#/operations/get-cors-settings) endpoint replaces this endpoint and includes additional functionality. + Update your integrations to use the new path `/corsSettings` as the existing route will be removed in a future release. + x-speakeasy-deprecation-replacement: get-cors-settings 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 + - Settings + description: "\uFEFF\x54\x68\x65\x20\x2A\x47\x65\x74\x20\x43\x4F\x52\x53\x20\x73\x65\x74\x74\x69\x6E\x67\x73\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x72\x65\x74\x75\x72\x6E\x73\x20\x74\x68\x65\x20\x61\x6C\x6C\x6F\x77\x65\x64\x20\x6F\x72\x69\x67\x69\x6E\x73\x20\x28\x69\x2E\x65\x2E\x20\x79\x6F\x75\x72\x20\x64\x6F\x6D\x61\x69\x6E\x73\x29\x20\x79\x6F\x75\x20\x77\x61\x6E\x74\x20\x74\x6F\x20\x61\x6C\x6C\x6F\x77\x20\x63\x72\x6F\x73\x73\x2D\x6F\x72\x69\x67\x69\x6E\x20\x72\x65\x73\x6F\x75\x72\x63\x65\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x28\x5B\x43\x4F\x52\x53\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x65\x6E\x2E\x77\x69\x6B\x69\x70\x65\x64\x69\x61\x2E\x6F\x72\x67\x2F\x77\x69\x6B\x69\x2F\x43\x72\x6F\x73\x73\x2D\x6F\x72\x69\x67\x69\x6E\x5F\x72\x65\x73\x6F\x75\x72\x63\x65\x5F\x73\x68\x61\x72\x69\x6E\x67\x29\x29\x20\x77\x69\x74\x68\x20\x43\x6F\x64\x61\x74\x2E\x20\n\n\x45\x6E\x61\x62\x6C\x69\x6E\x67\x20\x43\x4F\x52\x53\x20\x77\x69\x74\x68\x20\x43\x6F\x64\x61\x74\x20\x69\x73\x20\x72\x65\x71\x75\x69\x72\x65\x64\x20\x62\x79\x20\x6F\x75\x72\x20\x65\x6D\x62\x65\x64\x64\x61\x62\x6C\x65\x20\x55\x49\x73\x20\x28\x73\x75\x63\x68\x20\x61\x73\x20\x5B\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x53\x44\x4B\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\x70\x74\x69\x6D\x69\x7A\x65\x2F\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x2D\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x29\x20\x61\x6E\x64\x20\x5B\x4C\x69\x6E\x6B\x20\x53\x44\x4B\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\x61\x75\x74\x68\x6F\x72\x69\x7A\x65\x2D\x65\x6D\x62\x65\x64\x64\x65\x64\x2D\x6C\x69\x6E\x6B\x29\x29\x20\x74\x6F\x20\x61\x63\x63\x65\x73\x73\x20\x43\x6F\x64\x61\x74\x27\x73\x20\x41\x50\x49\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x73\x2E" responses: '200': - description: Success - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/SourceAccountV2/definitions/sourceAccounts' - - $ref: '#/components/schemas/SourceAccount/definitions/sourceAccounts' - examples: {} + $ref: '#/components/responses/ConnectionManagementAllowedOrigins' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2379,34 +1167,30 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/{accountId}': - patch: + post: + summary: Set CORS settings (old) + operationId: set-connection-management-cors-settings + x-speakeasy-name-override: set + x-speakeasy-group: cors + deprecated: true + x-speakeasy-deprecation-message: | + The new [Set CORS settings](https://docs.codat.io/platform-api#/operations/set-cors-settings) endpoint replaces this endpoint and includes additional functionality. + Update your integrations to use the new path `/corsSettings` as the existing route will be removed in a future release. + x-speakeasy-deprecation-replacement: set-cors-settings 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' + - Settings + description: "\uFEFF\x54\x68\x65\x20\x2A\x53\x65\x74\x20\x43\x4F\x52\x53\x20\x73\x65\x74\x74\x69\x6E\x67\x73\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x61\x6C\x6C\x6F\x77\x73\x20\x79\x6F\x75\x20\x74\x6F\x20\x72\x65\x67\x69\x73\x74\x65\x72\x20\x61\x6C\x6C\x6F\x77\x65\x64\x20\x6F\x72\x69\x67\x69\x6E\x73\x20\x28\x69\x2E\x65\x2E\x20\x79\x6F\x75\x72\x20\x64\x6F\x6D\x61\x69\x6E\x73\x29\x20\x66\x6F\x72\x20\x75\x73\x65\x20\x69\x6E\x20\x63\x72\x6F\x73\x73\x2D\x6F\x72\x69\x67\x69\x6E\x20\x72\x65\x73\x6F\x75\x72\x63\x65\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x28\x5B\x43\x4F\x52\x53\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x65\x6E\x2E\x77\x69\x6B\x69\x70\x65\x64\x69\x61\x2E\x6F\x72\x67\x2F\x77\x69\x6B\x69\x2F\x43\x72\x6F\x73\x73\x2D\x6F\x72\x69\x67\x69\x6E\x5F\x72\x65\x73\x6F\x75\x72\x63\x65\x5F\x73\x68\x61\x72\x69\x6E\x67\x29\x29\x2E\n\x20\n\x45\x6E\x61\x62\x6C\x69\x6E\x67\x20\x43\x4F\x52\x53\x20\x77\x69\x74\x68\x20\x43\x6F\x64\x61\x74\x20\x69\x73\x20\x72\x65\x71\x75\x69\x72\x65\x64\x20\x62\x79\x20\x6F\x75\x72\x20\x65\x6D\x62\x65\x64\x64\x61\x62\x6C\x65\x20\x55\x49\x73\x20\x28\x73\x75\x63\x68\x20\x61\x73\x20\x5B\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x53\x44\x4B\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\x70\x74\x69\x6D\x69\x7A\x65\x2F\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x2D\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x29\x20\x61\x6E\x64\x20\x5B\x4C\x69\x6E\x6B\x20\x53\x44\x4B\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\x61\x75\x74\x68\x6F\x72\x69\x7A\x65\x2D\x65\x6D\x62\x65\x64\x64\x65\x64\x2D\x6C\x69\x6E\x6B\x29\x29\x20\x74\x6F\x20\x61\x63\x63\x65\x73\x73\x20\x43\x6F\x64\x61\x74\x27\x73\x20\x41\x50\x49\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x73\x2E\x20" requestBody: content: application/json: schema: - $ref: '#/components/schemas/SourceAccount' - examples: {} + $ref: '#/components/schemas/ConnectionManagementAllowedOrigins' + examples: + Allowed origins: + $ref: '#/components/examples/connectionManagementAllowedOriginsResponse' responses: '200': - description: Success - content: - application/json: - x-speakeasy-usage-example: true - schema: - $ref: '#/components/schemas/SourceAccount' - examples: {} - '400': - $ref: '#/components/responses/BadRequest' + $ref: '#/components/responses/ConnectionManagementAllowedOrigins' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2421,22 +1205,16 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - delete: + /corsSettings: + get: + summary: Get CORS settings + operationId: get-cors-settings 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' + - Settings + description: "\uFEFF\x54\x68\x65\x20\x2A\x47\x65\x74\x20\x43\x4F\x52\x53\x20\x73\x65\x74\x74\x69\x6E\x67\x73\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x72\x65\x74\x75\x72\x6E\x73\x20\x74\x68\x65\x20\x61\x6C\x6C\x6F\x77\x65\x64\x20\x6F\x72\x69\x67\x69\x6E\x73\x20\x28\x69\x2E\x65\x2E\x20\x79\x6F\x75\x72\x20\x64\x6F\x6D\x61\x69\x6E\x73\x29\x20\x79\x6F\x75\x20\x77\x61\x6E\x74\x20\x74\x6F\x20\x61\x6C\x6C\x6F\x77\x20\x63\x72\x6F\x73\x73\x2D\x6F\x72\x69\x67\x69\x6E\x20\x72\x65\x73\x6F\x75\x72\x63\x65\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x28\x5B\x43\x4F\x52\x53\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x65\x6E\x2E\x77\x69\x6B\x69\x70\x65\x64\x69\x61\x2E\x6F\x72\x67\x2F\x77\x69\x6B\x69\x2F\x43\x72\x6F\x73\x73\x2D\x6F\x72\x69\x67\x69\x6E\x5F\x72\x65\x73\x6F\x75\x72\x63\x65\x5F\x73\x68\x61\x72\x69\x6E\x67\x29\x29\x20\x77\x69\x74\x68\x20\x43\x6F\x64\x61\x74\x2E\x20\n\n\x45\x6E\x61\x62\x6C\x69\x6E\x67\x20\x43\x4F\x52\x53\x20\x77\x69\x74\x68\x20\x43\x6F\x64\x61\x74\x20\x69\x73\x20\x72\x65\x71\x75\x69\x72\x65\x64\x20\x62\x79\x20\x6F\x75\x72\x20\x65\x6D\x62\x65\x64\x64\x61\x62\x6C\x65\x20\x55\x49\x73\x20\x28\x73\x75\x63\x68\x20\x61\x73\x20\x5B\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x53\x44\x4B\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\x70\x74\x69\x6D\x69\x7A\x65\x2F\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x2D\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x29\x20\x61\x6E\x64\x20\x5B\x4C\x69\x6E\x6B\x20\x53\x44\x4B\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\x61\x75\x74\x68\x6F\x72\x69\x7A\x65\x2D\x65\x6D\x62\x65\x64\x64\x65\x64\x2D\x6C\x69\x6E\x6B\x29\x29\x20\x74\x6F\x20\x61\x63\x63\x65\x73\x73\x20\x43\x6F\x64\x61\x74\x27\x73\x20\x41\x50\x49\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x73\x2E" responses: - '204': - description: No Content + '200': + $ref: '#/components/responses/ConnectionManagementAllowedOrigins' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2451,27 +1229,24 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/credentials': post: + summary: Set CORS settings + operationId: set-cors-settings + x-speakeasy-name-override: set 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 - parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' + - Settings + description: "\uFEFF\x54\x68\x65\x20\x2A\x53\x65\x74\x20\x43\x4F\x52\x53\x20\x73\x65\x74\x74\x69\x6E\x67\x73\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x61\x6C\x6C\x6F\x77\x73\x20\x79\x6F\x75\x20\x74\x6F\x20\x72\x65\x67\x69\x73\x74\x65\x72\x20\x61\x6C\x6C\x6F\x77\x65\x64\x20\x6F\x72\x69\x67\x69\x6E\x73\x20\x28\x69\x2E\x65\x2E\x20\x79\x6F\x75\x72\x20\x64\x6F\x6D\x61\x69\x6E\x73\x29\x20\x66\x6F\x72\x20\x75\x73\x65\x20\x69\x6E\x20\x63\x72\x6F\x73\x73\x2D\x6F\x72\x69\x67\x69\x6E\x20\x72\x65\x73\x6F\x75\x72\x63\x65\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x28\x5B\x43\x4F\x52\x53\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x65\x6E\x2E\x77\x69\x6B\x69\x70\x65\x64\x69\x61\x2E\x6F\x72\x67\x2F\x77\x69\x6B\x69\x2F\x43\x72\x6F\x73\x73\x2D\x6F\x72\x69\x67\x69\x6E\x5F\x72\x65\x73\x6F\x75\x72\x63\x65\x5F\x73\x68\x61\x72\x69\x6E\x67\x29\x29\x2E\n\x20\n\x45\x6E\x61\x62\x6C\x69\x6E\x67\x20\x43\x4F\x52\x53\x20\x77\x69\x74\x68\x20\x43\x6F\x64\x61\x74\x20\x69\x73\x20\x72\x65\x71\x75\x69\x72\x65\x64\x20\x62\x79\x20\x6F\x75\x72\x20\x65\x6D\x62\x65\x64\x64\x61\x62\x6C\x65\x20\x55\x49\x73\x20\x28\x73\x75\x63\x68\x20\x61\x73\x20\x5B\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x53\x44\x4B\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\x70\x74\x69\x6D\x69\x7A\x65\x2F\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x2D\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x29\x20\x61\x6E\x64\x20\x5B\x4C\x69\x6E\x6B\x20\x53\x44\x4B\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\x61\x75\x74\x68\x6F\x72\x69\x7A\x65\x2D\x65\x6D\x62\x65\x64\x64\x65\x64\x2D\x6C\x69\x6E\x6B\x29\x29\x20\x74\x6F\x20\x61\x63\x63\x65\x73\x73\x20\x43\x6F\x64\x61\x74\x27\x73\x20\x41\x50\x49\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x73\x2E" requestBody: - required: true content: - application/json: {} + application/json: + schema: + $ref: '#/components/schemas/ConnectionManagementAllowedOrigins' + examples: + Allowed origins: + $ref: '#/components/examples/connectionManagementAllowedOriginsResponse' responses: '200': - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/BankAccountCredentials' + $ref: '#/components/responses/ConnectionManagementAllowedOrigins' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2486,22 +1261,18 @@ paths: $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' + '/companies/{companyId}/data/all': + parameters: + - $ref: '#/components/parameters/companyId' + post: + summary: Refresh all data + operationId: refresh-company-data + x-speakeasy-name-override: all responses: '204': description: No Content + '400': + $ref: '#/components/responses/Malformed-Query' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2516,45 +1287,44 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/bankFeedAccounts/mapping': + 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: + - Refresh data + '/companies/{companyId}/data/queue/{dataType}': parameters: - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - 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 + - $ref: '#/components/parameters/dataType' + post: + summary: Refresh data type + operationId: refresh-data-type + x-speakeasy-name-override: by-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: + - Refresh 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: Success + description: OK 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/PullOperation' + '400': + $ref: '#/components/responses/Malformed-Query' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2569,32 +1339,283 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - post: + '/companies/{companyId}/dataStatus': + parameters: + - $ref: '#/components/parameters/companyId' + get: + summary: Get data status + operationId: get-company-data-status + description: Get the state of each data type for a company 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 + - Refresh data responses: '200': - description: Success + description: OK content: application/json: schema: - $ref: '#/components/schemas/BankFeedAccountMappingResponse' - examples: {} - '400': - $ref: '#/components/responses/BadRequest' + $ref: '#/components/schemas/DataStatuses' + 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': @@ -2609,37 +1630,47 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/bankFeeds/info': + '/companies/{companyId}/data/history': 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 + summary: List pull operations tags: - - Company information + - Refresh data + operationId: list-pull-operations + x-speakeasy-name-override: list-pull-operations responses: '200': - description: Success + description: OK content: application/json: schema: - $ref: '#/components/schemas/CompanyInformation' - examples: {} + $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/BadRequest' + $ref: '#/components/responses/Malformed-Query' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2654,31 +1685,30 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/bankFeeds/otp': + 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' - - $ref: '#/components/parameters/connectionId' - post: + - $ref: '#/components/parameters/datasetId' + get: + summary: Get pull operation + operationId: get-pull-operation + x-speakeasy-name-override: get-pull-operation 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 + - Refresh data responses: '200': - description: Success + description: OK content: application/json: schema: - $ref: '#/components/schemas/GenerateOtpResponse' + $ref: '#/components/schemas/PullOperation' examples: {} - '400': - $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2693,139 +1723,125 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/push/bankAccounts/{accountId}/bankTransactions': + description: Retrieve information about a single dataset or pull operation. + /webhooks: + get: + summary: List webhook consumers + operationId: list-webhook-consumers + x-speakeasy-name-override: list-consumers + description: "\uFEFF\x55\x73\x65\x20\x74\x68\x65\x20\x2A\x4C\x69\x73\x74\x20\x77\x65\x62\x68\x6F\x6F\x6B\x20\x63\x6F\x6E\x73\x75\x6D\x65\x72\x73\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x74\x6F\x20\x72\x65\x74\x75\x72\x6E\x20\x61\x20\x6C\x69\x73\x74\x20\x6F\x66\x20\x61\x6C\x6C\x20\x77\x65\x62\x68\x6F\x6F\x6B\x20\x63\x6F\x6E\x73\x75\x6D\x65\x72\x73\x20\x74\x68\x61\x74\x20\x63\x75\x72\x72\x65\x6E\x74\x6C\x79\x20\x65\x78\x69\x73\x74\x20\x66\x6F\x72\x20\x79\x6F\x75\x72\x20\x63\x6C\x69\x65\x6E\x74\x2E\n\n\x5B\x57\x65\x62\x68\x6F\x6F\x6B\x20\x63\x6F\x6E\x73\x75\x6D\x65\x72\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x70\x6C\x61\x74\x66\x6F\x72\x6D\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x57\x65\x62\x68\x6F\x6F\x6B\x43\x6F\x6E\x73\x75\x6D\x65\x72\x29\x20\x69\x73\x20\x61\x6E\x20\x48\x54\x54\x50\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x74\x68\x61\x74\x20\x79\x6F\x75\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x20\x74\x6F\x20\x73\x75\x62\x73\x63\x72\x69\x62\x65\x20\x74\x6F\x20\x73\x70\x65\x63\x69\x66\x69\x63\x20\x65\x76\x65\x6E\x74\x73\x2E\x20\x53\x65\x65\x20\x6F\x75\x72\x20\x64\x6F\x63\x75\x6D\x65\x6E\x74\x61\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x6D\x6F\x72\x65\x20\x64\x65\x74\x61\x69\x6C\x73\x20\x6F\x6E\x20\x5B\x43\x6F\x64\x61\x74\x27\x73\x20\x77\x65\x62\x68\x6F\x6F\x6B\x20\x73\x65\x72\x76\x69\x63\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\x77\x65\x62\x68\x6F\x6F\x6B\x73\x2F\x6F\x76\x65\x72\x76\x69\x65\x77\x29\x2E" + tags: + - Webhooks + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookConsumer/definitions/webhookConsumers' + examples: + Webhook consumers: + value: + results: + - id: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 + url: 'https://example.com/webhoook-consumers/sync-complete' + eventTypes: + - DataSyncCompleted + disabled: false + - id: ca3cac86-7925-4759-abc2-96405780fdfa + url: 'https://example.com/webhoook-consumers/dataset-changed' + eventTypes: + - DatasetDataChanged + disabled: true + '400': + $ref: '#/components/responses/Bad-Request' + '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' post: + summary: Create webhook consumer + operationId: create-webhook-consumer + x-speakeasy-name-override: create-consumer + description: "\uFEFF\x55\x73\x65\x20\x74\x68\x65\x20\x2A\x43\x72\x65\x61\x74\x65\x20\x77\x65\x62\x68\x6F\x6F\x6B\x20\x63\x6F\x6E\x73\x75\x6D\x65\x72\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\x77\x65\x62\x68\x6F\x6F\x6B\x20\x63\x6F\x6E\x73\x75\x6D\x65\x72\x20\x74\x68\x61\x74\x20\x77\x69\x6C\x6C\x20\x6C\x69\x73\x74\x65\x6E\x20\x74\x6F\x20\x6D\x65\x73\x73\x61\x67\x65\x73\x20\x77\x65\x20\x73\x65\x6E\x64\x20\x79\x6F\x75\x2E\n\n\x5B\x57\x65\x62\x68\x6F\x6F\x6B\x20\x63\x6F\x6E\x73\x75\x6D\x65\x72\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x70\x6C\x61\x74\x66\x6F\x72\x6D\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x57\x65\x62\x68\x6F\x6F\x6B\x43\x6F\x6E\x73\x75\x6D\x65\x72\x29\x20\x69\x73\x20\x61\x6E\x20\x48\x54\x54\x50\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x74\x68\x61\x74\x20\x79\x6F\x75\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x20\x74\x6F\x20\x73\x75\x62\x73\x63\x72\x69\x62\x65\x20\x74\x6F\x20\x73\x70\x65\x63\x69\x66\x69\x63\x20\x65\x76\x65\x6E\x74\x73\x2E\x20\x53\x65\x65\x20\x6F\x75\x72\x20\x64\x6F\x63\x75\x6D\x65\x6E\x74\x61\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x6D\x6F\x72\x65\x20\x64\x65\x74\x61\x69\x6C\x73\x20\x6F\x6E\x20\x5B\x43\x6F\x64\x61\x74\x27\x73\x20\x77\x65\x62\x68\x6F\x6F\x6B\x20\x73\x65\x72\x76\x69\x63\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\x77\x65\x62\x68\x6F\x6F\x6B\x73\x2F\x6F\x76\x65\x72\x76\x69\x65\x77\x29\x2E\n\n\x23\x23\x23\x20\x54\x69\x70\x73\x20\x61\x6E\x64\x20\x74\x72\x61\x70\x73\n\x2D\x20\x54\x68\x65\x20\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x20\x77\x65\x62\x68\x6F\x6F\x6B\x20\x63\x6F\x6E\x73\x75\x6D\x65\x72\x73\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x63\x72\x65\x61\x74\x65\x20\x69\x73\x20\x6C\x69\x6D\x69\x74\x65\x64\x20\x74\x6F\x20\x35\x30\x2E\x20\x49\x66\x20\x79\x6F\x75\x20\x68\x61\x76\x65\x20\x72\x65\x61\x63\x68\x65\x64\x20\x74\x68\x65\x20\x6D\x61\x78\x69\x6D\x75\x6D\x20\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x20\x63\x6F\x6E\x73\x75\x6D\x65\x72\x73\x2C\x20\x75\x73\x65\x20\x74\x68\x65\x20\x5B\x2A\x44\x65\x6C\x65\x74\x65\x20\x77\x65\x62\x68\x6F\x6F\x6B\x20\x63\x6F\x6E\x73\x75\x6D\x65\x72\x2A\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x70\x6C\x61\x74\x66\x6F\x72\x6D\x2D\x61\x70\x69\x23\x2F\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E\x73\x2F\x64\x65\x6C\x65\x74\x65\x2D\x77\x65\x62\x68\x6F\x6F\x6B\x2D\x63\x6F\x6E\x73\x75\x6D\x65\x72\x29\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x74\x6F\x20\x64\x65\x6C\x65\x74\x65\x20\x61\x6E\x20\x75\x6E\x75\x73\x65\x64\x20\x63\x6F\x6E\x73\x75\x6D\x65\x72\x20\x66\x69\x72\x73\x74\x2E" 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 - 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. + - Webhooks requestBody: content: application/json: schema: - $ref: '#/components/schemas/CreateBankTransactions' + $ref: '#/components/schemas/WebhookConsumer/definitions/webhookConsumerPrototype' 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: + Subscribe consumer to one or more event types: 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: + url: 'https://example.com/webhoook-consumer' + eventTypes: + - DataSyncCompleted + - Dataset data changed + Subscribe consumer with disabled endpoint: 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 + url: 'https://example.com/webhoook-consumer' + eventTypes: + - DataSyncCompleted + disabled: true responses: - '200': - description: Success + '201': + description: OK content: application/json: schema: - $ref: '#/components/schemas/CreateBankTransactionsResponse' + $ref: '#/components/schemas/WebhookConsumer' + examples: + Subscribe consumer to one or more event types: + value: + id: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 + url: 'https://example.com/webhoook-consumer' + eventTypes: + - DataSyncCompleted + - DatasetDataChanged + disabled: false + Subscribe consumer with disabled endpoint: + value: + id: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 + url: 'https://example.com/webhoook-consumer' + eventTypes: + - DataSyncCompleted + disabled: true '400': - $ref: '#/components/responses/BadRequest' + $ref: '#/components/responses/Bad-Request' + '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' + '/webhooks/{webhookId}': + parameters: + - $ref: '#/components/parameters/webhookId' + delete: + summary: Delete webhook consumer + operationId: delete-webhook-consumer + x-speakeasy-name-override: delete-consumer + description: "\uFEFF\x55\x73\x65\x20\x74\x68\x65\x20\x2A\x44\x65\x6C\x65\x74\x65\x20\x77\x65\x62\x68\x6F\x6F\x6B\x20\x63\x6F\x6E\x73\x75\x6D\x65\x72\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x74\x6F\x20\x64\x65\x6C\x65\x74\x65\x20\x61\x6E\x20\x65\x78\x69\x73\x74\x69\x6E\x67\x20\x77\x65\x62\x68\x6F\x6F\x6F\x6B\x20\x63\x6F\x6E\x73\x75\x6D\x65\x72\x2C\x20\x70\x72\x6F\x76\x69\x64\x69\x6E\x67\x20\x69\x74\x73\x20\x76\x61\x6C\x69\x64\x20\x60\x69\x64\x60\x20\x61\x73\x20\x61\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x2E\n\n\x5B\x57\x65\x62\x68\x6F\x6F\x6B\x20\x63\x6F\x6E\x73\x75\x6D\x65\x72\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x70\x6C\x61\x74\x66\x6F\x72\x6D\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x57\x65\x62\x68\x6F\x6F\x6B\x43\x6F\x6E\x73\x75\x6D\x65\x72\x29\x20\x69\x73\x20\x61\x6E\x20\x48\x54\x54\x50\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x74\x68\x61\x74\x20\x79\x6F\x75\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x20\x74\x6F\x20\x73\x75\x62\x73\x63\x72\x69\x62\x65\x20\x74\x6F\x20\x73\x70\x65\x63\x69\x66\x69\x63\x20\x65\x76\x65\x6E\x74\x73\x2E\x20\x53\x65\x65\x20\x6F\x75\x72\x20\x64\x6F\x63\x75\x6D\x65\x6E\x74\x61\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x6D\x6F\x72\x65\x20\x64\x65\x74\x61\x69\x6C\x73\x20\x6F\x6E\x20\x5B\x43\x6F\x64\x61\x74\x27\x73\x20\x77\x65\x62\x68\x6F\x6F\x6B\x20\x73\x65\x72\x76\x69\x63\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\x77\x65\x62\x68\x6F\x6F\x6B\x73\x2F\x6F\x76\x65\x72\x76\x69\x65\x77\x29\x2E" + tags: + - Webhooks + responses: + '204': + description: No content '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2840,115 +1856,86 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/options/bankAccounts/{accountId}/bankTransactions': - get: + /webhooks/integrationKeys/zapier: + post: + summary: Rotate Zapier key + operationId: rotate-zapier-key + x-speakeasy-ignore: true + description: "\uFEFF\x54\x68\x65\x20\x2A\x52\x6F\x74\x61\x74\x65\x20\x5A\x61\x70\x69\x65\x72\x20\x6B\x65\x79\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x72\x65\x74\x75\x72\x6E\x73\x20\x74\x68\x65\x20\x5A\x61\x70\x69\x65\x72\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x6B\x65\x79\x20\x6E\x65\x65\x64\x65\x64\x20\x74\x6F\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x20\x5A\x61\x70\x73\x20\x74\x72\x69\x67\x67\x65\x72\x65\x64\x20\x62\x79\x20\x43\x6F\x64\x61\x74\x27\x73\x20\x77\x65\x62\x68\x6F\x6F\x6B\x73\x2E\x20\n\n\x49\x66\x20\x61\x20\x6B\x65\x79\x20\x68\x61\x73\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x62\x65\x65\x6E\x20\x63\x72\x65\x61\x74\x65\x64\x2C\x20\x63\x61\x6C\x6C\x69\x6E\x67\x20\x74\x68\x69\x73\x20\x77\x69\x6C\x6C\x20\x72\x65\x76\x6F\x6B\x65\x20\x74\x68\x61\x74\x20\x65\x78\x69\x73\x74\x69\x6E\x67\x20\x6B\x65\x79\x2E\n\n\x54\x68\x65\x20\x6B\x65\x79\x20\x63\x68\x61\x6E\x67\x65\x73\x20\x65\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\x2E\x20\x49\x66\x20\x79\x6F\x75\x20\x61\x72\x65\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x75\x73\x69\x6E\x67\x20\x6F\x75\x72\x20\x5A\x61\x70\x69\x65\x72\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x61\x6E\x64\x20\x63\x61\x6C\x6C\x65\x64\x20\x74\x68\x69\x73\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x61\x67\x61\x69\x6E\x2C\x20\x79\x6F\x75\x20\x6E\x65\x65\x64\x20\x74\x6F\x20\x72\x65\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x20\x75\x73\x69\x6E\x67\x20\x74\x68\x65\x20\x6C\x61\x74\x65\x73\x74\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x6B\x65\x79\x20\x72\x65\x74\x75\x72\x6E\x65\x64\x20\x69\x6E\x20\x74\x68\x65\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\x2E\n\n\x4F\x75\x72\x20\x5A\x61\x70\x69\x65\x72\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x6D\x61\x6B\x65\x73\x20\x69\x74\x20\x73\x69\x6D\x70\x6C\x65\x20\x66\x6F\x72\x20\x79\x6F\x75\x20\x74\x6F\x20\x73\x65\x74\x20\x75\x70\x20\x61\x6E\x64\x20\x72\x65\x63\x65\x69\x76\x65\x20\x75\x73\x65\x72\x20\x6E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E\x73\x20\x69\x6E\x20\x79\x6F\x75\x72\x20\x70\x72\x65\x66\x65\x72\x72\x65\x64\x20\x77\x61\x79\x73\x2C\x20\x73\x75\x63\x68\x20\x61\x73\x20\x76\x69\x61\x20\x65\x6D\x61\x69\x6C\x20\x6F\x72\x20\x53\x6C\x61\x63\x6B\x2E\x20\x53\x65\x65\x20\x6F\x75\x72\x20\x5B\x5A\x61\x70\x69\x65\x72\x20\x64\x6F\x63\x75\x6D\x65\x6E\x74\x61\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\x75\x73\x69\x6E\x67\x2D\x74\x68\x65\x2D\x61\x70\x69\x2F\x77\x65\x62\x68\x6F\x6F\x6B\x73\x2F\x7A\x61\x70\x69\x65\x72\x2D\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x29\x20\x66\x6F\x72\x20\x64\x65\x74\x61\x69\x6C\x65\x64\x20\x69\x6E\x73\x74\x72\x75\x63\x74\x69\x6F\x6E\x73\x20\x6F\x6E\x20\x73\x65\x74\x74\x69\x6E\x67\x20\x75\x70\x20\x74\x68\x69\x73\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2E\n\n" 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. - - [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** - - 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' + - Webhooks responses: - '200': - description: Success + '201': + description: OK content: application/json: schema: - $ref: '#/components/schemas/PushOption' - examples: {} + $ref: '#/components/schemas/WebhookZapierKey' + examples: + Integration key: + value: + key: sk_integ_WM4dfoK1nKZnDE_kceze6hWDjbRwOZwG.us '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. + /integrations: get: - summary: Get create operation + summary: List integrations + description: List your available integrations 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. + - Integrations + operationId: list-integrations responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/PushOperation' - examples: {} + $ref: '#/components/schemas/Integrations' + '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': - 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 + '/integrations/{platformKey}': + parameters: + - $ref: '#/components/parameters/platformKey' + get: + summary: Get integration 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." + - Integrations + operationId: get-integration + description: 'Get single integration, by platformKey' responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/PushOperations' - examples: {} - '400': - $ref: '#/components/responses/Malformed-Query' + $ref: '#/components/schemas/Integration' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2963,37 +1950,23 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/bankFeedAccounts/{sourceAccountId}/managedBankFeeds/syncs/{syncId}': + '/integrations/{platformKey}/branding': 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/platformKey' get: + summary: Get branding 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." + - Integrations + operationId: get-integrations-branding + x-speakeasy-name-override: get-branding + description: Get branding for platform. responses: '200': - description: Success + description: OK content: application/json: schema: - $ref: '#/components/schemas/SyncStatusResult' + $ref: '#/components/schemas/Branding' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -3008,150 +1981,1240 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/bankFeedAccounts/{sourceAccountId}/managedBankFeeds/syncs/latest': - 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. + /profile: get: + summary: Get profile 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." + - Settings responses: '200': - description: Success + description: OK content: application/json: schema: - $ref: '#/components/schemas/SyncStatusResult' - '204': - description: No Content + $ref: '#/components/schemas/Profile' + 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}/bankFeedAccounts/{sourceAccountId}/managedBankFeeds/syncs': - 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: - 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. + operationId: get-profile + x-speakeasy-name-override: get-profile + description: Fetch your Codat profile. + put: + summary: Update profile + operationId: update-profile + x-speakeasy-name-override: update-profile responses: - '201': - description: Created + '200': + description: OK content: application/json: schema: - $ref: '#/components/schemas/StartScheduledSyncResult' - '400': - $ref: '#/components/responses/BadRequest' + $ref: '#/components/schemas/Profile' + examples: {} '401': $ref: '#/components/responses/Unauthorized' '402': $ref: '#/components/responses/Payment-Required' '403': $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' -webhooks: - client.rateLimit.reached: - post: - description: Called when your client’s request count to Codat's API surpasses the allocated quota. + tags: + - Settings + description: Update your Codat profile requestBody: content: application/json: schema: - $ref: '#/components/schemas/ClientRateLimitWebhook' - examples: - Reached: - value: - id: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b - eventType: client.rateLimit.reached - generatedDate: '2024-09-01T00:00:00Z' - payload: - dailyQuota: 12000 - quotaRemaining: 0 - expiryDate: '2024-09-01T12:14:14Z' + $ref: '#/components/schemas/Profile' + examples: {} + description: All fields should be included when updating your profile. + /profile/syncSettings: + get: + summary: Get sync settings + tags: + - Settings + operationId: get-profile-syncSettings + x-speakeasy-name-override: get-sync-settings + description: 'Retrieve the [sync settings](https://docs.codat.io/knowledge-base/advanced-sync-settings) for your client. This includes how often data types should be queued to be updated, and how much history should be fetched.' responses: '200': - description: Return a 200 status to indicate that the webhook was received successfully. - client.rateLimit.reset: - post: - 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/ClientRateLimitWebhook' - examples: - Reset: - value: - id: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b - eventType: client.rateLimit.reset - generatedDate: '2024-09-01T00:00:00Z' - payload: - dailyQuota: 12000 - quotaRemaining: 11993 - expiryDate: '2024-09-01T23:59:99Z' + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/SyncSettings' + examples: + Example: + value: + clientId: 367f7975-267b-439b-90c6-a6040ee680f3 + settings: + - dataType: invoices + fetchOnFirstLink: true + syncSchedule: 24 + syncOrder: 0 + syncFromUtc: '2020-01-01T12:00:00.000Z' + syncFromWindow: 24 + monthsToSync: 24 + isLocked: true + overridesDefaults: true + '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' + post: + summary: Update all sync settings + description: Update sync settings for all data types. + tags: + - Settings + operationId: update-profile-syncSettings + x-speakeasy-name-override: update-sync-settings + responses: + '204': + description: No Content + '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' + requestBody: + content: + application/json: + schema: + allOf: + - properties: + clientId: + $ref: '#/components/schemas/ClientId' + settings: + type: array + items: + $ref: '#/components/schemas/SyncSetting' + overridesDefaults: + type: boolean + default: true + description: 'Set to `True` if you want to override default [sync settings](https://docs.codat.io/knowledge-base/advanced-sync-settings).' + required: + - clientId + - settings + - overridesDefaults + type: object + description: |- + Include a `syncSetting` object for each data type. + `syncFromWindow`, `syncFromUTC` & `monthsToSync` only need to be included if you wish to set a value for them. + /apiKeys: + get: + summary: List API keys + description: |- + Use the *List API keys* endpoint to return a list of all API keys that currently exist for your client. This includes keys created via the Portal UI or the *Create API keys* endpoint. + + [API keys](https://docs.codat.io/platform-api#/schemas/apiKeys) are tokens used to control access to the API. Include this token in the `Authorization` header parameter when making API calls, following the word "Basic" and a space with your API key. + + You can [read more](https://docs.codat.io/using-the-api/authentication) about authentication at Codat and managing API keys via the Portal UI or API. + operationId: list-api-keys + x-speakeasy-name-override: list-api-keys + tags: + - Settings + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/ApiKeys' + examples: + Example: + value: + results: + - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 + apiKey: ztHQGvnC4XN2CgUhaDWEG4ySLUJqWjp7zkbZkGHd + createdDate: '2022-04-11T13:49:37Z' + - id: c438836a-61fe-443f-8a19-24cc18be21e4 + name: azure-invoice-finance-processor + apiKey: ztHQGvnC4XN2CgUhaDWEG4ySLUJqWjp7zkbZkGHd + createdDate: '2022-04-23T09:43:48Z' + '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' + post: + summary: Create API key + operationId: create-api-key + x-speakeasy-name-override: create-api-key + description: "Use the *Create API keys* endpoint to generate a new API key for your client.\n\n[API keys](https://docs.codat.io/platform-api#/schemas/apiKeys) are tokens used to control access to the API. Include this token in the `Authorization` header parameter when making API calls, following the word \"Basic\" and a space with your API key.\n\nYou can [read more](https://docs.codat.io/using-the-api/authentication) about authentication at Codat and managing API keys via the Portal UI or API.\n\n### Tips and pitfalls\n\n* Your first API key is created for you. Access this key via [Codat's Portal](https://app.codat.io/developers/api-keys).\n* If you require multiple API keys, perform multiple calls to the *Create API keys* endpoint. \n* The number of API keys is limited to 10. If you have reached the maximum amount of keys, use the *Delete API key* endpoint to delete an unused key first." + tags: + - Settings + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateApiKey' + examples: + Create API key with name: + value: + name: azure-invoice-finance-processor + responses: + '201': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/ApiKeyDetails' + examples: + API key details: + value: + id: 0498e921-9b53-4396-a412-4f2f5983b0a2 + apiKey: ztHQGvnC4XN2CgUhaDWEG4ySLUJqWjp7zkbZkGHd + createdDate: '2022-04-11T13:49:37Z' + API key details with name: + value: + id: 0498e921-9b53-4396-a412-4f2f5983b0a2 + name: azure-invoice-finance-processor + apiKey: ztHQGvnC4XN2CgUhaDWEG4ySLUJqWjp7zkbZkGHd + createdDate: '2022-04-11T13:49:37Z' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + examples: + Max length for name reached: + value: + statusCode: 400 + service: PublicApi + error: Max string length (50) for `name` reached. + correlationId: bc997528a9d7abb9161ef45f05d38599 + canBeRetried: Unknown + detailedErrorCode: 0 + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '409': + description: Conflict + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + examples: + Max length for name reached: + value: + statusCode: 400 + service: PublicApi + error: 'Maximum number of API keys reached. To create a new API key, delete an unused key and try again.' + correlationId: bc997528a9d7abb9161ef45f05d38599 + canBeRetried: Unknown + detailedErrorCode: 0 + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + '/apiKeys/{apiKeyId}': + delete: + summary: Delete API key + operationId: delete-api-key + x-speakeasy-name-override: delete-api-key + parameters: + - name: apiKeyId + in: path + required: true + schema: + type: string + example: 8a210b68-6988-11ed-a1eb-0242ac120002 + description: Unique identifier for api key. + description: |- + Use the *Delete API keys* endpoint to delete an existing API key, providing its valid `id` as a parameter. Note that this operation is not reversible. + + [API keys](https://docs.codat.io/platform-api#/schemas/apiKeys) are tokens used to control access to the API. Include this token in the `Authorization` header parameter when making API calls, following the word "Basic" and a space with your API key. + + You can [read more](https://docs.codat.io/using-the-api/authentication) about authentication at Codat and managing API keys via the Portal UI or API. + + ### Tips and pitfalls + + * It is possible to delete the last remaining API key. If this happens, a new key can be created via the [API key management page](https://app.codat.io/developers/api-keys) of the Portal. + * It is possible to delete the API key used to authenticate the *Delete API key* request. + tags: + - Settings + responses: + '204': + description: No Content + $ref: '#/components/responses/Too-Many-Requests' + '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}/sync/{datasetId}/validation': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/datasetId' + get: + summary: Get validation results + tags: + - Read data + operationId: get-read-validation-results + x-speakeasy-name-override: get-validation-results + description: |- + Use the **Get validation results** endpoint to review warnings and errors encountered during the data type validation phase. + + The validation result [schema](https://docs.codat.io/platform-api#/schemas/ValidationResult) contains two message arrays: + + - **`warnings`** array lists potential issues with the data type that may require attention but don't block usage. + - **`errors`** array contains critical issues that must be resolved before the data type can be used. + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationResult' + examples: + Validation result: + value: + errors: + - ruleId: accounting-bill-030 + itemId: fc2f2d1a-ff4d-40c6-a7fb-4bd7d04f4008 + message: A bill's lines summed (69.99) should be the same as TotalAmount (70.00). + validatorName: BillValidator + warnings: + - ruleId: accounting-bill-032 + itemId: 1d3979e5-7c28-432e-b562-04e9013c1ea0 + message: A bill's lines sub total amount summed (3201.20) should be the same as SubTotal (3201.25) + validatorName: BillValidator + '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/{dataType}': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/connectionId' + - $ref: '#/components/parameters/dataType' + get: + summary: Get push options + tags: + - Push data + operationId: get-create-update-model-options-by-data-type + x-speakeasy-name-override: get-model-options + responses: + '200': + description: OK + 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' + description: "This is the generic documentation for creation and updating of data. See the equivalent endpoint for a given data type for more specific information. \n\nBefore pushing data into accounting software, it is often necessary to collect some details from the user as to how they would like the data to be inserted. This includes names and amounts on transactional entities, but also factors such as categorisation of entities, which is often handled differently between different accounting software. A good example of this is specifying where on the balance sheet/profit and loss reports the user would like a newly-created nominal account to appear.\n\nCodat tries not to limit users to pushing to a very limited number of standard categories, so we have implemented \"options\" endpoints, which allow us to expose to our clients the fields which are required to be pushed for a specific linked company, and the options which may be selected for each field." + '/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 data + operationId: get-company-push-history + x-speakeasy-name-override: list-operations + description: |- + The **List push operations** endpoint returns a list of [push operations](/using-the-api/push) 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. + 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 data + operationId: get-push-operation + x-speakeasy-name-override: get-operation + description: |- + The **Get push operation** endpoint returns a specific [push 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. + 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' + '/integrations/{platformKey}/dataTypes/{dataType}/supplementalDataConfig': + parameters: + - $ref: '#/components/parameters/platformKey' + - name: dataType + in: path + required: true + description: Supported supplemental data data type. + schema: + x-internal: true + type: string + description: Data types that support supplemental data + enum: + - chartOfAccounts + - bills + - company + - creditNotes + - customers + - invoices + - items + - journalEntries + - suppliers + - taxRates + - commerce-companyInfo + - commerce-customers + - commerce-disputes + - commerce-locations + - commerce-orders + - commerce-payments + - commerce-paymentMethods + - commerce-products + - commerce-productCategories + - commerce-taxComponents + - commerce-transactions + example: invoices + put: + summary: Configure + description: |- + The *Configure* endpoint allows you to maintain or change configuration required to return supplemental data for each integration and data type combination. + + [Supplemental data](https://docs.codat.io/using-the-api/supplemental-data/overview) is additional data you can include in Codat's standard data types. + + **Integration-specific behavior** + See the *examples* for integration-specific frequently requested properties. + operationId: configure-supplemental-data + x-speakeasy-name-override: configure + tags: + - Supplemental data + responses: + '200': + description: OK + '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/SupplementalDataConfiguration' + examples: + Xero - Accounts: + value: + yourKeyNameForAccounts: + dataSource: /Accounts + pullData: + yourNameForTaxType: TaxType + yourNameForSystemAccount: SystemAccount + Xero - Invoices: + value: + yourKeyNameForInvoices: + dataSource: /Invoices + pullData: + yourNameForExpectedPaymentDate: ExpectedPaymentDate + yourNameForHasAttachments: HasAttachments + Xero - Items: + value: + yourKeyNameForItems: + dataSource: /Items + pullData: + yourNameForQuantityOnHand: QuantityOnHand + yourNameForTotalCostPool: TotalCostPool + Xero - Contacts: + value: + yourKeyNameForContacts: + dataSource: /Contacts + pullData: + yourNameForBankAccounts: BankAccountDetails + Xero - Tax rates: + value: + yourKeyNameForTaxRates: + dataSource: /TaxRates + pullData: + yourNameForCanApplyToLiabilities: CanApplyToLiabilities + yourNameForCanApplyToAssets: CanApplyToAssets + yourNameForCanApplyToEquity: CanApplyToEquity + yourNameForCanApplyToExpenses: CanApplyToExpenses + yourNameForCanApplyToRevenue: CanApplyToRevenue + QBO - Customers: + value: + yourKeyNameForCustomers: + dataSource: /Customer + pullData: + yourNameForSalesTermRef: SalesTermRef.value + yourNameForParentRef: ParentRef.value + QBO - Invoices: + value: + yourKeyNameForInvoices: + dataSource: /Invoice + pullData: + yourNameForSalesTermRef: SalesTermRef.value + description: The configuration for the specified platform and data type. + get: + summary: Get configuration + description: |- + The *Get configuration* endpoint returns supplemental data configuration previously created for each integration and data type combination. + + [Supplemental data](https://docs.codat.io/using-the-api/supplemental-data/overview) is additional data you can include in Codat's standard data types. + operationId: get-supplemental-data-configuration + x-speakeasy-name-override: get-configuration + tags: + - Supplemental data + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/SupplementalDataConfiguration' + '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' + '/integrations/{platformKey}/dataTypes/custom/{customDataIdentifier}': + parameters: + - $ref: '#/components/parameters/platformKey' + - $ref: '#/components/parameters/customDataIdentifier' + put: + summary: Configure custom data type + description: "The *Configure custom data type* endpoint allows you to maintain or change the configuration required to return a custom data type for a specific integration. \n\nA [custom data type](https://docs.codat.io/using-the-api/custom-data) is an additional data type you can create that is not included in Codat's standardized data model.\n\n### Tips and traps\n\n- You can only configure a single custom data type for a single platform at a time. Use the endpoint multiple times if you need to configure it for multiple platforms. \n\n- You can only indicate a single data source for each customer data type. \n\n- Make your custom configuration as similar as possible to our standard data types so you can interact with them in exactly the same way." + operationId: configure-custom-data-type + x-speakeasy-name-override: configure + tags: + - Custom data type + requestBody: + description: Custom data type configuration for the specified platform. + content: + application/json: + schema: + $ref: '#/components/schemas/CustomDataTypeConfiguration' + examples: + Dynamics 365 Business Central: + value: + dataSource: api/purchaseOrders + requiredData: + currency: '$[*].currencyCode' + number: '$[*].number' + date: '$[*].orderDate' + totalexvat: '$[*].totalAmountExcludingTax' + totaltax: '$[*].totalTaxAmount' + vendor: '$[*].number' + keyBy: + - '$[*].id' + sourceModifiedDate: + - '$[*].lastModifiedDateTime' + Xero Simple Record: + value: + dataSource: /api.xro/2.0/Accounts + requiredData: + code: $.Code + accountId: $.AccountID + type: $.Type + SysAcc: $.SystemAccount + keyBy: + - $.AccountID + Xero Mapping Arrays: + value: + dataSource: /api.xro/2.0/Invoices + requiredData: + invNumber: $.InvoiceNumber + type: $.Type + InvoiceID: $.InvoiceID + lines: '$.LineItems[*]' + keyBy: + - $.InvoiceID + sourceModifiedDate: + - $.UpdatedDateUTC + QuickBooks Online: + value: + dataSource: /query?query=select * from Account + requiredData: + id: $.Id + Currentbal: $.CurrentBalance + SubAcc: $.SubAccount + keyBy: + - $.Id + sourceModifiedDate: + - $.time + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/CustomDataTypeConfiguration' + examples: + Dynamics 365 Business Central: + value: + dataSource: api/purchaseOrders + requiredData: + currency: '$[*].currencyCode' + number: '$[*].number' + date: '$[*].orderDate' + totalexvat: '$[*].totalAmountExcludingTax' + totaltax: '$[*].totalTaxAmount' + vendor: '$[*].number' + keyBy: + - '$[*].id' + sourceModifiedDate: + - '$[*].lastModifiedDateTime' + Xero Simple Record: + value: + dataSource: /api.xro/2.0/Accounts + requiredData: + code: $.Code + accountId: $.AccountID + type: $.Type + SysAcc: $.SystemAccount + keyBy: + - $.AccountID + Xero Mapping Arrays: + value: + dataSource: /api.xro/2.0/Invoices + requiredData: + invNumber: $.InvoiceNumber + type: $.Type + InvoiceID: $.InvoiceID + lines: '$.LineItems[*]' + keyBy: + - $.InvoiceID + sourceModifiedDate: + - $.UpdatedDateUTC + QuickBooks Online: + value: + dataSource: /query?query=select * from Account + requiredData: + id: $.Id + Currentbal: $.CurrentBalance + SubAcc: $.SubAccount + keyBy: + - $.Id + sourceModifiedDate: + - $.time + '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' + get: + summary: Get custom data configuration + description: |- + The *Get custom data configuration* endpoint returns existing configuration details for the specified custom data type and integration pair you previously configured. + + A [custom data type](https://docs.codat.io/using-the-api/custom-data) is an additional data type you can create that is not included in Codat's standardized data model. + operationId: get-custom-data-type-configuration + x-speakeasy-name-override: get-configuration + tags: + - Custom data type + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/CustomDataTypeRecords' + '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}/data/queue/custom/{customDataIdentifier}': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/connectionId' + - $ref: '#/components/parameters/customDataIdentifier' + post: + summary: Refresh custom data type + description: The *Refresh custom data type* endpoint refreshes the specified custom data type for a given company. This is an asynchronous operation that will sync updated data from the linked integration into Codat for you to view. + operationId: refresh-custom-data-type + x-speakeasy-name-override: refresh + tags: + - Custom data type + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/PullOperation' + '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' + '451': + $ref: '#/components/responses/Legal-Reasons' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + '/companies/{companyId}/connections/{connectionId}/data/custom/{customDataIdentifier}': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/connectionId' + - $ref: '#/components/parameters/customDataIdentifier' + get: + summary: List custom data type records + description: |- + The *List custom data type records* endpoint returns a paginated list of records pulled for the specified custom data type you previously configured. + + A [custom data type](https://docs.codat.io/using-the-api/custom-data) is an additional data type you can create that is not included in Codat's standardized data model.s endpoint returns a paginated list of records whose schema is defined [Configure custom data type](https://docs.codat.io/platform-api#/operations/configure-custom-data-type) + operationId: list-custom-data-type-records + parameters: + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + tags: + - Custom data type + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/CustomDataTypeRecords' + '400': + $ref: '#/components/responses/Bad-Request' + '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' + '451': + $ref: '#/components/responses/Legal-Reasons' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' +webhooks: + company.created: + post: + description: Called when a company is created in Codat. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyWebhook' + examples: + Company created: + value: + id: ba29118f-5406-4e59-b05c-ba307ca38d01 + eventType: company.created + generatedDate: '2024-08-08T17:10:34.015Z' + payload: + id: 0498e921-9b53-4396-a412-4f2f5983b0a2 + name: Bank of Dave + description: Requested a loan for refurb. + redirect: 'https://link.codat.io/company/0498e921-9b53-4396-a412-4f2f5983b0a2' + lastSync: '2022-01-01T12:00:00.000Z' + created: '2022-01-01T12:00:00.000Z' + tags: + customerRegion: us + uid: 335a086e-8563-4b03-94e3-39544225ecb6 + responses: + '200': + description: Return a 200 status to indicate that the webhook was received successfully. + company.deleted: + post: + description: Called when a company is deleted in Codat. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyWebhook' + examples: + Company deleted: + value: + id: ba29118f-5406-4e59-b05c-ba307ca38d01 + eventType: company.deleted + generatedDate: '2024-08-08T17:10:34.015Z' + payload: + id: 0498e921-9b53-4396-a412-4f2f5983b0a2 + name: Bank of Dave + description: Requested a loan for refurb. + redirect: 'https://link.codat.io/company/0498e921-9b53-4396-a412-4f2f5983b0a2' + lastSync: '2022-01-01T12:00:00.000Z' + created: '2022-01-01T12:00:00.000Z' + tags: + customerRegion: uk + uid: f6b0c253-16c7-4da1-a0c5-9c871e9c9d6c + responses: + '200': + description: Return a 200 status to indicate that the webhook was received successfully. + connection.created: + post: + description: Called when a connection is created by the SMB. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConnectionWebhook' + examples: + Connection created: + value: + id: ba29118f-5406-4e59-b05c-ba307ca38d01 + eventType: connection.created + generatedDate: '2024-08-08T17:10:34.015Z' + payload: + referenceCompany: + id: 0498e921-9b53-4396-a412-4f2f5983b0a2 + name: Bank of Dave + description: internal_id_mxO7rLfo + links: + portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' + tags: + customerRegion: us + uid: 335a086e-8563-4b03-94e3-39544225ecb6 + connection: + 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/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' + status: PendingAuth + lastSync: '2022-10-27T10:22:43.6464237Z' + created: '2022-10-27T09:53:29Z' + sourceType: Banking + responses: + '200': + description: Return a 200 status to indicate that the webhook was received successfully. + connection.connected: + post: + description: Called when a connection is successfully linked by the SMB. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConnectionWebhook' + examples: + Connection connected: + value: + id: ba29118f-5406-4e59-b05c-ba307ca38d01 + eventType: connection.connected + generatedDate: '2024-08-08T17:10:34.015Z' + payload: + referenceCompany: + id: 0498e921-9b53-4396-a412-4f2f5983b0a2 + name: Bank of Dave + description: internal_id_mxO7rLfo + links: + portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' + tags: + customerRegion: us + uid: 335a086e-8563-4b03-94e3-39544225ecb6 + connection: + 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/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' + status: Linked + lastSync: '2022-10-27T10:22:43.6464237Z' + created: '2022-10-27T09:53:29Z' + sourceType: Banking + responses: + '200': + description: Return a 200 status to indicate that the webhook was received successfully. + connection.failed: + post: + description: Called when a connection failed linking to the SMB. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConnectionWebhook' + examples: + Connection failed: + value: + id: ba29118f-5406-4e59-b05c-ba307ca38d01 + eventType: connection.failed + generatedDate: '2024-08-08T17:10:34.015Z' + payload: + referenceCompany: + id: 0498e921-9b53-4396-a412-4f2f5983b0a2 + name: Bank of Dave + description: internal_id_mxO7rLfo + links: + portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' + tags: + customerRegion: us + uid: 335a086e-8563-4b03-94e3-39544225ecb6 + connection: + 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/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' + status: PendingAuth + created: '2022-10-27T09:53:29Z' + sourceType: Banking + dataConnectionErrors: + - statusCode: '403' + statusText: User cancelled linking + errorMessage: User cancelled + erroredOnUtc: '2022-10-27T09:53:29Z' + status: Active + responses: + '200': + description: Return a 200 status to indicate that the webhook was received successfully. + connection.disconnected: + post: + description: Called when a connection is disconnected either due to being unlinked or de-authorized by the SMB or integration. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConnectionWebhook' + examples: + Unlinked: + value: + id: ba29118f-5406-4e59-b05c-ba307ca38d01 + eventType: connection.disconnected + generatedDate: '2024-08-08T17:10:34.015Z' + payload: + referenceCompany: + id: 0498e921-9b53-4396-a412-4f2f5983b0a2 + name: Bank of Dave + description: internal_id_mxO7rLfo + links: + portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' + tags: + customerRegion: us + uid: 335a086e-8563-4b03-94e3-39544225ecb6 + connection: + 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/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' + status: Unlinked + lastSync: '2022-10-27T10:22:43.6464237Z' + created: '2022-10-27T09:53:29Z' + sourceType: Banking + De-authorized: + value: + id: ba29118f-5406-4e59-b05c-ba307ca38d01 + eventType: connection.disconnected + generatedDate: '2024-08-08T17:10:34.015Z' + payload: + referenceCompany: + id: 0498e921-9b53-4396-a412-4f2f5983b0a2 + name: Bank of Dave + description: internal_id_mxO7rLfo + links: + portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' + tags: + customerRegion: us + uid: 335a086e-8563-4b03-94e3-39544225ecb6 + connection: + 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/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' + status: Deauthorized + lastSync: '2022-10-27T10:22:43.6464237Z' + created: '2022-10-27T09:53:29Z' + sourceType: Banking + dataConnectionErrors: + - statusCode: '401' + statusText: The integration de-authorized access to the connection. + errorMessage: The integration de-authorized access to the connection. + erroredOnUtc: '2022-12-27T09:53:29Z' + status: Active + responses: + '200': + description: Return a 200 status to indicate that the webhook was received successfully. + connection.reconnected: + post: + description: Called when a connection is reconnected after becoming disconnected. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConnectionWebhook' + examples: + Reconnected: + value: + id: ba29118f-5406-4e59-b05c-ba307ca38d01 + eventType: connection.reconnected + generatedDate: '2024-08-08T17:10:34.015Z' + payload: + referenceCompany: + id: 0498e921-9b53-4396-a412-4f2f5983b0a2 + name: Bank of Dave + description: internal_id_mxO7rLfo + links: + portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' + tags: + customerRegion: us + uid: 335a086e-8563-4b03-94e3-39544225ecb6 + connection: + 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/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' + status: Linked + lastSync: '2022-10-27T10:22:43.6464237Z' + created: '2022-10-27T09:53:29Z' + sourceType: Banking responses: '200': description: Return a 200 status to indicate that the webhook was received successfully. - bankFeeds.sourceAccount.connected: + connection.deleted: 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 a connection is deleted. requestBody: content: application/json: schema: - $ref: '#/components/schemas/SourceAccountWebhook' + $ref: '#/components/schemas/ConnectionWebhook' examples: - Connected: + Deleted: value: id: ba29118f-5406-4e59-b05c-ba307ca38d01 - eventType: bankFeeds.sourceAccount.connected + eventType: connection.deleted + generatedDate: '2024-08-08T17:10:34.015Z' + payload: + referenceCompany: + id: 0498e921-9b53-4396-a412-4f2f5983b0a2 + name: Bank of Dave + description: internal_id_mxO7rLfo + links: + portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' + tags: + customerRegion: us + uid: 335a086e-8563-4b03-94e3-39544225ecb6 + connection: + 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/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' + status: Linked + lastSync: '2022-10-27T10:22:43.6464237Z' + created: '2022-10-27T09:53:29Z' + sourceType: Banking + responses: + '200': + description: Return a 200 status to indicate that the webhook was received successfully. + read.completed: + post: + description: Called when the fetch of data types for a product has completed. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ReadCompletedWebhook' + examples: + Read completed with validation warnings: + value: + id: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b + eventType: read.completed + generatedDate: '2022-10-23T00:00:00.000Z' + 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' + modifiedFromDate: '2022-10-23T00:00:00.000Z' + dataTypes: + - connectionId: 2e9d2c44-f675-40ba-8049-353bfcb5e171 + dataType: invoices + recordsModified: false + status: Complete + issues: + - type: warning.validation + message: Something doesn't look right about these invoices. You can see more information in the logs. + links: + logs: 'https://api.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/sync/743ec94a-8aa4-44bb-8bd4-e1855ee0e74b/validation' + portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/pull-history' + readMore: 'https://docs.codat.io/using-the-api/get-data-troubleshooting#warning.validation' + Read completed without issues: + value: + id: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b + eventType: read.completed generatedDate: '2022-10-23T00:00:00.000Z' payload: referenceCompany: @@ -3160,33 +3223,54 @@ webhooks: 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 + modifiedFromDate: '2022-10-23T00:00:00.000Z' + dataTypes: + - connectionId: 2e9d2c44-f675-40ba-8049-353bfcb5e171 + dataType: invoices + recordsModified: false + status: Complete + issues: [] responses: '200': description: Return a 200 status to indicate that the webhook was received successfully. - bankFeeds.sourceAccount.disconnected: + read.completed.initial: post: - description: Called when a bank feed source account has become disconnected. - x-svix-feature-flag: bank-feeds + description: Called when the initial fetch of data types for a product has been completed. requestBody: content: application/json: schema: - $ref: '#/components/schemas/SourceAccountWebhook' + $ref: '#/components/schemas/ReadCompletedWebhook' examples: - Disconnected: + Initial with validation warnings: value: - id: ba29118f-5406-4e59-b05c-ba307ca38d01 - eventType: bankFeeds.sourceAccount.disconnected + id: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b + eventType: read.completed.initial + generatedDate: '2022-10-23T00:00:00.000Z' + 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' + modifiedFromDate: '2022-10-23T00:00:00.000Z' + dataTypes: + - connectionId: 2e9d2c44-f675-40ba-8049-353bfcb5e171 + dataType: invoices + recordsModified: false + status: Complete + issues: + - type: warning.validation + message: Something doesn't look right about these invoices. You can see more information in the logs. + links: + logs: 'https://api.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/sync/743ec94a-8aa4-44bb-8bd4-e1855ee0e74b/validation' + portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/pull-history' + readMore: 'https://docs.codat.io/using-the-api/get-data-troubleshooting#warning.validation' + Initial without issues: + value: + id: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b + eventType: read.completed.initial generatedDate: '2022-10-23T00:00:00.000Z' payload: referenceCompany: @@ -3195,443 +3279,283 @@ webhooks: 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 + modifiedFromDate: '2022-10-23T00:00:00.000Z' + dataTypes: + - connectionId: 2e9d2c44-f675-40ba-8049-353bfcb5e171 + dataType: invoices + recordsModified: false + status: Complete + issues: [] + responses: + '200': + description: Return a 200 status to indicate that the webhook was received successfully. + '{dataType}.write.successful': + post: + description: "Indicates that a `dataType` has been successfully created, updated, deleted, or had an attachment uploaded in the accounting software.\n\nCodat now refers to push operations as write requests.\n\nFor example, to subscribe to events where a bill is written into the accounting software, use the `bills.write.successful` webhook.\n\n### Supported data types and write types\n\n| `dataType` | Create | Update | Delete | UploadAttachment |\n|------------------|---------|---------|---------|------------------|\n| bankAccounts | ✅ | ✅ | - | - | \n| bankTransactions | ✅ | - | - | - |\n| billCreditNotes | ✅ | ✅ | - | ✅ | \n| billPayments | ✅ | - | ✅ | - | \n| bills | ✅ | ✅ | ✅ | ✅ | \n| chartOfAccounts | ✅ | - | - | - | \n| creditNotes | ✅ | ✅ | - | - | \n| customers | ✅ | ✅ | - | - | \n| directCosts | ✅ | - | ✅ | ✅ | \n| directIncomes | ✅ | - | - | ✅ | \n| invoices | ✅ | ✅ | ✅ | ✅ | \n| items | ✅ | - | - | - | \n| journalEntries | ✅ | - | ✅ | - | \n| journals | ✅ | - | - | - | \n| payments | ✅ | - | - | - | \n| purchaseOrders | ✅ | ✅ | - | - | \n| suppliers | ✅ | ✅ | - | - | \n| transfers | ✅ | - | - | ✅ | \n" + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DataTypeWriteWebhook' + examples: + Record: + value: + id: bae71d36-ff47-420a-b4a6-f8c9ddf41140 + eventType: '{dataType}.write.successful' + generatedDate: '2023-05-03T10:00:23Z' + payload: + id: a9367074-b5c3-42c4-9be4-be129f43577e + type: Create + referenceCompany: + id: 70af3071-65d9-4ec3-b3cb-5283e8d55dac + name: Toft stores + description: cust_1MtJUT2eZvKYlo2CNaw2HvEv + connectionId: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 + requestedOnDate: '2023-05-03T10:00:00Z' + completedOnDate: '2023-05-03T10:00:23Z' + status: Success + record: + id: bil_1Nispe2eZvKYlo2Cd31jOCgZ + Attachment: + value: + id: bae71d36-ff47-420a-b4a6-f8c9ddf41140 + eventType: '{dataType}.write.successful' + generatedDate: '2023-05-03T10:00:23Z' + payload: + id: a9367074-b5c3-42c4-9be4-be129f43577e + type: UploadAttachment + referenceCompany: + id: 70af3071-65d9-4ec3-b3cb-5283e8d55dac + name: Toft stores + description: cust_1MtJUT2eZvKYlo2CNaw2HvEv + connectionId: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 + requestedOnDate: '2023-05-03T10:00:00Z' + completedOnDate: '2023-05-03T10:00:23Z' + status: Success + record: + id: bil_1Nispe2eZvKYlo2Cd31jOCgZ + attachmentId: att_1AZtxr2eZvKYlo2CJDX8whov + responses: + '200': + description: Return a 200 status to indicate that the webhook was received. + '{dataType}.write.unsuccessful': + post: + description: "Indicates that a `dataType` has not been successfully created, updated, deleted, or had an attachment uploaded in the accounting software.\n\nCodat now refers to push operations as write requests.\n\nFor example, to subscribe to events where a bill is written into the accounting software, use the `bills.write.unsuccessful` webhook.\n\n### Supported data types and write types\n\n| `dataType` | Create | Update | Delete | UploadAttachment |\n|------------------|---------|---------|---------|------------------|\n| bankAccounts | ✅ | ✅ | - | - | \n| bankTransactions | ✅ | - | - | - |\n| billCreditNotes | ✅ | ✅ | - | ✅ | \n| billPayments | ✅ | - | ✅ | - | \n| bills | ✅ | ✅ | ✅ | ✅ | \n| chartOfAccounts | ✅ | - | - | - | \n| creditNotes | ✅ | ✅ | - | - | \n| customers | ✅ | ✅ | - | - | \n| directCosts | ✅ | - | ✅ | ✅ | \n| directIncomes | ✅ | - | - | ✅ | \n| invoices | ✅ | ✅ | ✅ | ✅ | \n| items | ✅ | - | - | - | \n| journalEntries | ✅ | - | ✅ | - | \n| journals | ✅ | - | - | - | \n| payments | ✅ | - | - | - | \n| purchaseOrders | ✅ | ✅ | - | - | \n| suppliers | ✅ | ✅ | - | - | \n| transfers | ✅ | - | - | ✅ | \n" + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DataTypeWriteWebhook' + examples: + Record: + value: + id: bae71d36-ff47-420a-b4a6-f8c9ddf41140 + eventType: '{dataType}.write.unsuccessful' + generatedDate: '2023-05-03T10:00:23Z' + payload: + id: a9367074-b5c3-42c4-9be4-be129f43577e + type: Update + referenceCompany: + id: 70af3071-65d9-4ec3-b3cb-5283e8d55dac + name: Toft stores + description: cust_1MtJUT2eZvKYlo2CNaw2HvEv + connectionId: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 + requestedOnDate: '2023-05-03T10:00:00Z' + completedOnDate: '2023-05-03T10:00:23Z' + status: Failed + Record timed out: + value: + id: bae71d36-ff47-420a-b4a6-f8c9ddf41140 + eventType: '{dataType}.write.unsuccessful' + generatedDate: '2023-05-03T10:00:23Z' + payload: + id: a9367074-b5c3-42c4-9be4-be129f43577e + type: Delete + referenceCompany: + id: 70af3071-65d9-4ec3-b3cb-5283e8d55dac + name: Toft stores + description: cust_1MtJUT2eZvKYlo2CNaw2HvEv + connectionId: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 + requestedOnDate: '2023-05-03T10:00:00Z' + completedOnDate: '2023-05-03T10:00:23Z' + status: TimedOut + Attachment: + value: + id: bae71d36-ff47-420a-b4a6-f8c9ddf41140 + eventType: '{dataType}.write.unsuccessful' + generatedDate: '2023-05-03T10:00:23Z' + payload: + id: a9367074-b5c3-42c4-9be4-be129f43577e + type: UploadAttachment + referenceCompany: + id: 70af3071-65d9-4ec3-b3cb-5283e8d55dac + name: Toft stores + description: cust_1MtJUT2eZvKYlo2CNaw2HvEv + connectionId: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 + requestedOnDate: '2023-05-03T10:00:00Z' + completedOnDate: '2023-05-03T10:00:23Z' + status: TimedOut + record: + id: bil_1Nispe2eZvKYlo2Cd31jOCgZ + responses: + '200': + description: Return a 200 status to indicate that the webhook was received. + client.rateLimit.reached: + post: + description: Called when your client’s request count to Codat's API surpasses the allocated quota. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ClientRateLimitWebhook' + examples: + Reached: + value: + id: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b + eventType: client.rateLimit.reached + generatedDate: '2024-09-01T00:00:00Z' + payload: + 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. + client.rateLimit.reset: + post: + 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/ClientRateLimitWebhook' + examples: + Reset: + value: + id: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b + eventType: client.rateLimit.reset + generatedDate: '2024-09-01T00:00:00Z' + payload: + 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 + ApiKeyDetails: + title: API key details + description: Details of the API key. type: object - properties: - username: - type: string - example: S0MW-TR0P-7DS0 - description: Username used by the bank feeds platform to retrieve transactions - password: - 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: - x-internal: true - title: 'Accounting: Bank accounts' allOf: - - type: object + - properties: + id: + type: string + description: Unique identifier for the API key. + example: e288a972-b402-4b21-93f9-b5335ae5679c + name: + type: string + maxLength: 50 + nullable: true + description: A meaningful name assigned to the API key. + example: azure-invoice-finance-processor + apiKey: + type: string + description: The API key value used to make authenticated http requests. + example: ztHQGvnC4XN2CgUhaDWEG4ySLUJqWjp7zkbZkGHd + - nullable: true + description: Datetime in UTC the API key was created. The created date will be null if the API key created before YYYY-MM-DD. + title: Created date + type: object + x-internal: true 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: - type: string - description: Unique ID for the source account - targetAccountId: - 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. - required: - - sourceAccountId - examples: - - sourceAccountId: acc-002 - targetAccountId: account-081 - BankFeedAccountMappingResponse: - title: Bank feed account mapping response + createdDate: + $ref: '#/components/schemas/DateTime' + description: The date the entity was created. + ApiKeys: + title: API keys + x-internal: true type: object - additionalProperties: false properties: - sourceAccountId: - type: string - description: Unique ID for the source account. - targetAccountId: - type: string - nullable: true - description: Unique ID for the target account. - status: - type: string - nullable: true - description: Status of the POST request. - error: - type: string - 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 + results: + type: array + items: + $ref: '#/components/schemas/ApiKeyDetails' + Branding: + title: Branding type: object - additionalProperties: false properties: - sourceAccountId: - type: string - description: Unique ID for the source account. - sourceAccountName: - type: string - description: Name for the source account. - sourceAccountNumber: - 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: - type: string - nullable: true - description: Unique ID for the target account in the accounting software. - targetAccountName: - type: string - description: Name for the target account in the accounting software. - status: + logo: + $ref: '#/components/schemas/Branding/definitions/brandingLogo' + button: + $ref: '#/components/schemas/Branding/definitions/brandingButton' + sourceId: type: string - description: The status. - targetAccountOptions: - type: array - nullable: true - description: An array of potential target accounts. - items: - $ref: '#/components/schemas/BankFeedMapping/definitions/targetAccountOption' - feedStartDate: - $ref: '#/components/schemas/DateTime' - 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.' + 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`.' definitions: - targetAccountOption: - title: Target Account Option + brandingLogo: + description: Logo branding references. 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: + full: + $ref: '#/components/schemas/Branding/definitions/brandingImage' + square: + $ref: '#/components/schemas/Branding/definitions/brandingImage' + brandingButton: + type: object + description: Button branding references. + properties: + default: + $ref: '#/components/schemas/Branding/definitions/brandingImage' + hover: + $ref: '#/components/schemas/Branding/definitions/brandingImage' + brandingImage: + title: Branding Image + type: object + properties: + image: + $ref: '#/components/schemas/Branding/definitions/imageReference' + examples: [] + imageReference: + type: object + title: Image Reference + description: Image reference. + properties: + src: type: string - nullable: true - description: The sort code of the account. - accountNumber: + format: uri + description: Source URL for image. + alt: 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 + description: Alternative text when image is not available. 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 + - logo: + full: + image: + src: 'https://static.codat.io/public/officialLogos/Full/8A156A5A-39CB-4F9D-856E-76EF9B9A9607.png' + alt: xero full icon + square: + image: + src: 'https://static.codat.io/public/officialLogos/Square/8A156A5A-39CB-4F9D-856E-76EF9B2W3607.png' + alt: xero square icon + button: + default: + image: + src: 'https://static.codat.io/public/officialButtons/Full/8A156A5A-39CB-4F9D-856E-76EF9Q7A9607.png' + alt: xero default button icon + hover: + image: + src: 'https://static.codat.io/public/officialLogos/Full/8A156A5A-39CB-4F9D-856E-76EF9B9A9607.png' + alt: xero hover button icon + sourceId: 35b92968-9851-4095-ad60-395c95cbcba4 + ClientId: + title: Client ID + type: string + format: uuid + description: Unique identifier for your client in Codat. ClientRateLimitWebhook: title: Client rate limit webhook type: object @@ -3676,68 +3600,10 @@ components: 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' + - $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\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" + 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\x70\x6C\x61\x74\x66\x6F\x72\x6D\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' @@ -3753,7 +3619,7 @@ components: type: object properties: id: - $ref: '#/components/parameters/companyId/schema' + $ref: '#/paths/~1companies~1%7BcompanyId%7D~1syncSettings/post/requestBody/content/application~1json/schema/allOf/0/properties/companyId' name: type: string description: The name of the company @@ -3810,7 +3676,7 @@ components: type: object properties: id: - $ref: '#/components/parameters/companyId/schema' + $ref: '#/paths/~1companies~1%7BcompanyId%7D~1syncSettings/post/requestBody/content/application~1json/schema/allOf/0/properties/companyId' name: $ref: '#/components/schemas/Company/definitions/companyDetails/properties/name' description: @@ -3879,32 +3745,6 @@ components: - expiresIn: 86400 accessToken: string tokenType: Bearer - CompanyInformation: - title: Company information - description: Information about the company from the underlying accounting software. - 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 x-internal: true @@ -3939,9 +3779,42 @@ components: $ref: '#/components/schemas/CompanyRequestBody/properties/description' tags: $ref: '#/components/schemas/Company/definitions/companyDetails/properties/tags' + CompanySyncSettings: + title: Company sync settings + type: object + properties: + companyId: + $ref: '#/paths/~1companies~1%7BcompanyId%7D~1syncSettings/post/requestBody/content/application~1json/schema/allOf/0/properties/companyId' + settings: + type: array + items: + $ref: '#/components/schemas/SyncSetting' + overridesDefaults: + type: boolean + description: 'Set to `True` if you want to override the default [sync settings](https://docs.codat.io/knowledge-base/advanced-sync-settings).' + CompanyWebhook: + title: Company webhook + type: object + properties: + id: + type: string + format: uuid + example: ba29118f-5406-4e59-b05c-ba307ca38d01 + description: Unique identifier of the event + eventType: + type: string + description: The type of event. + examples: + - company.created + - company.deleted + generatedDate: + $ref: '#/components/schemas/DateTime' + description: The date time in UTC the event was generated in Codat. + payload: + $ref: '#/components/schemas/Company/definitions/companyDetails' 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" + 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\x70\x6C\x61\x74\x66\x6F\x72\x6D\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 properties: id: @@ -3955,23 +3828,9 @@ components: 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`.' + $ref: '#/components/schemas/Branding/properties/sourceId' sourceType: - title: Source Type - description: The type of platform of the connection. - type: string - enum: - - Accounting - - Banking - - BankFeed - - Commerce - - Expense - - Other - - Unknown - example: Accounting + $ref: '#/components/schemas/Integration/definitions/sourceType' platformName: type: string description: Name of integration connected to company. @@ -4068,6 +3927,29 @@ components: lastSync: '2022-10-27T10:22:43.6464237Z' created: '2022-10-27T09:53:29Z' sourceType: Banking + ConnectionManagementAccessToken: + title: Access token + type: object + properties: + accessToken: + type: string + nullable: false + description: Access token that allows SMBs to manage connections that have access to their data. + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + ConnectionManagementAllowedOrigins: + title: Allowed origins + type: object + properties: + allowedOrigins: + type: array + description: 'An array of allowed origins (i.e. your domains) to permit cross-origin resource sharing ([CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)).n resource sharing ([CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)).' + items: + type: string + format: uri + description: A domain you want to allow CORS with Codat. + example: + allowedOrigins: + - 'https://www.bank-of-dave.com' Connections: title: Connections x-internal: true @@ -4078,84 +3960,421 @@ components: type: array items: $ref: '#/components/schemas/Connection' - - $ref: '#/components/schemas/Companies/allOf/1' - CreateBankTransactions: - title: Create bank transactions + - $ref: '#/components/schemas/PagingInfo' + ConnectionWebhook: + title: Connection webhook type: object properties: - accountId: + id: + type: string + format: uuid + example: ba29118f-5406-4e59-b05c-ba307ca38d01 + description: Unique identifier of the event. + eventType: type: string - description: Unique identifier for a bank account. + description: The type of event. 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 + - connection.created + - connection.connected + - connection.disconnected + - connection.reconnected + - connection.deleted + - connection.failed + generatedDate: + $ref: '#/components/schemas/DateTime' + description: The date time in UTC the event was generated in Codat. + payload: + $ref: '#/components/schemas/ConnectionWebhook/definitions/connectionWebhookPayload' + definitions: + connectionWebhookPayload: + title: Connection webhook payload + type: object + properties: + referenceCompany: + $ref: '#/components/schemas/Company/definitions/companyReference' + connection: + $ref: '#/components/schemas/Connection' + CreateApiKey: + title: Create API key + description: Details about the newly created API key. x-internal: true - allOf: - - type: object + type: object + properties: + name: + $ref: '#/components/schemas/ApiKeyDetails/allOf/0/properties/name' + CustomDataTypeConfiguration: + title: Custom data type configuration + type: object + description: Client's configuration details for a specific custom data type and platform pair. + properties: + dataSource: + type: string + description: Underlying endpoint of the source platform that will serve as a data source for the custom data type. This value is not validated by Codat. + requiredData: + type: object + description: Properties required to be fetched from the underlying platform for the custom data type that is being configured. This value is not validated by Codat. + additionalProperties: + type: string + description: The client's defined name for the property with the value being the source system's property name which the mapping is targeting. + keyBy: + type: array + description: An array of properties from the source system that can be used to uniquely identify the records returned for the custom data type. This value is not validated by Codat. + items: + type: string + minLength: 1 + sourceModifiedDate: + type: array + nullable: true + items: + type: string + description: Property in the source platform nominated by the client that defines the date when a record was last modified there. This value is not validated by Codat. + examples: + - dataSource: api/purchaseOrders?$filter=currencyCode eq 'NOK' + requiredData: + currencyCode: '$[*].currencyCode' + id: '$[*].id' + number: '$[*].number' + orderDate: '$[*].orderDate' + totalAmountExcludingTax: '$[*].totalAmountExcludingTax' + totalTaxAmount: '$[*].totalTaxAmount' + vendorName: '$[*].number' + keyBy: + - '$[*].id' + sourceModifiedDate: + - '$[*].lastModifiedDateTime' + CustomDataTypeRecords: + title: Custom data type records + type: object + description: Resulting records pulled from the source platform for a specific custom data type. + properties: + results: + type: array + items: + $ref: '#/components/schemas/CustomDataTypeRecords/definitions/customDataTypeRecord' + pageNumber: + $ref: '#/components/schemas/PagingInfo/properties/pageNumber' + pageSize: + $ref: '#/components/schemas/PagingInfo/properties/pageSize' + totalResults: + $ref: '#/components/schemas/PagingInfo/properties/totalResults' + definitions: + customDataTypeRecord: + title: Custom data type record + type: object properties: - data: - $ref: '#/components/schemas/CreateBankTransactions' - - $ref: '#/components/schemas/PushOperation' + id: + type: string + nullable: false + description: Unique identifier of the record. + content: + type: object + description: Values from the source system for the properties defined in the custom data type configuration. + additionalProperties: + type: object + modifiedDate: + 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. + 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/DateTime' + 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: + - dataType: string + lastSuccessfulSync: '2022-01-01T13:00:00.000Z' + currentStatus: string + latestSyncId: ad474a37-2003-478e-baee-9af9f1ec2fe3 + latestSuccessfulSyncId: 8220fc90-55b6-47bc-9417-48ac6ea93101 + DataStatuses: + 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 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 + $ref: '#/components/schemas/DataStatus/properties/dataType' + DataTypeWriteWebhook: + title: Write data type webhook + type: object + properties: + id: + type: string + format: uuid + example: ba29118f-5406-4e59-b05c-ba307ca38d01 + description: Unique identifier of the event. + eventType: + type: string + description: The type of event. + examples: + - bills.write.successful + - bills.write.unsuccessful + generatedDate: + $ref: '#/components/schemas/DateTime' + description: The date time in UTC the event was generated in Codat. + payload: + $ref: '#/components/schemas/DataTypeWriteWebhook/definitions/dataTypeWriteWebhookPayload' + definitions: + dataTypeWriteWebhookPayload: + title: Payload + type: object + properties: + id: + type: string + description: Unique identifier of the write request. This is also known as the push operation ID. + type: + $ref: '#/components/schemas/DataTypeWriteWebhook/definitions/writeType' + referenceCompany: + $ref: '#/components/schemas/Company/definitions/companyReference' + connectionId: + $ref: '#/components/parameters/connectionId/schema' + requestedOnDate: + $ref: '#/components/schemas/DateTime' + description: The date time in UTC the write request was submitted. + completedOnDate: + $ref: '#/components/schemas/DateTime' + description: The date time in UTC the write request completed. + status: + $ref: '#/components/schemas/DataTypeWriteWebhook/definitions/writeStatus' + record: + $ref: '#/components/schemas/DataTypeWriteWebhook/definitions/dataTypeWriteWebhookRecord' + nullable: true + attachmentId: + type: string + nullable: true + description: 'Unique identifier for the uploaded attachment, null if no attachment uploaded.' + dataTypeWriteWebhookRecord: + type: object + properties: + id: + type: string + description: 'The unique identifier of the data type created, updated, deleted, or had an attachment uploaded in the accounting platform.' + writeType: + title: Write type + description: Type of write request. + type: string + enum: + - Create + - Update + - Delete + - UploadAttachment + writeStatus: + title: Write request status + type: string + enum: + - Pending + - Failed + - Success + - TimedOut + description: 'The current status of the write request, which is the same as the push operation status.' DateTime: title: Date time type: string @@ -4221,24 +4440,259 @@ components: type: string nullable: true description: Name of validator. - GenerateOtpResponse: - title: OTP response + Integration: + title: Integration + description: An integration that Codat supports + examples: + - key: gbol + logoUrl: 'http://example.com' + name: Xero + enabled: true + sourceId: accounting + sourceType: 8193a927-ab7a-45a3-9dc2-d357a4932dfe + integrationId: 497a18ca-284e-40c0-985d-f72be35d468e + isOfflineConnector: true + isBeta: true + dataProvidedBy: string + datatypeFeatures: + - datatype: invoices + supportedFeatures: + - featureType: get + featureState: release type: object - description: Response containing a one-time password and its expiry time. - additionalProperties: false properties: - otp: + key: + $ref: '#/components/parameters/platformKey/schema' + logoUrl: 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 + description: Static url for integration's logo. + name: + type: string + example: Xero + description: Name of integration. + enabled: + type: boolean + description: Whether this integration is enabled for your customers to use. + sourceId: + $ref: '#/components/schemas/Branding/properties/sourceId' + sourceType: + $ref: '#/components/schemas/Integration/definitions/sourceType' + integrationId: + $ref: '#/components/schemas/Connection/properties/integrationId' + isOfflineConnector: + type: boolean + description: '`True` if the integration is to an application installed and run locally on an SMBs computer.' + isBeta: + type: boolean + description: '`True` if the integration is currently in beta release.' + dataProvidedBy: + type: string + description: The name of the data provider. + datatypeFeatures: + type: array + items: + $ref: '#/components/schemas/Integration/definitions/dataTypeFeature' + required: + - key + - logoUrl + - name + - enabled + definitions: + sourceType: + title: Source Type + description: The type of platform of the connection. + type: string + enum: + - Accounting + - Banking + - BankFeed + - Commerce + - Expense + - Other + - Unknown + example: Accounting + dataTypeFeature: + title: Data type feature + description: Describes support for a given datatype and associated operations + type: object + properties: + dataType: + $ref: '#/components/schemas/DataStatus/properties/dataType' + supportedFeatures: + type: array + items: + $ref: '#/components/schemas/Integration/definitions/supportedFeature' + required: + - datatype + - supportedFeatures + examples: + - datatype: invoices + supportedFeatures: + - featureType: Get + featureState: Release + supportedFeature: + type: object + x-internal: true + properties: + featureType: + $ref: '#/components/schemas/Integration/definitions/featureType' + featureState: + $ref: '#/components/schemas/Integration/definitions/featureState' + required: + - featureType + - featureState + featureState: + title: Feature state + type: string + example: Release + description: The current release state of the feature. + enum: + - Release + - Alpha + - Beta + - Deprecated + - NotSupported + - NotImplemented + featureType: + type: string + x-internal: true + description: The type of feature. + enum: + - Get + - Post + - Categorization + - Delete + - Put + - GetAsPdf + - DownloadAttachment + - GetAttachment + - GetAttachments + - UploadAttachment + example: Get + Integrations: + title: Integrations + x-internal: true + allOf: + - type: object + properties: + results: + type: array + items: + $ref: '#/components/schemas/Integration' + - $ref: '#/components/schemas/PagingInfo' + PagingInfo: + 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/PagingInfo/definitions/links' + definitions: + links: + title: Hal Links + type: object + required: + - self + - current + properties: + 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: + href: + type: string + 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' + Profile: + title: Profile + description: Describes your Codat client instance + examples: + - name: Bob's Burgers + logoUrl: 'https://client-images.codat.io/logo/042399f5-d104-4f38-9ce8-cac3524f4e88_5806cb1f-7342-4c0e-a0a8-99bfbc47b0ff.png' + iconUrl: 'https://client-images.codat.io/icon/042399f5-d104-4f38-9ce8-cac3524f4e88_3f5623af-d992-4c22-bc08-e58c520a8526.ico' + redirectUrl: 'https://bobs-burgers.{countrySuffix}/{companyId}' + whiteListUrls: + - 'https://bobs-burgers.com' + - 'https://bobs-burgers.co.uk' + confirmCompanyName: true + type: object + properties: + name: + type: string + example: Bob's Burgers + description: The name given to the instance. + logoUrl: + type: string + description: Static url to your organization's logo. + example: 'https://client-images.codat.io/logo/042399f5-d104-4f38-9ce8-cac3524f4e88_5806cb1f-7342-4c0e-a0a8-99bfbc47b0ff.png' + iconUrl: + type: string + description: Static url to your organization's icon. + example: 'https://client-images.codat.io/icon/042399f5-d104-4f38-9ce8-cac3524f4e88_3f5623af-d992-4c22-bc08-e58c520a8526.ico' + redirectUrl: + type: string + example: 'https://bobs-burgers.{countrySuffix}/{companyId}' + description: 'The redirect URL pasted on to the SMB once Codat''s [Hosted Link](https://docs.codat.io/auth-flow/authorize-hosted-link) has been completed by the SMB.' + whiteListUrls: + type: array + description: A list of urls that are allowed to communicate with Codat. If empty any url is allowed to communicate with Codat. + items: + type: string + format: uri + example: 'https://bobs-burgers.com' + description: A url that is allowed to communicate with Codat. + apiKey: + type: string + deprecated: true + example: sartANTjHAkLdbyDfaynoTQb7pkmj6hXHmnQKMrB + description: The API key for this Codat instance. + confirmCompanyName: + type: boolean + deprecated: true + description: '`True` if the company name has been confirmed.' + required: + - name + - redirectUrl + x-stoplight: + id: b1fyq05edangf PullOperation: title: Pull operation description: |- @@ -4345,7 +4799,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,10 +4812,10 @@ 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' + $ref: '#/paths/~1companies~1%7BcompanyId%7D~1syncSettings/post/requestBody/content/application~1json/schema/allOf/0/properties/companyId' pushOperationKey: type: string format: uuid @@ -4455,7 +4909,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 +4942,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,596 +5070,327 @@ components: $ref: '#/components/schemas/PushOption/definitions/pushOptionProperty/properties/description' required: $ref: '#/components/schemas/PushOption/definitions/pushOptionProperty/properties/required' - SourceAccount: - title: Source account (v1) + ReadCompletedWebhook: + title: Read completed webhook type: object - description: The target bank account in a supported accounting software for ingestion into a bank feed. - additionalProperties: false 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 - 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: - type: number - format: decimal - 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: + format: uuid + example: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b + description: Unique identifier of the event. + eventType: type: string - nullable: true - description: Status of the source account. - enum: - - pending - - connected - - connecting - - disconnected - - unknown - feedStartDate: + description: The type of event. + generatedDate: $ref: '#/components/schemas/DateTime' - nullable: true - required: - - id - definitions: - sourceAccountPrototype: - title: Source account (v1) - 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' - 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. - type: object - properties: - sourceAccountId: - type: string - description: Unique ID for the source account. - examples: - - '12345' - result: - $ref: '#/components/schemas/SourceAccountBatchCreateResponse/definitions/sourceAccountBatchCreateResult' + description: The date time in UTC the event was generated in Codat. + payload: + $ref: '#/components/schemas/ReadCompletedWebhook/definitions/readCompletedWebhookPayload' definitions: - sourceAccountBatchCreateResult: - title: Source Account Batch Create Result - description: Status details and corresponding object of the `Create account` operation. + readCompletedWebhookPayload: + title: Read result webhook payload type: object properties: - statusCode: - type: integer - description: The HTTP status code for the creation of the source account - error: - type: string + referenceCompany: + $ref: '#/components/schemas/Company/definitions/companyReference' + modifiedFromDate: + $ref: '#/components/schemas/DateTime' + description: The date time in UTC when the data types were last fetched and input into Codat's cache. 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. - type: object - properties: - sourceAccountId: - type: string - description: Unique ID for the source account. - examples: - - '12345' - result: + dataTypes: + type: array + items: + $ref: '#/components/schemas/ReadCompletedWebhook/definitions/dataTypeReadSummary' + dataTypeReadSummary: + title: Summary of data type reads 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) - type: object - description: The target bank account in a supported accounting software for ingestion into a bank feed. - additionalProperties: false - properties: - id: - type: string - description: Unique ID for the bank account. - accountName: - type: string - description: The bank account name. - accountType: - type: string - description: 'The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard.' - enum: - - checking - - savings - - loan - - creditCard - - prepaidCard - accountNumber: - type: string - description: The account number. - sortCode: - type: string - 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: - type: string - nullable: true - description: Status of the source account. - enum: - - pending - - connected - - connecting - - disconnected - - unknown - feedStartDate: - nullable: true - title: Date - 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) + connectionId: + $ref: '#/components/parameters/connectionId/schema' + dataType: + $ref: '#/components/schemas/DataStatus/properties/dataType' + recordsModified: + type: boolean + example: false + description: '`True` if records have been created, updated or deleted in Codat''s cache.' + status: + $ref: '#/components/schemas/PullOperation/properties/status' + issues: + type: array + nullable: true + description: A array of issues encountered during a data read. + items: + $ref: '#/components/schemas/ReadCompletedWebhook/definitions/issue' + customProductReadCompleteWebhook: + title: Read completed webhook 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' - required: - - id - - accountName - - accountType - - accountNumber - - currency - - balance - accountInfo: - title: Account Info + $ref: '#/components/schemas/ReadCompletedWebhook/properties/id' + eventType: + $ref: '#/components/schemas/ReadCompletedWebhook/properties/eventType' + generatedDate: + $ref: '#/components/schemas/ReadCompletedWebhook/properties/generatedDate' + payload: + $ref: '#/components/schemas/ReadCompletedWebhook/definitions/customProductReadCompleteWebhookPayload' + customProductReadCompleteWebhookPayload: + title: Read result webhook payload 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: - 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 + referenceCompany: + $ref: '#/components/schemas/Company/definitions/companyReference' + modifiedFromDate: + $ref: '#/components/schemas/ReadCompletedWebhook/definitions/readCompletedWebhookPayload/properties/modifiedFromDate' + dataTypes: + type: array + description: Contains all data types configured for the product or a subset of data types defined in the manual refresh call. + items: + type: object + title: Summary of data type reads + properties: + connectionId: + $ref: '#/components/parameters/connectionId/schema' + dataType: + $ref: '#/components/schemas/DataStatus/properties/dataType' + recordsModified: + $ref: '#/components/schemas/ReadCompletedWebhook/definitions/dataTypeReadSummary/properties/recordsModified' + status: + $ref: '#/components/schemas/PullOperation/properties/status' + issues: + type: array + nullable: true + description: A array of issues encountered during a data read. + items: + $ref: '#/components/schemas/ReadCompletedWebhook/definitions/issue' + issue: + title: Issue type: object - description: Routing information for the bank. This does not include account number. + description: Details of a problem encountered during a data read. 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. + description: The type of issue. + example: warning.validation + message: + type: string + description: A message describing the issue. + example: Something doesn't look right about these accounts from Xero. You can see more information in the logs. + links: + title: Links + type: object + properties: + logs: + type: string + description: 'A link to the validation logs, providing details on any errors or warnings encountered.' + example: 'https://api.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/sync/{datasetId}/validation' + portal: + type: string + description: A link to the company's past data read history in the Codat portal. + example: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/pull-history' + readMore: + type: string + description: A link to Codat's documentation with additional information on how to troubleshoot this issue. + example: 'https://docs.codat.io/using-the-api/get-data-troubleshooting#warning.validation' + SupplementalDataConfiguration: + description: '' + title: Supplemental data configuration + type: object + properties: + supplementalDataConfig: + type: object + additionalProperties: + type: object + title: Supplemental data source configuration + description: The client's defined name for the object. + properties: + dataSource: + type: string + description: 'The underlying endpoint of the source system which the configuration is targeting. ' + pullData: + type: object + description: The additional properties that are required when pulling records. + additionalProperties: + type: string + description: The client's defined name for the property with the value being the source system's property name which the mapping is targeting. + pushData: + type: object + description: The additional properties that are required to create and/or update records. + additionalProperties: + type: string + description: The client's defined name for the property with the value being the source system's property name which the mapping is targeting. 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. + - supplementalDataConfig: + orders-supplemental-data: + dataSource: /orders + pullData: + orderNumber: order_num + pushData: + orderNumber: order_num + SyncSetting: + title: SyncSetting + description: 'Describes how often, and how much history, should be fetched for the given data type when a pull operation is queued.' + examples: + - dataType: invoices + fetchOnFirstLink: true + syncSchedule: 24 + syncOrder: 0 + syncFromUtc: '2020-01-01T12:00:00.000Z' + syncFromWindow: 24 + monthsToSync: 24 + isLocked: true type: object properties: - sourceAccountId: - type: string - description: Unique ID for the source account. - examples: - - '12345' - result: - $ref: '#/components/schemas/SourceAccountV2BatchCreateResponse/definitions/sourceAccountV2BatchCreateResult' + dataType: + $ref: '#/components/schemas/DataStatus/properties/dataType' + fetchOnFirstLink: + type: boolean + description: Whether this data type should be queued after a company has authorized a connection. + syncSchedule: + type: integer + example: 24 + description: Number of hours after which this data type should be refreshed. + syncOrder: + type: integer + description: The sync in which data types are queued for a sync. + syncFromUtc: + $ref: '#/components/schemas/DateTime' + description: Date from which data should be fetched. Set this *or* `syncFromWindow`. + syncFromWindow: + type: integer + example: 24 + description: Number of months of data to be fetched. Set this *or* `syncFromUTC`. + monthsToSync: + type: integer + example: 24 + description: 'Months of data to fetch, for report data types (`balanceSheet` & `profitAndLoss`) only.' + isLocked: + type: boolean + description: '`True` if the [sync setting](https://docs.codat.io/knowledge-base/advanced-sync-settings) is locked.' + required: + - dataType + - fetchOnFirstLink + - syncSchedule + - syncOrder + SyncSettings: + title: Sync settings + x-internal: true + type: object + properties: + clientId: + $ref: '#/components/schemas/ClientId' + settings: + type: array + items: + $ref: '#/components/schemas/SyncSetting' + overridesDefaults: + type: boolean + description: 'Set to `True` if you want to override the default [sync settings](https://docs.codat.io/knowledge-base/advanced-sync-settings).' + UpdateConnectionStatus: + title: Update connection + x-internal: true + type: object + properties: + status: + $ref: '#/components/schemas/Connection/definitions/dataConnectionStatus' + description: The current authorization status of the data connection. + nullable: true + additionalProperties: false + ValidationResult: + title: Validation result + type: object + properties: + errors: + type: array + items: + $ref: '#/components/schemas/ValidationResult/definitions/validationItem' + warnings: + type: array + items: + $ref: '#/components/schemas/ValidationResult/definitions/validationItem' definitions: - sourceAccountV2BatchCreateResult: - title: Source Account V2 Batch CreateResult - description: Status details and corresponding object of the `Create account` operation. + validationItem: + title: Validation item type: object properties: - statusCode: - type: integer - description: The HTTP status code for the creation of the source account - error: + ruleId: type: string - nullable: true - description: A brief description of the error. - account: - $ref: '#/components/schemas/SourceAccountV2' - SourceAccountWebhook: - title: Source account status changed webhook + description: The unique identifier of the rule that wasn't met. + itemId: + type: string + description: The unique identifier of the item that was validated. + message: + type: string + description: The message that describes the validation warning or error. + validatorName: + type: string + description: The name of the validator that was used to validate the item. + WebhookConsumer: + title: Webhook consumer type: object + description: "\uFEFF\x41\x20\x77\x65\x62\x68\x6F\x6F\x6B\x20\x63\x6F\x6E\x73\x75\x6D\x65\x72\x20\x69\x73\x20\x61\x6E\x20\x48\x54\x54\x50\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x74\x68\x61\x74\x20\x64\x65\x76\x65\x6C\x6F\x70\x65\x72\x73\x20\x63\x61\x6E\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x20\x74\x6F\x20\x73\x75\x62\x73\x63\x72\x69\x62\x65\x20\x74\x6F\x20\x43\x6F\x64\x61\x74\x27\x73\x20\x73\x75\x70\x70\x6F\x72\x74\x65\x64\x20\x65\x76\x65\x6E\x74\x20\x74\x79\x70\x65\x73\x2E\n\n\x53\x65\x65\x20\x6F\x75\x72\x20\x64\x6F\x63\x75\x6D\x65\x6E\x74\x61\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x6D\x6F\x72\x65\x20\x64\x65\x74\x61\x69\x6C\x73\x20\x6F\x6E\x20\x5B\x43\x6F\x64\x61\x74\x27\x73\x20\x77\x65\x62\x68\x6F\x6F\x6B\x20\x73\x65\x72\x76\x69\x63\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\x77\x65\x62\x68\x6F\x6F\x6B\x73\x2F\x6F\x76\x65\x72\x76\x69\x65\x77\x29\x2E\n" properties: id: type: string format: uuid - example: ba29118f-5406-4e59-b05c-ba307ca38d01 - description: Unique identifier of the event. - eventType: + example: 8a210b68-6988-11ed-a1eb-0242ac120002 + description: Unique identifier for the webhook consumer. + url: 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' + format: uri + description: The URL that will consume webhook events dispatched by Codat. + disabled: + type: boolean + description: Flag that enables or disables the endpoint from receiving events. Disabled when set to `true`. + nullable: true + default: false + eventTypes: + type: array + description: An array of event types the webhook consumer subscribes to. + items: + type: string + companyTags: + type: array + nullable: true + description: 'Company tags provide an additional way to filter messages, independent of event types. Company tags are case-sensitive, and only messages from companies with matching tags will be sent to this endpoint. Use the format `tagKey:tagValue`.' + items: + type: string + maxLength: 128 + maxItems: 10 definitions: - sourceAccountWebhookPayload: - title: Payload + webhookConsumerPrototype: + title: Create webhook consumer type: object 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: - type: string - format: uuid - description: The unique identifier for the created sync. - required: - - syncId - SyncStatusResult: - title: Sync status + url: + $ref: '#/components/schemas/WebhookConsumer/properties/url' + disabled: + $ref: '#/components/schemas/WebhookConsumer/properties/disabled' + eventTypes: + $ref: '#/components/schemas/WebhookConsumer/properties/eventTypes' + companyTags: + $ref: '#/components/schemas/WebhookConsumer/properties/companyTags' + webhookConsumers: + title: Webhook consumers + type: object + properties: + results: + type: array + maxItems: 50 + items: + $ref: '#/components/schemas/WebhookConsumer' + WebhookZapierKey: + title: Zapier integration key 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: - 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: - type: string - nullable: true - description: Error message if the sync failed. - errorCode: + key: type: string - nullable: true - description: Error code if the sync failed. - pushOperationKeys: - type: array - items: - type: string - format: uuid - nullable: true - description: 'List of write operation keys associated with the sync, if the sync resulted in write attempts.' - required: - - syncId - - clientId - - companyId - - companyName - - dataConnectionId - - sourceAccountId - - periodStartUtc - - periodEndUtc - - executionStartUtc - - status - parameters: - 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. - 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. - page: - name: page - in: query - schema: - type: integer - format: int32 - minimum: 1 - example: 1 - default: 1 - description: 'Page number. [Read more](https://docs.codat.io/using-the-api/paging).' - pageSize: - name: pageSize - in: query - schema: - type: integer - format: int32 - default: 100 - example: 100 - minimum: 1 - maximum: 5000 - description: 'Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).' - query: - name: query - in: query - required: false - schema: - type: string - example: id=e3334455-1aed-4e71-ab43-6bccf12092ee - description: 'Codat query string. [Read more](https://docs.codat.io/using-the-api/querying).' - orderBy: - name: orderBy - in: query - required: false - schema: - type: string - example: '-modifiedDate' - description: 'Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).' - dataType: - name: dataType - description: The key of a Codat data type - in: path - required: true - schema: - $ref: '#/components/schemas/DataType' - datasetId: - 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. - timeoutInMinutes: - name: timeoutInMinutes - in: query - schema: - type: integer - format: int32 - description: Time limit for the push operation to complete before it is timed out. + description: Integration key used to authorize Zapier's HTTP requests with Codat. + example: sk_integ_WM4dfoK1nKZnDE_kceze6hWDjbRwOZwG.us + examples: + - key: sk_integ_WM4dfoK1nKZnDE_kceze6hWDjbRwOZwG.us responses: - BadRequest: + Bad-Request: description: The request made is not valid. content: application/json: @@ -5220,6 +5405,15 @@ components: correlationId: bc997528a9d7abb9161ef45f05d38599 canBeRetried: Unknown detailedErrorCode: 0 + ConnectionManagementAllowedOrigins: + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/ConnectionManagementAllowedOrigins' + examples: + Allowed origins: + $ref: '#/components/examples/connectionManagementAllowedOriginsResponse' Malformed-Query: description: Your `query` parameter was not correctly formed content: @@ -5326,8 +5520,8 @@ components: correlationId: 0a40c2f31fc8f992fb88b0853e4166f3 canBeRetried: Unknown detailedErrorCode: 0 - Conflict: - description: The data type's dataset has not been requested or is still syncing. + Too-Many-Requests: + description: Too many requests were made in a given amount of time. Wait a short period and then try again. content: application/json: schema: @@ -5335,14 +5529,14 @@ components: examples: Conflict: value: - statusCode: 409 + statusCode: 429 service: PublicApi - error: The data set has not been requested. + error: You have made too many requests in a given amount of time; please retry later. correlationId: bc997528a9d7abb9161ef45f05d38599 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. + Legal-Reasons: + description: Not currently available due to compliance limitations. Reach out to your Codat contact for further assistance. content: application/json: schema: @@ -5350,10 +5544,10 @@ components: examples: Conflict: value: - statusCode: 429 - service: PublicApi - error: You have made too many requests in a given amount of time; please retry later. - correlationId: bc997528a9d7abb9161ef45f05d38599 + statusCode: 451 + service: StdznCustomData + error: Platform 'qudb' is not currently available for compliance purposes. + correlationId: f63017dabb9b87865573bea95a51e55d canBeRetried: Unknown detailedErrorCode: 0 Internal-Server-Error: @@ -5386,6 +5580,121 @@ components: correlationId: bc997528a9d7abb9161ef45f05d38599 canBeRetried: Unknown detailedErrorCode: 0 + parameters: + companyId: + name: companyId + in: path + required: true + schema: + $ref: '#/paths/~1companies~1%7BcompanyId%7D~1syncSettings/post/requestBody/content/application~1json/schema/allOf/0/properties/companyId' + 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. + customDataIdentifier: + name: customDataIdentifier + in: path + required: true + schema: + type: string + example: DynamicsPurchaseOrders + description: Unique identifier for a custom data type. + page: + name: page + in: query + schema: + type: integer + format: int32 + minimum: 1 + example: 1 + default: 1 + description: 'Page number. [Read more](https://docs.codat.io/using-the-api/paging).' + pageSize: + name: pageSize + in: query + schema: + type: integer + format: int32 + default: 100 + example: 100 + minimum: 1 + maximum: 5000 + description: 'Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).' + productIdentifier: + name: productIdentifier + in: path + required: true + schema: + type: string + examples: + - bank-feeds + - lending + - payables + - expenses + description: Human-readable product identifier for a product. + query: + name: query + in: query + required: false + schema: + type: string + example: id=e3334455-1aed-4e71-ab43-6bccf12092ee + description: 'Codat query string. [Read more](https://docs.codat.io/using-the-api/querying).' + orderBy: + name: orderBy + in: query + required: false + schema: + type: string + example: '-modifiedDate' + description: 'Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).' + dataType: + name: dataType + description: The key of a Codat data type. + in: path + required: true + schema: + $ref: '#/components/schemas/DataType' + datasetId: + 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. + platformKey: + name: platformKey + in: path + required: true + schema: + type: string + minLength: 4 + maxLength: 4 + pattern: '[a-z]{4}' + example: gbol + description: 'A unique 4-letter key to represent a platform in each integration. View [accounting](https://docs.codat.io/integrations/accounting/overview#platform-keys), [banking](https://docs.codat.io/integrations/banking/overview#platform-keys), and [commerce](https://docs.codat.io/integrations/commerce/overview#platform-keys) platform keys.' + description: A unique 4-letter key to represent a platform in each integration. + webhookId: + name: webhookId + in: path + required: true + schema: + $ref: '#/components/schemas/WebhookConsumer/properties/id' + description: Unique identifier for the webhook consumer. + examples: + connectionManagementAllowedOriginsResponse: + value: + allowedOrigins: + - 'https://www.bank-of-dave.com' securitySchemes: auth_header: name: Authorization diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 80ee4e99e..9204481d3 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 @@ -59,11 +59,10 @@ sources: - 3.0.0 platform-source: sourceNamespace: platform-source - sourceRevisionDigest: sha256:9921c592a64e1e36c6c61e4b9340a49935a1bb1e106307b452bac1048c5a2807 - sourceBlobDigest: sha256:84c2b5e7d8a5f4418bbfc36f3bdeb7713d6b3bb9642bab44c28d439c933dff80 + sourceRevisionDigest: sha256:e176a344718f8e9b036c29d8cc197e5e384ee61b1fdc4894ca4e4b8ddaf643c1 + sourceBlobDigest: sha256:dbc37e7b61a982a8097e6bfaaba3b147d363cc0bd352179022b2db432b7e5c15 tags: - latest - - speakeasy-sdk-regen-1770990484 - 3.0.0 sync-for-commerce-source: sourceNamespace: sync-for-commerce-source @@ -142,10 +141,10 @@ targets: platform-library: source: platform-source sourceNamespace: platform-source - sourceRevisionDigest: sha256:9921c592a64e1e36c6c61e4b9340a49935a1bb1e106307b452bac1048c5a2807 - sourceBlobDigest: sha256:84c2b5e7d8a5f4418bbfc36f3bdeb7713d6b3bb9642bab44c28d439c933dff80 + sourceRevisionDigest: sha256:e176a344718f8e9b036c29d8cc197e5e384ee61b1fdc4894ca4e4b8ddaf643c1 + sourceBlobDigest: sha256:dbc37e7b61a982a8097e6bfaaba3b147d363cc0bd352179022b2db432b7e5c15 codeSamplesNamespace: platform-source-python-code-samples - codeSamplesRevisionDigest: sha256:c411719b01d297b69d057743cc608638af61e1670ef218d140876ca421836658 + codeSamplesRevisionDigest: sha256:9cc6f65d7cf9c129b1885a86fb2e1a5ac2758ed3ef4f20e3a377cd74933fb92c sync-for-commerce-library: source: sync-for-commerce-source sourceNamespace: sync-for-commerce-source diff --git a/platform/.speakeasy/gen.lock b/platform/.speakeasy/gen.lock index 66aff6160..39307da51 100755 --- a/platform/.speakeasy/gen.lock +++ b/platform/.speakeasy/gen.lock @@ -1,41 +1,41 @@ lockVersion: 2.0.0 id: ede4f28e-23c0-442d-89ba-baa76ae2da6e management: - docChecksum: df8acbc2fe5fb92425769aa79e41b24e + docChecksum: 06ba849c9ac83fe0fe9cc654586af59a docVersion: 3.0.0 - speakeasyVersion: 1.715.0 - generationVersion: 2.822.1 - releaseVersion: 5.0.0 - configChecksum: 9c5642aeb87bc6b6610291df0c00fb96 + speakeasyVersion: 1.761.9 + generationVersion: 2.881.4 + releaseVersion: 5.0.1 + configChecksum: af401fa43274b29c55cc74e94b87b168 repoURL: https://github.com/codatio/client-sdk-python.git repoSubDirectory: platform installationURL: https://github.com/codatio/client-sdk-python.git#subdirectory=platform published: true persistentEdits: - generation_id: 8ef8eb2a-5fdb-45e8-8308-51aca7d858b0 - pristine_commit_hash: e8c2fcb2263301edccb2c96d20883fcf83dfe900 - pristine_tree_hash: 6315f28ff7943985ed3180cd1cebbb55180bdf04 + generation_id: 8fa7d700-a849-4307-9e65-7e9438031c4a + pristine_commit_hash: c6b8f01cd7c01f4c81f89a01e4fad1c581ddebc3 + pristine_tree_hash: 461460ae1b66239f95c1d42122c66c8280a445c7 features: python: additionalDependencies: 1.0.0 - constsAndDefaults: 1.0.6 - core: 6.0.4 + constsAndDefaults: 1.0.7 + core: 6.0.21 defaultEnabledRetries: 0.2.0 deprecations: 3.0.2 - enumUnions: 0.1.0 + enumUnions: 0.1.1 envVarSecurityUsage: 0.3.2 - examples: 3.0.2 - globalSecurity: 3.0.5 + examples: 3.0.3 + globalSecurity: 3.0.7 globalSecurityCallbacks: 1.0.0 - globalServerURLs: 3.2.0 + globalServerURLs: 3.2.1 groups: 3.0.1 ignores: 3.0.1 inputOutputModels: 3.0.0 methodArguments: 1.0.2 - nameOverrides: 3.0.1 + nameOverrides: 3.0.3 nullables: 1.0.2 responseFormat: 1.1.0 - retries: 3.0.3 + retries: 3.0.5 sdkHooks: 1.2.1 serverEventsSentinels: 0.1.0 webhooks: 2.0.0 @@ -78,8 +78,8 @@ trackedFiles: pristine_git_object: 891314d08a8c421f5bbf7620adb2330f0989ca56 docs/models/operations/datatype.md: id: a54fd5113dc9 - last_write_checksum: sha1:715c0c1a28c74fbb70af415682b78abce4420638 - pristine_git_object: 608b86fb9f68248465f1bc10099307c29f49a550 + last_write_checksum: sha1:a911b62962601a1bcb3ff9233f0f070af65ea383 + pristine_git_object: 22092bdaf52c2eca40e5cd37a5158b934c2b3c89 docs/models/operations/deleteapikeyrequest.md: id: 2ddef61ddbff last_write_checksum: sha1:e6483e046ad56aaaac9c327d4af438248b8c80c1 @@ -178,8 +178,8 @@ trackedFiles: pristine_git_object: 90a05e6425c2efb6d8c997315c2857b163089537 docs/models/operations/pathparamdatatype.md: id: e8c8100da445 - last_write_checksum: sha1:aefedf6380d31ec3d1db6a139238cab576dfe470 - pristine_git_object: 0ab636948da93bd90f372de5600e01b428382010 + last_write_checksum: sha1:17ba73763f3d29697c2428ad0dffef733df1d21a + pristine_git_object: baf6321fcdb50abb9b57e30467dd5300f0a7d259 docs/models/operations/refreshcompanydatarequest.md: id: 6ab46c7fdfde last_write_checksum: sha1:c1a1fc32b6dde90e9c452023ac49ac31efdb45f3 @@ -306,8 +306,8 @@ trackedFiles: pristine_git_object: 304b4451be86dd309ed352da4d560150a1152406 docs/models/shared/connection.md: id: 906ff4b2d85c - last_write_checksum: sha1:174f4ae42d07cd7b491bd546e4fac84f0da41d2e - pristine_git_object: 3d9435bd7aa93d7c8157dfc913cffc7bc1bb5f90 + last_write_checksum: sha1:8d4666f9b7561a07bce529bd6418c2b127d7ea58 + pristine_git_object: 2817473ccf8de0ca5b43127cabfed863ff551d83 docs/models/shared/connectionmanagementaccesstoken.md: id: befe19363d8c last_write_checksum: sha1:80cac80527dde516ba850147d7ae8e3469e285e4 @@ -354,12 +354,12 @@ trackedFiles: pristine_git_object: 33b5234772b24557caf11700650c5a6f6106f835 docs/models/shared/dataconnectionstatus.md: id: 4703bf7d9519 - last_write_checksum: sha1:8ae1df338192f7af309a68358a7c6f4782181e70 - pristine_git_object: 4e79f5d5a49ea486f8c200c95d6a3e96c462b055 + last_write_checksum: sha1:4fc79d9f5f487ffbdaf72fa88e870a8c37d0c298 + pristine_git_object: 9221c42f8124883248d6d1ce83b142f8f7e1276d docs/models/shared/datasetstatus.md: id: cd5f541b33d1 - last_write_checksum: sha1:93b4ab39323df50044ec815f53a595790e931ce4 - pristine_git_object: 42a2243418ff7a564ef9214f96da282d804cea7b + last_write_checksum: sha1:f81e01ed81881fb34b1df080e911bf8101029dce + pristine_git_object: 3ae512f26a22ad0ec9b0be99b530255056f4f6c8 docs/models/shared/datastatus.md: id: 2c8b773421ad last_write_checksum: sha1:ac9002eef1b8cff60fe4ee3bb6880be7810ad11a @@ -370,8 +370,8 @@ trackedFiles: pristine_git_object: 935457bb3796ba75cf8a3e448ac6f083c2be1547 docs/models/shared/datatype.md: id: b71835d2a72b - last_write_checksum: sha1:8837d0a6a994c2f8a8a3806ad41a71d4afe0cfef - pristine_git_object: 593192d4bc407f81e72ddb0d9685452a3a0230d4 + last_write_checksum: sha1:729a264ddb01a4673b05dfe3e5a5b4ae9ff15523 + pristine_git_object: 3352460d2551c4eac29c3269e4d0f9c28949db77 docs/models/shared/datatypefeature.md: id: 7f40a5e35dfd last_write_checksum: sha1:e4df5bfb875d463ee72551bfeb515b99f3955b2f @@ -382,8 +382,8 @@ trackedFiles: pristine_git_object: 57d2cf76cfd1117ef752d571a37082e590dc6dfe docs/models/shared/datatypes.md: id: b5d33c366d5b - last_write_checksum: sha1:c6223d7e53f4f44c15b336e813415908038fbee9 - pristine_git_object: a102001d1aabac47eae15a76822ff269522782e1 + last_write_checksum: sha1:826ecb54e7faa527896826c46dc65c2cc57fff14 + pristine_git_object: 2d59617caf34a54e87381c96cce4689bb39510cf docs/models/shared/datatypewritewebhook.md: id: f37bccbcfa16 last_write_checksum: sha1:16ba33817e67772ae35b0f50aadfeb55753b6964 @@ -402,8 +402,8 @@ trackedFiles: pristine_git_object: 4b5d4654a73510159b9776d8f56c41f9c867c1ae docs/models/shared/errorstatus.md: id: 080dc9ade2a1 - last_write_checksum: sha1:c834679da809f9e78d098bac835d4f7a50f366e0 - pristine_git_object: 02c0ec3d937eb4f4f3eb91cce15adacf83e689e8 + last_write_checksum: sha1:a47bf346a1510dcc4d4c348e95faee60cec607c4 + pristine_git_object: aeb1f5dbd33367a9014c2b741dd0c1e452785159 docs/models/shared/errorvalidation.md: id: 16c1cb223d2f last_write_checksum: sha1:95c0612deeeffbcdad88e43e6ac3b9c5a27dbc5b @@ -414,12 +414,12 @@ trackedFiles: pristine_git_object: fca2ef14a61187257e94508739301789fe95ca75 docs/models/shared/featurestate.md: id: c59194e843b1 - last_write_checksum: sha1:cf15a0de91df35d87801a9a1237573a7f6da1ab1 - pristine_git_object: 64b94306483d9665ad730c0f744976c778a1494a + last_write_checksum: sha1:13b014e7d33faa84059f50d9d43e8a07f072965e + pristine_git_object: effbd1babbd712f0cc1a5745673389fc1571fef0 docs/models/shared/featuretype.md: id: c84f2cede75b - last_write_checksum: sha1:95ceec7489d1d97c47555071c1a1281d62d9f82a - pristine_git_object: b2aa31be05969cd139b368a2027024490967a91a + last_write_checksum: sha1:d8a82cccd1720f10d96a197679472115b207251b + pristine_git_object: 165da727dc975fa48e07b64d6a7269b7c513d54a docs/models/shared/halref.md: id: 6419816ff8a5 last_write_checksum: sha1:3351eecf720075f09f46151fdb5cadb941a45d2c @@ -466,8 +466,8 @@ trackedFiles: pristine_git_object: a5761e0aac988dfe0dcdbf8982161b17a8b3f2b8 docs/models/shared/pushchangetype.md: id: a61fbf2a7601 - last_write_checksum: sha1:98dbae7bcd470ea9ae7e42e32f4914cae6128109 - pristine_git_object: 33a957e790bc8c632b50f505baf07201fedda3cb + last_write_checksum: sha1:8ba8834d82fe962ea611a5fbb38a81955632c269 + pristine_git_object: c2aab63197b638860f83c084da32144523fe35de docs/models/shared/pushfieldvalidation.md: id: 1781a6745a01 last_write_checksum: sha1:1d2c204d98d50e865dd855dd94a9db2b777924bc @@ -490,8 +490,8 @@ trackedFiles: pristine_git_object: 6a06b9c2bb2ed1b8576b43900e93c32afee3e8c8 docs/models/shared/pushoperationstatus.md: id: 72dec332b896 - last_write_checksum: sha1:31bf7c0335cace3dc8c5c88268d6356756350731 - pristine_git_object: 721aaa76b29894385c3e18dcfbc0142b102ea68a + last_write_checksum: sha1:b99e038537cd77b41fc5bcae1c35830bb0d777f6 + pristine_git_object: f0e1d0fe875b70bfc3a0ac65431df86f7b07e29e docs/models/shared/pushoption.md: id: 8f9aac847848 last_write_checksum: sha1:e86653e74a5548b07b1c7494d1c3489d99876a91 @@ -506,8 +506,8 @@ trackedFiles: pristine_git_object: 2bedd19d3a046df928f90fd08a40ae4718db1dfc docs/models/shared/pushoptiontype.md: id: c72ec1304c75 - last_write_checksum: sha1:7e467d3d2f8be49f66b3bf1e4d0b8a96b0c4af1c - pristine_git_object: 2f263a07c562ecf98431789b9e44822ca8138f5d + last_write_checksum: sha1:e30fc787c42bbc20201ac403cb82ab1777bb4f2b + pristine_git_object: c3a5be858bd8b1670da4d48a427ffe24174d1e0c docs/models/shared/pushvalidationinfo.md: id: fa655d40a67b last_write_checksum: sha1:631c72c2e9e4164463b66747ffe42f103ba7ccc0 @@ -522,20 +522,20 @@ trackedFiles: pristine_git_object: b95b0175599f3aee9a02d3acfc158440ba08721d docs/models/shared/schemadatatype.md: id: 434964da1e21 - last_write_checksum: sha1:95543111887bbc1f1cc4197cf38347e0b693fde4 - pristine_git_object: a7b7e6ae33444a7b10aeb4b30d0b71756c08bcdb + last_write_checksum: sha1:d8b309a0ca0d3aa8043c2476cb4c8c1601dd8330 + pristine_git_object: 34468c90fdb9bf7c9852b0d980277decb6364cdc docs/models/shared/security.md: id: 3035c5c37727 last_write_checksum: sha1:ad8f2bb99d7b8a122835078105808dca5b211113 pristine_git_object: 2b68bd0e737786201357cb36c00787f0689e6bbf docs/models/shared/sourcetype.md: id: 89991911fb97 - last_write_checksum: sha1:d51207165a69ba6f7a95db1068d52a3a487a9eb8 - pristine_git_object: 2daec8ef3f42428cf294b01a5c06796dfa5d8d60 + last_write_checksum: sha1:ceb6fe7a3d82daf001b70917bdd204d25f0d42d7 + pristine_git_object: 6ca0721d0bccd11c3376b4b7b0f82278a54f4f52 docs/models/shared/status.md: id: eac4bfd601f3 - last_write_checksum: sha1:503708011b60f445e647b6f45ef08e6a5a854bb2 - pristine_git_object: 2fb340539a5482bdde6e388eb6ed76042a0daa60 + last_write_checksum: sha1:fdaa23d5208b09e3cb2e9edbfff9eabda24f4039 + pristine_git_object: 25ddb4d976b8dbecbef2748785f9742484e70d06 docs/models/shared/supplementaldataconfiguration.md: id: 371e4e26788c last_write_checksum: sha1:cac6e78d3e42a086b61f58651c98d9e22cf41782 @@ -590,12 +590,12 @@ trackedFiles: pristine_git_object: 151edc9ecff673608a2baaef0b6a188f245a4d29 docs/models/shared/writestatus.md: id: 3b3c6ca1483f - last_write_checksum: sha1:21f14959e5318a459d61e7dd0a42f43faab725c9 - pristine_git_object: 2de3b9f6f9121f24943038f8a9828e852f437024 + last_write_checksum: sha1:9097785def8a398f0e4b41e8dc040c8e1b6d9387 + pristine_git_object: c149e9143f0ad06f7c5772ab9ae87eab315b5cdf docs/models/shared/writetype.md: id: bab926a3a903 - last_write_checksum: sha1:e872cb3765fcca9cc266340529785bd125d02241 - pristine_git_object: d11792442eb3b9c31ef4a8540243007a965a8733 + last_write_checksum: sha1:b6d8f39c5a0bacd6d8b0220e696dce4454b0f92a + pristine_git_object: 60a5e4f519495dbdd93a7cc84eb0c3531f092740 docs/models/utils/retryconfig.md: id: 4343ac43161c last_write_checksum: sha1:562c0f21e308ad10c27f85f75704c15592c6929d @@ -658,12 +658,12 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pylintrc: id: 7ce8b9f946e6 - last_write_checksum: sha1:0e10638ea7d22a917f716f609a4c05ca0cd18e91 - pristine_git_object: ba6a998b82e6e5fce3f37f2c3a73b345395d952c + last_write_checksum: sha1:405a401fef1f2af6000d945591041683832b3132 + pristine_git_object: cb9c15d314c1930557401074329ed7a737147919 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:7e505eb3152199b8dbe548afe9772a209e409ead - pristine_git_object: 6cf11f496e0e8d35c9653add952f4ee23af176cf + last_write_checksum: sha1:f5ef78d1634d5b48ed3d247dbfef38ec7abf8497 + pristine_git_object: 871479c4ed117bf1d0582a963abfa345ba858c3c scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:4ff492a010b72808f5ab8df72c3752d467ca2381 @@ -690,48 +690,48 @@ trackedFiles: pristine_git_object: 4be3caf318c87d8de66bc193d3a609771777ef67 src/codat_platform/_version.py: id: 3b695581269f - last_write_checksum: sha1:62bfec9ce1ccccdd34dab75446e5b9bb9dc62f2a - pristine_git_object: 6212e6b51f9a16f8784ff731a9a62c1a44bc365d + last_write_checksum: sha1:702fcfc989b8bf89340fda25904e7da8058c6eb1 + pristine_git_object: e5b32143a229add9ed808befebcf77d726cbc976 src/codat_platform/basesdk.py: id: 020238fb5189 - last_write_checksum: sha1:36706f9f594ab6478d94c7e1de4cb201a86ebe54 - pristine_git_object: f316182777880977f65349e2c887978c95ca99e5 + last_write_checksum: sha1:fe5a0957db512d07b340b36c66329976718d9493 + pristine_git_object: e13deffd2021ce3e6ef9630d3ba9cf78e2e7966c src/codat_platform/companies.py: id: dc6b0275b496 - last_write_checksum: sha1:3d32ed0090ce2edb639f241b1ccfaebbcc80b8ca - pristine_git_object: 19ffee2483978f7dda27467cd03c7e063aa54ab4 + last_write_checksum: sha1:7c9fca1ec2440ef7b70f4b649f1623d29e6cf077 + pristine_git_object: c302d956b84772bbbf26f4306510f71e1959ffe2 src/codat_platform/connection_management.py: id: e48cc5881d91 - last_write_checksum: sha1:1683c92a7716d7463615f3d99c257eb75518c2a2 - pristine_git_object: 6e0ba5ca95e8126ff5a910e6753d07de504b6b94 + last_write_checksum: sha1:d984cf28ff300b2d3be9a9418e40909f55f3d581 + pristine_git_object: 97f7f844bc87cf37682e7b1b9a23ca53c2f0e974 src/codat_platform/connections.py: id: 574216e986f3 - last_write_checksum: sha1:cc4de075cb0d1da06419dcf898fe14240d913c36 - pristine_git_object: b632e822a7a49d40761f5010417d6e027ee94986 + last_write_checksum: sha1:1d80c24c5373af8d07387940cf1bcbb4e008066a + pristine_git_object: 976470e30636a2da45916cb5393758918b203d51 src/codat_platform/cors.py: id: 51a987838b9e - last_write_checksum: sha1:9c82f9aa0a602e8b504f577835c7ab2535a75383 - pristine_git_object: 10fce6446826d12bd8eef3b12e6f34c96a7a3355 + last_write_checksum: sha1:61da6d3bd69f0d9ad375a4ec464dfa6a0674333a + pristine_git_object: 1c4a5e749b041c1cf40d8ec03373f29c0076d9e7 src/codat_platform/custom_data_type.py: id: 0c666abe8ae8 - last_write_checksum: sha1:7173391e302b053203ba0f8158fe970bb0c2f548 - pristine_git_object: b372c12d2c5cf729a33f90abe0da866038d67af5 + last_write_checksum: sha1:801d8c440f60a6a9b4091e5eefd5f65f9c80f693 + pristine_git_object: 0de60ae81adb11df706936e54c706b2cb43734bf src/codat_platform/httpclient.py: id: 278eec761d1d last_write_checksum: sha1:5e55338d6ee9f01ab648cad4380201a8a3da7dd7 pristine_git_object: 89560b566073785535643e694c112bedbd3db13d src/codat_platform/integrations.py: id: 507db6223aa8 - last_write_checksum: sha1:2fbd5e0dee951c9b86a8753a617e4fe99fdb6560 - pristine_git_object: ae66a2a35ef7af0ef054e83e0389f29f485d7536 + last_write_checksum: sha1:0ef4cd4b71eee86750d662fe7a17b5b1d9b31873 + pristine_git_object: 3d24eb82ca34d64ed838004e89c86472a85c830e src/codat_platform/models/__init__.py: id: 76c8b334e151 - last_write_checksum: sha1:fd931d5c2d58b5f9189cc897e038d6d78e362dab - pristine_git_object: 726fc5eb391035492b4bea383d91cb7e23da04d3 + last_write_checksum: sha1:f7f5bfac48ce9275899dd82ccf382af1b9c6766f + pristine_git_object: d78064cca9ad6c97e11839ab7b37077df133f9b0 src/codat_platform/models/errors/__init__.py: id: e8f544c0ee0a - last_write_checksum: sha1:6aba2e481a9b48309009f96b86417030163fa7eb - pristine_git_object: 482de9ef352f5d16de6e0ca101e62f91d91c2a3b + last_write_checksum: sha1:0b25eabafa3cc6b2a2091b06930e17ea594c020f + pristine_git_object: 85298753793c03d4abcea04282261a732230d49c src/codat_platform/models/errors/codatplatformerror.py: id: 66c863da4136 last_write_checksum: sha1:2784455d1614f23bb1b4639030ef492279184170 @@ -754,24 +754,24 @@ trackedFiles: pristine_git_object: 609bfbb1df4612df43791c801e10e64af18f16cb src/codat_platform/models/operations/__init__.py: id: ca519df3b292 - last_write_checksum: sha1:717a32489e2a34bc3b70c73f20e212a163ef4fe8 - pristine_git_object: 69be7cbe350b39f75290cef3cfedf415f09a601a + last_write_checksum: sha1:640683038c4426369ea209d34a3aaa570c1ef0a7 + pristine_git_object: 93b2da71fe844f27cb9560725321af09aa392ecf src/codat_platform/models/operations/add_product.py: id: fa8181e5db25 last_write_checksum: sha1:4c28f0ac88ec78ec9ae8eea0fc5fa458a90a67a8 pristine_git_object: 4b2c37d7b7bf24b76118269834f10e20144ee604 src/codat_platform/models/operations/configure_custom_data_type.py: id: fdc1eeacb016 - last_write_checksum: sha1:bad1e9308fcfa2d516f2233f7efda9db070c8aa5 - pristine_git_object: 45236270d2aab2812f6df13a9c75cdb4a85fd2e8 + last_write_checksum: sha1:556f1451ef98a56d6fe8b7556f736880dc2a250f + pristine_git_object: 76aec6814f0081027e82454b1a849dd9b8399aaa src/codat_platform/models/operations/configure_supplemental_data.py: id: b8e12ca84957 - last_write_checksum: sha1:43d6a0329347a07c140889edecaab6672337efd0 - pristine_git_object: c1ac5bfb49ac6ce98cd398e550c2fc50b85dcefe + last_write_checksum: sha1:b286976c447e304bfc3c1727e27c8623f6dff2db + pristine_git_object: 9c7c7da1bab4ba1f61b17aaaf4deb172990d230e src/codat_platform/models/operations/create_connection.py: id: 94c5fb46b5e8 - last_write_checksum: sha1:4ee6fbb54d4289e5bf06f28c3d62648378af6b9e - pristine_git_object: 277ad1d6d0fd5b546c042ad6498accb763da8268 + last_write_checksum: sha1:69c3a672ff82007abcd18e7d4150821dbea18652 + pristine_git_object: 07f22aec244aaa4a60a702750de95a57b52cd336 src/codat_platform/models/operations/delete_api_key.py: id: b11e7d5e04af last_write_checksum: sha1:14062c929c09d62ceb62216dd177b35fb5823625 @@ -802,8 +802,8 @@ trackedFiles: pristine_git_object: 70a004263fd7aab9bf7a5f5a9a0770cbe2df1125 src/codat_platform/models/operations/get_company_push_history.py: id: 806294aac95d - last_write_checksum: sha1:192f095e547d61164e3e58f3f08883b086722f98 - pristine_git_object: 0464fbf7665b508c814930e145c472ceffda5016 + last_write_checksum: sha1:766849ddc4b7b22cdd7df13e498b9cffd03d64fa + pristine_git_object: b12b2b19c845f2eb3d7e92957654b35b158ee507 src/codat_platform/models/operations/get_company_syncsettings.py: id: 0ea766e42fed last_write_checksum: sha1:af0d32b1e07259df4bba264912bec8465cf27f89 @@ -850,24 +850,24 @@ trackedFiles: pristine_git_object: 7b4aaf8f37a7609590a95e3900aff5f98b6c7640 src/codat_platform/models/operations/list_companies.py: id: b6fd6218e851 - last_write_checksum: sha1:2dab1482cf1c0052db0b7fe5f888dfd0c838e0db - pristine_git_object: b34cf1d94356b6ee5aaf5b17de55f209baed1193 + last_write_checksum: sha1:354e77560f169b7e7ef0ff0c131017b5532003a9 + pristine_git_object: 087d57fbf3ca05856bcd9c98dcb1cbb4991ecbe9 src/codat_platform/models/operations/list_connections.py: id: 55adb7daf07e - last_write_checksum: sha1:bfbf32fa896cd88011df0ca887a2cdb4278fb2ec - pristine_git_object: 80779f3bf3293431731363c88c493660704d30bc + last_write_checksum: sha1:794c80afc8254b1261bc88be8e597d5ed24eec92 + pristine_git_object: 12d7c6738551595dbd5f0da510f7970ac315809c src/codat_platform/models/operations/list_custom_data_type_records.py: id: 438f1a4a97aa - last_write_checksum: sha1:0283f7b1064b90b1df9ef38ecf1f212b8ef4883c - pristine_git_object: 01f9a25463aa0fea11baef33d8f4d315cad9e9db + last_write_checksum: sha1:54fca18a7196c65834d02e39085fed74aaee16d7 + pristine_git_object: d2b7f2240949a9af572abc88391dd301a1190f44 src/codat_platform/models/operations/list_integrations.py: id: 14bd7ee8ff46 - last_write_checksum: sha1:4139960e522717a687e33e1ea9381e2f0aaf299e - pristine_git_object: 1390568894c8ed1bd923c2369e594cc7502100c1 + last_write_checksum: sha1:0a6cbeb63f66ae3261b04d054b06673378913845 + pristine_git_object: 2fcd767752d0dafdcbbee670b505ab487aaab6fb src/codat_platform/models/operations/list_pull_operations.py: id: c08948bf2ad8 - last_write_checksum: sha1:abd43c1398a0c7c4115bfe3384a075598b1283f9 - pristine_git_object: 2c91ba33b4cfaa4bd06829c2b1040656b13558d0 + last_write_checksum: sha1:df1785b47c230c32df515e4cd904d34459721284 + pristine_git_object: 458689b8c991368e89be47a58c8d013ffc23604c src/codat_platform/models/operations/refresh_company_data.py: id: 65f8ffe74341 last_write_checksum: sha1:de77326e31012a1159b919b968f016dd8b2a8219 @@ -878,204 +878,204 @@ trackedFiles: pristine_git_object: 8802da44d5b99890f0f19be95c4f1be712506b1b src/codat_platform/models/operations/refresh_data_type.py: id: 478ed4db036e - last_write_checksum: sha1:26a24658dbe39ec5cc65b51ed6b6d86ddb132674 - pristine_git_object: f7b7e2ceb4771796997cc18576b6676601360d03 + last_write_checksum: sha1:8b152b854aa7c4d87e39c3895edb125fdf65f0e2 + pristine_git_object: d31e246d47b125b61bc0231f4ecda66bd1314fa3 src/codat_platform/models/operations/refresh_product_data.py: id: 07fdcd9c2fd0 - last_write_checksum: sha1:2a9a17bfcb50527d67fbc734d2231c4efed4ab9d - pristine_git_object: f2fc1fd9a540a84cae3029f8061f4028d1156d01 + last_write_checksum: sha1:73e5c497ddf2304574d0f990ef2f52115e0e5972 + pristine_git_object: 028875929cb4191fc4f3a662f1b9e14e3c646c56 src/codat_platform/models/operations/remove_product.py: id: 61875672a33e last_write_checksum: sha1:6ed625bc90bc6adf8c91bd7988de8e7cddb7f68b pristine_git_object: 46ac60020c21f4844f2a1f3addc4c8742e36787a src/codat_platform/models/operations/replace_company.py: id: 6b39552bacf6 - last_write_checksum: sha1:78c9f93b809140a42a6538cb6e882a53615a88cb - pristine_git_object: d29f97d295af5895569cefd2d21e67e0b00873a0 + last_write_checksum: sha1:d4201917cbc6c7c59ac110d2b5be6c6809ca794d + pristine_git_object: d82d6a22649e44713ada665decde04f48fdc44cb src/codat_platform/models/operations/set_company_syncsettings.py: id: 80ed4095b1aa - last_write_checksum: sha1:9793b719fcbe6a1503ddd6f215fbdeee3ce09130 - pristine_git_object: 7979cca6b1ea69e86cfd860c9f15065deb0ecf0e + last_write_checksum: sha1:1786f2cffd37009a45e76b322873b1874e326a54 + pristine_git_object: 64a93588c2deb3622dc82d0c57f6628df7e8551a src/codat_platform/models/operations/unlink_connection.py: id: c05a9382ef68 - last_write_checksum: sha1:25ddd5a80f7c67eabd713638fc2eb36cc5041157 - pristine_git_object: 287b978ca0bafbe96a093951f04b1373488217d3 + last_write_checksum: sha1:98f3b5c099c91cb35b4a633fa613e71a268818cc + pristine_git_object: 08865e03cbf114a519ebf4d65d7e441645976f77 src/codat_platform/models/operations/update_company.py: id: a279b55e09ca - last_write_checksum: sha1:e7b02ed86ddbebb895c1e060c33cc00aca55f43a - pristine_git_object: 805e5fd25a23fc89e5beab4d508199f9946508ba + last_write_checksum: sha1:7daeb857be6b870b74f6115393c3b8f3c36a7c04 + pristine_git_object: dfd4433c8ccc1fe5d5e937b6a37e5b5336d71473 src/codat_platform/models/operations/update_connection_authorization.py: id: ac8c2b016ef8 - last_write_checksum: sha1:6d39d267c481058780cec05d9ea1afb2c3aab1b0 - pristine_git_object: 3d4faedfbb2a6f4941f41e1d25ccd4f99b6beb8d + last_write_checksum: sha1:1c3bae7f9ba42780aabead9979e1d6d6f8881898 + pristine_git_object: aa76da47a339e20151b3f76776aa681024870d6d src/codat_platform/models/operations/update_profile_syncsettings.py: id: 17768bcbcef8 - last_write_checksum: sha1:23bd5c462ba02fe8f01ddfad5cd0fb4422f14455 - pristine_git_object: f8a73abac9535031173223445801e34edfd6bf05 + last_write_checksum: sha1:76486aacfe4cbc303dbdecf7456eb28e9d6cf534 + pristine_git_object: 29ab4252b41116d63d286c10aca7d80cbd2d9dc5 src/codat_platform/models/shared/__init__.py: id: c99467e62654 - last_write_checksum: sha1:3c6e3099467efe2087ec9a349d9b8daf6a694d36 - pristine_git_object: b79bada28e67881ff3374e8dfe37f3a937ee00c4 + last_write_checksum: sha1:fcf43c159ce9d2d3aa22b02b3c0f43a090f5560f + pristine_git_object: fba41c37a16d9ceb503dff8e25785068d2e42152 src/codat_platform/models/shared/apikeydetails.py: id: abcfc9ee762f - last_write_checksum: sha1:16e78dccef440e326b93b12cae02eb0a39dba6f8 - pristine_git_object: 6ac9e4d5fc14d5dc6ff2a9f7daa08995ff5cec11 + last_write_checksum: sha1:2d3475301bf53e7de88c1226351ef507aecc83e4 + pristine_git_object: 6cb802ad63cc3b33737dab90f4815ce38919479d src/codat_platform/models/shared/apikeys.py: id: b8ac7e0edc77 - last_write_checksum: sha1:8908e75a4415423e1f18c6193fa23cd0608684a6 - pristine_git_object: 9e8c72d6c55a583e09973ad795f7b7b1045b3c51 + last_write_checksum: sha1:69d05f557508875e1d08186615c55aec19d296c8 + pristine_git_object: b1f65cd544de5d6069681c16be260ba5e6d1f6bc src/codat_platform/models/shared/branding.py: id: 8dc504a3445b - last_write_checksum: sha1:4ec44035ea95ff27b22b79b6a7585373f4c86e8e - pristine_git_object: e3a114f94dfd7a209994297689e9488dc7d608b7 + last_write_checksum: sha1:2839ea4c93c202028b6c9d51c2a02fb1a574086d + pristine_git_object: 6b93d19c485ee6ffcee2d350dd9aeb2e7c017120 src/codat_platform/models/shared/brandingbutton.py: id: 4b48457c0ceb - last_write_checksum: sha1:a2d12fa479045e7c0451c1b3d36d70d23826d142 - pristine_git_object: 4ce1bdd9ac0dd6ecef17b5ffac1da7684aba7479 + last_write_checksum: sha1:97674b6135e88c67f69f742904651c8f89031f4d + pristine_git_object: 99ccfdc71b9b6542a0a41806eb281ab223666836 src/codat_platform/models/shared/brandingimage.py: id: 38140473256a - last_write_checksum: sha1:68858ee34d4bfd09497437c495e3383e805af1dc - pristine_git_object: bda8653904ff22e7f77f5bcb1caa17146e57148c + last_write_checksum: sha1:6f3d2eda9a206519cbb848fda505c3c2d7e2b7af + pristine_git_object: eefb28e6b78b1d551cde5979b9619e1ad26b287f src/codat_platform/models/shared/brandinglogo.py: id: 1bafc2a3d8fa - last_write_checksum: sha1:92aa39555b080fafd430b332f8d7fa324cde61e7 - pristine_git_object: a97bd15aec932e71934974cace301955fa3d957b + last_write_checksum: sha1:4ad5c1e08aaab3b5b982bd25f34c449b8c09bd46 + pristine_git_object: 4f98e8775ac37afd929ae94e7a7b609a103e064b src/codat_platform/models/shared/clientratelimitwebhook.py: id: 2777f312856e - last_write_checksum: sha1:be21884ba7bc147f8903e9b514b7cc9e6ffb9e5d - pristine_git_object: 092fcf83858d154543a99db07b2c61c259571e98 + last_write_checksum: sha1:d95ed26eed9f621a7a7054a5b34e5a7140fd594e + pristine_git_object: 61ed5cac9d5c26f2381d43a5f486a06c4e3a7c4a src/codat_platform/models/shared/clientratelimitwebhookpayload.py: id: 387056cba98c - last_write_checksum: sha1:c812920c4a0daad3902a241f227958d4a2a401f7 - pristine_git_object: 3708ac32fbaaf9adace45c02e23e52ca58bd1425 + last_write_checksum: sha1:54c6dbaa55cc0cb1cbe6c6e871aba7f56fb9ef91 + pristine_git_object: ae4fad44e363cfca115bcdbe466e9cdfd733a7c2 src/codat_platform/models/shared/companies.py: id: cdf8ca096ee9 - last_write_checksum: sha1:1a3911384bab8473eb8a72134ffefc32ceeee9b0 - pristine_git_object: 88180cfde8dab6b236d58b7f7edbcc66ffe7d671 + last_write_checksum: sha1:d1d0a4314433baa8b67864987d5e5ce23294f46a + pristine_git_object: 23a9821ddaa647020a0a263b7a4549cab4e3d620 src/codat_platform/models/shared/company.py: id: 24eb614db79d - last_write_checksum: sha1:6b92788420749e9a14ee8756eba68bf61895c2c9 - pristine_git_object: e559e9719fd33ac676236c55c0b1e7b21820fc9e + last_write_checksum: sha1:360a9fea83d09c3f5c653a56b7d0630ee73e4a5a + pristine_git_object: 6337dfaffd01895a8ac371c877a493d25aa90719 src/codat_platform/models/shared/companyaccesstoken.py: id: 5e03b443bf78 - last_write_checksum: sha1:7f6e74f0208e47ada048a337f2cef71b9b726230 - pristine_git_object: 1fb483a190b2555a86e38e1ff22a9a0eeb81d4d0 + last_write_checksum: sha1:62086c14d1acf8ffee916db7815d8d733d0dbfa3 + pristine_git_object: 6d97a46d231a66dbe3bd8be739db02488d5f9b2b src/codat_platform/models/shared/companydetails.py: id: bd21674c1148 - last_write_checksum: sha1:90141df6aaaee91eb7cbd12d5af2ab34da89adb7 - pristine_git_object: c85ee92b3d83bf258b320e295fbbd1a1197e0797 + last_write_checksum: sha1:20f3a8c696cc60520209ede843b8353eefc2aefe + pristine_git_object: 4057d5798cd4dbd0b9b0f0b57b2f389efeb7445b src/codat_platform/models/shared/companyreference.py: id: 53864bac878d - last_write_checksum: sha1:95f37b9d01bda12a080b0f3248b6ce70089e94f7 - pristine_git_object: 66e00e28360519fef33454dcdf81224fc5e64684 + last_write_checksum: sha1:de46388536402576bec6cc1579b02346a8d2a661 + pristine_git_object: 1396b267faee9ac156c3f31b7aa9a6437da480d9 src/codat_platform/models/shared/companyrequestbody.py: id: 8c3b2c61a2e2 - last_write_checksum: sha1:f9f4e1b36bfcad5fdc5e19ca6766ce6b525e6e0e - pristine_git_object: 550d5247d924cab7408ca740bc574c0f223ce185 + last_write_checksum: sha1:c3271afa6bef7581ea66703b6845f91226a8aa8b + pristine_git_object: 8c822ec124df1ba837e8ef2c97ba8b7a27c2af95 src/codat_platform/models/shared/companysyncsettings.py: id: cd9185a334c3 - last_write_checksum: sha1:a15e706c1858a4d69cb29c457d4110a372d4ee95 - pristine_git_object: facd2d3f745c811e431f68846ec78592980ce9ab + last_write_checksum: sha1:55bc9d3dd8b02ce176b506f7c8aeddd28369a41c + pristine_git_object: f66ac8057baa2c1f4f92aba75e90b2e3d53384cf src/codat_platform/models/shared/companyupdaterequest.py: id: 15760ceb1d6a - last_write_checksum: sha1:018b62c760898b5ac2569fdbcdd58f91e9987fe4 - pristine_git_object: 50dddfae9d77d1555dab7ddb1b217b4b3601b183 + last_write_checksum: sha1:e317435694b262b75d3af082c2a0ed9dfbd3a5b7 + pristine_git_object: 2c26aa7ed87174801ce768096b3b967887d03bf4 src/codat_platform/models/shared/companywebhook.py: id: aefd4d48246a - last_write_checksum: sha1:ca0f083f45b3718044addc05f0ac2f8d85534186 - pristine_git_object: 1635ae44dde5c38fa35bd7e91726087e04650346 + last_write_checksum: sha1:6675713a6ea1d17aeedbe5f46ef22ffaae703116 + pristine_git_object: 403d3325e16a9f5d95fdd17f2912db0f16f77a84 src/codat_platform/models/shared/connection.py: id: 5c751c1d3c27 - last_write_checksum: sha1:18a724eeda1b60dd3b7eae0c3f1da62ac24acb7d - pristine_git_object: 8c9db9da8827e4c716cb7708f6e87974e6cc6fa8 + last_write_checksum: sha1:2476a9771eba68794eeb42b870948b2534d6c8aa + pristine_git_object: 9594c099c633d74d3657ab478dabe719f25f999a src/codat_platform/models/shared/connectionmanagementaccesstoken.py: id: 21007cb4b8ac - last_write_checksum: sha1:a01efe1d0535d5ab52957d53cc5e6ee55cb0f1a1 - pristine_git_object: 40f8e3e8456bdf4e62a9c116ed181723373b47a8 + last_write_checksum: sha1:2f376ef04e2702ddd4a0d529e88702e5e6f8b43e + pristine_git_object: 39f35980ddb4151e4a94b9f7eaef4ff25c460e3b src/codat_platform/models/shared/connectionmanagementallowedorigins.py: id: 169da2f55b18 - last_write_checksum: sha1:53f5010db03c7193b65df4e8f142f4c1496472c4 - pristine_git_object: 282c288201d9795210b01f176937c365e00a86f8 + last_write_checksum: sha1:851c00ab474665fc07a2149aeaff08b88bf62f20 + pristine_git_object: 4d6785fc55f043943f16532becf45643d6d65f6a src/codat_platform/models/shared/connections.py: id: 6b7b49a18e19 - last_write_checksum: sha1:aefc7a94d45e426e5c55f5cce6b523c14db8db38 - pristine_git_object: b8a92dd64efc06e5c68206d6318ebdb19dfc2fa5 + last_write_checksum: sha1:2fcac65ca3e16e61acf71b14567306783f7deccd + pristine_git_object: 83a7b5ff5eb3c549aa081e254bdcbcaff0628a8d src/codat_platform/models/shared/connectionwebhook.py: id: 6d6b018fe0fc - last_write_checksum: sha1:b0adc52331d6c1be355853b27ee8a65d865814f1 - pristine_git_object: 7fd1116dead8a78a543ab34a4d509f608a1421a7 + last_write_checksum: sha1:edb24258c46e181e648c5e0f29f02ecda257f4e4 + pristine_git_object: fd864f1312c499c1094a078884dee554eae09e15 src/codat_platform/models/shared/connectionwebhookpayload.py: id: 2b03df3fa148 - last_write_checksum: sha1:402300d4188b217fd9f7afd4965252ce89050857 - pristine_git_object: dfaca654799e4b97a9db909512a04708f3e6116f + last_write_checksum: sha1:c0bbbbdc8d272ccb3051d56cffd07257d98f7159 + pristine_git_object: f85c6879c71cfeee9f20a64df4d29629a1d95231 src/codat_platform/models/shared/createapikey.py: id: 719cd6d51cf5 - last_write_checksum: sha1:3f7d76953233f524871895d9d4e9ee8b6c09af4d - pristine_git_object: b288da5e03e09bb31f77a229595854a089f554e1 + last_write_checksum: sha1:72a096276008bdfc4291a22d23c218fdebedae34 + pristine_git_object: 871b23864c3a88b03f145b95ff513fd2c4b6af5e src/codat_platform/models/shared/customdatatypeconfiguration.py: id: 8cc9caf75bca - last_write_checksum: sha1:492be2cad76ccb391bfde9b801be0b24fd4a41c0 - pristine_git_object: e0dcd7424208ee6dc4183a1dbfe60fbafae597ef + last_write_checksum: sha1:30425287842bcc3d4e3b4c0a61ac44084c87b585 + pristine_git_object: f96eb0cf2f4276aed7c9346cf4d9ff2074ac9d79 src/codat_platform/models/shared/customdatatyperecord.py: id: 0ddf6d38e553 - last_write_checksum: sha1:2522a8dba1e7285634df2ba5882275604f02b956 - pristine_git_object: 276de26b53d9d05df42e6ff28dcedab8bb35ae03 + last_write_checksum: sha1:31a92be67ff112b9e1aded8afda6ae3312c2f4b5 + pristine_git_object: 1553f9940b5d3708ecc50ed26597c5089897fabc src/codat_platform/models/shared/customdatatyperecords.py: id: 945aab189383 - last_write_checksum: sha1:42bd4cbf3f46c2b52b50484db157412c47b8b5f0 - pristine_git_object: cf28a21160dabcd14072e6aa0f504be17d6e90a8 + last_write_checksum: sha1:65468a689861f54757856d26afe3483423a4acd3 + pristine_git_object: 8831646aefa78d26a4199876ffe639c7f4a3a5fd src/codat_platform/models/shared/dataconnectionerror.py: id: 8fa8819765c0 - last_write_checksum: sha1:8ddadd819d334dd799327cceb442374be2a6b12d - pristine_git_object: 77e915d1c9861afc083c6865a00551f8309bfbf1 + last_write_checksum: sha1:2f9fc2af79fa9a59149dc58704386af47bef844a + pristine_git_object: f6c0b28451cb06b642eec807bcf77aba53cf77bb src/codat_platform/models/shared/dataconnectionstatus.py: id: 68f6a7efe089 last_write_checksum: sha1:7acc81f8f37f266c26a45828d3b5bf2cb63c3b5d pristine_git_object: a97f7be301fae66aed392cc85bbec15fa366e2aa src/codat_platform/models/shared/datastatus.py: id: 9effa0b7ff66 - last_write_checksum: sha1:094686f084fe46cc4d802701e21d9477da7d5722 - pristine_git_object: 2ec19d2ca1527e574c91ee89db2819e244831041 + last_write_checksum: sha1:f998e09b477b280903d97b24bfb92277a6f7d627 + pristine_git_object: f3c1069cf9aa5c226bafbf807aad5810cc37b4b9 src/codat_platform/models/shared/datastatuses.py: id: 3a62ff12db96 - last_write_checksum: sha1:234964415d78478098b66a0d39c4d81325c71644 - pristine_git_object: 0c8d38d7c0138b227ccc5d35e6c69fddca405516 + last_write_checksum: sha1:ff6229a9e84fc2ee4f5801847ad53f32925c5b92 + pristine_git_object: 8bb61fb5b7bc36a4ebbec46d54c605d6a1efab19 src/codat_platform/models/shared/datatype.py: id: e9dff90addf8 last_write_checksum: sha1:95c90fb6624fbc1dbea0b8b0bd81ee18f32039b0 pristine_git_object: e0aff6fb80c57f375add51978ca0e60a6b031487 src/codat_platform/models/shared/datatypefeature.py: id: 492b3bd9bddc - last_write_checksum: sha1:ad1915a77cae2fdbd4dcb6a586535a49c597d75f - pristine_git_object: a38d7e2054d906863675620a0eede0a071ffcc33 + last_write_checksum: sha1:76a85c2071483394f744ef1c46f663bbbcf8d71f + pristine_git_object: 18b60e23b403ffdc72242eaf4ff96ec252b2b21a src/codat_platform/models/shared/datatypereadsummary.py: id: 38c80e6c69eb - last_write_checksum: sha1:07d7c39ceec14c93eec233e00af419146d1913be - pristine_git_object: 8d23dd62ddfdd810ad70972716deec5eb1c3afe4 + last_write_checksum: sha1:d074139d8c7748c7d8c5a03539d48d759c004606 + pristine_git_object: 9ca055acd954a6bf43e5021ece679c9096908e3d src/codat_platform/models/shared/datatypewritewebhook.py: id: 5363f9265fc2 - last_write_checksum: sha1:c42510daef374b02bc257e8703e26d7fdd3aff44 - pristine_git_object: 27b6af9601c6fa3628cf6d56a7a0ce0cf72b5337 + last_write_checksum: sha1:c6afa1a9dd2671860c43540bf2fd990aa2f8b7a3 + pristine_git_object: 6eb7da3e205427441a9c94fcf49aa3782a794d2e src/codat_platform/models/shared/datatypewritewebhookpayload.py: id: be98a4a47086 - last_write_checksum: sha1:fba2656f77d7e54db0aaab24169b1b0d03509032 - pristine_git_object: 3b8e2d096b7b18d4fd25f31459ce934e8a05e293 + last_write_checksum: sha1:07937292d4e8fc320730039c85789bb1a59fc97c + pristine_git_object: 9aedccf949bdede88cadbc8e3b24e5f162071a71 src/codat_platform/models/shared/datatypewritewebhookrecord.py: id: 47566d5d2a2c - last_write_checksum: sha1:64a959a86e1dce6be647a6588bee0e167e783e0e - pristine_git_object: 9b8098bb1eba3ffa0166562f3b98dabc7e67419a + last_write_checksum: sha1:dc29a2dfa0ce83a491af8325617759f1aa59812c + pristine_git_object: 18d438a6f0851624af5e6fbe022b22abcfc05eb6 src/codat_platform/models/shared/errormessage.py: id: 605d0e2f740c - last_write_checksum: sha1:50436a5aaad47193a3282b25fbe2d05650388f63 - pristine_git_object: 1c5b6555f9bdb76b4e08c85a17a8da7d50e289f6 + last_write_checksum: sha1:33965c42ed236fb6bfc231182b76d67ec050c23d + pristine_git_object: 848815ba25af3525d3822d09fcd5dae714bd343c src/codat_platform/models/shared/errorvalidation.py: id: cad1224d2143 - last_write_checksum: sha1:80de154dbcd0f8cb45a1f0aa38e39d905f775069 - pristine_git_object: 961663aa77fb47b00741249e4b10549728056e3a + last_write_checksum: sha1:3693b579df61558820e121d60bb73b2188faa375 + pristine_git_object: 9e01b317e2bae5d7f57d421a83482120d95015a9 src/codat_platform/models/shared/errorvalidationitem.py: id: 476ad650de9b - last_write_checksum: sha1:80c1650f4f4523aa684b81d5226f8457f57b7169 - pristine_git_object: 4d667fd27f2bbb50b3e45fa7c5718b19774a6e81 + last_write_checksum: sha1:eba3fe7cea28845f2bae27d4ca179d393566fa2c + pristine_git_object: 1934ed7385b7a4d6b49f9432a5367649f5b2a7a3 src/codat_platform/models/shared/featurestate.py: id: f0bb0fc6fc80 last_write_checksum: sha1:68156dda53b96c7cfb8e204e58910353bab845d5 @@ -1086,96 +1086,96 @@ trackedFiles: pristine_git_object: f0c620a36ec9b1e8e82268d0714c964aa7f6df24 src/codat_platform/models/shared/halref.py: id: "127343899207" - last_write_checksum: sha1:8fa824365dd0f21fefa8a20167ad89fcf20d01f3 - pristine_git_object: 229ca62993711cee064c5284ea1db400aa786400 + last_write_checksum: sha1:3eeab75563751b3cf58ed7ad242e7d9812b2f2ee + pristine_git_object: e3b0a36292f7430fe9c4503d60b188d0fb8a30b4 src/codat_platform/models/shared/imagereference.py: id: 7467956955ea - last_write_checksum: sha1:e28185f20788a8c43633276df5f8d18e18990650 - pristine_git_object: f2154d917dc4a2e337d3b2abf8355710cdbfe201 + last_write_checksum: sha1:64bcfeec876b17f67f6bf1b2fed90e3eadef50c2 + pristine_git_object: 2dabc4e26c7dd0a9e3744c3d5dc9cc01336910ea src/codat_platform/models/shared/integration.py: id: 041713173b69 - last_write_checksum: sha1:af959f73a95b6e34e98e95f3a8511db7471ec16c - pristine_git_object: 6b32127d556db5b82ddee90abb91581818cd7741 + last_write_checksum: sha1:42b4c87ae14af7fdb14a88bc0def895a564f4984 + pristine_git_object: 3d7a786c49e2c81b07204ff786dfd241abd3259f src/codat_platform/models/shared/integrations.py: id: 35cf3eb8ff67 - last_write_checksum: sha1:ca76f9ca16ae17fe0b82c582164ebaa5eb40464d - pristine_git_object: 64851ed1130503f63cad15f5182acd59a293c57c + last_write_checksum: sha1:705fac029878f51203e5975c92aa6b8bf5ac67fb + pristine_git_object: 9b36dcb26fc936b64f618bb0b9c12961bea3157d src/codat_platform/models/shared/issue.py: id: bb6cbf02a8ff - last_write_checksum: sha1:644661f80738c2c501f4484faebfbb79864d6112 - pristine_git_object: c31955278fe4142a151de50a1990b3b6011af05c + last_write_checksum: sha1:9af0e4f1f3ca6d146a8cbd1a3010cc084bc5f186 + pristine_git_object: 53cff7d7c531c3fe8ca268d86670d52f3e20094f src/codat_platform/models/shared/links.py: id: 029edddd5b3c - last_write_checksum: sha1:ad0957589f4f1204369cc44ef50e72e26234a0e5 - pristine_git_object: 6d8d9aa07dacfbd3479417017fb458a585385045 + last_write_checksum: sha1:a6de6da891a8d4f854d2fa931116c34099127b7a + pristine_git_object: 652c44d57406b15559fdb7bb1f82ffc2b45234e0 src/codat_platform/models/shared/profile.py: id: 64f636899630 - last_write_checksum: sha1:7b7efad017c4d5c5c05d4d4cb33a62dd256df8f3 - pristine_git_object: a992ddf389ce7c657db4098e06b45fa5084ae16b + last_write_checksum: sha1:3cbe1db9cff16463a67cc0c690c9389dd53cb25d + pristine_git_object: d85c8aace4b7e14ce2bc92a8e046832cc820e78f src/codat_platform/models/shared/pulloperation.py: id: d4b41e2b26af - last_write_checksum: sha1:367a8b9399b4a3c65716e09e1ea88c3baa162f88 - pristine_git_object: c69be551563cba60e0481096dae5223d08a8cc1c + last_write_checksum: sha1:21fad361473962cc58ede080f517e0a53658ea1d + pristine_git_object: c70b8a4971d4ecc1b4801f08e273cf55789dd9fb src/codat_platform/models/shared/pulloperations.py: id: a9527cc6b05e - last_write_checksum: sha1:ff04883773ae9dece6c6a6bb697182f37a591317 - pristine_git_object: 0f72388161bb6379af17c922209b933052be4d4e + last_write_checksum: sha1:8a7057c961f74666064453626db6b4262f2c9a9e + pristine_git_object: 7664486283a1246fa9ee60825914e88290982f4d src/codat_platform/models/shared/pushchangetype.py: id: a0b02f74e71d last_write_checksum: sha1:b263b06ca5c495200d5627bedea075aaf2e7aec9 pristine_git_object: 76371e9e3d91f7b55bbba84b28e53b8423982d93 src/codat_platform/models/shared/pushfieldvalidation.py: id: 65c743f6fd8a - last_write_checksum: sha1:29931e0eb367e0870de054751cd267546935616e - pristine_git_object: 6bd25a322309018342236a5fb2fa026bdb39dff9 + last_write_checksum: sha1:41603a986b631eed689171ff8b769fccd512fb1f + pristine_git_object: 842914aa7573527fffdd36eace27034176b1362b src/codat_platform/models/shared/pushoperation.py: id: 5d9359117c13 - last_write_checksum: sha1:e01a24f8eb7c9a1f36808f0a0d88778cdcc19ef6 - pristine_git_object: 0b8a6e9a44f1d50bd1eafc07cabb9c848d9c3495 + last_write_checksum: sha1:4aad577cbe52f76aef7393c1cc88f08ed4460338 + pristine_git_object: 0d0f6d82a7f1a53302b63d3d28a79f89dda03f3d src/codat_platform/models/shared/pushoperationchange.py: id: 968c03ba871f - last_write_checksum: sha1:9cb3267ae07f6b9ce87b151514a9a396ae535961 - pristine_git_object: 0600851778f4edab4a098b80b0668e0e446ffa28 + last_write_checksum: sha1:9e8f636d74f999176bf4e2d6f0b4a45a9272817e + pristine_git_object: cb18ba3fd82824608c68903eaa849c96733cad61 src/codat_platform/models/shared/pushoperationref.py: id: f489c84514d0 - last_write_checksum: sha1:80cdf66cab2408cbe31c7e19097e8aee1136eb0b - pristine_git_object: 9622f837f987f12733b47cfd924c899e16a84325 + last_write_checksum: sha1:3eefbbfcfcc40e6de699b9437e0141ef5af68417 + pristine_git_object: d0ea1619d5612567e3c4d4cb4d8dc2ee6f62402d src/codat_platform/models/shared/pushoperations.py: id: d8353b1523c7 - last_write_checksum: sha1:dfcc6c0843ea20cbfbdb13195d51206c102aa887 - pristine_git_object: 095fc324a66ae79fe90a3150b3fbfcfda9204e91 + last_write_checksum: sha1:d2cb57099c58efcb48e38655ab6e68a7f7a68703 + pristine_git_object: b952036ea45f15df50050714103fe37b786c5392 src/codat_platform/models/shared/pushoperationstatus.py: id: 07d20c45debc last_write_checksum: sha1:e89dd5bfb1bd6889e43c352f52d969b5afb39a9d pristine_git_object: 09fa8b1f2b82555de549f5a923b1e5937c4ae322 src/codat_platform/models/shared/pushoption.py: id: 4ab09d906ede - last_write_checksum: sha1:3e2a6f33dcb67675e906017d829fd513bfd56e8b - pristine_git_object: 35662abcd37647b06ee742516e1dffad0c0e5afd + last_write_checksum: sha1:888751faf00c28f519c271baa6696305fda1f4e3 + pristine_git_object: 305ee6764bdda49744dad83aa8e37037e04a191d src/codat_platform/models/shared/pushoptionchoice.py: id: a59f54ef20f1 - last_write_checksum: sha1:159151a7ab217d11a6a75929466b81806e6d4c9c - pristine_git_object: f2b86e3db8caaa17c02b5f36c40ea510a32a66dc + last_write_checksum: sha1:af5d6354423e2dfed3abc2c6814ec23eac407d52 + pristine_git_object: 50e963c62752dfa8185efd07ab9882296a73c7ce src/codat_platform/models/shared/pushoptionproperty.py: id: a808e98acc33 - last_write_checksum: sha1:55705e454831db208dec00042e4656e2fc3cc847 - pristine_git_object: 7675b053515937a0bdad39296650f178a29edf5f + last_write_checksum: sha1:87a88cf549dcfce13fd8f071daca155635e7f31a + pristine_git_object: ee5e159db4f98812e111caf3bb32c63aad40df07 src/codat_platform/models/shared/pushoptiontype.py: id: 636868bd493b last_write_checksum: sha1:504af1bcd8284b1140331bd704633863a2dcb976 pristine_git_object: c9c246f2a5647e93ffbd8f932e8074bc2b4caa8c src/codat_platform/models/shared/pushvalidationinfo.py: id: d34f3d89b807 - last_write_checksum: sha1:5542baa6f72285c39113607af665e338a86f909e - pristine_git_object: f3bf686c4b85ebede30aa45987ab9db9973d2250 + last_write_checksum: sha1:945cb68f76f75fe3bf42b88fb3eed4dd01541320 + pristine_git_object: bfa9ac7a0f23df9ee262a65290c0a57fd7daa8e1 src/codat_platform/models/shared/readcompletedwebhook.py: id: 1efab7910853 - last_write_checksum: sha1:3f0a7c19382b1f0f2d4de588a7080c7f7ae10c14 - pristine_git_object: 2acff6daa525a35856056b6021349557a8b94967 + last_write_checksum: sha1:99d1b544816d706b13466bc54315d45a64aa09cd + pristine_git_object: 6614dbec61c4a9ae8f4ed0984ab4d288a3557beb src/codat_platform/models/shared/readcompletedwebhookpayload.py: id: 295aaae67a76 - last_write_checksum: sha1:bf21244dbb6ec6dee83f5b36f28fd1d25e3c8d3e - pristine_git_object: 884578f894d3db65f266a3a23fa7313b75eacb59 + last_write_checksum: sha1:7531d768134b81a1cd4cb8461284e95403147f55 + pristine_git_object: 900f23eaf2bcf3d21200b526addb14eee270ba95 src/codat_platform/models/shared/schema_datatype.py: id: a8b662448d9d last_write_checksum: sha1:ac4dd220a6a60d7fefb1d735cf11259bed998154 @@ -1194,52 +1194,52 @@ trackedFiles: pristine_git_object: bab5b3828780c9f3a05e7b7a710f39790417acfd src/codat_platform/models/shared/supplementaldataconfiguration.py: id: 930c4283ae8d - last_write_checksum: sha1:2a54ef3c9d29a5d7c7a489bab61be350e5a077f1 - pristine_git_object: 0945c417c01032e4f41cac59bb24cc2e7789b651 + last_write_checksum: sha1:54c1e2304adb8c6df9478e1b88a39e6bb8178806 + pristine_git_object: 107ed24a857403747c129394427ed850143ea42d src/codat_platform/models/shared/supportedfeature.py: id: b4a633f7b324 - last_write_checksum: sha1:fa61c74523b4950619aec21068e36e751830fb92 - pristine_git_object: ed2b82c46f083598e12c68c691933a93cdf54328 + last_write_checksum: sha1:25d174ce7a125864ce210e3920ae73e2a86eb2b5 + pristine_git_object: 6610bab7654b70fb819dae9bb9c9431554119b4b src/codat_platform/models/shared/syncsetting.py: id: 9ea7f09546af - last_write_checksum: sha1:dc48d30ac6c0cb2a9efa155e257e50e2c2157a5d - pristine_git_object: 406dec60d46f0b8b6283a6c74ec1299412737924 + last_write_checksum: sha1:1cfe9facc8e90eed139ca5f818ac9a6fcc970292 + pristine_git_object: d133ee1910c9afbbbf48b1971aa75c2df1231cdf src/codat_platform/models/shared/syncsettings.py: id: c06f2b3b633d - last_write_checksum: sha1:076908264744b4bd0fa30439be67d1cfdef05311 - pristine_git_object: ccbde3fc4ea83a935a051cfbc6fc81bb94345d23 + last_write_checksum: sha1:d07347a2d1999ed6e3b2dc1aff13fceb59b31ca7 + pristine_git_object: 52315fb69de2228fc77d22ad2113e9431c9b9ccb src/codat_platform/models/shared/updateconnectionstatus.py: id: e8f2dca2a25c - last_write_checksum: sha1:f21e6c1dffc30592d5a4fa379124d3e385391309 - pristine_git_object: 6e2f64bcf1dafd1f97b5b8c055eff096a9eb6127 + last_write_checksum: sha1:5ee5244fee349fd894295c87657aa7ccab54c059 + pristine_git_object: 89510833d9b6ebb42b877bac97fcf44f5b29c8a2 src/codat_platform/models/shared/validation.py: id: 4cf7723ba270 - last_write_checksum: sha1:73078f9e79f71d1aa3a31a6d75b7e31d211ceca3 - pristine_git_object: 4af186ba5f386de8f1dc55f44eaa1f7157fb78bf + last_write_checksum: sha1:a7ac9d4e2d82f55d798107a3c7a7a8404ef65a71 + pristine_git_object: e5da60ba541f9b0aa28e72d586ef1d4f2d51d681 src/codat_platform/models/shared/validationitem.py: id: 5bda7b11112e - last_write_checksum: sha1:49a2022ab2bb56f2d0564912f3d6901b83320ed2 - pristine_git_object: 336dfdc4cdd2ad9e301719b27a0aaa6ce61bc080 + last_write_checksum: sha1:61c5598faa49e4cdec931c6bb3598dbe59abc568 + pristine_git_object: 5fa1048ceb6d049d4c8c223deabe08b7baa5ae48 src/codat_platform/models/shared/validationitem1.py: id: 3f9b2b37780d - last_write_checksum: sha1:059d30fd0e7be36d2bbb7eb0df5de243a1357c70 - pristine_git_object: 38cf4a163afbe0fe59c49780e27a02fd8b8e415e + last_write_checksum: sha1:aead6d8c335681d8b8403e14bcc2aad798671276 + pristine_git_object: cb3db24f7be318b5383a4c6a8840acc2e791accf src/codat_platform/models/shared/validationresult.py: id: e4a31661e247 - last_write_checksum: sha1:5a550c6c335f77bdacf0f2080a1ad89880f71916 - pristine_git_object: aa55d281c8e2a73aadf9f34bab948b5c9bd3c28b + last_write_checksum: sha1:341039a49d6ca15194600ad5263a0a9eeb4be077 + pristine_git_object: 4b95ffab5ff5c13626cd5f9b5405b969cc62e232 src/codat_platform/models/shared/webhookconsumer.py: id: d55677b93a99 - last_write_checksum: sha1:d8bfb6dcd0289c951badae2684acff2336c69e7d - pristine_git_object: b468b1c45988554c3d8d144a3e3125e2173d275e + last_write_checksum: sha1:0abf867f6d44a01ebcf4f6f1ddc91303cbaf3f32 + pristine_git_object: 963af972d2b5347f4bc58699dd1a8d6541b1da54 src/codat_platform/models/shared/webhookconsumerprototype.py: id: b6a19d9c7edf - last_write_checksum: sha1:d764c3a802fc8435243f2c832dd72eed5ccac609 - pristine_git_object: 438d24541a9b15fb1b452a38a283c94239e03203 + last_write_checksum: sha1:b6a2ed9d585b621d5b5959302d7a7b0b4e8dcd14 + pristine_git_object: 48d4ab0af4002e93020f5e0d1e39eefee7f1ad41 src/codat_platform/models/shared/webhookconsumers.py: id: 77bac776c51c - last_write_checksum: sha1:0eb275c63f7bd67be115b7db857c9fb42960e36d - pristine_git_object: 775d82213ede2a319e26f7613abe8c4e5b8c7fba + last_write_checksum: sha1:8a4283d9db9f038ab8d2a2da54ff7b4205f5c7e2 + pristine_git_object: cca3a9b1e14292c0a7723f1f54c7e80fcd5cc8bc src/codat_platform/models/shared/writestatus.py: id: 21790f4556c2 last_write_checksum: sha1:bc46b7a78d10ec8f9392d7e1bdff04d89acb7b4a @@ -1250,36 +1250,36 @@ trackedFiles: pristine_git_object: 90270e798d188cee13da5ee2227b09ec9a8e86c7 src/codat_platform/push_data.py: id: "2354057733e0" - last_write_checksum: sha1:a39c185d42ee049b621e40b5656a24c7b27864b8 - pristine_git_object: 4fa1c7ae7f21304ed659f5bbd43493a8570fc3d4 + last_write_checksum: sha1:5e64d8f031c702bff343a6d95e12458402688286 + pristine_git_object: a2a3201f16b87cd218b2303291d7a769dffdbda2 src/codat_platform/py.typed: id: acf191556a79 last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 src/codat_platform/read_data.py: id: 770e519358f8 - last_write_checksum: sha1:325528f5d5501c71f37068efd6014c6e6a32c394 - pristine_git_object: 3583e31221433160c2f767d598625501b1ffee41 + last_write_checksum: sha1:a4e960370bed8f035b51e7606b6c29b7e53dc1b3 + pristine_git_object: decffd016dbdca6c73093522c9f431288bc3909a src/codat_platform/refresh_data.py: id: 07e7a3d6f38b - last_write_checksum: sha1:c8365efd8fcb80c35428b9e8ca4d94e89d428783 - pristine_git_object: 0acda4ef01e8892dd20e48cfc437e38a72c45a87 + last_write_checksum: sha1:5b15dbf66deaf7d99c05bf20a7a16c6761a83737 + pristine_git_object: 804347ccc976243f4745c8ecaee611f7490a7943 src/codat_platform/sdk.py: id: 81b34f69d506 - last_write_checksum: sha1:735c03f23f3c598d20f4a44dc92b953c553aebab - pristine_git_object: 8d0ac9dd2aa64f0eb2d94ea23c16c60d24efaa1e + last_write_checksum: sha1:d2eeea7f871cb81fff5fc413fa89a35f6b9c96ac + pristine_git_object: 1446054321c41ef99c94a697e27520b5d9c4fff9 src/codat_platform/sdkconfiguration.py: id: d23add9043a0 last_write_checksum: sha1:d214de54d4ea23fac6bc13098dbea1d553fcb90c pristine_git_object: f7207f800a7a7dec69cd57daa9bcabdc9798e6d7 src/codat_platform/settings.py: id: a2620347aa00 - last_write_checksum: sha1:c717215936516b38ff2d41677b5ece8c73de10eb - pristine_git_object: 8d3d0705b5f521e4c826584a7f1f97011618b7d3 + last_write_checksum: sha1:c9090700185ff9a296c7340bc36b233e13159a98 + pristine_git_object: bc87d0f9307059b52be09c4170295ed216ec7318 src/codat_platform/supplemental_data.py: id: 13723ffd89a8 - last_write_checksum: sha1:e82cad63bc59457450679fdc452b10c045d10807 - pristine_git_object: b987bf620f48e76982a837dcf7cfbd3425e8aa14 + last_write_checksum: sha1:37124e4df14b70db29f955d362947dd3d8ba2116 + pristine_git_object: 29941c3f3e3cde0737f56d60812238983465068a src/codat_platform/types/__init__.py: id: 004e72b534df last_write_checksum: sha1:140ebdd01a46f92ffc710c52c958c4eba3cf68ed @@ -1290,8 +1290,8 @@ trackedFiles: pristine_git_object: a9a640a1a7048736383f96c67c6290c86bf536ee src/codat_platform/utils/__init__.py: id: 61e31b2259c7 - last_write_checksum: sha1:a1f6ae620fb6a3ccc30e99b427e49a0c8be463af - pristine_git_object: 15394a08a7e30033d319e44dd5734664ddb587e5 + last_write_checksum: sha1:1970816f2234ecb8785798240b0edced961de971 + pristine_git_object: 0498cb8dabf249b39609f81fb10cddc30f1b78b5 src/codat_platform/utils/annotations.py: id: 9dcb9664e6b2 last_write_checksum: sha1:a4824ad65f730303e4e1e3ec1febf87b4eb46dbc @@ -1300,14 +1300,18 @@ trackedFiles: id: 8adf2544bf8d last_write_checksum: sha1:c721e4123000e7dc61ec52b28a739439d9e17341 pristine_git_object: a6c52cd61bbe2d459046c940ce5e8c469f2f0664 + src/codat_platform/utils/dynamic_imports.py: + id: eb664d1fbb41 + last_write_checksum: sha1:a1940c63feb8eddfd8026de53384baf5056d5dcc + pristine_git_object: 673edf82a97d0fea7295625d3e092ea369a36b79 src/codat_platform/utils/enums.py: id: ab66b238f6de last_write_checksum: sha1:bc8c3c1285ae09ba8a094ee5c3d9c7f41fa1284d pristine_git_object: 3324e1bc2668c54c4d5f5a1a845675319757a828 src/codat_platform/utils/eventstreaming.py: id: e94579db74ad - last_write_checksum: sha1:ffa870a25a7e4e2015bfd7a467ccd3aa1de97f0e - pristine_git_object: f2052fc22d9fd6c663ba3dce019fe234ca37108b + last_write_checksum: sha1:620d78a8b4e3b854e08d136e02e40a01a786bd70 + pristine_git_object: 3bdcd6d3d4fc772cb7f5fca8685dcdc8c85e13e8 src/codat_platform/utils/forms.py: id: 4c5fcfa1a021 last_write_checksum: sha1:15fa7e9ab1611e062a9984cf06cb20969713d295 @@ -1322,8 +1326,8 @@ trackedFiles: pristine_git_object: b661aff65d38b77d035149699aea09b2785d2fc6 src/codat_platform/utils/metadata.py: id: 00043e9efb65 - last_write_checksum: sha1:c6a560bd0c63ab158582f34dadb69433ea73b3d4 - pristine_git_object: 173b3e5ce658675c2f504222a56b3daaaa68107d + last_write_checksum: sha1:e703e5cbb5255144aacf86898d1420529afaaff8 + pristine_git_object: 5abddd588837ac297050ca3b543627faadb350a9 src/codat_platform/utils/queryparams.py: id: 478e740269ef last_write_checksum: sha1:b94c3f314fd3da0d1d215afc2731f48748e2aa59 @@ -1334,16 +1338,16 @@ trackedFiles: pristine_git_object: 1de32b6d26f46590232f398fdba6ce0072f1659c src/codat_platform/utils/retries.py: id: b537e6cb1a9c - last_write_checksum: sha1:5b97ac4f59357d70c2529975d50364c88bcad607 - pristine_git_object: 88a91b10cd2076b4a2c6cff2ac6bfaa5e3c5ad13 + last_write_checksum: sha1:471372f5c5d1dd5583239c9cf3c75f1b636e5d87 + pristine_git_object: af07d4e941007af4213c5ec9047ef8a2fca04e5e src/codat_platform/utils/security.py: id: 234568053cfe - last_write_checksum: sha1:435dd8b180cefcd733e635b9fa45512da091d9c0 - pristine_git_object: 17996bd54b8624009802fbbdf30bcb4225b8dfed + last_write_checksum: sha1:c11eef495b6aaa249178c24c796940cc540b7a00 + pristine_git_object: 42d8d78e9981eed7507670014d99588e27ab325a src/codat_platform/utils/serializers.py: id: e9af5258c823 - last_write_checksum: sha1:ce1d8d7f500a9ccba0aeca5057cee9c271f4dfd7 - pristine_git_object: 14321eb479de81d0d9580ec8291e0ff91bf29e57 + last_write_checksum: sha1:61009f2e4ef6613a1a5af813fe020373dae5a492 + pristine_git_object: d2149f8b909cb96628db140ac3cddb1b1e981367 src/codat_platform/utils/unmarshal_json_response.py: id: 0ccae261b417 last_write_checksum: sha1:b85afc5e208b37f99d5d30b4141c38a8ebbf2144 @@ -1358,8 +1362,8 @@ trackedFiles: pristine_git_object: dae01a44384ac3bc13ae07453a053bf6c898ebe3 src/codat_platform/webhooks.py: id: 67e9985ae9f1 - last_write_checksum: sha1:cb544166ae12b49b1f88961e06b7c1517be0c16b - pristine_git_object: dac18d0d56b06d0f24a62e3e670394f2bbb74311 + last_write_checksum: sha1:45c30c745690fb7edbe612e0f49c8c9f7da39f3f + pristine_git_object: 2641d6baab4cfebbe5d584f5e0e90d977c90ed18 examples: create-api-key: Create API key with name: @@ -2777,23 +2781,16 @@ examplesVersion: 1.0.2 generatedTests: {} releaseNotes: | ## Python SDK Changes: - * `codat_platform.companies.update()`: `response.data_connections[].connection_info.Map` **Changed** (Breaking ⚠️) - * `codat_platform.connections.create()`: `response.connection_info.Map` **Changed** (Breaking ⚠️) - * `codat_platform.connections.update_authorization()`: `response.connection_info.Map` **Changed** (Breaking ⚠️) - * `codat_platform.connections.unlink()`: `response.connection_info.Map` **Changed** (Breaking ⚠️) - * `codat_platform.companies.create()`: `response.data_connections[].connection_info.Map` **Changed** (Breaking ⚠️) - * `codat_platform.companies.get()`: `response.data_connections[].connection_info.Map` **Changed** (Breaking ⚠️) - * `codat_platform.companies.list()`: `response.results[].data_connections[].connection_info.Map` **Changed** (Breaking ⚠️) - * `codat_platform.companies.replace()`: `response.data_connections[].connection_info.Map` **Changed** (Breaking ⚠️) - * `codat_platform.connections.list()`: `response.results[].connection_info.Map` **Changed** (Breaking ⚠️) - * `codat_platform.connections.get()`: `response.connection_info.Map` **Changed** (Breaking ⚠️) - * `codat_platform.companies.get_company_sync_settings()`: **Added** - * `codat_platform.companies.refresh_product_data()`: **Added** - * `codat_platform.read_data.get_validation_results()`: **Added** - * `codat_platform.companies.set_company_sync_settings()`: **Added** - * `codat_platform.refresh_data.all()`: `error.status[400]` **Added** - * `codat_platform.refresh_data.by_data_type()`: `error.status[400]` **Added** - * `codat_platform.refresh_data.get()`: `response.account_transactions.last_successful_sync` **Changed** + * `codat_platform.companies.create()`: `response.data_connections[].integration_key` **Changed** + * `codat_platform.companies.get()`: `response.data_connections[].integration_key` **Changed** + * `codat_platform.companies.list()`: `response.results[].data_connections[].integration_key` **Changed** + * `codat_platform.companies.replace()`: `response.data_connections[].integration_key` **Changed** + * `codat_platform.companies.update()`: `response.data_connections[].integration_key` **Changed** + * `codat_platform.connections.create()`: `response.integration_key` **Changed** + * `codat_platform.connections.get()`: `response.integration_key` **Changed** + * `codat_platform.connections.list()`: `response.results[].integration_key` **Changed** + * `codat_platform.connections.unlink()`: `response.integration_key` **Changed** + * `codat_platform.connections.update_authorization()`: `response.integration_key` **Changed** generatedFiles: - .gitattributes - .python-version diff --git a/platform/.speakeasy/gen.yaml b/platform/.speakeasy/gen.yaml index 89f017527..d1c999a08 100644 --- a/platform/.speakeasy/gen.yaml +++ b/platform/.speakeasy/gen.yaml @@ -11,6 +11,7 @@ generation: securityFeb2025: false sharedErrorComponentsApr2025: false sharedNestedComponentsJan2026: false + nameOverrideFeb2026: false auth: oAuth2ClientCredentialsEnabled: false oAuth2PasswordEnabled: false @@ -26,7 +27,7 @@ generation: skipResponseBodyAssertions: false telemetryEnabled: true python: - version: 5.0.0 + version: 5.0.1 additionalDependencies: dev: {} main: {} @@ -45,6 +46,8 @@ python: enableCustomCodeRegions: false enumFormat: enum fixFlags: + asyncPaginationSep2025: false + conflictResistantModelImportsFeb2026: false responseRequiredSep2024: false flattenGlobalSecurity: false flattenRequests: false diff --git a/platform/RELEASES.md b/platform/RELEASES.md index 53845787e..a93376b17 100644 --- a/platform/RELEASES.md +++ b/platform/RELEASES.md @@ -148,4 +148,14 @@ Based on: ### Generated - [python v5.0.0] platform ### Releases -- [PyPI v5.0.0] https://pypi.org/project/codat-platform/5.0.0 - platform \ No newline at end of file +- [PyPI v5.0.0] https://pypi.org/project/codat-platform/5.0.0 - platform + +## 2026-04-22 11:07:02 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.761.9 (2.881.4) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v5.0.1] platform +### Releases +- [PyPI v5.0.1] https://pypi.org/project/codat-platform/5.0.1 - platform \ No newline at end of file diff --git a/platform/docs/models/operations/datatype.md b/platform/docs/models/operations/datatype.md index 608b86fb9..22092bdaf 100644 --- a/platform/docs/models/operations/datatype.md +++ b/platform/docs/models/operations/datatype.md @@ -2,6 +2,14 @@ Data types that support supplemental data +## Example Usage + +```python +from codat_platform.models.operations import DataType + +value = DataType.CHART_OF_ACCOUNTS +``` + ## Values diff --git a/platform/docs/models/operations/pathparamdatatype.md b/platform/docs/models/operations/pathparamdatatype.md index 0ab636948..baf6321fc 100644 --- a/platform/docs/models/operations/pathparamdatatype.md +++ b/platform/docs/models/operations/pathparamdatatype.md @@ -2,6 +2,14 @@ Data types that support supplemental data +## Example Usage + +```python +from codat_platform.models.operations import PathParamDataType + +value = PathParamDataType.CHART_OF_ACCOUNTS +``` + ## Values diff --git a/platform/docs/models/shared/connection.md b/platform/docs/models/shared/connection.md index 3d9435bd7..2817473cc 100644 --- a/platform/docs/models/shared/connection.md +++ b/platform/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/platform/docs/models/shared/dataconnectionstatus.md b/platform/docs/models/shared/dataconnectionstatus.md index 4e79f5d5a..9221c42f8 100644 --- a/platform/docs/models/shared/dataconnectionstatus.md +++ b/platform/docs/models/shared/dataconnectionstatus.md @@ -2,6 +2,14 @@ The current authorization status of the data connection. +## Example Usage + +```python +from codat_platform.models.shared import DataConnectionStatus + +value = DataConnectionStatus.PENDING_AUTH +``` + ## Values diff --git a/platform/docs/models/shared/datasetstatus.md b/platform/docs/models/shared/datasetstatus.md index 42a224341..3ae512f26 100644 --- a/platform/docs/models/shared/datasetstatus.md +++ b/platform/docs/models/shared/datasetstatus.md @@ -2,6 +2,14 @@ The current status of the dataset. +## Example Usage + +```python +from codat_platform.models.shared import DatasetStatus + +value = DatasetStatus.INITIAL +``` + ## Values diff --git a/platform/docs/models/shared/datatype.md b/platform/docs/models/shared/datatype.md index 593192d4b..3352460d2 100644 --- a/platform/docs/models/shared/datatype.md +++ b/platform/docs/models/shared/datatype.md @@ -2,6 +2,14 @@ Available data types +## Example Usage + +```python +from codat_platform.models.shared import DataType + +value = DataType.ACCOUNT_TRANSACTIONS +``` + ## Values diff --git a/platform/docs/models/shared/datatypes.md b/platform/docs/models/shared/datatypes.md index a102001d1..2d59617ca 100644 --- a/platform/docs/models/shared/datatypes.md +++ b/platform/docs/models/shared/datatypes.md @@ -2,6 +2,14 @@ Available data types +## Example Usage + +```python +from codat_platform.models.shared import DataTypes + +value = DataTypes.ACCOUNT_TRANSACTIONS +``` + ## Values diff --git a/platform/docs/models/shared/errorstatus.md b/platform/docs/models/shared/errorstatus.md index 02c0ec3d9..aeb1f5dbd 100644 --- a/platform/docs/models/shared/errorstatus.md +++ b/platform/docs/models/shared/errorstatus.md @@ -2,6 +2,14 @@ The current status of a transient error. Null statuses indicate that the error is not transient. +## Example Usage + +```python +from codat_platform.models.shared import ErrorStatus + +value = ErrorStatus.ACTIVE +``` + ## Values diff --git a/platform/docs/models/shared/featurestate.md b/platform/docs/models/shared/featurestate.md index 64b943064..effbd1bab 100644 --- a/platform/docs/models/shared/featurestate.md +++ b/platform/docs/models/shared/featurestate.md @@ -2,6 +2,14 @@ The current release state of the feature. +## Example Usage + +```python +from codat_platform.models.shared import FeatureState + +value = FeatureState.RELEASE +``` + ## Values diff --git a/platform/docs/models/shared/featuretype.md b/platform/docs/models/shared/featuretype.md index b2aa31be0..165da727d 100644 --- a/platform/docs/models/shared/featuretype.md +++ b/platform/docs/models/shared/featuretype.md @@ -2,6 +2,14 @@ The type of feature. +## Example Usage + +```python +from codat_platform.models.shared import FeatureType + +value = FeatureType.GET +``` + ## Values diff --git a/platform/docs/models/shared/pushchangetype.md b/platform/docs/models/shared/pushchangetype.md index 33a957e79..c2aab6319 100644 --- a/platform/docs/models/shared/pushchangetype.md +++ b/platform/docs/models/shared/pushchangetype.md @@ -2,6 +2,14 @@ Type of change being applied to record in third party platform. +## Example Usage + +```python +from codat_platform.models.shared import PushChangeType + +value = PushChangeType.UNKNOWN +``` + ## Values diff --git a/platform/docs/models/shared/pushoperationstatus.md b/platform/docs/models/shared/pushoperationstatus.md index 721aaa76b..f0e1d0fe8 100644 --- a/platform/docs/models/shared/pushoperationstatus.md +++ b/platform/docs/models/shared/pushoperationstatus.md @@ -2,6 +2,14 @@ The current status of the push operation. +## Example Usage + +```python +from codat_platform.models.shared import PushOperationStatus + +value = PushOperationStatus.PENDING +``` + ## Values diff --git a/platform/docs/models/shared/pushoptiontype.md b/platform/docs/models/shared/pushoptiontype.md index 2f263a07c..c3a5be858 100644 --- a/platform/docs/models/shared/pushoptiontype.md +++ b/platform/docs/models/shared/pushoptiontype.md @@ -2,6 +2,14 @@ The option type. +## Example Usage + +```python +from codat_platform.models.shared import PushOptionType + +value = PushOptionType.ARRAY +``` + ## Values diff --git a/platform/docs/models/shared/schemadatatype.md b/platform/docs/models/shared/schemadatatype.md index a7b7e6ae3..34468c90f 100644 --- a/platform/docs/models/shared/schemadatatype.md +++ b/platform/docs/models/shared/schemadatatype.md @@ -2,6 +2,14 @@ Available data types +## Example Usage + +```python +from codat_platform.models.shared import SchemaDataType + +value = SchemaDataType.ACCOUNT_TRANSACTIONS +``` + ## Values diff --git a/platform/docs/models/shared/sourcetype.md b/platform/docs/models/shared/sourcetype.md index 2daec8ef3..6ca0721d0 100644 --- a/platform/docs/models/shared/sourcetype.md +++ b/platform/docs/models/shared/sourcetype.md @@ -2,6 +2,14 @@ The type of platform of the connection. +## Example Usage + +```python +from codat_platform.models.shared import SourceType + +value = SourceType.ACCOUNTING +``` + ## Values diff --git a/platform/docs/models/shared/status.md b/platform/docs/models/shared/status.md index 2fb340539..25ddb4d97 100644 --- a/platform/docs/models/shared/status.md +++ b/platform/docs/models/shared/status.md @@ -2,6 +2,14 @@ The current status of the dataset. +## Example Usage + +```python +from codat_platform.models.shared import Status + +value = Status.INITIAL +``` + ## Values diff --git a/platform/docs/models/shared/writestatus.md b/platform/docs/models/shared/writestatus.md index 2de3b9f6f..c149e9143 100644 --- a/platform/docs/models/shared/writestatus.md +++ b/platform/docs/models/shared/writestatus.md @@ -2,6 +2,14 @@ The current status of the write request, which is the same as the push operation status. +## Example Usage + +```python +from codat_platform.models.shared import WriteStatus + +value = WriteStatus.PENDING +``` + ## Values diff --git a/platform/docs/models/shared/writetype.md b/platform/docs/models/shared/writetype.md index d11792442..60a5e4f51 100644 --- a/platform/docs/models/shared/writetype.md +++ b/platform/docs/models/shared/writetype.md @@ -2,6 +2,14 @@ Type of write request. +## Example Usage + +```python +from codat_platform.models.shared import WriteType + +value = WriteType.CREATE +``` + ## Values diff --git a/platform/pylintrc b/platform/pylintrc index ba6a998b8..cb9c15d31 100644 --- a/platform/pylintrc +++ b/platform/pylintrc @@ -458,7 +458,8 @@ disable=raw-checker-failed, consider-using-with, wildcard-import, unused-wildcard-import, - too-many-return-statements + too-many-return-statements, + redefined-builtin # Enable the message, report, category or checker with the given id(s). You can # either give multiple identifier separated by comma (,) or put this option diff --git a/platform/pyproject.toml b/platform/pyproject.toml index 6cf11f496..871479c4e 100644 --- a/platform/pyproject.toml +++ b/platform/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "codat-platform" -version = "5.0.0" +version = "5.0.1" description = "Manage the building blocks of Codat, including companies, connections, and more." authors = [{ name = "Speakeasy" },] readme = "README-PYPI.md" diff --git a/platform/src/codat_platform/_version.py b/platform/src/codat_platform/_version.py index 6212e6b51..e5b32143a 100644 --- a/platform/src/codat_platform/_version.py +++ b/platform/src/codat_platform/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "codat-platform" -__version__: str = "5.0.0" +__version__: str = "5.0.1" __openapi_doc_version__: str = "3.0.0" -__gen_version__: str = "2.822.1" -__user_agent__: str = "speakeasy-sdk/python 5.0.0 2.822.1 3.0.0 codat-platform" +__gen_version__: str = "2.881.4" +__user_agent__: str = "speakeasy-sdk/python 5.0.1 2.881.4 3.0.0 codat-platform" try: if __package__ is not None: diff --git a/platform/src/codat_platform/basesdk.py b/platform/src/codat_platform/basesdk.py index f31618277..e13deffd2 100644 --- a/platform/src/codat_platform/basesdk.py +++ b/platform/src/codat_platform/basesdk.py @@ -6,6 +6,7 @@ AfterErrorContext, AfterSuccessContext, BeforeRequestContext, + HookContext, ) from codat_platform.models import errors from codat_platform.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/platform/src/codat_platform/companies.py b/platform/src/codat_platform/companies.py index 19ffee248..c302d956b 100644 --- a/platform/src/codat_platform/companies.py +++ b/platform/src/codat_platform/companies.py @@ -87,17 +87,7 @@ def add_product( 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 add_product_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, ) @@ -311,17 +291,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, ) @@ -426,17 +396,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, ) @@ -537,17 +497,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, ) @@ -648,17 +598,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, ) @@ -759,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, ) @@ -870,17 +800,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, ) @@ -980,17 +900,7 @@ def get_access_token( 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, ) @@ -1090,17 +1000,7 @@ async def get_access_token_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, ) @@ -1198,17 +1098,7 @@ def get_company_sync_settings( 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, ) @@ -1306,17 +1196,7 @@ async def get_company_sync_settings_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, ) @@ -1429,18 +1309,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, ) @@ -1553,18 +1422,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, ) @@ -1646,7 +1504,7 @@ def refresh_product_data( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.request_body, + request.request_body if request is not None else None, False, True, "json", @@ -1677,18 +1535,7 @@ def refresh_product_data( 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, ) @@ -1770,7 +1617,7 @@ async def refresh_product_data_async( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.request_body, + request.request_body if request is not None else None, False, True, "json", @@ -1801,18 +1648,7 @@ async def refresh_product_data_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, ) @@ -1911,17 +1747,7 @@ def remove_product( 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, ) @@ -2020,17 +1846,7 @@ async def remove_product_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, ) @@ -2106,7 +1922,7 @@ def replace( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.company_request_body, + request.company_request_body if request is not None else None, False, True, "json", @@ -2137,17 +1953,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, ) @@ -2223,7 +2029,7 @@ async def replace_async( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.company_request_body, + request.company_request_body if request is not None else None, False, True, "json", @@ -2254,17 +2060,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, ) @@ -2338,7 +2134,7 @@ def set_company_sync_settings( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.request_body, + request.request_body if request is not None else None, False, True, "json", @@ -2369,18 +2165,7 @@ def set_company_sync_settings( 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, ) @@ -2454,7 +2239,7 @@ async def set_company_sync_settings_async( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.request_body, + request.request_body if request is not None else None, False, True, "json", @@ -2485,18 +2270,7 @@ async def set_company_sync_settings_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, ) @@ -2573,7 +2347,7 @@ def update( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.company_update_request, + request.company_update_request if request is not None else None, False, True, "json", @@ -2604,17 +2378,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, ) @@ -2691,7 +2455,7 @@ async def update_async( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.company_update_request, + request.company_update_request if request is not None else None, False, True, "json", @@ -2722,17 +2486,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/platform/src/codat_platform/connection_management.py b/platform/src/codat_platform/connection_management.py index 6e0ba5ca9..97f7f844b 100644 --- a/platform/src/codat_platform/connection_management.py +++ b/platform/src/codat_platform/connection_management.py @@ -93,17 +93,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, ) @@ -209,17 +199,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, ) diff --git a/platform/src/codat_platform/connections.py b/platform/src/codat_platform/connections.py index b632e822a..976470e30 100644 --- a/platform/src/codat_platform/connections.py +++ b/platform/src/codat_platform/connections.py @@ -64,7 +64,7 @@ def create( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.request_body, + request.request_body if request is not None else None, False, True, "json", @@ -95,17 +95,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, ) @@ -181,7 +171,7 @@ async def create_async( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.request_body, + request.request_body if request is not None else None, False, True, "json", @@ -212,17 +202,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, ) @@ -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, ) @@ -430,17 +400,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, ) @@ -537,17 +497,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, ) @@ -644,17 +594,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, ) @@ -752,18 +692,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, ) @@ -861,18 +790,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, ) @@ -946,7 +864,7 @@ def unlink( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.update_connection_status, + request.update_connection_status if request is not None else None, False, True, "json", @@ -977,17 +895,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, ) @@ -1061,7 +969,7 @@ async def unlink_async( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.update_connection_status, + request.update_connection_status if request is not None else None, False, True, "json", @@ -1092,17 +1000,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, ) @@ -1178,7 +1076,11 @@ def update_authorization( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.request_body, False, True, "json", Optional[Dict[str, str]] + request.request_body if request is not None else None, + False, + True, + "json", + Optional[Dict[str, str]], ), allow_empty_value=None, timeout_ms=timeout_ms, @@ -1205,17 +1107,7 @@ def update_authorization( 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, ) @@ -1291,7 +1183,11 @@ async def update_authorization_async( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.request_body, False, True, "json", Optional[Dict[str, str]] + request.request_body if request is not None else None, + False, + True, + "json", + Optional[Dict[str, str]], ), allow_empty_value=None, timeout_ms=timeout_ms, @@ -1318,17 +1214,7 @@ async def update_authorization_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/platform/src/codat_platform/cors.py b/platform/src/codat_platform/cors.py index 10fce6446..1c4a5e749 100644 --- a/platform/src/codat_platform/cors.py +++ b/platform/src/codat_platform/cors.py @@ -80,17 +80,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, ) @@ -185,17 +175,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, ) @@ -311,17 +291,7 @@ def set( 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, ) @@ -437,17 +407,7 @@ async def set_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/platform/src/codat_platform/custom_data_type.py b/platform/src/codat_platform/custom_data_type.py index b372c12d2..0de60ae81 100644 --- a/platform/src/codat_platform/custom_data_type.py +++ b/platform/src/codat_platform/custom_data_type.py @@ -74,7 +74,7 @@ def configure( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.custom_data_type_configuration, + request.custom_data_type_configuration if request is not None else None, False, True, "json", @@ -105,17 +105,7 @@ def configure( 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, ) @@ -201,7 +191,7 @@ async def configure_async( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.custom_data_type_configuration, + request.custom_data_type_configuration if request is not None else None, False, True, "json", @@ -232,17 +222,7 @@ async def configure_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, ) @@ -344,17 +324,7 @@ def get_configuration( 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, ) @@ -456,17 +426,7 @@ async def get_configuration_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, ) @@ -568,19 +528,7 @@ def list( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "451", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -684,19 +632,7 @@ async def list_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "429", - "451", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -796,18 +732,7 @@ def refresh( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "451", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -905,18 +830,7 @@ async def refresh_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "401", - "402", - "403", - "404", - "429", - "451", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/platform/src/codat_platform/integrations.py b/platform/src/codat_platform/integrations.py index ae66a2a35..3d24eb82c 100644 --- a/platform/src/codat_platform/integrations.py +++ b/platform/src/codat_platform/integrations.py @@ -85,17 +85,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, ) @@ -192,17 +182,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_branding( 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, ) @@ -412,17 +382,7 @@ async def get_branding_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, ) @@ -520,17 +480,7 @@ def list( 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, ) @@ -628,17 +578,7 @@ async def list_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, ) diff --git a/platform/src/codat_platform/models/__init__.py b/platform/src/codat_platform/models/__init__.py index 726fc5eb3..d78064cca 100644 --- a/platform/src/codat_platform/models/__init__.py +++ b/platform/src/codat_platform/models/__init__.py @@ -1,3 +1,23 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +from typing import Any, TYPE_CHECKING + +from codat_platform.utils.dynamic_imports import lazy_getattr, lazy_dir + +if TYPE_CHECKING: + from . import errors, operations, shared + # package + + +_sub_packages = ["errors", "operations", "shared"] + + +def __getattr__(attr_name: str) -> Any: + return lazy_getattr( + attr_name, package=__package__, dynamic_imports={}, sub_packages=_sub_packages + ) + + +def __dir__(): + return lazy_dir(dynamic_imports={}, sub_packages=_sub_packages) diff --git a/platform/src/codat_platform/models/errors/__init__.py b/platform/src/codat_platform/models/errors/__init__.py index 482de9ef3..852987537 100644 --- a/platform/src/codat_platform/models/errors/__init__.py +++ b/platform/src/codat_platform/models/errors/__init__.py @@ -1,10 +1,9 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from .codatplatformerror import CodatPlatformError -from typing import TYPE_CHECKING -from importlib import import_module -import builtins -import sys +from typing import Any, TYPE_CHECKING + +from codat_platform.utils.dynamic_imports import lazy_getattr, lazy_dir if TYPE_CHECKING: from .errormessage import ErrorMessage, ErrorMessageData @@ -30,39 +29,11 @@ } -def dynamic_import(modname, retries=3): - for attempt in range(retries): - try: - return import_module(modname, __package__) - except KeyError: - # Clear any half-initialized module and retry - sys.modules.pop(modname, None) - if attempt == retries - 1: - break - raise KeyError(f"Failed to import module '{modname}' after {retries} attempts") - - -def __getattr__(attr_name: str) -> object: - module_name = _dynamic_imports.get(attr_name) - if module_name is None: - raise AttributeError( - f"No {attr_name} found in _dynamic_imports for module name -> {__name__} " - ) - - try: - module = dynamic_import(module_name) - result = getattr(module, attr_name) - return result - except ImportError as e: - raise ImportError( - f"Failed to import {attr_name} from {module_name}: {e}" - ) from e - except AttributeError as e: - raise AttributeError( - f"Failed to get {attr_name} from {module_name}: {e}" - ) from e +def __getattr__(attr_name: str) -> Any: + return lazy_getattr( + attr_name, package=__package__, dynamic_imports=_dynamic_imports + ) def __dir__(): - lazy_attrs = builtins.list(_dynamic_imports.keys()) - return builtins.sorted(lazy_attrs) + return lazy_dir(dynamic_imports=_dynamic_imports) diff --git a/platform/src/codat_platform/models/operations/__init__.py b/platform/src/codat_platform/models/operations/__init__.py index 69be7cbe3..93b2da71f 100644 --- a/platform/src/codat_platform/models/operations/__init__.py +++ b/platform/src/codat_platform/models/operations/__init__.py @@ -1,9 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -from typing import TYPE_CHECKING -from importlib import import_module -import builtins -import sys +from typing import Any, TYPE_CHECKING + +from codat_platform.utils.dynamic_imports import lazy_getattr, lazy_dir if TYPE_CHECKING: from .add_product import AddProductRequest, AddProductRequestTypedDict @@ -320,39 +319,11 @@ } -def dynamic_import(modname, retries=3): - for attempt in range(retries): - try: - return import_module(modname, __package__) - except KeyError: - # Clear any half-initialized module and retry - sys.modules.pop(modname, None) - if attempt == retries - 1: - break - raise KeyError(f"Failed to import module '{modname}' after {retries} attempts") - - -def __getattr__(attr_name: str) -> object: - module_name = _dynamic_imports.get(attr_name) - if module_name is None: - raise AttributeError( - f"No {attr_name} found in _dynamic_imports for module name -> {__name__} " - ) - - try: - module = dynamic_import(module_name) - result = getattr(module, attr_name) - return result - except ImportError as e: - raise ImportError( - f"Failed to import {attr_name} from {module_name}: {e}" - ) from e - except AttributeError as e: - raise AttributeError( - f"Failed to get {attr_name} from {module_name}: {e}" - ) from e +def __getattr__(attr_name: str) -> Any: + return lazy_getattr( + attr_name, package=__package__, dynamic_imports=_dynamic_imports + ) def __dir__(): - lazy_attrs = builtins.list(_dynamic_imports.keys()) - return builtins.sorted(lazy_attrs) + return lazy_dir(dynamic_imports=_dynamic_imports) diff --git a/platform/src/codat_platform/models/operations/configure_custom_data_type.py b/platform/src/codat_platform/models/operations/configure_custom_data_type.py index 45236270d..76aec6814 100644 --- a/platform/src/codat_platform/models/operations/configure_custom_data_type.py +++ b/platform/src/codat_platform/models/operations/configure_custom_data_type.py @@ -52,7 +52,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/platform/src/codat_platform/models/operations/configure_supplemental_data.py b/platform/src/codat_platform/models/operations/configure_supplemental_data.py index c1ac5bfb4..9c7c7da1b 100644 --- a/platform/src/codat_platform/models/operations/configure_supplemental_data.py +++ b/platform/src/codat_platform/models/operations/configure_supplemental_data.py @@ -79,7 +79,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/platform/src/codat_platform/models/operations/create_connection.py b/platform/src/codat_platform/models/operations/create_connection.py index 277ad1d6d..07f22aec2 100644 --- a/platform/src/codat_platform/models/operations/create_connection.py +++ b/platform/src/codat_platform/models/operations/create_connection.py @@ -26,7 +26,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: @@ -62,10 +62,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + CreateConnectionRequestBody.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/operations/get_company_push_history.py b/platform/src/codat_platform/models/operations/get_company_push_history.py index 0464fbf76..b12b2b19c 100644 --- a/platform/src/codat_platform/models/operations/get_company_push_history.py +++ b/platform/src/codat_platform/models/operations/get_company_push_history.py @@ -64,7 +64,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/platform/src/codat_platform/models/operations/list_companies.py b/platform/src/codat_platform/models/operations/list_companies.py index b34cf1d94..087d57fbf 100644 --- a/platform/src/codat_platform/models/operations/list_companies.py +++ b/platform/src/codat_platform/models/operations/list_companies.py @@ -63,7 +63,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/platform/src/codat_platform/models/operations/list_connections.py b/platform/src/codat_platform/models/operations/list_connections.py index 80779f3bf..12d7c6738 100644 --- a/platform/src/codat_platform/models/operations/list_connections.py +++ b/platform/src/codat_platform/models/operations/list_connections.py @@ -64,7 +64,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/platform/src/codat_platform/models/operations/list_custom_data_type_records.py b/platform/src/codat_platform/models/operations/list_custom_data_type_records.py index 01f9a2546..d2b7f2240 100644 --- a/platform/src/codat_platform/models/operations/list_custom_data_type_records.py +++ b/platform/src/codat_platform/models/operations/list_custom_data_type_records.py @@ -65,7 +65,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/platform/src/codat_platform/models/operations/list_integrations.py b/platform/src/codat_platform/models/operations/list_integrations.py index 139056889..2fcd76775 100644 --- a/platform/src/codat_platform/models/operations/list_integrations.py +++ b/platform/src/codat_platform/models/operations/list_integrations.py @@ -55,7 +55,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/platform/src/codat_platform/models/operations/list_pull_operations.py b/platform/src/codat_platform/models/operations/list_pull_operations.py index 2c91ba33b..458689b8c 100644 --- a/platform/src/codat_platform/models/operations/list_pull_operations.py +++ b/platform/src/codat_platform/models/operations/list_pull_operations.py @@ -64,7 +64,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/platform/src/codat_platform/models/operations/refresh_data_type.py b/platform/src/codat_platform/models/operations/refresh_data_type.py index f7b7e2ceb..d31e246d4 100644 --- a/platform/src/codat_platform/models/operations/refresh_data_type.py +++ b/platform/src/codat_platform/models/operations/refresh_data_type.py @@ -49,7 +49,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/platform/src/codat_platform/models/operations/refresh_product_data.py b/platform/src/codat_platform/models/operations/refresh_product_data.py index f2fc1fd9a..028875929 100644 --- a/platform/src/codat_platform/models/operations/refresh_product_data.py +++ b/platform/src/codat_platform/models/operations/refresh_product_data.py @@ -30,7 +30,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: @@ -77,10 +77,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + RefreshProductDataRequestBody.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/operations/replace_company.py b/platform/src/codat_platform/models/operations/replace_company.py index d29f97d29..d82d6a226 100644 --- a/platform/src/codat_platform/models/operations/replace_company.py +++ b/platform/src/codat_platform/models/operations/replace_company.py @@ -39,7 +39,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/platform/src/codat_platform/models/operations/set_company_syncsettings.py b/platform/src/codat_platform/models/operations/set_company_syncsettings.py index 7979cca6b..64a93588c 100644 --- a/platform/src/codat_platform/models/operations/set_company_syncsettings.py +++ b/platform/src/codat_platform/models/operations/set_company_syncsettings.py @@ -45,7 +45,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: @@ -87,10 +87,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + SetCompanySyncSettingsRequestBody.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/operations/unlink_connection.py b/platform/src/codat_platform/models/operations/unlink_connection.py index 287b978ca..08865e03c 100644 --- a/platform/src/codat_platform/models/operations/unlink_connection.py +++ b/platform/src/codat_platform/models/operations/unlink_connection.py @@ -50,7 +50,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/platform/src/codat_platform/models/operations/update_company.py b/platform/src/codat_platform/models/operations/update_company.py index 805e5fd25..dfd4433c8 100644 --- a/platform/src/codat_platform/models/operations/update_company.py +++ b/platform/src/codat_platform/models/operations/update_company.py @@ -41,7 +41,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/platform/src/codat_platform/models/operations/update_connection_authorization.py b/platform/src/codat_platform/models/operations/update_connection_authorization.py index 3d4faedfb..aa76da47a 100644 --- a/platform/src/codat_platform/models/operations/update_connection_authorization.py +++ b/platform/src/codat_platform/models/operations/update_connection_authorization.py @@ -45,7 +45,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/platform/src/codat_platform/models/operations/update_profile_syncsettings.py b/platform/src/codat_platform/models/operations/update_profile_syncsettings.py index f8a73abac..29ab4252b 100644 --- a/platform/src/codat_platform/models/operations/update_profile_syncsettings.py +++ b/platform/src/codat_platform/models/operations/update_profile_syncsettings.py @@ -44,10 +44,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + UpdateProfileSyncSettingsRequestBody.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/__init__.py b/platform/src/codat_platform/models/shared/__init__.py index b79bada28..fba41c37a 100644 --- a/platform/src/codat_platform/models/shared/__init__.py +++ b/platform/src/codat_platform/models/shared/__init__.py @@ -1,9 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -from typing import TYPE_CHECKING -from importlib import import_module -import builtins -import sys +from typing import Any, TYPE_CHECKING + +from codat_platform.utils.dynamic_imports import lazy_getattr, lazy_dir if TYPE_CHECKING: from .apikeydetails import APIKeyDetails, APIKeyDetailsTypedDict @@ -497,39 +496,11 @@ } -def dynamic_import(modname, retries=3): - for attempt in range(retries): - try: - return import_module(modname, __package__) - except KeyError: - # Clear any half-initialized module and retry - sys.modules.pop(modname, None) - if attempt == retries - 1: - break - raise KeyError(f"Failed to import module '{modname}' after {retries} attempts") - - -def __getattr__(attr_name: str) -> object: - module_name = _dynamic_imports.get(attr_name) - if module_name is None: - raise AttributeError( - f"No {attr_name} found in _dynamic_imports for module name -> {__name__} " - ) - - try: - module = dynamic_import(module_name) - result = getattr(module, attr_name) - return result - except ImportError as e: - raise ImportError( - f"Failed to import {attr_name} from {module_name}: {e}" - ) from e - except AttributeError as e: - raise AttributeError( - f"Failed to get {attr_name} from {module_name}: {e}" - ) from e +def __getattr__(attr_name: str) -> Any: + return lazy_getattr( + attr_name, package=__package__, dynamic_imports=_dynamic_imports + ) def __dir__(): - lazy_attrs = builtins.list(_dynamic_imports.keys()) - return builtins.sorted(lazy_attrs) + return lazy_dir(dynamic_imports=_dynamic_imports) diff --git a/platform/src/codat_platform/models/shared/apikeydetails.py b/platform/src/codat_platform/models/shared/apikeydetails.py index 6ac9e4d5f..6cb802ad6 100644 --- a/platform/src/codat_platform/models/shared/apikeydetails.py +++ b/platform/src/codat_platform/models/shared/apikeydetails.py @@ -89,7 +89,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -104,3 +104,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + APIKeyDetails.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/apikeys.py b/platform/src/codat_platform/models/shared/apikeys.py index 9e8c72d6c..b1f65cd54 100644 --- a/platform/src/codat_platform/models/shared/apikeys.py +++ b/platform/src/codat_platform/models/shared/apikeys.py @@ -23,7 +23,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/platform/src/codat_platform/models/shared/branding.py b/platform/src/codat_platform/models/shared/branding.py index e3a114f94..6b93d19c4 100644 --- a/platform/src/codat_platform/models/shared/branding.py +++ b/platform/src/codat_platform/models/shared/branding.py @@ -37,10 +37,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + Branding.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/brandingbutton.py b/platform/src/codat_platform/models/shared/brandingbutton.py index 4ce1bdd9a..99ccfdc71 100644 --- a/platform/src/codat_platform/models/shared/brandingbutton.py +++ b/platform/src/codat_platform/models/shared/brandingbutton.py @@ -30,7 +30,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/platform/src/codat_platform/models/shared/brandingimage.py b/platform/src/codat_platform/models/shared/brandingimage.py index bda865390..eefb28e6b 100644 --- a/platform/src/codat_platform/models/shared/brandingimage.py +++ b/platform/src/codat_platform/models/shared/brandingimage.py @@ -25,7 +25,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/platform/src/codat_platform/models/shared/brandinglogo.py b/platform/src/codat_platform/models/shared/brandinglogo.py index a97bd15ae..4f98e8775 100644 --- a/platform/src/codat_platform/models/shared/brandinglogo.py +++ b/platform/src/codat_platform/models/shared/brandinglogo.py @@ -30,7 +30,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/platform/src/codat_platform/models/shared/clientratelimitwebhook.py b/platform/src/codat_platform/models/shared/clientratelimitwebhook.py index 092fcf838..61ed5cac9 100644 --- a/platform/src/codat_platform/models/shared/clientratelimitwebhook.py +++ b/platform/src/codat_platform/models/shared/clientratelimitwebhook.py @@ -82,10 +82,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + ClientRateLimitWebhook.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/clientratelimitwebhookpayload.py b/platform/src/codat_platform/models/shared/clientratelimitwebhookpayload.py index 3708ac32f..ae4fad44e 100644 --- a/platform/src/codat_platform/models/shared/clientratelimitwebhookpayload.py +++ b/platform/src/codat_platform/models/shared/clientratelimitwebhookpayload.py @@ -75,10 +75,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + ClientRateLimitWebhookPayload.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/companies.py b/platform/src/codat_platform/models/shared/companies.py index 88180cfde..23a9821dd 100644 --- a/platform/src/codat_platform/models/shared/companies.py +++ b/platform/src/codat_platform/models/shared/companies.py @@ -43,10 +43,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + Companies.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/company.py b/platform/src/codat_platform/models/shared/company.py index e559e9719..6337dfaff 100644 --- a/platform/src/codat_platform/models/shared/company.py +++ b/platform/src/codat_platform/models/shared/company.py @@ -196,7 +196,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -211,3 +211,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + Company.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/companyaccesstoken.py b/platform/src/codat_platform/models/shared/companyaccesstoken.py index 1fb483a19..6d97a46d2 100644 --- a/platform/src/codat_platform/models/shared/companyaccesstoken.py +++ b/platform/src/codat_platform/models/shared/companyaccesstoken.py @@ -28,3 +28,9 @@ class CompanyAccessToken(BaseModel): token_type: Annotated[str, pydantic.Field(alias="tokenType")] r"""The type of token.""" + + +try: + CompanyAccessToken.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/companydetails.py b/platform/src/codat_platform/models/shared/companydetails.py index c85ee92b3..4057d5798 100644 --- a/platform/src/codat_platform/models/shared/companydetails.py +++ b/platform/src/codat_platform/models/shared/companydetails.py @@ -175,7 +175,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -190,3 +190,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + CompanyDetails.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/companyreference.py b/platform/src/codat_platform/models/shared/companyreference.py index 66e00e283..1396b267f 100644 --- a/platform/src/codat_platform/models/shared/companyreference.py +++ b/platform/src/codat_platform/models/shared/companyreference.py @@ -28,7 +28,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: @@ -74,7 +74,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/platform/src/codat_platform/models/shared/companyrequestbody.py b/platform/src/codat_platform/models/shared/companyrequestbody.py index 550d5247d..8c822ec12 100644 --- a/platform/src/codat_platform/models/shared/companyrequestbody.py +++ b/platform/src/codat_platform/models/shared/companyrequestbody.py @@ -34,7 +34,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/platform/src/codat_platform/models/shared/companysyncsettings.py b/platform/src/codat_platform/models/shared/companysyncsettings.py index facd2d3f7..f66ac8057 100644 --- a/platform/src/codat_platform/models/shared/companysyncsettings.py +++ b/platform/src/codat_platform/models/shared/companysyncsettings.py @@ -36,10 +36,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + CompanySyncSettings.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/companyupdaterequest.py b/platform/src/codat_platform/models/shared/companyupdaterequest.py index 50dddfae9..2c26aa7ed 100644 --- a/platform/src/codat_platform/models/shared/companyupdaterequest.py +++ b/platform/src/codat_platform/models/shared/companyupdaterequest.py @@ -34,7 +34,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/platform/src/codat_platform/models/shared/companywebhook.py b/platform/src/codat_platform/models/shared/companywebhook.py index 1635ae44d..403d3325e 100644 --- a/platform/src/codat_platform/models/shared/companywebhook.py +++ b/platform/src/codat_platform/models/shared/companywebhook.py @@ -79,10 +79,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + CompanyWebhook.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/connection.py b/platform/src/codat_platform/models/shared/connection.py index 8c9db9da8..9594c099c 100644 --- a/platform/src/codat_platform/models/shared/connection.py +++ b/platform/src/codat_platform/models/shared/connection.py @@ -55,8 +55,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 @@ -69,6 +67,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: @@ -133,9 +133,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.""" @@ -160,6 +157,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: @@ -184,14 +186,16 @@ 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 = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -206,3 +210,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + Connection.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/connectionmanagementaccesstoken.py b/platform/src/codat_platform/models/shared/connectionmanagementaccesstoken.py index 40f8e3e84..39f35980d 100644 --- a/platform/src/codat_platform/models/shared/connectionmanagementaccesstoken.py +++ b/platform/src/codat_platform/models/shared/connectionmanagementaccesstoken.py @@ -25,10 +25,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + ConnectionManagementAccessToken.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/connectionmanagementallowedorigins.py b/platform/src/codat_platform/models/shared/connectionmanagementallowedorigins.py index 282c28820..4d6785fc5 100644 --- a/platform/src/codat_platform/models/shared/connectionmanagementallowedorigins.py +++ b/platform/src/codat_platform/models/shared/connectionmanagementallowedorigins.py @@ -31,10 +31,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + ConnectionManagementAllowedOrigins.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/connections.py b/platform/src/codat_platform/models/shared/connections.py index b8a92dd64..83a7b5ff5 100644 --- a/platform/src/codat_platform/models/shared/connections.py +++ b/platform/src/codat_platform/models/shared/connections.py @@ -43,10 +43,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + Connections.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/connectionwebhook.py b/platform/src/codat_platform/models/shared/connectionwebhook.py index 7fd1116de..fd864f131 100644 --- a/platform/src/codat_platform/models/shared/connectionwebhook.py +++ b/platform/src/codat_platform/models/shared/connectionwebhook.py @@ -82,10 +82,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + ConnectionWebhook.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/connectionwebhookpayload.py b/platform/src/codat_platform/models/shared/connectionwebhookpayload.py index dfaca6547..f85c6879c 100644 --- a/platform/src/codat_platform/models/shared/connectionwebhookpayload.py +++ b/platform/src/codat_platform/models/shared/connectionwebhookpayload.py @@ -52,10 +52,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + ConnectionWebhookPayload.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/createapikey.py b/platform/src/codat_platform/models/shared/createapikey.py index b288da5e0..871b23864 100644 --- a/platform/src/codat_platform/models/shared/createapikey.py +++ b/platform/src/codat_platform/models/shared/createapikey.py @@ -34,7 +34,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/platform/src/codat_platform/models/shared/customdatatypeconfiguration.py b/platform/src/codat_platform/models/shared/customdatatypeconfiguration.py index e0dcd7424..f96eb0cf2 100644 --- a/platform/src/codat_platform/models/shared/customdatatypeconfiguration.py +++ b/platform/src/codat_platform/models/shared/customdatatypeconfiguration.py @@ -57,7 +57,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -72,3 +72,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + CustomDataTypeConfiguration.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/customdatatyperecord.py b/platform/src/codat_platform/models/shared/customdatatyperecord.py index 276de26b5..1553f9940 100644 --- a/platform/src/codat_platform/models/shared/customdatatyperecord.py +++ b/platform/src/codat_platform/models/shared/customdatatyperecord.py @@ -31,7 +31,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: @@ -67,10 +67,20 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + ModifiedDate.model_rebuild() +except NameError: + pass +try: + CustomDataTypeRecord.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/customdatatyperecords.py b/platform/src/codat_platform/models/shared/customdatatyperecords.py index cf28a2116..8831646ae 100644 --- a/platform/src/codat_platform/models/shared/customdatatyperecords.py +++ b/platform/src/codat_platform/models/shared/customdatatyperecords.py @@ -43,10 +43,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + CustomDataTypeRecords.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/dataconnectionerror.py b/platform/src/codat_platform/models/shared/dataconnectionerror.py index 77e915d1c..f6c0b2845 100644 --- a/platform/src/codat_platform/models/shared/dataconnectionerror.py +++ b/platform/src/codat_platform/models/shared/dataconnectionerror.py @@ -154,7 +154,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -169,3 +169,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + DataConnectionError.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/datastatus.py b/platform/src/codat_platform/models/shared/datastatus.py index 2ec19d2ca..f3c1069cf 100644 --- a/platform/src/codat_platform/models/shared/datastatus.py +++ b/platform/src/codat_platform/models/shared/datastatus.py @@ -145,10 +145,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + DataStatus.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/datastatuses.py b/platform/src/codat_platform/models/shared/datastatuses.py index 0c8d38d7c..8bb61fb5b 100644 --- a/platform/src/codat_platform/models/shared/datastatuses.py +++ b/platform/src/codat_platform/models/shared/datastatuses.py @@ -348,10 +348,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + DataStatuses.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/datatypefeature.py b/platform/src/codat_platform/models/shared/datatypefeature.py index a38d7e205..18b60e23b 100644 --- a/platform/src/codat_platform/models/shared/datatypefeature.py +++ b/platform/src/codat_platform/models/shared/datatypefeature.py @@ -36,10 +36,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + DataTypeFeature.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/datatypereadsummary.py b/platform/src/codat_platform/models/shared/datatypereadsummary.py index 8d23dd62d..9ca055acd 100644 --- a/platform/src/codat_platform/models/shared/datatypereadsummary.py +++ b/platform/src/codat_platform/models/shared/datatypereadsummary.py @@ -59,7 +59,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -74,3 +74,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + DataTypeReadSummary.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/datatypewritewebhook.py b/platform/src/codat_platform/models/shared/datatypewritewebhook.py index 27b6af960..6eb7da3e2 100644 --- a/platform/src/codat_platform/models/shared/datatypewritewebhook.py +++ b/platform/src/codat_platform/models/shared/datatypewritewebhook.py @@ -82,10 +82,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + DataTypeWriteWebhook.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/datatypewritewebhookpayload.py b/platform/src/codat_platform/models/shared/datatypewritewebhookpayload.py index 3b8e2d096..9aedccf94 100644 --- a/platform/src/codat_platform/models/shared/datatypewritewebhookpayload.py +++ b/platform/src/codat_platform/models/shared/datatypewritewebhookpayload.py @@ -171,7 +171,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -186,3 +186,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + DataTypeWriteWebhookPayload.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/datatypewritewebhookrecord.py b/platform/src/codat_platform/models/shared/datatypewritewebhookrecord.py index 9b8098bb1..18d438a6f 100644 --- a/platform/src/codat_platform/models/shared/datatypewritewebhookrecord.py +++ b/platform/src/codat_platform/models/shared/datatypewritewebhookrecord.py @@ -24,7 +24,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/platform/src/codat_platform/models/shared/errormessage.py b/platform/src/codat_platform/models/shared/errormessage.py index 1c5b6555f..848815ba2 100644 --- a/platform/src/codat_platform/models/shared/errormessage.py +++ b/platform/src/codat_platform/models/shared/errormessage.py @@ -83,7 +83,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -98,3 +98,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + ErrorMessage.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/errorvalidation.py b/platform/src/codat_platform/models/shared/errorvalidation.py index 961663aa7..9e01b317e 100644 --- a/platform/src/codat_platform/models/shared/errorvalidation.py +++ b/platform/src/codat_platform/models/shared/errorvalidation.py @@ -37,7 +37,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/platform/src/codat_platform/models/shared/errorvalidationitem.py b/platform/src/codat_platform/models/shared/errorvalidationitem.py index 4d667fd27..1934ed738 100644 --- a/platform/src/codat_platform/models/shared/errorvalidationitem.py +++ b/platform/src/codat_platform/models/shared/errorvalidationitem.py @@ -43,7 +43,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -58,3 +58,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + ErrorValidationItem.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/halref.py b/platform/src/codat_platform/models/shared/halref.py index 229ca6299..e3b0a3629 100644 --- a/platform/src/codat_platform/models/shared/halref.py +++ b/platform/src/codat_platform/models/shared/halref.py @@ -24,7 +24,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/platform/src/codat_platform/models/shared/imagereference.py b/platform/src/codat_platform/models/shared/imagereference.py index f2154d917..2dabc4e26 100644 --- a/platform/src/codat_platform/models/shared/imagereference.py +++ b/platform/src/codat_platform/models/shared/imagereference.py @@ -33,7 +33,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/platform/src/codat_platform/models/shared/integration.py b/platform/src/codat_platform/models/shared/integration.py index 6b32127d5..3d7a786c4 100644 --- a/platform/src/codat_platform/models/shared/integration.py +++ b/platform/src/codat_platform/models/shared/integration.py @@ -99,10 +99,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + Integration.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/integrations.py b/platform/src/codat_platform/models/shared/integrations.py index 64851ed11..9b36dcb26 100644 --- a/platform/src/codat_platform/models/shared/integrations.py +++ b/platform/src/codat_platform/models/shared/integrations.py @@ -43,10 +43,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + Integrations.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/issue.py b/platform/src/codat_platform/models/shared/issue.py index c31955278..53cff7d7c 100644 --- a/platform/src/codat_platform/models/shared/issue.py +++ b/platform/src/codat_platform/models/shared/issue.py @@ -35,7 +35,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: @@ -73,10 +73,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + IssueLinks.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/links.py b/platform/src/codat_platform/models/shared/links.py index 6d8d9aa07..652c44d57 100644 --- a/platform/src/codat_platform/models/shared/links.py +++ b/platform/src/codat_platform/models/shared/links.py @@ -33,10 +33,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + Links.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/profile.py b/platform/src/codat_platform/models/shared/profile.py index a992ddf38..d85c8aace 100644 --- a/platform/src/codat_platform/models/shared/profile.py +++ b/platform/src/codat_platform/models/shared/profile.py @@ -75,10 +75,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + Profile.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/pulloperation.py b/platform/src/codat_platform/models/shared/pulloperation.py index c69be5515..c70b8a497 100644 --- a/platform/src/codat_platform/models/shared/pulloperation.py +++ b/platform/src/codat_platform/models/shared/pulloperation.py @@ -202,7 +202,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -217,3 +217,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + PullOperation.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/pulloperations.py b/platform/src/codat_platform/models/shared/pulloperations.py index 0f7238816..766448628 100644 --- a/platform/src/codat_platform/models/shared/pulloperations.py +++ b/platform/src/codat_platform/models/shared/pulloperations.py @@ -43,10 +43,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + PullOperations.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/pushfieldvalidation.py b/platform/src/codat_platform/models/shared/pushfieldvalidation.py index 6bd25a322..842914aa7 100644 --- a/platform/src/codat_platform/models/shared/pushfieldvalidation.py +++ b/platform/src/codat_platform/models/shared/pushfieldvalidation.py @@ -41,7 +41,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/platform/src/codat_platform/models/shared/pushoperation.py b/platform/src/codat_platform/models/shared/pushoperation.py index 0b8a6e9a4..0d0f6d82a 100644 --- a/platform/src/codat_platform/models/shared/pushoperation.py +++ b/platform/src/codat_platform/models/shared/pushoperation.py @@ -196,7 +196,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -211,3 +211,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + PushOperation.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/pushoperationchange.py b/platform/src/codat_platform/models/shared/pushoperationchange.py index 060085177..cb18ba3fd 100644 --- a/platform/src/codat_platform/models/shared/pushoperationchange.py +++ b/platform/src/codat_platform/models/shared/pushoperationchange.py @@ -46,7 +46,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -61,3 +61,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + PushOperationChange.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/pushoperationref.py b/platform/src/codat_platform/models/shared/pushoperationref.py index 9622f837f..d0ea1619d 100644 --- a/platform/src/codat_platform/models/shared/pushoperationref.py +++ b/platform/src/codat_platform/models/shared/pushoperationref.py @@ -31,10 +31,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + PushOperationRef.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/pushoperations.py b/platform/src/codat_platform/models/shared/pushoperations.py index 095fc324a..b952036ea 100644 --- a/platform/src/codat_platform/models/shared/pushoperations.py +++ b/platform/src/codat_platform/models/shared/pushoperations.py @@ -43,10 +43,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + PushOperations.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/pushoption.py b/platform/src/codat_platform/models/shared/pushoption.py index 35662abcd..305ee6764 100644 --- a/platform/src/codat_platform/models/shared/pushoption.py +++ b/platform/src/codat_platform/models/shared/pushoption.py @@ -60,7 +60,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -75,3 +75,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + PushOption.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/pushoptionchoice.py b/platform/src/codat_platform/models/shared/pushoptionchoice.py index f2b86e3db..50e963c62 100644 --- a/platform/src/codat_platform/models/shared/pushoptionchoice.py +++ b/platform/src/codat_platform/models/shared/pushoptionchoice.py @@ -48,10 +48,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + PushOptionChoice.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/pushoptionproperty.py b/platform/src/codat_platform/models/shared/pushoptionproperty.py index 7675b0535..ee5e159db 100644 --- a/platform/src/codat_platform/models/shared/pushoptionproperty.py +++ b/platform/src/codat_platform/models/shared/pushoptionproperty.py @@ -59,7 +59,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -74,3 +74,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + PushOptionProperty.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/pushvalidationinfo.py b/platform/src/codat_platform/models/shared/pushvalidationinfo.py index f3bf686c4..bfa9ac7a0 100644 --- a/platform/src/codat_platform/models/shared/pushvalidationinfo.py +++ b/platform/src/codat_platform/models/shared/pushvalidationinfo.py @@ -33,7 +33,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/platform/src/codat_platform/models/shared/readcompletedwebhook.py b/platform/src/codat_platform/models/shared/readcompletedwebhook.py index 2acff6daa..6614dbec6 100644 --- a/platform/src/codat_platform/models/shared/readcompletedwebhook.py +++ b/platform/src/codat_platform/models/shared/readcompletedwebhook.py @@ -82,10 +82,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + ReadCompletedWebhook.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/readcompletedwebhookpayload.py b/platform/src/codat_platform/models/shared/readcompletedwebhookpayload.py index 884578f89..900f23eaf 100644 --- a/platform/src/codat_platform/models/shared/readcompletedwebhookpayload.py +++ b/platform/src/codat_platform/models/shared/readcompletedwebhookpayload.py @@ -77,10 +77,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + ReadCompletedWebhookPayload.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/supplementaldataconfiguration.py b/platform/src/codat_platform/models/shared/supplementaldataconfiguration.py index 0945c417c..107ed24a8 100644 --- a/platform/src/codat_platform/models/shared/supplementaldataconfiguration.py +++ b/platform/src/codat_platform/models/shared/supplementaldataconfiguration.py @@ -43,7 +43,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: @@ -72,10 +72,20 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + SupplementalDataSourceConfiguration.model_rebuild() +except NameError: + pass +try: + SupplementalDataConfiguration.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/supportedfeature.py b/platform/src/codat_platform/models/shared/supportedfeature.py index ed2b82c46..6610bab76 100644 --- a/platform/src/codat_platform/models/shared/supportedfeature.py +++ b/platform/src/codat_platform/models/shared/supportedfeature.py @@ -21,3 +21,9 @@ class SupportedFeature(BaseModel): feature_type: Annotated[FeatureType, pydantic.Field(alias="featureType")] r"""The type of feature.""" + + +try: + SupportedFeature.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/syncsetting.py b/platform/src/codat_platform/models/shared/syncsetting.py index 406dec60d..d133ee191 100644 --- a/platform/src/codat_platform/models/shared/syncsetting.py +++ b/platform/src/codat_platform/models/shared/syncsetting.py @@ -109,10 +109,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + SyncSetting.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/syncsettings.py b/platform/src/codat_platform/models/shared/syncsettings.py index ccbde3fc4..52315fb69 100644 --- a/platform/src/codat_platform/models/shared/syncsettings.py +++ b/platform/src/codat_platform/models/shared/syncsettings.py @@ -36,10 +36,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + SyncSettings.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/updateconnectionstatus.py b/platform/src/codat_platform/models/shared/updateconnectionstatus.py index 6e2f64bcf..89510833d 100644 --- a/platform/src/codat_platform/models/shared/updateconnectionstatus.py +++ b/platform/src/codat_platform/models/shared/updateconnectionstatus.py @@ -25,7 +25,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/platform/src/codat_platform/models/shared/validation.py b/platform/src/codat_platform/models/shared/validation.py index 4af186ba5..e5da60ba5 100644 --- a/platform/src/codat_platform/models/shared/validation.py +++ b/platform/src/codat_platform/models/shared/validation.py @@ -37,7 +37,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/platform/src/codat_platform/models/shared/validationitem.py b/platform/src/codat_platform/models/shared/validationitem.py index 336dfdc4c..5fa1048ce 100644 --- a/platform/src/codat_platform/models/shared/validationitem.py +++ b/platform/src/codat_platform/models/shared/validationitem.py @@ -43,7 +43,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -58,3 +58,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + ValidationItem.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/validationitem1.py b/platform/src/codat_platform/models/shared/validationitem1.py index 38cf4a163..cb3db24f7 100644 --- a/platform/src/codat_platform/models/shared/validationitem1.py +++ b/platform/src/codat_platform/models/shared/validationitem1.py @@ -42,10 +42,16 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: m[k] = val return m + + +try: + ValidationItem1.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/validationresult.py b/platform/src/codat_platform/models/shared/validationresult.py index aa55d281c..4b95ffab5 100644 --- a/platform/src/codat_platform/models/shared/validationresult.py +++ b/platform/src/codat_platform/models/shared/validationresult.py @@ -26,7 +26,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/platform/src/codat_platform/models/shared/webhookconsumer.py b/platform/src/codat_platform/models/shared/webhookconsumer.py index b468b1c45..963af972d 100644 --- a/platform/src/codat_platform/models/shared/webhookconsumer.py +++ b/platform/src/codat_platform/models/shared/webhookconsumer.py @@ -68,7 +68,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -83,3 +83,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + WebhookConsumer.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/webhookconsumerprototype.py b/platform/src/codat_platform/models/shared/webhookconsumerprototype.py index 438d24541..48d4ab0af 100644 --- a/platform/src/codat_platform/models/shared/webhookconsumerprototype.py +++ b/platform/src/codat_platform/models/shared/webhookconsumerprototype.py @@ -51,7 +51,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -66,3 +66,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + WebhookConsumerPrototype.model_rebuild() +except NameError: + pass diff --git a/platform/src/codat_platform/models/shared/webhookconsumers.py b/platform/src/codat_platform/models/shared/webhookconsumers.py index 775d82213..cca3a9b1e 100644 --- a/platform/src/codat_platform/models/shared/webhookconsumers.py +++ b/platform/src/codat_platform/models/shared/webhookconsumers.py @@ -23,7 +23,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/platform/src/codat_platform/push_data.py b/platform/src/codat_platform/push_data.py index 4fa1c7ae7..a2a3201f1 100644 --- a/platform/src/codat_platform/push_data.py +++ b/platform/src/codat_platform/push_data.py @@ -92,17 +92,7 @@ def get_model_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, ) @@ -206,17 +196,7 @@ async def get_model_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, ) @@ -316,17 +296,7 @@ def get_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, ) @@ -426,17 +396,7 @@ async def get_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, ) @@ -536,18 +496,7 @@ def list_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, ) @@ -647,18 +596,7 @@ async def list_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, ) diff --git a/platform/src/codat_platform/read_data.py b/platform/src/codat_platform/read_data.py index 3583e3122..decffd016 100644 --- a/platform/src/codat_platform/read_data.py +++ b/platform/src/codat_platform/read_data.py @@ -93,17 +93,7 @@ def get_validation_results( 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, ) @@ -208,17 +198,7 @@ async def get_validation_results_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/platform/src/codat_platform/refresh_data.py b/platform/src/codat_platform/refresh_data.py index 0acda4ef0..804347ccc 100644 --- a/platform/src/codat_platform/refresh_data.py +++ b/platform/src/codat_platform/refresh_data.py @@ -90,18 +90,7 @@ def all( 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, ) @@ -203,18 +192,7 @@ async def all_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, ) @@ -314,18 +292,7 @@ def by_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, ) @@ -425,18 +392,7 @@ async def by_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, ) @@ -534,17 +490,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, ) @@ -642,17 +588,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, ) @@ -750,17 +686,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, ) @@ -858,17 +784,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, ) @@ -966,18 +882,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, ) @@ -1075,18 +980,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, ) diff --git a/platform/src/codat_platform/sdk.py b/platform/src/codat_platform/sdk.py index 8d0ac9dd2..144605432 100644 --- a/platform/src/codat_platform/sdk.py +++ b/platform/src/codat_platform/sdk.py @@ -103,8 +103,8 @@ def __init__( self, security: Union[shared.Security, Callable[[], shared.Security]], server_idx: Optional[int] = None, - server_url: Optional[str] = None, url_params: Optional[Dict[str, str]] = None, + server_url: Optional[str] = None, client: Optional[HttpClient] = None, async_client: Optional[AsyncHttpClient] = None, retry_config: OptionalNullable[RetryConfig] = UNSET, diff --git a/platform/src/codat_platform/settings.py b/platform/src/codat_platform/settings.py index 8d3d0705b..bc87d0f93 100644 --- a/platform/src/codat_platform/settings.py +++ b/platform/src/codat_platform/settings.py @@ -98,18 +98,7 @@ def create_api_key( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "409", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -219,18 +208,7 @@ async def create_api_key_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "409", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -336,17 +314,7 @@ def delete_api_key( 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, ) @@ -452,17 +420,7 @@ async def delete_api_key_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, ) @@ -552,17 +510,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 +602,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, ) @@ -754,7 +692,7 @@ def get_profile( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["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, ) @@ -842,7 +780,7 @@ async def get_profile_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["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, ) @@ -930,7 +868,7 @@ def get_sync_settings( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["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, ) @@ -1018,7 +956,7 @@ async def get_sync_settings_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["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, ) @@ -1110,7 +1048,7 @@ def list_api_keys( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["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, ) @@ -1202,7 +1140,7 @@ async def list_api_keys_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["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, ) @@ -1313,17 +1251,7 @@ def set( 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, ) @@ -1436,17 +1364,7 @@ async def set_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, ) @@ -1546,7 +1464,7 @@ def update_profile( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["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, ) @@ -1644,7 +1562,7 @@ async def update_profile_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["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, ) @@ -1755,7 +1673,7 @@ def update_sync_settings( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["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, ) @@ -1866,7 +1784,7 @@ async def update_sync_settings_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["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, ) diff --git a/platform/src/codat_platform/supplemental_data.py b/platform/src/codat_platform/supplemental_data.py index b987bf620..29941c3f3 100644 --- a/platform/src/codat_platform/supplemental_data.py +++ b/platform/src/codat_platform/supplemental_data.py @@ -69,7 +69,9 @@ def configure( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.supplemental_data_configuration, + request.supplemental_data_configuration + if request is not None + else None, False, True, "json", @@ -100,17 +102,7 @@ def configure( 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, ) @@ -191,7 +183,9 @@ async def configure_async( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.supplemental_data_configuration, + request.supplemental_data_configuration + if request is not None + else None, False, True, "json", @@ -222,17 +216,7 @@ async def configure_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, ) @@ -334,17 +318,7 @@ def get_configuration( 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, ) @@ -448,17 +422,7 @@ async def get_configuration_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/platform/src/codat_platform/utils/__init__.py b/platform/src/codat_platform/utils/__init__.py index 15394a08a..0498cb8da 100644 --- a/platform/src/codat_platform/utils/__init__.py +++ b/platform/src/codat_platform/utils/__init__.py @@ -1,10 +1,9 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -from typing import TYPE_CHECKING, Callable, TypeVar -from importlib import import_module +from typing import Any, TYPE_CHECKING, Callable, TypeVar import asyncio -import builtins -import sys + +from .dynamic_imports import lazy_getattr, lazy_dir _T = TypeVar("_T") @@ -166,38 +165,11 @@ async def run_sync_in_thread(func: Callable[..., _T], *args) -> _T: } -def dynamic_import(modname, retries=3): - for attempt in range(retries): - try: - return import_module(modname, __package__) - except KeyError: - # Clear any half-initialized module and retry - sys.modules.pop(modname, None) - if attempt == retries - 1: - break - raise KeyError(f"Failed to import module '{modname}' after {retries} attempts") - - -def __getattr__(attr_name: str) -> object: - module_name = _dynamic_imports.get(attr_name) - if module_name is None: - raise AttributeError( - f"no {attr_name} found in _dynamic_imports, module name -> {__name__} " - ) - - try: - module = dynamic_import(module_name) - return getattr(module, attr_name) - except ImportError as e: - raise ImportError( - f"Failed to import {attr_name} from {module_name}: {e}" - ) from e - except AttributeError as e: - raise AttributeError( - f"Failed to get {attr_name} from {module_name}: {e}" - ) from e +def __getattr__(attr_name: str) -> Any: + return lazy_getattr( + attr_name, package=__package__, dynamic_imports=_dynamic_imports + ) def __dir__(): - lazy_attrs = builtins.list(_dynamic_imports.keys()) - return builtins.sorted(lazy_attrs) + return lazy_dir(dynamic_imports=_dynamic_imports) diff --git a/platform/src/codat_platform/utils/dynamic_imports.py b/platform/src/codat_platform/utils/dynamic_imports.py new file mode 100644 index 000000000..673edf82a --- /dev/null +++ b/platform/src/codat_platform/utils/dynamic_imports.py @@ -0,0 +1,54 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from importlib import import_module +import builtins +import sys + + +def dynamic_import(package, modname, retries=3): + """Import a module relative to package, retrying on KeyError from half-initialized modules.""" + for attempt in range(retries): + try: + return import_module(modname, package) + except KeyError: + sys.modules.pop(modname, None) + if attempt == retries - 1: + break + raise KeyError(f"Failed to import module '{modname}' after {retries} attempts") + + +def lazy_getattr(attr_name, *, package, dynamic_imports, sub_packages=None): + """Module-level __getattr__ that lazily loads from a dynamic_imports mapping. + + Args: + attr_name: The attribute being looked up. + package: The caller's __package__ (for relative imports). + dynamic_imports: Dict mapping attribute names to relative module paths. + sub_packages: Optional list of subpackage names to lazy-load. + """ + module_name = dynamic_imports.get(attr_name) + if module_name is not None: + try: + module = dynamic_import(package, module_name) + return getattr(module, attr_name) + except ImportError as e: + raise ImportError( + f"Failed to import {attr_name} from {module_name}: {e}" + ) from e + except AttributeError as e: + raise AttributeError( + f"Failed to get {attr_name} from {module_name}: {e}" + ) from e + + if sub_packages and attr_name in sub_packages: + return import_module(f".{attr_name}", package) + + raise AttributeError(f"module '{package}' has no attribute '{attr_name}'") + + +def lazy_dir(*, dynamic_imports, sub_packages=None): + """Module-level __dir__ that lists lazily-loadable attributes.""" + lazy_attrs = builtins.list(dynamic_imports.keys()) + if sub_packages: + lazy_attrs.extend(sub_packages) + return builtins.sorted(lazy_attrs) diff --git a/platform/src/codat_platform/utils/eventstreaming.py b/platform/src/codat_platform/utils/eventstreaming.py index f2052fc22..3bdcd6d3d 100644 --- a/platform/src/codat_platform/utils/eventstreaming.py +++ b/platform/src/codat_platform/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/platform/src/codat_platform/utils/metadata.py b/platform/src/codat_platform/utils/metadata.py index 173b3e5ce..5abddd588 100644 --- a/platform/src/codat_platform/utils/metadata.py +++ b/platform/src/codat_platform/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/platform/src/codat_platform/utils/retries.py b/platform/src/codat_platform/utils/retries.py index 88a91b10c..af07d4e94 100644 --- a/platform/src/codat_platform/utils/retries.py +++ b/platform/src/codat_platform/utils/retries.py @@ -144,12 +144,7 @@ def do_request() -> httpx.Response: if res.status_code == parsed_code: raise TemporaryError(res) - except httpx.ConnectError as exception: - if retries.config.retry_connection_errors: - raise - - raise PermanentError(exception) from exception - except httpx.TimeoutException as exception: + except (httpx.NetworkError, httpx.TimeoutException) as exception: if retries.config.retry_connection_errors: raise @@ -193,12 +188,7 @@ async def do_request() -> httpx.Response: if res.status_code == parsed_code: raise TemporaryError(res) - except httpx.ConnectError as exception: - if retries.config.retry_connection_errors: - raise - - raise PermanentError(exception) from exception - except httpx.TimeoutException as exception: + except (httpx.NetworkError, httpx.TimeoutException) as exception: if retries.config.retry_connection_errors: raise diff --git a/platform/src/codat_platform/utils/security.py b/platform/src/codat_platform/utils/security.py index 17996bd54..42d8d78e9 100644 --- a/platform/src/codat_platform/utils/security.py +++ b/platform/src/codat_platform/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/platform/src/codat_platform/utils/serializers.py b/platform/src/codat_platform/utils/serializers.py index 14321eb47..d2149f8b9 100644 --- a/platform/src/codat_platform/utils/serializers.py +++ b/platform/src/codat_platform/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: diff --git a/platform/src/codat_platform/webhooks.py b/platform/src/codat_platform/webhooks.py index dac18d0d5..2641d6baa 100644 --- a/platform/src/codat_platform/webhooks.py +++ b/platform/src/codat_platform/webhooks.py @@ -98,17 +98,7 @@ def create_consumer( 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, ) @@ -218,17 +208,7 @@ async def create_consumer_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, ) @@ -328,17 +308,7 @@ def delete_consumer( 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, ) @@ -438,17 +408,7 @@ async def delete_consumer_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, ) @@ -538,17 +498,7 @@ def list_consumers( 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, ) @@ -638,17 +588,7 @@ async def list_consumers_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, )