[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Fcatalog-measures\u002Fsearch":3,"docs-tabs-entities\u002Fcatalog-measures\u002Fsearch":6},{"content":4,"lastmod":5},"## Search units of measure\n\n`POST \u002Fv1\u002Fcatalog-measures\u002Fsearch`\n\nSearches product catalog units of measure by conditions passed in the request body as a JSON object.\n\n## Request fields (body)\n\n| Field | Type | Required | Description |\n|------|-----|-------|----------|\n| `filter` | object | no | Filtering by the fields from `GET \u002Fv1\u002Fcatalog-measures\u002Ffields`.\u003Cbr>[Filtering syntax](\u002Fdocs\u002Ffiltering). Example: `{\"isDefault\": \"N\"}` |\n| `sort` | string \\| object \\| array | no | Sorting as a string `\"-code\"`, where the minus means descending, as an object `{\"code\": \"desc\"}`, or as an array of strings `[\"-code\"]`. If omitted, records are sorted by `id` in ascending order |\n| `order` | object | no | Synonym of `sort` in object form: `{\"code\": \"desc\"}` |\n| `select` | string[] | no | Field selection: `[\"id\", \"code\"]`. A comma-separated string is also accepted: `\"id,code\"` |\n| `limit` | number | no | Number of records, from 1 to 5000. Default `50` |\n| `offset` | number | no | Skip N records. Default `0` |\n| `start` | number | no | Uses the same offset value as `offset`. If both are provided, `offset` takes precedence, including `0`; `offset: null` uses `start`. |\n| `autoWindow` | boolean | no | Split the result set into date windows. The unit of measure schema has no date fields, so the value does not affect the result |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-measures\u002Fsearch\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"filter\": { \"isDefault\": \"N\" },\n    \"sort\": \"-code\",\n    \"limit\": 2\n  }'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-measures\u002Fsearch\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"filter\": { \"isDefault\": \"N\" },\n    \"sort\": \"-code\",\n    \"limit\": 2\n  }'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-measures\u002Fsearch', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    filter: { isDefault: 'N' },\n    sort: '-code',\n    limit: 2,\n  }),\n})\n\nconst { success, data, meta } = await res.json()\nconsole.log('Found:', meta.total)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcatalog-measures\u002Fsearch', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    filter: { isDefault: 'N' },\n    sort: '-code',\n    limit: 2,\n  }),\n})\n\nconst { success, data, meta } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | Always `true` on success |\n| `data` | array | Array of units of measure |\n| `data[].id` | number | Unit identifier. Pass it in the product's `measure` field |\n| `data[].code` | number | Unit code in the Russian National Classifier of Units of Measurement (OKEI) |\n| `data[].measureTitle` | string \\| null | Unit of measure name |\n| `data[].symbol` | string \\| null | Short symbol |\n| `data[].symbolIntl` | string \\| null | International symbol |\n| `data[].symbolLetterIntl` | string \\| null | International letter code |\n| `data[].isDefault` | string | Default unit: `Y` or `N` |\n| `meta.total` | number | Number of records matching the filter |\n| `meta.hasMore` | boolean | Whether there are more records beyond `limit` |\n| `meta.durationMs` | number | Request duration in milliseconds |\n| `meta.warnings` | array | Request parsing warnings. Present when `select` contains a name outside the schema (code `UNKNOWN_SELECT_FIELD`) or when `limit: 0` is passed (code `LIMIT_ZERO_IGNORED`: the value is ignored and the default page is returned) |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"code\": 166,\n      \"id\": 7,\n      \"isDefault\": \"N\",\n      \"measureTitle\": null,\n      \"symbol\": null,\n      \"symbolIntl\": \"kg\",\n      \"symbolLetterIntl\": \"KGM\"\n    },\n    {\n      \"code\": 163,\n      \"id\": 5,\n      \"isDefault\": \"N\",\n      \"measureTitle\": null,\n      \"symbol\": null,\n      \"symbolIntl\": \"g\",\n      \"symbolLetterIntl\": \"GRM\"\n    }\n  ],\n  \"meta\": {\n    \"total\": 5,\n    \"hasMore\": true,\n    \"durationMs\": 192\n  }\n}\n```\n\n## Error response example\n\n400 — sorting by a field that is not in the schema:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"UNKNOWN_SORT_FIELD\",\n    \"message\": \"Unknown sort field 'nope' for entity 'catalog-measures'. Available: id, code, measureTitle, symbol, symbolIntl, symbolLetterIntl, isDefault\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 400 | `UNKNOWN_FILTER_FIELD` | Filtering by a field that is not in the unit of measure schema. The message lists the available fields |\n| 400 | `UNKNOWN_SORT_FIELD` | Sorting by a field that is not in the schema. The message lists the available fields |\n| 400 | `INVALID_FILTER_OPERATOR` | Unknown operator in a filter condition, for example `$foo`. The message lists the supported operators |\n| 400 | `INVALID_FILTER_OPERATOR` | A logical key `$or`, `$and`, or `$not` in the filter. For an OR condition on one field, use the `$in` operator. For an OR across different fields, send parallel requests via [`POST \u002Fv1\u002Fbatch`](\u002Fdocs\u002Fbatch) |\n| 400 | `INVALID_SORT_TYPE` | `sort` is not a string, an object, or an array of strings |\n| 400 | `INVALID_SELECT_TYPE` | `select` is not a string or an array of strings |\n| 400 | `INVALID_LIMIT` | `limit` is not a number |\n| 403 | `SCOPE_DENIED` | The API key lacks the `catalog` scope |\n| 401 | `TOKEN_MISSING` | The API key has no configured tokens |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |\n| 429 | `RATE_LIMITED` | Rate limit exceeded: 300 requests per minute per portal. All API keys of the portal share one limit. The current limit is returned in the `x-ratelimit-limit` header. Retry after the delay in the `Retry-After` header |\n\nFor the full list of common API errors, see [Errors](\u002Fdocs\u002Ferrors).\n\n## See also\n\n- [List units of measure](\u002Fdocs\u002Fentities\u002Fcatalog-measures\u002Flist)\n- [Get a unit of measure](\u002Fdocs\u002Fentities\u002Fcatalog-measures\u002Fget)\n- [Unit of measure fields](\u002Fdocs\u002Fentities\u002Fcatalog-measures\u002Ffields)\n- [Filtering syntax](\u002Fdocs\u002Ffiltering)\n- [Batch](\u002Fdocs\u002Fbatch)\n- [Limits and optimization](\u002Fdocs\u002Foptimization)\n","2026-11-19",{},1795415191614]