Create waybill
This API creates a new waybill for a specified time period.
How to get data
Method
GET
Request address
To get the data, use the address: https://<server_address>/api/api.php?
Request parameters
-
cmd=add_waybill — command to add a waybill
-
ts — start time (Unix timestamp)
-
te — end time (Unix timestamp)
-
agent_id — agent identifier
-
name — name of the waybill
-
node — node number where the command should be executed
Example request
https://<server_address>/api/api.php?cmd=add_waybill&ts=1596022528&te=1596488400&agent_id=44841&name=test+bill1&node=1
|
Response
{
"code": 0,
"data": {
"ts": 1596022528,
"te": 1596488400,
"agent_id": 44841,
"account_id": 3934,
"waybill": {
"name": "test bill1"
}
}
}
|
In response to the API request, the following is returned:
-
code — result code (0 = success)
-
data — object with the created waybill data:
-
ts — waybill start time (Unix timestamp)
-
te — waybill end time (Unix timestamp)
-
agent_id — agent identifier
-
account_id — account identifier
-
waybill.name — name of the waybill