لوكلاء AI: ملف markdown لهذه الصفحة — /docs-content-en/entities/warehouses/stock-record.md فهرس التوثيق — /llms.txt
مقالات التوثيق متاحة حاليًا باللغة الإنجليزية فقط.
Warehouse stock record
GET /v1/warehouses/:id/stock/:recordId
Reads one warehouse stock row. Its ID differs from the product and warehouse IDs. Requires the catalog scope. Read-only keys are accepted.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
Parameterid (path) |
Typenumber | Requiredyes | DescriptionWarehouse ID from the warehouse list, a canonical positive safe integer |
ParameterrecordId (path) |
Typenumber | Requiredyes | DescriptionStock row ID from the stock list, a canonical positive safe integer |
Examples
curl — personal key
curl "https://vibecode.bitrix24.com/v1/warehouses/1/stock/3" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl "https://vibecode.bitrix24.com/v1/warehouses/1/stock/3" \
-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/warehouses/1/stock/3', {
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
})
const { success, data } = await res.json()
console.log('Stock:', data.amount)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/warehouses/1/stock/3', {
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const { success, data } = await res.json()
console.log('Stock:', data.amount)
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | Descriptiontrue on success |
Fielddata |
Typeobject | DescriptionWarehouse stock row from the stock list — fields listed below |
Fielddata.id |
Typenumber | DescriptionStock row ID from the stock list |
Fielddata.productId |
Typenumber | DescriptionProduct ID from the catalog product list |
Fielddata.storeId |
Typenumber | DescriptionWarehouse ID from the warehouse list |
Fielddata.amount |
Typenumber | null | DescriptionStock amount |
Fielddata.quantityReserved |
Typenumber | null | DescriptionReserved amount, which may exceed stock |
Response example
{
"success": true,
"data": {
"id": 3,
"productId": 6595,
"storeId": 1,
"amount": 15,
"quantityReserved": 30
}
}
Error response example
404 — the stock row was not found in the specified warehouse:
{
"success": false,
"error": {
"code": "ENTITY_NOT_FOUND",
"message": "Warehouse stock record not found"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeINVALID_PARAMS |
DescriptionInvalid id or recordId, refused before calling Bitrix24 |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionNo configured tokens |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionMissing catalog scope |
| HTTP403 | CodeBITRIX_ACCESS_DENIED |
DescriptionBitrix24 explicitly denied method access |
| HTTP404 | CodeENTITY_NOT_FOUND |
DescriptionThe row is missing, inaccessible, or belongs to another warehouse |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionBitrix24 business refusal |
| HTTP429 | CodeQUEUE_OVERFLOW |
DescriptionCall queue is full |
| HTTP502 | CodeBITRIX_UNAVAILABLE |
DescriptionBitrix24 unavailable |
| HTTP503 | CodeBITRIX_TIMEOUT |
DescriptionBitrix24 timeout |
See the full list of common errors in Errors.