For AI agents: markdown of this page — /docs-content-en/entities/invoices/fields.md documentation index — /llms.txt
Invoice fields
GET /v1/invoices/fields
Returns a description of all invoice fields, including user fields (ufCrm_*).
Examples
curl — personal key
curl -X GET https://vibecode.bitrix24.com/v1/invoices/fields \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl -X GET https://vibecode.bitrix24.com/v1/invoices/fields \
-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/fields', {
headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})
const { success, data } = await res.json()
console.log('Fields:', Object.keys(data.fields).length)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/invoices/fields', {
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const { success, data } = await res.json()
Response fields
The label and description field captions are returned in English, while the ones the platform takes straight from the Bitrix24 account come in the account language. Request headers do not switch the language.
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | DescriptionAlways true on success |
Fielddata.fields |
Typeobject | DescriptionThe invoice field schema: field name → type, readonly, label, description. The standard fields are listed below, and the ufCrm_* user fields of this Bitrix24 account are added to them |
Fielddata.relations |
Typeobject | DescriptionRelated entities with the includable flag: contact, company, and deal |
Fielddata.products |
Typeobject | DescriptionProduct-row operations and their field schema. See Product fields |
Fielddata.aggregatable |
Typearray | DescriptionStandard fields allowed in the aggregation groupBy: opportunity, stageId, assignedById |
Fielddata.batch |
Typearray | DescriptionInvoice operations available in POST /v1/batch: create, update, delete |
Fielddata.import |
Typeobject | DescriptionMethod, path and maximum batch size for importing records |
Fielddata.include |
Typearray | DescriptionThe names the include parameter accepts |
Standard invoice fields
| Field | Type | Read-only | Description |
|---|---|---|---|
Fieldid |
Typenumber | Read-onlyyes | DescriptionInvoice ID |
Fieldtitle |
Typestring | Read-only | DescriptionInvoice title |
FieldstageId |
Typestring | Read-only | DescriptionStage. Format: DT31_{categoryId}:{stage}. Stage list: GET /v1/statuses?filter[entityId]=SMART_INVOICE_STAGE_{categoryId} — categoryId depends on the Bitrix24 account. To find it: GET /v1/invoices?limit=1&select=categoryId or ask your Bitrix24 account administrator |
FieldcategoryId |
Typenumber | Read-only | DescriptionFunnel ID |
FieldassignedById |
Typenumber | Read-only | DescriptionAssignee. List: GET /v1/users |
FieldcontactId |
Typenumber | Read-only | DescriptionPayer contact ID. Lookup: GET /v1/contacts |
FieldcompanyId |
Typenumber | Read-only | DescriptionPayer company ID. Lookup: GET /v1/companies |
FieldmycompanyId |
Typenumber | Read-only | DescriptionID of your own company (the seller) issuing the invoice. Lookup: GET /v1/companies |
Fieldopportunity |
Typenumber | Read-only | DescriptionInvoice total amount |
FieldcurrencyId |
Typestring | Read-only | DescriptionCurrency. List: GET /v1/currencies |
FieldtaxValue |
Typenumber | Read-onlyyes | DescriptionTax amount in the invoice currency; 0 when no tax applies. Computed by Bitrix24 from the product rows; a supplied value is not saved through any write endpoint, so the write is rejected. Set the tax through the product rows |
Fieldbegindate |
Typedatetime | Read-only | DescriptionInvoice start date |
Fieldclosedate |
Typedatetime | Read-only | DescriptionInvoice closing date |
FieldaccountNumber |
Typestring | Read-only | DescriptionPrintable invoice number |
Fieldcomments |
Typestring | Read-only | DescriptionFree-text comment |
FieldsourceId |
Typestring | Read-only | DescriptionSource. List: GET /v1/statuses?filter[entityId]=SOURCE |
FieldsourceDescription |
Typestring | Read-only | DescriptionFree-text description of the source |
FieldutmSource |
Typestring | Read-onlyyes | DescriptionTraffic source (utm_source of the advertising campaign). Set by Bitrix24; null when absent. A supplied value is not saved, and the write is rejected. An explicit select in list or search requests does not return this field (see below) |
FieldutmMedium |
Typestring | Read-onlyyes | DescriptionTraffic type of the advertising campaign (utm_medium): cpc, banner, email and so on. Set by Bitrix24; null when absent |
FieldutmCampaign |
Typestring | Read-onlyyes | DescriptionAdvertising campaign name (utm_campaign). Set by Bitrix24; null when absent |
FieldutmContent |
Typestring | Read-onlyyes | DescriptionAdvertising campaign content (utm_content). Set by Bitrix24; null when absent |
FieldutmTerm |
Typestring | Read-onlyyes | DescriptionSearch phrase of the advertising campaign (utm_term). Set by Bitrix24; null when absent |
FieldxmlId |
Typestring | Read-only | DescriptionExternal identifier for integration mapping |
Fieldopened |
Typeboolean | Read-only | DescriptionWhether the invoice is visible to all employees, not only the assignee |
FieldisManualOpportunity |
Typeboolean | Read-only | DescriptionManual amount mode |
FieldisRecurring |
Typeboolean | Read-only | DescriptionRecurring invoice template |
Fieldobservers |
Typearray | Read-only | DescriptionObservers (user IDs). List: GET /v1/users. Send the full list: an update replaces the entire set rather than adding to it; an empty list clears the observers on PATCH /v1/invoices/{id} — the batch endpoints do not support empty lists and reject them: the entity batch with 400 BATCH_ITEM_VALIDATION, the global batch with INVALID_PARAMS under the call in data.errors |
FieldcontactIds |
Typearray | Read-only | DescriptionAll linked contacts (IDs). Lookup: GET /v1/contacts. Send the full list: an update replaces all links rather than adding to them; an empty list clears the bindings on PATCH /v1/invoices/{id} — the batch endpoints do not support empty lists and reject them: the entity batch with 400 BATCH_ITEM_VALIDATION, the global batch with INVALID_PARAMS under the call in data.errors |
Fieldcontacts |
Typearray | Read-onlyyes | DescriptionNot returned (notReturned: true): the Bitrix24 item API never returns this key for invoices, although the live Bitrix24 metadata lists it. Declared so that write attempts receive a clear validation error instead of a raw Bitrix24 error (create and update — 400 READONLY_FIELD, import — 400 IMPORT_ITEM_VALIDATION, entity batch — 400 BATCH_ITEM_VALIDATION, global batch — READONLY_FIELD under the call); in select it yields an UNKNOWN_SELECT_FIELD warning and no value. The linked contacts are in contactIds |
FieldlocationId |
Typestring | Read-only | DescriptionLocation identifier (Bitrix24 type location). Bitrix24 stores the sent string as is; null when unset |
FieldwebformId |
Typenumber | Read-only | DescriptionID of the CRM form that created the invoice. Writable on invoices: a sent value is stored and read back |
FieldparentId2 |
Typecrm_entity | Read-only | DescriptionRelated deal. Lookup: GET /v1/deals |
FieldparentId7 |
Typecrm_entity | Read-only | DescriptionRelated quote. Lookup: GET /v1/quotes |
FieldcreatedBy |
Typenumber | Read-onlyyes | DescriptionCreator ID |
FieldcreatedTime |
Typedatetime | Read-onlyyes | DescriptionCreation date |
FieldupdatedBy |
Typenumber | Read-onlyyes | DescriptionID of the employee who last changed the invoice |
FieldupdatedTime |
Typedatetime | Read-onlyyes | DescriptionModification date |
FieldmovedBy |
Typenumber | Read-onlyyes | DescriptionID of the employee who last changed the stage |
FieldmovedTime |
Typedatetime | Read-onlyyes | DescriptionDate of the last stage change |
FieldpreviousStageId |
Typestring | Read-onlyyes | DescriptionThe stage before the current one |
FieldlastActivityBy |
Typenumber | Read-onlyyes | DescriptionAuthor of the last timeline activity; set by Bitrix24, a supplied value is not saved through any write endpoint, so the write is rejected. Lookup: GET /v1/users |
FieldlastActivityTime |
Typedatetime | Read-onlyyes | DescriptionDate and time of the last activity on the invoice; set by Bitrix24. Returned in UTC like every other date of the record. Not accepted in filter or order (see below) |
FieldlastCommunicationTime |
Typedatetime | Read-onlyyes | DescriptionDate of the last communication on any channel |
FieldlastCommunicationCallTime |
Typedatetime | Read-onlyyes | DescriptionDate of the last call |
FieldlastCommunicationEmailTime |
Typedatetime | Read-onlyyes | DescriptionDate of the last email |
FieldlastCommunicationImolTime |
Typedatetime | Read-onlyyes | DescriptionDate of the last Open Channel communication |
FieldlastCommunicationWebformTime |
Typedatetime | Read-onlyyes | DescriptionDate of the last web-form communication |
User fields (ufCrm_*) come back alongside the standard ones and are writable. Their set and count depend on the Bitrix24 account, so the table does not list them — read the live response.
Not every field in the table is accepted in filter and order. Twelve of them — taxValue, observers, contactIds, locationId, webformId, lastActivityBy, lastActivityTime, utmSource, utmMedium, utmCampaign, utmContent, utmTerm — arrive in the response, but return 400 UNKNOWN_FILTER_FIELD in a filter and 400 UNKNOWN_SORT_FIELD in a sort; the not-returned contacts is refused the same way. The first seven fields are supported in select by every read endpoint; the five utm* arrive only in the full record (no select) and in GET /v1/invoices/{id} — in an explicit select on list or search Bitrix24 ignores their names, and the rows carry no such keys. The relation fields parentId2 and parentId7 are accepted in a filter but not in a sort. For those two axes, take the names from the error message rather than from the table above — the error lists the ones that are accepted.
Response example
{
"success": true,
"data": {
"fields": {
"id": { "type": "number", "readonly": true, "label": "ID", "description": "Unique numeric identifier of the invoice." },
"title": { "type": "string", "readonly": false, "label": "Title", "description": "Invoice title." },
"assignedById": { "type": "number", "readonly": false, "label": "Assignee", "description": "ID of the responsible user. List: GET /v1/users." }
},
"relations": {
"contact": { "type": "one", "entity": "contacts", "includable": true },
"company": { "type": "one", "entity": "companies", "includable": true },
"deal": { "type": "one", "entity": "deals", "includable": true }
},
"aggregatable": ["opportunity", "stageId", "assignedById"],
"batch": ["create", "update", "delete"],
"import": { "method": "POST", "path": "/v1/invoices/import", "maxItems": 100 },
"include": ["contact", "company", "deal"]
}
}
Three fields from data.fields are shown, along with the other data keys. The data.products block is omitted from the example, and the full set of fields is in the tables above.
The deal relation reads the deal ID from the invoice's dynamic parentId2 field. The field comes from live metadata for the Bitrix24 account and may be absent from data.fields when the response contains a fields_partial warning.
What to do with the names from data.include is covered on the Get invoice page.
Error response example
403 — the key lacks the required scope:
{
"success": false,
"error": {
"code": "SCOPE_DENIED",
"message": "This endpoint requires 'crm' scope"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe API key lacks the crm scope |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe API key has no configured tokens |
| HTTP429 | CodeRATE_LIMITED |
DescriptionRate limit exceeded: 300 requests per minute per portal. All API keys of the account 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.