[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Finvoices\u002Fget":3,"docs-tabs-entities\u002Finvoices\u002Fget":6},{"content":4,"lastmod":5},"\n## Get invoice\n\n`GET \u002Fv1\u002Finvoices\u002F:id`\n\nReturns an invoice by ID with all fields, including user fields.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `id` (path) | number | yes | Invoice ID |\n| `include` (query) | string | no | Related records: `contact`, `company`, `deal`. See the \"Related data\" section for what the response contains |\n| `select` (query) | string | no | Field selection: `?select=id,title,stageId` |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X GET \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Finvoices\u002F117\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X GET \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Finvoices\u002F117\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\"\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Finvoices\u002F117', {\n  headers: { 'X-Api-Key': 'YOUR_API_KEY' },\n})\n\nconst { success, data } = await res.json()\nconsole.log('Retrieved:', data.id)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Finvoices\u002F117', {\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n  },\n})\n\nconst { success, data } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | Always `true` on success |\n| `data` | object | The invoice in full. For every field see [Invoice fields](\u002Fdocs\u002Fentities\u002Finvoices\u002Ffields) |\n\n## Related data\n\nThe parameter accepts three values — `contact`, `company`, and `deal`:\n\n```\nGET \u002Fv1\u002Finvoices\u002F117?include=contact,company,deal\n```\n\nThe 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).\n\nFor a general description of the mechanism, see [Related data](\u002Fdocs\u002Fincludes).\n\n## Response example\n\nKey fields are shown. For the full record see [Invoice fields](\u002Fdocs\u002Fentities\u002Finvoices\u002Ffields).\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"id\": 117,\n    \"title\": \"Invoice for services\",\n    \"stageId\": \"DT31_5:N\",\n    \"categoryId\": 5,\n    \"contactId\": 485,\n    \"companyId\": 73,\n    \"parentId2\": 40,\n    \"opportunity\": 1500,\n    \"currencyId\": \"USD\",\n    \"assignedById\": 1,\n    \"createdBy\": 1,\n    \"createdTime\": \"2026-08-25T08:13:37.000Z\",\n    \"updatedTime\": \"2026-08-25T08:13:37.000Z\",\n    \"_included\": {\n      \"contact\": { \"id\": 485 },\n      \"company\": { \"id\": 73 },\n      \"deal\": { \"id\": 40 }\n    }\n  }\n}\n```\n\n## Error response example\n\n404 — invoice not found:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"ENTITY_NOT_FOUND\",\n    \"message\": \"Item not found\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 404 | `ENTITY_NOT_FOUND` | Invoice with the specified ID not found |\n| 400 | `INVALID_PARAMS` | The `id` in the URL is not a non-negative integer |\n| 400 | `INVALID_INCLUDE` | `include` carries a name the invoice does not have. The error text lists the allowed ones |\n| 403 | `SCOPE_DENIED` | API key lacks the `crm` scope |\n| 401 | `TOKEN_MISSING` | API key has no configured tokens |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## See also\n\n- [Working with files in CRM fields](\u002Fdocs\u002Frecipes\u002Fcrm-files)\n- [List invoices](\u002Fdocs\u002Fentities\u002Finvoices\u002Flist)\n- [Update invoice](\u002Fdocs\u002Fentities\u002Finvoices\u002Fupdate)\n- [Contacts](\u002Fdocs\u002Fentities\u002Fcontacts)\n- [Companies](\u002Fdocs\u002Fentities\u002Fcompanies)\n- [Entity API](\u002Fdocs\u002Fentity-api)\n","2026-09-22",{},1794739381176]