For AI agents: markdown of this page — /docs-content-en/entities/invoices/get.md documentation index — /llms.txt
Get invoice
GET /v1/invoices/:id
Returns an invoice by ID with all fields, including user fields.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
Parameterid (path) |
Typenumber | Requiredyes | DescriptionInvoice ID |
Parameterinclude (query) |
Typestring | Requiredno | DescriptionRelated records: contact, company, deal. See the "Related data" section for what the response contains |
Parameterselect (query) |
Typestring | Requiredno | DescriptionField selection: ?select=id,title,stageId |
Examples
curl — personal key
curl -X GET "https://vibecode.bitrix24.com/v1/invoices/117" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl -X GET "https://vibecode.bitrix24.com/v1/invoices/117" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN"
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/invoices/117', {
headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})
const { success, data } = await res.json()
console.log('Retrieved:', data.id)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/invoices/117', {
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const { success, data } = await res.json()
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | DescriptionAlways true on success |
Fielddata |
Typeobject | DescriptionThe invoice in full. For every field see Invoice fields |
Related data
The parameter accepts three values — contact, company, and deal:
GET /v1/invoices/117?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. When contactId, companyId, and parentId2 are set, the response includes an _included block with the contact, company, and deal objects (or null if the corresponding reference is empty).
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": 73,
"parentId2": 40,
"opportunity": 1500,
"currencyId": "USD",
"assignedById": 1,
"createdBy": 1,
"createdTime": "2026-08-25T08:13:37.000Z",
"updatedTime": "2026-08-25T08:13:37.000Z",
"_included": {
"contact": { "id": 485 },
"company": { "id": 73 },
"deal": { "id": 40 }
}
}
}
Error response example
404 — invoice not found:
{
"success": false,
"error": {
"code": "ENTITY_NOT_FOUND",
"message": "Item not found"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP404 | CodeENTITY_NOT_FOUND |
DescriptionInvoice with the specified ID not found |
| HTTP400 | CodeINVALID_PARAMS |
DescriptionThe id in the URL is not a non-negative integer |
| 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 |
Full list of common API errors — Errors.