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

Unit of measure fields

GET /v1/catalog-measures/fields

Returns the field schema of a catalog unit of measure: use it to check types and allowed values before creating or updating a record.

Examples

curl — personal key

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

curl — OAuth application

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

const { success, data } = await res.json()
console.log('Fields:', Object.keys(data.fields))

JavaScript — OAuth application

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

const { success, data } = await res.json()
console.log('Fields:', Object.keys(data.fields))

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata.fields Typeobject DescriptionMap of unit of measure fields. The key is the field name; the value is its description
Fielddata.batch Typearray DescriptionWrite actions available in batch mode via POST /v1/catalog-measures/batch: create, update, delete

Each field in the fields map is described by the keys type and readonly, a label and a description. The required: true key is set on the fields required to create a record: code and measureTitle. The nullable: true key is set on fields whose value can come back as null. The isDefault field has an enum list of allowed values, each with a label. The label and description of the fields themselves come back in English.

Field Type RO Description
Fieldid Typenumber ROyes DescriptionUnit of measure identifier. Pass it in the product's measure field
Fieldcode Typenumber RO DescriptionUnit code in the Russian National Classifier of Units of Measurement (OKEI), an integer. Unique within the Bitrix24 account. Required on create
FieldmeasureTitle Typestring | null RO DescriptionUnit of measure name. Required on create, but some existing units return null — their designation is then provided in symbolIntl and symbolLetterIntl
Fieldsymbol Typestring | null RO DescriptionShort designation. null if not set
FieldsymbolIntl Typestring | null RO DescriptionInternational designation. null if not set
FieldsymbolLetterIntl Typestring | null RO DescriptionInternational letter designation. null if not set
FieldisDefault Typestring RO DescriptionDefault unit on the Bitrix24 account: Y or N. Other values are rejected

Response example

JSON
{
  "success": true,
  "data": {
    "fields": {
      "id": {
        "type": "number",
        "readonly": true,
        "label": "ID",
        "description": "Measure identifier."
      },
      "code": {
        "type": "number",
        "readonly": false,
        "required": true,
        "label": "OKEI code",
        "description": "Unique OKEI measure code."
      },
      "measureTitle": {
        "type": "string",
        "readonly": false,
        "required": true,
        "nullable": true,
        "label": "Measure name",
        "description": "Measure name."
      },
      "symbol": {
        "type": "string",
        "readonly": false,
        "nullable": true,
        "label": "Symbol",
        "description": "Short symbol."
      },
      "symbolIntl": {
        "type": "string",
        "readonly": false,
        "nullable": true,
        "label": "International symbol",
        "description": "International symbol."
      },
      "symbolLetterIntl": {
        "type": "string",
        "readonly": false,
        "nullable": true,
        "label": "International letter symbol",
        "description": "International letter symbol."
      },
      "isDefault": {
        "type": "string",
        "readonly": false,
        "label": "Default measure",
        "description": "Y if this is the portal default, N otherwise. Only one measure can be default.",
        "enum": [
          { "value": "Y", "label": "Default" },
          { "value": "N", "label": "Not default" }
        ]
      }
    },
    "batch": ["create", "update", "delete"]
  }
}

Error response example

401 — API key not provided:

JSON
{
  "success": false,
  "error": {
    "code": "MISSING_API_KEY",
    "message": "API key required. Pass via X-Api-Key header."
  }
}

Errors

HTTP Code Description
HTTP403 CodeSCOPE_DENIED DescriptionThe API key does not have the catalog scope
HTTP401 CodeMISSING_API_KEY DescriptionThe X-Api-Key header is not provided
HTTP401 CodeTOKEN_MISSING DescriptionThe API key has no configured tokens
HTTP429 CodeRATE_LIMITED DescriptionRequest limit exceeded: 300 per minute per Bitrix24 account. All API keys of the account share one limit. The current limit is returned in the x-ratelimit-limit header. Retry after the interval given in the Retry-After header

For the full list of common API errors, see Errors.

See also