#Orders

Entity: order | Scope: sale | Base path: /v1/orders

SPA entity (camelCase field names) — field names pass through without transformation.

#Operations

Method Path Description Bitrix24 Method
GET /v1/orders List all (with filter, sort, pagination) sale.order.list
GET /v1/orders/:id Get by ID sale.order.get
POST /v1/orders Create new sale.order.add
PATCH /v1/orders/:id Update by ID sale.order.update
DELETE /v1/orders/:id Delete by ID sale.order.delete
GET /v1/orders/fields Get available fields sale.order.getFields

#Fields

API Name Bitrix24 Name Type Readonly Description
id id number yes Идентификатор записи
accountNumber accountNumber string
price price number
currency currency string
statusId statusId string
userId userId number
dateInsert dateInsert datetime yes
dateUpdate dateUpdate datetime yes
payed payed boolean
canceled canceled boolean

#Aggregatable Fields

These fields can be used with the aggregation engine for analytics:

  • price
  • statusId
  • payed
  • canceled

#Examples

#List

Terminal
curl -X GET '/v1/orders?limit=10' \
  -H 'X-Api-Key: YOUR_KEY'

#Get by ID

Terminal
curl -X GET '/v1/orders/123' \
  -H 'X-Api-Key: YOUR_KEY'

#Create

Terminal
curl -X POST '/v1/orders' \
  -H 'X-Api-Key: YOUR_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"accountNumber":"value","price":1,"currency":"value"}'

#Update

Terminal
curl -X PATCH '/v1/orders/123' \
  -H 'X-Api-Key: YOUR_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"title":"updated"}'

#Delete

Terminal
curl -X DELETE '/v1/orders/123' \
  -H 'X-Api-Key: YOUR_KEY'

#Batch

Terminal
curl -X POST '/v1/batch' \
  -H 'X-Api-Key: YOUR_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"calls":[{"entity":"orders","action":"list","params":{"limit":5}}]}'