openapi: 3.1.0
x-stoplight:
id: v6f6vc930irb5
servers:
- description: Production
url: 'https://api.codat.io'
info:
title: Sync for Commerce (v1)
version: '1.1'
contact:
name: Codat
url: 'https://www.codat.io/'
email: syncforcommerce@codat.io
description: |-
The API for Sync for Commerce V1.
Sync for Commerce automatically replicates and reconciles sales data from a merchant’s source PoS, Payments, and eCommerce systems into their accounting software. This eliminates manual processing by merchants and transforms their ability to run and grow their business.
## Endpoints
| Endpoints | Description |
| :- |:- |
| Company management | Create new and manage existing Sync for Commerce companies. |
| Configuration | Expressively configure preferences for any given Sync for Commerce company. |
| Sync flow preferences | Configure preferences for any given Sync for Commerce company using sync flow. |
| Sync | Initiate a sync of Sync for Commerce company data into their respective accounting software. |
| Integrations | View useful information about codat's integrations. |
| Companies | Create and manage your Codat companies. |
| Connections | Manage your companies' data connections. |
| Refresh data | Asynchronously retrieve data from an integration to refresh data in Codat. |
| Push data | View push options and get push statuses. |
| Accounting accounts | Retrieve standardized Accounts from linked accounting software. |
| Accounting credit notes | Retrieve standardized Credit notes from linked accounting software. |
| Accounting customers | Retrieve standardized Customers from linked accounting software. |
| Accounting direct incomes | Retrieve standardized Direct incomes from linked accounting software. |
| Accounting company info | Retrieve standardized Accounting company info from linked accounting software. |
| Accounting invoices | Retrieve standardized Invoices from linked accounting software. |
| Accounting journal entries | Retrieve standardized Journal entries from linked accounting software. |
| Accounting payments | Retrieve standardized Payments from linked accounting software. |
| Accounting bank accounts | Retrieve standardized Bank accounts from linked accounting software. |
| Commerce customers | Retrieve standardized Commerce customers from linked commerce software. |
| Commerce company info | Retrieve standardized Commerce company info from linked commerce software. |
| Commerce locations | Retrieve standardized Commerce locations from linked commerce software. |
| Commerce orders | Retrieve standardized Commerce orders from linked commerce software. |
| Commerce payments | Retrieve standardized Commerce payments from linked commerce software. |
| Commerce products | Retrieve standardized Commerce products from linked commerce software. |
| Commerce transactions | Retrieve standardized Commerce transactions from linked commerce software. |
[Read More...](https://docs.codat.io/commerce/overview)
Not seeing what you expect? [See the main Sync for Commerce API](https://docs.codat.io/sync-for-commerce-api).
termsOfService: 'https://www.codat.io/legals/'
security:
- auth_header: []
x-speakeasy-retries:
strategy: backoff
backoff:
initialInterval: 500
maxInterval: 60000
maxElapsedTime: 3600000
exponent: 1.5
statusCodes:
- 408
- 429
- 5XX
retryConnectionErrors: true
x-codat-docs-path: sync-for-commerce-v1-api
x-codat-speakeasy-pagination:
type: offsetLimit
inputs:
- name: page
in: parameters
type: page
outputs:
results: $.results
tags:
- name: Company management
description: Create new and manage existing Sync for Commerce companies.
- name: Configuration
description: Expressively configure preferences for any given Sync for Commerce company.
- name: Sync flow preferences
description: Configure preferences for any given Sync for Commerce company using sync flow.
- name: Sync
description: Initiate a sync of Sync for Commerce company data into their respective accounting software.
- name: Integrations
description: View useful information about codat's integrations.
- name: Companies
description: Create and manage your Codat companies.
- name: Connections
description: Manage your companies' data connections.
- name: Refresh data
description: Asynchronously retrieve data from an integration to refresh data in Codat.
- name: Push data
description: View push options and get push statuses.
- name: Accounting accounts
description: Retrieve standardized Accounts from linked accounting software.
- name: Accounting credit notes
description: Retrieve standardized Credit notes from linked accounting software.
- name: Accounting customers
description: Retrieve standardized Customers from linked accounting software.
- name: Accounting direct incomes
description: Retrieve standardized Direct incomes from linked accounting software.
- name: Accounting company info
description: Retrieve standardized Accounting company info from linked accounting software.
- name: Accounting invoices
description: Retrieve standardized Invoices from linked accounting software.
- name: Accounting journal entries
description: Retrieve standardized Journal entries from linked accounting software.
- name: Accounting payments
description: Retrieve standardized Payments from linked accounting software.
- name: Accounting bank accounts
description: Retrieve standardized Bank accounts from linked accounting software.
- name: Commerce customers
description: Retrieve standardized Commerce customers from linked commerce software.
- name: Commerce company info
description: Retrieve standardized Commerce company info from linked commerce software.
- name: Commerce locations
description: Retrieve standardized Commerce locations from linked commerce software.
- name: Commerce orders
description: Retrieve standardized Commerce orders from linked commerce software.
- name: Commerce payments
description: Retrieve standardized Commerce payments from linked commerce software.
- name: Commerce products
description: Retrieve standardized Commerce products from linked commerce software.
- name: Commerce transactions
description: Retrieve standardized Commerce transactions from linked commerce software.
paths:
/meta/companies:
get:
tags:
- Company management
summary: List companies
description: Retrieve a list of all companies the client has created.
operationId: list-companies
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/pageSize'
- $ref: '#/components/parameters/query'
- $ref: '#/components/parameters/orderBy'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Companies'
'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'
/meta/companies/sync:
post:
tags:
- Company management
summary: Create sync for commerce company
description: Creates a Codat company with a commerce partner data connection.
operationId: create-company
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateCompany'
example:
name: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Company'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/Payment-Required'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/Not-Found'
'429':
$ref: '#/components/responses/Too-Many-Requests'
'500':
$ref: '#/components/responses/Internal-Server-Error'
'503':
$ref: '#/components/responses/Service-Unavailable'
'/meta/companies/{companyId}/connections':
get:
tags:
- Company management
summary: List data connections
description: Retrieve previously created data connections.
operationId: list-connections
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/pageSize'
- $ref: '#/components/parameters/query'
- $ref: '#/components/parameters/orderBy'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Connections'
'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'
post:
tags:
- Company management
summary: Create connection
description: Create a data connection for company.
operationId: create-connection
parameters:
- $ref: '#/components/parameters/companyId'
requestBody:
content:
application/json:
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Connection'
'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'
parameters:
- $ref: '#/components/parameters/companyId'
'/config/companies/{companyId}/sync/commerce':
get:
tags:
- Configuration
summary: Retrieve config preferences set for a company
description: Retrieve current config preferences.
operationId: get-configuration
parameters:
- $ref: '#/components/parameters/companyId'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Configuration'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/Payment-Required'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/Not-Found'
'429':
$ref: '#/components/responses/Too-Many-Requests'
'500':
$ref: '#/components/responses/Internal-Server-Error'
'503':
$ref: '#/components/responses/Service-Unavailable'
post:
tags:
- Configuration
summary: Create or update configuration
description: Make changes to configuration preferences.
operationId: set-configuration
parameters:
- $ref: '#/components/parameters/companyId'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Configuration'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/Payment-Required'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/Not-Found'
'409':
$ref: '#/components/responses/Conflict'
'429':
$ref: '#/components/responses/Too-Many-Requests'
'500':
$ref: '#/components/responses/Internal-Server-Error'
'503':
$ref: '#/components/responses/Service-Unavailable'
/config/integrations:
get:
tags:
- Integrations
summary: List integrations
description: Retrieve a list of available integrations support by datatype and state of release.
operationId: list-integrations
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/pageSize'
- $ref: '#/components/parameters/query'
- $ref: '#/components/parameters/orderBy'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Integrations'
'400':
$ref: '#/components/responses/Malformed-Query'
'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'
'/config/integrations/{platformKey}/branding':
get:
tags:
- Integrations
summary: Get branding for an integration
description: Retrieve Integration branding assets.
operationId: get-integration-branding
parameters:
- $ref: '#/components/parameters/platformKey'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Branding'
'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'
parameters:
- schema:
type: string
name: platformKey
in: path
required: true
description: Unique four letter identifier for the platform
'/meta/companies/{companyId}/connections/{connectionId}':
patch:
tags:
- Company management
summary: Update data connection
description: Update a data connection
operationId: update-connection
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateConnection'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Connection'
'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'
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
'/config/sync/commerce/{commerceKey}/{accountingKey}/start':
get:
tags:
- Sync flow preferences
summary: Retrieve sync flow url
description: Get a URL for Sync Flow including a one time passcode.
operationId: get-sync-flow-url
parameters:
- name: commerceKey
in: path
description: Commerce platform key
required: true
schema:
type: string
- name: accountingKey
in: path
description: Accounting platform key
required: true
schema:
type: string
- name: merchantIdentifier
in: query
schema:
type: string
description: 'Identifier for your merchant, can be the merchant name or Codat company id.'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/SyncFlowUrl'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/Payment-Required'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/Not-Found'
'429':
$ref: '#/components/responses/Too-Many-Requests'
'500':
$ref: '#/components/responses/Internal-Server-Error'
'503':
$ref: '#/components/responses/Service-Unavailable'
parameters:
- schema:
type: string
name: commerceKey
in: path
required: true
description: Unique identifier for commerce software.
- schema:
type: string
name: accountingKey
in: path
required: true
description: Unique identifier for accounting software.
/sync/commerce/config/ui/text:
get:
tags:
- Sync flow preferences
summary: Retrieve preferences for text fields on sync flow
description: To enable retrieval of preferences set for the text fields on Sync Flow.
operationId: get-config-text-sync-flow
parameters:
- $ref: '#/components/parameters/locale'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/LocalizationInfo'
'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'
patch:
tags:
- Sync flow preferences
summary: Update preferences for text fields on sync flow
description: To enable update of preferences set for the text fields on sync flow.
operationId: update-config-text-sync-flow
parameters:
- $ref: '#/components/parameters/locale'
requestBody:
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/LocalizationInfo'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/LocalizationInfo'
'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'
'/clients/{clientId}/config/ui/accounts/platform/{platformKey}':
parameters:
- name: clientId
in: path
required: true
schema:
title: Client ID
type: string
format: uuid
description: Unique identifier for your client in Codat.
description: Unique identifier for your client in Codat.
- $ref: '#/components/parameters/platformKey'
get:
tags:
- Sync flow preferences
summary: List visible accounts
description: Enable retrieval for accounts which are visible on sync flow.
operationId: get-visible-accounts
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/VisibleAccounts'
'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'
'/sync/commerce/config/ui/accounts/platform/{platformKey}':
post:
tags:
- Sync flow preferences
summary: Update the visible accounts on sync flow
description: To enable update of accounts visible preferences set on Sync Flow.
operationId: update-visible-accounts-sync-flow
parameters:
- $ref: '#/components/parameters/platformKey'
requestBody:
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/VisibleAccounts'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/VisibleAccounts'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/Payment-Required'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/Not-Found'
'429':
$ref: '#/components/responses/Too-Many-Requests'
'500':
$ref: '#/components/responses/Internal-Server-Error'
'503':
$ref: '#/components/responses/Service-Unavailable'
x-stoplight:
id: 31t0fdy12nbif
'/companies/{companyId}/sync/commerce/latest':
post:
tags:
- Sync
summary: Sync new
description: "Run a Commerce sync from the last successful sync up to the date provided (optional), otherwise UtcNow is used.\r\nIf there was no previously successful sync, the start date in the config is used."
operationId: request-sync
parameters:
- $ref: '#/components/parameters/companyId'
requestBody:
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/SyncToLatestArgs'
responses:
'200':
description: Success
content:
application/json:
x-speakeasy-usage-example: true
schema:
$ref: '#/components/schemas/SyncSummary'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/Payment-Required'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/Not-Found'
'429':
$ref: '#/components/responses/Too-Many-Requests'
'500':
$ref: '#/components/responses/Internal-Server-Error'
'503':
$ref: '#/components/responses/Service-Unavailable'
parameters:
- $ref: '#/components/parameters/companyId'
'/meta/companies/{companyId}/sync/commerce/historic':
post:
tags:
- Sync
summary: Sync range
description: Run a Commerce sync from the specified start date to the specified finish date in the request payload.
operationId: request-sync-for-date-range
parameters:
- $ref: '#/components/parameters/companyId'
requestBody:
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/SyncRange'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/SyncSummary'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/Payment-Required'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/Not-Found'
'429':
$ref: '#/components/responses/Too-Many-Requests'
'500':
$ref: '#/components/responses/Internal-Server-Error'
'503':
$ref: '#/components/responses/Service-Unavailable'
'/meta/companies/{companyId}/sync/commerce/status':
get:
tags:
- Sync
summary: Get status for a company's syncs
description: Check the sync history and sync status for a company.
operationId: get-sync-status
parameters:
- $ref: '#/components/parameters/companyId'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/SyncSummary'
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'
parameters:
- $ref: '#/components/parameters/companyId'
'/companies/{companyId}':
put:
summary: Update company
description: "\uFEFFUse the *Update company* endpoint to update both the name and description of the company. \n\nA [company](https://docs.codat.io/sync-for-commerce-v1-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/sync-for-commerce-v1-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: update-company
parameters:
- $ref: '#/components/parameters/companyId'
tags:
- Companies
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Company'
'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/CreateCompany'
examples:
Update name:
value:
name: New Name
Update description:
value:
name: Same name
description: Additional documents required
delete:
summary: Delete a company
operationId: delete-company
parameters:
- $ref: '#/components/parameters/companyId'
description: "\uFEFFThe *Delete company* endpoint permanently deletes a [company](https://docs.codat.io/sync-for-commerce-v1-api#/schemas/Company), its [connections](https://docs.codat.io/sync-for-commerce-v1-api#/schemas/Connection) and any cached data. This operation is irreversible.\n\nA [company](https://docs.codat.io/sync-for-commerce-v1-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/sync-for-commerce-v1-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.\n"
tags:
- Companies
responses:
'204':
description: No Content
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/Payment-Required'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/Not-Found'
'429':
$ref: '#/components/responses/Too-Many-Requests'
'500':
$ref: '#/components/responses/Internal-Server-Error'
'503':
$ref: '#/components/responses/Service-Unavailable'
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/sync-for-commerce-v1-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/sync-for-commerce-v1-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:
- Companies
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Company'
examples:
Simple company:
value:
id: ab12c58d-a678-4ebf-a159-ae99e1807bd0
name: My First Company
description: ''
platform: ''
redirect: 'https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0'
dataConnections: []
created: '2022-11-10T10:45:18Z'
createdByUserName: Dan Tzabar
'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}':
get:
summary: Get connection
operationId: get-connection
description: "\uFEFFReturns a specific connection for a company when valid identifiers are provided. If the identifiers are for a deleted company and/or connection, a not found response is returned."
tags:
- Connections
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Connection'
examples:
Connection:
value:
id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd
integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c
integrationKey: dfxm
sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee
platformName: Basiq
linkUrl: 'https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start'
status: Linked
lastSync: '2022-10-27T10:22:43.6464237Z'
created: '2022-10-27T09:53:29Z'
sourceType: Banking
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/Payment-Required'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/Not-Found'
'429':
$ref: '#/components/responses/Too-Many-Requests'
'500':
$ref: '#/components/responses/Internal-Server-Error'
'503':
$ref: '#/components/responses/Service-Unavailable'
delete:
summary: Delete connection
operationId: delete-connection
description: "\uFEFFRevoke and remove a connection from a company.\nThis operation is not reversible. The end user would need to reauthorize a new data connection if you wish to view new data for this company."
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
tags:
- Connections
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'
patch:
summary: Unlink connection
description: "\uFEFFThis allows you to deauthorize a connection, without deleting it from Codat. This means you can still view any data that has previously been pulled into Codat, and also lets you re-authorize in future if your customer wishes to resume sharing their data."
operationId: unlink-connection
x-speakeasy-name-override: unlink
tags:
- Connections
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Connection'
'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/UpdateConnection'
examples:
Example:
value:
status: Unlinked
description: ''
'/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
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/Payment-Required'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/Not-Found'
'429':
$ref: '#/components/responses/Too-Many-Requests'
'500':
$ref: '#/components/responses/Internal-Server-Error'
'503':
$ref: '#/components/responses/Service-Unavailable'
description: |-
Refreshes all data types with `fetch on first link` set to `true` for a given company.
This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view.
[Read more](https://docs.codat.io/core-concepts/data-type-settings) about data type settings and `fetch on first link`.
tags:
- Refresh data
'/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:
- Refresh data
responses:
'200':
description: OK
content:
application/json:
schema:
title: Data statuses
x-internal: true
type: object
properties:
accountTransactions:
$ref: '#/components/schemas/DataStatus'
nullable: true
balanceSheet:
$ref: '#/components/schemas/DataStatus'
nullable: true
bankAccounts:
$ref: '#/components/schemas/DataStatus'
nullable: true
bankTransactions:
$ref: '#/components/schemas/DataStatus'
nullable: true
billCreditNotes:
$ref: '#/components/schemas/DataStatus'
nullable: true
billPayments:
$ref: '#/components/schemas/DataStatus'
nullable: true
bills:
$ref: '#/components/schemas/DataStatus'
nullable: true
cashFlowStatement:
$ref: '#/components/schemas/DataStatus'
nullable: true
chartOfAccounts:
$ref: '#/components/schemas/DataStatus'
nullable: true
company:
$ref: '#/components/schemas/DataStatus'
nullable: true
creditNotes:
$ref: '#/components/schemas/DataStatus'
nullable: true
customers:
$ref: '#/components/schemas/DataStatus'
nullable: true
directCosts:
$ref: '#/components/schemas/DataStatus'
nullable: true
directIncomes:
$ref: '#/components/schemas/DataStatus'
nullable: true
invoices:
$ref: '#/components/schemas/DataStatus'
nullable: true
itemReceipts:
$ref: '#/components/schemas/DataStatus'
nullable: true
items:
$ref: '#/components/schemas/DataStatus'
nullable: true
journalEntries:
$ref: '#/components/schemas/DataStatus'
nullable: true
journals:
$ref: '#/components/schemas/DataStatus'
nullable: true
paymentMethods:
$ref: '#/components/schemas/DataStatus'
nullable: true
payments:
$ref: '#/components/schemas/DataStatus'
nullable: true
profitAndLoss:
$ref: '#/components/schemas/DataStatus'
nullable: true
purchaseOrders:
$ref: '#/components/schemas/DataStatus'
nullable: true
salesOrders:
$ref: '#/components/schemas/DataStatus'
nullable: true
suppliers:
$ref: '#/components/schemas/DataStatus'
nullable: true
taxRates:
$ref: '#/components/schemas/DataStatus'
nullable: true
trackingCategories:
$ref: '#/components/schemas/DataStatus'
nullable: true
transfers:
$ref: '#/components/schemas/DataStatus'
nullable: true
banking-accountBalances:
$ref: '#/components/schemas/DataStatus'
nullable: true
banking-accounts:
$ref: '#/components/schemas/DataStatus'
nullable: true
banking-transactionCategories:
$ref: '#/components/schemas/DataStatus'
nullable: true
banking-transactions:
$ref: '#/components/schemas/DataStatus'
nullable: true
commerce-companyInfo:
$ref: '#/components/schemas/DataStatus'
nullable: true
commerce-customers:
$ref: '#/components/schemas/DataStatus'
nullable: true
commerce-disputes:
$ref: '#/components/schemas/DataStatus'
nullable: true
commerce-locations:
$ref: '#/components/schemas/DataStatus'
nullable: true
commerce-orders:
$ref: '#/components/schemas/DataStatus'
nullable: true
commerce-paymentMethods:
$ref: '#/components/schemas/DataStatus'
nullable: true
commerce-payments:
$ref: '#/components/schemas/DataStatus'
nullable: true
commerce-productCategories:
$ref: '#/components/schemas/DataStatus'
nullable: true
commerce-products:
$ref: '#/components/schemas/DataStatus'
nullable: true
commerce-taxComponents:
$ref: '#/components/schemas/DataStatus'
nullable: true
commerce-transactions:
$ref: '#/components/schemas/DataStatus'
nullable: true
examples:
Example:
value:
accountTransactions:
dataType: accountTransactions
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
balanceSheet:
dataType: balanceSheet
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
bankAccounts:
dataType: bankAccounts
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
bankTransactions:
dataType: bankTransactions
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
billCreditNotes:
dataType: billCreditNotes
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
billPayments:
dataType: billPayments
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
bills:
dataType: bills
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
cashFlowStatement:
dataType: cashFlowStatement
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
chartOfAccounts:
dataType: chartOfAccounts
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
company:
dataType: company
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
creditNotes:
dataType: creditNotes
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
customers:
dataType: customers
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
directCosts:
dataType: directCosts
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
directIncomes:
dataType: directIncomes
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
invoices:
dataType: invoices
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
itemReceipts:
dataType: itemReceipts
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
items:
dataType: items
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
journalEntries:
dataType: journalEntries
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
journals:
dataType: journals
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
paymentMethods:
dataType: paymentMethods
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
payments:
dataType: payments
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
profitAndLoss:
dataType: profitAndLoss
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
purchaseOrders:
dataType: purchaseOrders
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
salesOrders:
dataType: salesOrders
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
suppliers:
dataType: suppliers
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
taxRates:
dataType: taxRates
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
trackingCategories:
dataType: trackingCategories
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
transfers:
dataType: transfers
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
banking-accountBalances:
dataType: banking-accountBalances
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
banking-accounts:
dataType: banking-accounts
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
banking-transactionCategories:
dataType: banking-transactionCategories
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
banking-transactions:
dataType: banking-transactions
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
commerce-companyInfo:
dataType: commerce-companyInfo
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
commerce-customers:
dataType: commerce-customers
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
commerce-disputes:
dataType: commerce-disputes
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
commerce-locations:
dataType: commerce-locations
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
commerce-orders:
dataType: commerce-orders
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
commerce-paymentMethods:
dataType: commerce-paymentMethods
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
commerce-payments:
dataType: commerce-payments
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
commerce-productCategories:
dataType: commerce-productCategories
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
commerce-products:
dataType: commerce-products
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
commerce-taxComponents:
dataType: commerce-taxComponents
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
commerce-transactions:
dataType: commerce-transactions
lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
currentStatus: Complete
latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/Payment-Required'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/Not-Found'
'429':
$ref: '#/components/responses/Too-Many-Requests'
'500':
$ref: '#/components/responses/Internal-Server-Error'
'503':
$ref: '#/components/responses/Service-Unavailable'
'/companies/{companyId}/data/queue/{dataType}':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/dataType'
post:
summary: Refresh data type
operationId: refresh-data-type
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'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/Payment-Required'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/Not-Found'
'429':
$ref: '#/components/responses/Too-Many-Requests'
'500':
$ref: '#/components/responses/Internal-Server-Error'
'503':
$ref: '#/components/responses/Service-Unavailable'
'/companies/{companyId}/data/history':
parameters:
- $ref: '#/components/parameters/companyId'
get:
summary: List pull operations
tags:
- Refresh data
operationId: list-pull-operations
x-speakeasy-name-override: list-pull-operations
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/PullOperations'
examples:
Example:
value:
results:
- id: 97d60846-f07a-4d42-b5a0-0bdcc6ebf56b
companyId: 4645bd78-8988-45bc-ac9e-67ba5df6e4e5
connectionId: 51baa045-4836-4317-a42e-3542e991e581
dataType: invoices
status: Initial
requested: '2022-11-14T11:18:37.2798351Z'
progress: 10
isCompleted: false
isErrored: false
_links:
current:
href: /companies/17129e41-5389-4f10-ac06-e0a37e47d177/data/history?page=1&pageSize=2
self:
href: /companies/17129e41-5389-4f10-ac06-e0a37e47d177/data/history
next:
href: /companies/17129e41-5389-4f10-ac06-e0a37e47d177/data/history?page=2&pageSize=2
pageNumber: 0
pageSize: 0
totalResults: 0
'400':
$ref: '#/components/responses/Malformed-Query'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/Payment-Required'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/Not-Found'
'429':
$ref: '#/components/responses/Too-Many-Requests'
'500':
$ref: '#/components/responses/Internal-Server-Error'
'503':
$ref: '#/components/responses/Service-Unavailable'
description: Gets the pull operation history (datasets) for a given company.
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/pageSize'
- $ref: '#/components/parameters/query'
- $ref: '#/components/parameters/orderBy'
'/companies/{companyId}/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: List push operation records.
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/PushOperations'
examples: {}
'400':
$ref: '#/components/responses/Malformed-Query'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/Payment-Required'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/Not-Found'
'429':
$ref: '#/components/responses/Too-Many-Requests'
'500':
$ref: '#/components/responses/Internal-Server-Error'
'503':
$ref: '#/components/responses/Service-Unavailable'
'/companies/{companyId}/data/history/{datasetId}':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/datasetId'
get:
summary: Get pull operation
operationId: get-pull-operation
x-speakeasy-name-override: get-pull-operation
tags:
- Refresh data
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/PullOperation'
examples: {}
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/Payment-Required'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/Not-Found'
'429':
$ref: '#/components/responses/Too-Many-Requests'
'500':
$ref: '#/components/responses/Internal-Server-Error'
'503':
$ref: '#/components/responses/Service-Unavailable'
description: Retrieve information about a single dataset or pull operation.
'/companies/{companyId}/push/{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: Retrieve push operation.
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/PushOperation'
examples: {}
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/Payment-Required'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/Not-Found'
'429':
$ref: '#/components/responses/Too-Many-Requests'
'500':
$ref: '#/components/responses/Internal-Server-Error'
'503':
$ref: '#/components/responses/Service-Unavailable'
'/companies/{companyId}/data/accounts':
get:
tags:
- Accounting accounts
summary: List accounts
description: "\uFEFFThe *List accounts* endpoint returns a list of [accounts](https://docs.codat.io/accounting-api#/schemas/Account) for a given company's connection.\n\n[Accounts](https://docs.codat.io/accounting-api#/schemas/Account) are the categories a business uses to record accounting transactions.\n\nBefore using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-commerce-v1-api#/operations/refresh-company-data)."
operationId: list-accounting-accounts
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/pageSize'
- $ref: '#/components/parameters/query'
- $ref: '#/components/parameters/orderBy'
responses:
'200':
description: Success
content:
application/json:
x-speakeasy-usage-example: true
schema:
$ref: '#/components/schemas/AccountingAccounts'
examples:
Clear Books:
value:
results:
- id: 1b6266d1-1e44-46c5-8eb5-a8f98e03124e
nominalCode: '610'
name: Accounts Receivable
description: Invoices the business has issued but has not yet collected payment on.
fullyQualifiedCategory: Asset.Current
fullyQualifiedName: Asset.Current.Accounts Receivable
currency: GBP
currentBalance: 0
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2023-04-26T12:38:15Z'
sourceModifiedDate: '2022-12-10T16:39:00'
validDatatypeLinks: []
metadata:
isDeleted: false
- id: 76d5f23b-9623-4e3b-89cd-da57228764d3
nominalCode: '611'
name: Accounts Receivable
description: A provision anticipating that a portion of accounts receivable will never be collected.
fullyQualifiedCategory: Asset.Current
fullyQualifiedName: Asset.Current.Accounts Receivable
currency: GBP
currentBalance: 0
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2023-04-26T12:38:15Z'
sourceModifiedDate: '2022-10-19T05:49:00'
validDatatypeLinks: []
metadata:
isDeleted: false
pageNumber: 1
pageSize: 2
totalResults: 98
_links:
current:
href: /companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/accounts?page=1&pageSize=2
self:
href: /companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/accounts
next:
href: /companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/accounts?page=2&pageSize=2
Dynamics 365 Business Central:
value:
results:
- id: 8eaed16d-c69f-ec11-80f1-0022481b4546
nominalCode: 45422026-68CA-4EF2-9
name: ''
fullyQualifiedCategory: ' .'
fullyQualifiedName: ..
currency: GBP
currentBalance: 0
type: Unknown
status: Active
isBankAccount: false
modifiedDate: '2023-03-27T14:21:18Z'
sourceModifiedDate: '2022-03-09T16:31:54Z'
validDatatypeLinks:
- property: Id
links:
- DirectCost.LineItems.AccountRef.Id
metadata:
isDeleted: false
- id: c0861a65-c69f-ec11-80f1-0022481b4546
nominalCode: '10'
name: Account no cat Balance Sheet
fullyQualifiedCategory: ' .'
fullyQualifiedName: ..Account no cat Balance Sheet
currency: GBP
currentBalance: 27.34
type: Unknown
status: Active
isBankAccount: false
modifiedDate: '2023-03-27T14:21:18Z'
sourceModifiedDate: '2022-09-13T14:45:01Z'
validDatatypeLinks:
- property: Id
links:
- DirectCost.LineItems.AccountRef.Id
metadata:
isDeleted: false
pageNumber: 1
pageSize: 2
totalResults: 122
_links:
current:
href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/data/accounts?page=1&pageSize=2
self:
href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/data/accounts
next:
href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/data/accounts?page=2&pageSize=2
Exact (Netherlands):
value:
results:
- id: ef2fde36-4416-4bc5-b239-315b2929348c
nominalCode: '1300'
name: Debiteuren
description: Debiteuren
fullyQualifiedCategory: Asset.Assets.AccountsReceivable
fullyQualifiedName: Asset.Assets.AccountsReceivable.Debiteuren.PaymentsEnabled
currency: EUR
currentBalance: 864435.44
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2022-10-26T13:36:17Z'
sourceModifiedDate: '2020-01-08T09:42:54Z'
validDatatypeLinks:
- property: Id
links:
- Transfer.To.AccountRef.Id
- Transfer.From.AccountRef.Id
- Payment.AccountRef.Id
- BillPayment.AccountRef.Id
- id: 2052b65b-20e9-4da1-85d8-fd5ca0ea3d38
nominalCode: '888777888'
name: One more AR account
description: One more AR account
fullyQualifiedCategory: Asset.Assets.AccountsReceivable
fullyQualifiedName: Asset.Assets.AccountsReceivable.One more AR account.PaymentsEnabled
currency: EUR
currentBalance: 2174.82
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2022-10-26T13:36:17Z'
sourceModifiedDate: '2021-06-10T11:00:20Z'
validDatatypeLinks:
- property: Id
links:
- Transfer.To.AccountRef.Id
- Transfer.From.AccountRef.Id
- Payment.AccountRef.Id
- BillPayment.AccountRef.Id
pageNumber: 1
pageSize: 2
totalResults: 230
_links:
current:
href: /companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/accounts?page=1&pageSize=2
self:
href: /companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/accounts
next:
href: /companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/accounts?page=2&pageSize=2
Exact (UK):
value:
results:
- id: ca2b96b7-cc45-4e35-9fa3-82a2ba1eec40
nominalCode: THING
name: Some thing account
description: Some thing account
fullyQualifiedCategory: Asset.Assets.AccountsReceivable
fullyQualifiedName: Asset.Assets.AccountsReceivable.Some thing account.PaymentsEnabled
currency: GBP
currentBalance: 0
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2022-10-26T13:35:15Z'
sourceModifiedDate: '2017-08-01T17:31:12Z'
validDatatypeLinks:
- property: Id
links:
- Transfer.To.AccountRef.Id
- Transfer.From.AccountRef.Id
- Payment.AccountRef.Id
- BillPayment.AccountRef.Id
- id: cf9572e7-8afa-4339-9113-af32a66d9df9
nominalCode: '15400'
name: Trade Debtors
description: Trade Debtors
fullyQualifiedCategory: Asset.Assets.AccountsReceivable
fullyQualifiedName: Asset.Assets.AccountsReceivable.Trade Debtors.PaymentsEnabled
currency: GBP
currentBalance: 4484655.39
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2022-10-26T13:35:15Z'
sourceModifiedDate: '2020-01-08T13:48:38Z'
validDatatypeLinks:
- property: Id
links:
- Transfer.To.AccountRef.Id
- Transfer.From.AccountRef.Id
- Payment.AccountRef.Id
- BillPayment.AccountRef.Id
pageNumber: 1
pageSize: 2
totalResults: 121
_links:
current:
href: /companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/accounts?page=1&pageSize=2
self:
href: /companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/accounts
next:
href: /companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/accounts?page=2&pageSize=2
FreeAgent:
value:
results:
- id: '601'
nominalCode: '601'
name: Capital Asset Brought Forward
fullyQualifiedCategory: Asset.Capital
fullyQualifiedName: Asset.Capital.Capital Asset Brought Forward
currency: GBP
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2023-04-25T14:19:12Z'
validDatatypeLinks: []
metadata:
isDeleted: false
- id: '605'
nominalCode: '605'
name: Capital Asset Depreciation Brought Forward
fullyQualifiedCategory: Asset.Capital
fullyQualifiedName: Asset.Capital.Capital Asset Depreciation Brought Forward
currency: GBP
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2023-04-25T14:19:12Z'
validDatatypeLinks: []
metadata:
isDeleted: false
pageNumber: 1
pageSize: 2
totalResults: 292
_links:
current:
href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/data/accounts?page=1&pageSize=2
self:
href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/data/accounts
next:
href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/data/accounts?page=2&pageSize=2
FreshBooks:
value:
results:
- id: '67357'
nominalCode: '1200'
name: Accounts Receivable
fullyQualifiedCategory: Asset
fullyQualifiedName: Asset.Accounts Receivable
currency: GBP
currentBalance: 51445.53
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2023-03-24T16:07:24Z'
validDatatypeLinks: []
metadata:
isDeleted: false
- id: '128611'
nominalCode: 1200-1
name: Accounts Receivable
fullyQualifiedCategory: Asset.Accounts Receivable
fullyQualifiedName: Asset.Accounts Receivable.Accounts Receivable
currency: GBP
currentBalance: 51445.53
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2023-03-24T16:07:24Z'
validDatatypeLinks: []
metadata:
isDeleted: false
pageNumber: 1
pageSize: 2
totalResults: 96
_links:
current:
href: /companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/accounts?page=1&pageSize=2
self:
href: /companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/accounts
next:
href: /companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/accounts?page=2&pageSize=2
KashFlow:
value:
results:
- id: '27840056'
nominalCode: '70700'
name: 16th Account
fullyQualifiedCategory: Asset.BankAccount
fullyQualifiedName: Asset.BankAccount.16th Account
currency: GBP
currentBalance: 0
type: Asset
status: Active
isBankAccount: true
modifiedDate: '2022-09-30T10:29:16Z'
validDatatypeLinks: []
- id: '27840049'
nominalCode: '70600'
name: 1a1a
fullyQualifiedCategory: Asset.BankAccount
fullyQualifiedName: Asset.BankAccount.1a1a
currency: GBP
currentBalance: 0
type: Asset
status: Active
isBankAccount: true
modifiedDate: '2022-09-30T10:29:16Z'
validDatatypeLinks: []
pageNumber: 1
pageSize: 2
totalResults: 157
_links:
current:
href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/data/accounts?page=1&pageSize=2
self:
href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/data/accounts
next:
href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/data/accounts?page=2&pageSize=2
Oracle NetSuite:
value:
results:
- id: '111'
name: Accounts Payable
fullyQualifiedCategory: AcctPay.AcctPay
fullyQualifiedName: AcctPay.AcctPay.Accounts Payable
currentBalance: -635.55
type: Liability
status: Active
isBankAccount: false
modifiedDate: '2023-01-30T14:48:33Z'
sourceModifiedDate: '2021-08-11T12:51:21'
validDatatypeLinks: []
- id: '119'
name: Accounts Receivable
fullyQualifiedCategory: AcctRec.AcctRec
fullyQualifiedName: AcctRec.AcctRec.Accounts Receivable
currentBalance: -565
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2023-01-30T14:48:33Z'
sourceModifiedDate: '2021-09-08T15:23:31'
validDatatypeLinks: []
pageNumber: 1
pageSize: 2
totalResults: 44
_links:
current:
href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/accounts?page=1&pageSize=2
self:
href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/accounts
next:
href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/accounts?page=2&pageSize=2
QuickBooks Desktop:
value:
results:
- id: 40000-933270541
nominalCode: '11000'
name: Accounts Receivable
description: Accounts Receivable
fullyQualifiedCategory: Asset.CurrentAsset.AccountsReceivable
fullyQualifiedName: Asset.CurrentAsset.AccountsReceivable.Accounts Receivable
currency: GBP
currentBalance: 93007.93
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2023-04-26T09:06:23Z'
sourceModifiedDate: '2023-12-16T05:06:45'
validDatatypeLinks: []
metadata:
isDeleted: false
- id: 20000-933270541
nominalCode: '10100'
name: Checking
description: Cash
fullyQualifiedCategory: Asset.CurrentAsset.Bank
fullyQualifiedName: Asset.CurrentAsset.Bank.Checking
currency: GBP
currentBalance: 46954.1
type: Asset
status: Active
isBankAccount: true
modifiedDate: '2023-04-26T09:06:23Z'
sourceModifiedDate: '2023-12-16T05:06:45'
validDatatypeLinks:
- property: Id
links:
- BillLineItem.AccountRef.Id
- BillPayment.AccountRef.Id
metadata:
isDeleted: false
pageNumber: 1
pageSize: 2
totalResults: 116
_links:
current:
href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/accounts?page=1&pageSize=2
self:
href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/accounts
next:
href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/accounts?page=2&pageSize=2
QuickBooks Online:
value:
results:
- id: '62'
nominalCode: '246'
name: Debtors
fullyQualifiedCategory: Asset.Accounts Receivable.AccountsReceivable
fullyQualifiedName: Asset.Accounts Receivable.AccountsReceivable.Debtors
currency: GBP
currentBalance: 41289.37
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2023-01-18T11:02:34Z'
sourceModifiedDate: '2022-12-08T15:42:59Z'
validDatatypeLinks: []
- id: '92'
nominalCode: '247'
name: Debtors - AED
fullyQualifiedCategory: Asset.Accounts Receivable.AccountsReceivable
fullyQualifiedName: Asset.Accounts Receivable.AccountsReceivable.Debtors - AED
currency: AED
currentBalance: -1533.44
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2023-01-18T11:02:34Z'
sourceModifiedDate: '2021-02-19T14:04:45Z'
validDatatypeLinks: []
pageNumber: 1
pageSize: 2
totalResults: 234
_links:
current:
href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/accounts?page=1&pageSize=2
self:
href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/accounts
next:
href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/accounts?page=2&pageSize=2
QuickBooks Online Sandbox:
value:
results:
- id: '70'
name: Debtors
fullyQualifiedCategory: Asset.Accounts Receivable.AccountsReceivable
fullyQualifiedName: Asset.Accounts Receivable.AccountsReceivable.Debtors
currency: GBP
currentBalance: 3041173.77
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2023-04-26T09:35:55Z'
sourceModifiedDate: '2023-04-26T01:18:15Z'
validDatatypeLinks: []
metadata:
isDeleted: false
- id: '80'
name: Debtors - USD
fullyQualifiedCategory: Asset.Accounts Receivable.AccountsReceivable
fullyQualifiedName: Asset.Accounts Receivable.AccountsReceivable.Debtors - USD
currency: USD
currentBalance: 54822.37
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2023-04-26T09:35:55Z'
sourceModifiedDate: '2023-04-12T15:10:38Z'
validDatatypeLinks: []
metadata:
isDeleted: false
pageNumber: 1
pageSize: 2
totalResults: 186
_links:
current:
href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/accounts?page=1&pageSize=2
self:
href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/accounts
next:
href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/accounts?page=2&pageSize=2
Sage 200cloud:
value:
results:
- id: '2864'
nominalCode: '1200'
name: Bank Account
description: Bank Account
fullyQualifiedCategory: Asset.Bank Account
fullyQualifiedName: Asset.Bank Account.Bank Account
type: Asset
status: Archived
isBankAccount: false
modifiedDate: '2022-10-14T09:35:52Z'
validDatatypeLinks: []
metadata:
isDeleted: true
- id: '2368'
nominalCode: '1200'
name: Bank Current Account
description: Bank Current Account
fullyQualifiedCategory: Asset.Bank Account
fullyQualifiedName: Asset.Bank Account.Bank Current Account
type: Asset
status: Active
isBankAccount: true
modifiedDate: '2022-10-14T09:35:52Z'
sourceModifiedDate: '2020-09-11T13:53:12Z'
validDatatypeLinks: []
pageNumber: 1
pageSize: 2
totalResults: 344
_links:
current:
href: /companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/accounts?page=1&pageSize=2
self:
href: /companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/accounts
next:
href: /companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/accounts?page=2&pageSize=2
Sage 50 (UK):
value:
results:
- id: '1100'
nominalCode: '1100'
name: Debtors Control Account
fullyQualifiedCategory: Asset.CurrentAssets.Debtors
fullyQualifiedName: Asset.CurrentAssets.Debtors.Debtors Control Account
currency: GBP
currentBalance: 90640.61
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2023-03-30T14:42:44Z'
sourceModifiedDate: '2022-11-25T09:43:54'
validDatatypeLinks: []
metadata:
isDeleted: false
- id: '1102'
nominalCode: '1102'
name: Other Debtors
fullyQualifiedCategory: Asset.CurrentAssets.Debtors
fullyQualifiedName: Asset.CurrentAssets.Debtors.Other Debtors
currency: GBP
currentBalance: 0
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2023-03-30T14:42:44Z'
sourceModifiedDate: '2022-11-25T09:43:54'
validDatatypeLinks: []
metadata:
isDeleted: false
pageNumber: 1
pageSize: 2
totalResults: 155
_links:
current:
href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/accounts?page=1&pageSize=2
self:
href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/accounts
next:
href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/accounts?page=2&pageSize=2
Sage Business Cloud Accounting:
value:
results:
- id: e5889b459f544926ac5b8e6756df2ad4
nominalCode: '1560'
name: Abdi Internet Bank
fullyQualifiedCategory: Asset.Bank
fullyQualifiedName: Asset.Bank.Abdi Internet Bank
currency: GBP
currentBalance: 49.61
type: Asset
status: Active
isBankAccount: true
modifiedDate: '2022-10-24T14:52:53Z'
sourceModifiedDate: '2020-01-27T10:53:26Z'
validDatatypeLinks:
- property: Id
links:
- Payment.AccountRef.Id
- BillPayment.AccountRef.Id
- id: b17083bc9b2748b4ab321b024e260eda
nominalCode: '147852'
name: Abdi Live Test
fullyQualifiedCategory: Asset.Bank
fullyQualifiedName: Asset.Bank.Abdi Live Test
currency: GBP
currentBalance: 225830.75
type: Asset
status: Active
isBankAccount: true
modifiedDate: '2022-10-24T14:52:53Z'
sourceModifiedDate: '2020-01-28T14:00:20Z'
validDatatypeLinks:
- property: Id
links:
- Payment.AccountRef.Id
- BillPayment.AccountRef.Id
pageNumber: 1
pageSize: 2
totalResults: 283
_links:
current:
href: /companies/390083e2-351b-407c-a3be-55081c36c182/data/accounts?page=1&pageSize=2
self:
href: /companies/390083e2-351b-407c-a3be-55081c36c182/data/accounts
next:
href: /companies/390083e2-351b-407c-a3be-55081c36c182/data/accounts?page=2&pageSize=2
Sage Intacct:
value:
results:
- id: '2'
nominalCode: '12100'
name: Accounts Receivable
fullyQualifiedCategory: 'Assets.Current Assets.Account Receivable, Net of Allowance.Accounts Receivable.Accounts Receivable'
fullyQualifiedName: 'Assets.Current Assets.Account Receivable, Net of Allowance.Accounts Receivable.Accounts Receivable.Accounts Receivable'
currency: GBP
currentBalance: 0
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2023-04-04T16:31:51Z'
sourceModifiedDate: '2020-01-29T01:42:43'
validDatatypeLinks: []
metadata:
isDeleted: false
- id: '155'
nominalCode: '12710'
name: AR - Retainage
fullyQualifiedCategory: 'Assets.Current Assets.Account Receivable, Net of Allowance.Accounts Receivable.Accounts Receivable'
fullyQualifiedName: 'Assets.Current Assets.Account Receivable, Net of Allowance.Accounts Receivable.Accounts Receivable.AR - Retainage'
currency: GBP
currentBalance: 0
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2023-04-04T16:31:51Z'
sourceModifiedDate: '2020-10-15T15:33:15'
validDatatypeLinks: []
metadata:
isDeleted: false
pageNumber: 1
pageSize: 2
totalResults: 181
_links:
current:
href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/accounts?page=1&pageSize=2
self:
href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/accounts
next:
href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/accounts?page=2&pageSize=2
Wave:
value:
results:
- id: QWNjb3VudDo5MjIzNDE3NjkzMzk3NjA2MzM7QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2
name: Abdi Bank
description: Test Balance Sheet
fullyQualifiedCategory: Asset.CashAndBank
fullyQualifiedName: Asset.CashAndBank.Abdi Bank
currency: GBP
type: Asset
status: Active
isBankAccount: true
modifiedDate: '2022-11-16T18:15:17Z'
validDatatypeLinks: []
- id: QWNjb3VudDo3OTE3NTA1OTcwOTQxNzQ3MTU7QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2
name: Cash on Hand
description: Cash you haven�t deposited in the bank. Add your bank and credit card accounts to accurately categorize transactions that aren't cash.
fullyQualifiedCategory: Asset.CashAndBank
fullyQualifiedName: Asset.CashAndBank.Cash on Hand
currency: GBP
type: Asset
status: Active
isBankAccount: true
modifiedDate: '2022-11-16T18:15:17Z'
validDatatypeLinks: []
pageNumber: 1
pageSize: 2
totalResults: 85
_links:
current:
href: /companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/accounts?page=1&pageSize=2
self:
href: /companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/accounts
next:
href: /companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/accounts?page=2&pageSize=2
Xero:
value:
results:
- id: bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4
nominalCode: A090
name: Business Bank Account
fullyQualifiedCategory: Asset.Bank
fullyQualifiedName: Asset.Bank.Business Bank Account
currency: GBP
currentBalance: 924.25
type: Asset
status: Active
isBankAccount: true
modifiedDate: '2023-03-15T20:35:08Z'
sourceModifiedDate: '2023-02-17T11:10:49'
validDatatypeLinks:
- property: Id
links:
- Payment.AccountRef.Id
- BillPayment.AccountRef.Id
- DirectIncome.LineItems.AccountRef.Id
- DirectCost.LineItems.AccountRef.Id
metadata:
isDeleted: false
- id: a8d6fb1a-8c5d-4683-90ce-bf9d28fc62ba
nominalCode: A091
name: Business Savings Account
fullyQualifiedCategory: Asset.Bank
fullyQualifiedName: Asset.Bank.Business Savings Account
currency: GBP
currentBalance: 0
type: Asset
status: Active
isBankAccount: true
modifiedDate: '2023-03-15T20:35:08Z'
sourceModifiedDate: '2023-02-17T11:10:49'
validDatatypeLinks:
- property: Id
links:
- Payment.AccountRef.Id
- BillPayment.AccountRef.Id
- DirectIncome.LineItems.AccountRef.Id
- DirectCost.LineItems.AccountRef.Id
metadata:
isDeleted: false
pageNumber: 1
pageSize: 2
totalResults: 90
_links:
current:
href: /companies/5ced9667-a310-443a-a711-958d36377141/data/accounts?page=1&pageSize=2
self:
href: /companies/5ced9667-a310-443a-a711-958d36377141/data/accounts
next:
href: /companies/5ced9667-a310-443a-a711-958d36377141/data/accounts?page=2&pageSize=2
Zoho Books:
value:
results:
- id: '104957000000000352'
nominalCode: ''
name: Accounts Receivable
description: The money that customers owe you becomes the accounts receivable. A good example of this is a payment expected from an invoice sent to your customer.
fullyQualifiedCategory: Asset.accounts_receivable
fullyQualifiedName: Asset.accounts_receivable.Accounts Receivable
currency: GBP
currentBalance: -959.64
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2022-10-03T08:40:43Z'
sourceModifiedDate: '2020-02-05T14:58:44'
validDatatypeLinks: []
- id: '104957000000060010'
nominalCode: ''
name: Abdi Test
description: ''
fullyQualifiedCategory: Asset.bank
fullyQualifiedName: Asset.bank.Abdi Test
currency: GBP
currentBalance: 69858.44
type: Asset
status: Active
isBankAccount: true
modifiedDate: '2022-10-03T08:40:43Z'
sourceModifiedDate: '2020-02-17T12:19:47'
validDatatypeLinks: []
pageNumber: 1
pageSize: 2
totalResults: 68
_links:
current:
href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/accounts?page=1&pageSize=2
self:
href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/accounts
next:
href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/accounts?page=2&pageSize=2
'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'
'409':
$ref: '#/components/responses/Conflict'
'429':
$ref: '#/components/responses/Too-Many-Requests'
'500':
$ref: '#/components/responses/Internal-Server-Error'
'503':
$ref: '#/components/responses/Service-Unavailable'
'/companies/{companyId}/data/accounts/{accountId}':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/accountingAccountId'
get:
tags:
- Accounting accounts
summary: Get account
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/AccountingAccount'
examples:
Clear Books:
value:
id: 1b6266d1-1e44-46c5-8eb5-a8f98e03124e
nominalCode: '610'
name: Accounts Receivable
description: Invoices the business has issued but has not yet collected payment on.
fullyQualifiedCategory: Asset.Current
fullyQualifiedName: Asset.Current.Accounts Receivable
currency: GBP
currentBalance: 0
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2023-04-26T12:38:15Z'
sourceModifiedDate: '2022-12-10T16:39:00'
validDatatypeLinks: []
Dynamics 365 Business Central:
value:
id: 8eaed16d-c69f-ec11-80f1-0022481b4546
nominalCode: 45422026-68CA-4EF2-9
name: ''
fullyQualifiedCategory: ' .'
fullyQualifiedName: ..
currency: GBP
currentBalance: 0
type: Unknown
status: Active
isBankAccount: false
modifiedDate: '2023-03-27T14:21:18Z'
sourceModifiedDate: '2022-03-09T16:31:54Z'
validDatatypeLinks:
- property: Id
links:
- DirectCost.LineItems.AccountRef.Id
Exact (Netherlands):
value:
id: ef2fde36-4416-4bc5-b239-315b2929348c
nominalCode: '1300'
name: Debiteuren
description: Debiteuren
fullyQualifiedCategory: Asset.Assets.AccountsReceivable
fullyQualifiedName: Asset.Assets.AccountsReceivable.Debiteuren.PaymentsEnabled
currency: EUR
currentBalance: 864435.44
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2022-10-26T13:36:17Z'
sourceModifiedDate: '2020-01-08T09:42:54Z'
validDatatypeLinks:
- property: Id
links:
- Transfer.To.AccountRef.Id
- Transfer.From.AccountRef.Id
- Payment.AccountRef.Id
- BillPayment.AccountRef.Id
Exact (UK):
value:
id: ca2b96b7-cc45-4e35-9fa3-82a2ba1eec40
nominalCode: THING
name: Some thing account
description: Some thing account
fullyQualifiedCategory: Asset.Assets.AccountsReceivable
fullyQualifiedName: Asset.Assets.AccountsReceivable.Some thing account.PaymentsEnabled
currency: GBP
currentBalance: 0
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2022-10-26T13:35:15Z'
sourceModifiedDate: '2017-08-01T17:31:12Z'
validDatatypeLinks:
- property: Id
links:
- Transfer.To.AccountRef.Id
- Transfer.From.AccountRef.Id
- Payment.AccountRef.Id
- BillPayment.AccountRef.Id
FreeAgent:
value:
id: '601'
nominalCode: '601'
name: Capital Asset Brought Forward
fullyQualifiedCategory: Asset.Capital
fullyQualifiedName: Asset.Capital.Capital Asset Brought Forward
currency: GBP
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2023-04-25T14:19:12Z'
validDatatypeLinks: []
FreshBooks:
value:
id: '67357'
nominalCode: '1200'
name: Accounts Receivable
fullyQualifiedCategory: Asset
fullyQualifiedName: Asset.Accounts Receivable
currency: GBP
currentBalance: 51445.53
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2023-03-24T16:07:24Z'
validDatatypeLinks: []
KashFlow:
value:
id: '27840056'
nominalCode: '70700'
name: 16th Account
fullyQualifiedCategory: Asset.BankAccount
fullyQualifiedName: Asset.BankAccount.16th Account
currency: GBP
currentBalance: 0
type: Asset
status: Active
isBankAccount: true
modifiedDate: '2022-09-30T10:29:16Z'
validDatatypeLinks: []
Oracle NetSuite:
value:
id: '111'
name: Accounts Payable
fullyQualifiedCategory: AcctPay.AcctPay
fullyQualifiedName: AcctPay.AcctPay.Accounts Payable
currentBalance: -635.55
type: Liability
status: Active
isBankAccount: false
modifiedDate: '2023-01-30T14:48:33Z'
sourceModifiedDate: '2021-08-11T12:51:21'
validDatatypeLinks: []
QuickBooks Desktop:
value:
id: 40000-933270541
nominalCode: '11000'
name: Accounts Receivable
description: Accounts Receivable
fullyQualifiedCategory: Asset.CurrentAsset.AccountsReceivable
fullyQualifiedName: Asset.CurrentAsset.AccountsReceivable.Accounts Receivable
currency: GBP
currentBalance: 93007.93
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2023-04-26T09:06:23Z'
sourceModifiedDate: '2023-12-16T05:06:45'
validDatatypeLinks: []
QuickBooks Online:
value:
id: '62'
nominalCode: '246'
name: Debtors
fullyQualifiedCategory: Asset.Accounts Receivable.AccountsReceivable
fullyQualifiedName: Asset.Accounts Receivable.AccountsReceivable.Debtors
currency: GBP
currentBalance: 41289.37
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2023-01-18T11:02:34Z'
sourceModifiedDate: '2022-12-08T15:42:59Z'
validDatatypeLinks: []
QuickBooks Online Sandbox:
value:
id: '70'
name: Debtors
fullyQualifiedCategory: Asset.Accounts Receivable.AccountsReceivable
fullyQualifiedName: Asset.Accounts Receivable.AccountsReceivable.Debtors
currency: GBP
currentBalance: 3041173.77
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2023-04-26T09:35:55Z'
sourceModifiedDate: '2023-04-26T01:18:15Z'
validDatatypeLinks: []
Sage 200cloud:
value:
id: '2864'
nominalCode: '1200'
name: Bank Account
description: Bank Account
fullyQualifiedCategory: Asset.Bank Account
fullyQualifiedName: Asset.Bank Account.Bank Account
type: Asset
status: Archived
isBankAccount: false
modifiedDate: '2022-10-14T09:35:52Z'
validDatatypeLinks: []
Sage 50 (UK):
value:
id: '1100'
nominalCode: '1100'
name: Debtors Control Account
fullyQualifiedCategory: Asset.CurrentAssets.Debtors
fullyQualifiedName: Asset.CurrentAssets.Debtors.Debtors Control Account
currency: GBP
currentBalance: 90640.61
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2023-03-30T14:42:44Z'
sourceModifiedDate: '2022-11-25T09:43:54'
validDatatypeLinks: []
Sage Business Cloud Accounting:
value:
id: e5889b459f544926ac5b8e6756df2ad4
nominalCode: '1560'
name: Abdi Internet Bank
fullyQualifiedCategory: Asset.Bank
fullyQualifiedName: Asset.Bank.Abdi Internet Bank
currency: GBP
currentBalance: 49.61
type: Asset
status: Active
isBankAccount: true
modifiedDate: '2022-10-24T14:52:53Z'
sourceModifiedDate: '2020-01-27T10:53:26Z'
validDatatypeLinks:
- property: Id
links:
- Payment.AccountRef.Id
- BillPayment.AccountRef.Id
Sage Intacct:
value:
id: '2'
nominalCode: '12100'
name: Accounts Receivable
fullyQualifiedCategory: 'Assets.Current Assets.Account Receivable, Net of Allowance.Accounts Receivable.Accounts Receivable'
fullyQualifiedName: 'Assets.Current Assets.Account Receivable, Net of Allowance.Accounts Receivable.Accounts Receivable.Accounts Receivable'
currency: GBP
currentBalance: 0
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2023-04-04T16:31:51Z'
sourceModifiedDate: '2020-01-29T01:42:43'
validDatatypeLinks: []
Wave:
value:
id: QWNjb3VudDo5MjIzNDE3NjkzMzk3NjA2MzM7QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2
name: Abdi Bank
description: Test Balance Sheet
fullyQualifiedCategory: Asset.CashAndBank
fullyQualifiedName: Asset.CashAndBank.Abdi Bank
currency: GBP
type: Asset
status: Active
isBankAccount: true
modifiedDate: '2022-11-16T18:15:17Z'
validDatatypeLinks: []
Xero:
value:
id: bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4
nominalCode: A090
name: Business Bank Account
fullyQualifiedCategory: Asset.Bank
fullyQualifiedName: Asset.Bank.Business Bank Account
currency: GBP
currentBalance: 924.25
type: Asset
status: Active
isBankAccount: true
modifiedDate: '2023-03-15T20:35:08Z'
sourceModifiedDate: '2023-02-17T11:10:49'
validDatatypeLinks:
- property: Id
links:
- Payment.AccountRef.Id
- BillPayment.AccountRef.Id
- DirectIncome.LineItems.AccountRef.Id
- DirectCost.LineItems.AccountRef.Id
Zoho Books:
value:
id: '104957000000000352'
nominalCode: ''
name: Accounts Receivable
description: The money that customers owe you becomes the accounts receivable. A good example of this is a payment expected from an invoice sent to your customer.
fullyQualifiedCategory: Asset.accounts_receivable
fullyQualifiedName: Asset.accounts_receivable.Accounts Receivable
currency: GBP
currentBalance: -959.64
type: Asset
status: Active
isBankAccount: false
modifiedDate: '2022-10-03T08:40:43Z'
sourceModifiedDate: '2020-02-05T14:58:44'
validDatatypeLinks: []
'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'
description: |
The *Get account* endpoint returns a single account for a given accountId.
[Accounts](https://docs.codat.io/accounting-api#/schemas/Account) are the categories a business uses to record accounting transactions.
Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=chartOfAccounts) for integrations that support getting a specific account.
Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-commerce-v1-api#/operations/refresh-company-data).
operationId: get-accounting-account
'/companies/{companyId}/connections/{connectionId}/push/accounts':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
post:
tags:
- Accounting accounts
summary: Create account
parameters:
- $ref: '#/components/parameters/timeoutInMinutes'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AccountingAccount/definitions/accountPrototype'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/AccountingCreateAccountResponse'
examples: {}
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/Payment-Required'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/Not-Found'
'429':
$ref: '#/components/responses/Too-Many-Requests'
'500':
$ref: '#/components/responses/Internal-Server-Error'
'503':
$ref: '#/components/responses/Service-Unavailable'
description: |
The *Create account* endpoint creates a new [account](https://docs.codat.io/accounting-api#/schemas/Account) for a given company's connection.
[Accounts](https://docs.codat.io/accounting-api#/schemas/Account) are the categories a business uses to record accounting transactions.
**Integration-specific behaviour**
Required data may vary by integration. To see what data to post, first call [Get create account model](https://docs.codat.io/accounting-api#/operations/get-create-chartOfAccounts-model).
Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=chartOfAccounts) for integrations that support creating an account.
operationId: create-accounting-account
'/companies/{companyId}/connections/{connectionId}/push/creditNotes':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
post:
tags:
- Accounting credit notes
parameters:
- $ref: '#/components/parameters/timeoutInMinutes'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AccountingCreditNote'
examples:
QuickBooks Desktop:
value:
creditNoteNumber: 09/03 17.15
note: credit note 20230309 17.15
status: Submitted
customerRef:
id: 80000002-1674552702
currency: USD
currencyRate: 1
subTotal: 10.2
issueDate: '2023-03-09T02:21:26.726327+00:00'
lineItems:
- itemRef:
id: 80000004-1675280003
name: test income item 1
quantity: 1
subTotal: 1.25
taxAmount: 0
unitAmount: 1.25
description: banana
totalAmount: 1.25
totalAmount: 1.25
totalDiscount: 0
totalTaxAmount: 0
discountPercentage: 0
remainingCredit: 0
Sage 50 (UK):
value:
creditNoteNumber: 07/03 14.24
customerRef:
id: CUST1
companyName: string
withholdingTax:
- name: string
amount: 0
totalAmount: 60
totalDiscount: 0
subTotal: 60
additionalTaxAmount: 0
additionalTaxPercentage: 0
totalTaxAmount: 0
discountPercentage: 0
remainingCredit: 60
status: Submitted
issueDate: '2023-03-07T18:23:43.781Z'
allocatedOnDate: '2023-03-06T18:23:43.781Z'
currency: GBP
currencyRate: 1
lineItems:
- description: credit note line 1
unitAmount: 60
quantity: 1
discountAmount: 0
subTotal: 60
taxAmount: 0
totalAmount: 60
accountRef:
id: '4000'
name: string
discountPercentage: 0
taxRateRef:
id: '9'
name: string
effectiveTaxRate: 0
trackingCategoryRefs:
- id: department_1
tracking:
categoryRefs:
- id: '5049'
projectRef:
id: D4039
customerRef:
id: LND1203-139
isBilledTo: Unknown
isRebilledTo: Unknown
isDirectIncome: true
paymentAllocations: []
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/AccountingCreateCreditNoteResponse'
examples: {}
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/Payment-Required'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/Not-Found'
'429':
$ref: '#/components/responses/Too-Many-Requests'
'500':
$ref: '#/components/responses/Internal-Server-Error'
'503':
$ref: '#/components/responses/Service-Unavailable'
summary: Create credit note
description: |
The *Create credit note* endpoint creates a new [credit note](https://docs.codat.io/accounting-api#/schemas/CreditNote) for a given company's connection.
[Credit notes](https://docs.codat.io/accounting-api#/schemas/CreditNote) are issued to a customer to indicate debt, typically with reference to a previously issued invoice and/or purchase.
**Integration-specific behaviour**
Required data may vary by integration. To see what data to post, first call [Get create/update credit note model](https://docs.codat.io/accounting-api#/operations/get-create-update-creditNotes-model).
Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=creditNotes) for integrations that support creating an account.
operationId: create-accounting-credit-note
'/companies/{companyId}/connections/{connectionId}/push/customers':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
post:
tags:
- Accounting customers
summary: Create customer
parameters:
- $ref: '#/components/parameters/timeoutInMinutes'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AccountingCustomer'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/AccountingCreateCustomerResponse'
examples: {}
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/Payment-Required'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/Not-Found'
'429':
$ref: '#/components/responses/Too-Many-Requests'
'500':
$ref: '#/components/responses/Internal-Server-Error'
'503':
$ref: '#/components/responses/Service-Unavailable'
operationId: create-accounting-customer
description: |
The *Create customer* endpoint creates a new [customer](https://docs.codat.io/accounting-api#/schemas/Customer) for a given company's connection.
[Customers](https://docs.codat.io/accounting-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB.
**Integration-specific behaviour**
Required data may vary by integration. To see what data to post, first call [Get create/update customer model](https://docs.codat.io/accounting-api#/operations/get-create-update-customers-model).
Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support creating an account.
'/companies/{companyId}/connections/{connectionId}/push/directIncomes':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
post:
tags:
- Accounting direct incomes
summary: Create direct income
parameters:
- $ref: '#/components/parameters/timeoutInMinutes'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AccountingDirectIncome'
examples:
QuickBooks Desktop:
value:
reference: null
note: test note
contactRef:
id: 80000002-1674552702
dataType: customers
issueDate: '2023-02-01T16:27:40.023Z'
currency: USD
lineItems:
- description: line description 1
unitAmount: 9100
quantity: 68
discountAmount: 0
discountPercentage: 0
subTotal: 5320
taxAmount: 37
totalAmount: 12
accountRef:
id: 80000007-1671793811
trackingCategoryRefs:
- id: 80000002-1674553271
name: string
paymentAllocations:
- payment:
id: '3594002235'
note: payment allocations note
reference: 230202 1217
accountRef:
id: 80000028-1671794219
currency: USD
currencyRate: 1
paidOnDate: '2023-02-01T16:27:40.023Z'
totalAmount: 560
allocation:
currency: USD
currencyRate: 1
allocatedOnDate: '2023-02-01T16:27:40.023Z'
totalAmount: 560
subTotal: 0
taxAmount: 9999
totalAmount: 9999
metadata:
isDeleted: true
Sage Intacct:
value:
reference: test ref
note: Test 1
issueDate: '2023-03-31T00:00:00'
currency: USD
currencyRate: 0.5
lineItems:
- accountRef:
id: '195'
taxRateRef:
id: '99'
trackingCategoryRefs:
- id: DEPARTMENT-2
name: Services
- id: LOCATION-8
name: United Kingdom
unitAmount: 9.99
quantity: 1
paymentAllocations:
- payment:
id: '4355'
note: test note
reference: test reference
accountRef:
id: '289'
currency: USD
paidOnDate: '2023-03-31T00:00:00'
totalAmount: 11.99
allocation:
currency: USD
allocatedOnDate: '2023-03-31T00:00:00'
totalAmount: 11.99
subTotal: 9.99
taxAmount: 2
totalAmount: 11.99
Xero:
value:
reference: Scenario One neg DI
contactRef:
id: 699f0091-b127-4796-9f15-41a2f42abeb2
dataType: suppliers
issueDate: '2023-02-25'
currency: GBP
lineItems:
- description: negative direct income
unitAmount: 35
quantity: -1
subTotal: -35
taxAmount: -7
totalAmount: -42
accountRef:
id: c563b607-fb0e-4d06-9ddb-76fdeef20ae3
taxRateRef:
id: OUTPUT2
paymentAllocations:
- payment:
accountRef:
id: bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4
currency: GBP
allocation:
totalAmount: -42
taxAmount: -7
totalAmount: -42
subTotal: -35
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/AccountingCreateDirectIncomeResponse'
examples:
Xero:
value:
changes:
- type: Unknown
recordRef:
dataType: directIncomes
data:
reference: Scenario One neg DI
contactRef:
id: 699f0091-b127-4796-9f15-41a2f42abeb2
dataType: suppliers
issueDate: '2023-02-25T00:00:00'
currency: GBP
lineItems:
- description: negative direct income
accountRef:
id: c563b607-fb0e-4d06-9ddb-76fdeef20ae3
taxRateRef:
id: OUTPUT2
unitAmount: 35
quantity: -1
subTotal: -35
taxAmount: -7
totalAmount: -42
trackingCategoryRefs: []
paymentAllocations:
- payment:
accountRef:
id: bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4
currency: GBP
paidOnDate: '0001-01-01T00:00:00'
totalAmount: 0
allocation:
totalAmount: -42
subTotal: 0
taxAmount: -7
totalAmount: -42
dataType: directIncomes
companyId: b5efee61-3fab-4a5d-9247-de03d6eda6db
pushOperationKey: c3be9bb9-a771-4e5b-8b50-9e52748a730a
dataConnectionKey: 1e355304-4476-422e-95cb-fa2a6d47fab4
requestedOnUtc: '2023-02-27T15:58:48.9160948Z'
status: Pending
validation:
errors: []
warnings: []
statusCode: 202
Sage Intacct:
value:
changes:
- type: Created
recordRef:
dataType: directIncomes
data:
reference: test ref
note: Test 1
issueDate: '2023-03-31T00:00:00'
currency: USD
currencyRate: 0.5
lineItems:
- accountRef:
id: '195'
taxRateRef:
id: '99'
unitAmount: 9.99
quantity: 1
trackingCategoryRefs:
- id: DEPARTMENT-2
name: Services
- id: LOCATION-8
name: United Kingdom
paymentAllocations:
- payment:
id: '4355'
note: test note
reference: test reference
accountRef:
id: '289'
currency: USD
paidOnDate: '2023-03-31T00:00:00'
totalAmount: 11.99
allocation:
currency: USD
allocatedOnDate: '2023-03-31T00:00:00'
totalAmount: 11.99
subTotal: 9.99
taxAmount: 2
totalAmount: 11.99
dataType: directIncomes
companyId: d7f743a9-1804-4116-8c8a-e606f7e2f66c
pushOperationKey: cc99d39b-5d87-4160-b582-42c69353d05b
dataConnectionKey: fa139396-523a-4a58-bf2b-8da82c8a673f
requestedOnUtc: '2023-03-31T14:24:46.2780738Z'
status: Pending
validation:
errors: []
warnings:
- itemId: 'PaymentAllocations[0].Allocation.Currency'
message: 'PaymentAllocations[0].Allocation.Currency is not supported, and will be ignored.'
validatorName: Allocation
- itemId: 'PaymentAllocations[0].Allocation.TotalAmount'
message: 'PaymentAllocations[0].Allocation.TotalAmount is not supported, and will be ignored.'
validatorName: Allocation
- itemId: 'PaymentAllocations[0].Allocation.AllocatedOnDate'
message: 'PaymentAllocations[0].Allocation.AllocatedOnDate is not supported, and will be ignored.'
validatorName: Allocation
- itemId: 'PaymentAllocations[0].PaymentAllocationPayment.Id'
message: 'PaymentAllocations[0].PaymentAllocationPayment.Id is not supported, and will be ignored.'
validatorName: PaymentAllocationPayment
- itemId: 'PaymentAllocations[0].PaymentAllocationPayment.Note'
message: 'PaymentAllocations[0].PaymentAllocationPayment.Note is not supported, and will be ignored.'
validatorName: PaymentAllocationPayment
- itemId: 'PaymentAllocations[0].PaymentAllocationPayment.Reference'
message: 'PaymentAllocations[0].PaymentAllocationPayment.Reference is not supported, and will be ignored.'
validatorName: PaymentAllocationPayment
- itemId: 'PaymentAllocations[0].PaymentAllocationPayment.Currency'
message: 'PaymentAllocations[0].PaymentAllocationPayment.Currency is not supported, and will be ignored.'
validatorName: PaymentAllocationPayment
- itemId: 'PaymentAllocations[0].PaymentAllocationPayment.TotalAmount'
message: 'PaymentAllocations[0].PaymentAllocationPayment.TotalAmount is not supported, and will be ignored.'
validatorName: PaymentAllocationPayment
- itemId: 'PaymentAllocations[0].PaymentAllocationPayment.PaidOnDate'
message: 'PaymentAllocations[0].PaymentAllocationPayment.PaidOnDate is not supported, and will be ignored.'
validatorName: PaymentAllocationPayment
- itemId: SubTotal
message: 'SubTotal is not supported, and will be ignored.'
validatorName: DirectIncome
- itemId: TotalAmount
message: 'TotalAmount is not supported, and will be ignored.'
validatorName: DirectIncome
- itemId: TaxAmount
message: 'TaxAmount is not supported, and will be ignored.'
validatorName: DirectIncome
statusCode: 202
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/Payment-Required'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/Not-Found'
'429':
$ref: '#/components/responses/Too-Many-Requests'
'500':
$ref: '#/components/responses/Internal-Server-Error'
'503':
$ref: '#/components/responses/Service-Unavailable'
description: |
The *Create direct income* endpoint creates a new [direct income](https://docs.codat.io/accounting-api#/schemas/DirectIncome) for a given company's connection.
[Direct incomes](https://docs.codat.io/accounting-api#/schemas/DirectIncome) are sales of items directly to a customer where payment is received at the point of the sale. For example, cash sales of items to a customer, referral commissions, and service fee refunds are considered direct incomes.
**Integration-specific behaviour**
Required data may vary by integration. To see what data to post, first call [Get create direct income model](https://docs.codat.io/accounting-api#/operations/get-create-directIncomes-model).
Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directIncomes) for integrations that support creating an account.
operationId: create-accounting-direct-income
'/companies/{companyId}/data/info':
parameters:
- $ref: '#/components/parameters/companyId'
get:
tags:
- Accounting company info
summary: Get company info
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/AccountingCompanyDataset'
examples:
Example 1:
value:
companyName: Codat
accountingPlatformRef: 1700060034_ETD
companyLegalName: Codat Ltd
addresses:
- type: Billing
line1: 301 Ink Rooms
line2: 28 Easton Street
city: London
region: England
country: United Kingdom
postalCode: WC1X 0BE
- type: Delivery
line1: 28 Easton Street
city: London
country: UK
postalCode: WC1X 0BE
phoneNumbers:
- number: 02012 345678
type: Landline
- number: 07123 456789
type: Mobile
- number: 02012 345678
type: Fax
webLinks:
- type: Website
url: 'https://www.codat.io/'
- type: Social
url: 'https://www.linkedin.com/company/codat-limited/'
registrationNumber: '5590111724'
taxNumber: '74111622555799035846'
financialYearStartDate: '2023-04-01T00:00:00'
baseCurrency: GBP
sourceUrls:
Api: 'https://api.codat.io'
createdDate: '2020-03-09T15:19:26'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$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'
description: Gets the latest basic info for a company.
operationId: get-accounting-company-info
post:
tags:
- Accounting company info
summary: Refresh company info
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Dataset'
'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: Initiates the process of synchronising basic info for a company
operationId: refresh-company-info
x-speakeasy-name-override: refresh
'/companies/{companyId}/connections/{connectionId}/push/invoices':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
post:
tags:
- Accounting invoices
summary: Create invoice
parameters:
- $ref: '#/components/parameters/timeoutInMinutes'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AccountingInvoice'
examples:
QuickBooks Desktop:
value:
invoiceNumber: 18/04 15.26
note: invoice push 20230418 15.26
customerRef:
id: 80000002-1674552702
companyName: Test Customer 1
salesOrderRefs: []
issueDate: '2023-04-18T11:09:01.438Z'
dueDate: '2023-05-24T11:09:01.438Z'
modifiedDate: '2023-02-14T11:09:01.438Z'
sourceModifiedDate: '2023-02-14T11:09:01.438Z'
paidOnDate: '2023-02-10T11:09:01.438Z'
currency: USD
currencyRate: 1
lineItems:
- description: lineItems.description 1
unitAmount: 15
quantity: 2
discountAmount: 0
subTotal: 30
taxAmount: 0
totalAmount: 30
accountRef:
id: 80000006-1671793811
name: Consulting Income
discountPercentage: 0
taxRateRef:
id: 80000002-1671793802
name: Non (TAX CODE)
effectiveTaxRate: 0
itemRef:
id: 80000004-1675280003
name: test income item 1
trackingCategoryRefs:
- id: 80000004-1674554660
name: Class 3
paymentAllocations:
- payment:
id: 80000004-1789341990
note: string
reference: string
accountRef:
id: string
name: string
currency: USD
currencyRate: 1
paidOnDate: '2023-02-14T11:09:01.438Z'
totalAmount: 725
allocation:
currency: USD
currencyRate: 1
allocatedOnDate: '2023-02-14T11:09:01.438Z'
totalAmount: 725
withholdingTax:
- name: string
amount: 0
totalDiscount: 0
subTotal: 30
additionalTaxAmount: 0
additionalTaxPercentage: 0
totalTaxAmount: 0
totalAmount: 30
amountDue: 87326532
discountPercentage: 0
status: Submitted
Sage 50 (UK):
value:
invoiceNumber: 22/03 11.36
customerRef:
id: CUST1
companyName: string
salesOrderRefs:
- id: SO001
dataType: salesOrders
issueDate: '2022-03-22T12:58:21.273Z'
dueDate: '2023-05-04T12:58:21.273Z'
paidOnDate: '2022-12-05T12:58:21.273Z'
currency: GBP
currencyRate: 40
lineItems:
- description: desc 1
unitAmount: 13
quantity: 2
discountAmount: 0
subTotal: 26
taxAmount: 5.2
totalAmount: 31.2
accountRef:
id: '4000'
name: string
discountPercentage: 0
taxRateRef:
id: '1'
name: string
effectiveTaxRate: 0
itemRef:
id: string
name: string
trackingCategoryRefs:
- id: department_1
name: string
- id: project_PROJ_TEST1
name: string
tracking:
categoryRefs:
- id: D44
projectRef:
id: project_PROJ_TEST1
customerRef:
id: cust_d12oe2jd4Ds
isBilledTo: Unknown
isRebilledTo: Unknown
isDirectIncome: true
paymentAllocations:
- payment:
id: pay_d21230s
note: string
reference: REF12402
accountRef:
id: ad339_D22kd
paidOnDate: '2022-12-05T12:58:21.273Z'
totalAmount: 0
allocation:
allocatedOnDate: '2022-12-05T12:58:21.273Z'
totalAmount: 0
withholdingTax:
- name: string
amount: 0
totalDiscount: 0
subTotal: null
additionalTaxAmount: 0
additionalTaxPercentage: 0
totalTaxAmount: 0
totalAmount: 0
amountDue: 0
discountPercentage: 0
status: Submitted
note: note
metadata:
isDeleted: true
Sage Intacct:
value:
invoiceNumber: IN9923
note: note 10.50 invoice
customerRef:
id: '1291'
companyName: Stanley Test
salesOrderRefs:
- id: '104045'
dataType: salesOrders
issueDate: '2022-04-06T12:58:21.273Z'
dueDate: '2023-05-04T12:58:21.273Z'
paidOnDate: '2022-12-05T12:58:21.273Z'
currency: GBP
currencyRate: 40
lineItems:
- description: desc line 1
unitAmount: 400
quantity: 1
discountAmount: 0
subTotal: 400
taxAmount: 300
totalAmount: 999
accountRef:
id: '273'
name: Transactor Clearing
discountPercentage: 0
taxRateRef:
id: '99'
name: UK Sale Goods Standard Rate
effectiveTaxRate: 0
trackingCategoryRefs:
- id: LOCATION-8
name: United Kingdom
paymentAllocations: []
withholdingTax:
- name: string
amount: 0
totalDiscount: 0
subTotal: null
additionalTaxAmount: 0
additionalTaxPercentage: 0
totalTaxAmount: 0
totalAmount: 0
amountDue: 0
discountPercentage: 0
status: Submitted
metadata:
isDeleted: true
QuickBooks Online:
value:
customerRef:
id: '69'
salesOrderRefs: []
issueDate: '2023-04-02T00:00:00'
dueDate: '2023-04-02T00:00:00'
currency: GBP
currencyRate: 1
lineItems:
- description: Any random item
unitAmount: 10
quantity: 10
subTotal: 100
taxAmount: 0
totalAmount: 100
accountRef:
id: '136'
name: Services
taxRateRef:
id: 24_Invoices
itemRef:
id: '27'
trackingCategoryRefs: []
isDirectIncome: false
paymentAllocations: []
withholdingTax: []
totalDiscount: 0
additionalTaxAmount: 0
additionalTaxPercentage: 0
totalTaxAmount: 0
amountDue: 100
totalAmount: 100
status: Submitted
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/AccountingCreateInvoiceResponse'
examples: {}
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/Payment-Required'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/Not-Found'
'429':
$ref: '#/components/responses/Too-Many-Requests'
'500':
$ref: '#/components/responses/Internal-Server-Error'
'503':
$ref: '#/components/responses/Service-Unavailable'
description: |
The *Create invoice* endpoint creates a new [invoice](https://docs.codat.io/accounting-api#/schemas/Invoice) for a given company's connection.
[Invoices](https://docs.codat.io/accounting-api#/schemas/Invoice) are itemized records of goods sold or services provided to a customer.
**Integration-specific behaviour**
Required data may vary by integration. To see what data to post, first call [Get create/update invoice model](https://docs.codat.io/accounting-api#/operations/get-create-update-invoices-model).
Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=invoices) for integrations that support creating an account.
operationId: create-accounting-invoice
'/companies/{companyId}/connections/{connectionId}/push/journalEntries':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
post:
tags:
- Accounting journal entries
summary: Create journal entry
parameters:
- $ref: '#/components/parameters/timeoutInMinutes'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AccountingJournalEntry'
examples:
QuickBooks Desktop:
value:
description: record level description
postedOn: '2023-02-23T19:49:16.052Z'
createdOn: '2023-02-22T19:49:16.052Z'
updatedOn: '2023-02-21T19:49:16.052Z'
journalRef:
id: '12'
journalLines:
- description: journalLines.description debit
netAmount: 23.02
currency: USD
accountRef:
id: 80000019-1671793811
name: Office Supplies
tracking:
recordRefs:
- id: 80000001-1674553252
dataType: customers
- description: journalLines.description credit
netAmount: -23.02
currency: USD
accountRef:
id: '8000001E-1671793811'
name: Utilities
tracking:
recordRefs:
- id: 80000002-1674553271
dataType: trackingCategories
recordRef:
id: 80000002-6722155312
dataType: bills
metadata:
isDeleted: true
Sage Intacct:
value:
description: test
postedOn: '2023-03-29T00:00:00Z'
journalRef:
id: '207'
journalLines:
- description: line desc 1
netAmount: 9
currency: GBP
accountRef:
id: '151'
- description: line desc 2
netAmount: -9
currency: GBP
accountRef:
id: '154'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/AccountingCreateJournalEntryResponse'
examples:
Sage Intacct:
value:
changes:
- type: Created
recordRef:
dataType: journalEntries
data:
description: test
postedOn: '2023-03-29T00:00:00Z'
journalRef:
id: '207'
journalLines:
- description: line desc 1
netAmount: 9
currency: GBP
accountRef:
id: '151'
- description: line desc 2
netAmount: -9
currency: GBP
accountRef:
id: '154'
dataType: journalEntries
companyId: d7f743a9-1804-4116-8c8a-e606f7e2f66c
pushOperationKey: b9c1381a-8742-4a45-9dc5-528101dbd0e3
dataConnectionKey: fa139396-523a-4a58-bf2b-8da82c8a673f
requestedOnUtc: '2023-03-31T14:53:44.6401039Z'
status: Pending
statusCode: 202
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/Payment-Required'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/Not-Found'
'429':
$ref: '#/components/responses/Too-Many-Requests'
'500':
$ref: '#/components/responses/Internal-Server-Error'
'503':
$ref: '#/components/responses/Service-Unavailable'
description: |
The *Create journal entry* endpoint creates a new [journal entry](https://docs.codat.io/accounting-api#/schemas/JournalEntry) for a given company's connection.
[Journal entries](https://docs.codat.io/accounting-api#/schemas/JournalEntry) are made in a company's general ledger, or accounts, when transactions are approved.
**Integration-specific behaviour**
Required data may vary by integration. To see what data to post, first call [Get create journal entry model](https://docs.codat.io/accounting-api#/operations/get-create-journalEntries-model).
Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=journalEntries) for integrations that support creating an account.
operationId: create-accounting-journal-entry
'/companies/{companyId}/connections/{connectionId}/push/payments':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
post:
tags:
- Accounting payments
summary: Create payment
parameters:
- $ref: '#/components/parameters/timeoutInMinutes'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AccountingPayment'
examples:
QuickBooks Desktop:
value:
customerRef:
id: 80000002-1674552702
companyName: string
accountRef:
id: '8000002E-1675267199'
name: Undeposited Funds
paymentMethodRef:
id: string
name: string
totalAmount: 28
currency: USD
currencyRate: 1
date: '2023-02-10T11:47:04.792Z'
note: note 14/02 1147
lines:
- amount: 28
links:
- type: Invoice
id: 181-1676374586
amount: -28
currencyRate: 1
allocatedOnDate: '2023-02-11T11:47:04.792Z'
reference: ref 14/02 1147
Sage 50 (UK):
value:
customerRef:
id: CUST1
accountRef:
id: '1200'
name: Bank Current Account
paymentMethodRef:
id: '4405'
totalAmount: 4
currency: GBP
currencyRate: 1
date: '2023-03-17T11:47:04.792Z'
note: note 07/03 14.31
lines:
- amount: 4
links:
- type: Invoice
id: INV-31
amount: -4
currencyRate: 1
allocatedOnDate: '2023-02-11T11:47:04.792Z'
reference: ref
Sage Business Cloud Accounting:
value:
customerRef:
id: 30444c5bd4964fd787c7f8e2e5301ce1
companyName: Stanley test customer
accountRef:
id: 9a25937b267a11e797950a57719b2edb
name: Current
totalAmount: 0.17
currency: GBP
currencyRate: 1
date: '2023-03-20T11:47:04.792Z'
note: Need to send products asap.
lines:
- amount: 0.17
links:
- type: Invoice
id: bb85db9226d7450fb99eb83e7fb37505
amount: -0.17
currencyRate: 1
allocatedOnDate: '2023-02-11T11:47:04.792Z'
reference: normal payment 20/03 17.05
Sage Intacct:
value:
customerRef:
id: '19'
accountRef:
id: '81'
date: '2022-03-12T00:00:00'
totalAmount: 0
lines:
- amount: 0
links:
- id: '246'
type: Invoice
amount: -1.1
- id: '280'
type: CreditNote
amount: 1.1
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/AccountingCreatePaymentResponse'
examples:
Sage Intacct:
value:
data:
customerRef:
id: '19'
accountRef:
id: '81'
totalAmount: 0
date: '2022-03-12T00:00:00'
lines:
- amount: 0
links:
- type: Invoice
id: '246'
amount: -1.1
- type: CreditNote
id: '280'
amount: 1.1
dataType: payments
companyId: ffa6368e-fde4-4165-9a0a-4bda1a6f916e
pushOperationKey: 673f5d97-1c53-41ef-b9c8-cc9a8415d17c
dataConnectionKey: bbecdbf3-913a-43ae-9c91-e830b3686657
requestedOnUtc: '0001-01-01T00:00:00'
status: Pending
statusCode: 202
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/Payment-Required'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/Not-Found'
'429':
$ref: '#/components/responses/Too-Many-Requests'
'500':
$ref: '#/components/responses/Internal-Server-Error'
'503':
$ref: '#/components/responses/Service-Unavailable'
description: |
The *Create payment* endpoint creates a new [payment](https://docs.codat.io/accounting-api#/schemas/Payment) for a given company's connection.
[Payments](https://docs.codat.io/accounting-api#/schemas/Payment) represent an allocation of money within any customer accounts receivable account.
**Integration-specific behaviour**
Required data may vary by integration. To see what data to post, first call [Get create payment model](https://docs.codat.io/accounting-api#/operations/get-create-payments-model).
Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=payments) for integrations that support creating an account.
operationId: create-accounting-payment
'/companies/{companyId}/connections/{connectionId}/data/bankAccounts':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
get:
tags:
- Accounting bank accounts
summary: List bank accounts
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/pageSize'
- $ref: '#/components/parameters/query'
- $ref: '#/components/parameters/orderBy'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/AccountingBankAccounts'
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'
'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'
description: |-
The *List bank accounts* endpoint returns a list of [bank accounts](https://docs.codat.io/accounting-api#/schemas/BankAccount) for a given company's connection.
[Bank accounts](https://docs.codat.io/accounting-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.
Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-commerce-v1-api#/operations/refresh-company-data).
operationId: list-accounting-bank-accounts
'/companies/{companyId}/connections/{connectionId}/data/bankAccounts/{accountId}':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
- $ref: '#/components/parameters/accountingAccountId'
get:
tags:
- Accounting bank accounts
summary: Get bank account
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/AccountingBankAccount'
examples:
Dynamics 365 Business Central:
value:
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
FreeAgent:
value:
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
KashFlow:
value:
id: '765768'
accountName: 16th Account
accountType: Unknown
nominalCode: '70700'
currency: GBP
balance: 326
availableBalance: 326
modifiedDate: '2022-09-30T10:29:16Z'
QuickBooks Desktop:
value:
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
Sage 50 (UK):
value:
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
Sage Business Cloud Accounting:
value:
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'
Xero:
value:
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
Zoho Books:
value:
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
Oracle NetSuite:
value:
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
QuickBooks Online Sandbox:
value:
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
QuickBooks Online:
value:
id: '202'
accountName: \aa
accountType: Debit
currency: GBP
balance: 123
availableBalance: 123
modifiedDate: '2023-01-18T11:02:37Z'
sourceModifiedDate: '2022-11-11T14:15:13Z'
Sage Intacct:
value:
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
'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'
description: |
The *Get bank account* endpoint returns a single account for a given accountId.
[Bank accounts](https://docs.codat.io/accounting-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.
Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support getting a specific bank account.
Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-commerce-v1-api#/operations/refresh-company-data).
operationId: get-accounting-bank-account
'/companies/{companyId}/connections/{connectionId}/data/commerce-customers':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
get:
tags:
- Commerce customers
summary: List customers
operationId: list-commerce-customers
description: |-
The *List customers* endpoint returns a list of [customers](https://docs.codat.io/commerce-api#/schemas/Customer) for a given company's connection.
[Customers](https://docs.codat.io/commerce-api#/schemas/Customer) are people or organizations that place orders, make payments and recieve goods and/or services from the SMB.
Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-commerce-v1-api#/operations/refresh-company-data).
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/pageSize'
- $ref: '#/components/parameters/query'
- $ref: '#/components/parameters/orderBy'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CommerceCustomers'
examples:
BigCommerce:
value:
results:
- id: '1'
customerName: Amy Jones
emailAddress: a.jackson@email.me
defaultCurrency: XXX
phone: 07770 666777
addresses:
- type: Unknown
line1: My Billing Address ./*drop table
city: Portsmouth
region: ''
country: United Kingdom
postalCode: PS13HJ
- type: Unknown
line1: 'This is my address, I cant hit enter.'
city: Portsmouth
region: ''
country: United Kingdom
postalCode: PS13HJ
createdDate: '2022-06-15T15:54:15Z'
modifiedDate: '2023-04-11T10:33:49Z'
sourceModifiedDate: '2022-06-15T15:54:15Z'
- id: '2'
customerName: Cust001 Cust001
emailAddress: Cust001@example.com
defaultCurrency: XXX
phone: 05442 203941
addresses: []
createdDate: '2023-04-11T15:49:25Z'
modifiedDate: '2023-04-17T15:42:55Z'
sourceModifiedDate: '2023-04-11T15:49:25Z'
pageNumber: 1
pageSize: 2
totalResults: 201
_links:
current:
href: /companies/d1ebcf6d-f7f9-4841-8a06-fec12c492a48/connections/7c0a21e8-938a-40a4-b0f7-5ab5d46804b0/data/commerce-customers?page=1&pageSize=2
self:
href: /companies/d1ebcf6d-f7f9-4841-8a06-fec12c492a48/connections/7c0a21e8-938a-40a4-b0f7-5ab5d46804b0/data/commerce-customers
next:
href: /companies/d1ebcf6d-f7f9-4841-8a06-fec12c492a48/connections/7c0a21e8-938a-40a4-b0f7-5ab5d46804b0/data/commerce-customers?page=2&pageSize=2
Clover:
value:
results:
- id: 2CBJ8R898ZJAR
customerName: ''
addresses: []
createdDate: '2021-09-22T13:10:12Z'
modifiedDate: '2023-01-09T11:01:03Z'
sourceModifiedDate: '0001-01-01T00:00:00'
- id: 511JV0FRN2QYC
customerName: ''
addresses: []
createdDate: '2021-09-21T14:54:38Z'
modifiedDate: '2023-01-09T11:01:03Z'
sourceModifiedDate: '0001-01-01T00:00:00'
pageNumber: 1
pageSize: 2
totalResults: 9
_links:
current:
href: /companies/aae80eb3-1f56-41ca-a171-a59f9ee03b26/connections/4a5b633b-cd86-4715-a22b-62be98c4bcc5/data/commerce-customers?page=1&pageSize=2
self:
href: /companies/aae80eb3-1f56-41ca-a171-a59f9ee03b26/connections/4a5b633b-cd86-4715-a22b-62be98c4bcc5/data/commerce-customers
next:
href: /companies/aae80eb3-1f56-41ca-a171-a59f9ee03b26/connections/4a5b633b-cd86-4715-a22b-62be98c4bcc5/data/commerce-customers?page=2&pageSize=2
Mollie:
value:
results:
- id: cst_NUkBHQmekz
customerName: Frod Baggins
emailAddress: frodo.baggings@theshire.com
addresses: []
createdDate: '2022-01-18T11:41:54'
modifiedDate: '2022-03-17T15:47:28Z'
- id: cst_BvBxwuwfvH
customerName: Frodo Baggins
emailAddress: frodo.baggings@theshire.com
addresses: []
createdDate: '2022-01-18T11:42:05'
modifiedDate: '2022-03-17T15:47:28Z'
pageNumber: 1
pageSize: 2
totalResults: 3
_links:
current:
href: /companies/a68cb447-182d-4bbe-be1a-f526d11d69d5/connections/dfbf847b-cde8-4b00-b2f9-af51dec0d337/data/commerce-customers?page=1&pageSize=2
self:
href: /companies/a68cb447-182d-4bbe-be1a-f526d11d69d5/connections/dfbf847b-cde8-4b00-b2f9-af51dec0d337/data/commerce-customers
next:
href: /companies/a68cb447-182d-4bbe-be1a-f526d11d69d5/connections/dfbf847b-cde8-4b00-b2f9-af51dec0d337/data/commerce-customers?page=2&pageSize=2
Mollie Test:
value:
results:
- id: cst_NUkBHQmekz
customerName: Frod Baggins
emailAddress: frodo.baggings@theshire.com
addresses: []
createdDate: '2022-01-18T11:41:54'
modifiedDate: '2022-08-17T11:33:19Z'
- id: cst_BvBxwuwfvH
customerName: Frodo Baggins
emailAddress: frodo.baggings@theshire.com
addresses: []
createdDate: '2022-01-18T11:42:05'
modifiedDate: '2022-08-17T11:33:19Z'
pageNumber: 1
pageSize: 2
totalResults: 3
_links:
current:
href: /companies/b978f9fe-8d63-4cfc-b2c2-b61b72e22785/connections/d564f8fd-0766-4ab8-a427-7c893f9b9ff6/data/commerce-customers?page=1&pageSize=2
self:
href: /companies/b978f9fe-8d63-4cfc-b2c2-b61b72e22785/connections/d564f8fd-0766-4ab8-a427-7c893f9b9ff6/data/commerce-customers
next:
href: /companies/b978f9fe-8d63-4cfc-b2c2-b61b72e22785/connections/d564f8fd-0766-4ab8-a427-7c893f9b9ff6/data/commerce-customers?page=2&pageSize=2
PrestaShop:
value:
results:
- id: '2'
customerName: Bob Smith
emailAddress: bob.smith@example.com
addresses:
- type: Unknown
line1: 1 test street
city: City Test
region: Virginia
country: US
postalCode: '55678'
createdDate: '2021-09-02T07:54:26'
modifiedDate: '2022-01-26T15:09:42Z'
sourceModifiedDate: '2021-09-02T07:54:26'
- id: '3'
customerName: Fake Name
emailAddress: bob@bob.com
addresses: []
createdDate: '2021-09-03T01:55:13'
modifiedDate: '2022-01-26T15:09:42Z'
sourceModifiedDate: '2021-09-03T01:55:13'
pageNumber: 1
pageSize: 2
totalResults: 5
_links:
current:
href: /companies/2bf78e61-58ca-421a-a430-5dfa59cf15b0/connections/30774c1f-fdcd-491e-9e60-47e316b3ab9b/data/commerce-customers?page=1&pageSize=2
self:
href: /companies/2bf78e61-58ca-421a-a430-5dfa59cf15b0/connections/30774c1f-fdcd-491e-9e60-47e316b3ab9b/data/commerce-customers
next:
href: /companies/2bf78e61-58ca-421a-a430-5dfa59cf15b0/connections/30774c1f-fdcd-491e-9e60-47e316b3ab9b/data/commerce-customers?page=2&pageSize=2
Shopify:
value:
results:
- id: '5839032287390'
customerName: AL A
emailAddress: a.macra@codat.io
addresses:
- type: Unknown
line1: '301 Ink Rooms, 28 Easton St, Farringdon'
line2: '28 Easton St, Farringdon'
city: London
region: England
country: United Kingdom
postalCode: WC1X 0BE
createdDate: '2021-11-18T15:24:03'
modifiedDate: '2023-02-10T15:18:25Z'
sourceModifiedDate: '2021-11-18T15:24:03'
- id: '5097398534302'
customerName: Qa Test
phone: '+445593368390'
addresses:
- type: Unknown
line1: Look Street
city: London
postalCode: PO16 7GZ
- type: Unknown
line1: Look Street
city: London
region: England
country: United Kingdom
postalCode: PO16 7GZ
note: ''
createdDate: '2021-03-19T10:12:37'
modifiedDate: '2023-02-10T15:18:25Z'
sourceModifiedDate: '2022-08-01T13:07:59'
pageNumber: 1
pageSize: 2
totalResults: 6
_links:
current:
href: /companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-customers?page=1&pageSize=2
self:
href: /companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-customers
next:
href: /companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-customers?page=2&pageSize=2
Square:
value:
results:
- id: FT9948H3VD6GF8MPDD5438KY1M
emailAddress: fake@name.com
phone: '+441234567890'
addresses:
- type: Unknown
line1: 1 Main Street
line2: Flat 20
city: London
region: London
postalCode: W1A 1AA
createdDate: '2021-03-08T11:21:11Z'
modifiedDate: '2022-08-02T10:27:32Z'
sourceModifiedDate: '2021-03-08T11:21:11Z'
- id: GXQDPSZSMN6C58270SZN4YJZ8R
emailAddress: s.shandil+square@codat.io
phone: '+447729946295'
addresses: []
createdDate: '2020-11-19T14:56:00Z'
modifiedDate: '2022-08-02T10:27:32Z'
sourceModifiedDate: '2020-11-19T14:56:00Z'
pageNumber: 1
pageSize: 2
totalResults: 2
_links:
current:
href: /companies/d779fc82-a098-4107-a9fc-c2a1dda3d522/connections/9b098b74-3770-4dad-9001-4c283a39f1e5/data/commerce-customers?page=1&pageSize=2
self:
href: /companies/d779fc82-a098-4107-a9fc-c2a1dda3d522/connections/9b098b74-3770-4dad-9001-4c283a39f1e5/data/commerce-customers
Stripe Test:
value:
results:
- id: cus_LXdjls7KY5ZHaz
customerName: Barry Smith
emailAddress: barry@example.com
defaultCurrency: gbp
addresses: []
note: Test Subscription
createdDate: '2022-04-20T07:59:52Z'
modifiedDate: '2022-09-30T11:18:27Z'
- id: cus_LXdFFgHqqVURIv
customerName: David Dunlow
emailAddress: david@example.com
defaultCurrency: gbp
phone: '+447545309714'
addresses:
- type: Billing
line1: 301 Ink Rooms
line2: 28 Easton Street
city: London
country: GB
postalCode: WC1X 0BE
- type: Delivery
line1: 301 Ink Rooms
line2: 28 Easton Street
city: London
country: GB
postalCode: WC1X 0BE
note: Test Subscriptions
createdDate: '2022-04-20T07:30:01Z'
modifiedDate: '2022-09-30T11:18:27Z'
pageNumber: 1
pageSize: 2
totalResults: 14
_links:
current:
href: /companies/8206e78e-e340-411e-b315-473c4ab73b48/connections/43e58373-0a1d-44a0-97f0-9fa9993a14fa/data/commerce-customers?page=1&pageSize=2
self:
href: /companies/8206e78e-e340-411e-b315-473c4ab73b48/connections/43e58373-0a1d-44a0-97f0-9fa9993a14fa/data/commerce-customers
next:
href: /companies/8206e78e-e340-411e-b315-473c4ab73b48/connections/43e58373-0a1d-44a0-97f0-9fa9993a14fa/data/commerce-customers?page=2&pageSize=2
WooCommerce:
value:
results:
- id: '201694267'
customerName: Qa Test
emailAddress: a.macra@codat.io
phone: ''
addresses:
- type: Billing
line1: ''
line2: ''
city: ''
region: ''
country: ''
postalCode: ''
createdDate: '2021-03-11T09:04:27'
modifiedDate: '2021-07-13T16:19:00Z'
sourceModifiedDate: '2021-03-11T09:07:00'
pageNumber: 1
pageSize: 2
totalResults: 1
_links:
current:
href: /companies/010c6f53-8fc8-40ab-9ed5-41191cf9c6b5/connections/7545ca2e-5f58-4f98-8af2-3b2c38bb8074/data/commerce-customers?page=1&pageSize=2
self:
href: /companies/010c6f53-8fc8-40ab-9ed5-41191cf9c6b5/connections/7545ca2e-5f58-4f98-8af2-3b2c38bb8074/data/commerce-customers
Zettle:
value:
results:
- id: firstname.lastname@example.com
customerName: Firstname Lastname
emailAddress: firstname.lastname@example.com
addresses:
- type: Unknown
line1: Line1
city: City
country: GB
postalCode: TT1 1TT
createdDate: '2021-01-07T16:17:34'
modifiedDate: '2021-01-27T13:08:51Z'
sourceModifiedDate: '2021-01-08T09:57:56'
- id: joe@bloggs.com
customerName: Joe Bloggs
emailAddress: joe@bloggs.com
phone: 02012 345678
addresses:
- type: Unknown
line1: Flat 1
line2: 1 High Street
city: London
region: London
country: GB
- type: Unknown
line1: Flat 2
line2: 2 High Street
city: London
region: London
country: GB
createdDate: '2020-12-21T14:52:15'
modifiedDate: '2021-01-27T13:08:51Z'
sourceModifiedDate: '2020-12-21T14:52:15'
pageNumber: 1
pageSize: 2
totalResults: 2
_links:
current:
href: /companies/fe8e3158-47e6-4367-9537-7d5001295500/connections/d60b15e7-7db9-459b-92a0-9557f7ebdeea/data/commerce-customers?page=1&pageSize=2
self:
href: /companies/fe8e3158-47e6-4367-9537-7d5001295500/connections/d60b15e7-7db9-459b-92a0-9557f7ebdeea/data/commerce-customers
'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'
'409':
$ref: '#/components/responses/Conflict'
'429':
$ref: '#/components/responses/Too-Many-Requests'
'500':
$ref: '#/components/responses/Internal-Server-Error'
'503':
$ref: '#/components/responses/Service-Unavailable'
'/companies/{companyId}/connections/{connectionId}/data/commerce-customers/{customerId}':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
- name: customerId
in: path
required: true
schema:
type: string
examples:
$ref: '#/components/schemas/CommerceOrder/allOf/0/properties/id/examples'
description: Unique identifier for a customer.
get:
tags:
- Commerce customers
summary: Get customer
operationId: get-commerce-customer
description: |
The *Get customer* endpoint returns a single customer for a given customerId.
[Customers](https://docs.codat.io/commerce-api#/schemas/Customer) are people or organizations that place orders, make payments and receive goods and/or services from the SMB.
Check out our [coverage explorer](https://knowledge.codat.io/supported-features/commerce?view=tab-by-data-type&dataType=commerce-customers) for integrations that support getting a specific customer.
Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-commerce-v1-api#/operations/refresh-company-data).
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CommerceCustomer'
examples:
BigCommerce:
value:
id: '1'
customerName: Amy Jones
emailAddress: a.durbanjackson+amy@codat.io
defaultCurrency: XXX
phone: '07770666777'
addresses:
- type: Unknown
line1: My Billing Address ./*drop table
city: Portsmouth
region: ''
country: United Kingdom
postalCode: PS13HJ
- type: Unknown
line1: 'This is my address, I cant hit enter.'
city: Portsmouth
region: ''
country: United Kingdom
postalCode: PS13HJ
createdDate: '2022-06-15T15:54:15Z'
modifiedDate: '2023-04-11T10:33:49Z'
sourceModifiedDate: '2022-06-15T15:54:15Z'
Clover:
value:
id: 2CBJ8R898ZJAR
customerName: ''
addresses: []
createdDate: '2021-09-22T13:10:12Z'
modifiedDate: '2023-01-09T11:01:03Z'
sourceModifiedDate: '0001-01-01T00:00:00'
Mollie:
value:
id: cst_NUkBHQmekz
customerName: Frod Baggins
emailAddress: frodo.baggings@theshire.com
addresses: []
createdDate: '2022-01-18T11:41:54'
modifiedDate: '2022-03-17T15:47:28Z'
Mollie Test:
value:
id: cst_NUkBHQmekz
customerName: Frod Baggins
emailAddress: frodo.baggings@theshire.com
addresses: []
createdDate: '2022-01-18T11:41:54'
modifiedDate: '2022-08-17T11:33:19Z'
PrestaShop:
value:
id: '2'
customerName: Bob Smith
emailAddress: bob.smith@example.com
addresses:
- type: Unknown
line1: 1 test street
city: City Test
region: Virginia
country: US
postalCode: '55678'
createdDate: '2021-09-02T07:54:26'
modifiedDate: '2022-01-26T15:09:42Z'
sourceModifiedDate: '2021-09-02T07:54:26'
Shopify:
value:
id: '5839032287390'
customerName: AL A
emailAddress: a.macra@codat.io
addresses:
- type: Unknown
line1: '301 Ink Rooms, 28 Easton St, Farringdon'
line2: '28 Easton St, Farringdon'
city: London
region: England
country: United Kingdom
postalCode: WC1X 0BE
createdDate: '2021-11-18T15:24:03'
modifiedDate: '2023-02-10T15:18:25Z'
sourceModifiedDate: '2021-11-18T15:24:03'
Square:
value:
id: FT9948H3VD6GF8MPDD5438KY1M
emailAddress: fake@name.com
phone: '+441234567890'
addresses:
- type: Unknown
line1: 1 Main Street
line2: Flat 20
city: London
region: London
postalCode: W1A 1AA
createdDate: '2021-03-08T11:21:11Z'
modifiedDate: '2022-08-02T10:27:32Z'
sourceModifiedDate: '2021-03-08T11:21:11Z'
Stripe Test:
value:
id: cus_LXdjls7KY5ZHaz
customerName: Barry Smith
emailAddress: barry@example.com
defaultCurrency: gbp
addresses: []
note: Test Subscription
createdDate: '2022-04-20T07:59:52Z'
modifiedDate: '2022-09-30T11:18:27Z'
WooCommerce:
value:
id: '201694267'
customerName: Qa Test
emailAddress: a.macra@codat.io
phone: ''
addresses:
- type: Billing
line1: ''
line2: ''
city: ''
region: ''
country: ''
postalCode: ''
createdDate: '2021-03-11T09:04:27'
modifiedDate: '2021-07-13T16:19:00Z'
sourceModifiedDate: '2021-03-11T09:07:00'
Zettle:
value:
id: firstname.lastname@example.com
customerName: Firstname Lastname
emailAddress: firstname.lastname@example.com
addresses:
- type: Unknown
line1: Line1
city: City
country: GB
postalCode: TT1 1TT
createdDate: '2021-01-07T16:17:34'
modifiedDate: '2021-01-27T13:08:51Z'
sourceModifiedDate: '2021-01-08T09:57:56'
'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'
'/companies/{companyId}/connections/{connectionId}/data/commerce-info':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
get:
summary: Get company info
tags:
- Commerce company info
operationId: get-commerce-company-info
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CommerceCompanyInfo'
examples:
Example 1:
value:
companyName: Codat
companyLegalName: Codat Ltd
addresses:
- type: Billing
line1: 301 Ink Rooms
line2: 28 Easton Street
city: London
region: England
country: United Kingdom
postalCode: WC1X 0BE
- type: Delivery
line1: 28 Easton Street
city: London
country: UK
postalCode: WC1X 0BE
phoneNumbers:
- number: 02012 345678
type: Landline
- number: 07123 456789
type: Mobile
- number: 02012 345678
type: Fax
webLinks:
- type: Website
url: 'https://www.codat.io/'
- type: Social
url: 'https://www.linkedin.com/company/codat-limited/'
registrationNumber: '5590111724'
baseCurrency: GBP
accountBalances:
- available: 20053.23
pending: 2034.23
reserved: 517.23
currency: GBP
sourceUrls:
Api: 'https://api.codat.io'
createdDate: '2019-03-07T16:50:49'
modifiedDate: '2022-03-10T15:42:13'
sourceModifiedDate: '2021-06-10T01:48:49'
'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'
description: |-
Retrieve information about the company, as seen in the commerce software.
This may include information like addresses, tax registration details and social media or website information.
'/companies/{companyId}/connections/{connectionId}/data/commerce-locations':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
get:
summary: List locations
tags:
- Commerce locations
operationId: list-commerce-locations
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CommerceLocations'
examples:
Clover:
value:
results:
- id: GA3WP1ZC3ZFK1
name: Codat
address:
type: Inventory
line1: '301 Ink Rooms, 28 Easton Street'
city: London
region: London
country: GB
postalCode: WC1X 0BE
modifiedDate: '2023-01-09T11:01:03Z'
pageNumber: 1
pageSize: 2
totalResults: 1
_links:
current:
href: /companies/aae80eb3-1f56-41ca-a171-a59f9ee03b26/connections/4a5b633b-cd86-4715-a22b-62be98c4bcc5/data/commerce-locations?page=1&pageSize=2
self:
href: /companies/aae80eb3-1f56-41ca-a171-a59f9ee03b26/connections/4a5b633b-cd86-4715-a22b-62be98c4bcc5/data/commerce-locations
Lightspeed K Trial:
value:
results:
- id: '647208621834538'
name: QA Shared - New Test Site
address:
type: Unknown
country: AU
modifiedDate: '2023-03-02T09:48:48Z'
pageNumber: 1
pageSize: 2
totalResults: 1
_links:
current:
href: /companies/36e3213b-02f6-4264-96ce-6dd53ea69e57/connections/278ba962-466a-452b-92b0-4bdee3a23463/data/commerce-locations?page=1&pageSize=2
self:
href: /companies/36e3213b-02f6-4264-96ce-6dd53ea69e57/connections/278ba962-466a-452b-92b0-4bdee3a23463/data/commerce-locations
Shopify:
value:
results:
- id: '61375348894'
name: '301 Ink Rooms, 28 Easton St'
address:
type: Inventory
line1: '301 Ink Rooms, 28 Easton St'
city: London
region: London
country: GB
postalCode: WC1X 0BE
modifiedDate: '2023-02-10T15:18:25Z'
sourceModifiedDate: '2021-03-19T10:06:06'
pageNumber: 1
pageSize: 2
totalResults: 1
_links:
current:
href: /companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-locations?page=1&pageSize=2
self:
href: /companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-locations
Square:
value:
results:
- id: D8DVHD1G6NT2J
name: Codat Limited
address:
type: Inventory
line1: 301 Ink Rooms
line2: 28 Easton Street
city: London
country: GB
postalCode: WC1X0BE
modifiedDate: '2022-08-02T10:27:32Z'
sourceModifiedDate: '2020-01-17T14:07:30Z'
pageNumber: 1
pageSize: 2
totalResults: 1
_links:
current:
href: /companies/d779fc82-a098-4107-a9fc-c2a1dda3d522/connections/9b098b74-3770-4dad-9001-4c283a39f1e5/data/commerce-locations?page=1&pageSize=2
self:
href: /companies/d779fc82-a098-4107-a9fc-c2a1dda3d522/connections/9b098b74-3770-4dad-9001-4c283a39f1e5/data/commerce-locations
'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'
description: |-
The *List locations* endpoint returns a list of [locations](https://docs.codat.io/commerce-api#/schemas/Location) for a given company's connection.
[Locations](https://docs.codat.io/commerce-api#/schemas/Location) hold information on the geographic location at which stocks of [products](https://docs.codat.io/commerce-api#/schemas/Product) may be held or where [orders](https://docs.codat.io/commerce-api#/schemas/Order) were placed.
Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-commerce-v1-api#/operations/refresh-company-data).
'/companies/{companyId}/connections/{connectionId}/data/commerce-locations/{locationId}':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
- name: locationId
in: path
required: true
schema:
type: string
examples:
$ref: '#/components/schemas/CommerceOrder/allOf/0/properties/id/examples'
description: Unique identifier for a location.
get:
summary: Get location
tags:
- Commerce locations
operationId: get-commerce-location
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CommerceLocation'
examples:
Clover:
value:
id: GA3WP1ZC3ZFK1
name: Codat
address:
type: Inventory
line1: '301 Ink Rooms, 28 Easton Street'
city: London
region: London
country: GB
postalCode: WC1X 0BE
modifiedDate: '2023-01-09T11:01:03Z'
Lightspeed K Trial:
value:
id: '647208621834538'
name: QA Shared - New Test Site
address:
type: Unknown
country: AU
modifiedDate: '2023-03-02T09:48:48Z'
Shopify:
value:
id: '61375348894'
name: '301 Ink Rooms, 28 Easton St'
address:
type: Inventory
line1: '301 Ink Rooms, 28 Easton St'
city: London
region: London
country: GB
postalCode: WC1X 0BE
modifiedDate: '2023-02-10T15:18:25Z'
sourceModifiedDate: '2021-03-19T10:06:06'
Square:
value:
id: D8DVHD1G6NT2J
name: Codat Limited
address:
type: Inventory
line1: 301 Ink Rooms
line2: 28 Easton Street
city: London
country: GB
postalCode: WC1X0BE
modifiedDate: '2022-08-02T10:27:32Z'
sourceModifiedDate: '2020-01-17T14:07:30Z'
'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'
description: |
The *Get location* endpoint returns a single location for a given locationId.
[Locations](https://docs.codat.io/commerce-api#/schemas/Location) hold information on the geographic location at which stocks of [products](https://docs.codat.io/commerce-api#/schemas/Product) may be held or where [orders](https://docs.codat.io/commerce-api#/schemas/Order) were placed.
Check out our [coverage explorer](https://knowledge.codat.io/supported-features/commerce?view=tab-by-data-type&dataType=commerce-locations) for integrations that support getting a specific location.
Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-commerce-v1-api#/operations/refresh-company-data).
'/companies/{companyId}/connections/{connectionId}/data/commerce-orders':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
get:
summary: List orders
tags:
- Commerce orders
operationId: list-commerce-orders
responses:
'200':
description: OK
content:
application/json:
x-speakeasy-usage-example: true
schema:
$ref: '#/components/schemas/CommerceOrders'
examples:
Amazon Seller Central:
value:
results:
- id: 902-1845936-5435065
orderNumber: 902-1845936-5435065
country: 'US '
currency: USD
createdDate: '1970-01-19T03:58:30Z'
totalAmount: 10
totalRefund: 0
totalTaxAmount: 1.01
totalDiscount: 0
totalGratuity: 0
orderLineItems:
- id: O05015851154158
quantity: 1
taxPercentage: 11.23
totalAmount: 10
totalTaxAmount: 1.01
unitPrice: 8.99
taxes: []
productVariantRef:
id: NABetaASINB00551Q3CS
discountAllocations: []
payments: []
serviceCharges: []
modifiedDate: '2023-01-09T09:12:12Z'
sourceModifiedDate: '1970-01-19T03:58:32Z'
pageNumber: 1
pageSize: 2
totalResults: 1
_links:
current:
href: /companies/6a59da96-e6d2-4c5c-ace7-65ba8be6a472/connections/58be1638-2c74-4ad4-8ff3-8c5b98b5f0fe/data/commerce-orders?page=1&pageSize=2
self:
href: /companies/6a59da96-e6d2-4c5c-ace7-65ba8be6a472/connections/58be1638-2c74-4ad4-8ff3-8c5b98b5f0fe/data/commerce-orders
BigCommerce:
value:
results:
- id: '100'
orderNumber: '100'
country: GBR
currency: GBP
createdDate: '2022-06-15T15:48:18Z'
totalAmount: 675
totalRefund: 0
totalTaxAmount: 112.5
totalDiscount: 10
totalGratuity: 0
orderLineItems:
- id: '1'
quantity: 1
taxPercentage: 20
totalAmount: 221.64
totalTaxAmount: 36.94
unitPrice: 187.5
taxes: []
productRef:
id: '86'
name: '[Sample] Able Brewing System'
productVariantRef:
id: '66'
name: '[Sample] Able Brewing System'
discountAllocations:
- name: Manual Discount
totalAmount: 3.36
- id: '2'
quantity: 5
taxPercentage: 19.9999
totalAmount: 438.36
totalTaxAmount: 73.06
unitPrice: 74.1667
taxes: []
productRef:
id: '81'
name: '[Sample] Orbit Terrarium - Small'
productVariantRef:
id: '65'
name: '[Sample] Orbit Terrarium - Small'
discountAllocations:
- name: Manual Discount
totalAmount: 6.64
payments: []
serviceCharges:
- description: Shipping Charge
totalAmount: 15
taxPercentage: 20
taxAmount: 2.5
taxes: []
quantity: 1
type: Shipping
customerRef:
id: '0'
modifiedDate: '2023-04-11T10:33:56Z'
sourceModifiedDate: '2022-06-15T15:48:18Z'
- id: '101'
orderNumber: '101'
country: GBR
currency: GBP
createdDate: '2022-06-15T15:49:02Z'
totalAmount: 675
totalRefund: 0
totalTaxAmount: 112.5
totalDiscount: 10
totalGratuity: 0
orderLineItems:
- id: '3'
quantity: 1
taxPercentage: 20
totalAmount: 221.64
totalTaxAmount: 36.94
unitPrice: 187.5
taxes: []
productRef:
id: '86'
name: '[Sample] Able Brewing System'
productVariantRef:
id: '66'
name: '[Sample] Able Brewing System'
discountAllocations:
- name: Manual Discount
totalAmount: 3.36
- id: '4'
quantity: 5
taxPercentage: 19.9999
totalAmount: 438.36
totalTaxAmount: 73.06
unitPrice: 74.1667
taxes: []
productRef:
id: '81'
name: '[Sample] Orbit Terrarium - Small'
productVariantRef:
id: '65'
name: '[Sample] Orbit Terrarium - Small'
discountAllocations:
- name: Manual Discount
totalAmount: 6.64
payments: []
serviceCharges:
- description: Shipping Charge
totalAmount: 15
taxPercentage: 20
taxAmount: 2.5
taxes: []
quantity: 1
type: Shipping
customerRef:
id: '0'
modifiedDate: '2023-04-11T10:33:56Z'
sourceModifiedDate: '2022-06-15T15:49:02Z'
pageNumber: 1
pageSize: 2
totalResults: 14
_links:
current:
href: /companies/d1ebcf6d-f7f9-4841-8a06-fec12c492a48/connections/7c0a21e8-938a-40a4-b0f7-5ab5d46804b0/data/commerce-orders?page=1&pageSize=2
self:
href: /companies/d1ebcf6d-f7f9-4841-8a06-fec12c492a48/connections/7c0a21e8-938a-40a4-b0f7-5ab5d46804b0/data/commerce-orders
next:
href: /companies/d1ebcf6d-f7f9-4841-8a06-fec12c492a48/connections/7c0a21e8-938a-40a4-b0f7-5ab5d46804b0/data/commerce-orders?page=2&pageSize=2
Clover:
value:
results:
- id: 0BCZPWGFC3M16
orderNumber: 0BCZPWGFC3M16
country: 'GB '
currency: GBP
createdDate: '2021-05-24T10:33:41Z'
totalAmount: 1200
totalRefund: 0
totalTaxAmount: 200
totalDiscount: 0
totalGratuity: 0
orderLineItems:
- id: 985WY5J4H12XY
quantity: 1
taxPercentage: 20
totalAmount: 1200
totalTaxAmount: 200
unitPrice: 1000
taxes:
- taxComponentRef:
id: KAWQTPZP3R9VT
name: VAT 20%
taxAmount: 200
productRef:
id: NMZHKK6FKF6ZJ
name: Laptop
discountAllocations: []
payments:
- id: S2D924NX13T2G
serviceCharges: []
locationRef:
id: GA3WP1ZC3ZFK1
name: Codat
modifiedDate: '2022-09-08T15:47:43Z'
sourceModifiedDate: '2021-05-24T10:33:45Z'
- id: 0G22TXMYQQE54
orderNumber: 0G22TXMYQQE54
country: 'GB '
currency: GBP
createdDate: '2021-05-24T11:24:48Z'
totalAmount: 1340
totalRefund: 0
totalTaxAmount: 240
totalDiscount: 100
totalGratuity: 0
orderLineItems:
- id: GZ73TPFAV6NTP
quantity: 1
taxPercentage: 20
totalAmount: 1440
totalTaxAmount: 240
unitPrice: 1200
taxes:
- taxComponentRef:
id: KAWQTPZP3R9VT
name: VAT 20%
taxAmount: 240
productRef:
id: QVAV6KM1457B0
name: Desktop
discountAllocations: []
- id: 'Discount: �10 off'
quantity: 1
taxPercentage: 0
totalAmount: -100
totalTaxAmount: 0
unitPrice: 0
taxes: []
discountAllocations:
- name: �10 off
totalAmount: 100
payments:
- id: H726AAJQYE3SP
serviceCharges: []
locationRef:
id: GA3WP1ZC3ZFK1
name: Codat
modifiedDate: '2022-09-08T15:47:43Z'
sourceModifiedDate: '2021-05-24T11:24:52Z'
pageNumber: 1
pageSize: 2
totalResults: 76
_links:
current:
href: /companies/1535235d-5efb-4d17-9d94-491c1f35ff92/connections/ed802898-f920-486b-b553-d7b4c1ac6c8d/data/commerce-orders?page=1&pageSize=2
self:
href: /companies/1535235d-5efb-4d17-9d94-491c1f35ff92/connections/ed802898-f920-486b-b553-d7b4c1ac6c8d/data/commerce-orders
next:
href: /companies/1535235d-5efb-4d17-9d94-491c1f35ff92/connections/ed802898-f920-486b-b553-d7b4c1ac6c8d/data/commerce-orders?page=2&pageSize=2
Lightspeed K Trial:
value:
results:
- id: A61465.1
orderNumber: A61465.1
country: 'AU '
currency: AUD
createdDate: '2022-12-09T02:27:14Z'
closedDate: '2022-12-09T02:27:46Z'
totalAmount: 5
totalRefund: 0
totalTaxAmount: 0.45
totalDiscount: 0
totalGratuity: 0
orderLineItems:
- id: S61465.1
quantity: 1
taxPercentage: 10
totalAmount: 5
totalTaxAmount: 0.45
unitPrice: 4.5455
taxes:
- taxComponentRef:
id: GST10
name: 10% GST
taxAmount: 0.45
productRef:
id: '647208621834617'
name: Hot Chocolate
discountAllocations: []
payments:
- id: 'R61465.1_1_A61465.1_2022-12-09T02:27:46.273Z'
amount: 5
currency: AUD
type: Unknown
status: Paid
dueDate: '0001-01-01T00:00:00'
createdDate: '2022-12-09T02:27:46'
modifiedDate: '2023-03-02T09:50:43'
serviceCharges: []
locationRef:
id: '647208621834538'
name: QA Shared - New Test Site
modifiedDate: '2023-03-08T13:49:34Z'
- id: A61465.2
orderNumber: A61465.2
country: 'AU '
currency: AUD
createdDate: '2022-12-12T23:20:12Z'
closedDate: '2022-12-12T23:21:29Z'
totalAmount: 10
totalRefund: 0
totalTaxAmount: 0.91
totalDiscount: 0
totalGratuity: 0
orderLineItems:
- id: S61465.2
quantity: 1
taxPercentage: 10
totalAmount: 5
totalTaxAmount: 0.46
unitPrice: 4.5455
taxes:
- taxComponentRef:
id: GST10
name: 10% GST
taxAmount: 0.46
productRef:
id: '647208621834663'
name: Royal
discountAllocations: []
- id: S61465.3
quantity: 1
taxPercentage: 10
totalAmount: 5
totalTaxAmount: 0.45
unitPrice: 4.5455
taxes:
- taxComponentRef:
id: GST10
name: 10% GST
taxAmount: 0.45
productRef:
id: '647208621834623'
name: Mocha
discountAllocations: []
payments:
- id: 'R61465.2_1_A61465.2_2022-12-12T23:21:29.006Z'
amount: 10
currency: AUD
type: Unknown
status: Paid
dueDate: '0001-01-01T00:00:00'
createdDate: '2022-12-12T23:21:29'
modifiedDate: '2023-03-02T09:50:43'
serviceCharges: []
locationRef:
id: '647208621834538'
name: QA Shared - New Test Site
modifiedDate: '2023-03-08T13:49:34Z'
pageNumber: 1
pageSize: 2
totalResults: 24
_links:
current:
href: /companies/36e3213b-02f6-4264-96ce-6dd53ea69e57/connections/278ba962-466a-452b-92b0-4bdee3a23463/data/commerce-orders?page=1&pageSize=2
self:
href: /companies/36e3213b-02f6-4264-96ce-6dd53ea69e57/connections/278ba962-466a-452b-92b0-4bdee3a23463/data/commerce-orders
next:
href: /companies/36e3213b-02f6-4264-96ce-6dd53ea69e57/connections/278ba962-466a-452b-92b0-4bdee3a23463/data/commerce-orders?page=2&pageSize=2
Mollie:
value:
results:
- id: ord_2at3ck
orderNumber: '1337'
country: NLD
currency: EUR
createdDate: '2022-01-20T09:28:32'
totalAmount: 1027.99
totalRefund: 0
totalTaxAmount: 178.41
totalDiscount: 100
totalGratuity: 0
orderLineItems:
- id: odl_1.3tvc32
quantity: 1
taxPercentage: 21
totalAmount: 329.99
totalTaxAmount: 57.27
unitPrice: 329.99
taxes: []
discountAllocations: []
- id: odl_1.x95vuk
quantity: 2
taxPercentage: 21
totalAmount: 698
totalTaxAmount: 121.14
unitPrice: 399
taxes: []
discountAllocations:
- name: Discount
totalAmount: 100
payments:
- id: tr_GpHuaqHrca
amount: 1027.99
currency: EUR
type: OnlineCard
status: Failed
dueDate: '0001-01-01T00:00:00'
createdDate: '2022-02-08T15:44:22'
modifiedDate: '2022-03-17T15:47:28'
sourceModifiedDate: '2022-02-08T16:02:02'
- id: tr_w7RGQc3k3V
amount: 1027.99
currency: EUR
type: OnlineCard
status: Failed
dueDate: '0001-01-01T00:00:00'
createdDate: '2022-01-20T09:28:32'
modifiedDate: '2022-03-17T15:47:28'
sourceModifiedDate: '2022-01-20T09:46:02'
serviceCharges: []
modifiedDate: '2022-03-17T15:47:28Z'
pageNumber: 1
pageSize: 2
totalResults: 1
_links:
current:
href: /companies/a68cb447-182d-4bbe-be1a-f526d11d69d5/connections/dfbf847b-cde8-4b00-b2f9-af51dec0d337/data/commerce-orders?page=1&pageSize=2
self:
href: /companies/a68cb447-182d-4bbe-be1a-f526d11d69d5/connections/dfbf847b-cde8-4b00-b2f9-af51dec0d337/data/commerce-orders
Mollie Test:
value:
results:
- id: ord_2at3ck
orderNumber: '1337'
country: NLD
currency: EUR
createdDate: '2022-01-20T09:28:32'
totalAmount: 1027.99
totalRefund: 0
totalTaxAmount: 178.41
totalDiscount: 100
totalGratuity: 0
orderLineItems:
- id: odl_1.x95vuk
quantity: 2
taxPercentage: 21
totalAmount: 698
totalTaxAmount: 121.14
unitPrice: 338.43
taxes: []
discountAllocations:
- name: Discount
totalAmount: 100
- id: odl_1.3tvc32
quantity: 1
taxPercentage: 21
totalAmount: 329.99
totalTaxAmount: 57.27
unitPrice: 272.72
taxes: []
discountAllocations: []
payments:
- id: tr_GpHuaqHrca
- id: tr_w7RGQc3k3V
serviceCharges: []
modifiedDate: '2022-08-17T11:33:19Z'
pageNumber: 1
pageSize: 2
totalResults: 1
_links:
current:
href: /companies/b978f9fe-8d63-4cfc-b2c2-b61b72e22785/connections/d564f8fd-0766-4ab8-a427-7c893f9b9ff6/data/commerce-orders?page=1&pageSize=2
self:
href: /companies/b978f9fe-8d63-4cfc-b2c2-b61b72e22785/connections/d564f8fd-0766-4ab8-a427-7c893f9b9ff6/data/commerce-orders
Partner Commerce:
value:
results:
- id: 6d135134-2f77-45f7-af3d-ee873e42da45
orderNumber: '93128704'
country: 'GM '
currency: CAD
createdDate: '2021-02-10T01:37:23'
totalAmount: 203.82
totalRefund: 0
totalTaxAmount: 40.77
totalDiscount: 25.63
totalGratuity: 80.81
orderLineItems:
- id: 89f5e83a-c87d-4b60-a009-0ea9065867aa
quantity: 3
taxPercentage: 20
totalAmount: 85.44
totalTaxAmount: 17.09
unitPrice: 28.48
taxes: []
productRef:
id: 98ef828e-33e1-4c23-9383-a029f1d6a3a6
productVariantRef:
id: dffcd99e-13bb-4b89-89ef-719b3b0777e6
discountAllocations:
- name: Discount
totalAmount: 8.54
- name: Discount
totalAmount: 17.09
- id: 4c65f0d9-05c8-48eb-9c4a-1774f5073e66
quantity: 3
taxPercentage: 20
totalAmount: 118.38
totalTaxAmount: 23.68
unitPrice: 39.46
taxes: []
productRef:
id: 561f8efb-3429-4c1f-a014-1fa595f9b3c6
productVariantRef:
id: e0715a7a-0179-4a2e-b40d-800fd2f36764
discountAllocations: []
payments:
- id: 3ec3d4c4-8003-4f77-a44e-08b3e17057bf
serviceCharges: []
locationRef:
id: d84a8ce0-d7e4-400a-b07a-d4bddd9c1873
customerRef:
id: 0dc0206d-f22f-48c9-a4e5-79f8383c3426
modifiedDate: '2022-05-12T07:22:02Z'
sourceModifiedDate: '2021-02-10T01:37:23'
pageNumber: 1
pageSize: 2
totalResults: 1
_links:
current:
href: /companies/4342cb7d-d7b1-492f-851e-4aa5084933c1/connections/9e5422fa-f03f-4d58-bcf4-161b574ab350/data/commerce-orders?page=1&pageSize=2
self:
href: /companies/4342cb7d-d7b1-492f-851e-4aa5084933c1/connections/9e5422fa-f03f-4d58-bcf4-161b574ab350/data/commerce-orders
PrestaShop:
value:
results:
- id: '1'
orderNumber: XKBKNABJK
country: 'US '
currency: USD
createdDate: '2021-09-02T06:00:54'
totalAmount: 61.8
totalRefund: 0
totalTaxAmount: 0
totalDiscount: 0
totalGratuity: 0
orderLineItems:
- id: '1'
quantity: 1
taxPercentage: 0
totalAmount: 23.9
totalTaxAmount: 0
unitPrice: 23.9
taxes: []
productRef:
id: '1'
name: Hummingbird printed t-shirt
discountAllocations: []
- id: '2'
quantity: 1
taxPercentage: 0
totalAmount: 35.9
totalTaxAmount: 0
unitPrice: 35.9
taxes: []
productRef:
id: '2'
name: Hummingbird printed sweater
discountAllocations: []
payments: []
serviceCharges:
- description: Shipping
totalAmount: 2
taxPercentage: 0
taxAmount: 0
taxes: []
quantity: 1
type: Shipping
customerRef:
id: '1'
name: John DOE
modifiedDate: '2022-01-26T15:09:42Z'
sourceModifiedDate: '2021-09-02T06:00:54'
- id: '10'
orderNumber: UFQZXPGQU
country: 'US '
currency: USD
createdDate: '2021-09-28T08:09:46'
totalAmount: 19.12
totalRefund: 0
totalTaxAmount: 0
totalDiscount: 4.78
totalGratuity: 0
orderLineItems:
- id: '14'
quantity: 1
taxPercentage: 0
totalAmount: 19.12
totalTaxAmount: 0
unitPrice: 23.9
taxes: []
productRef:
id: '1'
name: Hummingbird printed t-shirt
discountAllocations:
- name: 20% Discount
totalAmount: 4.78
payments: []
serviceCharges: []
customerRef:
id: '5'
name: Tobi Yinusa
modifiedDate: '2022-01-26T15:09:42Z'
sourceModifiedDate: '2021-09-28T08:09:46'
pageNumber: 1
pageSize: 2
totalResults: 10
_links:
current:
href: /companies/2bf78e61-58ca-421a-a430-5dfa59cf15b0/connections/30774c1f-fdcd-491e-9e60-47e316b3ab9b/data/commerce-orders?page=1&pageSize=2
self:
href: /companies/2bf78e61-58ca-421a-a430-5dfa59cf15b0/connections/30774c1f-fdcd-491e-9e60-47e316b3ab9b/data/commerce-orders
next:
href: /companies/2bf78e61-58ca-421a-a430-5dfa59cf15b0/connections/30774c1f-fdcd-491e-9e60-47e316b3ab9b/data/commerce-orders?page=2&pageSize=2
Shopify:
value:
results:
- id: '3684119445662'
orderNumber: '1007'
country: XXX
currency: GBP
createdDate: '2021-03-19T13:18:33'
totalAmount: 600
totalRefund: 0
totalTaxAmount: 0
totalDiscount: 0
totalGratuity: 0
orderLineItems:
- id: '9670458146974'
quantity: 4
taxPercentage: 0
totalAmount: 600
totalTaxAmount: 0
unitPrice: 150
taxes: []
productRef:
id: '6595494117534'
name: Monitor
productVariantRef:
id: '39444526694558'
name: Monitor
discountAllocations: []
payments:
- id: '4630233579678'
amount: 600
currency: GBP
type: OnlineCard
status: Failed
paymentProvider: Shopify Payments
dueDate: '0001-01-01T00:00:00'
createdDate: '2021-03-19T13:17:49'
modifiedDate: '2023-02-10T15:18:24'
sourceModifiedDate: '2021-03-19T13:17:49'
- id: '4630234497182'
amount: 600
currency: GBP
type: OnlineCard
status: Paid
paymentProvider: Shopify Payments
dueDate: '0001-01-01T00:00:00'
createdDate: '2021-03-19T13:18:29'
modifiedDate: '2023-02-10T15:18:24'
sourceModifiedDate: '2021-03-19T13:18:29'
serviceCharges: []
customerRef:
id: '5097398534302'
name: Qa Test
modifiedDate: '2023-02-10T15:18:24Z'
sourceModifiedDate: '2022-08-01T13:12:35'
- id: '3684180361374'
orderNumber: '1011'
country: XXX
currency: GBP
createdDate: '2021-03-19T13:57:30'
totalAmount: 105
totalRefund: 0
totalTaxAmount: 0
totalDiscount: 0
totalGratuity: 0
orderLineItems:
- id: '9670570901662'
quantity: 3
taxPercentage: 0
totalAmount: 105
totalTaxAmount: 0
unitPrice: 35
taxes: []
productRef:
id: '6595497787550'
name: Keyboard
productVariantRef:
id: '39444537213086'
name: Keyboard
discountAllocations: []
payments:
- id: '4630311108766'
amount: 105
currency: GBP
type: Unknown
status: Paid
paymentProvider: Manual
dueDate: '0001-01-01T00:00:00'
createdDate: '2021-03-19T13:57:30'
modifiedDate: '2023-02-10T15:18:24'
sourceModifiedDate: '2021-03-19T13:57:30'
serviceCharges: []
customerRef:
id: '5097398534302'
name: Qa Test
modifiedDate: '2023-02-10T15:18:24Z'
sourceModifiedDate: '2022-08-01T13:12:35'
pageNumber: 1
pageSize: 2
totalResults: 30
_links:
current:
href: /companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-orders?page=1&pageSize=2
self:
href: /companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-orders
next:
href: /companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-orders?page=2&pageSize=2
Square:
value:
results:
- id: BDYNvtIYyWClkTjnh99CFR3fPwKZY
orderNumber: BDYNvtIYyWClkTjnh99CFR3fPwKZY
country: 'GB '
currency: GBP
createdDate: '2021-02-14T19:38:28Z'
closedDate: '0001-01-01T00:00:00'
totalAmount: 50
totalRefund: 0
totalTaxAmount: 0
totalDiscount: 0
totalGratuity: 0
orderLineItems:
- id: lLJpgArKQbBEn9nTvLRHP
quantity: 1
taxPercentage: 0
totalAmount: 50
totalTaxAmount: 0
unitPrice: 50
taxes: []
discountAllocations: []
payments: []
serviceCharges: []
locationRef:
id: D8DVHD1G6NT2J
name: Codat Limited
modifiedDate: '2022-08-02T10:27:33Z'
sourceModifiedDate: '2021-02-14T19:38:28Z'
pageNumber: 1
pageSize: 2
totalResults: 1
_links:
current:
href: /companies/d779fc82-a098-4107-a9fc-c2a1dda3d522/connections/9b098b74-3770-4dad-9001-4c283a39f1e5/data/commerce-orders?page=1&pageSize=2
self:
href: /companies/d779fc82-a098-4107-a9fc-c2a1dda3d522/connections/9b098b74-3770-4dad-9001-4c283a39f1e5/data/commerce-orders
SumUp:
value:
results:
- id: 07efcdd0-7f61-4d82-957f-52e8f0bd3f89
orderNumber: TECXTU2KT6
country: XXX
currency: GBP
createdDate: '2021-03-30T12:20:40Z'
totalAmount: 200
totalRefund: 0
totalTaxAmount: 0
totalDiscount: 0
totalGratuity: 0
orderLineItems:
- id: Product undefined by SumUp
quantity: 1
taxPercentage: 0
totalAmount: 200
totalTaxAmount: 0
unitPrice: 200
taxes: []
discountAllocations: []
payments:
- id: 07efcdd0-7f61-4d82-957f-52e8f0bd3f89
serviceCharges: []
modifiedDate: '2022-09-14T10:58:04Z'
- id: 46d36a64-ea48-4e37-9340-3548cbf3ca2f
orderNumber: TNEU7333HZ
country: XXX
currency: GBP
createdDate: '2021-03-26T21:09:59Z'
totalAmount: 15
totalRefund: 0
totalTaxAmount: 0
totalDiscount: 0
totalGratuity: 0
orderLineItems:
- id: Sale of some product
quantity: 1
taxPercentage: 0
totalAmount: 15
totalTaxAmount: 0
unitPrice: 15
taxes: []
discountAllocations: []
payments:
- id: 46d36a64-ea48-4e37-9340-3548cbf3ca2f
serviceCharges: []
modifiedDate: '2022-09-14T10:58:04Z'
pageNumber: 1
pageSize: 2
totalResults: 6
_links:
current:
href: /companies/e170dbe2-be50-474f-b449-82add37108de/connections/1e631dd5-a30b-4bad-ad5c-315c9743535b/data/commerce-orders?page=1&pageSize=2
self:
href: /companies/e170dbe2-be50-474f-b449-82add37108de/connections/1e631dd5-a30b-4bad-ad5c-315c9743535b/data/commerce-orders
next:
href: /companies/e170dbe2-be50-474f-b449-82add37108de/connections/1e631dd5-a30b-4bad-ad5c-315c9743535b/data/commerce-orders?page=2&pageSize=2
WooCommerce:
value:
results:
- id: '111'
orderNumber: '111'
country: 'GB '
currency: GBP
createdDate: '2021-03-27T23:29:38Z'
totalAmount: 39.5
totalRefund: 0
totalTaxAmount: 6
totalDiscount: 0
totalGratuity: 0
orderLineItems:
- id: '53'
quantity: 2
taxPercentage: 20
totalAmount: 12
totalTaxAmount: 2
unitPrice: 5
taxes: []
productRef:
id: '82'
discountAllocations: []
- id: '54'
quantity: 2
taxPercentage: 20
totalAmount: 24
totalTaxAmount: 4
unitPrice: 10
taxes: []
productRef:
id: '81'
discountAllocations: []
payments: []
serviceCharges:
- description: Royal Mail
totalAmount: 3.5
taxPercentage: 0
taxAmount: 0
taxes: []
quantity: 1
type: Shipping
customerRef:
id: '200585744'
modifiedDate: '2022-07-11T15:35:48Z'
sourceModifiedDate: '2021-04-01T13:34:59Z'
- id: '145'
orderNumber: '145'
country: 'GB '
currency: GBP
createdDate: '2021-09-24T12:15:29Z'
totalAmount: 27.5
totalRefund: 0
totalTaxAmount: 5.5
totalDiscount: 0
totalGratuity: 0
orderLineItems:
- id: '59'
quantity: 2
taxPercentage: 25
totalAmount: 27.5
totalTaxAmount: 5.5
unitPrice: 11
taxes: []
productRef:
id: '87'
discountAllocations: []
payments: []
serviceCharges: []
modifiedDate: '2022-07-11T15:35:48Z'
sourceModifiedDate: '2022-03-24T16:01:23Z'
pageNumber: 1
pageSize: 2
totalResults: 25
_links:
current:
href: /companies/00396b78-7113-4b1f-996f-4c561b00573a/connections/b39ed7d6-5eda-44c5-85bb-647d03edd649/data/commerce-orders?page=1&pageSize=2
self:
href: /companies/00396b78-7113-4b1f-996f-4c561b00573a/connections/b39ed7d6-5eda-44c5-85bb-647d03edd649/data/commerce-orders
next:
href: /companies/00396b78-7113-4b1f-996f-4c561b00573a/connections/b39ed7d6-5eda-44c5-85bb-647d03edd649/data/commerce-orders?page=2&pageSize=2
Zettle:
value:
results:
- id: 7TunRi2XEeueVK3fSQEQIw
orderNumber: '3'
country: 'GB '
currency: GBP
createdDate: '2020-11-23T14:27:20Z'
totalAmount: 45
totalRefund: 0
totalTaxAmount: 0
totalDiscount: 0
totalGratuity: 0
orderLineItems:
- id: '0'
quantity: 1
taxPercentage: 0
totalAmount: 45
totalTaxAmount: 0
unitPrice: 45
taxes: []
productRef:
id: 7f9f31e4-2d97-11eb-9f55-acde48001122
productVariantRef:
id: 7f9f35ea-2d97-11eb-9f55-acde48001122
discountAllocations: []
payments:
- id: ed97bcde-2d97-11eb-a42e-25130f2dd258
amount: 45
currency: GBP
type: Paypal
status: Unknown
dueDate: '0001-01-01T00:00:00'
createdDate: '2020-11-23T14:27:19'
modifiedDate: '2021-10-27T15:22:37'
serviceCharges: []
modifiedDate: '2021-10-27T15:22:37Z'
sourceModifiedDate: '2020-11-23T14:27:20Z'
- id: CV5TJC2YEeueVK3fSQEQIw
orderNumber: '4'
country: 'GB '
currency: GBP
createdDate: '2020-11-23T14:28:05Z'
totalAmount: 25
totalRefund: 0
totalTaxAmount: 1.19
totalDiscount: 0
totalGratuity: 0
orderLineItems:
- id: '0'
quantity: 1
taxPercentage: 5
totalAmount: 25
totalTaxAmount: 1.19
unitPrice: 23.81
taxes: []
productRef:
id: 89570bee-2d97-11eb-9f55-acde48001122
productVariantRef:
id: 89570c52-2d97-11eb-9f55-acde48001122
discountAllocations: []
payments:
- id: 09b94cfc-2d98-11eb-8021-0e1b9dcbeca1
amount: 25
currency: GBP
type: Paypal
status: Unknown
dueDate: '0001-01-01T00:00:00'
createdDate: '2020-11-23T14:28:04'
modifiedDate: '2021-10-27T15:22:37'
serviceCharges: []
modifiedDate: '2021-10-27T15:22:37Z'
sourceModifiedDate: '2020-11-23T14:28:05Z'
pageNumber: 1
pageSize: 2
totalResults: 6
_links:
current:
href: /companies/9d448ad0-4508-47fc-bd3b-6950493151f1/connections/c7baa8da-3302-464b-8aa1-edcd4c900902/data/commerce-orders?page=1&pageSize=2
self:
href: /companies/9d448ad0-4508-47fc-bd3b-6950493151f1/connections/c7baa8da-3302-464b-8aa1-edcd4c900902/data/commerce-orders
next:
href: /companies/9d448ad0-4508-47fc-bd3b-6950493151f1/connections/c7baa8da-3302-464b-8aa1-edcd4c900902/data/commerce-orders?page=2&pageSize=2
'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'
'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 orders* endpoint returns a list of [orders](https://docs.codat.io/commerce-api#/schemas/Order) for a given company's connection.
[Orders](https://docs.codat.io/commerce-api#/schemas/Order) contain the transaction details for all products sold by the company.
Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-commerce-v1-api#/operations/refresh-company-data).
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/pageSize'
- $ref: '#/components/parameters/query'
- $ref: '#/components/parameters/orderBy'
'/companies/{companyId}/connections/{connectionId}/data/commerce-orders/{orderId}':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
- name: orderId
in: path
required: true
schema:
type: string
examples:
$ref: '#/components/schemas/CommerceOrder/allOf/0/properties/id/examples'
description: Unique identifier for an order.
get:
summary: Get order
tags:
- Commerce orders
operationId: get-commerce-order
responses:
'200':
description: OK
content:
application/json:
x-speakeasy-usage-example: true
schema:
$ref: '#/components/schemas/CommerceOrder'
examples:
Amazon Seller Central:
value:
id: 902-1845936-5435065
orderNumber: 902-1845936-5435065
country: 'US '
currency: USD
createdDate: '1970-01-19T03:58:30Z'
totalAmount: 10
totalRefund: 0
totalTaxAmount: 1.01
totalDiscount: 0
totalGratuity: 0
orderLineItems:
- id: O05015851154158
quantity: 1
taxPercentage: 11.23
totalAmount: 10
totalTaxAmount: 1.01
unitPrice: 8.99
taxes: []
productVariantRef:
id: NABetaASINB00551Q3CS
discountAllocations: []
payments: []
serviceCharges: []
modifiedDate: '2023-01-09T09:12:12Z'
sourceModifiedDate: '1970-01-19T03:58:32Z'
BigCommerce:
value:
id: '100'
orderNumber: '100'
country: GBR
currency: GBP
createdDate: '2022-06-15T15:48:18Z'
totalAmount: 675
totalRefund: 0
totalTaxAmount: 112.5
totalDiscount: 10
totalGratuity: 0
orderLineItems:
- id: '1'
quantity: 1
taxPercentage: 20
totalAmount: 221.64
totalTaxAmount: 36.94
unitPrice: 187.5
taxes: []
productRef:
id: '86'
name: '[Sample] Able Brewing System'
productVariantRef:
id: '66'
name: '[Sample] Able Brewing System'
discountAllocations:
- name: Manual Discount
totalAmount: 3.36
- id: '2'
quantity: 5
taxPercentage: 19.9999
totalAmount: 438.36
totalTaxAmount: 73.06
unitPrice: 74.1667
taxes: []
productRef:
id: '81'
name: '[Sample] Orbit Terrarium - Small'
productVariantRef:
id: '65'
name: '[Sample] Orbit Terrarium - Small'
discountAllocations:
- name: Manual Discount
totalAmount: 6.64
payments: []
serviceCharges:
- description: Shipping Charge
totalAmount: 15
taxPercentage: 20
taxAmount: 2.5
taxes: []
quantity: 1
type: Shipping
customerRef:
id: '0'
modifiedDate: '2023-04-11T10:33:56Z'
sourceModifiedDate: '2022-06-15T15:48:18Z'
Clover:
value:
id: 0BCZPWGFC3M16
orderNumber: 0BCZPWGFC3M16
country: 'GB '
currency: GBP
createdDate: '2021-05-24T10:33:41Z'
totalAmount: 1200
totalRefund: 0
totalTaxAmount: 200
totalDiscount: 0
totalGratuity: 0
orderLineItems:
- id: 985WY5J4H12XY
quantity: 1
taxPercentage: 20
totalAmount: 1200
totalTaxAmount: 200
unitPrice: 1000
taxes:
- taxComponentRef:
id: KAWQTPZP3R9VT
name: VAT 20%
taxAmount: 200
productRef:
id: NMZHKK6FKF6ZJ
name: Laptop
discountAllocations: []
payments:
- id: S2D924NX13T2G
serviceCharges: []
locationRef:
id: GA3WP1ZC3ZFK1
name: Codat
modifiedDate: '2022-09-08T15:47:43Z'
sourceModifiedDate: '2021-05-24T10:33:45Z'
Lightspeed K Trial:
value:
id: A61465.1
orderNumber: A61465.1
country: 'AU '
currency: AUD
createdDate: '2022-12-09T02:27:14Z'
closedDate: '2022-12-09T02:27:46Z'
totalAmount: 5
totalRefund: 0
totalTaxAmount: 0.45
totalDiscount: 0
totalGratuity: 0
orderLineItems:
- id: S61465.1
quantity: 1
taxPercentage: 10
totalAmount: 5
totalTaxAmount: 0.45
unitPrice: 4.5455
taxes:
- taxComponentRef:
id: GST10
name: 10% GST
taxAmount: 0.45
productRef:
id: '647208621834617'
name: Hot Chocolate
discountAllocations: []
payments:
- id: 'R61465.1_1_A61465.1_2022-12-09T02:27:46.273Z'
amount: 5
currency: AUD
type: Unknown
status: Paid
dueDate: '0001-01-01T00:00:00'
createdDate: '2022-12-09T02:27:46'
modifiedDate: '2023-03-02T09:50:43'
serviceCharges: []
locationRef:
id: '647208621834538'
name: QA Shared - New Test Site
modifiedDate: '2023-03-08T13:49:34Z'
Mollie:
value:
id: ord_2at3ck
orderNumber: '1337'
country: NLD
currency: EUR
createdDate: '2022-01-20T09:28:32'
totalAmount: 1027.99
totalRefund: 0
totalTaxAmount: 178.41
totalDiscount: 100
totalGratuity: 0
orderLineItems:
- id: odl_1.3tvc32
quantity: 1
taxPercentage: 21
totalAmount: 329.99
totalTaxAmount: 57.27
unitPrice: 329.99
taxes: []
discountAllocations: []
- id: odl_1.x95vuk
quantity: 2
taxPercentage: 21
totalAmount: 698
totalTaxAmount: 121.14
unitPrice: 399
taxes: []
discountAllocations:
- name: Discount
totalAmount: 100
payments:
- id: tr_GpHuaqHrca
amount: 1027.99
currency: EUR
type: OnlineCard
status: Failed
dueDate: '0001-01-01T00:00:00'
createdDate: '2022-02-08T15:44:22'
modifiedDate: '2022-03-17T15:47:28'
sourceModifiedDate: '2022-02-08T16:02:02'
- id: tr_w7RGQc3k3V
amount: 1027.99
currency: EUR
type: OnlineCard
status: Failed
dueDate: '0001-01-01T00:00:00'
createdDate: '2022-01-20T09:28:32'
modifiedDate: '2022-03-17T15:47:28'
sourceModifiedDate: '2022-01-20T09:46:02'
serviceCharges: []
modifiedDate: '2022-03-17T15:47:28Z'
Mollie Test:
value:
id: ord_2at3ck
orderNumber: '1337'
country: NLD
currency: EUR
createdDate: '2022-01-20T09:28:32'
totalAmount: 1027.99
totalRefund: 0
totalTaxAmount: 178.41
totalDiscount: 100
totalGratuity: 0
orderLineItems:
- id: odl_1.x95vuk
quantity: 2
taxPercentage: 21
totalAmount: 698
totalTaxAmount: 121.14
unitPrice: 338.43
taxes: []
discountAllocations:
- name: Discount
totalAmount: 100
- id: odl_1.3tvc32
quantity: 1
taxPercentage: 21
totalAmount: 329.99
totalTaxAmount: 57.27
unitPrice: 272.72
taxes: []
discountAllocations: []
payments:
- id: tr_GpHuaqHrca
- id: tr_w7RGQc3k3V
serviceCharges: []
modifiedDate: '2022-08-17T11:33:19Z'
Partner Commerce:
value:
id: 6d135134-2f77-45f7-af3d-ee873e42da45
orderNumber: '93128704'
country: 'GM '
currency: CAD
createdDate: '2021-02-10T01:37:23'
totalAmount: 203.82
totalRefund: 0
totalTaxAmount: 40.77
totalDiscount: 25.63
totalGratuity: 80.81
orderLineItems:
- id: 89f5e83a-c87d-4b60-a009-0ea9065867aa
quantity: 3
taxPercentage: 20
totalAmount: 85.44
totalTaxAmount: 17.09
unitPrice: 28.48
taxes: []
productRef:
id: 98ef828e-33e1-4c23-9383-a029f1d6a3a6
productVariantRef:
id: dffcd99e-13bb-4b89-89ef-719b3b0777e6
discountAllocations:
- name: Discount
totalAmount: 8.54
- name: Discount
totalAmount: 17.09
- id: 4c65f0d9-05c8-48eb-9c4a-1774f5073e66
quantity: 3
taxPercentage: 20
totalAmount: 118.38
totalTaxAmount: 23.68
unitPrice: 39.46
taxes: []
productRef:
id: 561f8efb-3429-4c1f-a014-1fa595f9b3c6
productVariantRef:
id: e0715a7a-0179-4a2e-b40d-800fd2f36764
discountAllocations: []
payments:
- id: 3ec3d4c4-8003-4f77-a44e-08b3e17057bf
serviceCharges: []
locationRef:
id: d84a8ce0-d7e4-400a-b07a-d4bddd9c1873
customerRef:
id: 0dc0206d-f22f-48c9-a4e5-79f8383c3426
modifiedDate: '2022-05-12T07:22:02Z'
sourceModifiedDate: '2021-02-10T01:37:23'
PrestaShop:
value:
id: '1'
orderNumber: XKBKNABJK
country: 'US '
currency: USD
createdDate: '2021-09-02T06:00:54'
totalAmount: 61.8
totalRefund: 0
totalTaxAmount: 0
totalDiscount: 0
totalGratuity: 0
orderLineItems:
- id: '1'
quantity: 1
taxPercentage: 0
totalAmount: 23.9
totalTaxAmount: 0
unitPrice: 23.9
taxes: []
productRef:
id: '1'
name: Hummingbird printed t-shirt
discountAllocations: []
- id: '2'
quantity: 1
taxPercentage: 0
totalAmount: 35.9
totalTaxAmount: 0
unitPrice: 35.9
taxes: []
productRef:
id: '2'
name: Hummingbird printed sweater
discountAllocations: []
payments: []
serviceCharges:
- description: Shipping
totalAmount: 2
taxPercentage: 0
taxAmount: 0
taxes: []
quantity: 1
type: Shipping
customerRef:
id: '1'
name: John DOE
modifiedDate: '2022-01-26T15:09:42Z'
sourceModifiedDate: '2021-09-02T06:00:54'
Shopify:
value:
id: '3684119445662'
orderNumber: '1007'
country: XXX
currency: GBP
createdDate: '2021-03-19T13:18:33'
totalAmount: 600
totalRefund: 0
totalTaxAmount: 0
totalDiscount: 0
totalGratuity: 0
orderLineItems:
- id: '9670458146974'
quantity: 4
taxPercentage: 0
totalAmount: 600
totalTaxAmount: 0
unitPrice: 150
taxes: []
productRef:
id: '6595494117534'
name: Monitor
productVariantRef:
id: '39444526694558'
name: Monitor
discountAllocations: []
payments:
- id: '4630233579678'
amount: 600
currency: GBP
type: OnlineCard
status: Failed
paymentProvider: Shopify Payments
dueDate: '0001-01-01T00:00:00'
createdDate: '2021-03-19T13:17:49'
modifiedDate: '2023-02-10T15:18:24'
sourceModifiedDate: '2021-03-19T13:17:49'
- id: '4630234497182'
amount: 600
currency: GBP
type: OnlineCard
status: Paid
paymentProvider: Shopify Payments
dueDate: '0001-01-01T00:00:00'
createdDate: '2021-03-19T13:18:29'
modifiedDate: '2023-02-10T15:18:24'
sourceModifiedDate: '2021-03-19T13:18:29'
serviceCharges: []
customerRef:
id: '5097398534302'
name: Qa Test
modifiedDate: '2023-02-10T15:18:24Z'
sourceModifiedDate: '2022-08-01T13:12:35'
Square:
value:
id: BDYNvtIYyWClkTjnh99CFR3fPwKZY
orderNumber: BDYNvtIYyWClkTjnh99CFR3fPwKZY
country: 'GB '
currency: GBP
createdDate: '2021-02-14T19:38:28Z'
closedDate: '0001-01-01T00:00:00'
totalAmount: 50
totalRefund: 0
totalTaxAmount: 0
totalDiscount: 0
totalGratuity: 0
orderLineItems:
- id: lLJpgArKQbBEn9nTvLRHP
quantity: 1
taxPercentage: 0
totalAmount: 50
totalTaxAmount: 0
unitPrice: 50
taxes: []
discountAllocations: []
payments: []
serviceCharges: []
locationRef:
id: D8DVHD1G6NT2J
name: Codat Limited
modifiedDate: '2022-08-02T10:27:33Z'
sourceModifiedDate: '2021-02-14T19:38:28Z'
SumUp:
value:
id: 07efcdd0-7f61-4d82-957f-52e8f0bd3f89
orderNumber: TECXTU2KT6
country: XXX
currency: GBP
createdDate: '2021-03-30T12:20:40Z'
totalAmount: 200
totalRefund: 0
totalTaxAmount: 0
totalDiscount: 0
totalGratuity: 0
orderLineItems:
- id: Product undefined by SumUp
quantity: 1
taxPercentage: 0
totalAmount: 200
totalTaxAmount: 0
unitPrice: 200
taxes: []
discountAllocations: []
payments:
- id: 07efcdd0-7f61-4d82-957f-52e8f0bd3f89
serviceCharges: []
modifiedDate: '2022-09-14T10:58:04Z'
WooCommerce:
value:
id: '111'
orderNumber: '111'
country: 'GB '
currency: GBP
createdDate: '2021-03-27T23:29:38Z'
totalAmount: 39.5
totalRefund: 0
totalTaxAmount: 6
totalDiscount: 0
totalGratuity: 0
orderLineItems:
- id: '53'
quantity: 2
taxPercentage: 20
totalAmount: 12
totalTaxAmount: 2
unitPrice: 5
taxes: []
productRef:
id: '82'
discountAllocations: []
- id: '54'
quantity: 2
taxPercentage: 20
totalAmount: 24
totalTaxAmount: 4
unitPrice: 10
taxes: []
productRef:
id: '81'
discountAllocations: []
payments: []
serviceCharges:
- description: Royal Mail
totalAmount: 3.5
taxPercentage: 0
taxAmount: 0
taxes: []
quantity: 1
type: Shipping
customerRef:
id: '200585744'
modifiedDate: '2022-07-11T15:35:48Z'
sourceModifiedDate: '2021-04-01T13:34:59Z'
Zettle:
value:
id: 7TunRi2XEeueVK3fSQEQIw
orderNumber: '3'
country: 'GB '
currency: GBP
createdDate: '2020-11-23T14:27:20Z'
totalAmount: 45
totalRefund: 0
totalTaxAmount: 0
totalDiscount: 0
totalGratuity: 0
orderLineItems:
- id: '0'
quantity: 1
taxPercentage: 0
totalAmount: 45
totalTaxAmount: 0
unitPrice: 45
taxes: []
productRef:
id: 7f9f31e4-2d97-11eb-9f55-acde48001122
productVariantRef:
id: 7f9f35ea-2d97-11eb-9f55-acde48001122
discountAllocations: []
payments:
- id: ed97bcde-2d97-11eb-a42e-25130f2dd258
amount: 45
currency: GBP
type: Paypal
status: Unknown
dueDate: '0001-01-01T00:00:00'
createdDate: '2020-11-23T14:27:19'
modifiedDate: '2021-10-27T15:22:37'
serviceCharges: []
modifiedDate: '2021-10-27T15:22:37Z'
sourceModifiedDate: '2020-11-23T14:27:20Z'
'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'
description: |
The *Get order* endpoint returns a single order for a given orderId.
[Orders](https://docs.codat.io/commerce-api#/schemas/Order) contain the transaction details for all products sold by the company.
Check out our [coverage explorer](https://knowledge.codat.io/supported-features/commerce?view=tab-by-data-type&dataType=commerce-orders) for integrations that support getting a specific order.
Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-commerce-v1-api#/operations/refresh-company-data).
'/companies/{companyId}/connections/{connectionId}/data/commerce-paymentMethods':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
get:
summary: List payment methods
tags:
- Commerce payments
operationId: list-commerce-payment-methods
x-speakeasy-name-override: list-methods
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CommercePaymentMethods'
examples:
Amazon Seller Central:
value:
results:
- id: COD
name: Cash On Delivery
status: Active
modifiedDate: '2023-01-09T09:12:03Z'
- id: GC
name: Gift Card
status: Active
modifiedDate: '2023-01-09T09:12:03Z'
pageNumber: 1
pageSize: 2
totalResults: 3
_links:
current:
href: /companies/6a59da96-e6d2-4c5c-ace7-65ba8be6a472/connections/58be1638-2c74-4ad4-8ff3-8c5b98b5f0fe/data/commerce-paymentMethods?page=1&pageSize=2
self:
href: /companies/6a59da96-e6d2-4c5c-ace7-65ba8be6a472/connections/58be1638-2c74-4ad4-8ff3-8c5b98b5f0fe/data/commerce-paymentMethods
next:
href: /companies/6a59da96-e6d2-4c5c-ace7-65ba8be6a472/connections/58be1638-2c74-4ad4-8ff3-8c5b98b5f0fe/data/commerce-paymentMethods?page=2&pageSize=2
BigCommerce:
value:
results:
- id: bigcommerce_gift_certificate
name: Gift Certificate
status: Active
modifiedDate: '2023-04-11T10:33:48Z'
- id: bigcommerce_store_credit
name: Store Credit
status: Active
modifiedDate: '2023-04-11T10:33:48Z'
pageNumber: 1
pageSize: 2
totalResults: 2
_links:
current:
href: /companies/d1ebcf6d-f7f9-4841-8a06-fec12c492a48/connections/7c0a21e8-938a-40a4-b0f7-5ab5d46804b0/data/commerce-paymentMethods?page=1&pageSize=2
self:
href: /companies/d1ebcf6d-f7f9-4841-8a06-fec12c492a48/connections/7c0a21e8-938a-40a4-b0f7-5ab5d46804b0/data/commerce-paymentMethods
Clover:
value:
results:
- id: 0DPQ6QP48YYHW
name: TapMango Wallet
status: Active
modifiedDate: '2023-01-09T11:01:04Z'
- id: 24H1ANYP1BNXG
name: MyTab
status: Active
modifiedDate: '2023-01-09T11:01:04Z'
pageNumber: 1
pageSize: 2
totalResults: 13
_links:
current:
href: /companies/aae80eb3-1f56-41ca-a171-a59f9ee03b26/connections/4a5b633b-cd86-4715-a22b-62be98c4bcc5/data/commerce-paymentMethods?page=1&pageSize=2
self:
href: /companies/aae80eb3-1f56-41ca-a171-a59f9ee03b26/connections/4a5b633b-cd86-4715-a22b-62be98c4bcc5/data/commerce-paymentMethods
next:
href: /companies/aae80eb3-1f56-41ca-a171-a59f9ee03b26/connections/4a5b633b-cd86-4715-a22b-62be98c4bcc5/data/commerce-paymentMethods?page=2&pageSize=2
Lightspeed K Trial:
value:
results:
- id: '647208621834260'
name: Cash
status: Active
modifiedDate: '2023-03-02T09:48:56Z'
- id: '647208621834261'
name: Credit Card
status: Active
modifiedDate: '2023-03-02T09:48:56Z'
pageNumber: 1
pageSize: 2
totalResults: 11
_links:
current:
href: /companies/36e3213b-02f6-4264-96ce-6dd53ea69e57/connections/278ba962-466a-452b-92b0-4bdee3a23463/data/commerce-paymentMethods?page=1&pageSize=2
self:
href: /companies/36e3213b-02f6-4264-96ce-6dd53ea69e57/connections/278ba962-466a-452b-92b0-4bdee3a23463/data/commerce-paymentMethods
next:
href: /companies/36e3213b-02f6-4264-96ce-6dd53ea69e57/connections/278ba962-466a-452b-92b0-4bdee3a23463/data/commerce-paymentMethods?page=2&pageSize=2
Mollie:
value:
results:
- id: applepay
name: Apple Pay
status: Unknown
modifiedDate: '2022-08-09T15:08:19Z'
- id: bancontact
name: Bancontact
status: Unknown
modifiedDate: '2022-08-09T15:08:19Z'
pageNumber: 1
pageSize: 2
totalResults: 19
_links:
current:
href: /companies/a2503b54-143c-4705-8bec-9ef84f51ca86/connections/4c8df852-f1b3-4642-939b-c33d6f34a312/data/commerce-paymentMethods?page=1&pageSize=2
self:
href: /companies/a2503b54-143c-4705-8bec-9ef84f51ca86/connections/4c8df852-f1b3-4642-939b-c33d6f34a312/data/commerce-paymentMethods
next:
href: /companies/a2503b54-143c-4705-8bec-9ef84f51ca86/connections/4c8df852-f1b3-4642-939b-c33d6f34a312/data/commerce-paymentMethods?page=2&pageSize=2
Mollie Test:
value:
results:
- id: applepay
name: Apple Pay
status: Unknown
modifiedDate: '2022-08-17T11:33:19Z'
- id: bancontact
name: Bancontact
status: Unknown
modifiedDate: '2022-08-17T11:33:19Z'
pageNumber: 1
pageSize: 2
totalResults: 19
_links:
current:
href: /companies/b978f9fe-8d63-4cfc-b2c2-b61b72e22785/connections/d564f8fd-0766-4ab8-a427-7c893f9b9ff6/data/commerce-paymentMethods?page=1&pageSize=2
self:
href: /companies/b978f9fe-8d63-4cfc-b2c2-b61b72e22785/connections/d564f8fd-0766-4ab8-a427-7c893f9b9ff6/data/commerce-paymentMethods
next:
href: /companies/b978f9fe-8d63-4cfc-b2c2-b61b72e22785/connections/d564f8fd-0766-4ab8-a427-7c893f9b9ff6/data/commerce-paymentMethods?page=2&pageSize=2
Square:
value:
results:
- id: BANK_ACCOUNT
name: Bank Account
status: Unknown
modifiedDate: '2022-08-02T10:27:32Z'
- id: BUY_NOW_PAY_LATER
name: Buy Now Pay Later
status: Unknown
modifiedDate: '2022-08-02T10:27:32Z'
pageNumber: 1
pageSize: 2
totalResults: 20
_links:
current:
href: /companies/d779fc82-a098-4107-a9fc-c2a1dda3d522/connections/9b098b74-3770-4dad-9001-4c283a39f1e5/data/commerce-paymentMethods?page=1&pageSize=2
self:
href: /companies/d779fc82-a098-4107-a9fc-c2a1dda3d522/connections/9b098b74-3770-4dad-9001-4c283a39f1e5/data/commerce-paymentMethods
next:
href: /companies/d779fc82-a098-4107-a9fc-c2a1dda3d522/connections/9b098b74-3770-4dad-9001-4c283a39f1e5/data/commerce-paymentMethods?page=2&pageSize=2
SumUp:
value:
results:
- id: CASH
name: Cash
status: Active
modifiedDate: '2022-09-14T10:58:03Z'
- id: CC_CUSTOMER_ENTERED
name: Credit Card
status: Active
modifiedDate: '2022-09-14T10:58:03Z'
pageNumber: 1
pageSize: 2
totalResults: 8
_links:
current:
href: /companies/e170dbe2-be50-474f-b449-82add37108de/connections/1e631dd5-a30b-4bad-ad5c-315c9743535b/data/commerce-paymentMethods?page=1&pageSize=2
self:
href: /companies/e170dbe2-be50-474f-b449-82add37108de/connections/1e631dd5-a30b-4bad-ad5c-315c9743535b/data/commerce-paymentMethods
next:
href: /companies/e170dbe2-be50-474f-b449-82add37108de/connections/1e631dd5-a30b-4bad-ad5c-315c9743535b/data/commerce-paymentMethods?page=2&pageSize=2
'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'
'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 payment methods* endpoint returns a list of [payment methods](https://docs.codat.io/commerce-api#/schemas/PaymentMethod) for a given company's connection.
[Payment methods](https://docs.codat.io/commerce-api#/schemas/PaymentMethod) represent the payment method(s) used to make payments.
Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-commerce-v1-api#/operations/refresh-company-data).
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/pageSize'
- $ref: '#/components/parameters/query'
- $ref: '#/components/parameters/orderBy'
'/companies/{companyId}/connections/{connectionId}/data/commerce-paymentMethods/{paymentMethodId}':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
- name: paymentMethodId
in: path
required: true
schema:
type: string
examples:
$ref: '#/components/schemas/CommerceOrder/allOf/0/properties/id/examples'
description: Unique identifier for a payment method.
get:
summary: Get payment method
tags:
- Commerce payments
operationId: get-commerce-payment-method
x-speakeasy-name-override: get-method
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CommercePaymentMethod'
examples:
Amazon Seller Central:
value:
id: COD
name: Cash On Delivery
status: Active
modifiedDate: '2023-01-09T09:12:03Z'
BigCommerce:
value:
id: bigcommerce_gift_certificate
name: Gift Certificate
status: Active
modifiedDate: '2023-04-11T10:33:48Z'
Clover:
value:
id: 0DPQ6QP48YYHW
name: TapMango Wallet
status: Active
modifiedDate: '2023-01-09T11:01:04Z'
Lightspeed K Trial:
value:
id: '647208621834260'
name: Cash
status: Active
modifiedDate: '2023-03-02T09:48:56Z'
Mollie:
value:
id: applepay
name: Apple Pay
status: Unknown
modifiedDate: '2022-08-09T15:08:19Z'
Mollie Test:
value:
id: applepay
name: Apple Pay
status: Unknown
modifiedDate: '2022-08-17T11:33:19Z'
Square:
value:
id: BANK_ACCOUNT
name: Bank Account
status: Unknown
modifiedDate: '2022-08-02T10:27:32Z'
SumUp:
value:
id: CASH
name: Cash
status: Active
modifiedDate: '2022-09-14T10:58:03Z'
'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'
description: |
The *Get payment method* endpoint returns a single payment method for a given paymentMethodId.
[Payment methods](https://docs.codat.io/commerce-api#/schemas/PaymentMethod) represent the payment method(s) used to make payments.
Check out our [coverage explorer](https://knowledge.codat.io/supported-features/commerce?view=tab-by-data-type&dataType=commerce-paymentMethods) for integrations that support getting a specific payment method.
Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-commerce-v1-api#/operations/refresh-company-data).
'/companies/{companyId}/connections/{connectionId}/data/commerce-payments':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
get:
summary: List payments
tags:
- Commerce payments
operationId: list-commerce-payments
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CommercePayments'
examples:
BigCommerce:
value:
results:
- id: 103_1_1_refund
amount: -64
currency: GBP
type: Unknown
status: Paid
paymentProvider: bigpaypay
dueDate: '0001-01-01T00:00:00'
createdDate: '2022-06-15T17:13:13Z'
modifiedDate: '2023-04-11T10:33:52Z'
- id: 105_2_2_refund
amount: -33.95
currency: GBP
type: Unknown
status: Paid
paymentProvider: bigpaypay
dueDate: '0001-01-01T00:00:00'
createdDate: '2022-06-24T13:57:01Z'
modifiedDate: '2023-04-11T10:33:52Z'
pageNumber: 1
pageSize: 2
totalResults: 20
_links:
current:
href: /companies/d1ebcf6d-f7f9-4841-8a06-fec12c492a48/connections/7c0a21e8-938a-40a4-b0f7-5ab5d46804b0/data/commerce-payments?page=1&pageSize=2
self:
href: /companies/d1ebcf6d-f7f9-4841-8a06-fec12c492a48/connections/7c0a21e8-938a-40a4-b0f7-5ab5d46804b0/data/commerce-payments
next:
href: /companies/d1ebcf6d-f7f9-4841-8a06-fec12c492a48/connections/7c0a21e8-938a-40a4-b0f7-5ab5d46804b0/data/commerce-payments?page=2&pageSize=2
Clover:
value:
results:
- id: 01J7HV88GT6B8
amount: 1000
currency: USD
paymentMethodRef:
id: BR5M17TG091SP
name: Credit Card
type: Card
status: Paid
paymentProvider: clover
dueDate: '0001-01-01T00:00:00'
createdDate: '2021-05-24T10:35:08Z'
modifiedDate: '2023-01-09T11:01:02Z'
sourceModifiedDate: '2021-05-24T10:35:08Z'
- id: 0A8ZMPG40Q9AM
amount: 1000
currency: USD
paymentMethodRef:
id: BR5M17TG091SP
name: Credit Card
type: Card
status: Paid
paymentProvider: clover
dueDate: '0001-01-01T00:00:00'
createdDate: '2021-05-24T10:35:31Z'
modifiedDate: '2023-01-09T11:01:02Z'
sourceModifiedDate: '2021-05-24T10:35:31Z'
pageNumber: 1
pageSize: 2
totalResults: 77
_links:
current:
href: /companies/aae80eb3-1f56-41ca-a171-a59f9ee03b26/connections/4a5b633b-cd86-4715-a22b-62be98c4bcc5/data/commerce-payments?page=1&pageSize=2
self:
href: /companies/aae80eb3-1f56-41ca-a171-a59f9ee03b26/connections/4a5b633b-cd86-4715-a22b-62be98c4bcc5/data/commerce-payments
next:
href: /companies/aae80eb3-1f56-41ca-a171-a59f9ee03b26/connections/4a5b633b-cd86-4715-a22b-62be98c4bcc5/data/commerce-payments?page=2&pageSize=2
Lightspeed K Trial:
value:
results:
- id: '1_A62084.1_2023-01-05T03:34:50.296Z'
amount: 0
currency: AUD
paymentMethodRef:
id: '0'
type: Unknown
status: Paid
dueDate: '0001-01-01T00:00:00'
createdDate: '2023-01-05T03:34:50Z'
modifiedDate: '2023-03-02T09:50:43Z'
- id: 'R61465.1_1_A61465.1_2022-12-09T02:27:46.273Z'
amount: 5
currency: AUD
paymentMethodRef:
id: '647208621834714'
name: LSPay - Mary
type: Unknown
status: Paid
dueDate: '0001-01-01T00:00:00'
createdDate: '2022-12-09T02:27:46Z'
modifiedDate: '2023-03-02T09:50:43Z'
pageNumber: 1
pageSize: 2
totalResults: 26
_links:
current:
href: /companies/36e3213b-02f6-4264-96ce-6dd53ea69e57/connections/278ba962-466a-452b-92b0-4bdee3a23463/data/commerce-payments?page=1&pageSize=2
self:
href: /companies/36e3213b-02f6-4264-96ce-6dd53ea69e57/connections/278ba962-466a-452b-92b0-4bdee3a23463/data/commerce-payments
next:
href: /companies/36e3213b-02f6-4264-96ce-6dd53ea69e57/connections/278ba962-466a-452b-92b0-4bdee3a23463/data/commerce-payments?page=2&pageSize=2
Mollie:
value:
results:
- id: re_Azhe8TzfUK
amount: -20
currency: EUR
type: OnlineCard
status: Paid
paymentProvider: mollie
dueDate: '0001-01-01T00:00:00'
createdDate: '2022-01-17T16:00:46'
modifiedDate: '2022-03-17T16:15:23Z'
- id: re_NPKEJhQveu
amount: -60
currency: EUR
type: OnlineCard
status: Paid
paymentProvider: mollie
dueDate: '0001-01-01T00:00:00'
createdDate: '2022-01-17T16:00:05'
modifiedDate: '2022-03-17T16:15:23Z'
pageNumber: 1
pageSize: 2
totalResults: 16
_links:
current:
href: /companies/65fe5864-16d7-41f4-8823-87ae1cf3a283/connections/1dbbf0ab-a27a-45b0-982a-ae0d8985affc/data/commerce-payments?page=1&pageSize=2
self:
href: /companies/65fe5864-16d7-41f4-8823-87ae1cf3a283/connections/1dbbf0ab-a27a-45b0-982a-ae0d8985affc/data/commerce-payments
next:
href: /companies/65fe5864-16d7-41f4-8823-87ae1cf3a283/connections/1dbbf0ab-a27a-45b0-982a-ae0d8985affc/data/commerce-payments?page=2&pageSize=2
PrestaShop:
value:
results:
- id: '1'
amount: 20.9
currency: USD
type: Unknown
status: Paid
dueDate: '0001-01-01T00:00:00'
createdDate: '2021-09-08T01:52:55'
modifiedDate: '2022-01-26T15:09:42Z'
- id: '2'
amount: 20.9
currency: USD
type: Unknown
status: Paid
dueDate: '0001-01-01T00:00:00'
createdDate: '2021-09-08T01:53:28'
modifiedDate: '2022-01-26T15:09:42Z'
pageNumber: 1
pageSize: 2
totalResults: 5
_links:
current:
href: /companies/2bf78e61-58ca-421a-a430-5dfa59cf15b0/connections/30774c1f-fdcd-491e-9e60-47e316b3ab9b/data/commerce-payments?page=1&pageSize=2
self:
href: /companies/2bf78e61-58ca-421a-a430-5dfa59cf15b0/connections/30774c1f-fdcd-491e-9e60-47e316b3ab9b/data/commerce-payments
next:
href: /companies/2bf78e61-58ca-421a-a430-5dfa59cf15b0/connections/30774c1f-fdcd-491e-9e60-47e316b3ab9b/data/commerce-payments?page=2&pageSize=2
Shopify:
value:
results:
- id: '4630233579678'
amount: 600
currency: GBP
type: OnlineCard
status: Failed
paymentProvider: Shopify Payments
dueDate: '0001-01-01T00:00:00'
createdDate: '2021-03-19T13:17:49Z'
modifiedDate: '2023-02-10T15:18:24Z'
sourceModifiedDate: '2021-03-19T13:17:49Z'
- id: '4630234497182'
amount: 600
currency: GBP
type: OnlineCard
status: Paid
paymentProvider: Shopify Payments
dueDate: '0001-01-01T00:00:00'
createdDate: '2021-03-19T13:18:29Z'
modifiedDate: '2023-02-10T15:18:24Z'
sourceModifiedDate: '2021-03-19T13:18:29Z'
pageNumber: 1
pageSize: 2
totalResults: 46
_links:
current:
href: /companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-payments?page=1&pageSize=2
self:
href: /companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-payments
next:
href: /companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-payments?page=2&pageSize=2
SumUp:
value:
results:
- id: 07efcdd0-7f61-4d82-957f-52e8f0bd3f89
amount: 200
currency: GBP
type: OnlineCard
status: Cancelled
paymentProvider: sumup
dueDate: '0001-01-01T00:00:00'
createdDate: '2021-03-30T12:20:40Z'
modifiedDate: '2022-03-17T16:13:46Z'
- id: 46d36a64-ea48-4e37-9340-3548cbf3ca2f
amount: 15
currency: GBP
type: Cash
status: Paid
paymentProvider: sumup
dueDate: '0001-01-01T00:00:00'
createdDate: '2021-03-26T21:09:59Z'
modifiedDate: '2022-03-17T16:13:46Z'
pageNumber: 1
pageSize: 2
totalResults: 6
_links:
current:
href: /companies/d9e78460-7ee5-4a34-a3f4-9652a5946b1f/connections/60959ebe-8491-4368-bf0a-f715c3ce2e53/data/commerce-payments?page=1&pageSize=2
self:
href: /companies/d9e78460-7ee5-4a34-a3f4-9652a5946b1f/connections/60959ebe-8491-4368-bf0a-f715c3ce2e53/data/commerce-payments
next:
href: /companies/d9e78460-7ee5-4a34-a3f4-9652a5946b1f/connections/60959ebe-8491-4368-bf0a-f715c3ce2e53/data/commerce-payments?page=2&pageSize=2
WooCommerce:
value:
results:
- id: '33'
amount: 0
currency: GBP
type: Unknown
status: Paid
dueDate: '0001-01-01T00:00:00'
createdDate: '2021-03-11T09:07:00Z'
modifiedDate: '2021-07-13T16:19:00Z'
- id: '35'
amount: 30
currency: GBP
type: Unknown
status: Paid
dueDate: '0001-01-01T00:00:00'
createdDate: '2021-03-11T09:08:56Z'
modifiedDate: '2021-07-13T16:19:00Z'
pageNumber: 1
pageSize: 2
totalResults: 5
_links:
current:
href: /companies/010c6f53-8fc8-40ab-9ed5-41191cf9c6b5/connections/7545ca2e-5f58-4f98-8af2-3b2c38bb8074/data/commerce-payments?page=1&pageSize=2
self:
href: /companies/010c6f53-8fc8-40ab-9ed5-41191cf9c6b5/connections/7545ca2e-5f58-4f98-8af2-3b2c38bb8074/data/commerce-payments
next:
href: /companies/010c6f53-8fc8-40ab-9ed5-41191cf9c6b5/connections/7545ca2e-5f58-4f98-8af2-3b2c38bb8074/data/commerce-payments?page=2&pageSize=2
Zettle:
value:
results:
- id: 09b94cfc-2d98-11eb-8021-0e1b9dcbeca1
amount: 25
currency: GBP
type: Paypal
status: Unknown
dueDate: '0001-01-01T00:00:00'
createdDate: '2020-11-23T14:28:04Z'
modifiedDate: '2021-10-27T15:22:37Z'
- id: 226580d6-2d98-11eb-a35c-fed5e63de507
amount: 58.5
currency: GBP
type: Paypal
status: Unknown
dueDate: '0001-01-01T00:00:00'
createdDate: '2020-11-23T14:28:47Z'
modifiedDate: '2021-10-27T15:22:37Z'
pageNumber: 1
pageSize: 2
totalResults: 8
_links:
current:
href: /companies/9d448ad0-4508-47fc-bd3b-6950493151f1/connections/c7baa8da-3302-464b-8aa1-edcd4c900902/data/commerce-payments?page=1&pageSize=2
self:
href: /companies/9d448ad0-4508-47fc-bd3b-6950493151f1/connections/c7baa8da-3302-464b-8aa1-edcd4c900902/data/commerce-payments
next:
href: /companies/9d448ad0-4508-47fc-bd3b-6950493151f1/connections/c7baa8da-3302-464b-8aa1-edcd4c900902/data/commerce-payments?page=2&pageSize=2
'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'
'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 payments* endpoint returns a list of [payments](https://docs.codat.io/commerce-api#/schemas/Payment) for a given company's connection.
[Payments](https://docs.codat.io/commerce-api#/schemas/Payment) contain details of all payments made by customers to the company.
Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-commerce-v1-api#/operations/refresh-company-data).
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/pageSize'
- $ref: '#/components/parameters/query'
- $ref: '#/components/parameters/orderBy'
'/companies/{companyId}/connections/{connectionId}/data/commerce-payments/{paymentId}':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
- name: paymentId
in: path
required: true
schema:
type: string
examples:
$ref: '#/components/schemas/CommerceOrder/allOf/0/properties/id/examples'
description: Unique identifier for a payment.
get:
summary: Get payment
tags:
- Commerce payments
operationId: get-commerce-payment
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CommercePayment'
examples:
BigCommerce:
value:
id: 103_1_1_refund
amount: -64
currency: GBP
type: Unknown
status: Paid
paymentProvider: bigpaypay
dueDate: '0001-01-01T00:00:00'
createdDate: '2022-06-15T17:13:13Z'
modifiedDate: '2023-04-11T10:33:52Z'
Clover:
value:
id: 01J7HV88GT6B8
amount: 1000
currency: USD
paymentMethodRef:
id: BR5M17TG091SP
name: Credit Card
type: Card
status: Paid
paymentProvider: clover
dueDate: '0001-01-01T00:00:00'
createdDate: '2021-05-24T10:35:08Z'
modifiedDate: '2023-01-09T11:01:02Z'
sourceModifiedDate: '2021-05-24T10:35:08Z'
Lightspeed K Trial:
value:
id: '1_A62084.1_2023-01-05T03:34:50.296Z'
amount: 0
currency: AUD
paymentMethodRef:
id: '0'
type: Unknown
status: Paid
dueDate: '0001-01-01T00:00:00'
createdDate: '2023-01-05T03:34:50Z'
modifiedDate: '2023-03-02T09:50:43Z'
Mollie:
value:
id: re_Azhe8TzfUK
amount: -20
currency: EUR
type: OnlineCard
status: Paid
paymentProvider: mollie
dueDate: '0001-01-01T00:00:00'
createdDate: '2022-01-17T16:00:46'
modifiedDate: '2022-03-17T16:15:23Z'
PrestaShop:
value:
id: '1'
amount: 20.9
currency: USD
type: Unknown
status: Paid
dueDate: '0001-01-01T00:00:00'
createdDate: '2021-09-08T01:52:55'
modifiedDate: '2022-01-26T15:09:42Z'
Shopify:
value:
id: '4630233579678'
amount: 600
currency: GBP
type: OnlineCard
status: Failed
paymentProvider: Shopify Payments
dueDate: '0001-01-01T00:00:00'
createdDate: '2021-03-19T13:17:49Z'
modifiedDate: '2023-02-10T15:18:24Z'
sourceModifiedDate: '2021-03-19T13:17:49Z'
SumUp:
value:
id: 07efcdd0-7f61-4d82-957f-52e8f0bd3f89
amount: 200
currency: GBP
type: OnlineCard
status: Cancelled
paymentProvider: sumup
dueDate: '0001-01-01T00:00:00'
createdDate: '2021-03-30T12:20:40Z'
modifiedDate: '2022-03-17T16:13:46Z'
WooCommerce:
value:
id: '33'
amount: 0
currency: GBP
type: Unknown
status: Paid
dueDate: '0001-01-01T00:00:00'
createdDate: '2021-03-11T09:07:00Z'
modifiedDate: '2021-07-13T16:19:00Z'
Zettle:
value:
id: 09b94cfc-2d98-11eb-8021-0e1b9dcbeca1
amount: 25
currency: GBP
type: Paypal
status: Unknown
dueDate: '0001-01-01T00:00:00'
createdDate: '2020-11-23T14:28:04Z'
modifiedDate: '2021-10-27T15:22:37Z'
'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'
description: |
The *Get payment* endpoint returns a single payment for a given paymentId.
[Payments](https://docs.codat.io/commerce-api#/schemas/Payment) contain details of all payments made by customers to the company.
Check out our [coverage explorer](https://knowledge.codat.io/supported-features/commerce?view=tab-by-data-type&dataType=commerce-payments) for integrations that support getting a specific payment.
Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-commerce-v1-api#/operations/refresh-company-data).
'/companies/{companyId}/connections/{connectionId}/data/commerce-products':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
get:
summary: List products
tags:
- Commerce products
operationId: list-commerce-products
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CommerceProducts'
examples:
Amazon Seller Central:
value:
results:
- id: Chromecast
categorization: DEVICE
name: Chromecast
description: Cast from your phone to your TV with this all new chromecast.
productCategoryRefs: []
isGiftCard: false
variants:
- id: packaging_asin_gating
name: Chromecast in a cardboard box
quantity: 0
isTaxEnabled: false
sku: packaging_asin_gating
vatPercentage: 0
prices:
- currency: GBP
unitPrice: 50
inventory:
totalQuantity: 0
locations: []
shippingRequired: false
createdDate: '2021-02-07T12:30:01Z'
createdDate: '2021-02-07T12:30:01Z'
modifiedDate: '2023-01-09T09:12:11Z'
sourceModifiedDate: '2022-08-17T09:07:07Z'
status: Published
- id: vb554a-bl1915
categorization: COAT
name: Waterproof Jacket
description: 'Wind and rainproof, keeping you dry all year round.'
productCategoryRefs: []
isGiftCard: false
variants:
- id: 'ARRIS,SB6141'
name: Waterproof Jacket (Black)
quantity: 0
isTaxEnabled: false
sku: 'ARRIS,SB6141'
vatPercentage: 0
prices:
- currency: GBP
unitPrice: 200
inventory:
totalQuantity: 0
locations: []
shippingRequired: false
createdDate: '2021-02-07T12:30:01Z'
- id: RTN66U-N9000
name: Waterproof Jacket (Blue)
quantity: 0
isTaxEnabled: false
sku: RTN66U-N9000
vatPercentage: 0
prices:
- currency: GBP
unitPrice: 200
inventory:
totalQuantity: 0
locations: []
shippingRequired: false
createdDate: '2021-02-07T12:30:01Z'
- id: TLWR841N
name: Waterproof Jacket (Red)
quantity: 0
isTaxEnabled: false
sku: TLWR841N
vatPercentage: 0
prices:
- currency: GBP
unitPrice: 200
inventory:
totalQuantity: 0
locations: []
shippingRequired: false
createdDate: '2021-02-07T12:30:01Z'
createdDate: '2021-02-07T12:30:01Z'
modifiedDate: '2023-01-09T09:12:11Z'
sourceModifiedDate: '2022-08-17T09:07:07Z'
status: Published
pageNumber: 1
pageSize: 2
totalResults: 3
_links:
current:
href: /companies/6a59da96-e6d2-4c5c-ace7-65ba8be6a472/connections/58be1638-2c74-4ad4-8ff3-8c5b98b5f0fe/data/commerce-products?page=1&pageSize=2
self:
href: /companies/6a59da96-e6d2-4c5c-ace7-65ba8be6a472/connections/58be1638-2c74-4ad4-8ff3-8c5b98b5f0fe/data/commerce-products
next:
href: /companies/6a59da96-e6d2-4c5c-ace7-65ba8be6a472/connections/58be1638-2c74-4ad4-8ff3-8c5b98b5f0fe/data/commerce-products?page=2&pageSize=2
BigCommerce:
value:
results:
- id: '103'
categorization: 'Shop All, Utility'
name: '[Sample] Canvas Laundry Cart'
description: 'The last laundry cart you''ll ever buy. This industrial non-collapsable cart is constructed with a steel framed body using heavyweight canvas capped with a soft leather rim sitting on four smooth rolling casters. Keeps the grubby garments off the floor and almost makes laundry enjoyable. Can also be used as the ideal storage solution: many people find it ideal for children''s toys or a load of chopped firewood. Load it up and wheel it away. Natural Heavyweight Canvas with Vegetable Tanned Leather Rim Measure�'
productCategoryRefs: []
isGiftCard: false
variants:
- id: '71'
name: '[Sample] Canvas Laundry Cart'
quantity: 0
isTaxEnabled: false
sku: CLC
barcode: ''
vatPercentage: 0
prices:
- currency: GBP
unitPrice: 200
inventory:
totalQuantity: 0
locations: []
shippingRequired: true
createdDate: '0001-01-01T00:00:00'
createdDate: '2015-07-03T18:48:07Z'
modifiedDate: '2023-04-11T10:33:49Z'
sourceModifiedDate: '2022-06-16T07:59:46Z'
status: Published
- id: '104'
categorization: 'Shop All, Utility'
name: '[Sample] Utility Caddy'
description: 'This powder coated steel utility caddy ensures your cleaning essentials are stowed away in one spot ready for your household chores. Brushes, cloths, liquid soaps can all easily be stashed away. Also ideal to be used as a garden caddy to easily grab from the shed for a days work. Works well as a mop bucket too. The wood carrying handle ensures a comfortable grip when toting it from room to room. Measures 19 h x 36 w x 20 dia cm/7.5 h x 14.1 w x 7.8 dia in'
productCategoryRefs: []
isGiftCard: false
variants:
- id: '72'
name: '[Sample] Utility Caddy'
quantity: 0
isTaxEnabled: false
sku: OFSUC
barcode: ''
vatPercentage: 0
prices:
- currency: GBP
unitPrice: 45.95
inventory:
totalQuantity: 0
locations: []
shippingRequired: true
createdDate: '0001-01-01T00:00:00'
createdDate: '2015-07-03T18:49:26Z'
modifiedDate: '2023-04-11T10:33:49Z'
sourceModifiedDate: '2015-07-03T20:45:54Z'
status: Published
pageNumber: 1
pageSize: 2
totalResults: 18
_links:
current:
href: /companies/d1ebcf6d-f7f9-4841-8a06-fec12c492a48/connections/7c0a21e8-938a-40a4-b0f7-5ab5d46804b0/data/commerce-products?page=1&pageSize=2
self:
href: /companies/d1ebcf6d-f7f9-4841-8a06-fec12c492a48/connections/7c0a21e8-938a-40a4-b0f7-5ab5d46804b0/data/commerce-products
next:
href: /companies/d1ebcf6d-f7f9-4841-8a06-fec12c492a48/connections/7c0a21e8-938a-40a4-b0f7-5ab5d46804b0/data/commerce-products?page=2&pageSize=2
Clover:
value:
results:
- id: DJANHKK2AVEYY
name: Coffee
description: Coffee
productCategoryRefs: []
isGiftCard: false
variants:
- id: DJANHKK2AVEYY
name: Coffee
quantity: 0
isTaxEnabled: true
sku: '12222'
barcode: '1234'
vatPercentage: 20
prices:
- currency: GBP
unitPrice: 3
inventory:
totalQuantity: 0
locations: []
shippingRequired: false
createdDate: '0001-01-01T00:00:00'
createdDate: '0001-01-01T00:00:00'
modifiedDate: '2023-01-09T11:01:03Z'
sourceModifiedDate: '2021-05-24T15:50:55Z'
status: Published
- id: NMZHKK6FKF6ZJ
name: Laptop
description: Cool Laptop
productCategoryRefs: []
isGiftCard: false
variants:
- id: NMZHKK6FKF6ZJ
name: Laptop
quantity: 0
isTaxEnabled: true
sku: '111'
barcode: '123'
vatPercentage: 20
prices:
- currency: GBP
unitPrice: 1000
inventory:
totalQuantity: 0
locations: []
shippingRequired: false
createdDate: '0001-01-01T00:00:00'
createdDate: '0001-01-01T00:00:00'
modifiedDate: '2023-01-09T11:01:03Z'
sourceModifiedDate: '2021-05-24T08:19:14Z'
status: Published
pageNumber: 1
pageSize: 2
totalResults: 3
_links:
current:
href: /companies/aae80eb3-1f56-41ca-a171-a59f9ee03b26/connections/4a5b633b-cd86-4715-a22b-62be98c4bcc5/data/commerce-products?page=1&pageSize=2
self:
href: /companies/aae80eb3-1f56-41ca-a171-a59f9ee03b26/connections/4a5b633b-cd86-4715-a22b-62be98c4bcc5/data/commerce-products
next:
href: /companies/aae80eb3-1f56-41ca-a171-a59f9ee03b26/connections/4a5b633b-cd86-4715-a22b-62be98c4bcc5/data/commerce-products?page=2&pageSize=2
Lightspeed K Trial:
value:
results:
- id: '647208621834539'
categorization: Alcoholic beverages
name: Alcoholic beverages
description: Alcoholic beverages
productCategoryRefs:
- id: '647208621834281'
name: Alcoholic beverages
isGiftCard: false
variants: []
createdDate: '0001-01-01T00:00:00'
modifiedDate: '2023-03-02T09:50:32Z'
status: Published
- id: '647208621834542'
categorization: NA beverages
name: NA beverages
description: NA beverages
productCategoryRefs:
- id: '647208621834282'
name: NA beverages
isGiftCard: false
variants: []
createdDate: '0001-01-01T00:00:00'
modifiedDate: '2023-03-02T09:50:32Z'
status: Published
pageNumber: 1
pageSize: 2
totalResults: 39
_links:
current:
href: /companies/36e3213b-02f6-4264-96ce-6dd53ea69e57/connections/278ba962-466a-452b-92b0-4bdee3a23463/data/commerce-products?page=1&pageSize=2
self:
href: /companies/36e3213b-02f6-4264-96ce-6dd53ea69e57/connections/278ba962-466a-452b-92b0-4bdee3a23463/data/commerce-products
next:
href: /companies/36e3213b-02f6-4264-96ce-6dd53ea69e57/connections/278ba962-466a-452b-92b0-4bdee3a23463/data/commerce-products?page=2&pageSize=2
PrestaShop:
value:
results:
- id: '1'
categorization: Home - Clothes - Men
name: Hummingbird printed t-shirt
description: 'Symbol of lightness and delicacy, the hummingbird evokes curiosity and joy. Studio Design'' PolyFaune collection features classic products with colorful patterns, inspired by the traditional japanese origamis. To wear with a chino or jeans. The sublimation textile printing process provides an exceptional color rendering and a color, guaranteed overtime.'
productCategoryRefs: []
isGiftCard: false
variants:
- id: '8'
name: 'Hummingbird printed t-shirt (Size = XL, Color = Black)'
quantity: 0
isTaxEnabled: true
sku: demo_1
vatPercentage: 6
prices:
- currency: USD
unitPrice: 23.9
inventory:
totalQuantity: 300
locations: []
shippingRequired: true
createdDate: '0001-01-01T00:00:00'
- id: '4'
name: 'Hummingbird printed t-shirt (Size = M, Color = Black)'
quantity: 0
isTaxEnabled: true
sku: demo_1
vatPercentage: 6
prices:
- currency: USD
unitPrice: 23.9
inventory:
totalQuantity: 300
locations: []
shippingRequired: true
createdDate: '0001-01-01T00:00:00'
- id: '5'
name: 'Hummingbird printed t-shirt (Size = L, Color = White)'
quantity: 0
isTaxEnabled: true
sku: demo_1
vatPercentage: 6
prices:
- currency: USD
unitPrice: 23.9
inventory:
totalQuantity: 300
locations: []
shippingRequired: true
createdDate: '0001-01-01T00:00:00'
- id: '3'
name: 'Hummingbird printed t-shirt (Size = M, Color = White)'
quantity: 0
isTaxEnabled: true
sku: demo_1
vatPercentage: 6
prices:
- currency: USD
unitPrice: 23.9
inventory:
totalQuantity: 300
locations: []
shippingRequired: true
createdDate: '0001-01-01T00:00:00'
- id: '6'
name: 'Hummingbird printed t-shirt (Size = L, Color = Black)'
quantity: 0
isTaxEnabled: true
sku: demo_1
vatPercentage: 6
prices:
- currency: USD
unitPrice: 23.9
inventory:
totalQuantity: 300
locations: []
shippingRequired: true
createdDate: '0001-01-01T00:00:00'
- id: '1'
name: 'Hummingbird printed t-shirt (Size = S, Color = White)'
quantity: 0
isTaxEnabled: true
sku: demo_1
vatPercentage: 6
prices:
- currency: USD
unitPrice: 23.9
inventory:
totalQuantity: 300
locations: []
shippingRequired: true
createdDate: '0001-01-01T00:00:00'
- id: '2'
name: 'Hummingbird printed t-shirt (Size = S, Color = Black)'
quantity: 0
isTaxEnabled: true
sku: demo_1
vatPercentage: 6
prices:
- currency: USD
unitPrice: 23.9
inventory:
totalQuantity: 300
locations: []
shippingRequired: true
createdDate: '0001-01-01T00:00:00'
- id: '7'
name: 'Hummingbird printed t-shirt (Size = XL, Color = White)'
quantity: 0
isTaxEnabled: true
sku: demo_1
vatPercentage: 6
prices:
- currency: USD
unitPrice: 23.9
inventory:
totalQuantity: 300
locations: []
shippingRequired: true
createdDate: '0001-01-01T00:00:00'
createdDate: '2021-09-02T06:00:49'
modifiedDate: '2022-01-26T15:09:42Z'
sourceModifiedDate: '2021-09-02T06:00:49'
status: Published
- id: '10'
categorization: Home - Accessories - Home Accessories
name: Brown bear cushion
description: 'The brown bear cushion will add a graphic and colorful touch to your sofa, armchair or bed. Create a modern and zen atmosphere that inspires relaxation. Cover 100% cotton, machine washable at 60� / Filling 100% hypoallergenic polyester.'
productCategoryRefs: []
isGiftCard: false
variants:
- id: '24'
name: Brown bear cushion (Color = White)
quantity: 0
isTaxEnabled: true
sku: demo_16
vatPercentage: 6
prices:
- currency: USD
unitPrice: 18.9
inventory:
totalQuantity: 300
locations: []
shippingRequired: true
createdDate: '0001-01-01T00:00:00'
- id: '25'
name: Brown bear cushion (Color = Black)
quantity: 0
isTaxEnabled: true
sku: demo_16
vatPercentage: 6
prices:
- currency: USD
unitPrice: 18.9
inventory:
totalQuantity: 300
locations: []
shippingRequired: true
createdDate: '0001-01-01T00:00:00'
createdDate: '2021-09-02T06:00:49'
modifiedDate: '2022-01-26T15:09:42Z'
sourceModifiedDate: '2021-09-02T06:00:49'
status: Published
pageNumber: 1
pageSize: 2
totalResults: 22
_links:
current:
href: /companies/2bf78e61-58ca-421a-a430-5dfa59cf15b0/connections/30774c1f-fdcd-491e-9e60-47e316b3ab9b/data/commerce-products?page=1&pageSize=2
self:
href: /companies/2bf78e61-58ca-421a-a430-5dfa59cf15b0/connections/30774c1f-fdcd-491e-9e60-47e316b3ab9b/data/commerce-products
next:
href: /companies/2bf78e61-58ca-421a-a430-5dfa59cf15b0/connections/30774c1f-fdcd-491e-9e60-47e316b3ab9b/data/commerce-products?page=2&pageSize=2
Shopify:
value:
results:
- id: '6595494117534'
categorization: Asus
name: Monitor
description: ''
productCategoryRefs: []
isGiftCard: false
variants:
- id: '39444526694558'
name: Monitor
quantity: 0
isTaxEnabled: true
sku: ''
barcode: ''
vatPercentage: 0
prices:
- currency: GBP
unitPrice: 150
inventory:
totalQuantity: 91
locations: []
shippingRequired: true
createdDate: '2021-03-19T10:13:22Z'
createdDate: '2021-03-19T10:13:22Z'
modifiedDate: '2023-02-10T15:18:25Z'
sourceModifiedDate: '2022-08-01T13:05:22Z'
status: Published
- id: '6595497066654'
categorization: Logitech
name: Mouse
description: ''
productCategoryRefs: []
isGiftCard: false
variants:
- id: '39444533706910'
name: Mouse
quantity: 0
isTaxEnabled: false
sku: ''
barcode: ''
vatPercentage: 0
prices:
- currency: GBP
unitPrice: 25
inventory:
totalQuantity: 71
locations: []
shippingRequired: true
createdDate: '2021-03-19T10:14:01Z'
createdDate: '2021-03-19T10:14:01Z'
modifiedDate: '2023-02-10T15:18:25Z'
sourceModifiedDate: '2022-08-01T13:05:22Z'
status: Published
pageNumber: 1
pageSize: 2
totalResults: 4
_links:
current:
href: /companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-products?page=1&pageSize=2
self:
href: /companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-products
next:
href: /companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-products?page=2&pageSize=2
Square:
value:
results:
- id: AX54KZQ3UAVCVPUMNEGFEU35
categorization: Hardware
name: Monitor
productCategoryRefs: []
isGiftCard: false
variants:
- id: A5BUT6SYUNYRSQ2R7GZ6UKN6
name: Regular
quantity: 0
isTaxEnabled: true
vatPercentage: 10
prices:
- currency: GBP
unitPrice: 200
inventory:
totalQuantity: 0
locations: []
shippingRequired: false
createdDate: '2021-02-18T15:47:31Z'
createdDate: '2021-02-18T15:47:31Z'
modifiedDate: '2021-06-17T14:23:02Z'
sourceModifiedDate: '2021-02-18T15:47:31Z'
status: Unknown
- id: FYRIQNFTFRGQNQZGZG66MJWI
categorization: Furniture
name: Desk
productCategoryRefs: []
isGiftCard: false
variants:
- id: VMKSQEABA3WIYGXNAV63JOTZ
name: Regular
quantity: 0
isTaxEnabled: true
vatPercentage: 10
prices:
- currency: GBP
unitPrice: 70
inventory:
totalQuantity: 0
locations: []
shippingRequired: false
createdDate: '2021-02-18T15:47:45Z'
createdDate: '2021-02-18T15:47:45Z'
modifiedDate: '2021-06-17T14:23:02Z'
sourceModifiedDate: '2021-02-18T15:47:45Z'
status: Unknown
pageNumber: 1
pageSize: 2
totalResults: 4
_links:
current:
href: /companies/25debd39-e024-41a1-a86c-4fd47f29c853/connections/d5071fdf-a769-48f3-b39e-e588d515bb83/data/commerce-products?page=1&pageSize=2
self:
href: /companies/25debd39-e024-41a1-a86c-4fd47f29c853/connections/d5071fdf-a769-48f3-b39e-e588d515bb83/data/commerce-products
next:
href: /companies/25debd39-e024-41a1-a86c-4fd47f29c853/connections/d5071fdf-a769-48f3-b39e-e588d515bb83/data/commerce-products?page=2&pageSize=2
Stripe Test:
value:
results:
- id: prod_IaSbzLnxOHmC0i
name: Blue T Shirt
description: Nice cozy cotton t shirt
productCategoryRefs: []
isGiftCard: false
variants:
- id: price_1ICJVEA8m8S1Gh7OIOCDOG8j
name: Blue T Shirt - Standard Price
quantity: 0
isTaxEnabled: false
vatPercentage: 0
prices:
- currency: GBP
unitPrice: 15
inventory:
totalQuantity: 0
locations: []
shippingRequired: true
createdDate: '2021-01-22T06:52:16Z'
- id: price_1ICJQgA8m8S1Gh7OfErQdx5R
name: Blue T Shirt - Standard Price
quantity: 0
isTaxEnabled: false
vatPercentage: 0
prices:
- currency: USD
unitPrice: 30
inventory:
totalQuantity: 0
locations: []
shippingRequired: true
createdDate: '2021-01-22T06:47:34Z'
- id: price_1HzHiCA8m8S1Gh7OXZVa6r3F
name: Blue T Shirt - Standard Price
quantity: 0
isTaxEnabled: false
vatPercentage: 0
prices:
- currency: GBP
unitPrice: 15
inventory:
totalQuantity: 0
locations: []
shippingRequired: true
createdDate: '2020-12-17T08:19:48Z'
createdDate: '2020-12-17T08:17:48Z'
modifiedDate: '2022-09-30T11:18:27Z'
sourceModifiedDate: '2021-01-22T06:52:17Z'
status: Published
- id: prod_IQ6G1MDsvUb87Y
name: Laptop
productCategoryRefs: []
isGiftCard: false
variants:
- id: price_1HpG3tA8m8S1Gh7Oa6bGLvVD
name: Laptop - Standard Price
quantity: 0
isTaxEnabled: false
vatPercentage: 0
prices:
- currency: GBP
unitPrice: 100
inventory:
totalQuantity: 0
locations: []
shippingRequired: false
createdDate: '2020-11-19T16:32:45Z'
createdDate: '2020-11-19T16:32:45Z'
modifiedDate: '2022-09-30T11:18:27Z'
sourceModifiedDate: '2022-05-12T23:31:33Z'
status: Published
pageNumber: 1
pageSize: 2
totalResults: 4
_links:
current:
href: /companies/8206e78e-e340-411e-b315-473c4ab73b48/connections/43e58373-0a1d-44a0-97f0-9fa9993a14fa/data/commerce-products?page=1&pageSize=2
self:
href: /companies/8206e78e-e340-411e-b315-473c4ab73b48/connections/43e58373-0a1d-44a0-97f0-9fa9993a14fa/data/commerce-products
next:
href: /companies/8206e78e-e340-411e-b315-473c4ab73b48/connections/43e58373-0a1d-44a0-97f0-9fa9993a14fa/data/commerce-products?page=2&pageSize=2
WooCommerce:
value:
results:
- id: '27'
categorization: Hardware
name: Monitor
description: ''
productCategoryRefs: []
isGiftCard: false
variants:
- id: '27'
name: Monitor
quantity: 0
isTaxEnabled: true
vatPercentage: 0
prices:
- currency: GBP
unitPrice: 150
inventory:
totalQuantity: 0
locations: []
shippingRequired: true
createdDate: '2021-03-11T08:55:22'
createdDate: '2021-03-11T08:55:22'
modifiedDate: '2021-07-13T16:19:00Z'
sourceModifiedDate: '2021-03-11T09:03:15'
status: Published
- id: '28'
categorization: Hardware
name: Keyboard
description: ''
productCategoryRefs: []
isGiftCard: false
variants:
- id: '28'
name: Keyboard
quantity: 0
isTaxEnabled: true
vatPercentage: 0
prices:
- currency: GBP
unitPrice: 30
inventory:
totalQuantity: 0
locations: []
shippingRequired: true
createdDate: '2021-03-11T09:02:58'
createdDate: '2021-03-11T09:02:58'
modifiedDate: '2021-07-13T16:19:00Z'
sourceModifiedDate: '2021-03-11T09:02:58'
status: Published
pageNumber: 1
pageSize: 2
totalResults: 3
_links:
current:
href: /companies/010c6f53-8fc8-40ab-9ed5-41191cf9c6b5/connections/7545ca2e-5f58-4f98-8af2-3b2c38bb8074/data/commerce-products?page=1&pageSize=2
self:
href: /companies/010c6f53-8fc8-40ab-9ed5-41191cf9c6b5/connections/7545ca2e-5f58-4f98-8af2-3b2c38bb8074/data/commerce-products
next:
href: /companies/010c6f53-8fc8-40ab-9ed5-41191cf9c6b5/connections/7545ca2e-5f58-4f98-8af2-3b2c38bb8074/data/commerce-products?page=2&pageSize=2
Zettle:
value:
results:
- id: 9d21fd90-a34a-11eb-b574-ad6abe469b61
categorization: Clothing
name: T-Shirt
productCategoryRefs: []
isGiftCard: false
variants:
- id: bb9bcf30-a34a-11eb-b574-ad6abe469b61
name: Medium
quantity: 0
isTaxEnabled: true
vatPercentage: 20
prices:
- currency: GBP
unitPrice: 10
inventory:
totalQuantity: 0
locations: []
shippingRequired: false
createdDate: '0001-01-01T00:00:00'
- id: b919df40-a34a-11eb-b574-ad6abe469b61
name: Large
quantity: 0
isTaxEnabled: true
vatPercentage: 20
prices:
- currency: GBP
unitPrice: 10
inventory:
totalQuantity: 0
locations: []
shippingRequired: false
createdDate: '0001-01-01T00:00:00'
- id: bcb5cab0-a34a-11eb-b574-ad6abe469b61
name: Small
quantity: 0
isTaxEnabled: true
vatPercentage: 20
prices:
- currency: GBP
unitPrice: 10
inventory:
totalQuantity: 0
locations: []
shippingRequired: false
createdDate: '0001-01-01T00:00:00'
createdDate: '2021-04-22T09:12:09Z'
modifiedDate: '2021-10-27T15:22:37Z'
sourceModifiedDate: '2021-08-04T14:32:20Z'
status: Published
- id: e02c2930-a34a-11eb-b9db-8f5efc0924aa
categorization: Clothing
name: Hoodie
productCategoryRefs: []
isGiftCard: false
variants:
- id: fa180e40-a34a-11eb-b9db-8f5efc0924aa
name: Medium
quantity: 0
isTaxEnabled: true
vatPercentage: 20
prices:
- currency: GBP
unitPrice: 30
inventory:
totalQuantity: 0
locations: []
shippingRequired: false
createdDate: '0001-01-01T00:00:00'
- id: fc412fd0-a34a-11eb-b9db-8f5efc0924aa
name: Extra Large
quantity: 0
isTaxEnabled: true
vatPercentage: 20
prices:
- currency: GBP
unitPrice: 30
inventory:
totalQuantity: 0
locations: []
shippingRequired: false
createdDate: '0001-01-01T00:00:00'
- id: f8a03b50-a34a-11eb-b9db-8f5efc0924aa
name: Small
quantity: 0
isTaxEnabled: true
vatPercentage: 20
prices:
- currency: GBP
unitPrice: 30
inventory:
totalQuantity: 0
locations: []
shippingRequired: false
createdDate: '0001-01-01T00:00:00'
- id: fac1bbc0-a34a-11eb-b9db-8f5efc0924aa
name: Large
quantity: 0
isTaxEnabled: true
vatPercentage: 20
prices:
- currency: GBP
unitPrice: 30
inventory:
totalQuantity: 0
locations: []
shippingRequired: false
createdDate: '0001-01-01T00:00:00'
createdDate: '2021-04-22T09:13:26Z'
modifiedDate: '2021-10-27T15:22:37Z'
sourceModifiedDate: '2021-08-04T14:31:58Z'
status: Published
pageNumber: 1
pageSize: 2
totalResults: 2
_links:
current:
href: /companies/9d448ad0-4508-47fc-bd3b-6950493151f1/connections/c7baa8da-3302-464b-8aa1-edcd4c900902/data/commerce-products?page=1&pageSize=2
self:
href: /companies/9d448ad0-4508-47fc-bd3b-6950493151f1/connections/c7baa8da-3302-464b-8aa1-edcd4c900902/data/commerce-products
'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'
'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'
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/pageSize'
- $ref: '#/components/parameters/query'
- $ref: '#/components/parameters/orderBy'
description: |-
The *List products* endpoint returns a list of [products](https://docs.codat.io/commerce-api#/schemas/Product) for a given company's connection.
[Products](https://docs.codat.io/commerce-api#/schemas/Product) are items in the company's inventory that are available for sale.
Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-commerce-v1-api#/operations/refresh-company-data).
'/companies/{companyId}/connections/{connectionId}/data/commerce-products/{productId}':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
- name: productId
in: path
required: true
schema:
type: string
examples:
$ref: '#/components/schemas/CommerceOrder/allOf/0/properties/id/examples'
description: Unique identifier for a product.
get:
summary: Get product
tags:
- Commerce products
operationId: get-commerce-product
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CommerceProduct'
examples:
Amazon Seller Central:
value:
id: Chromecast
categorization: DEVICE
name: Chromecast
description: Cast from your phone to your TV with this all new chromecast.
productCategoryRefs: []
isGiftCard: false
variants:
- id: packaging_asin_gating
name: Chromecast in a cardboard box
quantity: 0
isTaxEnabled: false
sku: packaging_asin_gating
vatPercentage: 0
prices:
- currency: GBP
unitPrice: 50
inventory:
totalQuantity: 0
locations: []
shippingRequired: false
createdDate: '2021-02-07T12:30:01Z'
createdDate: '2021-02-07T12:30:01Z'
modifiedDate: '2023-01-09T09:12:11Z'
sourceModifiedDate: '2022-08-17T09:07:07Z'
status: Published
BigCommerce:
value:
id: '103'
categorization: 'Shop All, Utility'
name: '[Sample] Canvas Laundry Cart'
description: 'The last laundry cart you''ll ever buy. This industrial non-collapsable cart is constructed with a steel framed body using heavyweight canvas capped with a soft leather rim sitting on four smooth rolling casters. Keeps the grubby garments off the floor and almost makes laundry enjoyable. Can also be used as the ideal storage solution: many people find it ideal for children''s toys or a load of chopped firewood. Load it up and wheel it away. Natural Heavyweight Canvas with Vegetable Tanned Leather Rim Measure�'
productCategoryRefs: []
isGiftCard: false
variants:
- id: '71'
name: '[Sample] Canvas Laundry Cart'
quantity: 0
isTaxEnabled: false
sku: CLC
barcode: ''
vatPercentage: 0
prices:
- currency: GBP
unitPrice: 200
inventory:
totalQuantity: 0
locations: []
shippingRequired: true
createdDate: '0001-01-01T00:00:00'
createdDate: '2015-07-03T18:48:07Z'
modifiedDate: '2023-04-11T10:33:49Z'
sourceModifiedDate: '2022-06-16T07:59:46Z'
status: Published
Clover:
value:
id: DJANHKK2AVEYY
name: Coffee
description: Coffee
productCategoryRefs: []
isGiftCard: false
variants:
- id: DJANHKK2AVEYY
name: Coffee
quantity: 0
isTaxEnabled: true
sku: '12222'
barcode: '1234'
vatPercentage: 20
prices:
- currency: GBP
unitPrice: 3
inventory:
totalQuantity: 0
locations: []
shippingRequired: false
createdDate: '0001-01-01T00:00:00'
createdDate: '0001-01-01T00:00:00'
modifiedDate: '2023-01-09T11:01:03Z'
sourceModifiedDate: '2021-05-24T15:50:55Z'
status: Published
Lightspeed K Trial:
value:
id: '647208621834539'
categorization: Alcoholic beverages
name: Alcoholic beverages
description: Alcoholic beverages
productCategoryRefs:
- id: '647208621834281'
name: Alcoholic beverages
isGiftCard: false
variants: []
createdDate: '0001-01-01T00:00:00'
modifiedDate: '2023-03-02T09:50:32Z'
status: Published
PrestaShop:
value:
id: '1'
categorization: Home - Clothes - Men
name: Hummingbird printed t-shirt
description: 'Symbol of lightness and delicacy, the hummingbird evokes curiosity and joy. Studio Design'' PolyFaune collection features classic products with colorful patterns, inspired by the traditional japanese origamis. To wear with a chino or jeans. The sublimation textile printing process provides an exceptional color rendering and a color, guaranteed overtime.'
productCategoryRefs: []
isGiftCard: false
variants:
- id: '8'
name: 'Hummingbird printed t-shirt (Size = XL, Color = Black)'
quantity: 0
isTaxEnabled: true
sku: demo_1
vatPercentage: 6
prices:
- currency: USD
unitPrice: 23.9
inventory:
totalQuantity: 300
locations: []
shippingRequired: true
createdDate: '0001-01-01T00:00:00'
- id: '4'
name: 'Hummingbird printed t-shirt (Size = M, Color = Black)'
quantity: 0
isTaxEnabled: true
sku: demo_1
vatPercentage: 6
prices:
- currency: USD
unitPrice: 23.9
inventory:
totalQuantity: 300
locations: []
shippingRequired: true
createdDate: '0001-01-01T00:00:00'
- id: '5'
name: 'Hummingbird printed t-shirt (Size = L, Color = White)'
quantity: 0
isTaxEnabled: true
sku: demo_1
vatPercentage: 6
prices:
- currency: USD
unitPrice: 23.9
inventory:
totalQuantity: 300
locations: []
shippingRequired: true
createdDate: '0001-01-01T00:00:00'
- id: '3'
name: 'Hummingbird printed t-shirt (Size = M, Color = White)'
quantity: 0
isTaxEnabled: true
sku: demo_1
vatPercentage: 6
prices:
- currency: USD
unitPrice: 23.9
inventory:
totalQuantity: 300
locations: []
shippingRequired: true
createdDate: '0001-01-01T00:00:00'
- id: '6'
name: 'Hummingbird printed t-shirt (Size = L, Color = Black)'
quantity: 0
isTaxEnabled: true
sku: demo_1
vatPercentage: 6
prices:
- currency: USD
unitPrice: 23.9
inventory:
totalQuantity: 300
locations: []
shippingRequired: true
createdDate: '0001-01-01T00:00:00'
- id: '1'
name: 'Hummingbird printed t-shirt (Size = S, Color = White)'
quantity: 0
isTaxEnabled: true
sku: demo_1
vatPercentage: 6
prices:
- currency: USD
unitPrice: 23.9
inventory:
totalQuantity: 300
locations: []
shippingRequired: true
createdDate: '0001-01-01T00:00:00'
- id: '2'
name: 'Hummingbird printed t-shirt (Size = S, Color = Black)'
quantity: 0
isTaxEnabled: true
sku: demo_1
vatPercentage: 6
prices:
- currency: USD
unitPrice: 23.9
inventory:
totalQuantity: 300
locations: []
shippingRequired: true
createdDate: '0001-01-01T00:00:00'
- id: '7'
name: 'Hummingbird printed t-shirt (Size = XL, Color = White)'
quantity: 0
isTaxEnabled: true
sku: demo_1
vatPercentage: 6
prices:
- currency: USD
unitPrice: 23.9
inventory:
totalQuantity: 300
locations: []
shippingRequired: true
createdDate: '0001-01-01T00:00:00'
createdDate: '2021-09-02T06:00:49'
modifiedDate: '2022-01-26T15:09:42Z'
sourceModifiedDate: '2021-09-02T06:00:49'
status: Published
Shopify:
value:
id: '6595494117534'
categorization: Asus
name: Monitor
description: ''
productCategoryRefs: []
isGiftCard: false
variants:
- id: '39444526694558'
name: Monitor
quantity: 0
isTaxEnabled: true
sku: ''
barcode: ''
vatPercentage: 0
prices:
- currency: GBP
unitPrice: 150
inventory:
totalQuantity: 91
locations: []
shippingRequired: true
createdDate: '2021-03-19T10:13:22Z'
createdDate: '2021-03-19T10:13:22Z'
modifiedDate: '2023-02-10T15:18:25Z'
sourceModifiedDate: '2022-08-01T13:05:22Z'
status: Published
Square:
value:
id: AX54KZQ3UAVCVPUMNEGFEU35
categorization: Hardware
name: Monitor
productCategoryRefs: []
isGiftCard: false
variants:
- id: A5BUT6SYUNYRSQ2R7GZ6UKN6
name: Regular
quantity: 0
isTaxEnabled: true
vatPercentage: 10
prices:
- currency: GBP
unitPrice: 200
inventory:
totalQuantity: 0
locations: []
shippingRequired: false
createdDate: '2021-02-18T15:47:31Z'
createdDate: '2021-02-18T15:47:31Z'
modifiedDate: '2021-06-17T14:23:02Z'
sourceModifiedDate: '2021-02-18T15:47:31Z'
status: Unknown
Stripe Test:
value:
id: prod_IaSbzLnxOHmC0i
name: Blue T Shirt
description: Nice cozy cotton t shirt
productCategoryRefs: []
isGiftCard: false
variants:
- id: price_1ICJVEA8m8S1Gh7OIOCDOG8j
name: Blue T Shirt - Standard Price
quantity: 0
isTaxEnabled: false
vatPercentage: 0
prices:
- currency: GBP
unitPrice: 15
inventory:
totalQuantity: 0
locations: []
shippingRequired: true
createdDate: '2021-01-22T06:52:16Z'
- id: price_1ICJQgA8m8S1Gh7OfErQdx5R
name: Blue T Shirt - Standard Price
quantity: 0
isTaxEnabled: false
vatPercentage: 0
prices:
- currency: USD
unitPrice: 30
inventory:
totalQuantity: 0
locations: []
shippingRequired: true
createdDate: '2021-01-22T06:47:34Z'
- id: price_1HzHiCA8m8S1Gh7OXZVa6r3F
name: Blue T Shirt - Standard Price
quantity: 0
isTaxEnabled: false
vatPercentage: 0
prices:
- currency: GBP
unitPrice: 15
inventory:
totalQuantity: 0
locations: []
shippingRequired: true
createdDate: '2020-12-17T08:19:48Z'
createdDate: '2020-12-17T08:17:48Z'
modifiedDate: '2022-09-30T11:18:27Z'
sourceModifiedDate: '2021-01-22T06:52:17Z'
status: Published
WooCommerce:
value:
id: '27'
categorization: Hardware
name: Monitor
description: ''
productCategoryRefs: []
isGiftCard: false
variants:
- id: '27'
name: Monitor
quantity: 0
isTaxEnabled: true
vatPercentage: 0
prices:
- currency: GBP
unitPrice: 150
inventory:
totalQuantity: 0
locations: []
shippingRequired: true
createdDate: '2021-03-11T08:55:22'
createdDate: '2021-03-11T08:55:22'
modifiedDate: '2021-07-13T16:19:00Z'
sourceModifiedDate: '2021-03-11T09:03:15'
status: Published
Zettle:
value:
id: 9d21fd90-a34a-11eb-b574-ad6abe469b61
categorization: Clothing
name: T-Shirt
productCategoryRefs: []
isGiftCard: false
variants:
- id: bb9bcf30-a34a-11eb-b574-ad6abe469b61
name: Medium
quantity: 0
isTaxEnabled: true
vatPercentage: 20
prices:
- currency: GBP
unitPrice: 10
inventory:
totalQuantity: 0
locations: []
shippingRequired: false
createdDate: '0001-01-01T00:00:00'
- id: b919df40-a34a-11eb-b574-ad6abe469b61
name: Large
quantity: 0
isTaxEnabled: true
vatPercentage: 20
prices:
- currency: GBP
unitPrice: 10
inventory:
totalQuantity: 0
locations: []
shippingRequired: false
createdDate: '0001-01-01T00:00:00'
- id: bcb5cab0-a34a-11eb-b574-ad6abe469b61
name: Small
quantity: 0
isTaxEnabled: true
vatPercentage: 20
prices:
- currency: GBP
unitPrice: 10
inventory:
totalQuantity: 0
locations: []
shippingRequired: false
createdDate: '0001-01-01T00:00:00'
createdDate: '2021-04-22T09:12:09Z'
modifiedDate: '2021-10-27T15:22:37Z'
sourceModifiedDate: '2021-08-04T14:32:20Z'
status: Published
'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'
description: |
The *Get product* endpoint returns a single product for a given productId.
[Products](https://docs.codat.io/commerce-api#/schemas/Product) are items in the company's inventory that are available for sale.
Check out our [coverage explorer](https://knowledge.codat.io/supported-features/commerce?view=tab-by-data-type&dataType=commerce-products) for integrations that support getting a specific product.
Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-commerce-v1-api#/operations/refresh-company-data).
'/companies/{companyId}/connections/{connectionId}/data/commerce-transactions':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
get:
summary: List transactions
tags:
- Commerce transactions
operationId: list-commerce-transactions
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CommerceTransactions'
examples:
Mollie:
value:
results:
- id: re_Azhe8TzfUK
totalAmount: -20
currency: EUR
type: Refund
createdDate: '2022-01-17T16:00:46'
modifiedDate: '2022-03-17T15:47:28Z'
- id: re_NPKEJhQveu
totalAmount: -60
currency: EUR
type: Refund
createdDate: '2022-01-17T16:00:05'
modifiedDate: '2022-03-17T15:47:28Z'
pageNumber: 1
pageSize: 2
totalResults: 7
_links:
current:
href: /companies/a68cb447-182d-4bbe-be1a-f526d11d69d5/connections/dfbf847b-cde8-4b00-b2f9-af51dec0d337/data/commerce-transactions?page=1&pageSize=2
self:
href: /companies/a68cb447-182d-4bbe-be1a-f526d11d69d5/connections/dfbf847b-cde8-4b00-b2f9-af51dec0d337/data/commerce-transactions
next:
href: /companies/a68cb447-182d-4bbe-be1a-f526d11d69d5/connections/dfbf847b-cde8-4b00-b2f9-af51dec0d337/data/commerce-transactions?page=2&pageSize=2
Mollie Test:
value:
results:
- id: re_Azhe8TzfUK
totalAmount: -20
currency: EUR
type: Refund
subType: PaymentRefund
createdDate: '2022-01-17T16:00:46'
modifiedDate: '2022-08-17T11:33:19Z'
- id: re_NPKEJhQveu
totalAmount: -60
currency: EUR
type: Refund
subType: PaymentRefund
createdDate: '2022-01-17T16:00:05'
modifiedDate: '2022-08-17T11:33:19Z'
pageNumber: 1
pageSize: 2
totalResults: 7
_links:
current:
href: /companies/b978f9fe-8d63-4cfc-b2c2-b61b72e22785/connections/d564f8fd-0766-4ab8-a427-7c893f9b9ff6/data/commerce-transactions?page=1&pageSize=2
self:
href: /companies/b978f9fe-8d63-4cfc-b2c2-b61b72e22785/connections/d564f8fd-0766-4ab8-a427-7c893f9b9ff6/data/commerce-transactions
next:
href: /companies/b978f9fe-8d63-4cfc-b2c2-b61b72e22785/connections/d564f8fd-0766-4ab8-a427-7c893f9b9ff6/data/commerce-transactions?page=2&pageSize=2
Shopify:
value:
results:
- id: ShopifyPayment-1633176289438
totalAmount: 175
currency: GBP
type: Payment
subType: charge
transactionSourceRef:
id: '3684116791454'
type: Order
createdDate: '2021-03-19T13:16:26'
modifiedDate: '2023-02-10T15:18:23Z'
sourceModifiedDate: '2021-03-19T13:16:26'
- id: 'ShopifyPayment-1633176289438:Fee'
totalAmount: -4.05
currency: GBP
type: PaymentFee
subType: charge
transactionSourceRef:
id: '3684116791454'
type: Order
createdDate: '2021-03-19T13:16:26'
modifiedDate: '2023-02-10T15:18:23Z'
sourceModifiedDate: '2021-03-19T13:16:26'
pageNumber: 1
pageSize: 2
totalResults: 64
_links:
current:
href: /companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-transactions?page=1&pageSize=2
self:
href: /companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-transactions
next:
href: /companies/0bc1cc44-c6d2-4537-9591-b1ad6b5e3c94/connections/d38fa6d3-d712-4cf6-9d9d-f03bacd87595/data/commerce-transactions?page=2&pageSize=2
Stripe Test:
value:
results:
- id: txn_1HpGQUA8m8S1Gh7OR21pB0Yj
totalAmount: 50
currency: GBP
type: Payment
subType: charge
transactionSourceRef:
id: ch_1HpGQUA8m8S1Gh7Ot4WDTus5
type: Payment
createdDate: '2020-11-19T16:56:06Z'
modifiedDate: '2022-09-30T11:18:28Z'
- id: 'txn_1HpGQUA8m8S1Gh7OR21pB0Yj:Stripe processing fees'
totalAmount: -0.9
currency: GBP
type: PaymentFee
subType: stripe_fee
transactionSourceRef:
id: ch_1HpGQUA8m8S1Gh7Ot4WDTus5
type: Payment
createdDate: '2020-11-19T16:56:06Z'
modifiedDate: '2022-09-30T11:18:28Z'
pageNumber: 1
pageSize: 2
totalResults: 70
_links:
current:
href: /companies/8206e78e-e340-411e-b315-473c4ab73b48/connections/43e58373-0a1d-44a0-97f0-9fa9993a14fa/data/commerce-transactions?page=1&pageSize=2
self:
href: /companies/8206e78e-e340-411e-b315-473c4ab73b48/connections/43e58373-0a1d-44a0-97f0-9fa9993a14fa/data/commerce-transactions
next:
href: /companies/8206e78e-e340-411e-b315-473c4ab73b48/connections/43e58373-0a1d-44a0-97f0-9fa9993a14fa/data/commerce-transactions?page=2&pageSize=2
SumUp:
value:
results:
- id: 46d36a64-ea48-4e37-9340-3548cbf3ca2f
totalAmount: 15
currency: GBP
type: Payment
subType: PAYMENT
createdDate: '2021-03-26T21:09:59Z'
modifiedDate: '2022-09-14T10:58:03Z'
- id: 471914a4-a82f-4fc4-b39b-9986fd706d26
totalAmount: 215
currency: GBP
type: Payment
subType: PAYMENT
createdDate: '2021-03-30T12:22:14Z'
modifiedDate: '2022-09-14T10:58:03Z'
pageNumber: 1
pageSize: 2
totalResults: 3
_links:
current:
href: /companies/e170dbe2-be50-474f-b449-82add37108de/connections/1e631dd5-a30b-4bad-ad5c-315c9743535b/data/commerce-transactions?page=1&pageSize=2
self:
href: /companies/e170dbe2-be50-474f-b449-82add37108de/connections/1e631dd5-a30b-4bad-ad5c-315c9743535b/data/commerce-transactions
next:
href: /companies/e170dbe2-be50-474f-b449-82add37108de/connections/1e631dd5-a30b-4bad-ad5c-315c9743535b/data/commerce-transactions?page=2&pageSize=2
Zettle:
value:
results:
- id: 'PAYMENT:09b94cfc-2d98-11eb-8021-0e1b9dcbeca1'
totalAmount: 25
currency: GBP
type: Payment
transactionSourceRef:
id: 09b94cfc-2d98-11eb-8021-0e1b9dcbeca1
type: Unknown
createdDate: '2020-11-23T14:27:38Z'
modifiedDate: '2021-10-27T15:23:04Z'
sourceModifiedDate: '2020-11-25T23:10:01Z'
- id: 'PAYMENT:226580d6-2d98-11eb-a35c-fed5e63de507'
totalAmount: 58.5
currency: GBP
type: Payment
transactionSourceRef:
id: 226580d6-2d98-11eb-a35c-fed5e63de507
type: Unknown
createdDate: '2020-11-23T14:28:20Z'
modifiedDate: '2021-10-27T15:23:04Z'
sourceModifiedDate: '2020-11-25T23:10:02Z'
pageNumber: 1
pageSize: 2
totalResults: 16
_links:
current:
href: /companies/9d448ad0-4508-47fc-bd3b-6950493151f1/connections/c7baa8da-3302-464b-8aa1-edcd4c900902/data/commerce-transactions?page=1&pageSize=2
self:
href: /companies/9d448ad0-4508-47fc-bd3b-6950493151f1/connections/c7baa8da-3302-464b-8aa1-edcd4c900902/data/commerce-transactions
next:
href: /companies/9d448ad0-4508-47fc-bd3b-6950493151f1/connections/c7baa8da-3302-464b-8aa1-edcd4c900902/data/commerce-transactions?page=2&pageSize=2
'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'
'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 transactions* endpoint returns a list of [transactions](https://docs.codat.io/commerce-api#/schemas/Transaction) for a given company's connection.
[Transactions](https://docs.codat.io/commerce-api#/schemas/Transaction) detail all financial affairs recorded in the commerce or point of sale system.
Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-commerce-v1-api#/operations/refresh-company-data).
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/pageSize'
- $ref: '#/components/parameters/query'
- $ref: '#/components/parameters/orderBy'
'/companies/{companyId}/connections/{connectionId}/data/commerce-transactions/{transactionId}':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
- name: transactionId
in: path
required: true
schema:
type: string
examples:
$ref: '#/components/schemas/CommerceOrder/allOf/0/properties/id/examples'
description: Unique identifier for a transaction.
get:
summary: Get transaction
tags:
- Commerce transactions
operationId: get-commerce-transaction
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CommerceTransaction'
examples:
Mollie:
value:
id: re_Azhe8TzfUK
totalAmount: -20
currency: EUR
type: Refund
createdDate: '2022-01-17T16:00:46'
modifiedDate: '2022-03-17T15:47:28Z'
Mollie Test:
value:
id: re_Azhe8TzfUK
totalAmount: -20
currency: EUR
type: Refund
subType: PaymentRefund
createdDate: '2022-01-17T16:00:46'
modifiedDate: '2022-08-17T11:33:19Z'
Shopify:
value:
id: ShopifyPayment-1633176289438
totalAmount: 175
currency: GBP
type: Payment
subType: charge
transactionSourceRef:
id: '3684116791454'
type: Order
createdDate: '2021-03-19T13:16:26'
modifiedDate: '2023-02-10T15:18:23Z'
sourceModifiedDate: '2021-03-19T13:16:26'
Stripe Test:
value:
id: txn_1HpGQUA8m8S1Gh7OR21pB0Yj
totalAmount: 50
currency: GBP
type: Payment
subType: charge
transactionSourceRef:
id: ch_1HpGQUA8m8S1Gh7Ot4WDTus5
type: Payment
createdDate: '2020-11-19T16:56:06Z'
modifiedDate: '2022-09-30T11:18:28Z'
SumUp:
value:
id: 46d36a64-ea48-4e37-9340-3548cbf3ca2f
totalAmount: 15
currency: GBP
type: Payment
subType: PAYMENT
createdDate: '2021-03-26T21:09:59Z'
modifiedDate: '2022-09-14T10:58:03Z'
Zettle:
value:
id: 'PAYMENT:09b94cfc-2d98-11eb-8021-0e1b9dcbeca1'
totalAmount: 25
currency: GBP
type: Payment
transactionSourceRef:
id: 09b94cfc-2d98-11eb-8021-0e1b9dcbeca1
type: Unknown
createdDate: '2020-11-23T14:27:38Z'
modifiedDate: '2021-10-27T15:23:04Z'
sourceModifiedDate: '2020-11-25T23:10:01Z'
'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'
description: |
The *Get transaction* endpoint returns a single transaction for a given transactionId.
[Transactions](https://docs.codat.io/commerce-api#/schemas/Transaction) detail all financial affairs recorded in the commerce or point of sale system.
Check out our [coverage explorer](https://knowledge.codat.io/supported-features/commerce?view=tab-by-data-type&dataType=commerce-transactions) for integrations that support getting a specific transaction.
Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-commerce-v1-api#/operations/refresh-company-data).
components:
schemas:
AccountingAccount:
title: 'Accounting: Account'
description: "\uFEFF> **Language tip:** Accounts are also referred to as **chart of accounts**, **nominal accounts**, and **general ledger**.\n\nView the coverage for accounts in the Data coverage explorer.\n\n## Overview\n\nAccounts are the categories a business uses to record accounting transactions. From the Accounts endpoints, you can retrieve a list of all accounts for a specified company.\n\nThe categories for an account include:\n* Asset\n* Expense\n* Income\n* Liability\n* Equity.\n\nThe same account may have a different category based on the integration it is used in. For example, a current account (known as checking in the US) should be categorized as `Asset.Current` for Xero, and `Asset.Bank.Checking` for QuickBooks Online.\n\nAt the same time, each integration may have its own requirements to the categories. For example, a Paypal account in Xero is of the `Asset.Bank` category and therefore requires additional properties to be provided.\n\nTo determine the list of allowed categories for a specific integration, you can:\n- Follow our [Create, update, delete data](https://docs.codat.io/using-the-api/push) guide and use the [Get create account model](https://docs.codat.io/accounting-api#/operations/get-create-chartOfAccounts-model).\n- Refer to the integration's own documentation.\n\n> **Accounts with no category**\n>\n> If an account is pulled from the chart of accounts and its nominal code does not lie within the category layout for the company's accounts, then the **type** is `Unknown`. The **fullyQualifiedCategory** and **fullyQualifiedName** fields return `null`.\n>\n> This approach gives a true representation of the company's accounts whilst preventing distorting financials such as a company's profit and loss and balance sheet reports."
allOf:
- properties:
id:
type: string
description: 'Identifier for the account, unique for the company.'
example: 1b6266d1-1e44-46c5-8eb5-a8f98e03124e
- $ref: '#/components/schemas/AccountingAccount/definitions/accountPrototype'
- properties:
metadata:
title: Metadata
type: object
x-internal: true
properties:
isDeleted:
type: boolean
description: Indicates whether the record has been deleted in the third-party system this record originated from.
nullable: true
- $ref: '#/components/schemas/CommerceOrder/allOf/3'
definitions:
accountPrototype:
title: Account prototype
type: object
properties:
nominalCode:
type: string
nullable: true
description: Reference given to each nominal account for a business. It ensures money is allocated to the correct account. This code isn't a unique identifier in the Codat system.
example: '610'
name:
type: string
nullable: true
description: Name of the account.
example: Accounts Receivable
description:
type: string
nullable: true
description: Description for the account.
example: Invoices the business has issued but has not yet collected payment on.
fullyQualifiedCategory:
type: string
nullable: true
description: "Full category of the account. \r\n\r\nFor example, `Liability.Current` or `Income.Revenue`. To determine a list of possible categories for each integration, see our examples, follow our [Create, update, delete data](https://docs.codat.io/using-the-api/push) guide, or refer to the integration's own documentation."
example: Asset.Current
fullyQualifiedName:
type: string
nullable: true
description: |-
Full name of the account, for example:
- `Cash On Hand`
- `Rents Held In Trust`
- `Fixed Asset`
examples:
- Cash On Hand
- Fixed Asset
currency:
title: Currency
x-internal: true
type: string
description: |-
The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
## Unknown currencies
In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
There are only a very small number of edge cases where this currency code is returned by the Codat system.
format: ISO4217
examples:
- GBP
- USD
- EUR
currentBalance:
type: number
format: decimal
nullable: true
description: Current balance in the account.
example: 0
type:
$ref: '#/components/schemas/AccountingAccount/definitions/accountType'
status:
$ref: '#/components/schemas/AccountingAccount/definitions/accountStatus'
isBankAccount:
type: boolean
description: Confirms whether the account is a bank account or not.
validDatatypeLinks:
type: array
nullable: true
description: 'The validDatatypeLinks can be used to determine whether an account can be correctly mapped to another object; for example, accounts with a `type` of `income` might only support being used on an Invoice and Direct Income. For more information, see [Valid Data Type Links](/accounting-api#/schemas/ValidDataTypeLinks).'
items:
title: Valid data type links
description: |-
When querying Codat's data model, some data types return `validDatatypeLinks` metadata in the JSON response. This indicates where that object can be used as a reference—a _valid link_—when creating or updating other data.
For example, `validDatatypeLinks` might indicate the following references:
- Which tax rates are valid to use on the line item of a bill.
- Which items can be used when creating an invoice.
You can use `validDatatypeLinks` to present your SMB customers with only valid choices when selecting objects from a list, for example.
## `validDatatypeLinks` example
The following example uses the `Accounting.Accounts` data type. It shows that, on the linked integration, this account is valid as the account on a payment or bill payment; and as the account referenced on the line item of a direct income or direct cost. Because there is no valid link to Invoices or Bills, using this account on those data types will result in an error.
```json validDatatypeLinks for an account
{
"id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4",
"nominalCode": "090",
"name": "Business Bank Account",
#...
"validDatatypeLinks": [
{
"property": "Id",
"links": [
"Payment.AccountRef.Id",
"BillPayment.AccountRef.Id",
"DirectIncome.LineItems.AccountRef.Id",
"DirectCost.LineItems.AccountRef.Id"
]
}
]
}
```
## Support for `validDatatypeLinks`
Codat currently supports `validDatatypeLinks` for some data types on our Xero, QuickBooks Online, QuickBooks Desktop, Exact (NL), and Sage Business Cloud integrations.
If you'd like us to extend support to more data types or integrations, suggest or vote for this on our Product Roadmap.
type: object
properties:
property:
type: string
nullable: true
description: The property from the account that can be linked.
links:
type: array
nullable: true
description: Supported `dataTypes` that the record can be linked to.
items:
type: string
supplementalData:
$ref: '#/components/schemas/SupplementalData'
accountRef:
title: Account reference
type: object
description: 'Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account.'
properties:
id:
type: string
description: '''id'' from the Accounts data type.'
name:
type: string
description: '''name'' from the Accounts data type.'
accountType:
title: Account type
enum:
- Unknown
- Asset
- Expense
- Income
- Liability
- Equity
type: string
description: Type of account
example: Asset
accountStatus:
title: Account status
enum:
- Unknown
- Active
- Archived
- Pending
type: string
description: Status of the account
example: Active
type: object
AccountingAccounts:
title: 'Accounting: Accounts'
x-internal: true
allOf:
- type: object
properties:
results:
type: array
items:
$ref: '#/components/schemas/AccountingAccount'
- $ref: '#/components/schemas/PagingInfo'
AccountingBankAccount:
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 datatype [here](https://docs.codat.io/banking-api#/schemas/Account)
> View the coverage for bank accounts in the Data coverage explorer.
## 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/AccountingBankAccount/definitions/bankAccountPrototype'
- properties:
metadata:
$ref: '#/components/schemas/AccountingAccount/allOf/2/properties/metadata'
supplementalData:
$ref: '#/components/schemas/SupplementalData'
- $ref: '#/components/schemas/CommerceOrder/allOf/3'
definitions:
bankAccountPrototype:
title: Bank account prototype
type: object
properties:
accountName:
type: string
nullable: true
description: Name of the bank account in the accounting software.
accountType:
title: Bank Account Type
x-internal: true
enum:
- Unknown
- Credit
- Debit
type: string
description: |-
The type of transactions and balances on the account.
For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities.
For Debit accounts, positive balances are assets, and positive transactions **increase** assets.
nominalCode:
type: string
nullable: true
description: Code used to identify each nominal account for a business.
sortCode:
type: string
nullable: true
description: |-
Sort code for the bank account.
Xero integrations
The sort code is only displayed when the currency = GBP and the sort code and account number sum to 14 digits. For non-GBP accounts, this field is not populated.
accountNumber:
type: string
nullable: true
description: |-
Account number for the bank account.
Xero integrations
Only a UK account number shows for bank accounts with GBP currency and a combined total of sort code and account number that equals 14 digits, For non-GBP accounts, the full bank account number is populated.
FreeAgent integrations
For Credit accounts, only the last four digits are required. For other types, the field is optional.
iBan:
type: string
nullable: true
description: International bank account number of the account. Often used when making or receiving international payments.
currency:
$ref: '#/components/schemas/AccountingAccount/definitions/accountPrototype/properties/currency'
description: Base currency of the bank account.
balance:
type: number
format: decimal
nullable: true
description: Balance of the bank account.
institution:
type: string
nullable: true
description: The institution of the bank account.
availableBalance:
type: number
format: decimal
nullable: true
description: Total available balance of the bank account as reported by the underlying data source. This may take into account overdrafts or pending transactions for example.
overdraftLimit:
type: number
format: decimal
nullable: true
description: |-
Pre-arranged overdraft limit of the account.
The value is always positive. For example, an overdraftLimit of `1000` means that the balance of the account can go down to `-1000`.
status:
$ref: '#/components/schemas/AccountingBankAccount/definitions/bankAccountStatus'
bankAccountCreateResponse:
title: Create bank account response
allOf:
- properties:
data:
allOf:
- $ref: '#/components/schemas/AccountingBankAccount'
- 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/AccountingBankAccount'
- $ref: '#/components/schemas/PagingInfo'
bankAccountStatus:
title: Account status
enum:
- Unknown
- Active
- Archived
- Pending
type: string
description: Status of the bank account.
example: Active
AccountingBankAccounts:
x-internal: true
title: 'Accounting: Bank accounts'
allOf:
- type: object
properties:
results:
type: array
items:
$ref: '#/components/schemas/AccountingBankAccount'
- $ref: '#/components/schemas/PagingInfo'
AccountingCompanyDataset:
title: 'Accounting: Company profile'
description: |-
> View the coverage for company profile in the Data coverage explorer.
Company info provides standard details about a linked company such as their address, phone number, and company registration.
> **Company information or companies?**
>
> Company profile is standard information that is held in the accounting software about a company. `Companies` is an endpoint that lists businesses in the Codat system that have linked and shared their data sources.
type: object
properties:
companyName:
type: string
nullable: true
description: Name of the linked company.
accountingPlatformRef:
type: string
nullable: true
description: Identifier or reference for the company in the accounting software.
companyLegalName:
type: string
nullable: true
description: Registered legal name of the linked company.
addresses:
type: array
nullable: true
description: An array of Addresses.
items:
title: 'Accounting: Address'
x-internal: true
type: object
properties:
type:
$ref: '#/components/schemas/AccountingCompanyDataset/properties/addresses/items/definitions/accountingAddressType'
line1:
type: string
nullable: true
description: Line 1 of the customer address.
line2:
type: string
nullable: true
description: Line 2 of the customer address.
city:
type: string
nullable: true
description: City of the customer address.
region:
type: string
nullable: true
description: Region of the customer address.
country:
type: string
nullable: true
description: Country of the customer address.
postalCode:
type: string
nullable: true
description: Postal code or zip code.
required:
- type
definitions:
accountingAddressType:
description: The type of the address
type: string
enum:
- Unknown
- Billing
- Delivery
phoneNumbers:
type: array
nullable: true
description: An array of phone numbers.
items:
title: Phone
type: object
x-internal: true
properties:
number:
type: string
nullable: true
examples:
- +44 25691 154789
- (877) 492-8687
- 01224 658 999
description: A phone number.
type:
$ref: '#/components/schemas/AccountingCompanyDataset/properties/phoneNumbers/items/definitions/phoneNumberType'
required:
- type
definitions:
phoneNumberType:
description: The type of phone number
type: string
enum:
- Primary
- Landline
- Mobile
- Fax
- Unknown
webLinks:
type: array
nullable: true
description: An array of weblinks.
items:
title: Weblink
description: Weblink associated with the company.
type: object
properties:
type:
description: The type of the weblink.
type: string
enum:
- Website
- Social
- Unknown
url:
description: The full URL for the weblink.
type: string
format: url
example:
type: Website
url: 'https://codat.io'
ledgerLockDate:
$ref: '#/components/schemas/Dataset/properties/requested'
description: 'If set in the accounting software, the date (in the ISO 8601 date/time format) after which accounting transactions cannot be edited. Commonly used when books are closed at year-end.'
registrationNumber:
type: string
nullable: true
description: Registration number given to the linked company by the companies authority in the country of origin. In the UK this is Companies House.
taxNumber:
type: string
nullable: true
description: Company tax number.
financialYearStartDate:
$ref: '#/components/schemas/Dataset/properties/requested'
description: Start date of the financial year for the company.
baseCurrency:
type: string
nullable: true
description: Currency set in the accounting software of the linked company. Used by the currency rate.
sourceUrls:
type: object
additionalProperties:
type: string
nullable: true
nullable: true
description: |-
URL addresses for the accounting source.
For example, for Xero integrations two URLs are returned. These have many potential use cases, such as [deep linking](https://developer.xero.com/documentation/api-guides/deep-link-xero).
createdDate:
$ref: '#/components/schemas/Dataset/properties/requested'
description: Date the linked company was created in the accounting software.
supplementalData:
$ref: '#/components/schemas/SupplementalData'
examples:
- companyName: ACME Corporation
accountingPlatformRef: 4444e827-401b-4925-92cb-d79086bf3b6b
companyLegalName: ACME Corporation Ltd.
addresses:
- type: Billing
line1: Warner House
line2: 98 Theobald's Road
city: London
region: ''
country: United Kingdom
postalcode: WC1X 8WB
- type: Unknown
line1: 123 Sierra Way
line2: ''
city: San Pablo
region: CA
country: ''
postalCode: '87999'
phoneNumbers:
- number: 010 1234 5678
type: Landline
webLinks:
- type: Website
url: 'https://www.wbsl.com/'
ledgerLockDate: '2019-03-04T12:08:01.881Z'
registrationNumber: '1234567890'
taxNumber: GB 123456789
financialYearStartDate: '2019-04-01T00:00:00Z'
baseCurrency: USD
sourceUrls:
url1: 'https://go.xero.com/organisationlogin/default.aspx?shortcode=!rxs0Q'
url2: 'https://reporting.xero.com/!rxs0Q'
createdDate: '2020-02-03T16:42:02Z'
AccountingCreateAccountResponse:
title: 'Accounting: Create account response'
x-internal: true
allOf:
- type: object
properties:
data:
allOf:
- $ref: '#/components/schemas/AccountingAccount'
- deprecated: true
- $ref: '#/components/schemas/PushOperation'
AccountingCreateCreditNoteResponse:
title: 'Accounting: Create credit note response'
x-internal: true
allOf:
- type: object
properties:
data:
allOf:
- $ref: '#/components/schemas/AccountingCreditNote'
- deprecated: true
- $ref: '#/components/schemas/PushOperation'
AccountingCreateCustomerResponse:
title: 'Accounting: Create customer response'
x-internal: true
allOf:
- type: object
properties:
data:
allOf:
- $ref: '#/components/schemas/AccountingCustomer'
- deprecated: true
- $ref: '#/components/schemas/PushOperation'
AccountingCreateDirectIncomeResponse:
title: 'Accounting: Create direct income response'
x-internal: true
allOf:
- type: object
properties:
data:
allOf:
- $ref: '#/components/schemas/AccountingDirectIncome'
- deprecated: true
- $ref: '#/components/schemas/PushOperation'
AccountingCreateInvoiceResponse:
title: 'Accounting: Create invoice response'
x-internal: true
allOf:
- type: object
properties:
data:
allOf:
- $ref: '#/components/schemas/AccountingInvoice'
- deprecated: true
- $ref: '#/components/schemas/PushOperation'
AccountingCreateJournalEntryResponse:
title: 'Accounting: Create journal entry response'
x-internal: true
allOf:
- type: object
properties:
data:
allOf:
- $ref: '#/components/schemas/AccountingJournalEntry'
- deprecated: true
- $ref: '#/components/schemas/PushOperation'
AccountingCreatePaymentResponse:
title: 'Accounting: Create payment response'
x-internal: true
allOf:
- type: object
properties:
data:
allOf:
- $ref: '#/components/schemas/AccountingPayment'
- deprecated: true
- $ref: '#/components/schemas/PushOperation'
AccountingCreditNote:
title: 'Accounting: Credit note'
description: |-
> View the coverage for credit notes in the Data coverage explorer.
## Overview
Think of a credit note as a voucher issued to a customer. It is a reduction that can be applied against one or multiple invoices. A credit note can either reduce the amount owed or cancel out an invoice entirely.
In the Codat system a credit note is issued to a [customer's](https://docs.codat.io/accounting-api#/schemas/Customer) accounts receivable.
It contains details of:
* The amount of credit remaining and its status.
* Payment allocations against the payments type, in this case an invoice.
* Which customers the credit notes have been issued to.
type: object
allOf:
- type: object
properties:
id:
type: string
description: 'Identifier for the credit note, unique to the company in the accounting software.'
creditNoteNumber:
type: string
nullable: true
description: Friendly reference for the credit note.
customerRef:
$ref: '#/components/schemas/AccountingCustomer/definitions/accountingCustomerRef'
description: Reference to the customer the credit note has been issued to.
withholdingTax:
type: array
nullable: true
items:
$ref: '#/components/schemas/AccountingInvoice/allOf/0/properties/withholdingTax/items'
totalAmount:
type: number
format: decimal
description: Total amount of credit that has been applied to the customer's accounts receivable
totalDiscount:
type: number
format: decimal
description: Any discounts applied to the credit note amount.
subTotal:
type: number
format: decimal
description: 'Value of the credit note, including discounts and excluding tax.'
additionalTaxAmount:
type: number
format: decimal
description: Additional tax amount applied to credit note.
additionalTaxPercentage:
type: number
format: decimal
description: Percentage rate of any additional tax applied to the credit note.
totalTaxAmount:
type: number
format: decimal
description: Any tax applied to the credit note amount.
discountPercentage:
type: number
format: decimal
description: Percentage rate (from 0 to 100) of discounts applied to the credit note.
remainingCredit:
type: number
format: decimal
description: Unused balance of totalAmount originally raised.
status:
$ref: '#/components/schemas/AccountingCreditNote/definitions/creditNoteStatus'
description: Current state of the credit note.
issueDate:
$ref: '#/components/schemas/Dataset/properties/requested'
description: Date of the credit note as recorded in the accounting system.
allocatedOnDate:
$ref: '#/components/schemas/Dataset/properties/requested'
description: Date on which the credit note was fully allocated.
currency:
$ref: '#/components/schemas/AccountingAccount/definitions/accountPrototype/properties/currency'
description: Currency of the credit note.
currencyRate:
$ref: '#/components/schemas/AccountingPayment/definitions/paymentLineLink/properties/currencyRate'
lineItems:
type: array
nullable: true
items:
$ref: '#/components/schemas/AccountingCreditNote/definitions/creditNoteLineItem'
paymentAllocations:
type: array
nullable: true
description: An array of payment allocations.
items:
$ref: '#/components/schemas/AccountingInvoice/allOf/0/properties/paymentAllocations/items'
note:
type: string
nullable: true
description: 'Any additional information about the credit note. Where possible, Codat links to a data field in the accounting software that is publicly available. This means that the contents of the note field are included when a credit note is emailed from the accounting software to the customer.'
metadata:
$ref: '#/components/schemas/AccountingAccount/allOf/2/properties/metadata'
supplementalData:
$ref: '#/components/schemas/SupplementalData'
- $ref: '#/components/schemas/CommerceOrder/allOf/3'
required:
- totalAmount
- totalDiscount
- subTotal
- totalTaxAmount
- discountPercentage
- remainingCredit
- status
definitions:
creditNoteStatus:
title: Credit note status
description: Current state of the credit note.
type: string
enum:
- Unknown
- Draft
- Submitted
- Paid
- Void
- PartiallyPaid
creditNoteLineItem:
type: object
properties:
description:
type: string
nullable: true
description: 'Friendly name of each line item. For example, the goods or service for which credit has been issued.'
unitAmount:
type: number
format: decimal
description: Unit price of the goods or service.
quantity:
type: number
format: decimal
description: Number of units of the goods or service for which credit has been issued.
discountAmount:
type: number
format: decimal
nullable: true
description: Value of any discounts applied.
subTotal:
type: number
format: decimal
nullable: true
description: 'Amount of credit associated with the line item, including discounts but excluding tax.'
taxAmount:
type: number
format: decimal
nullable: true
description: Amount of tax associated with the line item.
totalAmount:
type: number
format: decimal
nullable: true
description: 'Total amount of the line item, including discounts and tax.'
accountRef:
$ref: '#/components/schemas/AccountingAccount/definitions/accountRef'
description: Reference to the account to which the line item is linked.
discountPercentage:
type: number
format: decimal
nullable: true
description: Percentage rate of any discount applied to the line item.
taxRateRef:
$ref: '#/components/schemas/AccountingDirectIncome/definitions/directIncomeLineItem/properties/taxRateRef'
description: Reference to the tax rate to which the line item is linked.
itemRef:
$ref: '#/components/schemas/AccountingDirectIncome/definitions/directIncomeLineItem/properties/itemRef'
description: Reference to the item the line is linked to.
trackingCategoryRefs:
type: array
nullable: true
deprecated: true
description: Reference to the tracking categories to which the line item is linked.
items:
$ref: '#/components/schemas/AccountingDirectIncome/definitions/directIncomeLineItem/properties/trackingCategoryRefs/items'
tracking:
title: Tracking
x-internal: true
type: object
description: 'Categories, and a project and customer, against which the item is tracked.'
properties:
categoryRefs:
type: array
items:
$ref: '#/components/schemas/AccountingDirectIncome/definitions/directIncomeLineItem/properties/trackingCategoryRefs/items'
customerRef:
$ref: '#/components/schemas/AccountingCustomer/definitions/accountingCustomerRef'
projectRef:
title: 'Accounting: Project reference'
x-internal: true
required:
- id
type: object
properties:
id:
minLength: 1
type: string
description: Unique identifier to the project reference.
name:
type: string
nullable: true
description: The project's name.
isBilledTo:
$ref: '#/components/schemas/AccountingCreditNote/definitions/creditNoteLineItem/properties/tracking/definitions/billedToType'
isRebilledTo:
$ref: '#/components/schemas/AccountingCreditNote/definitions/creditNoteLineItem/properties/tracking/definitions/billedToType'
recordRef:
type: object
x-internal: true
title: Record reference
description: |-
Links the current record to the underlying record or data type that created it.
For example, if a journal entry is generated based on an invoice, this property allows you to connect the journal entry to the underlying invoice in our data model.
properties:
id:
type: string
description: '''id'' of the underlying record or data type.'
dataType:
type: string
description: Allowed name of the 'dataType'.
examples:
- journalEntry
- invoice
- accountTransaction
- transfer
required:
- categoryRefs
- isBilledTo
- isRebilledTo
definitions:
billedToType:
type: string
enum:
- Unknown
- NotApplicable
- Project
description: Defines if the bill or bill credit note is billed/rebilled to a project.
isDirectIncome:
type: boolean
description: The credit note is a direct income if `True`.
required:
- unitAmount
- quantity
examples:
- - id: 0316bd24-8a01-4a3a-a0e5-a73f14ebcbec
creditNoteNumber: '5239277'
customerRef:
id: b5511228-b9ef-4713-91b1-ad2cf60eadb1
companyName: Tool Hire Company
totalAmount: 550
totalDiscount: 0
subTotal: 0
totalTaxAmount: 0
discountPercentage: 0
remainingCredit: 550
status: Submitted
issueDate: '2018-03-28T21:28:58.249Z'
allocatedOnDate: null
note: More information available on request.
currency: USD
currencyRate: null
lineItems:
- description: Anvil10000Lb
unitAmount: 50
quantity: 10
discountAmount: 0
subTotal: 500
taxAmount: 50
totalAmount: 550
accountRef:
id: 3f267b10-757d-44c0-bef9-20f70cc8fbe3
name: null
discountPercentage: null
taxRateRef:
id: 6c88aff3-7cb9-4980-a3d3-443e72e02498
name: null
itemRef:
id: '1'
name: null
paymentAllocations: []
modifiedDate: null
sourceModifiedDate: null
AccountingCustomer:
title: 'Accounting: Customer'
description: |
> View the coverage for customers in the Data coverage explorer.
## Overview
A customer is a person or organisation that buys goods or services. From the Customers endpoints, you can retrieve a [list of all the customers of a company](https://api.codat.io/swagger/index.html#/Customers/get_companies__companyId__data_customers).
Customers' data links to accounts receivable [invoices](https://docs.codat.io/accounting-api#/schemas/Invoice).
type: object
allOf:
- type: object
properties:
id:
type: string
description: 'Identifier for the customer, unique to the company in the accounting software.'
customerName:
type: string
nullable: true
description: 'Name of the customer as recorded in the accounting system, typically the company name.'
contactName:
type: string
nullable: true
description: Name of the main contact for the identified customer.
emailAddress:
type: string
nullable: true
description: Email address the customer can be contacted by.
defaultCurrency:
$ref: '#/components/schemas/AccountingAccount/definitions/accountPrototype/properties/currency'
description: Default currency the transactional data of the customer is recorded in.
phone:
type: string
nullable: true
description: Phone number the customer can be contacted by.
addresses:
type: array
nullable: true
description: An array of Addresses.
items:
$ref: '#/components/schemas/AccountingCompanyDataset/properties/addresses/items'
contacts:
type: array
nullable: true
description: An array of Contacts.
items:
$ref: '#/components/schemas/AccountingCustomer/definitions/contact'
registrationNumber:
type: string
nullable: true
description: 'Company number. In the UK, this is typically the Companies House company registration number.'
taxNumber:
type: string
nullable: true
description: Company tax number.
status:
$ref: '#/components/schemas/AccountingCustomer/definitions/customerStatus'
description: Current state of the customer.
metadata:
$ref: '#/components/schemas/AccountingAccount/allOf/2/properties/metadata'
supplementalData:
$ref: '#/components/schemas/SupplementalData'
- $ref: '#/components/schemas/CommerceOrder/allOf/3'
required:
- status
definitions:
accountingCustomerRef:
type: object
properties:
id:
minLength: 1
type: string
description: '`id` from the Customers data type'
companyName:
type: string
nullable: true
description: '`customerName` from the Customer data type'
required:
- id
customerStatus:
description: Status of customer.
type: string
enum:
- Unknown
- Active
- Archived
contact:
type: object
properties:
name:
type: string
nullable: true
description: Name of a contact for a customer.
email:
type: string
nullable: true
description: Email of a contact for a customer.
phone:
type: array
nullable: true
description: An array of Phone numbers.
items:
$ref: '#/components/schemas/AccountingCompanyDataset/properties/phoneNumbers/items'
address:
$ref: '#/components/schemas/AccountingCompanyDataset/properties/addresses/items'
description: An object of Address information.
status:
$ref: '#/components/schemas/AccountingCustomer/definitions/customerStatus'
modifiedDate:
$ref: '#/components/schemas/Dataset/properties/requested'
required:
- status
AccountingDirectIncome:
title: 'Accounting: Direct income'
description: |
> **Language tip:** Direct incomes may also be referred to as **Receive transactions**, **Receive money transactions**, **Sales receipts**, or **Cash sales** in various accounting software.
> View the coverage for direct incomes in the Data coverage explorer.
## Overview
Direct incomes are incomes received directly from the business' operations. For example, cash sales of items to a customer, referral commissions, and service fee refunds are considered direct incomes.
Direct incomes include:
- Selling an item directly to a contact, and receiving payment at the point of the sale.
- Refunding an item in cash to a contact.
- Depositing money into a bank account.
Direct incomes is a child data type of [account transactions](https://docs.codat.io/accounting-api#/schemas/AccountTransaction).
type: object
allOf:
- type: object
properties:
id:
type: string
description: 'Identifier of the direct income, unique for the company.'
reference:
type: string
nullable: true
description: User-friendly reference for the direct income.
note:
type: string
nullable: true
description: An optional note on the direct income that can be used to assign the direct income with a reference ID in your application.
contactRef:
$ref: '#/components/schemas/AccountingJournalEntry/definitions/journalLine/properties/contactRef'
description: A customer or supplier associated with the direct income.
issueDate:
$ref: '#/components/schemas/Dataset/properties/requested'
description: The date of the direct income as recorded in the accounting software.
currency:
$ref: '#/components/schemas/AccountingAccount/definitions/accountPrototype/properties/currency'
description: The currency of the direct income.
currencyRate:
$ref: '#/components/schemas/AccountingPayment/definitions/paymentLineLink/properties/currencyRate'
lineItems:
type: array
description: An array of line items.
items:
$ref: '#/components/schemas/AccountingDirectIncome/definitions/directIncomeLineItem'
paymentAllocations:
type: array
items:
$ref: '#/components/schemas/AccountingInvoice/allOf/0/properties/paymentAllocations/items'
subTotal:
type: number
format: decimal
description: 'The total amount of the direct incomes, excluding any taxes.'
taxAmount:
type: number
format: decimal
description: The total amount of tax on the direct incomes.
totalAmount:
type: number
format: decimal
description: 'The amount of the direct incomes, inclusive of tax.'
metadata:
$ref: '#/components/schemas/AccountingAccount/allOf/2/properties/metadata'
supplementalData:
$ref: '#/components/schemas/SupplementalData'
- $ref: '#/components/schemas/CommerceOrder/allOf/3'
required:
- issueDate
- currency
- lineItems
- paymentAllocations
- subTotal
- taxAmount
- totalAmount
definitions:
directIncomeLineItem:
type: object
properties:
description:
type: string
nullable: true
description: A user-friendly name of the goods or services.
unitAmount:
type: number
format: decimal
description: |-
The price of each unit of goods or services.
Note: If the platform does not provide this information, the unit amount will be mapped to the total amount.
quantity:
type: number
format: decimal
description: |-
The number of units of goods or services received.
Note: If the platform does not provide this information, the quantity will be mapped as 1.
discountAmount:
type: number
format: decimal
nullable: true
description: Discount amount for the line before tax.
discountPercentage:
type: number
format: decimal
nullable: true
description: Discount percentage for the line before tax.
subTotal:
type: number
format: decimal
nullable: true
description: 'The amount of the line, inclusive of discounts, but exclusive of tax.'
taxAmount:
type: number
format: decimal
nullable: true
description: |-
The amount of tax for the line.
Note: If the platform does not provide this information, the quantity will be mapped as 0.00.
totalAmount:
type: number
format: decimal
nullable: true
description: 'The total amount of the line, including tax.'
accountRef:
$ref: '#/components/schemas/AccountingAccount/definitions/accountRef'
description: Reference to the account to which the line item is linked.
taxRateRef:
description: Reference to the tax rate to which the line item is linked.
title: Tax rate reference
type: object
properties:
id:
type: string
description: Unique identifier for the tax rate in the accounting software.
name:
type: string
description: Name of the tax rate in the accounting software.
effectiveTaxRate:
type: number
format: decimal
description: Applicable tax rate.
itemRef:
description: 'Reference to the product, service type, or inventory item to which the direct cost is linked.'
title: Item reference
type: object
properties:
id:
minLength: 1
type: string
description: Unique identifier for the item in the accounting software.
name:
type: string
nullable: true
description: Name of the item in the accounting software.
required:
- id
trackingCategoryRefs:
type: array
nullable: true
description: An array of categories against which this direct cost is tracked.
items:
required:
- id
type: object
description: References a category against which the item is tracked.
deprecated: true
properties:
id:
minLength: 1
type: string
description: Unique identifier to the tracking category.
name:
type: string
nullable: true
description: Name of tracking category.
required:
- unitAmount
- quantity
AccountingInvoice:
title: 'Accounting: Invoice'
description: |-
> **Invoices or bills?**
>
> We distinguish between invoices where the company *owes money* vs. *is owed money*. If the company issued an invoice, and is owed money (accounts receivable) we call this an Invoice.
>
> See [Bills](https://docs.codat.io/accounting-api#/schemas/Bill) for the accounts payable equivalent of bills.
View the coverage for invoices in the Data coverage explorer.
## Overview
An invoice is an itemized record of goods sold or services provided to a [customer](https://docs.codat.io/accounting-api#/schemas/Customer).
In Codat, an invoice contains details of:
- The timeline of the invoice—when it was raised, marked as paid, last edited, and so on.
- How much the invoice is for, what portion of the invoice is tax or discounts, and what currency the amounts are represented in.
- Who the invoice has been raised to; the _customer_.
- The breakdown of what the invoice is for; the _line items_.
- Any [payments](https://docs.codat.io/accounting-api#/schemas/Payment) assigned to the invoice; the _payment allocations_.
> **Invoice PDF downloads**
>
> You can download a PDF version of an invoice for supported integrations.
>
> The filename will be invoice-{number}.pdf.
> **Referencing an invoice in Sage 50 and ClearBooks**
>
> In Sage 50 and ClearBooks, you may prefer to use the **invoiceNumber** to identify an invoice rather than the invoice **id**. Each time a draft invoice is submitted or printed, the draft **id** becomes void and a submitted invoice with a new **id** exists in its place. In both platforms, the **invoiceNumber** should remain the same.
type: object
allOf:
- type: object
properties:
id:
type: string
description: 'Identifier for the invoice, unique to the company in the accounting software.'
invoiceNumber:
type: string
nullable: true
description: 'Friendly reference for the invoice. If available, this appears in the file name of invoice attachments.'
customerRef:
$ref: '#/components/schemas/AccountingCustomer/definitions/accountingCustomerRef'
description: Reference to the customer the invoice has been issued to.
salesOrderRefs:
type: array
nullable: true
description: List of references to related Sales orders.
items:
title: Sales order reference
type: object
properties:
id:
type: string
description: Unique identifier to a record in `dataType`.
dataType:
type: string
description: The underlying data type associated to the reference `id`.
enum:
- salesOrders
issueDate:
$ref: '#/components/schemas/Dataset/properties/requested'
description: Date of the invoice as recorded in the accounting system.
dueDate:
$ref: '#/components/schemas/Dataset/properties/requested'
description: Date the customer is due to be paid by.
paidOnDate:
$ref: '#/components/schemas/Dataset/properties/requested'
description: 'Date the invoice was marked as paid in the accounting system. If this field is not available from the accounting software, it is calculated by Codat using associated payments.'
currency:
$ref: '#/components/schemas/AccountingAccount/definitions/accountPrototype/properties/currency'
description: Currency of the invoice.
currencyRate:
$ref: '#/components/schemas/AccountingPayment/definitions/paymentLineLink/properties/currencyRate'
lineItems:
type: array
nullable: true
description: An array of line items.
items:
$ref: '#/components/schemas/AccountingInvoice/definitions/invoiceLineItem'
paymentAllocations:
type: array
nullable: true
description: An array of payment allocations.
items:
title: 'Accounting: Payment allocation'
type: object
properties:
payment:
$ref: '#/components/schemas/AccountingInvoice/allOf/0/properties/paymentAllocations/items/definitions/paymentAllocationPayment'
allocation:
type: object
properties:
currency:
$ref: '#/components/schemas/AccountingAccount/definitions/accountPrototype/properties/currency'
description: The currency of the transaction.
currencyRate:
$ref: '#/components/schemas/AccountingPayment/definitions/paymentLineLink/properties/currencyRate'
allocatedOnDate:
$ref: '#/components/schemas/Dataset/properties/requested'
description: The date the payment was allocated.
totalAmount:
type: number
format: decimal
description: The total amount that has been allocated.
required:
- payment
- allocation
definitions:
paymentAllocationPayment:
type: object
properties:
id:
type: string
description: Identifier of the allocated payment.
note:
type: string
nullable: true
description: Notes attached to the allocated payment.
reference:
type: string
nullable: true
description: Reference to the allocated payment.
accountRef:
$ref: '#/components/schemas/AccountingAccount/definitions/accountRef'
description: The account that the allocated payment is made from or to.
currency:
$ref: '#/components/schemas/AccountingAccount/definitions/accountPrototype/properties/currency'
description: Currency the payment has been made in.
currencyRate:
$ref: '#/components/schemas/AccountingPayment/definitions/paymentLineLink/properties/currencyRate'
paidOnDate:
$ref: '#/components/schemas/Dataset/properties/requested'
description: The date the payment was paid.
totalAmount:
type: number
format: decimal
description: Total amount that was paid.
withholdingTax:
type: array
nullable: true
items:
type: object
properties:
name:
minLength: 1
type: string
description: Name assigned to withheld tax.
amount:
type: number
format: decimal
description: Amount of tax withheld.
required:
- amount
- name
totalDiscount:
type: number
format: decimal
nullable: true
description: Numerical value of discounts applied to the invoice.
subTotal:
type: number
format: decimal
nullable: true
description: Total amount of the invoice excluding any taxes.
additionalTaxAmount:
type: number
format: decimal
description: Additional tax amount applied to invoice.
additionalTaxPercentage:
type: number
format: decimal
description: Percentage rate of any additional tax applied to the invoice.
totalTaxAmount:
type: number
format: decimal
description: Amount of tax on the invoice.
totalAmount:
type: number
format: decimal
description: 'Amount of the invoice, inclusive of tax.'
amountDue:
type: number
format: decimal
description: Amount outstanding on the invoice.
discountPercentage:
type: number
format: decimal
nullable: true
description: 'Percentage rate (from 0 to 100) of discounts applied to the invoice. For example: A 5% discount will return a value of `5`, not `0.05`.'
status:
$ref: '#/components/schemas/AccountingInvoice/definitions/invoiceStatus'
note:
type: string
nullable: true
description: 'Any additional information about the invoice. Where possible, Codat links to a data field in the accounting software that is publicly available. This means that the contents of the note field are included when an invoice is emailed from the accounting software to the customer.'
metadata:
$ref: '#/components/schemas/AccountingAccount/allOf/2/properties/metadata'
supplementalData:
$ref: '#/components/schemas/SupplementalData'
- $ref: '#/components/schemas/CommerceOrder/allOf/3'
required:
- issueDate
- totalTaxAmount
- totalAmount
- amountDue
- status
definitions:
invoiceLineItem:
type: object
properties:
description:
type: string
nullable: true
description: Friendly name of the goods or services provided.
unitAmount:
type: number
format: decimal
description: Price of each unit of goods or services.
quantity:
type: number
format: decimal
description: Number of units of goods or services provided.
discountAmount:
type: number
format: decimal
nullable: true
description: Numerical value of any discounts applied.
subTotal:
type: number
format: decimal
nullable: true
description: 'Amount of the line, inclusive of discounts but exclusive of tax.'
taxAmount:
type: number
format: decimal
nullable: true
description: Amount of tax for the line.
totalAmount:
type: number
format: decimal
nullable: true
description: 'Total amount of the line, including tax. When pushing invoices to Xero, the total amount is exclusive of tax to allow automatic calculations if a tax rate or tax amount is not specified.'
accountRef:
$ref: '#/components/schemas/AccountingAccount/definitions/accountRef'
description: Reference to the account to which the line item is linked.
discountPercentage:
type: number
format: decimal
nullable: true
description: Percentage rate (from 0 to 100) of any discounts applied to the unit amount.
taxRateRef:
$ref: '#/components/schemas/AccountingDirectIncome/definitions/directIncomeLineItem/properties/taxRateRef'
description: Reference to the tax rate to which the line item is linked.
itemRef:
$ref: '#/components/schemas/AccountingDirectIncome/definitions/directIncomeLineItem/properties/itemRef'
description: Reference to the item the line is linked to.
trackingCategoryRefs:
type: array
nullable: true
description: Reference to the tracking categories to which the line item is linked.
items:
$ref: '#/components/schemas/AccountingDirectIncome/definitions/directIncomeLineItem/properties/trackingCategoryRefs/items'
tracking:
$ref: '#/components/schemas/AccountingCreditNote/definitions/creditNoteLineItem/properties/tracking'
isDirectIncome:
type: boolean
description: The invoice is a direct income if `True`.
required:
- unitAmount
- quantity
invoiceStatus:
type: string
enum:
- Unknown
- Draft
- Submitted
- PartiallyPaid
- Paid
- Void
description: |-
Current state of the invoice:
- `Draft` - Invoice hasn't been submitted to the supplier. It may be in a pending state or is scheduled for future submission, for example by email.
- `Submitted` - Invoice is no longer a draft. It has been processed and, or, sent to the customer. In this state, it will impact the ledger. It also has no payments made against it (amountDue == totalAmount).
- `PartiallyPaid` - The balance paid against the invoice is positive, but less than the total invoice amount (0 < amountDue < totalAmount).
- `Paid` - Invoice is paid in full. This includes if the invoice has been credited or overpaid (amountDue == 0).
- `Void` - An invoice can become Void when it's deleted, refunded, written off, or cancelled. A voided invoice may still be PartiallyPaid, and so all outstanding amounts on voided invoices are removed from the accounts receivable account.
AccountingJournalEntry:
title: 'Accounting: Journal entry'
description: |-
> **Language tip:** For the top-level record of a company's financial transactions, refer to the [Journals](https://docs.codat.io/accounting-api#/schemas/Journal) data type
> View the coverage for journal entries in the Data coverage explorer.
## Overview
A journal entry report shows the entries made in a company's general ledger, or [accounts](https://docs.codat.io/accounting-api#/schemas/Account), when transactions are approved. The journal line items for each journal entry should balance.
A journal entry line item is a single transaction line on the journal entry. For example:
- When a journal entry is recording a receipt of cash, the credit to accounts receivable and the debit to cash are separate line items.
- When a company needs to recognise revenue from an annual contract on a monthly basis, on receipt of cash for month one, they make a debit to deferred income and a credit to revenue.
In Codat a journal entry contains details of:
- The date on which the entry was created and posted.
- Itemised lines, including amounts and currency.
- A reference to the associated accounts.
- A reference to the underlying record. For example, the invoice, bill, or other data type that triggered the posting of the journal entry to the general ledger.
> **Pushing journal entries**
> Codat only supports journal entries in the base currency of the company that are pushed into accounts denominated in the same base currency.
type: object
allOf:
- type: object
properties:
id:
type: string
description: Unique identifier of the journal entry for the company in the accounting software.
description:
type: string
nullable: true
description: Optional description of the journal entry.
postedOn:
$ref: '#/components/schemas/Dataset/properties/requested'
description: |-
Date on which the journal entry was posted to the accounting software, and had an impact on the general ledger. This may be different from the creation date.
For example, a user creates a journal entry on Monday and saves it as draft, which has no impact on the general ledger. On Thursday, they return to the entry and post it.
The **createdOn** date shows as Monday.
The **postedOn** date shows as Thursday.
Journal entries can also be backdated, so the **postedOn** date may be earlier than the **createdOn** date.
createdOn:
$ref: '#/components/schemas/Dataset/properties/requested'
description: Date on which the journal was created in the accounting software.
updatedOn:
$ref: '#/components/schemas/Dataset/properties/requested'
description: Date on which the journal was last updated in the accounting software.
journalRef:
title: Journal reference
type: object
additionalProperties: false
description: Links journal entries to the relevant journal in accounting integrations that use multi-book accounting (multiple journals).
properties:
id:
minLength: 1
type: string
description: GUID of the underlying journal.
name:
type: string
maxLength: 256
nullable: true
description: Name of journal
required:
- id
journalLines:
type: array
nullable: true
description: An array of journal lines.
items:
$ref: '#/components/schemas/AccountingJournalEntry/definitions/journalLine'
recordRef:
$ref: '#/components/schemas/AccountingJournalEntry/definitions/journalEntryRecordRef'
metadata:
$ref: '#/components/schemas/AccountingAccount/allOf/2/properties/metadata'
supplementalData:
$ref: '#/components/schemas/SupplementalData'
- $ref: '#/components/schemas/CommerceOrder/allOf/3'
definitions:
journalLine:
type: object
properties:
description:
type: string
nullable: true
description: Description of the journal line item.
netAmount:
type: number
format: decimal
description: 'Amount for the journal line. Debit entries are considered positive, and credit entries are considered negative.'
currency:
type: string
nullable: true
description: Currency for the journal line item.
accountRef:
$ref: '#/components/schemas/AccountingAccount/definitions/accountRef'
tracking:
description: 'List of record refs associated with the tracking information for the line (eg to a Tracking Category, or customer etc.)'
title: Tracking
type: object
properties:
recordRefs:
type: array
items:
$ref: '#/components/schemas/AccountingJournalEntry/definitions/journalLine/properties/tracking/definitions/trackingRecordRef'
nullable: true
definitions:
trackingRecordRef:
type: object
title: Record reference
description: Links to the customer or tracking category.
properties:
id:
type: string
description: '''id'' of the underlying record or data type.'
dataType:
type: string
description: Name of underlying data type.
enum:
- customers
- suppliers
- trackingCategories
example: trackingCategories
contactRef:
title: Contact reference
type: object
properties:
id:
minLength: 1
type: string
description: Unique identifier for a customer or supplier.
dataType:
type: string
nullable: true
description: Allowed name of the 'dataType'.
enum:
- customers
- suppliers
required:
- id
required:
- netAmount
journalEntryRecordRef:
type: object
title: Record reference
description: Links a journal entry to the underlying record that created it.
properties:
id:
type: string
description: '''id'' of the underlying record or data type.'
dataType:
type: string
description: Name of underlying data type.
enum:
- bankTransactions
- billCreditNotes
- billPayments
- bills
- creditNotes
- directCosts
- directIncomes
- invoices
- journalEntries
- payments
- transfers
example: transfers
AccountingPayment:
title: 'Accounting: Payment'
description: "\uFEFF> **Payments or bill payments?**\n>\n> In Codat, payments represent accounts receivable only. For accounts payable, see [bill payments](https://docs.codat.io/accounting-api#/schemas/BillPayment). These include [bills](https://docs.codat.io/accounting-api#/schemas/Bill) and credit notes against bills.\n\n> View the coverage for payments in the Data coverage explorer.\n\n## Overview\n\nPayments include all accounts receivable transaction data. This includes [invoices](https://docs.codat.io/accounting-api#/schemas/Invoice) and [credit notes](https://docs.codat.io/accounting-api#/schemas/CreditNote).\n\nA payment in Codat usually represents an allocation of money within any customer accounts receivable account. This includes, but is not strictly limited to:\n\n- A payment made against an invoice, like a credit card, cheque, or cash payment.\n- An allocation of a customer's credit note, either to an invoice or maybe a refund.\n- A payment made directly to that accounts receivable account. This might be an overpayment or a prepayment. It might also be the refund of a payment made directly to an accounts receivable account.\n\nDepending on the payments allowed by the underlying accounting software, some payment types may be combined. Please see the example for more details.\n\nIn Codat, a payment contains details of:\n\n- When the payment was recorded in the accounting system.\n- How much it is for and in what currency that amount is in.\n- Who the payment was _paid by_ – the _customer_.\n- The payment method used.\n- The breakdown of the types of payments – the _line items_.\n\nPayments is a child data type of [account transactions](https://docs.codat.io/accounting-api#/schemas/AccountTransaction).\n\n## Payment types\n\n## Payment of an invoice\n\nA payment paying a single invoice has one entry in its `lines` array. This **line** has the following properties:\n\n- An _amount_ that indicates the amount of the invoice that was paid. This is always positive.\n- A **links** array containing one element with the following properties:\n - A **type** that indicates the type of **link**, in this case an `Invoice`.\n - An **id** that contains the ID of the invoice that was paid.\n - An **amount** for the link. The sum of the **line.amount** and the **links.amount** must equal `0`.\n\nThe **amount** field on the **line** equals the **totalAmount** on the payment.\n\n## Payment of multiple invoices\n\nA single payment can pay multiple invoices. This can be represented in one of two formats depending on how the customer keeps their books:\n\n- The payment has multiple entries in its **lines** array, one for each invoice that is paid. Each line follows the example and rules described in [Payment of an invoice](#payment-of-an-invoice).\n- The payment has a line with multiple links to each invoice. This occurs when the proportion of the original payment allocated to each invoice is not available.\n\nEach **line** has the same properties as those described in [Payment of an invoice](#payment-of-an-invoice), with the **amount** indicating how much of the payment was allocated to the invoice. The sum of line amounts equals the **totalAmount** on the payment.\n\n## Payments and refunds on account\n\nA payment on account, that is a payment that doesn’t pay a specific invoice, has one entry in its lines array. The **line** has the following properties:\n\n- A **totalAmount** that indicates the amount paid by a customer or refunded to them by a company. A payment to the customer is always negative. A refund is always positive.\n- A **links** array containing one element with the following properties:\n- A **type** that indicates the type of link. For a payment this is `PaymentOnAccount`. For a refund this is `Refund`.\n- The **id** containing the ID of the customer.\n- The **amount** for the link is `0` – the **totalAmount** _or_ the amount of the payment or refund.\n\nIt is possible to have a payment that is part _on account_ and part _allocated_ to an invoice. Each line should follow the examples above.\n\n## Using a credit note to pay an invoice\n\nThe payment of an invoice using a credit note has one entry in its **lines** array. This **line** has the following properties:\n\n- An **amount** that indicates the amount of money moved, which in this case is `0`, as the credit note and invoice allocation must balance each other.\n- A **links** array containing two elements:\n - The first **link** has:\n - A **type** that indicates the type of **link**, in this case an `Invoice`.\n - An **id** that contains the ID of the invoice that was paid.\n - The second **link** has:\n - A **type** that indicates the type of **link**, in this case a `CreditNote`.\n - An **id** that contains the ID of the credit note used by this payment.\n\nThe **amount** field on the **line** equals the **totalAmount** on the payment.\n\n## Refunding a credit note\n\nA payment refunding a credit note has one entry in its **lines** array. This **line** has the following properties:\n\n- An **amount** that indicates the amount of the credit note that was refunded. This is always negative for a refund.\n- A **links** array that contains one element with the following properties:\n - A **type** that indicates the type of **link**, in this case a `CreditNote`.\n - An **id** that contains the ID of the credit note that was refunded.\n\nThe **totalAmount** field on the payment equals the **amount** field of the **line**. These are both negative, as this is money leaving accounts receivable.\n\n## Refunding a payment\n\nIf a payment is refunded, for example, if a customer overpaid an invoice and the overpayment is returned to the customer, there are two payment records:\n\n- One for the incoming over payment.\n- Another for the outgoing refund.\n\nThe payment issuing the refund has a negative **totalAmount**. This payment also has one entry in its lines array with the following properties:\n\n- An **amount** that indicates the amount that was refunded. This is always negative.\n- A **links** array that contains one element with the following properties:\n - A **type** that indicates the type of **link**, in this case a `Payment`.\n - An **id** that contains the ID of the payment that was refunded.\n\nThe **amount** field on the **line** equals the **totalAmount** on the payment and is negative, as this is money leaving accounts receivable.\n\nThe payment that was refunded has a line where the **amount** is positive and the type of the link is `Refund`. This payment may have several entries in its **lines** array if it was used to partly pay an invoice.\n\nFor example: A £1,050 payment on a £1,000 invoice with a refund of £50 has two lines:\n\n- One for £1,000 linked to the invoice that was paid.\n- Another for £50 linked to the payment that refunded the overpayment with a** type** of `Refund` and an ID that corresponds to the payment.\n\nThe **line** linked to the payment has the following properties:\n\n- An **amount** that indicates the amount that was refunded. This is positive as its money that was added to accounts receivable. It's balanced out by the negative amount of the refund.\n- A **links** array containing one element with the following properties:\n - A **type** that indicates the type of **link**, in this case a `Refund`.\n - An **id** that contains the ID of the payment that refunded this line.\n\n> **Support for linked payments**\n>\n> Not all accounting software support linking payments in this way. In some platforms, you may see a payment on account and a refund on account.\n\n## Foreign currencies\n\nThere are two types of currency rate that are included in the payments data type:\n\nPayment currency rate:\n\n- Base currency of the accounts receivable account.\n- Foreign currency of the payment.\n\nPayment line link currency rate:\n\n- Base currency of the item the link represents.\n- Foreign currency of the payment.\n\nThese two rates allow the calculation of currency loss or gain for any of the transactions affected by the payment lines. The second rate is used when a payment is applied to an item in a currency that doesn't match either:\n\n- The base currency for the accounts receivable account.\n- The currency of the item.\n\n ```json title=\"Currency rate example\"\n {\n \"id\": \"123\",\n \"note\": \"\",\n \"totalAmount\": 99.99,\n \"currency\": \"GBP\",\n \"lines\": [\n {\n \"amount\": 99.99,\n \"links\": [\n {\n \"type\": \"Invoice\",\n \"id\": \"178\",\n \"amount\": -50,\n \"currencyRate\": 1.9998\n }\n ]\n }\n ]\n }\n ```\n\n\n\n## Example data\n\n> **Object properties**\n>\n> For the sake of brevity, the examples here may omit properties from objects. For the full object definition, see [Payments](https://api.codat.io/swagger/index.html#/Payments).\n\n## Simple examples\n\n ```json title=\"Payment for invoice\"\n {\n \"totalAmount\": 1000,\n \"lines\": [\n {\n \"amount\" : 1000,\n \"links\" : [\n {\n \"type\" : \"Invoice\",\n \"id\" : \"x\",\n \"amount\" : -1000\n }\n ]\n }\n ]\n }\n ```\n\n\n\n ```json title=\"Allocation of credit note\"\n {\n \"totalAmount\": 0,\n \"lines\": [\n {\n \"amount\" : 0,\n \"links\" : [\n {\n \"type\" : \"Invoice\",\n \"id\" : \"x\",\n \"amount\" : -1000\n },\n {\n \"type\" : \"CreditNote\",\n \"id\" : \"y\",\n \"amount\" : 1000\n }\n ]\n }\n ]\n }\n ```\n\n\n\n ```json title=\"Payment of invoice and payment on account\"\n {\n \"totalAmount\": 2000,\n \"lines\": [\n {\n \"amount\" : 1000,\n \"links\" : [\n {\n \"type\" : \"Invoice\",\n \"id\" : \"x\",\n \"amount\" : -1000\n }\n ]\n },\n {\n \"amount\" : 1000,\n \"links\" : [\n {\n \"type\" : \"PaymentOnAccount\",\n \"id\" : \"y\",\n \"amount\" : -1000\n }\n ]\n }\n ]\n }\n ```\n\n\n\n ```json title=\"Refund of credit note\"\n {\n \"totalAmount\": -1000,\n \"lines\": [\n {\n \"amount\" : -1000,\n \"links\" : [\n {\n \"type\" : \"CreditNote\",\n \"id\" : \"y\",\n \"amount\" : 1000\n }\n ]\n }\n ]\n }\n ```\n\n\n\n ```json title=\"Refund on accounts receivable account\"\n {\n \"totalAmount\": -1000,\n \"lines\": [\n {\n \"amount\" : -1000,\n \"links\" : [\n {\n \"type\" : \"PaymentOnAccount\",\n \"id\" : \"y\",\n \"amount\" : 1000\n }\n ]\n }\n ]\n }\n ```\n\n\n\n ```json title=\"Linked refund on accounts receivable account\"\n {\n \"id\" : \"payment-001\",\n \"totalAmount\": 1000,\n \"lines\": [\n {\n \"amount\" : 1000,\n \"links\" : [\n {\n \"type\" : \"Refund\",\n \"id\" : \"refund-001\",\n \"amount\" : -1000\n }\n ]\n }\n ]\n }\n {\n \"id\" : \"refund-001\",\n \"totalAmount\": -1000,\n \"lines\": [\n {\n \"amount\" : -1000,\n \"links\" : [\n {\n \"type\" : \"Payment\",\n \"id\" : \"payment-001\",\n \"amount\" : 1000\n }\n ]\n }\n ]\n }\n ```\n\n\n\n ```json title=\"Using a credit note and cash to pay an invoice\"\n {\n \"totalAmount\": 250,\n \"lines\": [\n {\n \"amount\": 0,\n \"links\": [\n {\n \"type\": \"Invoice\",\n \"id\": \"x\",\n \"amount\": -750\n }, \n {\n \"type\": \"CreditNote\",\n \"id\": \"y\",\n \"amount\": 750\n }\n ]\n },\n {\n \"amount\": 250,\n \"links\": [\n {\n \"type\": \"Invoice\",\n \"id\": \"x\",\n \"amount\": -250\n }\n ]\n }\n ]\n }\n ```\n\n\n\n## Complex examples\n\n ```json title=\"Use two credit notes and 1000 in to \"bank\" (cash, cheque etc.) to pay invoice\"\n {\n \"totalAmount\": 1000,\n \"lines\": [\n {\n \"amount\" : 0,\n \"links\" : [\n {\n \"type\" : \"Invoice\",\n \"id\" : \"x\",\n \"amount\" : -1000\n },\n {\n \"type\" : \"CreditNote\",\n \"id\" : \"y\",\n \"amount\" : 1000\n }\n ]\n },\n {\n \"amount\" : 0,\n \"links\" : [\n {\n \"type\" : \"Invoice\",\n \"id\" : \"x\",\n \"amount\" : -1000\n },\n {\n \"type\" : \"CreditNote\",\n \"id\" : \"z\",\n \"amount\" : 1000\n }\n ]\n },\n {\n \"amount\" : 1000,\n \"links\" : [\n {\n \"type\" : \"Invoice\",\n \"id\" : \"x\",\n \"amount\" : -1000\n }\n ]\n }\n ]\n }\n ```\n\n\n\n ```json title=\"Pay an invoice with two credit notes and cash, with 1000 left 'on account'\"\n {\n \"totalAmount\": 2000,\n \"lines\": [\n {\n \"amount\" : 0,\n \"links\" : [\n {\n \"type\" : \"Invoice\",\n \"id\" : \"x\",\n \"amount\" : -1000\n },\n {\n \"type\" : \"CreditNote\",\n \"id\" : \"y\",\n \"amount\" : 1000\n }\n ]\n },\n {\n \"amount\" : 0,\n \"links\" : [\n {\n \"type\" : \"Invoice\",\n \"id\" : \"x\",\n \"amount\" : -1000\n },\n {\n \"type\" : \"CreditNote\",\n \"id\" : \"z\",\n \"amount\" : 1000\n }\n ]\n },\n {\n \"amount\" : 1000,\n \"links\" : [\n {\n \"type\" : \"Invoice\",\n \"id\" : \"x\",\n \"amount\" : -1000\n }\n ]\n },\n {\n \"amount\" : 1000,\n \"links\" : [\n {\n \"type\" : \"PaymentOnAccount\",\n \"id\" : \"customer-001\",\n \"amount\" : -1000\n }\n ]\n }\n ]\n }\n ```\n\n\n\n ```json title=\"Two credit notes pay two invoices with no allocation amount specified\"\n {\n \"totalAmount\": 0,\n \"lines\": [\n {\n \"amount\" : 0,\n \"links\" : [\n {\n \"type\" : \"Invoice\",\n \"id\" : \"w\",\n \"amount\" : -1000\n },\n {\n \"type\" : \"Invoice\",\n \"id\" : \"x\",\n \"amount\" : -1000\n },\n {\n \"type\" : \"CreditNote\",\n \"id\" : \"y\",\n \"amount\" : 1000\n },\n {\n \"type\" : \"CreditNote\",\n \"id\" : \"z\",\n \"amount\" : 1000\n }\n ]\n }\n ]\n }\n ```\n\n\n\n ```json title=\"Two credit notes and cash pay three invoices with no allocation amount specified, and refund cash\"\n {\n \"totalAmount\": 2000,\n \"lines\": [\n {\n \"amount\" : 1000,\n \"links\" : [\n {\n \"type\" : \"Invoice\",\n \"id\" : \"w\",\n \"amount\" : -1000\n },\n {\n \"type\" : \"Invoice\",\n \"id\" : \"x\",\n \"amount\" : -1000\n },\n {\n \"type\" : \"Invoice\",\n \"id\" : \"u\",\n \"amount\" : -1000\n },\n {\n \"type\" : \"CreditNote\",\n \"id\" : \"y\",\n \"amount\" : 1000\n },\n {\n \"type\" : \"CreditNote\",\n \"id\" : \"z\",\n \"amount\" : 1000\n }\n ]\n },\n {\n \"amount\" : 1000,\n \"links\" : [\n {\n \"type\" : \"Refund\",\n \"id\" : \"refund-001\",\n \"amount\" : -1000\n }\n ]\n }\n ]\n }\n {\n \"id\" : \"refund-001\",\n \"totalAmount\": -1000,\n \"lines\": [\n {\n \"amount\" : -1000,\n \"links\" : [\n {\n \"type\" : \"Payment\",\n \"id\" : \"payment-001\",\n \"amount\" : 1000\n }\n ]\n }\n ]\n }\n ```\n\n\n\nIn this example, a payment on account is used to pay the same invoice in January and again in February.\n\n ```json title=\"January\"\n {\n \"id\": \"001\",\n \"totalAmount\": 5000,\n \"date\" : \"1901-01-01\",\n \"lines\": [\n {\n \"amount\" : 1000,\n \"links\" : [\n {\n \"type\" : \"Invoice\",\n \"id\" : \"Invoice-x\",\n \"amount\" : -1000\n }\n ]\n },\n {\n \"amount\" : 4000,\n \"links\" : [\n {\n \"type\" : \"PaymentOnAccount\",\n \"id\" : \"PaymentOnAccount-y\",\n \"amount\" : -4000\n }\n ]\n }\n ]\n }\n ```\n\n\n\n ```json title=\"February\"\n {\n \"id\": \"001\",\n \"totalAmount\": 5000,\n \"date\" : \"1901-02-01\",\n \"lines\": [\n {\n \"amount\" : 1000,\n \"links\" : [\n {\n \"type\" : \"Invoice\",\n \"id\" : \"Invoice-x\",\n \"amount\" : -1000\n }\n ]\n },\n {\n \"amount\" : 1000,\n \"links\" : [\n {\n \"type\" : \"Invoice\",\n \"id\" : \"Invoice-y\",\n \"amount\" : -1000\n }\n ]\n },\n {\n \"amount\" : 3000,\n \"links\" : [\n {\n \"type\" : \"PaymentOnAccount\",\n \"id\" : \"PaymentOnAccount-y\",\n \"amount\" : -3000\n }\n ]\n }\n ]\n }\n ```\n\n\n\n ```json title=\"Two credit notes and some cash pay two invoices with no allocations specified\"\n {\n \"totalAmount\": 500,\n \"lines\": [\n {\n \"amount\": 500,\n \"links\": [{\n \"type\": \"Invoice\",\n \"id\": \"a\",\n \"amount\": -1000\n }, {\n \"type\": \"Invoice\",\n \"id\": \"b\",\n \"amount\": -1000\n }, {\n \"type\": \"CreditNote\",\n \"id\": \"y\",\n \"amount\": 750\n },{\n \"type\": \"CreditNote\",\n \"id\": \"z\",\n \"amount\": 750\n }\n ]\n }\n ]\n }\n ```"
type: object
allOf:
- type: object
properties:
id:
type: string
description: 'Identifier for the payment, unique to the company in the accounting software.'
customerRef:
$ref: '#/components/schemas/AccountingCustomer/definitions/accountingCustomerRef'
description: Customer the payment is recorded against in the accounting software.
accountRef:
$ref: '#/components/schemas/AccountingAccount/definitions/accountRef'
description: Account the payment is recorded against in the accounting software.
paymentMethodRef:
$ref: '#/components/schemas/PaymentMethodRef'
description: The Payment Method to which the payment is linked in the accounting software.
totalAmount:
type: number
format: decimal
description: Amount of the payment in the payment currency. This value should never change and represents the amount of money paid into the customer's account.
currency:
$ref: '#/components/schemas/AccountingAccount/definitions/accountPrototype/properties/currency'
description: ISO currency code recorded for the payment in the accounting software.
currencyRate:
$ref: '#/components/schemas/AccountingPayment/definitions/paymentLineLink/properties/currencyRate'
date:
$ref: '#/components/schemas/Dataset/properties/requested'
description: Date the payment was recorded in the accounting software.
note:
type: string
nullable: true
description: Any additional information associated with the payment.
lines:
type: array
nullable: true
description: An array of payment lines.
items:
$ref: '#/components/schemas/AccountingPayment/definitions/paymentLine'
reference:
type: string
nullable: true
description: Friendly reference for the payment.
metadata:
$ref: '#/components/schemas/AccountingAccount/allOf/2/properties/metadata'
supplementalData:
$ref: '#/components/schemas/SupplementalData'
- $ref: '#/components/schemas/CommerceOrder/allOf/3'
required:
- date
definitions:
paymentLine:
title: Payment Line
type: object
properties:
amount:
type: number
format: decimal
description: Amount in the payment currency.
links:
type: array
nullable: true
items:
$ref: '#/components/schemas/AccountingPayment/definitions/paymentLineLink'
allocatedOnDate:
$ref: '#/components/schemas/Dataset/properties/requested'
description: The date the payment was allocated.
required:
- amount
paymentLineLink:
title: Payment Line Link
type: object
additionalProperties: false
properties:
type:
$ref: '#/components/schemas/AccountingPayment/definitions/paymentLinkType'
id:
type: string
description: Unique identifier of the transaction represented by the link.
amount:
type: number
format: decimal
nullable: true
description: |-
Amount by which the balance of the linked entity is altered, in the currency of the linked entity.
A negative link amount _reduces_ the outstanding amount on the accounts receivable account.
A positive link amount _increases_ the outstanding amount on the accounts receivable account.
currencyRate:
title: Currency rate
type: number
format: decimal
nullable: true
description: |-
Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.
Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit.
It is not possible to perform the currency conversion with two or more non-base currencies participating in the transaction. For example, if a company's base currency is USD, and it has a bill issued in EUR, then the bill payment must happen in USD or EUR.
Where the currency rate is provided by the underlying accounting software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).
For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places.
## Examples with base currency of GBP
| Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) |
| :--------------- | :------------- | :------------ | :------------------------- |
| **USD** | $20 | 0.781 | £15.62 |
| **EUR** | €20 | 0.885 | £17.70 |
| **RUB** | ₽20 | 0.011 | £0.22 |
## Examples with base currency of USD
| Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) |
| :--------------- | :------------- | :------------ | :------------------------- |
| **GBP** | £20 | 1.277 | $25.54 |
| **EUR** | €20 | 1.134 | $22.68 |
| **RUB** | ₽20 | 0.015 | $0.30 |
### Integration-specific details
| Integration | Scenario | System behavior |
|-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. |
required:
- type
paymentLinkType:
title: Payment Link Type
type: string
enum:
- Unknown
- Unlinked
- Invoice
- CreditNote
- Other
- Refund
- Payment
- PaymentOnAccount
- ManualJournal
- Discount
description: |-
Types of payment line links, either:
`Unknown`
`Unlinked` - Not used
`Invoice` - ID refers to the invoice
`CreditNote` - ID refers to the credit note
`Refund` - ID refers to the sibling payment
`Payment` - ID refers to the sibling payment
`PaymentOnAccount` - ID refers to the customer
`Other` - ID refers to the customer
`Manual Journal`
`Discount` - ID refers to the payment
AccountOption:
x-internal: true
title: Account option
type: object
properties:
name:
type: string
nullable: true
description: Name of the account.
id:
type: string
description: 'Identifier for the account, unique for the company.'
nominalCode:
type: string
nullable: true
description: Reference given to each nominal account for a business. It ensures money is allocated to the correct account. This code isn't a unique identifier in the Codat system.
classification:
type: string
nullable: true
description: Classification of the type of G/L account.
example: Bank Nominal
additionalProperties: false
Branding:
title: Branding
type: object
properties:
logo:
$ref: '#/components/schemas/Branding/definitions/brandingLogo'
button:
$ref: '#/components/schemas/Branding/definitions/brandingButton'
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`.'
definitions:
brandingLogo:
description: Logo branding references.
type: object
properties:
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
format: uri
description: Source URL for image.
alt:
type: string
description: Alternative text when image is not available.
examples:
- 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
CommerceCompanyInfo:
title: 'Commerce: Company profile'
description: |
In the Codat system, company profile includes standard commercial details about
a linked company, such as their address, phone number, and company registration.
Explore our [data coverage](https://knowledge.codat.io/supported-features/commerce?view=tab-by-data-type&dataType=companyInfo) for this data type.
type: object
allOf:
- type: object
properties:
companyName:
type: string
description: The name of the company
example: Codat
commercePlatformRef:
type: string
description: Identifier or reference for the company in the commerce software
companyLegalName:
type: string
description: The full legal name of the company
example: Codat Limited
addresses:
type: array
description: Addresses associated with the company
items:
$ref: '#/components/schemas/CommerceCustomer/allOf/1/properties/addresses/items'
phoneNumbers:
type: array
description: Phone numbers associated with the company
items:
$ref: '#/components/schemas/AccountingCompanyDataset/properties/phoneNumbers/items'
webLinks:
description: Weblinks associated with the company
type: array
items:
$ref: '#/components/schemas/AccountingCompanyDataset/properties/webLinks/items'
registrationNumber:
description: The registration number of the company
type: string
examples:
- 10480375
baseCurrency:
$ref: '#/components/schemas/AccountingAccount/definitions/accountPrototype/properties/currency'
accountBalances:
description: The available and current cash balances for the company's accounts
type: array
items:
$ref: '#/components/schemas/CommerceCompanyInfo/definitions/accountBalance'
sourceUrls:
description: 'URL addresses for the originating system. For example, potential use cases include ''deeplinking'' to the originating system'
type: object
additionalProperties:
type: string
example:
url1: 'https://connect.sandbox.com/v2/customers'
url2: 'https://connect.sandbox.com/v2/disputes'
- $ref: '#/components/schemas/CommerceOrder/allOf/2'
- $ref: '#/components/schemas/CommerceOrder/allOf/3'
definitions:
accountBalance:
title: Account Balance
type: object
x-internal: true
properties:
available:
description: The account's current balance
type: number
format: decimal
pending:
description: Funds that are not yet available in the balance
type: number
format: decimal
reserved:
description: Funds reserved as holdings
format: decimal
currency:
description: The currency of the account
allOf:
- $ref: '#/components/schemas/AccountingAccount/definitions/accountPrototype/properties/currency'
CommerceCustomer:
title: 'Commerce: Customer'
description: |-
When a customer places an order with the connected commerce store their details are added to the Customers dataset. You can use the data from the Customers endpoints to calculate key metrics, such as customer churn.
Explore our [data coverage](https://knowledge.codat.io/supported-features/commerce?view=tab-by-data-type&dataType=commerce-customers) for this data type.
type: object
allOf:
- $ref: '#/components/schemas/CommerceOrder/allOf/0'
- type: object
properties:
customerName:
type: string
description: Name of the customer
example: Fred Smith
emailAddress:
type: string
description: Email address of the customer
example: fred.smith@myCompany.com
phone:
$ref: '#/components/schemas/AccountingCompanyDataset/properties/phoneNumbers/items/properties/number'
defaultCurrency:
allOf:
- description: |
Default currency of any transactional data for the customer,
for example, orders or payments
- $ref: '#/components/schemas/AccountingAccount/definitions/accountPrototype/properties/currency'
addresses:
type: array
description: Addresses of the customer
items:
title: 'Commerce: Address'
x-internal: true
type: object
properties:
type:
$ref: '#/components/schemas/CommerceCustomer/allOf/1/properties/addresses/items/definitions/commerceAddressType'
line1:
description: The first line of the address
type: string
line2:
description: The second line of the address
type: string
city:
description: 'The third line of the address, or city'
type: string
region:
description: 'The fourth line of the address, or region'
type: string
country:
description: The country for the address
type: string
postalCode:
description: The postal (or zip) code for the address
type: string
definitions:
commerceAddressType:
description: The type of the address
type: string
enum:
- Billing
- Delivery
- Order
- Inventory
- Unknown
note:
type: string
description: Any additional information about the customer
- $ref: '#/components/schemas/CommerceOrder/allOf/2'
- $ref: '#/components/schemas/CommerceOrder/allOf/3'
definitions:
commerceCustomerRef:
type: object
description: Reference to the customer that placed the order.
properties:
id:
description: The unique identitifer of the customer being referenced
type: string
examples:
- 13d946f0-c5d5-42bc-b092-97ece17923ab
- 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
- 7110701885
- EILBDVJVNUAGVKRQ
name:
description: Name of the customer being referenced.
type: string
required:
- id
examples:
- customers:
- id: '15'
customerName: Daffy Duck
emailAddress: d.duck@warnerbros.com
defaultCurrency: GBP
phone: (877) 492-8687
addresses:
- type: billing
line1: 301 Duck Pond
line2: 28 Green Street
city: London
region: England
country: United Kingdom
postalCode: WX1X 0BE
- type: delivery
line1: Bread Street
line2: Bird Avenue
city: Paris
region: France
country: France
postalCode: WDF 123
note: Regular customer
createdDate: '0001-01-01T00:00:00'
modifiedDate: null
sourceModifiedDate: '2020-09-15T23:52:28'
- id: '18'
customerName: Tasmanian Devil
emailAddress: t.devil@warnerbros.com
defaultCurrency: GBP
phone: +1-202-555-0181
addresses:
- type: billing
line1: 101 Fire Rooms
line2: Engine Street
city: London
region: England
country: United Kingdom
postalCode: WC1X 0BE
note: Handle with care
createdDate: '0001-01-01T00:00:00'
modifiedDate: null
sourceModifiedDate: '2020-04-16T02:41:52'
- id: a99f5e0c-a4db-452f-8d2c-8fd15482b384
customerName: Bugs Bunny
emailAddress: b.bunny@warnerbros.com
defaultCurrency: GBP
phone: ''
addresses:
- type: billing
line1: 301 Carrot Street
line2: Orange Town
city: Yorkshire
region: England
country: United Kingdom
postalCode: WF1X 0BE
- type: delivery
line1: 424 Field Street
line2: The Meadow
city: Paris
region: France
country: France
postalCode: WDF 123
note: Regular customer
createdDate: '0001-01-01T00:00:00'
modifiedDate: null
sourceModifiedDate: '2020-08-12T14:37:37'
CommerceCustomers:
title: 'Commerce: Customers'
x-internal: true
allOf:
- type: object
properties:
results:
type: array
items:
$ref: '#/components/schemas/CommerceCustomer'
- $ref: '#/components/schemas/PagingInfo'
CommerceLocation:
title: 'Commerce: Location'
type: object
description: |-
The Location datatype holds information on the geographic location at which stocks of products may be held, as referenced in the Products data type.
A Location also holds information on geographic locations where orders were placed, as referenced in the Orders data type.
Explore our [data coverage](https://knowledge.codat.io/supported-features/commerce?view=tab-by-data-type&dataType=commerce-locations) for this data type.
allOf:
- $ref: '#/components/schemas/CommerceOrder/allOf/0'
- type: object
properties:
name:
description: Name of this location
type: string
address:
description: Address associated with the location
$ref: '#/components/schemas/CommerceCustomer/allOf/1/properties/addresses/items'
- $ref: '#/components/schemas/CommerceOrder/allOf/3'
definitions:
locationRef:
type: object
description: Reference to the geographic location where the order was placed.
properties:
id:
description: The unique identitifer of the location being referenced.
type: string
examples:
- 13d946f0-c5d5-42bc-b092-97ece17923ab
- 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
- 7110701885
- EILBDVJVNUAGVKRQ
name:
description: Name of the location being referenced.
type: string
required:
- id
examples:
- id: '15'
name: London Warehouse
address:
type: Inventory
line1: Warner House
line2: 98 Theobald's Road
city: London
region: ''
country: United Kingdom
postalCode: WC1X 8WB
modifiedDate: '2020-08-12T14:37:37'
sourceModifiedDate: '2020-08-12T14:37:37'
CommerceLocations:
title: 'Commerce: Locations'
x-internal: true
allOf:
- type: object
properties:
results:
type: array
items:
$ref: '#/components/schemas/CommerceLocation'
- $ref: '#/components/schemas/PagingInfo'
CommerceOrder:
title: 'Commerce: Order'
description: |
Orders contain the transaction details for all products sold by the company, and include details of any payments, service charges, or refunds related to each order. You can use data from the Orders endpoints to calculate key metrics, such as gross sales values and monthly recurring revenue (MRR).
Explore our [data coverage](https://knowledge.codat.io/supported-features/commerce?view=tab-by-data-type&dataType=commerce-orders) for this data type.
allOf:
- type: object
x-stoplight:
id: 516bf0ecc4907
required:
- id
properties:
id:
type: string
description: 'A unique, persistent identifier for this record'
examples:
- 13d946f0-c5d5-42bc-b092-97ece17923ab
- 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
- 7110701885
- EILBDVJVNUAGVKRQ
x-codat-validation:
- validator: UniqueWithinConnection
- properties:
orderNumber:
type: string
description: Friendly reference for the order in the commerce or point of sale platform.
country:
description: |-
The Codat country property is returned as it was provided in the underlying platform by the company without any formatting on our part.
Depending on the platform the value of this property will either be an ISO 3166 code (2-alpha or 3-alpha) or free-form text returned as a string name in our model.
For POST operations against platforms that demand a specific format for the country code, we have documented accepted values in the [options](https://docs.codat.io/sync-for-commerce-v1-api#/operations/get-companies-companyId-connections-connectionId-push) endpoint.
type: string
format: ISO3166 Alpha-3
examples:
- GBR
- USA
- ABW
currency:
allOf:
- $ref: '#/components/schemas/AccountingAccount/definitions/accountPrototype/properties/currency'
- description: Currency in which the order was placed.
closedDate:
$ref: '#/components/schemas/Dataset/properties/requested'
description: 'Date on which order was closed after the product was shipped, paid for, and any refund period had elapsed.'
totalAmount:
description: 'Total amount of the order, including discounts, refunds, and tax, but excluding gratuities.'
type: number
format: decimal
totalRefund:
description: 'Total amount of any refunds issued on the order, including discounts and tax, but excluding gratuities. This is always negative.'
type: number
format: decimal
totalTaxAmount:
description: Total amount of tax applied to the order.
type: number
format: decimal
totalDiscount:
description: 'Total amount of any discounts applied to the order, excluding tax. This is typically positive (for discounts which decrease the amount of the order), but can also be negative (for discounts which increase the amount of the order).'
type: number
format: decimal
totalGratuity:
description: Extra amount added to the order.
type: number
format: decimal
orderLineItems:
type: array
items:
$ref: '#/components/schemas/CommerceOrder/definitions/orderLineItem'
payments:
type: array
items:
$ref: '#/components/schemas/CommercePayment/definitions/paymentRef'
serviceCharges:
type: array
items:
$ref: '#/components/schemas/CommerceOrder/definitions/serviceCharge'
locationRef:
$ref: '#/components/schemas/CommerceLocation/definitions/locationRef'
customerRef:
$ref: '#/components/schemas/CommerceCustomer/definitions/commerceCustomerRef'
supplementalData:
$ref: '#/components/schemas/SupplementalData'
- title: Created date
type: object
x-internal: true
properties:
createdDate:
$ref: '#/components/schemas/Dataset/properties/requested'
description: The date the entity was created.
- title: Modified dates
x-internal: true
allOf:
- title: ModifiedDate
x-internal: true
type: object
properties:
modifiedDate:
allOf:
- $ref: '#/components/schemas/Dataset/properties/requested'
- description: |-
The date when the record was last fetched from the data source 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/Dataset/properties/requested'
- description: |-
The date when a record was last modified in the source platform, usually by the business or a business process. For example, when payments are made against an invoice.
It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when:
- Pulling attachments
- The integration platform does not provide modification dates for a data type
- A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred
- A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records
In Codat's data model, dates and times are represented using the ISO 8601 standard.
definitions:
orderLineItem:
allOf:
- $ref: '#/components/schemas/CommerceOrder/allOf/0'
- type: object
properties:
quantity:
type: number
format: decimal
description: |
Number of units of the product sold.
For refunds, quantity is negative.
taxPercentage:
type: number
format: decimal
description: Percentage rate (from 0 to 100) of any sales tax applied to the unit price.
examples:
- 0
- 12.5
- '45.00'
totalAmount:
type: number
format: decimal
description: 'Total amount of the line item, including discounts and tax.'
totalTaxAmount:
type: number
format: decimal
description: 'Total amount of tax applied to the line item, factoring in any discounts.'
unitPrice:
type: number
format: decimal
description: 'Price per unit of goods or services, excluding discounts and tax.'
taxes:
type: array
items:
$ref: '#/components/schemas/CommerceOrder/definitions/serviceCharge/properties/taxes/items'
description: Taxes breakdown as applied to order lines.
productRef:
$ref: '#/components/schemas/CommerceProduct/definitions/productRef'
productVariantRef:
$ref: '#/components/schemas/CommerceProduct/definitions/productVariantRef'
discountAllocations:
type: array
items:
$ref: '#/components/schemas/CommerceOrder/definitions/orderDiscountAllocation'
serviceCharge:
type: object
properties:
description:
description: Service charges for this order.
type: string
example: A service charge
totalAmount:
description: 'Total amount of the service charge, including tax.'
type: number
format: decimal
examples:
- 0
- 12.5
- 45
taxPercentage:
description: Percentage rate (from 0 to 100) of any tax applied to the service charge.
type: number
format: decimal
examples:
- 0
- 12.5
- 45
taxAmount:
description: Amount of the service charge that is tax.
type: number
format: decimal
examples:
- 0
- 12.5
- 45
taxes:
description: Taxes breakdown as applied to service charges.
type: array
items:
title: Tax Component Allocation
type: object
properties:
taxComponentRef:
type: object
description: Taxes rates reference object depending on the rates being available on source commerce software.
properties:
id:
description: The unique identitifer of the tax component being referenced.
type: string
examples:
- 13d946f0-c5d5-42bc-b092-97ece17923ab
- 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
- 7110701885
- EILBDVJVNUAGVKRQ
name:
description: Name of the tax component being referenced.
type: string
required:
- id
- name
rate:
description: Tax amount on order line sale as available from source commerce software.
type: number
format: decimal
nullable: true
quantity:
description: The number of times the charge is charged.
type: integer
examples:
- 1
- 12
- 45
type:
$ref: '#/components/schemas/CommerceOrder/definitions/serviceChargeType'
serviceChargeType:
description: The type of the service charge.
type: string
enum:
- Generic
- Shipping
- Overpayment
- Unknown
example: Overpayment
orderDiscountAllocation:
type: object
properties:
name:
type: string
description: Name of the discount in the commerce or point of sale platform.
example: Promotional Discount
totalAmount:
type: number
format: decimal
description: 'Total amount of discount applied, excluding tax. This is typically positive (for discounts which decrease the amount of the order line), but can also be negative (for discounts which increase the amount of the order line).'
example: 15.25
examples:
- id: 01e63721-1205-478e-8503-9d8bf8a93f44
orderNumber: '99123956'
country: CAN
currency: CAD
createdDate: '2021-03-28T03:00:14'
totalAmount: 12
totalRefund: 0
totalTaxAmount: 2
totalDiscount: 0
totalGratuity: 1
orderLineItems:
- id: 116113a6-54d3-4624-ba73-26a77a5ffd51
quantity: 1
taxPercentage: 20
totalAmount: 12
totalTaxAmount: 2
unitPrice: 10
taxes:
- taxComponentRef:
id: '72'
name: Sales Tax
taxAmount: ''
- taxComponentRef:
id: '72'
name: City Tax
taxAmount: ''
productRef:
id: ac186646-41f2-4280-afea-1012c59459ab
name: Intelligent Concrete Salad
productVariantRef:
id: f9ca9de5-9e31-460d-ac81-368f4e7c8fc0
name: Small Incredible Wooden Soap
discountAllocations: []
payments:
- id: defdceb6-83a3-4b7d-a74e-e9ef947d5f48
amount: 12
currency: CAD
type: Paypal
status: Unknown
dueDate: '2021-04-04T03:00:14'
createdDate: '2021-03-28T03:00:14'
modifiedDate: '2022-02-02T11:02:45'
serviceCharges:
- description: Service Charge
totalAmount: 1.2
taxPercentage: 20
taxAmount: 0.2
taxes:
- taxComponentRef:
id: '72'
name: Service Tax
taxAmount: ''
quantity: 1
type: Generic
locationRef:
id: 47bbffc7-c045-4b0f-a3bb-ecf1f669edfa
customerRef:
id: 2634d180-7205-43f0-a73d-84af6443a005
name: Emmy Roberts
modifiedDate: '2022-02-02T11:02:45Z'
sourceModifiedDate: '2021-03-28T03:00:14'
type: object
CommerceOrders:
title: 'Commerce: Orders'
x-internal: true
allOf:
- type: object
properties:
results:
type: array
items:
$ref: '#/components/schemas/CommerceOrder'
- $ref: '#/components/schemas/PagingInfo'
CommercePayment:
title: 'Commerce: Payment'
description: |-
Payments contain details of all payments made by customers to a company, including: amounts, currency used, payment method, payment provider, and payment status.
Refunds are recorded as separate, negative payments. Note that a refund can only occur in relation to a payment that has been completed (i.e. has a status of `Paid`). When a customer cancels an order _before_ a payment has been completed, the payment shows as `Cancelled`.
You can use data from the Payments endpoints to calculate key metrics, such as gross sales and monthly recurring revenue (MRR).
Explore our [data coverage](https://knowledge.codat.io/supported-features/commerce?view=tab-by-data-type&dataType=commerce-payments) for this data type.
type: object
allOf:
- $ref: '#/components/schemas/CommerceOrder/allOf/0'
- type: object
properties:
amount:
type: number
format: decimal
description: Payment Amount (including gratuity)
examples:
- 194.12
- -283.56
- 0
currency:
$ref: '#/components/schemas/AccountingAccount/definitions/accountPrototype/properties/currency'
description: Currency in which the payment was made
paymentMethodRef:
$ref: '#/components/schemas/PaymentMethodRef'
status:
$ref: '#/components/schemas/CommercePayment/definitions/paymentStatus'
paymentProvider:
type: string
description: 'Service provider of the payment, if applicable.'
examples:
- Amazon Pay
- Checkout.com
- SagePay
dueDate:
description: Date by which payment must be made
$ref: '#/components/schemas/Dataset/properties/requested'
supplementalData:
$ref: '#/components/schemas/SupplementalData'
- $ref: '#/components/schemas/CommerceOrder/allOf/2'
- $ref: '#/components/schemas/CommerceOrder/allOf/3'
definitions:
paymentStatus:
type: string
x-internal: true
description: Status of the payment.
enum:
- Pending
- Authorized
- Paid
- Failed
- Cancelled
- Unknown
paymentType:
type: string
x-internal: true
nullable: true
description: Type of payment.
enum:
- Cash
- Card
- Invoice
- OnlineCard
- Swish
- Vipps
- Mobile
- StoreCredit
- Paypal
- Custom
- Prepaid
- Unknown
example: Cash
paymentRef:
x-internal: true
allOf:
- $ref: '#/components/schemas/CommerceOrder/allOf/0'
- type: object
properties:
amount:
type: number
format: decimal
nullable: true
description: Payment Amount (including gratuity).
examples:
- 194.12
- -283.56
- 0
currency:
$ref: '#/components/schemas/AccountingAccount/definitions/accountPrototype/properties/currency'
description: Currency in which the payment was made.
type:
$ref: '#/components/schemas/CommercePayment/definitions/paymentType'
status:
$ref: '#/components/schemas/CommercePayment/definitions/paymentStatus'
paymentProvider:
type: string
description: 'Service provider of the payment, if applicable.'
examples:
- Amazon Pay
- Checkout.com
- SagePay
dueDate:
description: Date by which payment must be made
$ref: '#/components/schemas/Dataset/properties/requested'
- $ref: '#/components/schemas/CommerceOrder/allOf/2'
- $ref: '#/components/schemas/CommerceOrder/allOf/3'
CommercePaymentMethod:
title: 'Commerce: Payment method'
description: |-
A Payment Method represents the payment method(s) used to make payments.
Explore our [data coverage](https://knowledge.codat.io/supported-features/commerce?view=tab-by-data-type&dataType=commerce-paymentMethods) for this data type.
type: object
allOf:
- $ref: '#/components/schemas/CommerceOrder/allOf/0'
- type: object
properties:
name:
type: string
description: The name of the PaymentMethod
example: Alipay
status:
description: Status of the Payment Method.
x-internal: true
type: string
enum:
- Unknown
- Active
- Archived
- $ref: '#/components/schemas/CommerceOrder/allOf/3'
CommercePaymentMethods:
title: 'Commerce: Payment methods'
x-internal: true
allOf:
- type: object
properties:
results:
type: array
items:
$ref: '#/components/schemas/CommercePaymentMethod'
- $ref: '#/components/schemas/PagingInfo'
CommercePayments:
title: 'Commerce: Payments'
x-internal: true
allOf:
- type: object
properties:
results:
type: array
items:
$ref: '#/components/schemas/CommercePayment'
- $ref: '#/components/schemas/PagingInfo'
CommerceProduct:
title: 'Commerce: Product'
description: |
A Product is an item in the company's inventory, and includes information about the price and quantity of all products, and variants thereof, available for sale.
Explore our [data coverage](https://knowledge.codat.io/supported-features/commerce?view=tab-by-data-type&dataType=commerce-products) for this data type.
type: object
allOf:
- $ref: '#/components/schemas/CommerceOrder/allOf/0'
- type: object
properties:
name:
type: string
description: Name of the product in the commerce or POS system
examples:
- Hard Drive
- Windows Installation
- Software Support (Hourly)
description:
type: string
description: Description of the product recorded in the commerce or point of sale platform.
examples:
- 1tb Western Digital Hard Drive
- Install of Windows 11 (Professional Edition)
- 1 hour of support from an agent (phone or remote)
categorization:
type: string
description: Retail category that the product is assigned to e.g. `Hardware`.
examples:
- Hardware
- Software
- Support Services
isGiftCard:
type: boolean
description: |
Whether the product represents a gift card or voucher that
can be redeemed in the commerce or POS platform.
variants:
type: array
items:
$ref: '#/components/schemas/CommerceProduct/definitions/productVariant'
supplementalData:
$ref: '#/components/schemas/SupplementalData'
definitions:
productRef:
type: object
description: Reference that links the line item to the correct product details.
properties:
id:
description: The unique identifier of the product being referenced.
type: string
examples:
- 13d946f0-c5d5-42bc-b092-97ece17923ab
- 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
- 7110701885
- EILBDVJVNUAGVKRQ
name:
description: Name of the product being referenced.
type: string
required:
- id
productVariant:
title: Product Variant
description: |
Represents a variation of a product available for sale, for example an item of clothing that may be available for sale in multiple sizes and colors.
allOf:
- $ref: '#/components/schemas/CommerceOrder/allOf/0'
description: 'Identifier of the product variant, unique to the company.'
- properties:
name:
type: string
examples:
- Red Coat
- Black Coat
- Large Brown Hat
description: Name of the product recorded in the commerce or point of sale platform.
isTaxEnabled:
type: boolean
description: Whether sales taxes are enabled for this product variant.
sku:
type: string
examples:
- Coat-Red-Lrg
- Coat-Black-Md
- LargeBrownHat
- A725BA2
description: 'SKU (stock keeping unit) of the variant, as defined by the merchant.'
barcode:
type: string
examples:
- '564158468416486458646886484'
- CSE370
description: 'Unique product number of the variant. This might be a barcode, UPC, ISBN, etc.'
unitOfMeasure:
type: string
examples:
- kg
- m
- meters
description: 'Unit of measure for the variant, such as `kg` or `meters`.'
vatPercentage:
type: number
format: decimal
examples:
- 12.5
- 0
- 20
description: VAT rate for the product variant if sales taxes are enabled.
prices:
type: array
description: Prices for the product variants in different currencies.
items:
$ref: '#/components/schemas/CommerceProduct/definitions/productPrice'
inventory:
$ref: '#/components/schemas/CommerceProduct/definitions/productInventory'
shippingRequired:
type: boolean
description: Indicates whether or not the product requires physical delivery.
status:
$ref: '#/components/schemas/CommerceProduct/definitions/productVariantStatus'
- $ref: '#/components/schemas/CommerceOrder/allOf/2'
- $ref: '#/components/schemas/CommerceOrder/allOf/3'
productVariantRef:
title: Product variant reference
type: object
description: Reference that links the line item to the specific version of product that has been ordered.
properties:
id:
description: The unique identifier of the product variant being referenced.
type: string
examples:
- 13d946f0-c5d5-42bc-b092-97ece17923ab
- 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
- 7110701885
- EILBDVJVNUAGVKRQ
name:
description: Name of the product variant being referenced.
type: string
required:
- id
productPrice:
title: Product Price Variant
x-internal: true
type: object
properties:
currency:
$ref: '#/components/schemas/AccountingAccount/definitions/accountPrototype/properties/currency'
nullable: true
unitPrice:
type: number
format: decimal
description: The product variant's unit price.
productInventory:
title: Product Inventory
description: Information about the total inventory as well as the locations inventory is in.
x-internal: true
type: object
properties:
totalQuantity:
type: number
format: decimal
nullable: true
description: The total quantity of stock remaining across locations.
locations:
type: array
items:
$ref: '#/components/schemas/CommerceProduct/definitions/productInventoryLocation'
productInventoryLocation:
title: Product Inventory Location
x-internal: true
type: object
properties:
quantity:
type: number
format: decimal
description: The quantity of stock remaining at location.
locationRef:
$ref: '#/components/schemas/CommerceLocation/definitions/locationRef'
productVariantStatus:
x-internal: true
type: string
description: The status of the product variant.
enum:
- Unknown
- Published
- Unpublished
CommerceProducts:
title: 'Commerce: Products'
x-internal: true
allOf:
- type: object
properties:
results:
type: array
items:
$ref: '#/components/schemas/CommerceProduct'
- $ref: '#/components/schemas/PagingInfo'
CommerceTransaction:
title: 'Commerce: Transaction'
description: |-
Details of all financial transactions recorded in the commerce or point of sale system are added to the Transactions data type. For example, payments, service charges, and fees.
You can use data from the Transactions endpoints to calculate key metrics, such as:
- Transaction volumes
- Average transaction volume
- Average transaction value
- Returns
- Payouts
Explore our [data coverage](https://knowledge.codat.io/supported-features/commerce?view=tab-by-data-type&dataType=commerce-transactions) for this data type.
type: object
allOf:
- $ref: '#/components/schemas/CommerceOrder/allOf/0'
- type: object
properties:
totalAmount:
description: The total transaction amount
type: number
format: decimal
examples:
- 194.12
- -283.56
- 0
currency:
$ref: '#/components/schemas/AccountingAccount/definitions/accountPrototype/properties/currency'
type:
$ref: '#/components/schemas/CommerceTransaction/definitions/transactionType'
subType:
description: Non-standardised transaction type data from the commerce software
type: string
examples:
- CardPayment
- Invoice payment
transactionSourceRef:
description: Link to the source event which triggered this transaction
allOf:
- $ref: '#/components/schemas/CommerceTransaction/definitions/transactionSourceRef'
supplementalData:
$ref: '#/components/schemas/SupplementalData'
- allOf:
- type: object
x-stoplight:
id: c590b4405180f
allOf:
- $ref: '#/components/schemas/CommerceOrder/allOf/2'
- type: object
x-stoplight:
id: gdyjg7bg783br
properties:
sourceCreatedDate:
$ref: '#/components/schemas/Dataset/properties/requested'
description: The date on which this record was created in the originating system
- $ref: '#/components/schemas/CommerceOrder/allOf/3'
x-stoplight:
id: 9e815c1766554
definitions:
transactionSourceRef:
title: Transaction Source Reference
x-internal: true
allOf:
- title: Record Ref
x-internal: true
type: object
properties:
id:
description: The unique identitifer of the record being referenced
type: string
examples:
- 13d946f0-c5d5-42bc-b092-97ece17923ab
- 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
- 7110701885
- EILBDVJVNUAGVKRQ
type:
description: The type of record being referenced.
type: string
required:
- id
- type
description: ''
- type: object
properties:
type:
$ref: '#/components/schemas/CommerceTransaction/definitions/transactionSourceType'
transactionSourceType:
x-internal: true
type: string
description: The type of source the transaction arose.
enum:
- Fee
- Order
- Payment
- ServiceCharge
- Unknown
transactionType:
x-internal: true
description: |-
The type of the platform transaction:
- `Unknown`
- `FailedPayout` — Failed transfer of funds from the seller's merchant account to their bank account.
- `Payment` — Credit and debit card payments.
- `PaymentFee` — Payment provider's fee on each card payment.
- `PaymentFeeRefund` — Payment provider's fee that has been refunded to the seller.
- `Payout` — Transfer of funds from the seller's merchant account to their bank account.
- `Refund` — Refunds to a customer's credit or debit card.
- `Transfer` — Secure transfer of funds to the seller's bank account.
type: string
enum:
- Payment
- Refund
- Payout
- FailedPayout
- Transfer
- PaymentFee
- PaymentFeeRefund
- Unknown
examples: []
CommerceTransactions:
title: 'Commerce: Transactions'
x-internal: true
allOf:
- type: object
properties:
results:
type: array
items:
$ref: '#/components/schemas/CommerceTransaction'
- $ref: '#/components/schemas/PagingInfo'
Companies:
title: Companies
x-internal: true
allOf:
- type: object
properties:
results:
type: array
items:
$ref: '#/components/schemas/Company'
- $ref: '#/components/schemas/PagingInfo'
Company:
title: Company
description: "\uFEFFIn Codat, a company represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/sync-for-commerce-v1-api#/schemas/Connection) to different data sources such as one connection to [Xero](https://docs.codat.io/integrations/accounting/xero/accounting-xero) for accounting data, two connections to [Plaid](https://docs.codat.io/integrations/banking/plaid/banking-plaid) for two bank accounts and a connection to [Zettle](https://docs.codat.io/integrations/commerce/zettle/commerce-zettle) for POS data.\n\nTypically each company is one of your customers.\n\nWhen you create a company, you can specify a `name` and we will automatically generate a unique `id` for the company. You can also add a `description` to store any additional information about the company."
type: object
allOf:
- $ref: '#/components/schemas/Company/definitions/companyDetails'
- type: object
properties:
dataConnections:
type: array
items:
$ref: '#/components/schemas/Connection'
definitions:
companyDetails:
title: Company details
type: object
properties:
id:
$ref: '#/components/parameters/companyId/schema'
name:
type: string
description: The name of the company
example: Codat Ltd.
description:
$ref: '#/components/schemas/CreateCompany/properties/description'
nullable: true
redirect:
type: string
format: uri
description: 'The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company.'
example: 'https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739'
lastSync:
$ref: '#/components/schemas/Dataset/properties/requested'
nullable: true
created:
$ref: '#/components/schemas/Dataset/properties/requested'
createdByUserName:
type: string
description: Name of user that created the company in Codat.
nullable: true
products:
type: array
items:
type: string
description: An array of products that are currently enabled for the company.
tags:
type: object
maxProperties: 10
propertyNames:
pattern: '^.{1,27}$'
additional properties:
type: string
maxLength: 100
description: A collection of user-defined key-value pairs that store custom metadata against the company.
required:
- id
- name
- redirect
companyReference:
title: Company reference
type: object
properties:
id:
$ref: '#/components/parameters/companyId/schema'
name:
$ref: '#/components/schemas/Company/definitions/companyDetails/properties/name'
description:
$ref: '#/components/schemas/Company/definitions/companyDetails/properties/description'
links:
type: object
description: A collection of links for the company.
properties:
portal:
type: string
format: uri
description: Link to the company page in the portal.
tags:
$ref: '#/components/schemas/Company/definitions/companyDetails/properties/tags'
examples:
- id: 0498e921-9b53-4396-a412-4f2f5983b0a2
name: string
redirect: 'https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739'
lastSync: '2022-01-01T12:00:00.000Z'
created: '2022-01-01T12:00:00.000Z'
createdByUserName: string
tags:
region: us
uid: f6b0c253-16c7-4da1-a0c5-9c871e9c9d6c
dataConnections:
- id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd
integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c
integrationKey: dfxm
sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee
platformName: Basiq
linkUrl: 'https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start'
status: Linked
lastSync: '2022-10-27T10:22:43.6464237Z'
created: '2022-10-27T09:53:29Z'
sourceType: Banking
CompanyRequestBody:
$ref: '#/components/schemas/CreateCompany'
ConfigAccount:
x-internal: true
title: Account configuration
type: object
description: G/L account object for configuration.
properties:
labelText:
type: string
nullable: true
description: Label text for sales configuration section.
descriptionText:
type: string
nullable: true
description: Descriprtive text for sales configuration section.
selectedAccountId:
type: string
nullable: true
description: Selected account id from the list of available accounts.
required:
type: boolean
description: Required section to be configured for sync.
accountOptions:
type: array
description: Object containing account options.
items:
$ref: '#/components/schemas/AccountOption'
nullable: true
additionalProperties: false
Configuration:
title: Configuration
type: object
properties:
sales:
$ref: '#/components/schemas/Sales'
payments:
$ref: '#/components/schemas/Payments'
newPayments:
$ref: '#/components/schemas/NewPayments'
fees:
$ref: '#/components/schemas/Fees'
additionalProperties: false
Connection:
title: Connection
description: "\uFEFFA connection represents a [company's](https://docs.codat.io/sync-for-commerce-v1-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:
$ref: '#/components/parameters/connectionId/schema'
integrationId:
type: string
format: uuid
example: fd321cb6-7963-4506-b873-e99593a45e30
description: A Codat ID representing the integration.
integrationKey:
type: string
description: A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future.
sourceId:
$ref: '#/components/schemas/Branding/properties/sourceId'
sourceType:
$ref: '#/components/schemas/Integration/definitions/sourceType'
platformName:
type: string
description: Name of integration connected to company.
linkUrl:
type: string
format: uri
description: The link URL your customers can use to authorize access to their business application.
example: 'https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/2e2eb431-c1fa-4dc9-93fa-d29781c12bcd/start'
status:
$ref: '#/components/schemas/Connection/definitions/dataConnectionStatus'
lastSync:
$ref: '#/components/schemas/Dataset/properties/requested'
nullable: true
created:
$ref: '#/components/schemas/Dataset/properties/requested'
dataConnectionErrors:
type: array
nullable: true
items:
$ref: '#/components/schemas/Connection/definitions/dataConnectionError'
connectionInfo:
type: object
nullable: true
additionalProperties:
type: string
additionalProperties: false
required:
- id
- integrationId
- integrationKey
- sourceId
- platformName
- linkUrl
- status
- created
- sourceType
definitions:
dataConnectionStatus:
title: Data connection status
description: The current authorization status of the data connection.
type: string
enum:
- PendingAuth
- Linked
- Unlinked
- Deauthorized
dataConnectionError:
title: Data connection error
type: object
properties:
statusCode:
type: string
description: The HTTP status code returned by the source platform when the error occurred.
statusText:
type: string
description: A non-numeric status code/text returned by the source platform when the error occurred.
errorMessage:
type: string
description: A message about a error returned by Codat.
erroredOnUtc:
$ref: '#/components/schemas/Dataset/properties/requested'
status:
title: Error status
description: The current status of a transient error. Null statuses indicate that the error is not transient.
type: string
nullable: true
enum:
- Active
- Resolved
resolvedOnUtc:
description: The datetime in Utc that the error was resolved.
nullable: true
$ref: '#/components/schemas/Dataset/properties/requested'
dataConnectionSourceType:
title: Source Type
description: The type of platform of the connection.
type: string
enum:
- Accounting
- Banking
- BankFeed
- Commerce
- Expense
- Other
- Unknown
example: Accounting
example:
id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd
integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c
integrationKey: dfxm
sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee
platformName: Basiq
linkUrl: 'https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start'
status: Linked
lastSync: '2022-10-27T10:22:43.6464237Z'
created: '2022-10-27T09:53:29Z'
sourceType: Banking
Connections:
title: Connections
x-internal: true
allOf:
- type: object
properties:
results:
type: array
items:
$ref: '#/components/schemas/Connection'
- $ref: '#/components/schemas/PagingInfo'
CreateCompany:
title: Create company request
x-internal: true
type: object
properties:
name:
type: string
description: Name of company being connected.
pattern: '^[A-Za-z0-9\s\-'',&@.,?!\s]+$'
minLength: 1
example: Bank of Dave
description:
type: string
example: Requested early access to the new financing scheme.
description: 'Additional information about the company. This can be used to store foreign IDs, references, etc.'
tags:
$ref: '#/components/schemas/Company/definitions/companyDetails/properties/tags'
required:
- name
Customer:
title: Customer
x-internal: true
type: object
properties:
selectedCustomerId:
type: string
nullable: true
description: Selected customer id from the list of customer records on the accounting software.
customerOptions:
type: array
description: List of customer options from the list of customer records on the accounting software.
items:
$ref: '#/components/schemas/Option'
nullable: true
additionalProperties: false
Dataset:
title: Dataset
x-internal: true
required:
- companyId
- connectionId
- id
- isCompleted
- isErrored
- progress
- requested
- status
type: object
properties:
datasetLogsUrl:
type: string
format: uri
nullable: true
description: URI to the dataset's logs.
id:
type: string
format: uuid
description: Identifier for the dataset.
companyId:
$ref: '#/components/parameters/companyId/schema'
connectionId:
$ref: '#/components/parameters/connectionId/schema'
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
status:
$ref: '#/components/schemas/Dataset/definitions/datasetStatus'
errorMessage:
type: string
nullable: true
description: A brief message about the error.
requested:
title: Date time
type: string
examples:
- 2022-10-23T00:00:00.000Z
- 2022-10-23T00:00:00.000Z
description: |-
In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
completed:
$ref: '#/components/schemas/Dataset/properties/requested'
nullable: true
progress:
type: integer
format: int32
description: An integer signifying the progress of the dataset.
isCompleted:
type: boolean
description: '`True` if the dataset completed successfully.'
isErrored:
type: boolean
description: '`True` if the dataset entered an error state.'
validationInformationUrl:
type: string
nullable: true
format: uri
description: URI to the dataset's validation information.
definitions:
datasetStatus:
title: Dataset status
type: string
description: The current status of the dataset.
enum:
- Initial
- Queued
- Fetching
- MapQueued
- Mapping
- Complete
- FetchError
- MapError
- InternalError
- ProcessingQueued
- Processing
- ProcessingError
- ValidationQueued
- Validating
- ValidationError
- AuthError
- Cancelled
- NotSupported
- RateLimitError
- PermissionsError
- PrerequisiteNotMet
DataStatus:
title: Data status
description: Describes the state of data in the Codat cache for a company and data type
type: object
required:
- dataType
- lastSuccessfulSync
- currentStatus
properties:
dataType:
$ref: '#/components/schemas/Dataset/properties/dataType'
lastSuccessfulSync:
$ref: '#/components/schemas/Dataset/properties/requested'
currentStatus:
$ref: '#/components/schemas/Dataset/definitions/datasetStatus'
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
DataStatusResponse:
x-internal: true
title: Data status response
type: object
additionalProperties:
$ref: '#/components/schemas/DataStatus'
DataType:
x-internal: true
$ref: '#/components/schemas/Dataset/properties/dataType'
DateRange:
x-internal: true
title: Data range
type: object
properties:
start:
$ref: '#/components/schemas/Dataset/properties/requested'
description: Start date of the Sync.
finish:
$ref: '#/components/schemas/Dataset/properties/requested'
description: Finish date of the Sync.
additionalProperties: false
ErrorMessage:
title: Error message
type: object
x-internal: true
properties:
statusCode:
type: integer
description: The HTTP status code returned by the error.
service:
type: string
description: Codat's service the returned the error.
error:
type: string
description: A brief description of the error.
correlationId:
type: string
description: Unique identifier used to propagate to all downstream services and determine the source of the error.
validation:
$ref: '#/components/schemas/ErrorMessage/definitions/errorValidation'
canBeRetried:
type: string
description: '`True` if the error occurred transiently and can be retried.'
detailedErrorCode:
type: integer
description: Machine readable error code used to automate processes based on the code returned.
definitions:
errorValidation:
title: Validation error
type: object
nullable: true
description: 'A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here.'
properties:
errors:
type: array
nullable: true
items:
$ref: '#/components/schemas/ErrorMessage/definitions/errorValidationItem'
warnings:
type: array
nullable: true
items:
$ref: '#/components/schemas/ErrorMessage/definitions/errorValidationItem'
errorValidationItem:
title: Validation error item
type: object
properties:
itemId:
type: string
nullable: true
description: Unique identifier for a validation item.
message:
type: string
nullable: true
description: A message outlining validation item's issue.
validatorName:
type: string
nullable: true
description: Name of validator.
Fees:
title: Fees
x-internal: true
type: object
properties:
feesSupplier:
$ref: '#/components/schemas/FeesSupplier'
syncFees:
type: boolean
description: Boolean indicator to enable syncing fees.
accounts:
type: object
additionalProperties:
$ref: '#/components/schemas/ConfigAccount'
nullable: true
additionalProperties: false
FeesSupplier:
x-internal: true
title: Supplier fees
type: object
properties:
selectedSupplierId:
type: string
nullable: true
description: Selected supplier id from the list of supplier records on the accounting software.
supplierOptions:
type: array
description: List of supplier options from the list of supplier records on the accounting software.
items:
$ref: '#/components/schemas/Option'
nullable: true
additionalProperties: false
Grouping:
title: Grouping
x-internal: true
type: object
properties:
groupingPeriod:
$ref: '#/components/schemas/GroupingPeriod'
groupingLevels:
$ref: '#/components/schemas/GroupingLevels'
additionalProperties: false
GroupingLevels:
x-internal: true
title: Grouping levels
type: object
properties:
invoiceLevel:
$ref: '#/components/schemas/InvoiceLevelSelection'
invoiceLineLevel:
$ref: '#/components/schemas/InvoiceLineLevelSelection'
additionalProperties: false
GroupingPeriod:
x-internal: true
title: Grouping period
type: object
properties:
selectedGroupingPeriod:
type: string
nullable: true
description: Grouping period i.e. Daily sales.
groupingPeriodOptions:
type: array
description: Array of grouping period options.
items:
type: string
nullable: true
additionalProperties: false
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
properties:
key:
$ref: '#/components/parameters/platformKey/schema'
logoUrl:
type: string
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/Dataset/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'
InvoiceLevelSelection:
x-internal: true
title: Invoice level selection
type: object
properties:
selectedGroupByOptions:
type: array
description: Selected array of grouping options.
items:
type: string
nullable: true
groupByOptions:
type: array
description: Options for grouping sales.
items:
type: string
nullable: true
additionalProperties: false
InvoiceLineLevelSelection:
x-internal: true
title: Invoice line level selection
type: object
properties:
selectedGroupByOptions:
type: array
description: Invoice line level selection.
items:
type: string
nullable: true
groupByOptions:
type: array
description: Options for grouping on invoice lines.
items:
type: string
nullable: true
additionalProperties: false
InvoiceStatus:
x-internal: true
title: Invoice status
type: object
properties:
selectedInvoiceStatus:
type: string
nullable: true
description: Selected option for invoice status for invoice to be synced.
example: Submitted
invoiceStatusOptions:
type: array
items:
type: string
nullable: true
description: Options for invoice statuses.
additionalProperties: false
Localization:
title: Localization
x-internal: true
type: object
properties:
text:
type: string
description: Value of the property.
nullable: true
required:
type: boolean
description: '`True` if required.'
LocalizationInfo:
title: Localization info
type: object
additionalProperties:
$ref: '#/components/schemas/Localization'
NewPayments:
x-internal: true
title: New payments
type: object
properties:
syncPayments:
type: boolean
description: Boolean indicator for syncing payments.
accounts:
type: object
additionalProperties:
$ref: '#/components/schemas/ConfigAccount'
nullable: true
additionalProperties: false
NewTaxRates:
x-internal: true
title: New tax rates
type: object
properties:
accountingTaxRateOptions:
type: array
description: Array of accounting tax rate options.
items:
$ref: '#/components/schemas/Option'
nullable: true
commerceTaxRateOptions:
type: array
description: Array of tax component options.
items:
$ref: '#/components/schemas/Option'
nullable: true
taxRateMappings:
type: array
description: Array of tax component to rate mapppings.
items:
$ref: '#/components/schemas/TaxRateMapping'
nullable: true
selectedDefaultZeroTaxRateId:
type: string
description: Default tax rate selected for sync.
nullable: true
defaultZeroTaxRateOptions:
type: array
description: Default zero tax rate selected for sync.
items:
$ref: '#/components/schemas/Option'
nullable: true
additionalProperties: false
Option:
title: Option
x-internal: true
type: object
properties:
name:
type: string
description: Name value of the option.
nullable: true
id:
type: string
description: Unique identifier for the option.
additionalProperties: false
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:
- 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'
PaymentMethodRef:
type: object
title: Payment method reference
description: The payment method the record is linked to in the accounting or commerce software.
properties:
id:
description: The unique identifier of the location being referenced.
type: string
name:
description: Name of the location being referenced.
type: string
required:
- id
example:
id: EILBDVJVNUAGVKRQ
name: AliPay
Payments:
title: Payments
x-internal: true
type: object
properties:
syncPayments:
type: boolean
description: Boolean indicator for syncing sales.
accounts:
type: object
additionalProperties:
$ref: '#/components/schemas/ConfigAccount'
nullable: true
additionalProperties: false
PullOperation:
title: Pull operation
description: |-
Information about a queued, in progress or completed pull operation.
*Formally called `dataset`*
type: object
properties:
id:
type: string
format: uuid
description: Unique identifier of the pull operation.
example: 943accd0-4247-42d8-865b-363c8629e1da
companyId:
type: string
format: uuid
description: Unique identifier of the company associated to this pull operation.
example: 22ece347-e5f6-4896-95e0-35a4c7f17023
connectionId:
type: string
format: uuid
description: Unique identifier of the connection associated to this pull operation.
example: 50830828-7d39-4367-b0eb-5ddb2de5faa5
dataType:
title: Data types
x-internal: true
type: string
description: The data type you are requesting in a pull operation.
status:
$ref: '#/components/schemas/Dataset/definitions/datasetStatus'
statusDescription:
type: string
nullable: true
description: Additional information about the dataset status.
example: 'Paused until 2022-10-23T00:00:00.000Z'
errorMessage:
type: string
nullable: true
description: A message about a transient or persistent error returned by Codat or the source platform.
requested:
$ref: '#/components/schemas/Dataset/properties/requested'
completed:
$ref: '#/components/schemas/Dataset/properties/requested'
progress:
type: integer
description: An integer signifying the progress of the pull operation.
isCompleted:
type: boolean
description: '`True` if the pull operation is completed successfully. The `isCompleted` property is not queryable. To filter failed pull operations, query by `status!=Complete&&status!=NotSupported` instead.'
isErrored:
type: boolean
description: '`True` if the pull operation entered an error state.'
required:
- id
- companyId
- connectionId
- dataType
- status
- requested
- progress
- isCompleted
- isErrored
examples:
- id: 97d60846-f07a-4d42-b5a0-0bdcc6ebf56b
companyId: 4645bd78-8988-45bc-ac9e-67ba5df6e4e5
connectionId: 51baa045-4836-4317-a42e-3542e991e581
dataType: invoices
status: Initial
statusDescription: 'Paused until 2022-10-23T00:00:00.000Z'
requested: '2022-11-14T11:18:37.2798351Z'
progress: 10
isCompleted: false
isErrored: false
PullOperations:
title: Pull operations
x-internal: true
allOf:
- type: object
properties:
results:
type: array
items:
$ref: '#/components/schemas/PullOperation'
- $ref: '#/components/schemas/PagingInfo'
PushOperation:
title: Push operation
type: object
x-internal: true
properties:
changes:
type: array
nullable: true
description: 'Contains a single entry that communicates which record has changed and the manner in which it changed. '
items:
$ref: '#/components/schemas/PushOperation/definitions/pushOperationChange'
dataType:
$ref: '#/components/schemas/Dataset/properties/dataType'
description: 'The type of data being pushed, eg invoices, customers.'
companyId:
$ref: '#/components/parameters/companyId/schema'
pushOperationKey:
type: string
format: uuid
description: 'A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted.'
dataConnectionKey:
$ref: '#/components/parameters/connectionId/schema'
requestedOnUtc:
$ref: '#/components/schemas/Dataset/properties/requested'
description: The datetime when the push was requested.
completedOnUtc:
$ref: '#/components/schemas/Dataset/properties/requested'
description: 'The datetime when the push was completed, null if Pending.'
timeoutInMinutes:
type: integer
format: int32
nullable: true
description: Number of minutes the push operation must complete within before it times out.
timeoutInSeconds:
type: integer
format: int32
nullable: true
deprecated: true
description: Number of seconds the push operation must complete within before it times out.
status:
$ref: '#/components/schemas/PushOperation/definitions/pushOperationStatus'
errorMessage:
type: string
nullable: true
description: A message about the error.
validation:
$ref: '#/components/schemas/PushOperation/definitions/validation'
statusCode:
type: integer
description: Push status code.
required:
- companyId
- pushOperationKey
- dataConnectionKey
- requestedOnUtc
- status
- statusCode
definitions:
validation:
type: object
title: Validation
description: 'A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.'
properties:
errors:
type: array
nullable: true
items:
$ref: '#/components/schemas/PushOperation/definitions/validationItem'
warnings:
type: array
nullable: true
items:
$ref: '#/components/schemas/PushOperation/definitions/validationItem'
validationItem:
title: Validation item
type: object
properties:
itemId:
type: string
nullable: true
description: Unique identifier for a validation item.
message:
type: string
nullable: true
description: A message outlining validation item's issue.
validatorName:
type: string
nullable: true
description: Name of validator.
additionalProperties: false
pushChangeType:
title: Push change type
description: Type of change being applied to record in third party platform.
type: string
enum:
- Unknown
- Created
- Modified
- Deleted
- AttachmentUploaded
pushOperationRef:
title: Push operation reference
x-internal: true
type: object
properties:
id:
type: string
description: Unique identifier for a push operation.
dataType:
$ref: '#/components/schemas/Dataset/properties/dataType'
nullable: true
additionalProperties: false
pushOperationStatus:
title: Push operation status
type: string
enum:
- Pending
- Failed
- Success
- TimedOut
description: The current status of the push operation.
pushOperationChange:
type: object
properties:
type:
$ref: '#/components/schemas/PushOperation/definitions/pushChangeType'
recordRef:
$ref: '#/components/schemas/PushOperation/definitions/pushOperationRef'
attachmentId:
type: string
description: Unique identifier for the attachment created otherwise null.
nullable: true
PushOperations:
title: Push operations
x-internal: true
allOf:
- type: object
properties:
results:
type: array
items:
$ref: '#/components/schemas/PushOperation'
- $ref: '#/components/schemas/PagingInfo'
Sales:
title: Sales
x-internal: true
type: object
properties:
syncSales:
type: boolean
description: Boolean indicator for syncing sales.
accounts:
type: object
additionalProperties:
$ref: '#/components/schemas/ConfigAccount'
nullable: true
invoiceStatus:
$ref: '#/components/schemas/InvoiceStatus'
salesCustomer:
$ref: '#/components/schemas/Customer'
taxRates:
type: object
additionalProperties:
$ref: '#/components/schemas/TaxRateAmount'
nullable: true
newTaxRates:
$ref: '#/components/schemas/NewTaxRates'
grouping:
$ref: '#/components/schemas/Grouping'
additionalProperties: false
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
SyncFlowUrl:
title: Sync flow url
type: object
properties:
url:
type: string
description: Sync flow URL.
example: 'https://sync-flow-integration.codat.io/57b6fad9-e3ca-447b-89db-e4ffa21e6ef3/aiwb/mqjo/start?otp=836415'
SyncRange:
x-internal: true
title: Data range
type: object
required:
- dateRange
properties:
dateRange:
type: object
properties:
start:
$ref: '#/components/schemas/Dataset/properties/requested'
description: Start date of the Sync.
finish:
$ref: '#/components/schemas/Dataset/properties/requested'
description: Finish date of the Sync.
required:
- start
- finish
SyncSummary:
title: Sync summary
type: object
properties:
syncDateRangeUtc:
$ref: '#/components/schemas/DateRange'
companyId:
type: string
format: guid
description: Unique identifier for your SMB in Codat.
example: f4637ec9-9fc0-4a02-8df0-c90d6dc86208
commerceSyncId:
type: string
format: guid
description: Unique identifier for the sync in Codat.
example: 8d0a044e-b683-4fc9-bd0d-bfb2ca5731b7
syncStatusCode:
type: integer
format: int32
description: Numerical status code sync of the company data.
example: 4000
syncStatus:
type: string
nullable: true
description: Status of the sync of the company data. This is linked to status code.
example: 'ValidateError, Pending'
errorMessage:
type: string
nullable: true
description: Friendly error message for the sync operation.
example: Customer 3b9bf2ed-a618-4af2-80f2-f2b57fddc748 is not in an Active state. (Archived)
syncExceptionMessage:
type: string
nullable: true
description: Exception message for the sync operation.
example: Customer 3b9bf2ed-a618-4af2-80f2-f2b57fddc748 is not in an Active state. (Archived)
syncUtc:
$ref: '#/components/schemas/Dataset/properties/requested'
description: UTC DateTime for the Sync.
nullable: true
dataConnections:
type: array
description: Array of containing objects data connection information for the company.
items:
$ref: '#/components/schemas/Connection'
nullable: true
dataPushed:
type: boolean
description: Boolean indicator for data being pushed during a sync operation.
example: true
additionalProperties: false
SyncToLatestArgs:
title: Sync To Latest Args
x-internal: true
type: object
properties:
syncTo:
$ref: '#/components/schemas/Dataset/properties/requested'
description: 'The DateTime, upto which Sync will run up to starting from the previous successful sync'
nullable: true
TaxRateAmount:
x-internal: true
title: Tax rate amount
type: object
properties:
selectedTaxRateId:
type: string
description: Selected tax rate id from the list of tax rates on the accounting software.
nullable: true
taxRateOptions:
type: array
description: Array of tax rate options object.
items:
$ref: '#/components/schemas/Option'
nullable: true
additionalProperties: false
TaxRateMapping:
x-internal: true
title: Tax rate mapping
type: object
properties:
selectedCommerceTaxRateIds:
type: array
items:
type: string
description: Selected tax component id from the list of tax components on the commerce software.
nullable: true
selectedAccountingTaxRateId:
type: string
nullable: true
description: Selected tax rate id from the list of tax rates on the accounting software.
additionalProperties: false
UpdateConnection:
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
VisibleAccounts:
title: Visible accounts
type: object
properties:
visibleAccounts:
description: Visible accounts on sync flow.
type: array
items:
type: string
nullable: true
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.
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).'
timeoutInMinutes:
name: timeoutInMinutes
in: query
schema:
type: integer
format: int32
description: Time limit for the push operation to complete before it is timed out.
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.
accountingAccountId:
name: accountId
in: path
required: true
schema:
type: string
examples:
$ref: '#/components/schemas/CommerceOrder/allOf/0/properties/id/examples'
description: Unique identifier for an account.
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.
locale:
name: locale
in: query
required: true
example: en-us
schema:
type: string
enum:
- en-us
- fr-fr
description: Localization identifier for English (US) or French.
securitySchemes:
auth_header:
name: Authorization
description: 'The word "Basic" followed by a space and your API key. [API keys](https://docs.codat.io/accounting-api#/schemas/apiKeys) are tokens used to control access to the API. You can get an API key via [the Codat Portal](https://app.codat.io/developers/api-keys), via [the API](https://docs.codat.io/codat-api#/api-keys/api-keys-list), or [read more](https://docs.codat.io/using-the-api/authentication) about authentication at Codat.'
type: apiKey
in: header
x-speakeasy-example: Basic BASE_64_ENCODED(API_KEY)
responses:
BadRequest:
description: The request made is not valid.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
examples:
Malformed query:
value:
statusCode: 400
service: PublicApi
error: Error processing request - not valid.
correlationId: bc997528a9d7abb9161ef45f05d38599
canBeRetried: Unknown
detailedErrorCode: 0
Malformed-Query:
description: Your `query` parameter was not correctly formed
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
examples:
Malformed query:
value:
statusCode: 400
service: ClientsApi
error: Error parsing query - Malformed query.
correlationId: bc997528a9d7abb9161ef45f05d38599
canBeRetried: Unknown
detailedErrorCode: 0
Unresolved property:
value:
statusCode: 400
service: PullApi
error: Error parsing query - Could not resolve property isCompleted on Dataset
correlationId: 98457fb9956b7f9b4b2fd4f6e23bb5c8
canBeRetried: Unknown
detailedErrorCode: 0
Unauthorized:
description: Your API request was not properly authorized.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
examples:
Unauthorized:
value:
statusCode: 401
service: PublicApi
error: Unauthorized
correlationId: 7eb40d6b415d7bcd99ce658268284056
canBeRetried: Unknown
detailedErrorCode: 0
Payment-Required:
description: |
An account limit has been exceeded. The type of limit is described in the error property:
- You have exceeded the 50-company limit that applies to a Free plan. Delete any companies you no longer need and retry the request.
- The requested sync schedule is not allowed. You requested an hourly sync schedule but this functionality is not included in the Free plan.
- Your Free account is older than 365 days and has expired. Contact support@codat.io.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
examples:
Conflict:
value:
statusCode: 429
service: PublicApi
error: You have exceeded the 50-company limit that applies to a Free plan. We recommend that you delete any companies you no longer need and retry the request.
correlationId: bc997528a9d7abb9161ef45f05d38599
canBeRetried: Unknown
detailedErrorCode: 0
Forbidden:
description: You are using an outdated API key or a key not associated with that resource.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
examples:
Conflict:
value:
statusCode: 403
service: PublicApi
error: You are using an outdated API key or a key not associated with that resource.
correlationId: bc997528a9d7abb9161ef45f05d38599
canBeRetried: Unknown
detailedErrorCode: 0
Not-Found:
description: |-
One or more of the resources you referenced could not be found.
This might be because your company or data connection id is wrong, or was already deleted.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
examples:
Data connection not found:
value:
statusCode: 404
service: PublicApi
error: Data connection a22dd66b-564a-4832-9b37-7b3ce4aeb7de not found
correlationId: 8fa2b5f4794970a4ee73758f612e8df0
canBeRetried: Unknown
detailedErrorCode: 0
Company not found:
value:
statusCode: 404
service: ClientsApi
error: No company was found with ID 846ed55c-974b-4392-a1f1-87b6fdbf3c5e
correlationId: 0a40c2f31fc8f992fb88b0853e4166f3
canBeRetried: Unknown
detailedErrorCode: 0
No data available:
value:
statusCode: 404
service: PublicApi
error: No data available for accounts for ID e5889b459f544926ac5b8e6756df2s
correlationId: 0a40c2f31fc8f992fb88b0853e4166f3
canBeRetried: Unknown
detailedErrorCode: 0
Conflict:
description: The data type's dataset has not been requested or is still syncing.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
examples:
Conflict:
value:
statusCode: 409
service: PublicApi
error: The data set has not been requested.
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.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
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
canBeRetried: Unknown
detailedErrorCode: 0
Internal-Server-Error:
description: There is a problem with our server. Please try again later.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
examples:
Conflict:
value:
statusCode: 500
service: PublicApi
error: There is a problem with our server. Please try again later.
correlationId: bc997528a9d7abb9161ef45f05d38599
canBeRetried: Unknown
detailedErrorCode: 0
Service-Unavailable:
description: The Codat API is temporarily offline for maintenance. Please try again later.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
examples:
Conflict:
value:
statusCode: 500
service: PublicApi
error: The Codat API is temporarily offline for maintenance. Please try again later.
correlationId: bc997528a9d7abb9161ef45f05d38599
canBeRetried: Unknown
detailedErrorCode: 0