For AI agents: markdown of this page — /docs-content-en/entities/catalog-documents/update.md documentation index — /llms.txt
Update an inventory document
PATCH /v1/catalog-documents/:id
Changes the header fields of an inventory document that is not yet conducted.
Pass only the fields to change, flat at the JSON root, without a fields wrapper.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
Parameterid (path) |
Typenumber | Requiredyes | DescriptionDocument ID. List: GET /v1/catalog-documents |
Request fields (body)
| Field | Type | Required | Description |
|---|---|---|---|
FieldresponsibleId |
Typenumber | Requiredno | DescriptionResponsible employee. List: GET /v1/users |
Fieldtitle |
Typestring | Requiredno | DescriptionDocument title |
FielddocNumber |
Typestring | Requiredno | DescriptionDocument number |
Fieldcommentary |
Typestring | Requiredno | DescriptionComment |
FielddateDocument |
Typedatetime | Requiredno | DescriptionDocument date |
Fieldtotal |
Typenumber | Requiredno | DescriptionDocument total. Not calculated from the document items: the field holds the passed value |
FieldsiteId |
Typestring | Requiredno | DescriptionBitrix24 site ID |
FieldmodifiedBy |
Typenumber | Requiredno | DescriptionEmployee who last modified the document. List: GET /v1/users |
FieldstatusBy |
Typenumber | Requiredno | DescriptionEmployee who last changed the conducting status. List: GET /v1/users |
FielddateModify |
Typedatetime | Requiredno | DescriptionLast modification date |
Examples
curl — personal key
curl -X PATCH "https://vibecode.bitrix24.com/v1/catalog-documents/299" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Stock correction — warehouse 11",
"commentary": "Recount after stocktaking"
}'
curl — OAuth application
curl -X PATCH "https://vibecode.bitrix24.com/v1/catalog-documents/299" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Stock correction — warehouse 11",
"commentary": "Recount after stocktaking"
}'
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/catalog-documents/299', {
method: 'PATCH',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
title: 'Stock correction — warehouse 11',
commentary: 'Recount after stocktaking',
}),
})
const { success, data } = await res.json()
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/catalog-documents/299', {
method: 'PATCH',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
title: 'Stock correction — warehouse 11',
commentary: 'Recount after stocktaking',
}),
})
const { success, data } = await res.json()
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | Descriptiontrue on successful update |
Fielddata |
Typeobject | DescriptionThe full document after the update. All fields — Inventory document fields |
Fielddata.dateModify |
Typedatetime | DescriptionModification date, ISO 8601 in UTC |
Fieldmeta.warnings |
Typearray | DescriptionReturned only if the body contains a field that is not among the document fields. Each item has code: "UNRECOGNIZED_WRITE_FIELD", field with the field name, and message. On a route that wraps the field map itself, an object under fields is rejected with 400 NESTED_FIELDS_ENVELOPE when the schema does not declare fields; pass fields flat at the JSON root. |
Response example
{
"success": true,
"data": {
"commentary": "Recount after stocktaking",
"createdBy": 1,
"currency": "USD",
"dateCreate": "2026-10-12T13:20:16.000Z",
"dateDocument": null,
"dateModify": "2026-10-12T13:20:23.000Z",
"dateStatus": "2026-10-12T13:20:16.000Z",
"docNumber": null,
"docType": "S",
"id": 299,
"modifiedBy": 1,
"responsibleId": 1,
"siteId": "s1",
"status": "N",
"statusBy": null,
"title": "Stock correction — warehouse 11",
"total": null
}
}
Error response example
422 — the document is conducted:
{
"success": false,
"error": {
"code": "BITRIX_ERROR",
"message": "Cannot modify a conducted document",
"b24Code": "0"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP404 | CodeENTITY_NOT_FOUND |
DescriptionNo document with this id |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionThe document is conducted — message Cannot modify a conducted document. Cancel conducting first |
| HTTP400 | CodeREADONLY_FIELD |
DescriptionThe body contains a field that cannot be changed: docType, currency, createdBy, status, id, dateCreate, dateStatus. The field name is in error.message |
| HTTP400 | CodeEMPTY_UPDATE_BODY |
DescriptionThe request body is empty |
| HTTP400 | CodeNO_RECOGNIZED_UPDATE_FIELDS |
DescriptionThe body contains no updatable field, including when the fields are wrapped in fields |
| HTTP400 | CodeINVALID_PARAMS |
Descriptionid in the path is not a non-negative integer |
| HTTP400 | CodeINVALID_PARAMS |
DescriptionThe field value has the wrong type: a non-numeric string in a numeric field, for example "total": "abc", or an object or array instead of a number or string. The field name is in error.message |
| HTTP403 | CodeWRITE_BLOCKED_READONLY_KEY |
DescriptionThe key works in read-only mode |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe API key does not have the catalog scope |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe API key has no configured tokens |
| HTTP401 | CodeMISSING_API_KEY |
DescriptionThe X-Api-Key header is not passed |
| HTTP401 | CodeINVALID_API_KEY |
DescriptionThe passed API key is not found |
Full list of common API errors — Errors.