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. Supports including related entities via include.
Request parameters
| Parameter | Type | Description |
|---|---|---|
id |
number | Invoice ID (in the URL) |
Examples
curl — personal key
curl -X GET "https://vibecode.bitrix24.com/v1/invoices/891" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl -X GET "https://vibecode.bitrix24.com/v1/invoices/891" \
-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/891', {
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/891', {
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const { success, data } = await res.json()
More about includes: Related data.
Response fields
| Field | Type | Description |
|---|---|---|
id |
number | Invoice ID |
title |
string | Title |
stageId |
string | Stage |
categoryId |
number | Pipeline ID |
contactId |
number | Contact ID |
companyId |
number | Company ID |
opportunity |
number | Amount |
currencyId |
string | Currency |
assignedById |
number | Assignee |
createdBy |
number | Creator |
createdTime |
datetime | Creation date |
updatedTime |
datetime | Modification date |
_included |
object | Related entities (with include) |
Related data
(include)
GET /v1/invoices/1?include=contact,company
Available includes: contact, company. Result in the _included field.
Response example
{
"success": true,
"data": {
"id": 891,
"title": "Invoice for services",
"stageId": "DT31_5:N",
"categoryId": 5,
"contactId": 42,
"companyId": 15,
"opportunity": 150000,
"currencyId": "USD",
"assignedById": 1,
"createdBy": 1,
"createdTime": "2026-04-15T14:30:00+00:00",
"updatedTime": "2026-04-15T14:30:00+00:00",
"_included": {
"contact": {
"id": 42,
"name": "John",
"lastName": "Brown"
},
"company": {
"id": 15,
"title": "Acme LLC"
}
}
}
}
Error response example
404 — invoice not found:
{
"success": false,
"error": {
"code": "ENTITY_NOT_FOUND",
"message": "Item not found"
}
}
More about includes: Related data.
Errors
| HTTP | Code | Description |
|---|---|---|
| 404 | ENTITY_NOT_FOUND |
Invoice with the specified ID not found |
| 403 | SCOPE_DENIED |
API key lacks the crm scope |
| 401 | TOKEN_MISSING |
API key has no configured tokens |
Full list of common API errors — Errors.
See also
- Working with files in CRM fields
- List invoices — retrieval with filters
- Update invoice — modifying fields
- Contacts — contact data via
include - Companies — company data via
include - Entity API — general principles