For AI agents: markdown of this page — /docs-content-en/entities/catalog-document-elements/get.md documentation index — /llms.txt

Get an inventory document item

GET /v1/catalog-document-elements/:id

Returns one inventory document item by ID.

Parameters

Parameter Type Required Description
Parameterid (path) Typenumber Requiredyes DescriptionItem ID. List of a document's items — GET /v1/catalog-document-elements?filter[docId]=:docId
Parameterselect (query) Typestring Requiredno DescriptionComma-separated response fields: ?select=id,elementId,amount. The id field is always returned. Names come from GET /v1/catalog-document-elements/fields

Examples

curl — personal key

Terminal
curl "https://vibecode.bitrix24.com/v1/catalog-document-elements/33" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl "https://vibecode.bitrix24.com/v1/catalog-document-elements/33" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/catalog-document-elements/33', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { success, data } = await res.json()
console.log('Product:', data.elementId, 'quantity:', data.amount)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/catalog-document-elements/33', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

const { success, data } = await res.json()

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata.id Typenumber DescriptionItem ID
Fielddata.docId Typenumber DescriptionInventory document ID. Document — GET /v1/catalog-documents/:id
Fielddata.elementId Typenumber DescriptionProduct ID. Product — GET /v1/catalog-products/:id
Fielddata.amount Typenumber | null DescriptionProduct quantity, null — not set
Fielddata.purchasingPrice Typenumber | null DescriptionPurchase price per unit, null — not set
Fielddata.storeFrom Typenumber | null DescriptionSource warehouse, null — no warehouse set. Warehouses — GET /v1/warehouses
Fielddata.storeTo Typenumber | null DescriptionDestination warehouse, null — no warehouse set. Warehouses — GET /v1/warehouses

Response example

JSON
{
  "success": true,
  "data": {
    "amount": 3,
    "docId": 299,
    "elementId": 6595,
    "id": 33,
    "purchasingPrice": 11000,
    "storeFrom": null,
    "storeTo": 11
  }
}

Error response example

404 — item not found:

JSON
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "catalogDocumentElement 999999999 not found"
  }
}

Errors

HTTP Code Description
HTTP404 CodeENTITY_NOT_FOUND DescriptionNo item with this id exists, including after its document was deleted
HTTP400 CodeINVALID_PARAMS Descriptionid is not a non-negative integer
HTTP401 CodeMISSING_API_KEY DescriptionThe X-Api-Key header is missing
HTTP401 CodeINVALID_API_KEY DescriptionThe API key passed was not found
HTTP401 CodeTOKEN_MISSING DescriptionThe API key has no configured tokens
HTTP403 CodeSCOPE_DENIED DescriptionThe API key does not have the catalog scope

Full list of common API errors — Errors.

See also