openapi: 3.1.0
servers:
- description: Production
url: 'https://api.codat.io'
info:
title: Assess API
version: '1.0'
contact:
email: support@codat.io
url: 'https://www.codat.io/contact/'
name: Codat
summary: Codat's financial insights API
description: |-
Codat's Assess API enable you to make smarter credit decisions on your small business customers. Assess enriches your customer's accounting, commerce and banking data to surface actionable insights you didn't have before.
[Read more...](https://www.codat.io/assess/)
[See our OpenAPI spec](https://github.com/codatio/oas)
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
tags:
- name: Data integrity
description: Data integrity is important
- name: Reports
description: Data integrity is important
- name: Excel reports
description: Downloadable reports
- name: Categories
description: Categorisation
paths:
/data/assess/accounts/categories:
parameters: []
get:
summary: List account categories
deprecated: true
tags:
- Categories
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Categories'
examples: {}
operationId: list-available-account-categories
description: 'Lists available account categories Codat''s categorisation engine can provide. '
'/data/companies/{companyId}/connections/{connectionId}/assess/accounts/categories':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
get:
deprecated: true
summary: List suggested and confirmed account categories
tags:
- Categories
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CategorisedAccounts'
examples:
Example 1:
value:
results:
- accountRef:
id: 13d946f0-c5d5-42bc-b092-97ece17923ab
name: string
suggested:
type: Asset
subtype: Current
detailType: Cash
modifiedDate: '2019-08-24T14:15:22Z'
confirmed:
type: Asset
subtype: Current
detailType: Cash
modifiedDate: '2019-08-24T14:15:22Z'
_links:
self:
href: /data/companies/companyId/connections/connectionId/assess/accounts/categories
current:
href: /data/companies/companyId/connections/connectionId/assess/accounts/categories?page=1&pageSize=10
pageNumber: 1
pageSize: 10
totalResults: 1
operationId: list-accounts-categories
description: Lists suggested and confirmed chart of account categories for the given company and data connection.
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/pageSize'
- $ref: '#/components/parameters/query'
- $ref: '#/components/parameters/orderBy'
patch:
deprecated: true
summary: Confirm categories for accounts
tags:
- Categories
operationId: update-accounts-categories
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/CategorisedAccount'
description: Comfirms the categories for all or a batch of accounts for a specific connection.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ConfirmCategories'
examples: {}
description: ''
'/data/companies/{companyId}/connections/{connectionId}/assess/accounts/{accountId}/categories':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
- schema:
type: string
name: accountId
in: path
required: true
description: Nominal account id
get:
deprecated: true
summary: Get suggested and/or confirmed category for a specific account
tags:
- Categories
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CategorisedAccount'
operationId: get-account-category
description: Get category for specific nominal account.
patch:
deprecated: true
summary: Patch account categories
tags:
- Categories
operationId: update-account-category
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CategorisedAccount'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ConfirmCategory'
description: Update category for a specific nominal account
'/data/companies/{companyId}/assess/dataTypes/{dataType}/dataIntegrity/status':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/dataIntegrityDataType'
get:
summary: Get data integrity status
tags:
- Data integrity
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
operationId: get-data-integrity-status
description: Gets match status for a given company and datatype.
'/data/companies/{companyId}/assess/dataTypes/{dataType}/dataIntegrity/summaries':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/dataIntegrityDataType'
get:
summary: Get data integrity summary
tags:
- Data integrity
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Summaries'
operationId: get-data-integrity-summaries
description: 'Gets match summary for a given company and datatype, optionally restricted by a Codat query string.'
parameters:
- $ref: '#/components/parameters/query'
'/data/companies/{companyId}/assess/dataTypes/{dataType}/dataIntegrity/details':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/dataIntegrityDataType'
get:
summary: Lists data integrity details for date type
tags:
- Data integrity
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Details'
operationId: get-data-integrity-details
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/pageSize'
- $ref: '#/components/parameters/query'
- $ref: '#/components/parameters/orderBy'
description: 'Gets record-by-record match results for a given company and datatype, optionally restricted by a Codat query string.'
'/data/companies/{companyId}/connections/{connectionId}/assess/financialMetrics':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
get:
deprecated: true
x-internal: true
summary: List financial metrics
tags:
- Reports
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/FinancialMetrics'
example:
currency: GBP
periodUnit: Month
metrics:
- name: string
metricUnit: Money
key: EBITDA
periods:
- fromDate: '2022-02-12'
toDate: '2022-12-31'
value: 0
inputs:
- name: string
value: 0
errors:
- type: MissingAccountData
massage: Missing account data
details:
missingData:
- Expense.Operating.Interest
- Expense.NonOperating.Interest
errors:
- type: UncategorizedAccounts
message: 'There are uncategorized accounts, see details.'
details:
accountIds:
- '123'
- '456'
- '789'
errors:
- type: DataNotSynced
message: Account categories data has not been synced
operationId: get-enhanced-financial-metrics
description: 'Gets all the available financial metrics for a given company, over one or more periods.'
parameters:
- $ref: '#/components/parameters/reportDate'
- $ref: '#/components/parameters/periodLength'
- $ref: '#/components/parameters/numberOfPeriods'
- schema:
type: boolean
in: query
name: showMetricInputs
description: 'If set to true, then the system includes the input values within the response.'
'/data/companies/{companyId}/connections/{connectionId}/assess/enhancedProfitAndLoss':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
get:
deprecated: true
summary: Enhanced Profit and Loss
tags:
- Reports
operationId: get-enhanced-profit-and-loss
description: 'Gets a fully categorized profit and loss statement for a given company, over one or more period(s).'
parameters:
- $ref: '#/components/parameters/reportDate'
- $ref: '#/components/parameters/periodLength'
- $ref: '#/components/parameters/numberOfPeriods'
- $ref: '#/components/parameters/includeDisplayNames'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Report'
example:
reportInfo:
name: enhanced_profit_and_loss
displayName: Enhanced Profit and Loss
dimensions:
- index: 0
displayName: Period
type: datespan
items:
- index: 0
displayName: Period 0
start: '2021-02-01'
end: '2022-01-31'
- index: 1
displayName: Category
type: string
items:
- index: 0
value: Income
- index: 1
value: Expense
- index: 2
value: Gross Profit
- index: 3
value: Net Operating Profit
- index: 4
value: Net Profit
- index: 2
displayName: Sub Type
type: string
items:
- index: 0
value: Operating
- index: 1
value: Cost of sales
- index: 2
value: Non-operating
- index: 3
displayName: Detail Type
type: string
items:
- index: 0
value: Other operating income
- index: 1
value: Materials
- index: 2
value: Marketing
- index: 3
value: Depreciation and depletion
- index: 4
value: Entertainment
- index: 5
value: General and Administrative
- index: 6
value: Repairs and maintenance
- index: 7
value: Distribution
- index: 8
value: Buildings rent and lease
- index: 9
value: Subscription fees
- index: 10
value: Travel
- index: 11
value: Bank charges
- index: 12
value: Taxes
- index: 13
value: Labour
- index: 14
value: Amortization
- index: 15
value: Interest
- index: 16
value: Other non-operating expenses
- index: 4
displayName: Accounts
type: recordRef
items:
- index: 0
id: 72df89d2-512b-4455-af51-a6b563733842
displayName: Sales
dataType: account
- index: 1
id: 68794a8f-b22d-4520-b97b-025b7cb10f94
displayName: Other Revenue
dataType: account
- index: 2
id: 7403e960-5b72-42ff-abf4-c870ad8910bd
displayName: Purchases
dataType: account
- index: 3
id: 868591ad-f9c2-4956-a5ec-c32c1d48c6f3
displayName: Advertising & Marketing
dataType: account
- index: 4
id: 940c8a59-3348-4a0b-a1b1-781d9f29cc8b
displayName: Depreciation Expense
dataType: account
- index: 5
id: e7ac3baa-cfbe-40c1-a172-83d22e84435b
displayName: Entertainment-100% business
dataType: account
- index: 6
id: b5e801e8-8dbc-4390-ac99-3b0fff54a89f
displayName: General Expenses
dataType: account
- index: 7
id: 5360066d-1474-49f6-a7a5-c66d5f6032ba
displayName: 'Light, Power, Heating'
dataType: account
- index: 8
id: 138a8eb3-5c08-4e59-a3bc-892119694447
displayName: Motor Vehicle Expenses
dataType: account
- index: 9
id: 1734ff00-2a17-45b4-8db6-2dc2e832c460
displayName: 'Postage, Freight & Courier'
dataType: account
- index: 10
id: 7aa7988a-ff61-4cb8-bef3-15395355d108
displayName: Printing & Stationery
dataType: account
- index: 11
id: 9cbe5fe4-ca60-4792-8bf1-de01fb7010aa
displayName: Rent
dataType: account
- index: 12
id: 04f7111b-55d4-4efc-b329-1bd5c791933a
displayName: Repairs & Maintenance
dataType: account
- index: 13
id: 7d8d0322-f452-47de-a8e8-54b0130e6f38
displayName: Subscriptions
dataType: account
- index: 14
id: 043b6bcb-dfe6-4c97-9b4c-f9b300fe3f03
displayName: Telephone & Internet
dataType: account
- index: 15
id: df62060b-41cc-4bf2-9de7-c7e537b5663a
displayName: Travel - National
dataType: account
- index: 16
id: eef78ed1-dfed-447c-bdba-3a49fb2c044b
displayName: Audit & Accountancy fees
dataType: account
- index: 17
id: f3aa84fe-5c31-4107-b207-7e0419f636d7
displayName: Bank Fees
dataType: account
- index: 18
id: c16f5c35-8283-47da-9d09-5fecb183b0cb
displayName: Cleaning
dataType: account
- index: 19
id: fb3210ef-edeb-48af-bb49-b85d40c1e6bb
displayName: Corporation Tax
dataType: account
- index: 20
id: 7f6a0e92-65be-4333-9a0a-d981b03bedd1
displayName: Wages
dataType: account
- index: 21
id: e8a0a24e-2dab-46b1-bfe1-6e92551c04e8
displayName: Purchase Discounts
dataType: account
- index: 22
id: 4378ddba-36b4-4b35-9970-bd972b20d137
displayName: Amortization
dataType: account
- index: 23
id: 78785fd7-f197-4c34-aa17-6e76b9255d34
displayName: Interest Paid (operating)
dataType: account
- index: 24
id: cbf82e0d-87a7-464d-b567-9274ea94a1c0
displayName: Charitable and Political Donations
dataType: account
measures:
- displayName: Value
units: GBP
index: 0
type: currency
- displayName: Percentage change vs previous period
units: '%'
index: 1
type: percentage
reportData:
- dimension: 0
dimensionDisplayName: Period
item: 0
itemDisplayName: Period 0
components:
- dimension: 1
dimensionDisplayName: Category
item: 0
itemDisplayName: Income
measures:
- index: 0
measureDisplayName: Value
value: 1422402.4
components:
- dimension: 2
dimensionDisplayName: Sub Type
item: 0
itemDisplayName: Operating
measures:
- index: 0
measureDisplayName: Value
value: 1422402.4
components:
- dimension: 3
dimensionDisplayName: Detail Type
item: 0
itemDisplayName: OtherOperatingIncome
measures:
- index: 0
measureDisplayName: Value
value: 1422402.4
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 0
itemDisplayName: Sales
measures:
- index: 0
measureDisplayName: Value
value: 1412199.76
- dimension: 4
dimensionDisplayName: Accounts
item: 1
itemDisplayName: Other Revenue
measures:
- index: 0
measureDisplayName: Value
value: 10202.64
- dimension: 1
dimensionDisplayName: Category
item: 1
itemDisplayName: Expense
measures:
- index: 0
measureDisplayName: Value
value: 979403.65
components:
- dimension: 2
dimensionDisplayName: Sub Type
item: 1
itemDisplayName: CostOfSales
measures:
- index: 0
measureDisplayName: Value
value: 450689.45
components:
- dimension: 3
dimensionDisplayName: Detail Type
item: 1
itemDisplayName: Materials
measures:
- index: 0
measureDisplayName: Value
value: 306689.45
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 2
itemDisplayName: Purchases
measures:
- index: 0
measureDisplayName: Value
value: 301322.16
- dimension: 4
dimensionDisplayName: Accounts
item: 21
itemDisplayName: Purchase Discounts
measures:
- index: 0
measureDisplayName: Value
value: 5367.29
- dimension: 3
dimensionDisplayName: Detail Type
item: 13
itemDisplayName: Labour
measures:
- index: 0
measureDisplayName: Value
value: 144000
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 20
itemDisplayName: Wages
measures:
- index: 0
measureDisplayName: Value
value: 144000
- dimension: 2
dimensionDisplayName: Sub Type
item: 0
itemDisplayName: Operating
measures:
- index: 0
measureDisplayName: Value
value: 513707.91
components:
- dimension: 3
dimensionDisplayName: Detail Type
item: 2
itemDisplayName: Marketing
measures:
- index: 0
measureDisplayName: Value
value: 269531.7
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 3
itemDisplayName: Advertising & Marketing
measures:
- index: 0
measureDisplayName: Value
value: 269531.7
- dimension: 3
dimensionDisplayName: Detail Type
item: 3
itemDisplayName: DepreciationDepletion
measures:
- index: 0
measureDisplayName: Value
value: 13256.93
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 4
itemDisplayName: Depreciation Expense
measures:
- index: 0
measureDisplayName: Value
value: 13256.93
- dimension: 3
dimensionDisplayName: Detail Type
item: 4
itemDisplayName: Entertainment
measures:
- index: 0
measureDisplayName: Value
value: 15526.09
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 5
itemDisplayName: Entertainment-100% business
measures:
- index: 0
measureDisplayName: Value
value: 15526.09
- dimension: 3
dimensionDisplayName: Detail Type
item: 5
itemDisplayName: GeneralAdministrative
measures:
- index: 0
measureDisplayName: Value
value: 49065.2
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 6
itemDisplayName: General Expenses
measures:
- index: 0
measureDisplayName: Value
value: 16654.32
- dimension: 4
dimensionDisplayName: Accounts
item: 7
itemDisplayName: 'Light, Power, Heating'
measures:
- index: 0
measureDisplayName: Value
value: 14859.1
- dimension: 4
dimensionDisplayName: Accounts
item: 10
itemDisplayName: Printing & Stationery
measures:
- index: 0
measureDisplayName: Value
value: 15404.82
- dimension: 4
dimensionDisplayName: Accounts
item: 14
itemDisplayName: Telephone & Internet
measures:
- index: 0
measureDisplayName: Value
value: 540
- dimension: 4
dimensionDisplayName: Accounts
item: 16
itemDisplayName: Audit & Accountancy fees
measures:
- index: 0
measureDisplayName: Value
value: 46.96
- dimension: 4
dimensionDisplayName: Accounts
item: 18
itemDisplayName: Cleaning
measures:
- index: 0
measureDisplayName: Value
value: 1560
- dimension: 3
dimensionDisplayName: Detail Type
item: 6
itemDisplayName: RepairsMaintenance
measures:
- index: 0
measureDisplayName: Value
value: 22421.17
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 8
itemDisplayName: Motor Vehicle Expenses
measures:
- index: 0
measureDisplayName: Value
value: 13531.13
- dimension: 4
dimensionDisplayName: Accounts
item: 12
itemDisplayName: Repairs & Maintenance
measures:
- index: 0
measureDisplayName: Value
value: 8890.04
- dimension: 3
dimensionDisplayName: Detail Type
item: 7
itemDisplayName: Distribution
measures:
- index: 0
measureDisplayName: Value
value: 12593.28
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 9
itemDisplayName: 'Postage, Freight & Courier'
measures:
- index: 0
measureDisplayName: Value
value: 12593.28
- dimension: 3
dimensionDisplayName: Detail Type
item: 8
itemDisplayName: BuildingRentLease
measures:
- index: 0
measureDisplayName: Value
value: 96000
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 11
itemDisplayName: Rent
measures:
- index: 0
measureDisplayName: Value
value: 96000
- dimension: 3
dimensionDisplayName: Detail Type
item: 9
itemDisplayName: SubscriptionFees
measures:
- index: 0
measureDisplayName: Value
value: 480
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 13
itemDisplayName: Subscriptions
measures:
- index: 0
measureDisplayName: Value
value: 480
- dimension: 3
dimensionDisplayName: Detail Type
item: 10
itemDisplayName: Travel
measures:
- index: 0
measureDisplayName: Value
value: 15505.18
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 15
itemDisplayName: Travel - National
measures:
- index: 0
measureDisplayName: Value
value: 15505.18
- dimension: 3
dimensionDisplayName: Detail Type
item: 11
itemDisplayName: BankCharges
measures:
- index: 0
measureDisplayName: Value
value: 14529.79
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 17
itemDisplayName: Bank Fees
measures:
- index: 0
measureDisplayName: Value
value: 14529.79
- dimension: 3
dimensionDisplayName: Detail Type
item: 14
itemDisplayName: Amortization
measures:
- index: 0
measureDisplayName: Value
value: 68.64
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 22
itemDisplayName: Amortization
measures:
- index: 0
measureDisplayName: Value
value: 68.64
- dimension: 3
dimensionDisplayName: Detail Type
item: 15
itemDisplayName: Interest
measures:
- index: 0
measureDisplayName: Value
value: 4729.93
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 23
itemDisplayName: Interest Paid (operating)
measures:
- index: 0
measureDisplayName: Value
value: 4729.93
- dimension: 2
dimensionDisplayName: Sub Type
item: 2
itemDisplayName: NonOperating
measures:
- index: 0
measureDisplayName: Value
value: 15006.29
components:
- dimension: 3
dimensionDisplayName: Detail Type
item: 12
itemDisplayName: Taxes
measures:
- index: 0
measureDisplayName: Value
value: 10801.01
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 19
itemDisplayName: Corporation Tax
measures:
- index: 0
measureDisplayName: Value
value: 10801.01
- dimension: 3
dimensionDisplayName: Detail Type
item: 16
itemDisplayName: OtherNonOperatingExpenses
measures:
- index: 0
measureDisplayName: Value
value: 4205.28
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 24
itemDisplayName: Charitable and Political Donations
measures:
- index: 0
measureDisplayName: Value
value: 4205.28
- dimension: 1
dimensionDisplayName: Category
item: 2
itemDisplayName: Gross Profit
measures:
- index: 0
measureDisplayName: Value
value: 971712.95
- dimension: 1
dimensionDisplayName: Category
item: 3
itemDisplayName: Net Operating Profit
measures:
- index: 0
measureDisplayName: Value
value: 458005.04
- dimension: 1
dimensionDisplayName: Category
item: 4
itemDisplayName: Net Profit
measures:
- index: 0
measureDisplayName: Value
value: 442998.75
'/data/companies/{companyId}/connections/{connectionId}/assess/enhancedBalanceSheet':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
get:
deprecated: true
summary: Enhanced Balance Sheet
tags:
- Reports
operationId: get-enhanced-balance-sheet
parameters:
- $ref: '#/components/parameters/reportDate'
- $ref: '#/components/parameters/periodLength'
- $ref: '#/components/parameters/numberOfPeriods'
- $ref: '#/components/parameters/includeDisplayNames'
description: 'Gets a fully categorized balance sheet statement for a given company, over one or more period(s).'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Report'
example:
reportInfo:
name: enhanced_balance_sheet
displayName: Enhanced Balance Sheet
dimensions:
- index: 0
displayName: Period
type: datespan
items:
- index: 0
displayName: Period 0
start: '2022-01-01'
end: '2022-12-31'
- index: 1
displayName: Category
type: string
items:
- index: 0
value: Asset
- index: 1
value: Liability
- index: 2
value: Equity
- index: 3
value: Net Assets
- index: 2
displayName: Sub Type
type: string
items:
- index: 0
value: Non-current assets
- index: 1
value: Current assets
- index: 2
value: Current liabilities
- index: 3
value: Non-current liabilities
- index: 4
value: Equity
- index: 3
displayName: Detail Type
type: string
items:
- index: 0
value: Fixtures and fittings
- index: 1
value: Equipment and machinery
- index: 2
value: Accounts receivable
- index: 3
value: Prepaid expenses
- index: 4
value: Inventory - merchandise
- index: 5
value: Cash
- index: 6
value: Taxes payable
- index: 7
value: Other current liabilities
- index: 8
value: Accounts payable
- index: 9
value: Due to employees
- index: 10
value: Interest payable
- index: 11
value: Notes payable
- index: 12
value: Accrued liabilities
- index: 13
value: Credit cards
- index: 14
value: Loans payable
- index: 15
value: Retained earnings
- index: 4
displayName: Accounts
type: recordRef
items:
- index: 0
id: 724ca578-8b5d-4bdb-ad45-e3820eee9de9
displayName: Office Equipment
dataType: account
- index: 1
id: be3eb911-034b-42de-95db-0d58ac978b7f
displayName: Computer Equipment
dataType: account
- index: 2
id: 1b6266d1-1e44-46c5-8eb5-a8f98e03124e
displayName: Accounts Receivable
dataType: account
- index: 3
id: 22de1660-d745-4809-a363-16b134607e66
displayName: Prepayments
dataType: account
- index: 4
id: e5d7612c-1671-47b4-b733-5db48363fcd0
displayName: Inventory
dataType: account
- index: 5
id: dbcaf288-2b39-4b95-8ab3-42202ab15918
displayName: Business Current Account
dataType: account
- index: 6
id: 3a872b81-d1af-4d31-9bfa-a37280b8f68c
displayName: VAT
dataType: account
- index: 7
id: d19852a2-e292-4eb9-a909-9dadb95c0e76
displayName: Rounding
dataType: account
- index: 8
id: 9be6382f-6b33-402d-b448-0db1dbf67a98
displayName: Historical Adjustment
dataType: account
- index: 9
id: 53bf27a7-7497-4c61-9887-dfaad5c6d80a
displayName: Accounts Payable
dataType: account
- index: 10
id: 8852a857-aa9d-4706-839f-638e9d6b5a66
displayName: Unpaid Expense Claims
dataType: account
- index: 11
id: 3b58f7ff-fa16-453a-9931-f020816d76e7
displayName: Interest Payables
dataType: account
- index: 12
id: 8636effc-50fb-45ba-8b2b-18336fa29b6b
displayName: John Smith
dataType: account
- index: 13
id: e2530acd-91c8-48f8-a35f-935dbd7432e2
displayName: Accruals
dataType: account
- index: 14
id: 62060aae-e5a6-4db5-a3bb-6abec6d47959
displayName: Credit Card Control Account
dataType: account
- index: 15
id: 55008233-40e7-41ac-84af-2255fa028c2e
displayName: Loan
dataType: account
- index: 16
id: 39225d6f-3722-4508-ac3f-a2f6ec96ad31
displayName: Retained Earnings
dataType: account
- index: 17
id: 78828dd9-6008-4662-b43c-e9d87907fd2b
displayName: Current Year Earnings
dataType: account
measures:
- displayName: Value
units: GBP
index: 0
type: currency
- displayName: Percentage change vs previous period
units: '%'
index: 1
type: percentage
reportData:
- dimension: 0
dimensionDisplayName: Period
item: 0
itemDisplayName: Period 0
components:
- dimension: 1
dimensionDisplayName: Category
item: 0
itemDisplayName: Asset
measures:
- index: 0
measureDisplayName: Value
value: 4615373.07
components:
- dimension: 2
dimensionDisplayName: Sub Type
item: 0
itemDisplayName: NonCurrent
measures:
- index: 0
measureDisplayName: Value
value: 4211712.99
components:
- dimension: 3
dimensionDisplayName: Detail Type
item: 0
itemDisplayName: FixturesFittings
measures:
- index: 0
measureDisplayName: Value
value: 2116634.16
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 0
itemDisplayName: Office Equipment
measures:
- index: 0
measureDisplayName: Value
value: 2116634.16
- dimension: 3
dimensionDisplayName: Detail Type
item: 1
itemDisplayName: EquipmentMachinery
measures:
- index: 0
measureDisplayName: Value
value: 2095078.83
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 1
itemDisplayName: Computer Equipment
measures:
- index: 0
measureDisplayName: Value
value: 2095078.83
- dimension: 2
dimensionDisplayName: Sub Type
item: 1
itemDisplayName: Current
measures:
- index: 0
measureDisplayName: Value
value: 403660.08
components:
- dimension: 3
dimensionDisplayName: Detail Type
item: 2
itemDisplayName: AccountsReceivable
measures:
- index: 0
measureDisplayName: Value
value: 59801.56
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 2
itemDisplayName: Accounts Receivable
measures:
- index: 0
measureDisplayName: Value
value: 59801.56
- dimension: 3
dimensionDisplayName: Detail Type
item: 3
itemDisplayName: PrepaidExpenses
measures:
- index: 0
measureDisplayName: Value
value: 17370.58
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 3
itemDisplayName: Prepayments
measures:
- index: 0
measureDisplayName: Value
value: 17370.58
- dimension: 3
dimensionDisplayName: Detail Type
item: 4
itemDisplayName: InventoryMerchandise
measures:
- index: 0
measureDisplayName: Value
value: 76076.15
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 4
itemDisplayName: Inventory
measures:
- index: 0
measureDisplayName: Value
value: 76076.15
- dimension: 3
dimensionDisplayName: Detail Type
item: 5
itemDisplayName: Cash
measures:
- index: 0
measureDisplayName: Value
value: 250411.79
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 5
itemDisplayName: Business Current Account
measures:
- index: 0
measureDisplayName: Value
value: 250411.79
- dimension: 1
dimensionDisplayName: Category
item: 1
itemDisplayName: Liability
measures:
- index: 0
measureDisplayName: Value
value: 969868.52
components:
- dimension: 2
dimensionDisplayName: Sub Type
item: 2
itemDisplayName: Current
measures:
- index: 0
measureDisplayName: Value
value: 330868.92
components:
- dimension: 3
dimensionDisplayName: Detail Type
item: 6
itemDisplayName: TaxesPayable
measures:
- index: 0
measureDisplayName: Value
value: 22517.58
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 6
itemDisplayName: VAT
measures:
- index: 0
measureDisplayName: Value
value: 22517.58
- dimension: 3
dimensionDisplayName: Detail Type
item: 7
itemDisplayName: Other
measures:
- index: 0
measureDisplayName: Value
value: 7315.78
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 7
itemDisplayName: Rounding
measures:
- index: 0
measureDisplayName: Value
value: 0
- dimension: 4
dimensionDisplayName: Accounts
item: 8
itemDisplayName: Historical Adjustment
measures:
- index: 0
measureDisplayName: Value
value: 7315.78
- dimension: 3
dimensionDisplayName: Detail Type
item: 8
itemDisplayName: AccountsPayable
measures:
- index: 0
measureDisplayName: Value
value: 39512.94
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 9
itemDisplayName: Accounts Payable
measures:
- index: 0
measureDisplayName: Value
value: 39512.94
- dimension: 3
dimensionDisplayName: Detail Type
item: 10
itemDisplayName: InterestPayable
measures:
- index: 0
measureDisplayName: Value
value: 1232.43
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 11
itemDisplayName: Interest Payables
measures:
- index: 0
measureDisplayName: Value
value: 1232.43
- dimension: 3
dimensionDisplayName: Detail Type
item: 11
itemDisplayName: NotesPayable
measures:
- index: 0
measureDisplayName: Value
value: 1575.93
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 12
itemDisplayName: John Smith
measures:
- index: 0
measureDisplayName: Value
value: 1575.93
- dimension: 3
dimensionDisplayName: Detail Type
item: 12
itemDisplayName: AccruedLiabilities
measures:
- index: 0
measureDisplayName: Value
value: 235869.49
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 13
itemDisplayName: Accruals
measures:
- index: 0
measureDisplayName: Value
value: 235869.49
- dimension: 3
dimensionDisplayName: Detail Type
item: 13
itemDisplayName: CreditCards
measures:
- index: 0
measureDisplayName: Value
value: 22844.77
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 14
itemDisplayName: Credit Card Control Account
measures:
- index: 0
measureDisplayName: Value
value: 22844.77
- dimension: 2
dimensionDisplayName: Sub Type
item: 3
itemDisplayName: NonCurrent
measures:
- index: 0
measureDisplayName: Value
value: 638999.6
components:
- dimension: 3
dimensionDisplayName: Detail Type
item: 9
itemDisplayName: DueToEmployees
measures:
- index: 0
measureDisplayName: Value
value: 0
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 10
itemDisplayName: Unpaid Expense Claims
measures:
- index: 0
measureDisplayName: Value
value: 0
- dimension: 3
dimensionDisplayName: Detail Type
item: 14
itemDisplayName: LoansPayable
measures:
- index: 0
measureDisplayName: Value
value: 638999.6
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 15
itemDisplayName: Loan
measures:
- index: 0
measureDisplayName: Value
value: 638999.6
- dimension: 1
dimensionDisplayName: Category
item: 2
itemDisplayName: Equity
measures:
- index: 0
measureDisplayName: Value
value: 3645504.55
components:
- dimension: 2
dimensionDisplayName: Sub Type
item: 4
itemDisplayName: Equity
measures:
- index: 0
measureDisplayName: Value
value: 3645504.55
components:
- dimension: 3
dimensionDisplayName: Detail Type
item: 15
itemDisplayName: RetainedEarnings
measures:
- index: 0
measureDisplayName: Value
value: 3645504.55
components:
- dimension: 4
dimensionDisplayName: Accounts
item: 16
itemDisplayName: Retained Earnings
measures:
- index: 0
measureDisplayName: Value
value: 3599540.05
- dimension: 4
dimensionDisplayName: Accounts
item: 17
itemDisplayName: Current Year Earnings
measures:
- index: 0
measureDisplayName: Value
value: 45964.5
- dimension: 1
dimensionDisplayName: Category
item: 3
itemDisplayName: Net Assets
measures:
- index: 0
measureDisplayName: Value
value: 3645504.55
'/data/companies/{companyId}/connections/{connectionId}/assess/commerceMetrics/revenue':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
get:
summary: Commerce Revenue Metrics
tags:
- Reports
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Report'
example:
- reportInfo:
name: revenue
displayName: Revenue
dimensions:
- index: 0
displayName: Period
type: datespan
items:
- index: 0
displayName: Period 0
start: '2022-01-01'
end: '2022-12-31'
- index: 1
displayName: Revenue metrics
type: string
items:
- index: 0
value: Revenue
- index: 1
value: Revenue growth
measures:
- displayName: Value
units: GBP
index: 0
type: currency
- displayName: Percentage change vs. previous period
units: '%'
index: 1
type: percentage
reportData:
- dimension: 0
dimensionDisplayName: Period
item: 0
itemDisplayName: Period 0
components:
- dimension: 1
dimensionDisplayName: Revenue metrics
item: 0
itemDisplayName: Revenue
measures:
- index: 0
measureDisplayName: Value
value: 2392.48
- dimension: 1
dimensionDisplayName: Revenue metrics
item: 1
itemDisplayName: Revenue growth
measures:
- index: 1
measureDisplayName: Percentage change vs. previous period
value: 276.65
operationId: get-commerce-revenue-metrics
description: 'Get the revenue and revenue growth for a specific company connection, over one or more periods of time.'
parameters:
- $ref: '#/components/parameters/reportDate'
- $ref: '#/components/parameters/periodLength'
- $ref: '#/components/parameters/numberOfPeriods'
- $ref: '#/components/parameters/periodUnit'
- $ref: '#/components/parameters/includeDisplayNames'
'/data/companies/{companyId}/connections/{connectionId}/assess/commerceMetrics/orders':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
get:
summary: Get order information for a specific company
tags:
- Reports
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Report'
example:
- reportInfo:
name: orders
displayName: Orders
dimensions:
- index: 0
displayName: Period
type: datespan
items:
- index: 0
displayName: Period 0
start: '2022-01-01'
end: '2022-12-31'
- index: 1
displayName: Order metrics
type: string
items:
- index: 0
value: Number of orders
- index: 1
value: Total value
- index: 2
value: Average order value
measures:
- displayName: Count
index: 0
type: int
- displayName: Value
units: GBP
index: 1
type: currency
reportData:
- dimension: 0
dimensionDisplayName: Period
item: 0
itemDisplayName: Period 0
components:
- dimension: 1
dimensionDisplayName: Order metrics
item: 0
itemDisplayName: Number of orders
measures:
- index: 0
measureDisplayName: Count
value: 94
- dimension: 1
dimensionDisplayName: Order metrics
item: 1
itemDisplayName: Total value
measures:
- index: 1
measureDisplayName: Value
value: 3315.18
- dimension: 1
dimensionDisplayName: Order metrics
item: 2
itemDisplayName: Average order value
measures:
- index: 1
measureDisplayName: Value
value: 35.27
operationId: get-commerce-orders-metrics
description: 'Gets the order information for a specific company connection, over one or more periods of time.'
parameters:
- $ref: '#/components/parameters/reportDate'
- $ref: '#/components/parameters/periodLength'
- $ref: '#/components/parameters/numberOfPeriods'
- $ref: '#/components/parameters/periodUnit'
- $ref: '#/components/parameters/includeDisplayNames'
'/data/companies/{companyId}/connections/{connectionId}/assess/commerceMetrics/refunds':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
get:
summary: Get the refunds information for a specific company
tags:
- Reports
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Report'
example:
- reportInfo:
name: refunds
displayName: Refunds
dimensions:
- index: 0
displayName: Period
type: datespan
items:
- index: 0
displayName: Period 0
start: '2022-01-01'
end: '2022-12-31'
- index: 1
displayName: Refund metrics
type: string
items:
- index: 0
value: Number of refunds
- index: 1
value: Value of refunds
- index: 2
value: Refund rate
measures:
- displayName: Count
index: 0
type: int
- displayName: Value
units: GBP
index: 1
type: currency
- displayName: Percentage
units: '%'
index: 2
type: percentage
reportData:
- dimension: 0
dimensionDisplayName: Period
item: 0
itemDisplayName: Period 0
components:
- dimension: 1
dimensionDisplayName: Refund metrics
item: 0
itemDisplayName: Number of refunds
measures:
- index: 0
measureDisplayName: Count
value: 39
- dimension: 1
dimensionDisplayName: Refund metrics
item: 1
itemDisplayName: Value of refunds
measures:
- index: 1
measureDisplayName: Value
value: 642.82
- dimension: 1
dimensionDisplayName: Refund metrics
item: 2
itemDisplayName: Refund rate
measures:
- index: 2
measureDisplayName: Percentage
value: 0.41
operationId: get-commerce-refunds-metrics
description: 'Gets the refunds information for a specific company connection, over one or more periods of time.'
parameters:
- $ref: '#/components/parameters/reportDate'
- $ref: '#/components/parameters/periodLength'
- $ref: '#/components/parameters/numberOfPeriods'
- $ref: '#/components/parameters/periodUnit'
- $ref: '#/components/parameters/includeDisplayNames'
'/data/companies/{companyId}/connections/{connectionId}/assess/commerceMetrics/customerRetention':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
get:
summary: Get the customer retention metrics for a specific company.
tags:
- Reports
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Report'
example:
- reportInfo:
name: customer_retention
displayName: Customer Retention
dimensions:
- index: 0
displayName: Period
type: datespan
items:
- index: 0
displayName: Period 0
start: '2022-01-01'
end: '2022-12-31'
- index: 1
displayName: Customer retention metrics
type: string
items:
- index: 0
value: Existing customers
- index: 1
value: New customers
- index: 2
value: Total customers
- index: 3
value: Retention rate
- index: 4
value: Repeat rate
measures:
- displayName: Count
index: 0
type: int
- displayName: Percentage
index: 1
type: percentage
reportData:
- dimension: 0
dimensionDisplayName: Period
item: 0
itemDisplayName: Period 0
components:
- dimension: 1
dimensionDisplayName: Customer retention metrics
item: 0
itemDisplayName: Existing customers
measures:
- index: 0
measureDisplayName: Count
value: 13
- dimension: 1
dimensionDisplayName: Customer retention metrics
item: 1
itemDisplayName: New customers
measures:
- index: 0
measureDisplayName: Count
value: 47
- dimension: 1
dimensionDisplayName: Customer retention metrics
item: 2
itemDisplayName: Total customers
measures:
- index: 0
measureDisplayName: Count
value: 60
- dimension: 1
dimensionDisplayName: Customer retention metrics
item: 3
itemDisplayName: Retention rate
measures:
- index: 1
measureDisplayName: Percentage
value: 0
- dimension: 1
dimensionDisplayName: Customer retention metrics
item: 4
itemDisplayName: Repeat rate
measures:
- index: 1
measureDisplayName: Percentage
value: 21.67
operationId: get-commerce-customer-retention-metrics
description: 'Gets the customer retention metrics for a specific company connection, over one or more periods of time.'
parameters:
- $ref: '#/components/parameters/reportDate'
- $ref: '#/components/parameters/periodLength'
- $ref: '#/components/parameters/numberOfPeriods'
- $ref: '#/components/parameters/periodUnit'
- $ref: '#/components/parameters/includeDisplayNames'
'/data/companies/{companyId}/connections/{connectionId}/assess/commerceMetrics/lifetimeValue':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
get:
summary: Get the lifetime value metric for a specific company.
tags:
- Reports
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Report'
example:
- reportInfo:
name: lifetime_value
displayName: Lifetime Value
dimensions:
- index: 0
displayName: Period
type: datespan
items:
- index: 0
displayName: Period 0
start: '2022-01-01'
end: '2022-12-31'
- index: 1
displayName: Lifetime value metrics
type: string
items:
- index: 0
value: Lifetime value
measures:
- displayName: Value
units: GBP
index: 0
type: currency
reportData:
- dimension: 0
dimensionDisplayName: Period
item: 0
itemDisplayName: Period 0
components:
- dimension: 1
dimensionDisplayName: Lifetime value metrics
item: 0
itemDisplayName: Lifetime value
measures:
- index: 0
measureDisplayName: Value
value: 3782.07
operationId: get-commerce-lifetime-value-metrics
description: 'Gets the lifetime value metric for a specific company connection, over one or more periods of time.'
parameters:
- $ref: '#/components/parameters/reportDate'
- $ref: '#/components/parameters/periodLength'
- $ref: '#/components/parameters/numberOfPeriods'
- $ref: '#/components/parameters/periodUnit'
- $ref: '#/components/parameters/includeDisplayNames'
'/data/companies/{companyId}/connections/{connectionId}/assess/accountingMetrics/marketing':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
get:
summary: Get the marketing metrics from an accounting source for a given company.
tags:
- Excel reports
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Report'
example:
- reportInfo:
name: marketing_metrics
displayName: Marketing metrics
dimensions:
- index: 0
displayName: Period
type: datespan
items:
- index: 0
displayName: Period 0
start: '2022-01-01'
end: '2022-12-31'
- index: 1
displayName: Marketing metrics
type: string
items:
- index: 0
value: Marketing to revenue
- index: 1
value: Marketing to expense
measures:
- displayName: Percentage
units: '%'
index: 0
type: percentage
- displayName: Percentage change vs previous period
units: '%'
index: 1
type: percentage
reportData:
- dimension: 0
dimensionDisplayName: Period
item: 0
itemDisplayName: Period 0
components:
- dimension: 1
dimensionDisplayName: Marketing metrics
item: 0
itemDisplayName: Marketing to revenue
measures:
- index: 0
measureDisplayName: Percentage
value: 564.17
- index: 1
measureDisplayName: Percentage change vs previous period
value: 8.33
- dimension: 1
dimensionDisplayName: Marketing metrics
item: 1
itemDisplayName: Marketing to expense
measures:
- index: 0
measureDisplayName: Percentage
value: 27.63
- index: 1
measureDisplayName: Percentage change vs previous period
value: 0.12
operationId: get-accounting-marketing-metrics
description: Request an Excel report for download.
parameters:
- $ref: '#/components/parameters/reportDate'
- $ref: '#/components/parameters/periodLength'
- $ref: '#/components/parameters/numberOfPeriods'
- $ref: '#/components/parameters/periodUnit'
- $ref: '#/components/parameters/includeDisplayNames'
- schema:
type: boolean
in: query
name: showInputValues
description: 'If set to true, then the system includes the input values within the response.'
'/data/companies/{companyId}/assess/excel':
parameters:
- $ref: '#/components/parameters/companyId'
post:
summary: Generate an Excel report
tags:
- Excel reports
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ExcelStatus'
operationId: generate-excel-report
description: Generate an Excel report which can subsequently be downloaded.
parameters:
- $ref: '#/components/parameters/excelReportType'
get:
summary: Get status of Excel report
tags:
- Excel reports
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ExcelStatus'
operationId: get-excel-report-generation-status
description: Returns the status of the latest report requested.
parameters:
- $ref: '#/components/parameters/excelReportType'
'/data/companies/{companyId}/assess/excel/download':
parameters:
- $ref: '#/components/parameters/companyId'
post:
deprecated: true
summary: Download generated excel report
tags:
- Excel reports
responses:
'200':
description: OK
content:
application/octet-stream:
schema:
type: object
operationId: download-excel-report
description: Download the previously generated Excel report to a local drive.
parameters:
- $ref: '#/components/parameters/excelReportType'
get:
summary: Download generated excel report
tags:
- Excel reports
responses:
'200':
description: OK
content:
application/octet-stream:
schema:
type: object
operationId: get-excel-report
description: Download the previously generated Excel report to a local drive.
parameters:
- $ref: '#/components/parameters/excelReportType'
'/companies/{companyId}/reports/enhancedCashFlow/transactions':
parameters:
- $ref: '#/components/parameters/companyId'
get:
summary: Get enhanced cash flow report
description: The Enhanced Cash Flow Transactions endpoint provides a fully categorized list of banking transactions for a company. Accounts and transaction data are obtained from the company's banking data sources.
tags:
- Reports
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/EnhancedCashFlowTransactions'
example:
reportInfo:
pageNumber: 1
pageSize: 10
totalResults: 2194
reportName: Cash flow transactions report
companyName: test
generatedDate: '2023-03-24T16:44:17.5302732Z'
dataSources:
- accounts:
- sourceRef:
sourceType: Banking
platformName: Banking Sandbox
accountProvider: Lloyds Bank
accountName: Business Savings Account
accountType: Debit
currency: GBP
currentBalance: 0
- sourceRef:
sourceType: Banking
platformName: Banking Sandbox
accountProvider: Lloyds Bank
accountName: Banking - Business Credit Card
accountType: Credit
currency: GBP
currentBalance: 0
- sourceRef:
sourceType: Banking
platformName: Banking Sandbox
accountProvider: Lloyds Bank
accountName: Business Undeposited Funds
accountType: Debit
currency: GBP
currentBalance: 0
- sourceRef:
sourceType: Banking
platformName: Banking Sandbox
accountProvider: Lloyds Bank
accountName: Business Current Account
accountType: Debit
currency: GBP
currentBalance: 0
reportItems:
- transactions:
- sourceRef:
sourceType: Banking
id: ab5e07a0-5578-4d91-8421-2dc72713b74f
date: '2022-11-08T00:00:00'
description: Payment m86SDGpQr3
amount: -6905.44
currency: GBP
transactionCategory:
levels: []
- sourceRef:
sourceType: Banking
id: 9846bbed-46d3-472c-a848-1ce8ebea7213
date: '2022-11-08T00:00:00'
description: Payment from customer a5c68c7b-6825-46de-bf63-6ad23ef506a4
amount: 4332.84
currency: GBP
transactionCategory:
levels: []
- sourceRef:
sourceType: Banking
id: 94b213fb-d742-435e-90f1-bfe723a076d5
date: '2022-11-08T00:00:00'
description: Payment from customer a5c68c7b-6825-46de-bf63-6ad23ef506a4
amount: 4034.3
currency: GBP
transactionCategory:
levels: []
- sourceRef:
sourceType: Banking
id: cfceb7ff-eaa2-45b6-aca7-fa0e0b439161
date: '2022-11-08T00:00:00'
description: Payment to supplier 78792d13-90a0-4ea2-8e07-81c3c893997e
amount: -313.76
currency: GBP
transactionCategory:
levels: []
- sourceRef:
sourceType: Banking
id: ba814f14-0fe3-41d0-9308-57f40642ac75
date: '2022-11-08T00:00:00'
description: Payment to supplier 46d2e1fb-b4e9-469c-814a-21ff8105a26e
amount: -614.4
currency: GBP
transactionCategory:
levels: []
- sourceRef:
sourceType: Banking
id: e67cc30e-fd5c-4eea-8365-ec40dfdd3ef6
date: '2022-11-08T00:00:00'
description: Payment from customer a5c68c7b-6825-46de-bf63-6ad23ef506a4
amount: 5199.62
currency: GBP
transactionCategory:
levels: []
- sourceRef:
sourceType: Banking
id: e0f08a0b-3575-4dde-98c4-3c854028d2d2
date: '2022-11-08T00:00:00'
description: Payment to supplier 18ac18dc-945b-4083-9013-e8a100b999fa
amount: -21420.94
currency: GBP
transactionCategory:
levels: []
- sourceRef:
sourceType: Banking
id: 4b70d379-8284-4f44-bb37-c7935df950cc
date: '2022-11-08T00:00:00'
description: Payment to supplier 630a3f16-5f01-4986-ae6b-82333ec49449
amount: -30924.22
currency: GBP
transactionCategory:
levels: []
- sourceRef:
sourceType: Banking
id: 76b73373-9345-472e-8edf-5be849d797fe
date: '2022-11-08T00:00:00'
description: Payment to supplier bQATU4eSb9
amount: -568.78
currency: GBP
transactionCategory:
levels: []
- sourceRef:
sourceType: Banking
id: ee92fd6f-e0f7-4391-85fd-4b50921b973f
date: '2022-11-08T00:00:00'
description: Payment to supplier 9c37eb21-579a-4886-8296-3a853076b7bd
amount: -13050.79
currency: GBP
transactionCategory:
levels: []
operationId: get-enhanced-cash-flow-transactions
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/pageSize'
- $ref: '#/components/parameters/query'
'/companies/{companyId}/reports/enhancedProfitAndLoss/accounts':
parameters:
- $ref: '#/components/parameters/companyId'
get:
summary: Enhanced Profit and Loss Accounts
description: |-
The Enhanced Profit and Loss Accounts endpoint returns a list of categorized accounts that appear on a company’s Profit and Loss. It also includes a balance per the financial statement date.
Codat suggests a category for each account automatically, but you can [change it](/docs/assess-categorizing-accounts-ecommerce-lending) to a more suitable one.
tags:
- Reports
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/EnhancedReport'
example:
reportInfo:
currency: GBP
reportName: EnhancedProfitAndLossAccounts
companyName: Biscuits
generatedDate: '2023-03-24T16:40:59.0847354Z'
reportItems:
- date: '2022-08-31T00:00:00'
balance: 830.93
accountId: 04f7111b-55d4-4efc-b329-1bd5c791933a
accountName: Repairs & Maintenance
accountCategory:
status: Suggested
levels:
- levelName: Expense
- date: '2022-08-31T00:00:00'
balance: 12000
accountId: 7f6a0e92-65be-4333-9a0a-d981b03bedd1
accountName: Wages
accountCategory:
status: Suggested
levels:
- levelName: Expense
- levelName: CostOfSales
- date: '2022-08-31T00:00:00'
balance: 28937.71
accountId: 7403e960-5b72-42ff-abf4-c870ad8910bd
accountName: Purchases
accountCategory:
status: Suggested
levels:
- levelName: Expense
- levelName: CostOfSales
- levelName: Inventory
- date: '2022-08-31T00:00:00'
balance: 582.4
accountId: e8a0a24e-2dab-46b1-bfe1-6e92551c04e8
accountName: Purchase Discounts
accountCategory:
status: Suggested
levels:
- levelName: Expense
- levelName: CostOfSales
- levelName: Inventory
- date: '2022-08-31T00:00:00'
balance: 350.44
accountId: cbf82e0d-87a7-464d-b567-9274ea94a1c0
accountName: Charitable and Political Donations
accountCategory:
status: Suggested
levels:
- levelName: Expense
- levelName: NonOperating
- levelName: Donations
- date: '2022-08-31T00:00:00'
balance: 535.81
accountId: 78785fd7-f197-4c34-aa17-6e76b9255d34
accountName: Interest Paid (operating)
accountCategory:
status: Suggested
levels:
- levelName: Expense
- levelName: NonOperating
- levelName: Interest
- date: '2022-08-31T00:00:00'
balance: 633.05
accountId: fb3210ef-edeb-48af-bb49-b85d40c1e6bb
accountName: Corporation Tax
accountCategory:
status: Suggested
levels:
- levelName: Expense
- levelName: NonOperating
- levelName: Taxes
- levelName: CorporationTaxes
- date: '2022-08-31T00:00:00'
balance: 782.61
accountId: f3aa84fe-5c31-4107-b207-7e0419f636d7
accountName: Bank Fees
accountCategory:
status: Suggested
levels:
- levelName: Expense
- levelName: Operating
- levelName: BankCharges
- date: '2022-08-31T00:00:00'
balance: 8000
accountId: 9cbe5fe4-ca60-4792-8bf1-de01fb7010aa
accountName: Rent
accountCategory:
status: Suggested
levels:
- levelName: Expense
- levelName: Operating
- levelName: Leases
- levelName: BuildingRentLease
- date: '2022-08-31T00:00:00'
balance: 1090.68
accountId: 138a8eb3-5c08-4e59-a3bc-892119694447
accountName: Motor Vehicle Expenses
accountCategory:
status: Suggested
levels:
- levelName: Expense
- levelName: Operating
- levelName: Leases
- levelName: EquipmentRentLease
- date: '2022-08-31T00:00:00'
balance: 26307.02
accountId: 868591ad-f9c2-4956-a5ec-c32c1d48c6f3
accountName: Advertising & Marketing
accountCategory:
status: Suggested
levels:
- levelName: Expense
- levelName: Operating
- levelName: Marketing
- date: '2022-08-31T00:00:00'
balance: 1128.85
accountId: 1734ff00-2a17-45b4-8db6-2dc2e832c460
accountName: 'Postage, Freight & Courier'
accountCategory:
status: Suggested
levels:
- levelName: Expense
- levelName: Operating
- levelName: Marketing
- date: '2022-08-31T00:00:00'
balance: 40
accountId: 7d8d0322-f452-47de-a8e8-54b0130e6f38
accountName: Subscriptions
accountCategory:
status: Suggested
levels:
- levelName: Expense
- levelName: Operating
- levelName: Marketing
- date: '2022-08-31T00:00:00'
balance: 5.72
accountId: 4378ddba-36b4-4b35-9970-bd972b20d137
accountName: Amortization
accountCategory:
status: Suggested
levels:
- levelName: Expense
- levelName: Operating
- levelName: NonCash
- levelName: Amortization
- date: '2022-08-31T00:00:00'
balance: 1539.18
accountId: 940c8a59-3348-4a0b-a1b1-781d9f29cc8b
accountName: Depreciation Expense
accountCategory:
status: Suggested
levels:
- levelName: Expense
- levelName: Operating
- levelName: NonCash
- levelName: Depreciation
- date: '2022-08-31T00:00:00'
balance: 1416.05
accountId: e7ac3baa-cfbe-40c1-a172-83d22e84435b
accountName: Entertainment-100% business
accountCategory:
status: Suggested
levels:
- levelName: Expense
- levelName: Operating
- levelName: Personnel
- levelName: EmployeeBenefits
- date: '2022-08-31T00:00:00'
balance: 1465.61
accountId: b5e801e8-8dbc-4390-ac99-3b0fff54a89f
accountName: General Expenses
accountCategory:
status: Suggested
levels:
- levelName: Expense
- levelName: Operating
- levelName: SalesGeneralAdministrative
- date: '2022-08-31T00:00:00'
balance: 7347.35
accountId: 5360066d-1474-49f6-a7a5-c66d5f6032ba
accountName: 'Light, Power, Heating'
accountCategory:
status: Suggested
levels:
- levelName: Expense
- levelName: Operating
- levelName: SalesGeneralAdministrative
- date: '2022-08-31T00:00:00'
balance: 1027.25
accountId: 7aa7988a-ff61-4cb8-bef3-15395355d108
accountName: Printing & Stationery
accountCategory:
status: Suggested
levels:
- levelName: Expense
- levelName: Operating
- levelName: SalesGeneralAdministrative
- date: '2022-08-31T00:00:00'
balance: 45
accountId: 043b6bcb-dfe6-4c97-9b4c-f9b300fe3f03
accountName: Telephone & Internet
accountCategory:
status: Suggested
levels:
- levelName: Expense
- levelName: Operating
- levelName: SalesGeneralAdministrative
- date: '2022-08-31T00:00:00'
balance: 0
accountId: eef78ed1-dfed-447c-bdba-3a49fb2c044b
accountName: Audit & Accountancy fees
accountCategory:
status: Suggested
levels:
- levelName: Expense
- levelName: Operating
- levelName: SalesGeneralAdministrative
- date: '2022-08-31T00:00:00'
balance: 130
accountId: c16f5c35-8283-47da-9d09-5fecb183b0cb
accountName: Cleaning
accountCategory:
status: Suggested
levels:
- levelName: Expense
- levelName: Operating
- levelName: SalesGeneralAdministrative
- date: '2022-08-31T00:00:00'
balance: 860.02
accountId: df62060b-41cc-4bf2-9de7-c7e537b5663a
accountName: Travel - National
accountCategory:
status: Suggested
levels:
- levelName: Expense
- levelName: Operating
- levelName: Travel
- date: '2022-08-31T00:00:00'
balance: 850.22
accountId: 68794a8f-b22d-4520-b97b-025b7cb10f94
accountName: Other Revenue
accountCategory:
status: Suggested
levels:
- levelName: Income
- levelName: Revenue
- levelName: Online
- date: '2022-08-31T00:00:00'
balance: 138457.98
accountId: 72df89d2-512b-4455-af51-a6b563733842
accountName: Sales
accountCategory:
status: Suggested
levels:
- levelName: Income
- levelName: Revenue
- levelName: Wholesale
operationId: get-accounts-for-enhanced-profit-and-loss
parameters:
- $ref: '#/components/parameters/reportDate'
- $ref: '#/components/parameters/numberOfPeriods'
'/companies/{companyId}/reports/enhancedBalanceSheet/accounts':
parameters:
- $ref: '#/components/parameters/companyId'
get:
summary: Enhanced Balance Sheet Accounts
description: |-
The Enhanced Balance Sheet Accounts endpoint returns a list of categorized accounts that appear on a company’s Balance Sheet along with a balance per financial statement date.
Codat suggests a category for each account automatically, but you can [change it](/docs/assess-categorizing-accounts-ecommerce-lending) to a more suitable one.
tags:
- Reports
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/EnhancedReport'
example:
reportInfo:
currency: GBP
reportName: EnhancedBalanceSheetAccounts
companyName: Biscuits
generatedDate: '2023-03-24T16:42:09.2973105Z'
reportItems:
- date: '2022-08-31T00:00:00'
balance: 12973.03
accountId: 22de1660-d745-4809-a363-16b134607e66
accountName: Prepayments
accountCategory:
status: Suggested
levels:
- levelName: Asset
- levelName: Current
- levelName: AccruedDeferredAssets
- levelName: PrepaidExpenses
- date: '2022-08-31T00:00:00'
balance: 316065.92
accountId: dbcaf288-2b39-4b95-8ab3-42202ab15918
accountName: Business Current Account
accountCategory:
status: Suggested
levels:
- levelName: Asset
- levelName: Current
- levelName: Bank
- date: '2022-08-31T00:00:00'
balance: 65945.07
accountId: e5d7612c-1671-47b4-b733-5db48363fcd0
accountName: Inventory
accountCategory:
status: Suggested
levels:
- levelName: Asset
- levelName: Current
- levelName: Inventory
- date: '2022-08-31T00:00:00'
balance: 71937.95
accountId: 1b6266d1-1e44-46c5-8eb5-a8f98e03124e
accountName: Accounts Receivable
accountCategory:
status: Suggested
levels:
- levelName: Asset
- levelName: Current
- levelName: Receivables
- levelName: AccountsReceivables
- date: '2022-08-31T00:00:00'
balance: 2180148.56
accountId: 724ca578-8b5d-4bdb-ad45-e3820eee9de9
accountName: Office Equipment
accountCategory:
status: Suggested
levels:
- levelName: Asset
- levelName: NonCurrent
- levelName: AccumulatedDepreciationDepletionAmortization
- date: '2022-08-31T00:00:00'
balance: 1804674.9
accountId: be3eb911-034b-42de-95db-0d58ac978b7f
accountName: Computer Equipment
accountCategory:
status: Suggested
levels:
- levelName: Asset
- levelName: NonCurrent
- levelName: AccumulatedDepreciationDepletionAmortization
- date: '2022-08-31T00:00:00'
balance: 3417424.16
accountId: 39225d6f-3722-4508-ac3f-a2f6ec96ad31
accountName: Retained Earnings
accountCategory:
status: Suggested
levels:
- levelName: Equity
- levelName: RetainedEarnings
- levelName: CapitalIncomeReserve
- date: '2022-08-31T00:00:00'
balance: 44252.52
accountId: 78828dd9-6008-4662-b43c-e9d87907fd2b
accountName: Current Year Earnings
accountCategory:
status: Suggested
levels:
- levelName: Equity
- levelName: ShareCapital
- levelName: CommonStock
- date: '2022-08-31T00:00:00'
balance: 75835.64
accountId: 53bf27a7-7497-4c61-9887-dfaad5c6d80a
accountName: Accounts Payable
accountCategory:
status: Suggested
levels:
- levelName: Liability
- levelName: Current
- levelName: AccountsPayable
- date: '2022-08-31T00:00:00'
balance: 208264.65
accountId: e2530acd-91c8-48f8-a35f-935dbd7432e2
accountName: Accruals
accountCategory:
status: Suggested
levels:
- levelName: Liability
- levelName: Current
- levelName: AccruedLiabilities
- date: '2022-08-31T00:00:00'
balance: 0
accountId: d19852a2-e292-4eb9-a909-9dadb95c0e76
accountName: Rounding
accountCategory:
status: Suggested
levels:
- levelName: Liability
- levelName: Current
- levelName: Bank
- date: '2022-08-31T00:00:00'
balance: 25184.57
accountId: 62060aae-e5a6-4db5-a3bb-6abec6d47959
accountName: Credit Card Control Account
accountCategory:
status: Suggested
levels:
- levelName: Liability
- levelName: Current
- levelName: Debt
- levelName: CreditCards
- date: '2022-08-31T00:00:00'
balance: 9650.58
accountId: 9be6382f-6b33-402d-b448-0db1dbf67a98
accountName: Historical Adjustment
accountCategory:
status: Suggested
levels:
- levelName: Liability
- levelName: Current
- levelName: Debt
- levelName: LoansPayable
- date: '2022-08-31T00:00:00'
balance: 2022.41
accountId: 8636effc-50fb-45ba-8b2b-18336fa29b6b
accountName: John Smith
accountCategory:
status: Suggested
levels:
- levelName: Liability
- levelName: Current
- levelName: Debt
- levelName: LoansPayable
- date: '2022-08-31T00:00:00'
balance: 29034.75
accountId: 3a872b81-d1af-4d31-9bfa-a37280b8f68c
accountName: VAT
accountCategory:
status: Confirmed
levels:
- levelName: Liability
- levelName: Current
- levelName: Personnel
- levelName: PensionPayable
- date: '2022-08-31T00:00:00'
balance: 1076.55
accountId: 3b58f7ff-fa16-453a-9931-f020816d76e7
accountName: Interest Payables
accountCategory:
status: Confirmed
levels:
- levelName: Liability
- levelName: Current
- levelName: Personnel
- levelName: PensionPayable
- date: '2022-08-31T00:00:00'
balance: 0
accountId: 8852a857-aa9d-4706-839f-638e9d6b5a66
accountName: Unpaid Expense Claims
accountCategory:
status: Suggested
levels:
- levelName: Liability
- levelName: NonCurrent
- date: '2022-08-31T00:00:00'
balance: 638999.6
accountId: 55008233-40e7-41ac-84af-2255fa028c2e
accountName: Loan
accountCategory:
status: Suggested
levels:
- levelName: Liability
- levelName: NonCurrent
operationId: get-accounts-for-enhanced-balance-sheet
parameters:
- $ref: '#/components/parameters/reportDate'
- $ref: '#/components/parameters/numberOfPeriods'
'/companies/{companyId}/reports/enhancedInvoices':
parameters:
- $ref: '#/components/parameters/companyId'
get:
summary: Enhanced Invoices Report
tags:
- Reports
responses:
'200':
description: OK
content:
application/json:
x-speakeasy-usage-example: true
schema:
$ref: '#/components/schemas/EnhancedInvoicesReport'
example:
reportInfo:
pageNumber: 1
pageSize: 10
totalResults: 101
reportName: Invoices report
companyName: Small Sandbox
generatedDate: '2023-05-10T10:50:23.9437977Z'
reportItems:
- id: 15221fa4-e91a-4f64-a2bb-caeab4db85a4
invoiceNumber: UDs5KlfE
customerRef:
id: ee4d0eee-063d-4c9f-8226-2c9a6a816249
customerName: Serena Keeling
issueDate: '2021-04-06T09:44:00'
dueDate: '2021-04-06T09:44:00'
status: Paid
currency: GBP
totalAmount: 7044.83
amountDue: 0
paidOnDate: '2021-04-06T09:44:00'
modifiedDate: '2022-04-11T13:49:37Z'
sourceModifiedDate: '2022-02-27T18:28:00'
payments: []
- id: 58aea1cb-5b31-4eed-ba16-489dfa67a831
invoiceNumber: 1IU1PMoT
customerRef:
id: 81e9c0df-3e5e-4180-b20c-c8e58100cdf3
customerName: Quinton Kovacek
issueDate: '2021-04-06T09:44:00'
dueDate: '2021-04-06T09:44:00'
status: Paid
currency: GBP
totalAmount: 3567.59
amountDue: 0
paidOnDate: '2021-04-06T09:44:00'
modifiedDate: '2022-04-11T13:49:37Z'
sourceModifiedDate: '2021-06-23T22:47:00'
payments: []
- id: 9ecd07bc-9cab-4516-bad0-a0cd565cdbaf
invoiceNumber: eEIWyPN4
customerRef:
id: c7326084-cd56-48e6-bcfa-be8919e024e1
customerName: Antwon Dach
issueDate: '2021-04-08T01:27:00'
dueDate: '2021-04-18T01:27:00'
status: Paid
currency: GBP
totalAmount: 153233.36
amountDue: 0
paidOnDate: '2021-04-10T12:31:00'
modifiedDate: '2022-08-01T09:44:59Z'
sourceModifiedDate: '2021-11-11T12:10:00'
payments:
- id: 0878e8be-6746-4347-80ba-5491328c8411
date: '2021-04-10T12:31:00'
paymentType: payments
amount: 153233.36
currency: GBP
currencyRate: 1
- id: 7cea078a-5c9a-4788-ae72-9bb60c5cc184
invoiceNumber: BXb8mYQW
customerRef:
id: 44e8516d-bcb0-459f-9e5d-7beaa56d57d0
customerName: Dolores Rath
issueDate: '2021-04-16T17:30:00'
dueDate: '2021-04-23T17:30:00'
status: Paid
currency: GBP
totalAmount: 12657.69
amountDue: 0
paidOnDate: '2021-04-23T17:30:00'
modifiedDate: '2022-04-11T13:49:37Z'
sourceModifiedDate: '2021-12-08T11:32:00'
payments:
- id: 17b42934-13f6-4738-a506-2e253b1a606f
date: '2021-04-23T17:30:00'
paymentType: payments
amount: 12657.69
currency: GBP
currencyRate: 1
- id: aa4503d7-fe01-49fe-ba42-259b421ac640
invoiceNumber: wdjwiL5B
customerRef:
id: 5cbaf1af-4f02-4206-85ab-c525bd9b4f99
customerName: Bryana Douglas
issueDate: '2021-04-20T06:46:00'
dueDate: '2021-04-27T06:46:00'
status: PartiallyPaid
currency: GBP
totalAmount: 12935.39
amountDue: 381.09
modifiedDate: '2022-04-11T13:49:37Z'
sourceModifiedDate: '2022-03-11T20:03:00'
payments:
- id: 1c03986b-9b6c-4220-bde6-4e3eba6cef9f
date: '2021-04-23T14:59:00'
paymentType: payments
amount: 12554.3
currency: GBP
currencyRate: 1
- id: d8a0e26e-4ec8-4fb5-887d-8b7531e3bedf
invoiceNumber: cTjJcu8x
customerRef:
id: 6f5290e5-70aa-4d0c-816e-9d2312cf217f
customerName: Brady Wilderman
issueDate: '2021-04-23T09:32:00'
dueDate: '2021-05-03T09:32:00'
status: Paid
currency: GBP
totalAmount: 21526.72
amountDue: 0
paidOnDate: '2021-05-03T09:32:00'
modifiedDate: '2022-04-11T13:49:37Z'
sourceModifiedDate: '2021-03-12T22:37:00'
payments:
- id: 93c9c11b-3ec0-4314-85f6-0751763e752a
date: '2021-05-03T09:32:00'
paymentType: payments
amount: 21506.72
currency: GBP
currencyRate: 1
- id: 06890e67-35fb-4276-9857-95db40cfd15d
invoiceNumber: htXJuUDb
customerRef:
id: 44e8516d-bcb0-459f-9e5d-7beaa56d57d0
customerName: Dolores Rath
issueDate: '2021-05-01T23:23:00'
dueDate: '2021-05-11T23:23:00'
status: PartiallyPaid
currency: GBP
totalAmount: 7151.41
amountDue: 1225.06
modifiedDate: '2022-08-01T09:44:59Z'
sourceModifiedDate: '2022-02-24T23:02:00'
payments:
- id: 82865077-0857-46db-b9a1-6d21da43b6aa
date: '2021-05-04T17:57:00'
paymentType: payments
amount: 5926.35
currency: GBP
currencyRate: 1
- id: 160e8b51-1fa0-46b9-98fe-1ff5399ce99b
invoiceNumber: 9wegEXpG
customerRef:
id: 44e8516d-bcb0-459f-9e5d-7beaa56d57d0
customerName: Dolores Rath
issueDate: '2021-05-18T08:53:00'
dueDate: '2021-05-25T08:53:00'
status: PartiallyPaid
currency: GBP
totalAmount: 22522.34
amountDue: 14408.54
modifiedDate: '2022-04-11T13:49:37Z'
sourceModifiedDate: '2022-01-13T07:52:00'
payments:
- id: 75bd7205-bc12-4517-9964-aae159fdfaee
date: '2021-05-23T04:04:00'
paymentType: payments
amount: 8113.8
currency: GBP
currencyRate: 1
- id: 5a934955-561d-436a-a564-fd624a79f54c
invoiceNumber: l7YwGxG7
customerRef:
id: cc96af36-e2f5-49f7-bf40-271503f45071
customerName: Ignacio Moore
issueDate: '2021-05-25T19:51:00'
dueDate: '2021-06-04T19:51:00'
status: Paid
currency: GBP
totalAmount: 11047.08
amountDue: 0
paidOnDate: '2021-05-28T07:31:00'
modifiedDate: '2022-04-11T13:49:37Z'
sourceModifiedDate: '2021-08-06T05:50:00'
payments:
- id: 608fd022-f7d0-44a9-90c4-bebe0573f206
date: '2021-05-28T07:31:00'
paymentType: payments
amount: 11047.08
currency: GBP
currencyRate: 1
- id: 17690788-2936-46b5-ba46-ba6a36a87483
invoiceNumber: ntH1cRYz
customerRef:
id: e1ecc8f2-8a63-4fe9-97c9-c87fd90ca0a6
customerName: Freida Ebert
issueDate: '2021-05-27T19:07:00'
dueDate: '2021-06-03T19:07:00'
status: PartiallyPaid
currency: GBP
totalAmount: 7191.32
amountDue: 5036.83
modifiedDate: '2022-04-11T13:49:37Z'
sourceModifiedDate: '2021-03-27T08:54:00'
payments:
- id: a343b2a0-d327-41b0-993e-7b6b92fde425
date: '2021-06-03T19:07:00'
paymentType: payments
amount: 2154.49
currency: GBP
currencyRate: 1
operationId: get-enhanced-invoices-report
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/pageSize'
- $ref: '#/components/parameters/query'
description: Gets a list of invoices linked to the corresponding banking transaction
'/data/companies/{companyId}/connections/{connectionId}/assess/subscriptions/mrr':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
get:
summary: Get key metrics for subscription revenue
tags:
- Reports
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Report'
operationId: get-recurring-revenue-metrics
description: Gets key metrics for subscription revenue.
'/data/companies/{companyId}/connections/{connectionId}/assess/subscriptions/process':
parameters:
- $ref: '#/components/parameters/companyId'
- $ref: '#/components/parameters/connectionId'
get:
summary: Request production of key subscription revenue metrics
tags:
- Reports
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Report'
operationId: request-recurring-revenue-metrics
description: Request production of key subscription revenue metrics.
webhooks:
Account categories updated:
post:
requestBody:
description: Triggered anytime that Codat updates the suggested fields or a user updates the confirmed fields.
content:
application/json:
schema:
$ref: '#/components/schemas/AccountCategoriesUpdatedWebhook'
responses:
'200':
description: Return a 200 status to indicate that the webhook was received successfully.
components:
schemas:
Report:
title: Assess report
description: |-
Assess reports follow a consistent structure. Reports contain four sections of information:
1. Report definition information such as:
a. The report info (e.g. enhanced_profit_and_loss).
b. The display name of the report (e.g. Enhanced Profit and Loss).
2. Information about the dimension contained in the reports such as:
a. The type of dimension (e.g. datetime, recordRef).
b. The display name of the dimension (e.g. Period, Category type, Category sub type).
c. The details about each item within the dimension (e.g. displayName:"Jan 2022", start:"...", end:"...", id:"...", name:"...").
3. Information about the measures contained in the report such as:
a. The display name of the measure (e.g. value of account, percentage change).
b. The type of the measure (e.g. currency, percentage).
c. The unit of the measure (e.g. %, GBP).
4. The data for the report. When the *includeDisplayName* parameter is set to *true*, it shows the *dimensionDisplayName* and *itemDisplayName* to make the data human-readable. The default setting for *includeDisplayName* is *false*.
Reports can be rendered as follows (ordering is implicit rather than explicit):

# Data model
## Dimensions
type: object
properties:
reportInfo:
type: object
additionalProperties:
type: string
dimensions:
type: array
items:
$ref: '#/components/schemas/Report/definitions/reportDimension'
measures:
type: array
items:
$ref: '#/components/schemas/Report/definitions/reportMeasure'
reportData:
type: array
items:
$ref: '#/components/schemas/Report/definitions/reportComponent'
errors:
type: array
items:
$ref: '#/components/schemas/Report/definitions/reportError'
definitions:
reportMeasure:
title: Measure
type: object
properties:
displayName:
type: string
units:
type: string
index:
type: integer
type:
type: string
reportError:
title: Error
type: object
properties:
message:
type: string
type:
type: string
details:
type: object
additionalProperties:
type: array
items:
type: string
reportDimension:
title: Dimension
type: object
properties:
index:
type: integer
displayName:
type: string
type:
type: string
items:
type: array
items:
type: object
properties:
index:
type: integer
reportComponent:
title: Report component
type: object
properties:
dimension:
type: integer
dimensionDisplayName:
type: string
item:
type: integer
itemDisplayName:
type: string
measures:
type: array
items:
$ref: '#/components/schemas/Report/definitions/reportComponentMeasure'
components:
type: array
items:
$ref: '#/components/schemas/Report/definitions/reportComponent'
reportComponentMeasure:
type: object
properties:
index:
type: integer
measureDisplayName:
type: string
value:
type: number
x-examples:
Example 1:
reportInfo:
additionalProp1: string
additionalProp2: string
additionalProp3: string
dimensions:
- index: 0
displayName: string
type: string
items:
- index: 0
measures:
- displayName: string
units: string
index: 0
type: string
reportData:
- dimension: 0
dimensionDisplayName: string
item: 0
itemDisplayName: string
measures:
- index: 0
measureDisplayName: string
components:
- string
errors:
- message: string
type: DatesOutOfRange
details:
additionalProp1:
- string
additionalProp2:
- string
additionalProp3:
- string
EnhancedReport:
title: Enhanced report
type: object
properties:
reportInfo:
$ref: '#/components/schemas/EnhancedReport/definitions/enhancedReportInfo'
reportItems:
type: array
description: An array of report items.
items:
title: Report item
type: object
properties:
date:
$ref: '#/components/schemas/ExcelStatus/properties/lastGenerated'
description: Last date of the period.
balance:
type: number
description: Balance of the account as reported on the profit and loss or Balance sheet.
accountName:
type: string
description: Name of the account.
accountId:
type: string
description: The unique account ID.
accountCategory:
$ref: '#/components/schemas/EnhancedReport/definitions/enhancedReportAccountCategory'
definitions:
enhancedReportAccountCategory:
title: Account category
descrciption: 'An object containing the suggested or confirmed account categories, up to five levels.'
type: object
properties:
status:
type: string
description: 'Returns a status of "Suggested" or "Confirmed". If an account has a confirmed category, it will replace any suggested category returned.'
levels:
type: array
items:
$ref: '#/components/schemas/EnhancedReport/definitions/accountCategoryLevel'
accountCategoryLevel:
title: Account category level
description: An object containing an ordered list of account category levels.
type: object
properties:
levelName:
type: string
description: Account category name.
confidence:
type: number
description: Confidence level of the category. This will only be populated where `status` is `Suggested`.
enhancedReportInfo:
type: object
properties:
currency:
$ref: '#/components/schemas/Currency'
description: Currency of the P&L/Balance sheet.
reportName:
type: string
description: The name of the report.
companyName:
type: string
description: Name of the company queried.
generatedDate:
$ref: '#/components/schemas/ExcelStatus/properties/lastGenerated'
description: Returns the YYYY-MM-DD datetime of report generation.
examples:
- reportInfo:
reportName: EnhancedProfitAndLossAccounts
companyName: ABC LTD
generatedDate: '2022-01-01'
reportItems:
- date: '2022-01-01'
balance: 70
accountName: Sales UK
accountId: 13931cbf-ea06-4d6e-9538-a8457fa66011
accountCategory:
status: Suggested
levels:
- levelName: Income
confidence: 0.95
- levelName: Revenue
confidence: 0.9
- date: '2022-01-01'
balance: 30
accountName: Sales US
accountId: 13931cbf-ea06-4d6e-9538-a8457fa66011
accountCategory:
lastUpdated: '2022-01-02'
status: Suggested
levels:
- levelName: Income
confidence: 0.95
- levelName: Revenue
confidence: 0.9
- date: '2022-01-01'
balance: 70
accountName: Amazon
accountId: 13931cbf-ea06-4d6e-9538-a8457fa66011
accountCategory:
lastUpdated: '2022-01-02'
status: Suggested
levels:
- levelName: Income
confidence: 0.95
- levelName: Revenue
confidence: 0.95
- levelName: Online
confidence: 0.8
ExcelStatus:
type: object
title: Excel status
properties:
lastGenerated:
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.
inProgress:
type: boolean
queued:
type: string
success:
type: boolean
errorMessage:
type: string
lastInvocationId:
type: string
reportType:
type: string
fileSize:
type: integer
examples:
Example 1:
value:
lastGenerated: '2023-01-25T22:36:05.125Z'
inProgress: true
queued: '2023-01-25T22:36:05.125Z'
success: true
errorMessage: string
lastInvocationId: 3fa85f64-5717-4562-b3fc-2c963f66afa6
reportType: string
fileSize: 0
CategorisedAccounts:
x-internal: true
allOf:
- type: object
properties:
results:
type: array
description: A list confirmed and suggested account categories.
items:
$ref: '#/components/schemas/CategorisedAccount'
- $ref: '#/components/schemas/PagingInfo'
Categories:
x-internal: true
type: array
items:
allOf:
- $ref: '#/components/schemas/AccountCategory'
- type: object
properties:
subtypeDisplayName:
type: string
description: Human readable subtype display name.
detailTypeDisplayName:
type: string
description: Human readable detailType display name.
detailTypeDescription:
type: string
description: A description of the fully categorized (to detail type) account.
examples:
- type: Asset
subtype: Current
subtypeDisplayName: Current assets
detailType: Cash
detailTypeDisplayName: Cash
detailTypeDescription: Use 'Cash' for cash in the bank or held on premise. This should include overdrawn accounts.
- type: Income
subtype: Operating
subtypeDisplayName: Operating
detailType: GeneralServices
detailTypeDisplayName: General services
detailTypeDescription: Use 'General services' for income generated from services the company performs or usage fees charged.
CategorisedAccount:
title: Categorised account
type: object
properties:
accountRef:
$ref: '#/components/schemas/CategorisedAccount/definitions/accountRef'
suggested:
$ref: '#/components/schemas/CategorisedAccount/definitions/accountCategoryDeprecated'
confirmed:
$ref: '#/components/schemas/CategorisedAccount/definitions/accountCategoryDeprecated'
definitions:
accountCategoryDeprecated:
title: Account category
type: object
allOf:
- $ref: '#/components/schemas/AccountCategory'
- title: ModifiedDate
x-internal: true
type: object
properties:
modifiedDate:
allOf:
- $ref: '#/components/schemas/ExcelStatus/properties/lastGenerated'
- description: |-
The date when the record was last fetched from the data source and updated in Codat’s data cache.
It 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.
accountRef:
description: An object containing account reference data.
title: Account reference
type: object
properties:
id:
type: string
description: '''id'' from the Accounts data type.'
name:
type: string
description: '''name'' from the Accounts data type.'
examples:
- accountRef:
id: 13d946f0-c5d5-42bc-b092-97ece17923ab
name: string
suggested:
type: Asset
subtype: Current
detailType: Cash
modifiedDate: '2019-08-24T14:15:22Z'
confirmed:
type: Asset
subtype: Current
detailType: Cash
modifiedDate: '2019-08-24T14:15:22Z'
ConfirmCategory:
x-internal: true
type: object
properties:
confirmed:
$ref: '#/components/schemas/AccountCategory'
required:
- confirmed
ConfirmCategories:
x-internal: true
type: object
properties:
categories:
type: array
description: 'List of confirmed account categories set manually by the user. '
items:
type: object
properties:
accountRef:
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
confirmed:
$ref: '#/components/schemas/AccountCategory'
AccountCategory:
title: Account category
type: object
properties:
type:
type: string
description: The top level account type.
subtype:
type: string
description: The account subtype.
detailType:
type: string
description: Most granular chart of account type.
examples:
- type: Asset
subtype: Current
detailType: Cash
- type: Income
subtype: Operating
detailType: GeneralServices
DataIntegrityStatus:
title: Data integrity status
type: object
allOf:
- $ref: '#/components/schemas/DataIntegritySummary/definitions/dataIntegrityType'
- type: object
properties:
statusInfo:
$ref: '#/components/schemas/DataIntegrityStatus/definitions/dataIntegrityStatusInfo'
connectionIds:
$ref: '#/components/schemas/DataIntegrityStatus/definitions/dataIntegrityConnectionId'
amounts:
$ref: '#/components/schemas/DataIntegrityStatus/definitions/dataIntegrityAmounts'
dates:
$ref: '#/components/schemas/DataIntegrityStatus/definitions/dataIntegrityDates'
definitions:
dataIntegrityStatusInfo:
type: object
properties:
lastMatched:
type: string
$ref: '#/components/schemas/ExcelStatus/properties/lastGenerated'
description: The date the matching algorithm last ran against the company’s data type specified.
readOnly: true
currentStatus:
$ref: '#/components/schemas/DataIntegrityStatus/definitions/integrityStatus'
statusMessage:
type: string
description: Detailed explanation supporting the status value.
dataIntegrityConnectionId:
type: object
properties:
source:
type: array
description: An array of strings. The connection IDs for the type specified in the url.
items:
type: string
target:
type: array
description: An array of strings. The connection IDs for the type being matched to.
items:
type: string
dataIntegrityAmounts:
type: object
description: 'Only returned for transactions. For accounts, there is nothing returned.'
properties:
min:
type: number
description: Lowest value of transaction set.
max:
type: number
description: Highest value of transaction set.
currency:
$ref: '#/components/schemas/Currency'
dataIntegrityDates:
type: object
description: 'Only returned for transactions. For accounts, there is nothing returned.'
properties:
minDate:
$ref: '#/components/schemas/ExcelStatus/properties/lastGenerated'
description: Earliest date of transaction set.
readOnly: true
maxDate:
$ref: '#/components/schemas/ExcelStatus/properties/lastGenerated'
description: Latest date of transaction set.
readOnly: true
minOverlappingDate:
$ref: '#/components/schemas/ExcelStatus/properties/lastGenerated'
description: Earliest date where transactions exist in both accounting and banking platforms.
readOnly: true
maxOverlappingDate:
$ref: '#/components/schemas/ExcelStatus/properties/lastGenerated'
description: Latest date where transactions exist in both account and banking platforms.
readOnly: true
integrityStatus:
type: string
enum:
- Unknown
- DoesNotExist
- Error
- Complete
description: The current status of the most recently run matching algorithm.
examples:
- type: string
statusInfo:
lastMatched: '2021-10-24T14:15:22Z'
currentStatus: Unknown
statusMessage: string
connectionIds:
source:
- d5a8d1b2-b38a-4e44-8641-548ad43be6bb
- da8c9f39-8af9-4a98-964b-f1e207942837
target:
- 3d7ce25a-c107-44bc-8e0c-36c10bdd14e0
- a5300eac-01fa-4a77-b5b0-ea0b86a3be69
amounts:
min: 130
max: 2450
currency: GBP
dates:
minDate: '2021-09-17T12:09:33.441Z'
maxDate: '2021-12-16T12:12:53.441Z'
minOverlappingDate: '2021-09-30T12:09:13.441Z'
maxOverlappingDate: '2021-11-27T12:19:33.441Z'
Status:
x-internal: true
type: object
properties:
metadata:
type: array
items:
$ref: '#/components/schemas/DataIntegrityStatus'
DataIntegritySummary:
title: Data integrity summary
type: object
allOf:
- $ref: '#/components/schemas/DataIntegritySummary/definitions/dataIntegrityType'
- type: object
properties:
byAmount:
$ref: '#/components/schemas/DataIntegritySummary/definitions/dataIntegrityByAmount'
byCount:
$ref: '#/components/schemas/DataIntegritySummary/definitions/dataIntegrityByCount'
definitions:
dataIntegrityType:
type: object
properties:
type:
type: string
description: 'The data type which the data type in the URL has been matched against. For example, if you''ve matched accountTransactions and banking-transactions, and you call this endpoint with accountTransactions in the URL, this property would be banking-transactions.'
dataIntegrityByAmount:
title: Data integrity by amount
type: object
properties:
matchPercentage:
type: number
description: The percentage of the absolute value of transactions of the type specified in the route which have a match.
unmatched:
type: number
description: The sum of the absolute value of transactions of the type specified in the route which don't have a match.
matched:
type: number
description: The sum of the absolute value of transactions of the type specified in the route which have a match.
total:
type: number
description: The total of unmatched and matched.
currency:
$ref: '#/components/schemas/Currency'
dataIntegrityByCount:
title: Data integrity by count
type: object
properties:
matchPercentage:
type: number
description: The percentage of records of the type specified in the route which have a match.
unmatched:
type: number
description: The number of records of the type specified in the route which don't have a match.
matched:
type: number
description: The number of records of the type specified in the route which do have a match.
total:
type: number
description: The total of unmatched and matched.
Summaries:
x-internal: true
type: object
properties:
summaries:
type: array
items:
$ref: '#/components/schemas/DataIntegritySummary'
DataIntegrityDetails:
title: Data integrity details
type: object
properties:
id:
type: string
description: ID GUID of the transaction.
type:
type: string
description: The data type of the record.
connectionId:
type: string
format: uuid
description: ID GUID representing the connection of the accounting or banking platform.
readOnly: true
date:
$ref: '#/components/schemas/ExcelStatus/properties/lastGenerated'
description: The date of the transaction.
description:
type: string
description: The transaction description.
amount:
type: number
description: The transaction value.
currency:
$ref: '#/components/schemas/Currency'
description: The currency of the transaction.
matches:
type: array
items:
$ref: '#/components/schemas/DataIntegrityDetails/definitions/dataIntegrityMatch'
definitions:
dataIntegrityMatch:
type: object
properties:
id:
type: string
description: ID GUID of the transaction.
type:
type: string
description: 'The data type which the data type in the URL has been matched against. For example, if you''ve matched accountTransactions and banking-transactions, and you call this endpoint with accountTransactions in the URL, this property would be banking-transactions.'
connectionId:
type: string
description: ID GUID representing the connection of the accounting or banking platform.
format: uuid
date:
type: string
description: The date of the transaction.
description:
type: string
description: The transaction description.
amount:
type: string
description: The transaction value.
currency:
$ref: '#/components/schemas/Currency'
description: The currency of the transaction.
Details:
x-internal: true
allOf:
- type: object
properties:
results:
type: array
items:
$ref: '#/components/schemas/DataIntegrityDetails'
- $ref: '#/components/schemas/PagingInfo'
EnhancedCashFlowTransactions:
title: Enhanced cash flow transactions
description: ''
type: object
properties:
reportInfo:
$ref: '#/components/schemas/EnhancedInvoicesReport/definitions/reportInfo'
dataSources:
type: array
items:
$ref: '#/components/schemas/EnhancedCashFlowTransactions/definitions/dataSource'
reportItems:
type: array
items:
$ref: '#/components/schemas/EnhancedCashFlowTransactions/definitions/enhancedCashFlowItem'
definitions:
dataSource:
type: object
properties:
accounts:
description: 'An array containing bank account data for each connected banking data source that have the following data types enabled: `banking-accounts`, `banking-transactions`.'
type: array
items:
$ref: '#/components/schemas/EnhancedCashFlowTransactions/definitions/accounts'
accounts:
title: Accounts
type: object
properties:
sourceRef:
$ref: '#/components/schemas/EnhancedCashFlowTransactions/definitions/sourceRef'
platformName:
description: 'Name of the banking data source, e.g. "Plaid".'
type: string
accountProvider:
description: The bank or other financial institution providing the account.
type: string
accountName:
description: The name of the account according to the provider.
type: string
accountType:
description: 'The type of banking account, e.g. credit or debit.'
type: string
currency:
$ref: '#/components/schemas/Currency'
description: The currency code for the bank account.
currentBalance:
description: The balance of the bank account.
type: number
sourceRef:
title: Report source reference
description: A source reference containing the `sourceType` object "Banking".
type: object
properties:
sourceType:
type: string
examples:
- Example:
value:
sourceRef:
sourceType: Banking
enhancedCashFlowItem:
type: object
properties:
transactions:
description: An array of transaction data.
type: array
items:
$ref: '#/components/schemas/EnhancedCashFlowTransactions/definitions/enhancedCashFlowTransaction'
enhancedCashFlowTransaction:
title: Cash flow transaction
type: object
properties:
id:
description: The unique identifier of the bank transaction.
type: string
date:
description: The date the bank transaction was posted.
$ref: '#/components/schemas/ExcelStatus/properties/lastGenerated'
description:
description: The description of the bank transaction.
type: string
amount:
description: The bank transaction amount.
type: number
currency:
type: string
transactionCategory:
description: Contains an array of category levels.
$ref: '#/components/schemas/EnhancedCashFlowTransactions/definitions/transactionCategory'
sourceRef:
$ref: '#/components/schemas/EnhancedCashFlowTransactions/definitions/sourceRef'
transactionCategory:
title: Transaction category
type: object
properties:
confidence:
description: Returns the confidence of the suggested category for the transaction.
type: number
levels:
description: An array of category levels against an individual transaction.
type: array
items:
type: string
FinancialMetrics:
title: Enhanced financial metrics
type: object
properties:
currency:
$ref: '#/components/schemas/Currency'
periodUnit:
type: string
enum:
- Month
- Week
- Day
metrics:
type: array
items:
$ref: '#/components/schemas/FinancialMetrics/definitions/financialMetric'
errors:
type: array
description: 'If there are no errors, an empty array is returned.'
items:
$ref: '#/components/schemas/FinancialMetrics/definitions/financialMetricError'
definitions:
financialMetricError:
type: object
properties:
type:
type: string
enum:
- DataNotSynced
- DataNotSupported
- DataSyncFailed
- DataTypeNotEnabled
message:
type: string
example: Account categories data has not been synced
financialMetric:
title: Financial metric
description: ''
type: object
properties:
name:
type: string
description: Metric name.
metricUnit:
type: string
enum:
- Ratio
- Money
key:
type: string
enum:
- Unknown
- EBITDA
- DebtServiceCoverageRatio
- CurrentRatio QuickRatio
- GrossProfitMargin
- FixedChargeCoverageRatio
- WorkingCapital
- FreeCashFlow
- NetProfitMargin
- ReturnOnAssetsRatio
- ReturnOnEquityRatio
- OperatingProfitMargin
- DeptToEquity
- DebtToAssets
- InterestCoverageRatio
- CashRatio
- InventoryTurnoverRatio
- AssetTurnoverRatio
- WorkingCapitalTurnoverRatio
- DaysSalesOutstanding
- DaysPayablesOutstanding
periods:
type: array
items:
type: object
properties:
fromDate:
type: string
format: date
description: The date from which the report starts.
toDate:
type: string
format: date
description: The date on which the report ends (inclusive of day).
value:
type: number
description: |-
The top level metric value that is calculated for the specified period.
If the system cannot calculate for that period, the value will be null. The system will still show the metric inputs.
inputs:
type: array
items:
type: object
properties:
name:
type: string
description: 'The name of the metric input e.g. “Current Assets”, “Capital Expenditure”.'
value:
type: number
description: The positive or negative number of the input value.
errors:
type: array
items:
type: object
properties:
type:
type: string
enum:
- MissingAccountData
- DatesOutOfRange
description: Period error type.
massage:
type: string
example: Missing account data
description: Description of the error.
details:
$ref: '#/components/schemas/FinancialMetrics/definitions/assessErrorDetails'
errors:
type: array
items:
type: object
properties:
type:
type: string
enum:
- UncategorizedAccounts
- MissingInputData
- InputDataError
description: Metric level error.
message:
type: string
description: Description of the error.
example: 'There are uncategorized accounts IDs, see details.'
details:
$ref: '#/components/schemas/FinancialMetrics/definitions/assessErrorDetails'
assessErrorDetails:
title: Assess error details
type: object
description: Dictionary list outlining the missing properties or allowed values.
examples:
- missingData:
- Expense.Operating.Interest
- Expense.NonOperating.Interest
additionalProperties:
type: array
items:
type: string
AccountCategoriesUpdatedWebhook:
title: Account categories updated webhook
description: Webhook request body for account categories updated.
type: object
properties:
companyId:
$ref: '#/components/parameters/companyId/schema'
clientId:
type: string
format: uuid
description: Unique identifier for your client in Codat.
clientName:
type: string
description: Name of your client in Codat.
dataConnectionId:
$ref: '#/components/parameters/connectionId/schema'
ruleId:
type: string
format: uuid
description: Unique identifier for the rule.
ruleType:
type: string
x-stoplight:
id: 34d52a089f08a
description: The type of rule.
alertId:
type: string
format: uuid
description: Unique identifier of the alert.
message:
type: string
description: A human readable message about the webhook.
data:
type: object
properties:
modifiedDate:
description: The date on which this account categories were last modified in Codat.
type: string
example: '2022-10-23'
title: Date
examples:
- companyId: f1c35bdc-1546-41b9-baf4-3f31135af968
clientId: 5e505642-9024-474d-9434-e5a44f505cc5
clientName: Peach Inc.
dataConnectionId: 2e9d2c44-f675-40ba-8049-353bfcb5e171
ruleId: 70af3071-65d9-4ec3-b3cb-5283e8d55dac
ruleType: Account Categories Updated
alertId: a9367074-b5c3-42c4-9be4-be129f43577e
message: Account categories updated for company f1c35bdc-1546-41b9-baf4-3f31135af968.
data:
modifiedDate: '2019-08-24T14:15:22Z'
EnhancedInvoicesReport:
title: Enhanced invoices report
description: The enhanced invoices report takes the key elements of the Invoices report verifying those marked as paid in the accounting platform have actually been paid by matching with the bank statement.
type: object
properties:
reportInfo:
$ref: '#/components/schemas/EnhancedInvoicesReport/definitions/reportInfo'
reportItems:
type: array
items:
type: object
properties:
invoices:
type: array
items:
$ref: '#/components/schemas/EnhancedInvoicesReport/definitions/enhancedInvoiceReportItem'
definitions:
customerRef:
type: object
properties:
id:
minLength: 1
type: string
description: '`id` from the Customers data type'
customerName:
type: string
nullable: true
description: '`customerName` from the Customer data type'
payment:
title: Enhanced invoice payment item
type: object
properties:
id:
type: string
description: 'ID of the invoice, which may be a GUID but it may be something else depending on the accounting platform'
date:
$ref: '#/components/schemas/ExcelStatus/properties/lastGenerated'
paymentType:
type: string
amount:
type: number
currency:
$ref: '#/components/schemas/Currency'
currencyRate:
$ref: '#/components/schemas/CurrencyRate'
bankingTransactionRefs:
type: array
items:
$ref: '#/components/schemas/EnhancedInvoicesReport/definitions/bankingTransactionRef'
bankingTransactionRef:
title: Banking transaction reference
type: object
properties:
id:
type: string
dataConnectionId:
type: string
accountId:
type: string
accountName:
type: string
date:
$ref: '#/components/schemas/ExcelStatus/properties/lastGenerated'
description:
type: string
amount:
type: number
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.
enhancedInvoiceReportItem:
title: Enhanced invoice report item
type: object
properties:
id:
type: string
description: 'ID of the invoice, which may be a GUID but it may be something else depending on the accounting platdform'
invoiceNumber:
type: string
customerRef:
$ref: '#/components/schemas/EnhancedInvoicesReport/definitions/customerRef'
issueDate:
$ref: '#/components/schemas/ExcelStatus/properties/lastGenerated'
dueDate:
$ref: '#/components/schemas/ExcelStatus/properties/lastGenerated'
status:
$ref: '#/components/schemas/EnhancedInvoicesReport/definitions/invoiceStatus'
currency:
$ref: '#/components/schemas/Currency'
totalAmount:
type: number
amountDue:
type: number
paidOnDate:
$ref: '#/components/schemas/ExcelStatus/properties/lastGenerated'
modifiedDate:
$ref: '#/components/schemas/ExcelStatus/properties/lastGenerated'
sourceModifiedDate:
$ref: '#/components/schemas/ExcelStatus/properties/lastGenerated'
payments:
type: array
items:
$ref: '#/components/schemas/EnhancedInvoicesReport/definitions/payment'
reportInfo:
title: Report information
type: object
description: 'Report additional information, which is specific to Assess reports'
properties:
pageNumber:
type: integer
description: The number of the page queried.
pageSize:
type: integer
description: The number of transactions returned per page.
totalResults:
type: integer
description: The total number of transactions available for a company for the period specified in the query string.
reportName:
type: string
description: Name of the report
companyName:
type: string
description: The name of the company being queried.
generatedDate:
type: string
description: Date the report was generated
examples:
- Example 1:
value:
pageNumber: 0
pageSize: 0
totalResults: 0
reportName: string
companyName: string
generatedDate: '2023-01-26T07:36:40.487Z'
PagingInfo:
type: object
x-internal: true
properties:
pageNumber:
type: integer
pageSize:
type: integer
totalResults:
type: integer
_links:
$ref: '#/components/schemas/Links'
required:
- pageNumber
- pageSize
- totalResults
- _links
examples:
- _links:
pageNumber: 1
pageSize: 10
totalResults: 1
self:
href: '/companies/{id}/data/{dataType}'
current:
href: '/companies/{id}/data/{dataType}?page=1&pageSize=10'
Links:
type: object
x-internal: true
required:
- self
- current
properties:
self:
$ref: '#/components/schemas/HalRef'
current:
$ref: '#/components/schemas/HalRef'
next:
$ref: '#/components/schemas/HalRef'
previous:
$ref: '#/components/schemas/HalRef'
examples:
- self:
href: '/companies/{id}/data/{dataType}'
current:
href: '/companies/{id}/data/{dataType}?page=1&pageSize=10'
HalRef:
title: Hypertext reference
type: object
x-internal: true
properties:
href:
type: string
format: uri-reference
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
CurrencyRate:
title: Currency rate
type: number
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.
Where the currency rate is provided by the underlying accounting platform, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).
For accounting platforms 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 |
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.
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.
page:
name: page
in: query
required: true
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: '-modifiedDate'
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).'
x-stoplight:
id: 4je9lwo02netu
dataIntegrityDataType:
name: dataType
in: path
required: true
schema:
type: string
enum:
- banking-accounts
- banking-transactions
- bankAccounts
- accountTransactions
example: banking-accounts
description: A key for a Codat data type.
reportDate:
name: reportDate
in: query
required: true
schema:
type: string
example: 29-09-2020
description: 'The date in which the report is created up to. Users must specify a specific date, however the response will be provided for the full month.'
periodLength:
name: periodLength
in: query
required: true
schema:
type: integer
description: The number of months per period. E.g. 2 = 2 months per period.
numberOfPeriods:
name: numberOfPeriods
in: query
required: true
schema:
type: integer
description: 'The number of periods to return. There will be no pagination as a query parameter, however Codat will limit the number of periods to request to 12 periods.'
periodUnit:
name: periodUnit
in: query
required: true
schema:
type: string
enum:
- Day
- Week
- Month
- Year
description: The period unit of time returned.
includeDisplayNames:
name: includeDisplayNames
in: query
schema:
type: boolean
description: Shows the dimensionDisplayName and itemDisplayName in measures to make the report data human-readable.
excelReportType:
name: reportType
in: query
schema:
type: string
enum:
- assess
- audit
- enhancedFinancials
- enhancedInvoices
- enhancedCashFlow
description: The type of report you want to generate and download.
required: true
securitySchemes:
auth_header:
name: Authorization
description: 'The word "Basic" followed by a space and your API Key, base64 encoded, which can be found [here](https://app.codat.io/developers/api-keys)'
type: apiKey
in: header