get_orders_history
To get the history of orders, use the order/get_orders_history command.
svc=order/get_orders_history¶ms={
"itemId":<long>,
"ivalType":<int>,
"ivalFrom":<uint>,
"ivalTo":<uint>,
"name":"<text>",
"unitId":<long>,
"orderId":<long>,
"orderUid":<long>,
"routeId":<long>
}
Parameters
The required parameters are marked with an asterisk (*).
Parameter | Default value | Description |
---|---|---|
itemId* | Resource ID. | |
ivalType | 1 | Requested interval type, the same as in messages. Possible values are 1,2,3,4. |
ivalFrom | 0 | Interval start time. |
ivalTo | UINT_MAX | Interval end time. |
name | Order name masks. For example, "name": "Vil*,Berl*" will search for orders which start with 'Vil' and 'Berl'. | |
unitId | Unit ID. | |
orderId | Order ID (can be repeated in history). | |
orderUid | Unique order ID. | |
routeId | Route ID. |
Response
{
"orders":[
{...}.
{...},
...
],
"count":<uint>, /* number of the filtered orders (size of "orders") */
"total":<uint> /* total number of orders for the requested period */
}
Error codes
Error code | Description |
---|---|
7 | Invalid resource ID. |
6 | Internal error. |