Skip to content

Companies

A company is a group of debtors and each debtor is in exactly one company. All companies in this API are legal entities that use BT Collections for debt collection. This call lists the companies that can be accessed.

Swagger Page

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

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/companies' \
    -H 'accept: application/json' \
    -H 'Authorization: Bearer <token>'
Example Response
{
  "data": [
    {
      "id": 1,
      "created_at": "2024-01-15T12:00:00+00:00",
      "modified_at": "2024-01-15T12:00:00+00:00",
      "name": "string",
      "is_archived": false,
      "import_last_started_at": "2024-01-15T12:00:00+00:00",
      "export_file_date_of_last_import_start": "2024-01-15T12:00:00+00:00",
      "import_last_finished_at": "2024-01-15T12:00:00+00:00",
      "export_file_date_of_last_import_finish": "2024-01-15T12:00:00+00:00"
    }
  ],
  "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.
Company fields
Field Type Description
id integer (int64) Unique ID. Uniqueness is only guaranteed for all entities within this endpoint.
created_at string (date-time) The time this entity is created.
modified_at string (date-time) Last modification date of this entity.
name string Name of the company.
is_archived boolean Indicates if this company is still active or not. All archived companies are no longer visible in BT Collections.
import_last_started_at string (date-time) Start time of last time import started (but not necessarily finished) for this company.
export_file_date_of_last_import_start string (date-time) Timestamp of export file on last import start for this company.
import_last_finished_at string (date-time) Timestamp when the import last successfully finished for this company.
export_file_date_of_last_import_finish string (date-time) Timestamp of the export file that was last successfully imported for this company.