[{"data":1,"prerenderedAt":16},["ShallowReactive",2],{"docs-entities\u002Fcatalog-documents":3,"docs-tabs-entities\u002Fcatalog-documents":6},{"content":4,"lastmod":5},"# Inventory documents\n\nInventory management documents: goods receipt, stock adjustment, transfer between warehouses, return and write-off. A document is a header with a type, a currency and a responsible user. Products and warehouses are set by its [items](.\u002Fcatalog-document-elements.md). Warehouse stock changes when the document is conducted and reverts when conducting is canceled.\n\nBitrix24 API: `catalog.document.*`\nScope: `catalog`\n\n## Operations\n\n- [Create an inventory document](.\u002Fcatalog-documents\u002Fcreate.md) — `POST \u002Fv1\u002Fcatalog-documents`\n- [List inventory documents](.\u002Fcatalog-documents\u002Flist.md) — `GET \u002Fv1\u002Fcatalog-documents`\n- [Get an inventory document](.\u002Fcatalog-documents\u002Fget.md) — `GET \u002Fv1\u002Fcatalog-documents\u002F:id`\n- [Update an inventory document](.\u002Fcatalog-documents\u002Fupdate.md) — `PATCH \u002Fv1\u002Fcatalog-documents\u002F:id`\n- [Delete an inventory document](.\u002Fcatalog-documents\u002Fdelete.md) — `DELETE \u002Fv1\u002Fcatalog-documents\u002F:id`\n- [Search inventory documents](.\u002Fcatalog-documents\u002Fsearch.md) — `POST \u002Fv1\u002Fcatalog-documents\u002Fsearch`\n- [Inventory document fields](.\u002Fcatalog-documents\u002Ffields.md) — `GET \u002Fv1\u002Fcatalog-documents\u002Ffields`\n- [Conduct a document](.\u002Fcatalog-documents\u002Fconduct.md) — `POST \u002Fv1\u002Fcatalog-documents\u002F:id\u002Fconduct`\n- [Cancel conducting](.\u002Fcatalog-documents\u002Fcancel.md) — `POST \u002Fv1\u002Fcatalog-documents\u002F:id\u002Fcancel`\n\n## Key fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `id` | number | Document ID (read-only) |\n| `docType` | string | Document type: `A` — goods receipt, `S` — stock adjustment, `M` — transfer, `R` — return, `D` — write-off. Set only on creation |\n| `currency` | string | Document currency. Set only on creation. Currency list — [`GET \u002Fv1\u002Fcurrencies`](\u002Fdocs\u002Fentities\u002Fcurrencies\u002Flist) |\n| `responsibleId` | number | Responsible user — an ID from [`GET \u002Fv1\u002Fusers`](\u002Fdocs\u002Fentities\u002Fusers\u002Flist) |\n| `status` | string | Conducting status: `Y` — conducted, `N` — not conducted. Read-only, changed by the [conduct](.\u002Fcatalog-documents\u002Fconduct.md) and [cancel conducting](.\u002Fcatalog-documents\u002Fcancel.md) actions |\n| `title` | string | Document title |\n| `docNumber` | string | Document number |\n| `dateDocument` | datetime | Document date |\n| `dateCreate` | datetime | Creation date (read-only) |\n\nFull field list — [`GET \u002Fv1\u002Fcatalog-documents\u002Ffields`](.\u002Fcatalog-documents\u002Ffields.md).\n\n## Before you start\n\n1. **The request body is flat.** On create and update, pass fields at the JSON root: `{\"docType\": \"S\", \"currency\": \"USD\", \"responsibleId\": 1}`. No `fields` wrapper is needed.\n2. **Three fields are required for creation:** `docType`, `currency` and `responsibleId`. `docType` and `currency` cannot change after creation: an update request with them returns `400 READONLY_FIELD`.\n3. **Five document types are supported:** `A`, `S`, `M`, `R`, `D`. Other type codes are rejected with `422 BITRIX_ERROR`.\n4. **A document has two states.** A new document is not conducted (`status: \"N\"`): you can change and delete the document and add and edit its items. After [conducting](.\u002Fcatalog-documents\u002Fconduct.md) (`status: \"Y\"`), changing or deleting the document and its items is rejected with `422 BITRIX_ERROR`. To edit the document again, [cancel conducting](.\u002Fcatalog-documents\u002Fcancel.md).\n5. **Warehouses are checked on conducting.** An item with warehouses that do not fit the document type is created without an error, but conducting the document is rejected with `422 BITRIX_ERROR`. Which warehouses each type needs — [Inventory document items](.\u002Fcatalog-document-elements.md).\n6. **A goods receipt (`A`) is conducted only with a supplier specified.** The document fields have no supplier, so conducting a goods receipt created through the API is rejected with `422 BITRIX_ERROR` \"Supplier is not specified\". A stock adjustment (`S`) does not require a supplier.\n7. **Deleting a document deletes its items.** After `DELETE \u002Fv1\u002Fcatalog-documents\u002F:id`, the items of this document no longer exist.\n8. **Dates are returned in ISO 8601 UTC:** `2026-10-12T13:20:16.000Z`.\n\n## Related entities\n\n| Entity | Endpoint | Purpose |\n|----------|----------|-----------|\n| Inventory document items | [`GET \u002Fv1\u002Fcatalog-document-elements?filter[docId]=:id`](\u002Fdocs\u002Fentities\u002Fcatalog-document-elements\u002Flist) | Products of the document: quantity, purchase price, source and destination warehouses. |\n| Warehouses | [`GET \u002Fv1\u002Fwarehouses`](\u002Fdocs\u002Fentities\u002Fwarehouses\u002Flist) | Warehouses for the `storeFrom` and `storeTo` item fields. Stock after conducting — [`GET \u002Fv1\u002Fwarehouses\u002F:id\u002Fstock`](\u002Fdocs\u002Fentities\u002Fwarehouses\u002Fstock). |\n| Catalog products | [`GET \u002Fv1\u002Fcatalog-products`](\u002Fdocs\u002Fentities\u002Fcatalog-products\u002Flist) | Products for the `elementId` item field. |\n\n## Typical scenario\n\nAdding products to a warehouse with a stock adjustment:\n\n1. Pick a warehouse: [`GET \u002Fv1\u002Fwarehouses`](\u002Fdocs\u002Fentities\u002Fwarehouses\u002Flist) — take the warehouse `id`.\n2. Create a stock adjustment document: [`POST \u002Fv1\u002Fcatalog-documents`](.\u002Fcatalog-documents\u002Fcreate.md) with `docType: \"S\"`, `currency` and `responsibleId`.\n3. Add products: [`POST \u002Fv1\u002Fcatalog-document-elements`](\u002Fdocs\u002Fentities\u002Fcatalog-document-elements\u002Fcreate) — one item per product with `docId`, `elementId`, `amount` and `storeTo`.\n4. Conduct the document: [`POST \u002Fv1\u002Fcatalog-documents\u002F:id\u002Fconduct`](.\u002Fcatalog-documents\u002Fconduct.md).\n5. Check the stock: [`GET \u002Fv1\u002Fwarehouses\u002F:id\u002Fstock`](\u002Fdocs\u002Fentities\u002Fwarehouses\u002Fstock).\n\n## Limits\n\n| Limit | Value |\n|-------|----------|\n| Maximum records per request | 5000 (`limit ≤ 5000`) |\n| Automatic pagination | enabled when `limit > 50` |\n| `offset` on large result sets | `limit ≤ 500` is recommended when `offset ≥ 2500` |\n| Batch requests | up to 50 operations in [`POST \u002Fv1\u002Fbatch`](\u002Fdocs\u002Fbatch) |\n| Request rate | shared across the Vibecode API — see [Limits and optimization](\u002Fdocs\u002Foptimization) |\n\n## See also\n\n- [Inventory document items](.\u002Fcatalog-document-elements.md)\n- [Warehouses](.\u002Fwarehouses.md)\n- [Catalog products](.\u002Fcatalog-products.md)\n- [Filtering syntax](\u002Fdocs\u002Ffiltering)\n- [Batch](\u002Fdocs\u002Fbatch)\n- [API reference](\u002Fdocs\u002Fapi-reference)\n","2026-10-13",{"catalog-documents\u002Fcreate.md":7,"catalog-documents\u002Flist.md":8,"catalog-documents\u002Fget.md":9,"catalog-documents\u002Fupdate.md":10,"catalog-documents\u002Fdelete.md":11,"catalog-documents\u002Fsearch.md":12,"catalog-documents\u002Ffields.md":13,"catalog-documents\u002Fconduct.md":14,"catalog-documents\u002Fcancel.md":15},"## Create an inventory document\n\n`POST \u002Fv1\u002Fcatalog-documents`\n\nCreates an inventory document — the header of a receipt, stock adjustment, transfer, return or write-off.\n\nFields are passed flat at the JSON root, without a `fields` wrapper.\n\n## Request fields (body)\n\n| Field | Type | Required | Description |\n|------|-----|:-----:|---------|\n| `docType` | string | yes | Document type: `A` — receipt, `S` — stock adjustment, `M` — transfer, `R` — return, `D` — write-off. Cannot be changed after creation. More on the types — [Inventory documents](\u002Fdocs\u002Fentities\u002Fcatalog-documents) |\n| `currency` | string | yes | Document currency. Cannot be changed after creation. List: [`GET \u002Fv1\u002Fcurrencies`](\u002Fdocs\u002Fentities\u002Fcurrencies\u002Flist) |\n| `responsibleId` | number | yes | Responsible employee. List: [`GET \u002Fv1\u002Fusers`](\u002Fdocs\u002Fentities\u002Fusers\u002Flist) |\n| `title` | string | no | Document title |\n| `docNumber` | string | no | Document number |\n| `commentary` | string | no | Comment |\n| `dateDocument` | datetime | no | Document date |\n| `total` | number | no | Document total. Not calculated from the document items: after conducting, the field holds the passed value or `null` |\n| `siteId` | string | no | Bitrix24 site ID. If omitted at creation, `s1` is used |\n| `createdBy` | number | no | Employee who created the document. Cannot be changed after creation. List: [`GET \u002Fv1\u002Fusers`](\u002Fdocs\u002Fentities\u002Fusers\u002Flist) |\n| `modifiedBy` | number | no | Employee who last modified the document. List: [`GET \u002Fv1\u002Fusers`](\u002Fdocs\u002Fentities\u002Fusers\u002Flist) |\n| `statusBy` | number | no | Employee who last changed the conducting status. List: [`GET \u002Fv1\u002Fusers`](\u002Fdocs\u002Fentities\u002Fusers\u002Flist) |\n| `dateModify` | datetime | no | Last modification date |\n\nFull field list — [`GET \u002Fv1\u002Fcatalog-documents\u002Ffields`](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Ffields).\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"docType\": \"S\",\n    \"currency\": \"USD\",\n    \"responsibleId\": 1,\n    \"title\": \"Stock correction — documentation check\"\n  }'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"docType\": \"S\",\n    \"currency\": \"USD\",\n    \"responsibleId\": 1,\n    \"title\": \"Stock correction — documentation check\"\n  }'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    docType: 'S',\n    currency: 'USD',\n    responsibleId: 1,\n    title: 'Stock correction — documentation check',\n  }),\n})\n\nconst { success, data } = await res.json()\nconsole.log('Document ID:', data.id)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    docType: 'S',\n    currency: 'USD',\n    responsibleId: 1,\n    title: 'Stock correction — documentation check',\n  }),\n})\n\nconst { success, data } = await res.json()\n```\n\n## Response fields\n\nHTTP status `201 Created`.\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | `true` on successful creation |\n| `data` | object | The created document. All fields — [Inventory document fields](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Ffields) |\n| `data.id` | number | ID of the created document |\n| `data.status` | string | Conducting status. A new document always has `N` — not conducted |\n| `data.dateCreate` | datetime | Creation date, ISO 8601 in UTC |\n| `data.dateStatus` | datetime | Date of the last status change. For a new document it equals `dateCreate` |\n| `data.dateModify` | datetime | Last modification date |\n| `meta.warnings` | array | Returned 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. |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"commentary\": null,\n    \"createdBy\": 1,\n    \"currency\": \"USD\",\n    \"dateCreate\": \"2026-10-12T13:20:16.000Z\",\n    \"dateDocument\": null,\n    \"dateModify\": \"2026-10-12T13:20:16.000Z\",\n    \"dateStatus\": \"2026-10-12T13:20:16.000Z\",\n    \"docNumber\": null,\n    \"docType\": \"S\",\n    \"id\": 299,\n    \"modifiedBy\": 1,\n    \"responsibleId\": 1,\n    \"siteId\": \"s1\",\n    \"status\": \"N\",\n    \"statusBy\": null,\n    \"title\": \"Stock correction — documentation check\",\n    \"total\": null\n  }\n}\n```\n\n## Error response example\n\n400 — a required field is missing:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"MISSING_REQUIRED_FIELDS\",\n    \"message\": \"Body field \\\"currency\\\" is required to create catalogDocument.\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 400 | `MISSING_REQUIRED_FIELDS` | One of the fields `docType`, `currency`, `responsibleId` is missing. The field name is in `error.message` |\n| 400 | `READONLY_FIELD` | A system-set field is passed: `id`, `status`, `dateStatus`, `dateCreate` |\n| 400 | `INVALID_PARAMS` | The field value has the wrong type: a non-numeric string in a numeric field, for example `\"responsibleId\": \"abc\"`, or an object or array instead of a number or string. The field name is in `error.message` |\n| 422 | `BITRIX_ERROR` | `docType` contains a code that is not one of the five types. Message `DOC_TYPE isn't available` |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key works in read-only mode |\n| 403 | `SCOPE_DENIED` | The API key does not have the `catalog` scope |\n| 401 | `TOKEN_MISSING` | The API key has no configured tokens |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is not passed |\n| 401 | `INVALID_API_KEY` | The passed API key is not found |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## See also\n\n- [Inventory documents](\u002Fdocs\u002Fentities\u002Fcatalog-documents)\n- [Update an inventory document](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Fupdate)\n- [Conduct an inventory document](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Fconduct)\n- [Inventory document fields](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Ffields)\n- [Create an inventory document item](\u002Fdocs\u002Fentities\u002Fcatalog-document-elements\u002Fcreate)\n- [Batch](\u002Fdocs\u002Fbatch)\n","## List inventory documents\n\n`GET \u002Fv1\u002Fcatalog-documents`\n\nReturns the Bitrix24 account's inventory documents with filtering, sorting and pagination. Use it to find documents of a given type or conducting status before working with their items.\n\n## Parameters\n\n| Parameter | Type | Default | Description |\n|----------|-----|-----------|---------|\n| `filter` (query) | object | — | Filtering by the fields of `GET \u002Fv1\u002Fcatalog-documents\u002Ffields`.\u003Cbr>[Filtering syntax](\u002Fdocs\u002Ffiltering). Example: `?filter[docType]=S&filter[status]=N` |\n| `select` (query) | string | — | Comma-separated fields in the response: `?select=id,title,docType,status`. Field names come from [`GET \u002Fv1\u002Fcatalog-documents\u002Ffields`](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Ffields) |\n| `order` (query) | object | — | Sorting: `?order[id]=desc`. Short form — `?sort=-id`, where a leading minus means descending. Without the parameter, documents are sorted by `id` ascending |\n| `limit` (query) | number | `50` | Number of records, from 1 to 5000. A value above 5000 is capped at 5000, a non-numeric value is replaced with `50` |\n| `offset` (query) | number | `0` | How many records to skip. The offset counts records: `offset=7` starts the output at the eighth document |\n| `withTotal` (query) | string | — | `true` or `false`. The exact value `false` omits `meta.total`, but Bitrix24 still counts the documents, so this option does not make the request cheaper. Without it or with `true`, the existing counted behavior applies |\n\n**Pagination.** When `limit > 50`, Vibecode assembles the response from several pages automatically. To walk the whole result set, increase `offset` by `limit` while `meta.hasMore` is `true`.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents?limit=2\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents?limit=2\" \\\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\u002Fcatalog-documents?limit=2', {\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n  },\n})\n\nconst { success, data, meta } = await res.json()\nconsole.log(`Documents matching the filter: ${meta.total}`)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents?limit=2', {\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n  },\n})\n\nconst { success, data, meta } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | Always `true` on success |\n| `data` | array | Array of inventory documents (all fields — see [Inventory document fields](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Ffields)) |\n| `meta.total` | number | Total number of documents matching the filter. Optional: absent when `withTotal=false` |\n| `meta.hasMore` | boolean | Whether there are more documents beyond `limit` |\n| `meta.warnings` | array | Request warnings. Returned when `select` contains a name that is not among the document fields: code `UNKNOWN_SELECT_FIELD`, the name in the `field` field. The request still runs and the other fields are returned |\n\nThe document's products and warehouses are not included in the response — the [item list](\u002Fdocs\u002Fentities\u002Fcatalog-document-elements\u002Flist) with `filter[docId]` returns them.\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"commentary\": null,\n      \"createdBy\": 1,\n      \"currency\": \"USD\",\n      \"dateCreate\": \"2025-01-10T11:49:37.000Z\",\n      \"dateDocument\": null,\n      \"dateModify\": \"2025-01-10T11:49:59.000Z\",\n      \"dateStatus\": \"2025-01-10T11:49:59.000Z\",\n      \"docNumber\": null,\n      \"docType\": \"S\",\n      \"id\": 1,\n      \"modifiedBy\": 1,\n      \"responsibleId\": 1,\n      \"siteId\": \"s1\",\n      \"status\": \"Y\",\n      \"statusBy\": 1,\n      \"title\": \"Stock adjustment #2\",\n      \"total\": 275000\n    },\n    {\n      \"commentary\": null,\n      \"createdBy\": 1,\n      \"currency\": \"USD\",\n      \"dateCreate\": \"2025-06-27T05:00:47.000Z\",\n      \"dateDocument\": \"2025-06-27T05:00:47.000Z\",\n      \"dateModify\": \"2025-06-27T05:00:47.000Z\",\n      \"dateStatus\": \"2025-06-27T05:00:47.000Z\",\n      \"docNumber\": null,\n      \"docType\": \"A\",\n      \"id\": 3,\n      \"modifiedBy\": 1,\n      \"responsibleId\": 1,\n      \"siteId\": \"s1\",\n      \"status\": \"Y\",\n      \"statusBy\": 1,\n      \"title\": \"Goods receipt #12\",\n      \"total\": 5940\n    }\n  ],\n  \"meta\": {\n    \"total\": 143,\n    \"hasMore\": true\n  }\n}\n```\n\n## Error response example\n\n400 — filter by a field the document does not have:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"UNKNOWN_FILTER_FIELD\",\n    \"message\": \"Unknown filter field 'bogus' for entity 'catalog-documents'. Available: id, docType, currency, responsibleId, status, dateStatus, createdBy, dateCreate, title, docNumber, commentary, dateDocument, siteId, total, modifiedBy, statusBy, dateModify\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 400 | `UNKNOWN_FILTER_FIELD` | Filter by a field the document does not have. The message lists the allowed fields |\n| 400 | `UNKNOWN_SORT_FIELD` | Sorting by a field the document does not have. The message lists the allowed fields |\n| 400 | `INVALID_FILTER` | The `filter` value is not recognized: pass it in bracket notation `?filter[docType]=S` or as a JSON object `?filter={\"docType\":\"S\"}`. Both notations in one request are also rejected |\n| 400 | `INVALID_FILTER_OPERATOR` | The filter contains an unsupported operator. The message lists the supported ones |\n| 403 | `SCOPE_DENIED` | The API key does not have the `catalog` scope |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |\n| 401 | `INVALID_API_KEY` | The API key passed was not found |\n| 401 | `TOKEN_MISSING` | The API key has no configured tokens |\n| 429 | `RATE_LIMITED` | Rate limit exceeded: 300 requests per minute per portal, all API keys of the portal share one limit. The effective value is in the `x-ratelimit-limit` header. Retry after the delay in the `Retry-After` header |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## See also\n\n- [Get an inventory document](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Fget)\n- [Search inventory documents](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Fsearch)\n- [Inventory document fields](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Ffields)\n- [List document items](\u002Fdocs\u002Fentities\u002Fcatalog-document-elements\u002Flist)\n- [Inventory documents](\u002Fdocs\u002Fentities\u002Fcatalog-documents)\n- [Filtering syntax](\u002Fdocs\u002Ffiltering)\n- [Limits and optimization](\u002Fdocs\u002Foptimization)\n","## Get an inventory document\n\n`GET \u002Fv1\u002Fcatalog-documents\u002F:id`\n\nReturns one inventory document by ID. Use it to check the document state before changing it, conducting it or canceling conducting.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `id` (path) | number | yes | Document ID. List: [`GET \u002Fv1\u002Fcatalog-documents`](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Flist) |\n| `select` (query) | string | no | Comma-separated fields in the response: `?select=id,title,status`. Field names are listed in [`GET \u002Fv1\u002Fcatalog-documents\u002Ffields`](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Ffields) |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents\u002F299\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents\u002F299\" \\\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\u002Fcatalog-documents\u002F299', {\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n  },\n})\n\nconst { success, data } = await res.json()\nconsole.log('Document:', data.title, '— conducted:', data.status === 'Y')\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents\u002F299', {\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 | Inventory document (all fields — see [Inventory document fields](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Ffields)) |\n| `meta.warnings` | array | Request warnings. Returned when `select` contains a name that is not among the document fields: code `UNKNOWN_SELECT_FIELD`, the name in the `field` field. The other fields are returned |\n\nThe document's products and warehouses are not included in the response — the [item list](\u002Fdocs\u002Fentities\u002Fcatalog-document-elements\u002Flist) with `filter[docId]` returns them.\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"commentary\": null,\n    \"createdBy\": 1,\n    \"currency\": \"USD\",\n    \"dateCreate\": \"2026-10-12T13:20:16.000Z\",\n    \"dateDocument\": null,\n    \"dateModify\": \"2026-10-12T13:20:16.000Z\",\n    \"dateStatus\": \"2026-10-12T13:20:16.000Z\",\n    \"docNumber\": null,\n    \"docType\": \"S\",\n    \"id\": 299,\n    \"modifiedBy\": 1,\n    \"responsibleId\": 1,\n    \"siteId\": \"s1\",\n    \"status\": \"N\",\n    \"statusBy\": null,\n    \"title\": \"Stock adjustment — documentation check\",\n    \"total\": null\n  }\n}\n```\n\n## Error response example\n\n404 — no document with this `id`:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"ENTITY_NOT_FOUND\",\n    \"message\": \"catalogDocument 999999999 not found\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 404 | `ENTITY_NOT_FOUND` | No document with this `id` on the portal, including after deletion |\n| 400 | `INVALID_PARAMS` | `id` is not a non-negative integer, for example `\u002Fv1\u002Fcatalog-documents\u002Fabc` |\n| 403 | `SCOPE_DENIED` | The API key does not have the `catalog` scope |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |\n| 401 | `INVALID_API_KEY` | The API key passed was not found |\n| 401 | `TOKEN_MISSING` | The API key has no configured tokens |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## See also\n\n- [List inventory documents](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Flist)\n- [Update an inventory document](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Fupdate)\n- [Conduct a document](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Fconduct)\n- [Cancel conducting](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Fcancel)\n- [List document items](\u002Fdocs\u002Fentities\u002Fcatalog-document-elements\u002Flist)\n- [Inventory documents](\u002Fdocs\u002Fentities\u002Fcatalog-documents)\n","## Update an inventory document\n\n`PATCH \u002Fv1\u002Fcatalog-documents\u002F:id`\n\nChanges the header fields of an inventory document that is not yet conducted.\n\nPass only the fields to change, flat at the JSON root, without a `fields` wrapper.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `id` (path) | number | yes | Document ID. List: [`GET \u002Fv1\u002Fcatalog-documents`](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Flist) |\n\n## Request fields (body)\n\n| Field | Type | Required | Description |\n|------|-----|:-----:|---------|\n| `responsibleId` | number | no | Responsible employee. List: [`GET \u002Fv1\u002Fusers`](\u002Fdocs\u002Fentities\u002Fusers\u002Flist) |\n| `title` | string | no | Document title |\n| `docNumber` | string | no | Document number |\n| `commentary` | string | no | Comment |\n| `dateDocument` | datetime | no | Document date |\n| `total` | number | no | Document total. Not calculated from the document items: the field holds the passed value |\n| `siteId` | string | no | Bitrix24 site ID |\n| `modifiedBy` | number | no | Employee who last modified the document. List: [`GET \u002Fv1\u002Fusers`](\u002Fdocs\u002Fentities\u002Fusers\u002Flist) |\n| `statusBy` | number | no | Employee who last changed the conducting status. List: [`GET \u002Fv1\u002Fusers`](\u002Fdocs\u002Fentities\u002Fusers\u002Flist) |\n| `dateModify` | datetime | no | Last modification date |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X PATCH \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents\u002F299\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"title\": \"Stock correction — warehouse 11\",\n    \"commentary\": \"Recount after stocktaking\"\n  }'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X PATCH \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents\u002F299\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"title\": \"Stock correction — warehouse 11\",\n    \"commentary\": \"Recount after stocktaking\"\n  }'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents\u002F299', {\n  method: 'PATCH',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    title: 'Stock correction — warehouse 11',\n    commentary: 'Recount after stocktaking',\n  }),\n})\n\nconst { success, data } = await res.json()\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents\u002F299', {\n  method: 'PATCH',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    title: 'Stock correction — warehouse 11',\n    commentary: 'Recount after stocktaking',\n  }),\n})\n\nconst { success, data } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | `true` on successful update |\n| `data` | object | The full document after the update. All fields — [Inventory document fields](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Ffields) |\n| `data.dateModify` | datetime | Modification date, ISO 8601 in UTC |\n| `meta.warnings` | array | Returned 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. |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"commentary\": \"Recount after stocktaking\",\n    \"createdBy\": 1,\n    \"currency\": \"USD\",\n    \"dateCreate\": \"2026-10-12T13:20:16.000Z\",\n    \"dateDocument\": null,\n    \"dateModify\": \"2026-10-12T13:20:23.000Z\",\n    \"dateStatus\": \"2026-10-12T13:20:16.000Z\",\n    \"docNumber\": null,\n    \"docType\": \"S\",\n    \"id\": 299,\n    \"modifiedBy\": 1,\n    \"responsibleId\": 1,\n    \"siteId\": \"s1\",\n    \"status\": \"N\",\n    \"statusBy\": null,\n    \"title\": \"Stock correction — warehouse 11\",\n    \"total\": null\n  }\n}\n```\n\n## Error response example\n\n422 — the document is conducted:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"BITRIX_ERROR\",\n    \"message\": \"Cannot modify a conducted document\",\n    \"b24Code\": \"0\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 404 | `ENTITY_NOT_FOUND` | No document with this `id` |\n| 422 | `BITRIX_ERROR` | The document is conducted — message `Cannot modify a conducted document`. [Cancel conducting](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Fcancel) first |\n| 400 | `READONLY_FIELD` | The body contains a field that cannot be changed: `docType`, `currency`, `createdBy`, `status`, `id`, `dateCreate`, `dateStatus`. The field name is in `error.message` |\n| 400 | `EMPTY_UPDATE_BODY` | The request body is empty |\n| 400 | `NO_RECOGNIZED_UPDATE_FIELDS` | The body contains no updatable field, including when the fields are wrapped in `fields` |\n| 400 | `INVALID_PARAMS` | `id` in the path is not a non-negative integer |\n| 400 | `INVALID_PARAMS` | The 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` |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key works in read-only mode |\n| 403 | `SCOPE_DENIED` | The API key does not have the `catalog` scope |\n| 401 | `TOKEN_MISSING` | The API key has no configured tokens |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is not passed |\n| 401 | `INVALID_API_KEY` | The passed API key is not found |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## See also\n\n- [Inventory documents](\u002Fdocs\u002Fentities\u002Fcatalog-documents)\n- [Get an inventory document](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Fget)\n- [Cancel conducting of an inventory document](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Fcancel)\n- [Inventory document fields](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Ffields)\n- [Update an inventory document item](\u002Fdocs\u002Fentities\u002Fcatalog-document-elements\u002Fupdate)\n- [Batch](\u002Fdocs\u002Fbatch)\n","## Delete an inventory document\n\n`DELETE \u002Fv1\u002Fcatalog-documents\u002F:id`\n\nDeletes an inventory document that is not conducted. A deleted document cannot be restored through the API — create a new one if needed.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `id` (path) | number | yes | Document ID. List: [`GET \u002Fv1\u002Fcatalog-documents`](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Flist) |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X DELETE \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents\u002F301\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X DELETE \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents\u002F301\" \\\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\u002Fcatalog-documents\u002F301', {\n  method: 'DELETE',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n  },\n})\n\nif (res.status === 204) {\n  console.log('Document deleted')\n}\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents\u002F301', {\n  method: 'DELETE',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n  },\n})\n\nif (res.status === 204) {\n  console.log('Document deleted')\n}\n```\n\n## Response\n\nOn successful deletion, HTTP status `204 No Content` is returned with an empty body. Success is indicated by the status code, not the body.\n\n## Response example\n\n```http\nHTTP\u002F1.1 204 No Content\n```\n\n## Error response example\n\n404 — no document with this `id`:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"ENTITY_NOT_FOUND\",\n    \"message\": \"Document not found.\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 404 | `ENTITY_NOT_FOUND` | No document with this `id`, including when the document has already been deleted |\n| 422 | `BITRIX_ERROR` | The document is conducted — message `A conducted document cannot be deleted.` [Cancel conducting](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Fcancel) first |\n| 400 | `INVALID_PARAMS` | `id` in the path is not a non-negative integer |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key works in read-only mode |\n| 403 | `SCOPE_DENIED` | The API key does not have the `catalog` scope |\n| 401 | `TOKEN_MISSING` | The API key has no configured tokens |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is not passed |\n| 401 | `INVALID_API_KEY` | The passed API key is not found |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## See also\n\n- [Inventory documents](\u002Fdocs\u002Fentities\u002Fcatalog-documents)\n- [Cancel conducting of an inventory document](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Fcancel)\n- [List inventory documents](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Flist)\n- [Inventory document items](\u002Fdocs\u002Fentities\u002Fcatalog-document-elements)\n- [Batch](\u002Fdocs\u002Fbatch)\n","## Search inventory documents\n\n`POST \u002Fv1\u002Fcatalog-documents\u002Fsearch`\n\nSearches inventory documents using conditions specified in the request body. Use this endpoint for filters with operators and date-range queries. For simpler queries, use the list endpoint with a filter in the query string.\n\n## Request fields (body)\n\n| Field | Type | Default | Description |\n|------|-----|-----------|---------|\n| `filter` | object | — | Filter by fields listed by `GET \u002Fv1\u002Fcatalog-documents\u002Ffields`.\u003Cbr>[Filtering syntax](\u002Fdocs\u002Ffiltering). Example: `{\"docType\": {\"$in\": [\"A\", \"S\"]}, \"status\": \"N\"}` |\n| `select` | string[] | — | Fields in the response: `[\"id\", \"title\", \"status\"]`. A comma-separated string `\"id,title,status\"` is also accepted. Names come from [`GET \u002Fv1\u002Fcatalog-documents\u002Ffields`](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Ffields) |\n| `sort` | string \\| object \\| string[] | — | Sorting: `\"-id\"` — descending, `\"id\"` — ascending, or an object `{\"id\": \"desc\"}`. Also accepted under the name `order`. If omitted, documents are sorted by `id` ascending |\n| `limit` | number | `50` | Number of records, from 1 to 5000. A value above 5000 is capped at 5000 |\n| `offset` | number | `0` | How many records to skip. A value above zero combined with window splitting is rejected — see `UNSTABLE_OFFSET_PAGINATION` in the \"Errors\" section |\n| `autoWindow` | boolean | `true` | Split the search into weekly windows when filtering by a date range longer than 14 days. `false` disables splitting |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents\u002Fsearch\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"filter\": { \"docType\": \"S\", \"status\": \"N\" },\n    \"select\": [\"id\", \"title\", \"docType\", \"status\", \"total\"],\n    \"sort\": \"-id\",\n    \"limit\": 2\n  }'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents\u002Fsearch\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"filter\": { \"docType\": \"S\", \"status\": \"N\" },\n    \"select\": [\"id\", \"title\", \"docType\", \"status\", \"total\"],\n    \"sort\": \"-id\",\n    \"limit\": 2\n  }'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents\u002Fsearch', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    filter: { docType: 'S', status: 'N' },\n    select: ['id', 'title', 'docType', 'status', 'total'],\n    sort: '-id',\n    limit: 2,\n  }),\n})\n\nconst { success, data, meta } = await res.json()\nconsole.log(`Unposted stock adjustments returned: ${data.length}`)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents\u002Fsearch', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    filter: { docType: 'S', status: 'N' },\n    select: ['id', 'title', 'docType', 'status', 'total'],\n    sort: '-id',\n    limit: 2,\n  }),\n})\n\nconst { success, data, meta } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | Always `true` on success |\n| `data` | array | Array of inventory documents (all fields — see [Inventory document fields](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Ffields)). If `select` is set, only the listed fields are returned |\n| `meta.total` | number | The exact number of documents matching the filter, when known. Omitted when the search across time windows is incomplete |\n| `meta.hasMore` | boolean | Whether there are more documents beyond `limit` |\n| `meta.durationMs` | number | Request duration in milliseconds |\n| `meta.autoWindowed` | boolean | `true` if the search was split into weekly windows. Returned only when splitting occurs |\n| `meta.windowCount` | number | Number of windows. Returned with `autoWindowed: true` |\n| `meta.batchWaves` | number | Number of waves of parallel requests across windows. Returned with `autoWindowed: true` |\n| `meta.warnings` | array | Request warnings. Returned when `select` contains an unknown document field name. The warning has code `UNKNOWN_SELECT_FIELD` and specifies the unknown name in `field`. The other fields are returned |\n\nUse `meta.hasMore` to determine whether there are more results: a page with exactly `limit` records can still be the last page.\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"id\": 299,\n      \"title\": \"Stock adjustment — warehouse 11\",\n      \"docType\": \"S\",\n      \"status\": \"N\",\n      \"total\": null\n    },\n    {\n      \"id\": 151,\n      \"title\": \"stock adjustment 33\",\n      \"docType\": \"S\",\n      \"status\": \"N\",\n      \"total\": null\n    }\n  ],\n  \"meta\": {\n    \"total\": 36,\n    \"hasMore\": true,\n    \"durationMs\": 103\n  }\n}\n```\n\nWhen filtering by a date range longer than 14 days, for example `{\"filter\": {\">=dateCreate\": \"2025-01-01T00:00:00Z\", \"\u003CdateCreate\": \"2025-07-01T00:00:00Z\"}}`, `meta` also contains `autoWindowed`, `windowCount` and `batchWaves`:\n\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"id\": 1,\n      \"title\": \"Stock adjustment #2\",\n      \"dateCreate\": \"2025-01-10T11:49:37.000Z\"\n    },\n    {\n      \"id\": 3,\n      \"title\": \"Goods receipt #12\",\n      \"dateCreate\": \"2025-06-27T05:00:47.000Z\"\n    }\n  ],\n  \"meta\": {\n    \"total\": 2,\n    \"hasMore\": false,\n    \"autoWindowed\": true,\n    \"windowCount\": 26,\n    \"batchWaves\": 1,\n    \"durationMs\": 219\n  }\n}\n```\n\nIn the example above, all windows were read successfully and duplicates removed, so `meta.total` is the exact number of matches. The field is omitted when the search stops early at `limit` or a window returns an incomplete result. The API does not make additional requests solely to obtain a count. `data.length` is the number of returned documents; `meta.hasMore` indicates whether more results are available.\n\n## Error response example\n\n400 — filter by a field the document does not have:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"UNKNOWN_FILTER_FIELD\",\n    \"message\": \"Unknown filter field 'bogus' for entity 'catalog-documents'. Available: id, docType, currency, responsibleId, status, dateStatus, createdBy, dateCreate, title, docNumber, commentary, dateDocument, siteId, total, modifiedBy, statusBy, dateModify\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 400 | `UNKNOWN_FILTER_FIELD` | Filter by a field the document does not have. The message lists the allowed fields |\n| 400 | `UNKNOWN_SORT_FIELD` | Sorting by a field the document does not have. The message lists the allowed fields |\n| 400 | `INVALID_FILTER_OPERATOR` | The filter contains an unsupported operator. The message lists the supported ones |\n| 400 | `INVALID_SORT_TYPE` | `sort` is not a string, an object or an array of strings, for example a number |\n| 400 | `INVALID_SELECT_TYPE` | `select` is not a string or an array of strings, for example a number |\n| 400 | `INVALID_LIMIT` | `limit` is not a number, for example `\"abc\"` |\n| 400 | `INVALID_REQUEST` | The request body is not a JSON object, for example an array |\n| 400 | `UNSTABLE_OFFSET_PAGINATION` | `offset` is greater than zero and the filter covers a date range longer than 14 days. Fetch everything in one request with `limit` up to 5000, or pass `autoWindow: false` with `\"sort\": \"id\"`, or split the date range into parts yourself |\n| 403 | `SCOPE_DENIED` | The API key does not have the `catalog` scope |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |\n| 401 | `INVALID_API_KEY` | The provided API key was not found |\n| 401 | `TOKEN_MISSING` | The API key has no configured tokens |\n| 429 | `RATE_LIMITED` | Rate limit exceeded: 300 requests per minute per portal. All API keys for the portal share this limit. The effective value is in the `x-ratelimit-limit` header. Retry after the delay in the `Retry-After` header |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## See also\n\n- [List inventory documents](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Flist)\n- [Get an inventory document](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Fget)\n- [Inventory document fields](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Ffields)\n- [Search document items](\u002Fdocs\u002Fentities\u002Fcatalog-document-elements\u002Fsearch)\n- [Inventory documents](\u002Fdocs\u002Fentities\u002Fcatalog-documents)\n- [Filtering syntax](\u002Fdocs\u002Ffiltering)\n- [Limits and optimization](\u002Fdocs\u002Foptimization)\n","## Inventory document fields\n\n`GET \u002Fv1\u002Fcatalog-documents\u002Ffields`\n\nReturns the schema of all inventory document fields. Helps build the request body for creating and updating a document.\n\n## Parameters\n\n| Parameter | Type | Default | Description |\n|----------|-----|-----------|---------|\n| `refresh` (query) | string | `false` | Pass `true` to get the schema bypassing the cache. Example: `?refresh=true` |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents\u002Ffields\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents\u002Ffields\" \\\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\u002Fcatalog-documents\u002Ffields', {\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n  },\n})\n\nconst { success, data } = await res.json()\nconst required = Object.entries(data.fields)\n  .filter(([, field]) => field.required)\n  .map(([name]) => name)\nconsole.log('Required on create:', required)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents\u002Ffields', {\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n  },\n})\n\nconst { success, data } = await res.json()\nconst required = Object.entries(data.fields)\n  .filter(([, field]) => field.required)\n  .map(([name]) => name)\nconsole.log('Required on create:', required)\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | Always `true` on success |\n| `data.fields` | object | Map of document fields: the key is the field name, the value is its description |\n| `data.fields.\u003Cfield>.type` | string | Value type: `number`, `string`, `datetime` |\n| `data.fields.\u003Cfield>.readonly` | boolean | `true` — the field is filled by the system and is not accepted on create or update |\n| `data.fields.\u003Cfield>.createOnly` | boolean | Present with the value `true` on fields that are set only on create. On update such a field is rejected with `400 READONLY_FIELD` |\n| `data.fields.\u003Cfield>.required` | boolean | Present with the value `true` on fields required on create |\n| `data.fields.\u003Cfield>.label` | string | Field caption |\n| `data.fields.\u003Cfield>.description` | string | Field description |\n| `data.batch` | string[] | Operations available in bulk mode via [Batch](\u002Fdocs\u002Fbatch): `create`, `update`, `delete` |\n| `meta.warnings` | array | Present only if the full field schema could not be retrieved from Bitrix24. Contains an object with the code `fields_partial` and a `message` string: the response holds only the fields from the Vibecode schema, and some captions may be missing. Retry the request |\n\nFor most fields, `label` and `description` contain the field name itself, and the `docType` description lists the document types.\n\nDocument fields:\n\n| Field | Type | RO | Description |\n|------|-----|:--:|---------|\n| `id` | number | yes | Document ID |\n| `docType` | string | | Document type: `A` — receipt, `S` — stock adjustment, `M` — transfer, `R` — return, `D` — write-off. Required on create, set only on create |\n| `currency` | string | | Document currency. Required on create, set only on create. List: [`GET \u002Fv1\u002Fcurrencies`](\u002Fdocs\u002Fentities\u002Fcurrencies\u002Flist) |\n| `responsibleId` | number | | Responsible employee. Required on create. List: [`GET \u002Fv1\u002Fusers`](\u002Fdocs\u002Fentities\u002Fusers\u002Flist) |\n| `status` | string | yes | Conducting status: `Y` — conducted, `N` — not conducted. Changed by [conducting](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Fconduct) and [canceling conducting](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Fcancel) |\n| `dateStatus` | datetime | yes | Date the conducting status changed. For a new document it matches the creation date |\n| `createdBy` | number | | Employee who created the document. Set only on create. List: [`GET \u002Fv1\u002Fusers`](\u002Fdocs\u002Fentities\u002Fusers\u002Flist) |\n| `dateCreate` | datetime | yes | Creation date |\n| `title` | string | | Document title |\n| `docNumber` | string | | Document number. `null` if not set |\n| `commentary` | string | | Comment. `null` if not set |\n| `dateDocument` | datetime | | Document date. `null` if not set |\n| `siteId` | string | | Bitrix24 account site ID. If not passed on create, `s1` is used |\n| `total` | number | | Document total. Not calculated from the items: if the total is not set, it stays `null` even after conducting |\n| `modifiedBy` | number | | Employee who last modified the document. List: [`GET \u002Fv1\u002Fusers`](\u002Fdocs\u002Fentities\u002Fusers\u002Flist) |\n| `statusBy` | number | | Employee who changed the conducting status. `null` until the status changes. List: [`GET \u002Fv1\u002Fusers`](\u002Fdocs\u002Fentities\u002Fusers\u002Flist) |\n| `dateModify` | datetime | | Last modification date |\n\nDates are returned in ISO 8601 format in UTC, for example `2026-10-12T13:20:16.000Z`.\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"fields\": {\n      \"id\": {\n        \"type\": \"number\",\n        \"readonly\": true,\n        \"label\": \"id\",\n        \"description\": \"id\"\n      },\n      \"docType\": {\n        \"type\": \"string\",\n        \"readonly\": false,\n        \"createOnly\": true,\n        \"required\": true,\n        \"label\": \"docType\",\n        \"description\": \"Document type: A receipt, S stock adjustment, M transfer, R return, D write-off. Bitrix24 excludes U and W from the REST type list.\"\n      },\n      \"currency\": {\n        \"type\": \"string\",\n        \"readonly\": false,\n        \"createOnly\": true,\n        \"required\": true,\n        \"label\": \"currency\",\n        \"description\": \"currency\"\n      },\n      \"responsibleId\": {\n        \"type\": \"number\",\n        \"readonly\": false,\n        \"required\": true,\n        \"label\": \"responsibleId\",\n        \"description\": \"responsibleId\"\n      },\n      \"status\": {\n        \"type\": \"string\",\n        \"readonly\": true,\n        \"label\": \"status\",\n        \"description\": \"status\"\n      },\n      \"dateStatus\": {\n        \"type\": \"datetime\",\n        \"readonly\": true,\n        \"label\": \"dateStatus\",\n        \"description\": \"dateStatus\"\n      },\n      \"createdBy\": {\n        \"type\": \"number\",\n        \"readonly\": false,\n        \"createOnly\": true,\n        \"label\": \"createdBy\",\n        \"description\": \"createdBy\"\n      },\n      \"dateCreate\": {\n        \"type\": \"datetime\",\n        \"readonly\": true,\n        \"label\": \"dateCreate\",\n        \"description\": \"dateCreate\"\n      },\n      \"title\": {\n        \"type\": \"string\",\n        \"readonly\": false,\n        \"label\": \"title\",\n        \"description\": \"title\"\n      },\n      \"docNumber\": {\n        \"type\": \"string\",\n        \"readonly\": false,\n        \"label\": \"docNumber\",\n        \"description\": \"docNumber\"\n      },\n      \"commentary\": {\n        \"type\": \"string\",\n        \"readonly\": false,\n        \"label\": \"commentary\",\n        \"description\": \"commentary\"\n      },\n      \"dateDocument\": {\n        \"type\": \"datetime\",\n        \"readonly\": false,\n        \"label\": \"dateDocument\",\n        \"description\": \"dateDocument\"\n      },\n      \"siteId\": {\n        \"type\": \"string\",\n        \"readonly\": false,\n        \"label\": \"siteId\",\n        \"description\": \"siteId\"\n      },\n      \"total\": {\n        \"type\": \"number\",\n        \"readonly\": false,\n        \"label\": \"total\",\n        \"description\": \"total\"\n      },\n      \"modifiedBy\": {\n        \"type\": \"number\",\n        \"readonly\": false,\n        \"label\": \"modifiedBy\",\n        \"description\": \"modifiedBy\"\n      },\n      \"statusBy\": {\n        \"type\": \"number\",\n        \"readonly\": false,\n        \"label\": \"statusBy\",\n        \"description\": \"statusBy\"\n      },\n      \"dateModify\": {\n        \"type\": \"datetime\",\n        \"readonly\": false,\n        \"label\": \"dateModify\",\n        \"description\": \"dateModify\"\n      }\n    },\n    \"batch\": [\n      \"create\",\n      \"update\",\n      \"delete\"\n    ]\n  }\n}\n```\n\n## Error response example\n\n401 — API key not passed:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"MISSING_API_KEY\",\n    \"message\": \"API key required. Pass via X-Api-Key header.\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is not passed |\n| 401 | `INVALID_API_KEY` | The passed API key was not found |\n| 401 | `TOKEN_MISSING` | The API key has no configured tokens |\n| 403 | `SCOPE_DENIED` | The API key does not have the `catalog` scope |\n| 429 | `RATE_LIMITED` | Rate limit exceeded: 300 requests per minute per portal, all API keys of the portal share one limit. The effective value is in the `x-ratelimit-limit` header. Retry after the delay in the `Retry-After` header |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## See also\n\n- [Create an inventory document](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Fcreate)\n- [Update an inventory document](\u002Fdocs\u002Fentities\u002Fcatalog-documents\u002Fupdate)\n- [Inventory documents](\u002Fdocs\u002Fentities\u002Fcatalog-documents)\n- [Inventory document item fields](\u002Fdocs\u002Fentities\u002Fcatalog-document-elements\u002Ffields)\n- [Entity reference](\u002Fdocs\u002Fentity-api)\n","## Conduct an inventory document\n\n`POST \u002Fv1\u002Fcatalog-documents\u002F:id\u002Fconduct`\n\nConducts an inventory document: warehouse stock changes for the products in its items, and the document is marked as conducted. Call it once the document and its items are filled in.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `id` (path) | number | yes | Document ID, a positive integer without leading zeros. List: [`GET \u002Fv1\u002Fcatalog-documents`](.\u002Flist.md) |\n\nSend an empty object `{}` with the `Content-Type: application\u002Fjson` header, or send the request with no body and without that header.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents\u002F301\u002Fconduct\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{}'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents\u002F301\u002Fconduct\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{}'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents\u002F301\u002Fconduct', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: '{}',\n})\n\nconst { success, data } = await res.json()\nconsole.log('Document status:', data.status)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents\u002F301\u002Fconduct', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: '{}',\n})\n\nconst { success, data } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | `true` on success |\n| `data.id` | number | ID of the conducted document |\n| `data.status` | string | Document status, re-read after conducting. Always `Y` in a successful response |\n\nOther document fields — [`GET \u002Fv1\u002Fcatalog-documents\u002F:id`](.\u002Fget.md).\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"id\": 301,\n    \"status\": \"Y\"\n  }\n}\n```\n\n## Error response example\n\n422 — the document is already conducted:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"BITRIX_ERROR\",\n    \"message\": \"Document conduct error: The document is already conducted\",\n    \"b24Code\": \"0\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 400 | `INVALID_PARAMS` | `id` in the path is not a positive integer, or the request body is not empty. Error text — `id must be a positive safe integer and body must be empty` |\n| 400 | `FST_ERR_CTP_EMPTY_JSON_BODY` | The `Content-Type: application\u002Fjson` header is sent, but the body is empty. Send `{}` or remove the header |\n| 404 | `ENTITY_NOT_FOUND` | No document with this `id`. Error text — `Catalog document not found` |\n| 422 | `BITRIX_ERROR` | The document is already conducted. Error text — `Document conduct error: The document is already conducted` |\n| 422 | `BITRIX_ERROR` | A receipt `A` has no supplier. Error text — `Document conduct error: Supplier is not specified.` |\n| 422 | `BITRIX_ERROR` | An item lacks the warehouse its document type requires. The text names the product and the warehouse: `…write-off warehouse is not specified` for a write-off `D`, `…destination warehouse is not specified` for a transfer `M`, `…return warehouse is not specified` for a return `R` |\n| 422 | `BITRIX_ERROR` | Bitrix24 rejected conducting for another reason. The reason text is in `message` |\n| 422 | `BITRIX_ERROR` | Bitrix24 did not confirm conducting. Error text — `Bitrix24 rejected the document action` |\n| 422 | `BITRIX_ERROR` | The document was re-read, and its status did not become `Y`. Error text — `Document action did not change status` |\n| 502 | `BITRIX_UNAVAILABLE` | The portal is unavailable, or the document status could not be re-read after conducting. In the second case the error text is `Unable to verify document status` |\n| 503 | `BITRIX_TIMEOUT` | Bitrix24 did not respond in time. Conducting may have taken place — before retrying, check `status` via [`GET \u002Fv1\u002Fcatalog-documents\u002F:id`](.\u002Fget.md) |\n| 403 | `BITRIX_ACCESS_DENIED` | Bitrix24 denied the key's user access to the operation |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key works in read-only mode |\n| 403 | `SCOPE_DENIED` | The API key does not have the `catalog` scope |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is not passed |\n| 401 | `INVALID_API_KEY` | The passed API key was not found |\n| 401 | `TOKEN_MISSING` | The API key has no configured tokens |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## See also\n\n- [Cancel conducting](.\u002Fcancel.md)\n- [Get an inventory document](.\u002Fget.md)\n- [Inventory document items](\u002Fdocs\u002Fentities\u002Fcatalog-document-elements)\n- [Warehouse stock](\u002Fdocs\u002Fentities\u002Fwarehouses\u002Fstock)\n- [Inventory documents](\u002Fdocs\u002Fentities\u002Fcatalog-documents)\n","## Cancel conducting of an inventory document\n\n`POST \u002Fv1\u002Fcatalog-documents\u002F:id\u002Fcancel`\n\nCancels conducting of an inventory document: the product stock in the warehouses returns to the values it had before conducting, and the document is no longer conducted. Call it when you need to edit a conducted document or its items.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `id` (path) | number | yes | Document ID, a positive integer without leading zeros. List: [`GET \u002Fv1\u002Fcatalog-documents`](.\u002Flist.md) |\n\nSend an empty object `{}` with the `Content-Type: application\u002Fjson` header, or send the request with no body and without that header.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents\u002F301\u002Fcancel\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{}'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents\u002F301\u002Fcancel\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{}'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents\u002F301\u002Fcancel', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: '{}',\n})\n\nconst { success, data } = await res.json()\nconsole.log('Document status:', data.status)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-documents\u002F301\u002Fcancel', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: '{}',\n})\n\nconst { success, data } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | `true` on success |\n| `data.id` | number | Document ID |\n| `data.status` | string | Document status, re-read after cancellation. Always `N` in a successful response |\n\nOther document fields — [`GET \u002Fv1\u002Fcatalog-documents\u002F:id`](.\u002Fget.md). The `statusBy` and `dateStatus` fields show who last changed the status and when.\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"id\": 301,\n    \"status\": \"N\"\n  }\n}\n```\n\n## Error response example\n\n422 — the document is not conducted:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"BITRIX_ERROR\",\n    \"message\": \"Document conduct cancellation error: The document is not conducted yet.\",\n    \"b24Code\": \"0\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 400 | `INVALID_PARAMS` | `id` in the path is not a positive integer, or the request body is not empty. Error text — `id must be a positive safe integer and body must be empty` |\n| 400 | `FST_ERR_CTP_EMPTY_JSON_BODY` | The `Content-Type: application\u002Fjson` header is sent, but the body is empty. Send `{}` or remove the header |\n| 404 | `ENTITY_NOT_FOUND` | No document with this `id`. Error text — `Catalog document not found` |\n| 422 | `BITRIX_ERROR` | The document is not conducted. Error text — `Document conduct cancellation error: The document is not conducted yet.` |\n| 422 | `BITRIX_ERROR` | Bitrix24 rejected the cancellation for another reason. The reason text is in `message` |\n| 422 | `BITRIX_ERROR` | Bitrix24 did not confirm the cancellation. Error text — `Bitrix24 rejected the document action` |\n| 422 | `BITRIX_ERROR` | The document was re-read, and its status did not become `N`. Error text — `Document action did not change status` |\n| 502 | `BITRIX_UNAVAILABLE` | The portal is unavailable, or the document status could not be re-read after cancellation. In the second case the error text is `Unable to verify document status` |\n| 503 | `BITRIX_TIMEOUT` | Bitrix24 did not respond in time. The cancellation may have taken place — before retrying, check `status` via [`GET \u002Fv1\u002Fcatalog-documents\u002F:id`](.\u002Fget.md) |\n| 403 | `BITRIX_ACCESS_DENIED` | Bitrix24 denied the key's user access to the operation |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key works in read-only mode |\n| 403 | `SCOPE_DENIED` | The API key does not have the `catalog` scope |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is not passed |\n| 401 | `INVALID_API_KEY` | The passed API key was not found |\n| 401 | `TOKEN_MISSING` | The API key has no configured tokens |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## See also\n\n- [Conduct a document](.\u002Fconduct.md)\n- [Get an inventory document](.\u002Fget.md)\n- [Update an inventory document](.\u002Fupdate.md)\n- [Inventory document items](\u002Fdocs\u002Fentities\u002Fcatalog-document-elements)\n- [Warehouse stock](\u002Fdocs\u002Fentities\u002Fwarehouses\u002Fstock)\n- [Inventory documents](\u002Fdocs\u002Fentities\u002Fcatalog-documents)\n",1794739326167]