For AI agents: markdown of this page — /docs-content-en/entities/order-properties/search.md documentation index — /llms.txt

Search order properties

POST /v1/order-properties/search

Searches order property definitions using filter and sort conditions sent in the JSON request body.

Request body fields

Field Type Default Description
Fieldfilter Typeobject Default— DescriptionFilter by fields from GET /v1/order-properties/fields.
Filtering syntax. Example: { "id": 125, "type": "STRING" }
Fieldselect Typestring[] | string Default— DescriptionAn array of fields, for example ["id", "name", "type"], or a comma-separated string. Only selected fields remain in data. Unknown names are reported in meta.warnings with the code UNKNOWN_SELECT_FIELD
Fieldsort Typestring | object | string[] Default— DescriptionSort as "id", "-sort,id", { "id": "desc" }, or ["id", "-sort"]
Fieldorder Typeobject Default— DescriptionSort using an object: { "id": "desc" }. If sort is also set, it takes precedence
Fieldlimit Typenumber Default50 DescriptionNumber of records, from 1 to 5000. Values above 5000 are capped at 5000
Fieldoffset Typenumber Default0 DescriptionNumber of records to skip
FieldwithTotal Typeboolean Default— DescriptionAccepts true or false, but does not change counting or the presence of meta.total for order properties

Pagination. When limit > 50, Vibecode automatically reads multiple pages of 50 records and combines them into one response. To fetch the next set, increase offset by the number of records received. Continue while meta.hasMore is true.

Examples

curl — personal key

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/order-properties/search" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"filter":{"id":125,"type":"STRING"},"select":["id","name","personTypeId","propsGroupId","type","active"],"limit":10,"offset":0,"withTotal":true}'

curl — OAuth application

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/order-properties/search" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"filter":{"id":125,"type":"STRING"},"select":["id","name","personTypeId","propsGroupId","type","active"],"limit":10,"offset":0,"withTotal":true}'

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/order-properties/search', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    filter: { id: 125, type: 'STRING' },
    select: ['id', 'name', 'personTypeId', 'propsGroupId', 'type', 'active'],
    limit: 10,
    offset: 0,
    withTotal: true,
  }),
})

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

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/order-properties/search', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    filter: { id: 125, type: 'STRING' },
    select: ['id', 'name', 'personTypeId', 'propsGroupId', 'type', 'active'],
    limit: 10,
    offset: 0,
    withTotal: true,
  }),
})

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

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata Typearray DescriptionArray of order property definitions. All fields: Order property fields
Fieldmeta.total Typenumber DescriptionTotal properties matching the filter. Omitted on an empty page when offset > 0
Fieldmeta.hasMore Typeboolean DescriptionWhether more records exist beyond the current page
Fieldmeta.durationMs Typenumber DescriptionRequest duration in milliseconds
Fieldmeta.warnings Typearray DescriptionParameter warnings with code, message, and field. Included only when warnings exist
Fieldmeta.pageErrorSample Typeobject DescriptionCode and message of an error that interrupted automatic pagination. data then contains the records read before the interruption

Response example

JSON
{
  "success": true,
  "data": [
    {
      "id": 125,
      "name": "Comment for the courier",
      "personTypeId": 5,
      "propsGroupId": 9,
      "type": "STRING",
      "active": false
    }
  ],
  "meta": {
    "total": 1,
    "hasMore": false,
    "durationMs": 64
  }
}

Error response example

400 — filtering by an unknown field:

JSON
{
  "success": false,
  "error": {
    "code": "UNKNOWN_FILTER_FIELD",
    "message": "Unknown filter field 'unknownField' for entity 'order-properties'. Available: id, personTypeId, type, name, propsGroupId, code, sort, defaultValue, description, settings, xmlId, inputFieldLocation, active, required, multiple, userProps, util, isAddress, isAddressFrom, isAddressTo, isEmail, isFiltered, isLocation, isLocation4tax, isPayer, isPhone, isProfileName, isZip"
  }
}

Errors

HTTP Code Description
HTTP400 CodeUNKNOWN_FILTER_FIELD DescriptionA filter field is not in the schema. Fields: GET /v1/order-properties/fields
HTTP400 CodeINVALID_FILTER_FIELD DescriptionA filter field name starts with the unsupported prefix @ or !@
HTTP400 CodeINVALID_FILTER_OPERATOR DescriptionAn unknown operator, an empty condition object, or a logical $or or $and condition
HTTP400 CodeINVALID_DUPLICATE_FILTER_FIELD DescriptionTwo conditions resolve to the same filter condition. Send one of them
HTTP400 CodeINVALID_SORT_FIELD DescriptionSorting contains the forbidden name __proto__, constructor, or prototype
HTTP400 CodeUNKNOWN_SORT_FIELD DescriptionSorting by an unknown field
HTTP400 CodeINVALID_SORT_DIRECTION DescriptionThe sort direction specified in an object is not one of asc, desc, ASC, DESC, 1, -1
HTTP400 CodeINVALID_FILTER_SHAPE Descriptionfilter is not an object of filter conditions
HTTP400 CodeINVALID_SORT_TYPE DescriptionSorting has an unsupported type
HTTP400 CodeINVALID_LIMIT Descriptionlimit is not a number or a numeric string
HTTP400 CodeINVALID_SELECT_TYPE Descriptionselect is not a string or an array of strings
HTTP400 CodeINVALID_REQUEST DescriptionThe request body is not a JSON object
HTTP422 CodeBITRIX_ERROR DescriptionThe key's user does not have permission in Bitrix24. The Bitrix24 code is in error.b24Code: 200040300010
HTTP403 CodeBITRIX_ACCESS_DENIED DescriptionThe portal credentials do not have the sale scope (insufficient_scope)
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 rejects the request. The reason is in error.message
HTTP403 CodeSCOPE_DENIED DescriptionThe API key does not have the sale scope
HTTP401 CodeMISSING_API_KEY DescriptionThe X-Api-Key header is missing
HTTP401 CodeTOKEN_MISSING DescriptionNo Bitrix24 access tokens are configured
HTTP429 CodeRATE_LIMITED DescriptionThe request rate limit was exceeded. The effective limit is in the x-ratelimit-limit header. Retry after the interval in the Retry-After header

Full list of common API errors: Error codes.

See also