For AI agents: markdown of this page — /docs-content-en/entities/invoices/list.md documentation index — /llms.txt
List invoices
GET /v1/invoices
Returns a list of invoices with filtering, sorting and pagination.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
Parameterlimit (query) |
Typenumber | Requiredno | Default50 |
DescriptionNumber of records per call, up to 5000 |
Parameteroffset (query) |
Typenumber | Requiredno | Default0 |
DescriptionSkip N records, counted individually: offset=7 starts at the 8th record. When offset >= 2500, limit <= 500 is more reliable |
Parametersort (query) |
Typestring | Requiredno | Default— | DescriptionSorting via the short syntax: ?sort=-createdTime; the minus sign means descending order. The accepted names are listed in the 400 UNKNOWN_SORT_FIELD error text — not every field from GET /v1/invoices/fields can be sorted on |
Parameterorder (query) |
Typeobject | Requiredno | Default— | DescriptionSorting: ?order[createdTime]=desc |
Parameterselect (query) |
Typestring | Requiredno | Default— | DescriptionField selection: ?select=id,title,stageId. Accepts any field from GET /v1/invoices/fields |
Parameterfilter (query) |
Typeobject | Requiredno | Default— | DescriptionFiltering. The accepted names are listed in the 400 UNKNOWN_FILTER_FIELD error text — not every field from GET /v1/invoices/fields can be filtered on.Filtering syntax. Example: ?filter[stageId]=DT31_5:N |
Parameterinclude (query) |
Typestring | Requiredno | Default— | DescriptionRelated records: contact, company, deal. For what the response contains, see the "Related data" section |
When limit > 50, the result set is paginated on the server side. The maximum for a single call is 5000 records. meta.hasMore shows whether there are records beyond the returned page, and meta.total shows how many match the filter in total.
Examples
curl — personal key
curl -g "https://vibecode.bitrix24.com/v1/invoices?limit=10&order[createdTime]=desc&filter[stageId]=DT31_5:N" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl -g "https://vibecode.bitrix24.com/v1/invoices?limit=10&order[createdTime]=desc&filter[stageId]=DT31_5:N" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN"
JavaScript — personal key
const params = new URLSearchParams({
limit: '10',
'order[createdTime]': 'desc',
'filter[stageId]': 'DT31_5:N',
})
const res = await fetch(`https://vibecode.bitrix24.com/v1/invoices?${params}`, {
headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})
const { success, data, meta } = await res.json()
console.log(`Found: ${meta.total}`)
JavaScript — OAuth application
const params = new URLSearchParams({
limit: '10',
'order[createdTime]': 'desc',
'filter[stageId]': 'DT31_5:N',
})
const res = await fetch(`https://vibecode.bitrix24.com/v1/invoices?${params}`, {
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const { success, data, meta } = await res.json()
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | DescriptionAlways true on success |
Fielddata |
Typearray | DescriptionArray of invoices. For all fields of an element, see Invoice fields |
Fieldmeta.total |
Typenumber | DescriptionTotal number of records matching the filter |
Fieldmeta.hasMore |
Typeboolean | DescriptionWhether there are more records beyond limit |
The card URL of any invoice from the data array is built from its id:
https://<portal>.bitrix24.com/crm/type/31/details/<id>/
31 — the entityTypeId of the smart invoice in Bitrix24. <portal> — the Bitrix24 portal domain. Access is restricted by the employee's permissions in Bitrix24.
Related data
The include parameter accepts three values — contact, company, and deal:
GET /v1/invoices?limit=10&include=contact,company,deal
The values are validated: any other value is rejected with 400 INVALID_INCLUDE, and the error message lists the allowed values. Each element of the data array gets an _included block with the contact, company, and deal objects referenced by contactId, companyId, and parentId2. When the invoice has no such reference, null takes the object's place:
{
"id": 3,
"contactId": 181,
"companyId": 73,
"parentId2": null,
"_included": {
"contact": { "id": 181 },
"company": { "id": 73 },
"deal": null
}
}
The objects in _included are shortened to id here — the response carries every field of the record. For a general description of the mechanism, see Related data.
Response example
Key fields are shown. For the full record, see Invoice fields.
{
"success": true,
"data": [
{
"id": 117,
"title": "Invoice for services",
"stageId": "DT31_5:N",
"categoryId": 5,
"contactId": 485,
"companyId": 0,
"opportunity": 1500,
"currencyId": "USD",
"assignedById": 1,
"createdBy": 1,
"createdTime": "2026-08-25T08:13:37.000Z",
"updatedTime": "2026-08-25T08:13:37.000Z"
},
{
"id": 113,
"title": "Equipment installation",
"stageId": "DT31_5:N",
"categoryId": 5,
"contactId": 42,
"companyId": 15,
"opportunity": 42000,
"currencyId": "USD",
"assignedById": 1,
"createdBy": 1,
"createdTime": "2026-08-19T11:02:14.000Z",
"updatedTime": "2026-08-20T09:41:05.000Z"
}
],
"meta": {
"total": 47,
"hasMore": true
}
}
Error response example
400 — filter on a field that does not exist:
{
"success": false,
"error": {
"code": "UNKNOWN_FILTER_FIELD",
"message": "Unknown filter field 'nosuchfield' for entity 'invoices'. Available: id, title, stageId, categoryId, assignedById, contactId, companyId, opportunity, currencyId, begindate, closedate, accountNumber, comments, mycompanyId, sourceId, sourceDescription, xmlId, opened, isManualOpportunity, isRecurring, createdBy, createdTime, updatedTime, updatedBy, movedBy, movedTime, previousStageId, lastCommunicationTime, lastCommunicationCallTime, lastCommunicationEmailTime, lastCommunicationImolTime, lastCommunicationWebformTime"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeUNKNOWN_FILTER_FIELD |
DescriptionFilter on a field the invoice does not have. The error text lists the allowed names |
| HTTP400 | CodeUNKNOWN_SORT_FIELD |
DescriptionSorting on a field the invoice does not have — in order or in the short sort form. The error text lists the allowed names |
| HTTP400 | CodeINVALID_INCLUDE |
Descriptioninclude carries a name the invoice does not have. The error text lists the allowed ones |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionAPI key lacks the crm scope |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionAPI key has no configured tokens |
| HTTP429 | CodeRATE_LIMITED |
DescriptionRate limit exceeded: 300 requests per minute per portal. All API keys of the portal share one limit. The current limit is returned in the x-ratelimit-limit header. Retry after the delay in the Retry-After header |
For the full list of common API errors, see Errors.
Known specifics
Custom fields arrive even when you do not request them. Without select, every record also carries the ufCrm_* fields configured on the Bitrix24 account — on an account with hundreds of them the response grows many times over. List the names you need in select, and only those remain in the response.