Skip to content

Debtors

Debtors

All debtors (customers). Also customers that have currently no outstanding saldo are in this endpoint.

Swagger Page

https://swagger-ui.aws-prod.billtrust.com/?urls.primaryName=Collections%20API%201.6.8#/Collection/getDebtors

Permission / Auth

Bearer token with collection scope (read).

Header: Authorization: Bearer <token>

Query Parameters
Name In Required Type Description
companyId query No string Optional parameter to filter on a specific company. Ignored when "cursor" is provided. Fetch the list of available companies from the "/companies" endpoint.
modifiedSince query No string (date-time) Optional parameter to filter the data on modification date. Ignored when "cursor" is provided. All data with "modified at date" greater or equal than the provided date will be returned. The date should be in RFC 3339 format (e.g. "2000-01-21T13:40:30+02:00").
cursor query No string Optional parameter that allows you to retrieve the next batch of a request. When provided, the "companyId" and "modifiedSince" parameters will be ignored. See "Fetching data incrementally in batches" for more info.
Example Request
curl -X GET 'https://{your-collections-platform-host}/api/v1/debtors' \
    -H 'accept: application/json' \
    -H 'Authorization: Bearer <token>'
Example Response
{
  "data": [
    {
      "id": 1,
      "company_id": 1,
      "created_at": "2024-01-15T12:00:00+00:00",
      "modified_at": "2024-01-15T12:00:00+00:00",
      "source_reference": "string",
      "reference": "string",
      "name": "string",
      "language": "string",
      "vat_number": "string",
      "is_archived": false
    }
  ],
  "next_batch_url": null,
  "next_batch_cursor": null,
  "resume_url": "https://{your-collections-platform-host}/api/v1/example?cursor=opaque-resume-cursor",
  "resume_cursor": "opaque-resume-cursor"
}
Batch envelope
Field Description
data Array of entities in this batch (max 100).
next_batch_cursor / next_batch_url Pass cursor on the next request until empty.
resume_cursor / resume_url Available when the full set is exhausted; use later for incremental sync.
Debtor fields
Field Type Description
id integer (int64) Internal BT Collections ID of the debtor
company_id integer (int64) Internal BT Collections ID of the company this debtor belongs to.
created_at string (date-time) The time this entity is created.
modified_at string (date-time) Last modification date of this entity.
source_reference string Unique reference which identifies a unique debtor as provided by the file (XML, CSV, etc) BT Collections receives each day to import new data.
reference string This is the debtor number as shown in your accountancy software, in BT Collections and on the reminders. This is not necessarily a unique value.
name string Debtor name
language string Debtor language code
vat_number string Debtor VAT number
is_archived boolean Indicates if this debtor is archived or not. A debtor will become archived when there is no outstanding amount.