# Inventory documents

Bitrix24: `catalog.document.*`. Scope: `catalog`.

Required on create: `docType`, `currency`, `responsibleId`. Types A, S, M, R, D are available through REST; U and W are excluded. `status` changes only through conduct/cancel. Set `currency` on create: Bitrix24 returns 200 for a later currency update but keeps the old value.

## Operations

- [list](./catalog-documents/list.md) — `GET /v1/catalog-documents` — `catalog.document.list`
- [get](./catalog-documents/get.md) — `GET /v1/catalog-documents/:id` — `catalog.document.list with filter.id`
- [create](./catalog-documents/create.md) — `POST /v1/catalog-documents` — `catalog.document.add`
- [update](./catalog-documents/update.md) — `PATCH /v1/catalog-documents/:id` — `catalog.document.update`
- [delete](./catalog-documents/delete.md) — `DELETE /v1/catalog-documents/:id` — `catalog.document.delete`
- [search](./catalog-documents/search.md) — `POST /v1/catalog-documents/search` — `catalog.document.list`
- [fields](./catalog-documents/fields.md) — `GET /v1/catalog-documents/fields` — `catalog.document.getFields`
- [conduct](./catalog-documents/conduct.md) — `POST /v1/catalog-documents/:id/conduct`
- [cancel](./catalog-documents/cancel.md) — `POST /v1/catalog-documents/:id/cancel`

## End-to-end example

On a test Bitrix24 account, create a stock-adjustment document (`S`) with `docType`, `currency` and `responsibleId`. Replace `42` below with the returned document ID and `7141` with your own product ID. Set `storeTo` and `amount` on the item, conduct the document, and read the stock through `/v1/warehouses/11/stock`. Then cancel conduct and delete the item and document.

```bash
curl -X POST "https://vibecode.bitrix24.com/v1/catalog-documents" -H "X-Api-Key: $VIBE_API_KEY" -H 'Content-Type: application/json' -d '{"docType":"S","currency":"USD","responsibleId":1,"title":"VIBE-PROBE stock adjustment"}'
curl -X POST "https://vibecode.bitrix24.com/v1/catalog-document-elements" -H "X-Api-Key: $VIBE_API_KEY" -H 'Content-Type: application/json' -d '{"docId":42,"elementId":7141,"amount":1,"storeTo":11}'
curl -X POST "https://vibecode.bitrix24.com/v1/catalog-documents/42/conduct" -H "X-Api-Key: $VIBE_API_KEY"
curl "https://vibecode.bitrix24.com/v1/warehouses/11/stock?limit=5000" -H "X-Api-Key: $VIBE_API_KEY"
curl -X POST "https://vibecode.bitrix24.com/v1/catalog-documents/42/cancel" -H "X-Api-Key: $VIBE_API_KEY"
```

A receipt (`A`) may require a supplier set in the Bitrix24 interface: `catalog.document.getFields` does not expose `contractorId`, and conduct without a supplier can return 422.
