Download OpenAPI specification:Download
REST API for interfacing with Clear Books products
This API uses OAuth 2 for authentication and authorisation. A compatible OAuth 2 client library or sufficient knowledge to implement an OAuth 2 client is required.
Only confidential clients are supported and must use the "Authorization code" grant type. PKCE is supported (and recommended) but not mandatory.
authorizationCode
https://secure.clearbooks.co.uk/account/action/oauth/
https://api.clearbooks.co.uk/oauth/token
businesses:read
- Read business data
businesses:write
- Update business data
accounting.account_codes:read
- Read account codes
accounting.account_codes:write
- Create, update and delete account codes
accounting.bank_accounts:read
- Read bank accounts
accounting.bank_accounts:write
- Create, update and delete bank accounts
accounting.customers:read
- Read customers
accounting.customers:write
- Create, update and delete customers
accounting.suppliers:read
- Read suppliers
accounting.suppliers:write
- Create, update and delete suppliers
accounting.sales:read
- Read sales documents
accounting.sales:write
- Create, update and delete sales documents
accounting.purchases:read
- Read purchase documents
accounting.purchases:write
- Create, update and delete purchase documents
accounting.payments:read
- Read payments
accounting.payments:write
- Create, update and delete payments
accounting.allocations:read
- Read allocations
accounting.allocations:write
- Create, update and delete allocations
accounting.stock_items:read
- Read stock items
accounting.stock_items:write
- Create, update and delete stock items
accounting.vat:read
- Read VAT information
accounting.bank_feeds:write
- Create bank feeds
accounting.bank_statements:write
- Create bank statements
accounting.transactions:read
- Read transactions
accounting.journals:write
- Create journals
To obtain API credentials for your application, please contact us: https://www.clearbooks.co.uk/support/api/
Single use refresh tokens are issued alongside access tokens and don't expire until they're used.
Applications can only hold a single access token for a user at any given time. If a user completes the OAuth authorisation flow a second time for an application they have already authorised, then their previous access token and refresh token will be revoked and the newly issued ones will need to be used going forward.
Applications making more than 5 requests per second for a sustained period may be subject to throttling and rate limiting.
When an application is being rate limited a HTTP 429 response will be returned for API calls. Rate limited requests should be retried using an exponential backoff algorithm.
Rate limits are subject to change without prior warning and should not be hard-coded into applications.
Endpoints that support pagination will accept a limit
parameter to define how many results to return per page (up to a maximum of 200), and a page
parameter to select which page of results to return.
To help you understand the full result set without having to request all pages, all paginated responses will contain the following headers:
X-Pagination-Limit
- The number of items per page of resultsX-Pagination-Current-Page
- The current page numberX-Pagination-Total-Pages
- The total number of pages availableX-Pagination-Total-Count
- The total number of results across all pages[- {
- "id": 0,
- "name": "string",
- "type": "LimitedCompany",
- "address": {
- "building": "string",
- "line1": "string",
- "line2": "string",
- "town": "string",
- "county": "string",
- "postcode": "string",
- "countryCode": "string"
}, - "logoUrl": "string"
}
]
businessId required | integer <int32> ID of the business |
{- "id": 0,
- "name": "string",
- "type": "LimitedCompany",
- "address": {
- "building": "string",
- "line1": "string",
- "line2": "string",
- "town": "string",
- "county": "string",
- "postcode": "string",
- "countryCode": "string"
}, - "logoUrl": "string"
}
businessId required | integer <int32> ID of the business |
Updated business object
name | string |
type | string Enum: "LimitedCompany" "SoleTrader" "Partnership" "Charity" "Club" "Other" |
object (Address) |
{- "name": "string",
- "type": "LimitedCompany",
- "address": {
- "building": "string",
- "line1": "string",
- "line2": "string",
- "town": "string",
- "county": "string",
- "postcode": "string",
- "countryCode": "string"
}
}
{- "id": 0,
- "name": "string",
- "type": "LimitedCompany",
- "address": {
- "building": "string",
- "line1": "string",
- "line2": "string",
- "town": "string",
- "county": "string",
- "postcode": "string",
- "countryCode": "string"
}, - "logoUrl": "string"
}
An account code, often called a 'nominal code' defines an account in the chart of accounts of a business' accounting ledger
sortBy | string The field to sort results by |
sortDirection | string Enum: "ascending" "descending" The direction to sort the results |
limit | integer <int32> [ 1 .. 200 ] Default: 25 The number of results to return |
page | integer <int32> >= 1 Default: 1 The page of results to return |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
[- {
- "id": 0,
- "name": "string",
- "heading": 0,
- "defaultVatRate": "string",
- "sales": true,
- "purchases": true
}
]
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
Account code object
name required | string |
heading required | integer <int32> |
defaultVatRate | string |
sales | boolean |
purchases | boolean |
{- "name": "string",
- "heading": 0,
- "defaultVatRate": "string",
- "sales": true,
- "purchases": true
}
{- "id": 0,
- "name": "string",
- "heading": 0,
- "defaultVatRate": "string",
- "sales": true,
- "purchases": true
}
accountCodeId required | integer <int32> ID of account code |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
[- {
- "id": 0,
- "name": "string",
- "heading": 0,
- "defaultVatRate": "string",
- "sales": true,
- "purchases": true
}
]
accountCodeId required | integer <int32> ID of account code |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
Account code object
name required | string |
heading required | integer <int32> |
defaultVatRate | string |
sales | boolean |
purchases | boolean |
{- "name": "string",
- "heading": 0,
- "defaultVatRate": "string",
- "sales": true,
- "purchases": true
}
{- "id": 0,
- "name": "string",
- "heading": 0,
- "defaultVatRate": "string",
- "sales": true,
- "purchases": true
}
accountCodeId required | integer <int32> ID of account code |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
[- {
- "errorCode": "string",
- "errorMessage": "string"
}
]
A bank account represents either a real-world bank account in which the business has cash stored, or a logical store of cash defined by the business
sortBy | string The field to sort results by |
sortDirection | string Enum: "ascending" "descending" The direction to sort the results |
limit | integer <int32> [ 1 .. 200 ] Default: 25 The number of results to return |
page | integer <int32> >= 1 Default: 1 The page of results to return |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
[- {
- "id": 0,
- "accountCode": 0,
- "name": "string",
- "accountNumber": "string",
- "sortCode": "string",
- "iban": "string",
- "swift": "string",
- "currency": "string",
- "paymentMethods": [
- {
- "id": 0,
- "name": "string"
}
]
}
]
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
Bank account object
name required | string |
accountNumber | string |
sortCode | string |
iban | string |
swift | string |
currency | string ISO 4217 currency code. If omitted the home currency of the account is used. |
{- "name": "string",
- "accountNumber": "string",
- "sortCode": "string",
- "iban": "string",
- "swift": "string",
- "currency": "string"
}
{- "id": 0,
- "accountCode": 0,
- "name": "string",
- "accountNumber": "string",
- "sortCode": "string",
- "iban": "string",
- "swift": "string",
- "currency": "string",
- "paymentMethods": [
- {
- "id": 0,
- "name": "string"
}
]
}
bankAccountId required | integer <int32> ID of bank account |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
[- {
- "id": 0,
- "accountCode": 0,
- "name": "string",
- "accountNumber": "string",
- "sortCode": "string",
- "iban": "string",
- "swift": "string",
- "currency": "string",
- "paymentMethods": [
- {
- "id": 0,
- "name": "string"
}
]
}
]
bankAccountId required | integer <int32> ID of bank account |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
Bank account object
name | string |
accountNumber | string |
sortCode | string |
iban | string |
swift | string |
{- "name": "string",
- "accountNumber": "string",
- "sortCode": "string",
- "iban": "string",
- "swift": "string"
}
{- "id": 0,
- "accountCode": 0,
- "name": "string",
- "accountNumber": "string",
- "sortCode": "string",
- "iban": "string",
- "swift": "string",
- "currency": "string",
- "paymentMethods": [
- {
- "id": 0,
- "name": "string"
}
]
}
bankAccountId required | integer <int32> ID of bank account |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
[- {
- "errorCode": "string",
- "errorMessage": "string"
}
]
sortBy | string The field to sort results by |
sortDirection | string Enum: "ascending" "descending" The direction to sort the results |
limit | integer <int32> [ 1 .. 200 ] Default: 25 The number of results to return |
page | integer <int32> >= 1 Default: 1 The page of results to return |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
[- {
- "id": 0,
- "name": "string",
- "contactName": {
- "title": "Mr",
- "forenames": "string",
- "surname": "string"
}, - "email": "string",
- "phone": "string",
- "address": {
- "building": "string",
- "line1": "string",
- "line2": "string",
- "town": "string",
- "county": "string",
- "postcode": "string",
- "countryCode": "string"
}, - "vatNumber": "string",
- "companyNumber": "string",
- "archived": true
}
]
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
Customer object
name required | string |
object (ContactName) | |
string | |
phone | string |
object (Address) | |
vatNumber | string |
companyNumber | string |
archived | boolean |
{- "name": "string",
- "contactName": {
- "title": "Mr",
- "forenames": "string",
- "surname": "string"
}, - "email": "string",
- "phone": "string",
- "address": {
- "building": "string",
- "line1": "string",
- "line2": "string",
- "town": "string",
- "county": "string",
- "postcode": "string",
- "countryCode": "string"
}, - "vatNumber": "string",
- "companyNumber": "string",
- "archived": true
}
{- "id": 0,
- "name": "string",
- "contactName": {
- "title": "Mr",
- "forenames": "string",
- "surname": "string"
}, - "email": "string",
- "phone": "string",
- "address": {
- "building": "string",
- "line1": "string",
- "line2": "string",
- "town": "string",
- "county": "string",
- "postcode": "string",
- "countryCode": "string"
}, - "vatNumber": "string",
- "companyNumber": "string",
- "archived": true
}
customerId required | integer <int32> ID of customer |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
{- "id": 0,
- "name": "string",
- "contactName": {
- "title": "Mr",
- "forenames": "string",
- "surname": "string"
}, - "email": "string",
- "phone": "string",
- "address": {
- "building": "string",
- "line1": "string",
- "line2": "string",
- "town": "string",
- "county": "string",
- "postcode": "string",
- "countryCode": "string"
}, - "vatNumber": "string",
- "companyNumber": "string",
- "archived": true
}
customerId required | integer <int32> ID of customer |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
Customer object
name required | string |
object (ContactName) | |
string | |
phone | string |
object (Address) | |
vatNumber | string |
companyNumber | string |
archived | boolean |
{- "name": "string",
- "contactName": {
- "title": "Mr",
- "forenames": "string",
- "surname": "string"
}, - "email": "string",
- "phone": "string",
- "address": {
- "building": "string",
- "line1": "string",
- "line2": "string",
- "town": "string",
- "county": "string",
- "postcode": "string",
- "countryCode": "string"
}, - "vatNumber": "string",
- "companyNumber": "string",
- "archived": true
}
{- "id": 0,
- "name": "string",
- "contactName": {
- "title": "Mr",
- "forenames": "string",
- "surname": "string"
}, - "email": "string",
- "phone": "string",
- "address": {
- "building": "string",
- "line1": "string",
- "line2": "string",
- "town": "string",
- "county": "string",
- "postcode": "string",
- "countryCode": "string"
}, - "vatNumber": "string",
- "companyNumber": "string",
- "archived": true
}
customerId required | integer <int32> ID of customer |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
[- {
- "errorCode": "string",
- "errorMessage": "string"
}
]
sortBy | string The field to sort results by |
sortDirection | string Enum: "ascending" "descending" The direction to sort the results |
limit | integer <int32> [ 1 .. 200 ] Default: 25 The number of results to return |
page | integer <int32> >= 1 Default: 1 The page of results to return |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
[- {
- "id": 0,
- "name": "string",
- "contactName": {
- "title": "Mr",
- "forenames": "string",
- "surname": "string"
}, - "email": "string",
- "phone": "string",
- "address": {
- "building": "string",
- "line1": "string",
- "line2": "string",
- "town": "string",
- "county": "string",
- "postcode": "string",
- "countryCode": "string"
}, - "vatNumber": "string",
- "companyNumber": "string",
- "archived": true
}
]
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
Supplier object
name required | string |
object (ContactName) | |
string | |
phone | string |
object (Address) | |
vatNumber | string |
companyNumber | string |
archived | boolean |
{- "name": "string",
- "contactName": {
- "title": "Mr",
- "forenames": "string",
- "surname": "string"
}, - "email": "string",
- "phone": "string",
- "address": {
- "building": "string",
- "line1": "string",
- "line2": "string",
- "town": "string",
- "county": "string",
- "postcode": "string",
- "countryCode": "string"
}, - "vatNumber": "string",
- "companyNumber": "string",
- "archived": true
}
{- "id": 0,
- "name": "string",
- "contactName": {
- "title": "Mr",
- "forenames": "string",
- "surname": "string"
}, - "email": "string",
- "phone": "string",
- "address": {
- "building": "string",
- "line1": "string",
- "line2": "string",
- "town": "string",
- "county": "string",
- "postcode": "string",
- "countryCode": "string"
}, - "vatNumber": "string",
- "companyNumber": "string",
- "archived": true
}
supplierId required | integer <int32> ID of supplier |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
{- "id": 0,
- "name": "string",
- "contactName": {
- "title": "Mr",
- "forenames": "string",
- "surname": "string"
}, - "email": "string",
- "phone": "string",
- "address": {
- "building": "string",
- "line1": "string",
- "line2": "string",
- "town": "string",
- "county": "string",
- "postcode": "string",
- "countryCode": "string"
}, - "vatNumber": "string",
- "companyNumber": "string",
- "archived": true
}
supplierId required | integer <int32> ID of supplier |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
Supplier object
name required | string |
object (ContactName) | |
string | |
phone | string |
object (Address) | |
vatNumber | string |
companyNumber | string |
archived | boolean |
{- "name": "string",
- "contactName": {
- "title": "Mr",
- "forenames": "string",
- "surname": "string"
}, - "email": "string",
- "phone": "string",
- "address": {
- "building": "string",
- "line1": "string",
- "line2": "string",
- "town": "string",
- "county": "string",
- "postcode": "string",
- "countryCode": "string"
}, - "vatNumber": "string",
- "companyNumber": "string",
- "archived": true
}
{- "id": 0,
- "name": "string",
- "contactName": {
- "title": "Mr",
- "forenames": "string",
- "surname": "string"
}, - "email": "string",
- "phone": "string",
- "address": {
- "building": "string",
- "line1": "string",
- "line2": "string",
- "town": "string",
- "county": "string",
- "postcode": "string",
- "countryCode": "string"
}, - "vatNumber": "string",
- "companyNumber": "string",
- "archived": true
}
supplierId required | integer <int32> ID of supplier |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
[- {
- "errorCode": "string",
- "errorMessage": "string"
}
]
Sales documents such as invoices, quotes and sales credit notes are issued to customers and represent a sale or prospective sale
salesType required | string Enum: "invoices" "creditNotes" "quotes" Type of sales document |
sortBy | string The field to sort results by |
sortDirection | string Enum: "ascending" "descending" The direction to sort the results |
limit | integer <int32> [ 1 .. 200 ] Default: 25 The number of results to return |
page | integer <int32> >= 1 Default: 1 The page of results to return |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
[ ]
salesType required | string Enum: "invoices" "creditNotes" "quotes" Type of sales document |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
Sales document object
documentNumber | string |
date required | string <date> |
dateAccrual | string <date> |
reference | string |
currency | string ISO 4217 currency code. If omitted the home currency of the account is used. |
exchangeRate | double Exchange rate from the home currency of the account to the specified currency for this document. May only be set if currency is provided. If omitted, will be provided automatically. |
description | string Referred to as "summary" in the Clear Books UI. |
vatTreatment required | string |
required | Array of objects (LineItem) |
customerId required | integer <int32> |
dateDue | string <date> |
displayBankAccountId | integer <int32> ID of a bank account whose details will be displayed on the print-formatted invoice. |
internetPaymentAccountIds | Array of integers <int32> [ items <int32 > ] List of bank account IDs for internet payment provider accounts. These will be made available for customer payments via the invoice web view. Instant Bank Payments, Stripe and PayPal accounts may be used. No more than one account per payment provider may be included. For Stripe, if the business has additional currency accounts configured, only the parent account ID should be used. |
{- "documentNumber": "string",
- "date": "2019-08-24",
- "dateAccrual": "2019-08-24",
- "reference": "string",
- "currency": "string",
- "exchangeRate": null,
- "description": "string",
- "vatTreatment": "string",
- "lineItems": [
- {
- "description": "string",
- "unitPrice": 0,
- "quantity": 0,
- "accountCode": 0,
- "vatRateKey": "string",
- "vatAmount": 0,
- "stockItem": 0
}
], - "customerId": 0,
- "dateDue": "2019-08-24",
- "displayBankAccountId": 0,
- "internetPaymentAccountIds": [
- 0
]
}
{- "id": 0,
- "documentNumber": "string",
- "formattedDocumentNumber": "string",
- "date": "2019-08-24",
- "dateAccrual": "2019-08-24",
- "datePaid": "2019-08-24",
- "reference": "string",
- "currency": "string",
- "exchangeRate": null,
- "description": "string",
- "status": "string",
- "gross": 0,
- "net": 0,
- "vat": 0,
- "vatTreatment": "string",
- "lineItems": [
- {
- "description": "string",
- "unitPrice": 0,
- "quantity": 0,
- "accountCode": 0,
- "vatRateKey": "string",
- "vatAmount": 0,
- "stockItem": 0
}
], - "customerId": 0,
- "dateDue": "2019-08-24",
- "due": 0,
- "displayBankAccountId": 0,
- "internetPaymentAccountIds": [
- 0
]
}
Retrieve a sales document. If the provided ID refers to a voided previous revision of a document, a redirect to the current revision will be returned.
salesType required | string Enum: "invoices" "creditNotes" "quotes" Type of sales document |
salesId required | integer <int32> ID of sales document |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
{- "id": 0,
- "documentNumber": "string",
- "formattedDocumentNumber": "string",
- "date": "2019-08-24",
- "dateAccrual": "2019-08-24",
- "datePaid": "2019-08-24",
- "reference": "string",
- "currency": "string",
- "exchangeRate": null,
- "description": "string",
- "status": "string",
- "gross": 0,
- "net": 0,
- "vat": 0,
- "vatTreatment": "string",
- "lineItems": [
- {
- "description": "string",
- "unitPrice": 0,
- "quantity": 0,
- "accountCode": 0,
- "vatRateKey": "string",
- "vatAmount": 0,
- "stockItem": 0
}
], - "customerId": 0,
- "dateDue": "2019-08-24",
- "due": 0,
- "displayBankAccountId": 0,
- "internetPaymentAccountIds": [
- 0
]
}
Update a sales document. For a non-draft invoice or credit note, the original document will be voided (soft deleted) and a new copy created with a new ID. For a quote or draft invoice, the document will be updated in-place and retain its original ID. You only need to provide the fields you want to update. No fields on the body of the document are required.
salesType required | string Enum: "invoices" "creditNotes" "quotes" Type of sales document |
salesId required | integer <int32> ID of sales document |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
Sales document object
documentNumber | string |
date required | string <date> |
dateAccrual | string <date> |
reference | string |
currency | string ISO 4217 currency code. If omitted the home currency of the account is used. |
exchangeRate | double Exchange rate from the home currency of the account to the specified currency for this document. May only be set if currency is provided. If omitted, will be provided automatically. |
description | string Referred to as "summary" in the Clear Books UI. |
vatTreatment required | string |
required | Array of objects (LineItem) |
customerId required | integer <int32> |
dateDue | string <date> |
displayBankAccountId | integer <int32> ID of a bank account whose details will be displayed on the print-formatted invoice. |
internetPaymentAccountIds | Array of integers <int32> [ items <int32 > ] List of bank account IDs for internet payment provider accounts. These will be made available for customer payments via the invoice web view. Instant Bank Payments, Stripe and PayPal accounts may be used. No more than one account per payment provider may be included. For Stripe, if the business has additional currency accounts configured, only the parent account ID should be used. |
{- "documentNumber": "string",
- "date": "2019-08-24",
- "dateAccrual": "2019-08-24",
- "reference": "string",
- "currency": "string",
- "exchangeRate": null,
- "description": "string",
- "vatTreatment": "string",
- "lineItems": [
- {
- "description": "string",
- "unitPrice": 0,
- "quantity": 0,
- "accountCode": 0,
- "vatRateKey": "string",
- "vatAmount": 0,
- "stockItem": 0
}
], - "customerId": 0,
- "dateDue": "2019-08-24",
- "displayBankAccountId": 0,
- "internetPaymentAccountIds": [
- 0
]
}
{- "id": 0,
- "documentNumber": "string",
- "formattedDocumentNumber": "string",
- "date": "2019-08-24",
- "dateAccrual": "2019-08-24",
- "datePaid": "2019-08-24",
- "reference": "string",
- "currency": "string",
- "exchangeRate": null,
- "description": "string",
- "status": "string",
- "gross": 0,
- "net": 0,
- "vat": 0,
- "vatTreatment": "string",
- "lineItems": [
- {
- "description": "string",
- "unitPrice": 0,
- "quantity": 0,
- "accountCode": 0,
- "vatRateKey": "string",
- "vatAmount": 0,
- "stockItem": 0
}
], - "customerId": 0,
- "dateDue": "2019-08-24",
- "due": 0,
- "displayBankAccountId": 0,
- "internetPaymentAccountIds": [
- 0
]
}
Delete a sales document. Non-draft invoices and credit notes will be voided (soft deleted). Quotes and draft invoices will be hard deleted.
salesType required | string Enum: "invoices" "creditNotes" "quotes" Type of sales document |
salesId required | integer <int32> ID of sales document |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
[- {
- "errorCode": "string",
- "errorMessage": "string"
}
]
Purchase documents such as bills, expenses and purchase credit notes are received from suppliers and represent a purchase or prospective purchase
purchaseType required | string Enum: "bills" "creditNotes" "expenses" Type of purchase document |
sortBy | string The field to sort results by |
sortDirection | string Enum: "ascending" "descending" The direction to sort the results |
limit | integer <int32> [ 1 .. 200 ] Default: 25 The number of results to return |
page | integer <int32> >= 1 Default: 1 The page of results to return |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
[ ]
purchaseType required | string Enum: "bills" "creditNotes" "expenses" Type of purchase document |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
Purchase document object
documentNumber | string |
date required | string <date> |
dateAccrual | string <date> |
reference | string |
currency | string ISO 4217 currency code. If omitted the home currency of the account is used. |
exchangeRate | double Exchange rate from the home currency of the account to the specified currency for this document. May only be set if currency is provided. If omitted, will be provided automatically. |
description | string Referred to as "summary" in the Clear Books UI. |
vatTreatment required | string |
required | Array of objects (LineItem) |
supplierId required | integer <int32> |
dateDue | string <date> |
{- "documentNumber": "string",
- "date": "2019-08-24",
- "dateAccrual": "2019-08-24",
- "reference": "string",
- "currency": "string",
- "exchangeRate": null,
- "description": "string",
- "vatTreatment": "string",
- "lineItems": [
- {
- "description": "string",
- "unitPrice": 0,
- "quantity": 0,
- "accountCode": 0,
- "vatRateKey": "string",
- "vatAmount": 0,
- "stockItem": 0
}
], - "supplierId": 0,
- "dateDue": "2019-08-24"
}
{- "id": 0,
- "documentNumber": "string",
- "formattedDocumentNumber": "string",
- "date": "2019-08-24",
- "dateAccrual": "2019-08-24",
- "datePaid": "2019-08-24",
- "reference": "string",
- "currency": "string",
- "exchangeRate": null,
- "description": "string",
- "status": "string",
- "gross": 0,
- "net": 0,
- "vat": 0,
- "due": 0,
- "vatTreatment": "string",
- "lineItems": [
- {
- "description": "string",
- "unitPrice": 0,
- "quantity": 0,
- "accountCode": 0,
- "vatRateKey": "string",
- "vatAmount": 0,
- "stockItem": 0
}
], - "supplierId": 0,
- "dateDue": "2019-08-24"
}
Retrieve a purchase document. If the provided ID refers to a voided previous revision of a document, a redirect to the current revision will be returned.
purchaseType required | string Enum: "bills" "creditNotes" "expenses" Type of purchase document |
purchaseId required | integer <int32> ID of purchase document |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
{- "id": 0,
- "documentNumber": "string",
- "formattedDocumentNumber": "string",
- "date": "2019-08-24",
- "dateAccrual": "2019-08-24",
- "datePaid": "2019-08-24",
- "reference": "string",
- "currency": "string",
- "exchangeRate": null,
- "description": "string",
- "status": "string",
- "gross": 0,
- "net": 0,
- "vat": 0,
- "due": 0,
- "vatTreatment": "string",
- "lineItems": [
- {
- "description": "string",
- "unitPrice": 0,
- "quantity": 0,
- "accountCode": 0,
- "vatRateKey": "string",
- "vatAmount": 0,
- "stockItem": 0
}
], - "supplierId": 0,
- "dateDue": "2019-08-24"
}
Update a purchase document. For a non-draft bill or credit note, the original document will be voided (soft deleted) and a new copy created with a new ID. For a draft bill, the document will be updated in-place. You only need to provide the fields you want to update. No fields on the body of the document are required.
purchaseType required | string Enum: "bills" "creditNotes" "expenses" Type of purchase document |
purchaseId required | integer <int32> ID of purchase document |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
Purchase document object
documentNumber | string |
date required | string <date> |
dateAccrual | string <date> |
reference | string |
currency | string ISO 4217 currency code. If omitted the home currency of the account is used. |
exchangeRate | double Exchange rate from the home currency of the account to the specified currency for this document. May only be set if currency is provided. If omitted, will be provided automatically. |
description | string Referred to as "summary" in the Clear Books UI. |
vatTreatment required | string |
required | Array of objects (LineItem) |
supplierId required | integer <int32> |
dateDue | string <date> |
{- "documentNumber": "string",
- "date": "2019-08-24",
- "dateAccrual": "2019-08-24",
- "reference": "string",
- "currency": "string",
- "exchangeRate": null,
- "description": "string",
- "vatTreatment": "string",
- "lineItems": [
- {
- "description": "string",
- "unitPrice": 0,
- "quantity": 0,
- "accountCode": 0,
- "vatRateKey": "string",
- "vatAmount": 0,
- "stockItem": 0
}
], - "supplierId": 0,
- "dateDue": "2019-08-24"
}
{- "id": 0,
- "documentNumber": "string",
- "formattedDocumentNumber": "string",
- "date": "2019-08-24",
- "dateAccrual": "2019-08-24",
- "datePaid": "2019-08-24",
- "reference": "string",
- "currency": "string",
- "exchangeRate": null,
- "description": "string",
- "status": "string",
- "gross": 0,
- "net": 0,
- "vat": 0,
- "due": 0,
- "vatTreatment": "string",
- "lineItems": [
- {
- "description": "string",
- "unitPrice": 0,
- "quantity": 0,
- "accountCode": 0,
- "vatRateKey": "string",
- "vatAmount": 0,
- "stockItem": 0
}
], - "supplierId": 0,
- "dateDue": "2019-08-24"
}
Delete a purchase document. Non-draft bills and credit notes will be voided (soft deleted). Draft bills will be hard deleted.
purchaseType required | string Enum: "bills" "creditNotes" "expenses" Type of purchase document |
purchaseId required | integer <int32> ID of purchase document |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
[- {
- "errorCode": "string",
- "errorMessage": "string"
}
]
Payments received or made to cover a sale or purchase represent a transfer of money between the business and a customer or supplier
sortBy | string The field to sort results by |
sortDirection | string Enum: "ascending" "descending" The direction to sort the results |
limit | integer <int32> [ 1 .. 200 ] Default: 25 The number of results to return |
page | integer <int32> >= 1 Default: 1 The page of results to return |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
[- {
- "id": 0,
- "date": "2019-08-24",
- "accountingDate": "2019-08-24",
- "description": "string",
- "amount": 0,
- "currency": "string",
- "exchangeRate": null,
- "contactId": 0,
- "paymentMethodId": 0,
- "bankAccountId": 0
}
]
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
Payment object
date required | string <date> Bank date of the payment. |
accountingDate | string <date> Accounting date of the payment. Only needs to be provided on create if it differs from the bank date. If not provided, it will be automatically populated with the bank date. |
description required | string |
amount required | number <double> Amount of the payment. Should be positive for money received, and negative for money paid out. |
exchangeRate | float Exchange rate from the home currency of the business to the currency of the specified bank account. May only be set if those currencies differ. If omitted on create, will be provided automatically. If omitted on update, the existing rate will be retained, unless you change the bank account to one in a different currency, in which case it will be replaced automatically. Otherwise, to discard the existing rate and have the system repopulate it automatically, set it to NULL. |
contactId required | integer <int32> |
paymentMethodId | integer <int32> ID of a payment method available for the specified bank account. Payment method is recorded for reference only and is only visible when viewing individual Clear Books bank transactions and customer/supplier payments reports. |
bankAccountId required | integer <int32> |
{- "date": "2019-08-24",
- "accountingDate": "2019-08-24",
- "description": "string",
- "amount": 0,
- "exchangeRate": null,
- "contactId": 0,
- "paymentMethodId": 0,
- "bankAccountId": 0
}
{- "id": 0,
- "date": "2019-08-24",
- "accountingDate": "2019-08-24",
- "description": "string",
- "amount": 0,
- "currency": "string",
- "exchangeRate": null,
- "contactId": 0,
- "paymentMethodId": 0,
- "bankAccountId": 0
}
paymentId | integer <int32> ID of payment |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
{- "id": 0,
- "date": "2019-08-24",
- "accountingDate": "2019-08-24",
- "description": "string",
- "amount": 0,
- "currency": "string",
- "exchangeRate": null,
- "contactId": 0,
- "paymentMethodId": 0,
- "bankAccountId": 0
}
paymentId | integer <int32> ID of payment |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
Payment object
date required | string <date> Bank date of the payment. |
accountingDate | string <date> Accounting date of the payment. Only needs to be provided on create if it differs from the bank date. If not provided, it will be automatically populated with the bank date. |
description required | string |
amount required | number <double> Amount of the payment. Should be positive for money received, and negative for money paid out. |
exchangeRate | float Exchange rate from the home currency of the business to the currency of the specified bank account. May only be set if those currencies differ. If omitted on create, will be provided automatically. If omitted on update, the existing rate will be retained, unless you change the bank account to one in a different currency, in which case it will be replaced automatically. Otherwise, to discard the existing rate and have the system repopulate it automatically, set it to NULL. |
contactId required | integer <int32> |
paymentMethodId | integer <int32> ID of a payment method available for the specified bank account. Payment method is recorded for reference only and is only visible when viewing individual Clear Books bank transactions and customer/supplier payments reports. |
bankAccountId required | integer <int32> |
{- "date": "2019-08-24",
- "accountingDate": "2019-08-24",
- "description": "string",
- "amount": 0,
- "exchangeRate": null,
- "contactId": 0,
- "paymentMethodId": 0,
- "bankAccountId": 0
}
{- "id": 0,
- "date": "2019-08-24",
- "accountingDate": "2019-08-24",
- "description": "string",
- "amount": 0,
- "currency": "string",
- "exchangeRate": null,
- "contactId": 0,
- "paymentMethodId": 0,
- "bankAccountId": 0
}
paymentId | integer <int32> ID of payment |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
[- {
- "errorCode": "string",
- "errorMessage": "string"
}
]
Allocations represent the association of a payment to an invoice or bill in order to clear or partly clear the balance
invoiceType required | string Enum: "sales" "purchases" Type of invoice |
allocationType | string Enum: "creditNote" "payment" Allocation item type |
paymentId | integer <int32> ID of payment |
creditNoteId | integer <int32> ID of credit note |
invoiceId | integer <int32> ID of a sales or purchase invoice |
sortBy | string The field to sort results by |
sortDirection | string Enum: "ascending" "descending" The direction to sort the results |
limit | integer <int32> [ 1 .. 200 ] Default: 25 The number of results to return |
page | integer <int32> >= 1 Default: 1 The page of results to return |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
[- {
- "id": 123,
- "invoiceId": 456,
- "paymentId": 789,
- "allocationType": "payment",
- "amount": 100
}, - {
- "id": 987,
- "invoiceId": 654,
- "creditNoteId": 321,
- "allocationType": "creditNote",
- "amount": 50
}
]
Payments and credit notes that use a different currency to the base currency of the Clear Books account, can only be allocated to invoices and bills of the same currency.
invoiceType required | string Enum: "sales" "purchases" Type of invoice |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
Payment allocation object
invoiceId required | integer <int32> |
paymentId required | integer <int32> |
allocationType required | string |
amount required | number <double> |
{- "invoiceId": 123,
- "paymentId": 456,
- "allocationType": "payment",
- "amount": 100
}
{- "id": 0,
- "invoiceId": 0,
- "paymentId": 0,
- "allocationType": "payment",
- "amount": 0
}
invoiceType required | string Enum: "sales" "purchases" Type of invoice |
allocationId required | integer <int32> ID of an allocation |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
{- "id": 0,
- "invoiceId": 0,
- "paymentId": 0,
- "allocationType": "payment",
- "amount": 0
}
invoiceType required | string Enum: "sales" "purchases" Type of invoice |
allocationId required | integer <int32> ID of an allocation |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
[- {
- "errorCode": "string",
- "errorMessage": "string"
}
]
Stock items represent inventory that can be sold and purchased using sales and purchase documents
sortBy | string The field to sort results by |
sortDirection | string Enum: "ascending" "descending" The direction to sort the results |
limit | integer <int32> [ 1 .. 200 ] Default: 25 The number of results to return |
page | integer <int32> >= 1 Default: 1 The page of results to return |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
[- {
- "id": 0,
- "name": "string",
- "sku": "string",
- "type": "purchases",
- "description": "string",
- "salesUnitPrice": 0,
- "salesAccountCode": 0,
- "salesVatRateKey": "string",
- "salesQuantity": 0,
- "purchaseUnitPrice": 0,
- "purchaseAccountCode": 0,
- "purchaseVatRateKey": "string",
- "purchaseQuantity": 0,
- "trackStock": true
}
]
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
Stock item object
name required | string |
sku | string |
type required | string Enum: "purchases" "sales" "both" |
description | string |
salesUnitPrice | number <double> |
salesAccountCode | integer <int32> |
salesVatRateKey | string |
salesQuantity | integer <int32> |
purchaseUnitPrice | number <double> |
purchaseAccountCode | integer <int32> |
purchaseVatRateKey | string |
purchaseQuantity | integer <int32> |
trackStock | boolean |
{- "name": "string",
- "sku": "string",
- "type": "purchases",
- "description": "string",
- "salesUnitPrice": 0,
- "salesAccountCode": 0,
- "salesVatRateKey": "string",
- "salesQuantity": 0,
- "purchaseUnitPrice": 0,
- "purchaseAccountCode": 0,
- "purchaseVatRateKey": "string",
- "purchaseQuantity": 0,
- "trackStock": true
}
{- "id": 0,
- "name": "string",
- "sku": "string",
- "type": "purchases",
- "description": "string",
- "salesUnitPrice": 0,
- "salesAccountCode": 0,
- "salesVatRateKey": "string",
- "salesQuantity": 0,
- "purchaseUnitPrice": 0,
- "purchaseAccountCode": 0,
- "purchaseVatRateKey": "string",
- "purchaseQuantity": 0,
- "trackStock": true
}
stockItemId required | integer <int32> ID of stock item |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
{- "id": 0,
- "name": "string",
- "sku": "string",
- "type": "purchases",
- "description": "string",
- "salesUnitPrice": 0,
- "salesAccountCode": 0,
- "salesVatRateKey": "string",
- "salesQuantity": 0,
- "purchaseUnitPrice": 0,
- "purchaseAccountCode": 0,
- "purchaseVatRateKey": "string",
- "purchaseQuantity": 0,
- "trackStock": true
}
stockItemId required | integer <int32> ID of stock item |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
Stock item object
name | string |
sku | string |
type | string Enum: "purchases" "sales" "both" |
description | string |
salesUnitPrice | number <double> |
salesAccountCode | integer <int32> |
salesVatRateKey | string |
salesQuantity | integer <int32> |
purchaseUnitPrice | number <double> |
purchaseAccountCode | integer <int32> |
purchaseVatRateKey | string |
purchaseQuantity | integer <int32> |
trackStock | boolean |
{- "name": "string",
- "sku": "string",
- "type": "purchases",
- "description": "string",
- "salesUnitPrice": 0,
- "salesAccountCode": 0,
- "salesVatRateKey": "string",
- "salesQuantity": 0,
- "purchaseUnitPrice": 0,
- "purchaseAccountCode": 0,
- "purchaseVatRateKey": "string",
- "purchaseQuantity": 0,
- "trackStock": true
}
{- "id": 0,
- "name": "string",
- "sku": "string",
- "type": "purchases",
- "description": "string",
- "salesUnitPrice": 0,
- "salesAccountCode": 0,
- "salesVatRateKey": "string",
- "salesQuantity": 0,
- "purchaseUnitPrice": 0,
- "purchaseAccountCode": 0,
- "purchaseVatRateKey": "string",
- "purchaseQuantity": 0,
- "trackStock": true
}
stockItemId required | integer <int32> ID of stock item |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
[- {
- "errorCode": "string",
- "errorMessage": "string"
}
]
salesType required | string Enum: "invoices" "creditNotes" "quotes" Type of sales document |
salesId required | integer <int32> ID of sales document |
sortBy | string The field to sort results by |
sortDirection | string Enum: "ascending" "descending" The direction to sort the results |
limit | integer <int32> [ 1 .. 200 ] Default: 25 The number of results to return |
page | integer <int32> >= 1 Default: 1 The page of results to return |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
[- {
- "id": 0,
- "name": "string",
- "size": 0,
- "dateUploaded": "string"
}
]
salesType required | string Enum: "invoices" "creditNotes" "quotes" Type of sales document |
salesId required | integer <int32> ID of sales document |
fileName required | string Name of file |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
Attachment object
{- "id": 0,
- "name": "string",
- "size": 0,
- "dateUploaded": "string"
}
attachmentId required | integer <int32> ID of an attachment |
salesType required | string Enum: "invoices" "creditNotes" "quotes" Type of sales document |
salesId required | integer <int32> ID of sales document |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
{- "id": 0,
- "name": "string",
- "size": 0,
- "dateUploaded": "string"
}
attachmentId required | integer <int32> ID of an attachment |
salesType required | string Enum: "invoices" "creditNotes" "quotes" Type of sales document |
salesId required | integer <int32> ID of sales document |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
[- {
- "errorCode": "string",
- "errorMessage": "string"
}
]
purchaseType required | string Enum: "bills" "creditNotes" "expenses" Type of purchase document |
purchaseId required | integer <int32> ID of purchase document |
sortBy | string The field to sort results by |
sortDirection | string Enum: "ascending" "descending" The direction to sort the results |
limit | integer <int32> [ 1 .. 200 ] Default: 25 The number of results to return |
page | integer <int32> >= 1 Default: 1 The page of results to return |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
[- {
- "id": 0,
- "name": "string",
- "size": 0,
- "dateUploaded": "string"
}
]
purchaseType required | string Enum: "bills" "creditNotes" "expenses" Type of purchase document |
purchaseId required | integer <int32> ID of purchase document |
fileName required | string Name of file |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
Attachment object
{- "id": 0,
- "name": "string",
- "size": 0,
- "dateUploaded": "string"
}
attachmentId required | integer <int32> ID of an attachment |
purchaseType required | string Enum: "bills" "creditNotes" "expenses" Type of purchase document |
purchaseId required | integer <int32> ID of purchase document |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
{- "id": 0,
- "name": "string",
- "size": 0,
- "dateUploaded": "string"
}
attachmentId required | integer <int32> ID of an attachment |
purchaseType required | string Enum: "bills" "creditNotes" "expenses" Type of purchase document |
purchaseId required | integer <int32> ID of purchase document |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
[- {
- "errorCode": "string",
- "errorMessage": "string"
}
]
VAT rates and treatments represent the valid VAT settings that can be used on sales and purchase documents
vatType required | string Enum: "sales" "purchases" Type of VAT |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
[- {
- "key": "string",
- "name": "string"
}
]
vatType required | string Enum: "sales" "purchases" Type of VAT |
vatTreatment | string VAT treatment |
date | string <date> Date |
contactId | integer <int32> A customer or supplier ID |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
[- {
- "key": "string",
- "name": "string",
- "rate": 0
}
]
Bank feeds allow financial institutions to send transaction data direct to Clear Books and have it associated with a bank account
A bank feed can be created for an existing Clear Books bank account in one of two ways:
By specifying an accountId
returned from one of the bank accounts endpoints.
By providing and accountNumber
and sortCode
that match an account which already exists in Clear Books.
If a bank account does not already exist in Clear Books for the bank feed you wish to create, then you must provide
enough information to allow us to create an account for you. The required fields in this case are name
,
accountNumber
and sortCode
.
If an existing bank account that matches this information is found, then it will be used and no extra account will be created.
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
Array of objects (BankFeed) |
{- "items": [
- {
- "accountId": 123
}
]
}
{- "items": [
- {
- "id": "string",
- "name": "string",
- "accountNumber": "string",
- "sortCode": "string",
- "iban": "string",
- "swift": "string",
- "currency": "string",
- "accountToken": "string",
- "accountId": 0
}
]
}
Clear Books will consolidate statements posted using this API call into monthly statements ready to be explained. One statement in Clear Books will be maintained for each calendar month based on the transaction date.
The IDs returned by this call represent the statement that the posted transactions were added to, regardless of whether a new statement was created or the transactions were appended to an existing statement.
Clear Books will ignore transactions with a transactionId
that has already been used for the same bank feed. No attempt is
made to deduplicate transactions based on any other properties. Please ensure that each individual transaction you send has
a consistent, unique ID.
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
Array of objects (BankStatement) |
{- "items": [
- {
- "feedId": "203f768c68fbaa84abb372ec7763038e9297f9e2",
- "statementLines": [
- {
- "transactionId": "40b4fa10e1ea89e1d5254abdd4a1d7c24c308600",
- "transactionDate": "2019-09-29",
- "description": "Debit card purchase",
- "amount": -15.99
}, - {
- "transactionId": "b44f0db4be45bc9c7c8e7ee0ab37fbf8e0ee011c",
- "transactionDate": "2019-09-30",
- "description": "Refund",
- "amount": 150.76
}
]
}
]
}
{- "items": [
- {
- "id": 0,
- "accountId": 0,
- "feedId": "string"
}
]
}
accountingDateFrom | string <date> Return results from this accounting date. Date format 'YYYY-MM-DD' |
accountingDateTo | string <date> Return results to this accounting date. Date format 'YYYY-MM-DD' |
sortBy | string Enum: "id" "accountingDate" The field to sort results by. Default value 'id' |
sortDirection | string Enum: "ascending" "descending" The direction to sort the results |
limit | integer <int32> [ 1 .. 200 ] Default: 25 The number of results to return |
page | integer <int32> >= 1 Default: 1 The page of results to return |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
[- {
- "id": 1,
- "accountingDate": "2022-02-22",
- "lines": [
- {
- "accountCodeId": 1001001,
- "amount": 100
}, - {
- "accountCodeId": 2001001,
- "amount": -50
}, - {
- "accountCodeId": 3001001,
- "amount": -50
}
]
}, - {
- "id": 2,
- "accountingDate": "2022-02-23",
- "lines": [
- {
- "accountCodeId": 1001001,
- "amount": 200
}, - {
- "accountCodeId": 4001001,
- "amount": -200
}
]
}
]
transactionId | integer Filter by this transaction ID |
accountCodeId | integer Filter by this account code ID |
accountingDateFrom | string <date> Return results from this accounting date. Date format 'YYYY-MM-DD' |
accountingDateTo | string <date> Return results to this accounting date. Date format 'YYYY-MM-DD' |
sortBy | string Enum: "transactionId" "accountingDate" "accountCodeId" "amount" The field to sort results by. Default value 'transactionId' |
sortDirection | string Enum: "ascending" "descending" The direction to sort the results |
limit | integer <int32> [ 1 .. 200 ] Default: 25 The number of results to return |
page | integer <int32> >= 1 Default: 1 The page of results to return |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
[- {
- "transactionId": 1,
- "accountingDate": "2022-02-22",
- "accountCodeId": 1001001,
- "amount": 100
}, - {
- "transactionId": 1,
- "accountingDate": "2022-02-22",
- "accountCodeId": 2001001,
- "amount": -50
}, - {
- "transactionId": 1,
- "accountingDate": "2022-02-22",
- "accountCodeId": 3001001,
- "amount": -50
}, - {
- "transactionId": 2,
- "accountingDate": "2022-02-23",
- "accountCodeId": 1001001,
- "amount": 200
}, - {
- "transactionId": 2,
- "accountingDate": "2022-02-23",
- "accountCodeId": 4001001,
- "amount": -200
}
]
accountingDateFrom required | string <date> Return results from this accounting date. Date format 'YYYY-MM-DD' |
accountingDateTo required | string <date> Return results to this accounting date. Date format 'YYYY-MM-DD' |
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
[- {
- "accountCodeId": 1001001,
- "balance": 300
}, - {
- "accountCodeId": 2001001,
- "balance": -50
}, - {
- "accountCodeId": 3001001,
- "balance": -50
}, - {
- "accountCodeId": 4001001,
- "balance": -200
}
]
A journal is a type of transaction created to move money between accounts outside of normal business operations
The sum of amounts of all lines in the journal must add up to 0.
X-Business-ID | integer <int32> ID of the business to use (required for multi-business authorisations only) |
Journal object
accountingDate | string <date> |
description | string |
Array of objects (JournalLine) |
{- "description": "example journal",
- "accountingDate": "2022-02-22",
- "lines": [
- {
- "accountCodeId": 1001001,
- "amount": 100
}, - {
- "accountCodeId": 2001001,
- "amount": -50
}, - {
- "accountCodeId": 3001001,
- "amount": -50
}
]
}
{- "id": 0,
- "accountingDate": "2019-08-24",
- "description": "string",
- "lines": [
- {
- "accountCodeId": 0,
- "amount": 0
}
]
}