[POST] .../v1/docorderdelivery/getcount
Returns number retail orders. Use this method to count retail order delivery documents for dashboards, pagination previews and monitoring screens that do not need the full document payload. The request supports filters such as id, code, status_id, stock_id, customer_id, operating_cash_id, from_id, external_code, date/start_date/end_date, deleted_mark and blocked. The method requires the retail order select permission, applies the current request user's stock visibility and returns result with the matching document count. Business errors such as a missing request body, denied access, disabled retail-orders tariff, invalid filters, database errors or persistent count failures are returned as HTTP 200 ErrorResult. The request supports sort_orders.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| filters | Array of Filter | Optional | Optional filters by fields available for this API method. |
| limit | Int32 | Optional | Maximum number of records to return. |
| offset | Int32 | Optional | Offset from the beginning of the result set. |
| search | String | Optional | Search string. |
| sort_orders | Array of DocOrderDeliveryColumn | Optional | Output parameter sorting. |
Filterable Fields
| Field | Type | Description |
|---|---|---|
| blocked | bool | Document lock: true - locked, false - not locked. |
| code | string | Retail order document code. |
| customer_id | int | Customer IDs. |
| date | int | |
| deleted_mark | bool | Deletion mark: true - marked for deletion, false - not marked. |
| end_date | int | Period end date as Unix time in seconds. |
| external_code | string | Order code in the external system. |
| from_id | int | Retail order source ID array. |
| id | int | Retail order document ID array. |
| operating_cash_id | int | Operating cash ID array. |
| start_date | int | Period start date as Unix time in seconds. |
| status_id | int | Document status ID array. |
| stock_id | int | Stock IDs. |
Sortable Fields
| Field |
|---|
| amount |
| blocked |
| card.barcode_value |
| code |
| courier.name |
| customer.name |
| date |
| deleted_mark |
| delivery_date |
| delivery_type.name |
| external_code |
| from.name |
| id |
| last_update |
| operating_cash_id |
| payment_type.name |
| price_type.currency.name |
| price_type.name |
| status.name |
| stock.name |
Request Example
{
"filters": [
{
"Field": "blocked",
"Operator": "Equal",
"Value": "string"
}
],
"limit": 1,
"offset": 1,
"search": "string",
"sort_orders": [
{
"column": "date",
"direction": "ASC"
}
]
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Int64 | Result object. |
Response Example
{
"ok": true,
"result": 1
}