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

Get a unit of measure

GET /v1/catalog-measures/:id

Returns a single catalog unit of measure by its ID.

Parameters

Parameter Type Required Description
id (path) number yes Unit of measure identifier, a non-negative integer. List: GET /v1/catalog-measures

Examples

curl — personal key

Terminal
curl "https://vibecode.bitrix24.com/v1/catalog-measures/9" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl "https://vibecode.bitrix24.com/v1/catalog-measures/9" \
  -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-measures/9', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { success, data } = await res.json()
console.log('Measure:', data.measureTitle ?? data.symbolIntl, '— code', data.code)

JavaScript — OAuth application

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

const { success, data } = await res.json()
console.log('Measure:', data.measureTitle ?? data.symbolIntl, '— code', data.code)

Response fields

Field Type Description
success boolean Always true on success
data.id number Unit of measure identifier. Pass it in a product's measure field
data.code number Unit code in the Russian National Classifier of Units of Measurement (OKEI), an integer. Unique within the Bitrix24 account
data.measureTitle string | null Unit of measure name. Can be null — the designation is then set in symbolIntl and symbolLetterIntl
data.symbol string | null Short designation
data.symbolIntl string | null International designation
data.symbolLetterIntl string | null International letter designation
data.isDefault string Whether this is the default unit in the Bitrix24 account: Y or N

Response example

JSON
{
  "success": true,
  "data": {
    "code": 796,
    "id": 9,
    "isDefault": "Y",
    "measureTitle": null,
    "symbol": null,
    "symbolIntl": "pc. 1",
    "symbolLetterIntl": "PCE. NMB"
  }
}

Error response example

404 — no unit of measure with this id:

JSON
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "measure does not exist."
  }
}

Errors

HTTP Code Description
404 ENTITY_NOT_FOUND No unit of measure with this id exists in the Bitrix24 account, including a deleted one
400 INVALID_PARAMS id is not a non-negative integer, for example abc. The request is rejected before execution, and no data in the Bitrix24 account changes
403 SCOPE_DENIED The API key lacks the catalog scope
401 TOKEN_MISSING The API key has no configured tokens
401 MISSING_API_KEY The X-Api-Key header is missing

Full list of common API errors — Errors.

See also