Skip to content

Documents

Document custom fields historic changes

A customizable field that can be added to a document. These fields can be visualized in the BT Collections UI. The fields can be changed manually by the user, by rule base settings/property assigners or by the XML/import. This API en endpoint will keep track of all manual changes (modified_type = 1) on document fields. Currently it only logs manual changes, but be aware that in the future other sources of change can also be added with a different "modification_source" field.

Swagger Page

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

Permission / Auth

Bearer token with collection scope (read).

Header: Authorization: Bearer <token>

Query Parameters
Name In Required Type Description
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/document-custom-field-historic-changes' \
    -H 'accept: application/json' \
    -H 'Authorization: Bearer <token>'
Example Response
{
  "data": [
    {
      "id": 1,
      "document_id": 1,
      "modified_at": "2024-01-15T12:00:00+00:00",
      "created_at": "2024-01-15T12:00:00+00:00",
      "document_reference": "string",
      "modification_source": "string",
      "modified_by": 1,
      "label": "string",
      "type": "string",
      "new_value_boolean": false,
      "new_value_date": "2024-01-15",
      "new_value_date_time": "2024-01-15T12:00:00+00:00",
      "new_value_double": 1.0,
      "new_value_integer": 1,
      "new_value_string": "string"
    }
  ],
  "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.
DocumentCustomFieldHistoricChange fields
Field Type Description
id integer (int64) Unique ID. Uniqueness is only guaranteed for all entities within this endpoint.
document_id integer (int64) Internal BT Collections ID of the document of this custom field.
modified_at string (date-time) Last modification date of this entity.
created_at string (date-time) The time this entity is created.
document_reference string The reference of the document on the moment the change was made.
modification_source string The type of change on the custom field.
modified_by integer (int64) Id of the user that made the change.
label string The name of the custom field.
type string The type of the custom field. Can be either: boolean, date, date_time, double, integer, string.
new_value_boolean boolean The boolean value of the custom field with type "boolean". Can be null for deleted values or other field types.
new_value_date string (date) The date value of the custom field with type "date". Can be null for deleted values or other field types.
new_value_date_time string (date-time) The date/time value of the custom field with type "date_time". Can be null for deleted values or other field types.
new_value_double number (float) The double value of the custom field with type "double". Can be null for deleted values or other field types.
new_value_integer integer (int64) The integer value of the custom field with type "integer". Can be null for deleted values or other field types.
new_value_string string The string value of the custom field with type "string". Can be null for deleted values or other field types.

Document custom fields

A customizable field that can be added to a document. These fields can be visualized in the BT Collections UI.

Swagger Page

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

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/document-custom-fields' \
    -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",
      "document_id": 1,
      "is_deleted": false,
      "label": "string",
      "type": "string",
      "value_boolean": false,
      "value_date": "2024-01-15",
      "value_date_time": "2024-01-15T12:00:00+00:00",
      "value_double": 1.0,
      "value_integer": 1,
      "value_string": "string"
    }
  ],
  "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.
DocumentCustomField 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.
document_id integer (int64) Internal BT Collections ID of the document of this custom field.
is_deleted boolean Indicates whether the custom field has been deleted or not.
label string The name of the custom field.
type string The type of the custom field. Can be either: boolean, date, date_time, double, integer, string.
value_boolean boolean The boolean value of the custom field with type "boolean". Can be null for deleted values or other field types.
value_date string (date) The date value of the custom field with type "date". Can be null for deleted values or other field types.
value_date_time string (date-time) The date/time value of the custom field with type "date_time". Can be null for deleted values or other field types.
value_double number (float) The double value of the custom field with type "double". Can be null for deleted values or other field types.
value_integer integer (int64) The integer value of the custom field with type "integer". Can be null for deleted values or other field types.
value_string string The string value of the custom field with type "string". Can be null for deleted values or other field types.

This call lists the documents linked to a document set.

Swagger Page

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

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/document-set-links' \
    -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",
      "document_set_id": 1,
      "document_id": 1
    }
  ],
  "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.
Field Type Description
id integer (int64) Internal BT Collections ID of the document set link.
created_at string (date-time) The time this document set link is created.
modified_at string (date-time) The time this document set link is created.
document_set_id integer (int64) Internal BT Collections ID of the document set
document_id integer (int64) Internal BT Collections ID of the document

Document sets

This call lists the document sets.

Swagger Page

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

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/document-sets' \
    -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",
      "debtor_id": 1,
      "ogm": "string"
    }
  ],
  "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.
DocumentSet fields
Field Type Description
id integer (int64) Internal BT Collections ID of the document set.
created_at string (date-time) The time this document set is created.
modified_at string (date-time) The time this document set is created.
debtor_id integer (int64) Internal BT Collections ID of the debtor for which this document set was created.
ogm string The characters of the OGM (structured message for e.g. payments)

Documents (payments, invoices, credit notes)

All financial documents (payments, invoices, credit notes)

Swagger Page

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

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/documents' \
    -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",
      "issue_date": "2024-01-15",
      "due_date": "2024-01-15",
      "journal": "string",
      "document_number": "string",
      "source_reference": "string",
      "debtor_id": 1,
      "status": "string",
      "custom_status_reference": "string",
      "last_status_change_date": "2024-01-15T12:00:00+00:00",
      "original_currency": "string",
      "denomination_in_original_currency": 1.0,
      "original_denomination_in_original_currency": 1.0,
      "internal_description": "string",
      "external_description": "string",
      "is_archived": false,
      "payment_reference": "string",
      "archived_at_date": "2024-01-15",
      "paid_at_date": "2024-01-15"
    }
  ],
  "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.
Document 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 document is created
modified_at string (date-time) Last modification date of this document
issue_date string (date) The date the document was issued.
due_date string (date) The date the document is due.
journal string Journal field for the document.
document_number string The number of the document
source_reference string Value of the XML tag in which a unique identifier was used to identify each document.
debtor_id integer (int64) Internal BT Collections ID of the debtor for which this document was sent to BT Collections.
status string Current status of the document. Default BT Collections statuses: procedure, promise, dispute, payment_plan, outsourced or custom.
custom_status_reference string Custom status definition. The value is the name of a custom status which can be configured for each BT Collections individually.
last_status_change_date string (date-time) Date on which the document status was changed to the current status.
original_currency string Transactional (original) currency of the document. E.g. EUR, USD, GBP, etc.
denomination_in_original_currency number (float) Current balance of the document in transactional currency. Please note that the value can be zero if BT Collections does not receive correct input for this field.
original_denomination_in_original_currency number (float) Original balance of the document in transactional currency. Please note that the value can be zero if BT Collections does not receive correct input for this field.
internal_description string Description of the document which will be visible internally.
external_description string Additional description of the document which can be exposed externally, e.g. to the customer.
is_archived boolean Indicates if this document is archived or not.
payment_reference string The payment reference of the invoice to easily match payments to this invoice.
archived_at_date string (date) The date when the document is archived.
paid_at_date string (date) The date when the document is paid.