Get orders list
Description
Retrieves a list of all orders in an account or orders for a specific touchpoint.
Request URL
Method: POST
https://example.com/api/v1.1/market/orders/list
Request parameters
Parameter | Type | Example | Required | Descrption |
---|---|---|---|---|
token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
from_id | string | "2oDantiaiPtY-b7b41276360564d4" | No | The pointer to the next page. It is taken from the previous request, or passed empty for the first one. |
limit | int | 3 | No | Order list limit |
endpoint | string | "website" | No | Touchpoint. Passed if it is necessary to get a list of orders for a specific touchpoint. |
Request example
- JSON
- XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"from_id": "",
"limit": 1,
"endpoint": "qwerty"
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<from_id></from_id>
<limit>1</limit>
<endpoint>qwerty</endpoint>
</xml>
Response example
- JSON
- XML
{
"error": 0,
"error_text": "",
"next_from_id": "2p2FXnb7zzoh-26167c2af5162ca4",
"result": [
{
"profile": {
"profile_id": "61addfc13f62fc8440i8b013",
"xxh": "636gcaf5614536asf"
},
"external_id": "12345678-0001",
"endpoint": "website",
"status": "new",
"delivery_cost": "50000",
"total_price": "4549000",
"currency": "RUB",
"custom_fields": {},
"lines": [
{
"external_id": "line_DwWuNkAYV",
"product": "xiaomi_11T",
"base_price_per_item": "4499000",
"min_price_per_item": "0",
"final_price_per_item": "4499000",
"count": 1,
"custom_fields": {},
"currency": "RUB"
}
],
"create_time": "2021-12-27T09:38:39Z",
"update_time": "2021-12-27T09:38:39Z"
}
]
}
<xml>
<next_from_id>2p2FXnb7zzoh-26167c2af5162ca4</next_from_id>
<result>
<profile>
<profile_id>61addfc13f62fc8440i8b013</profile_id>
<xxh>636gcaf5614536asf</xxh>
</profile>
<external_id>12345678-0001</external_id>
<endpoint>website</endpoint>
<status>new</status>
<delivery_cost>50000</delivery_cost>
<total_price>4549000</total_price>
<currency>RUB</currency>
<custom_fields/>
<lines>
<external_id>line_DwWuNkAYV</external_id>
<product>xiaomi_11T</product>
<base_price_per_item>4499000</base_price_per_item>
<min_price_per_item>0</min_price_per_item>
<final_price_per_item>4499000</final_price_per_item>
<count>1</count>
<custom_fields/>
<currency>RUB</currency>
</lines>
<create_time>2021-12-27T09:38:39Z</create_time>
<update_time>2021-12-27T09:38:39Z</update_time>
</result>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>
Response parameters
Parameter | Type | Descrption |
---|---|---|
error | int | Error code |
error_text | string | Error text |
next_from_id | string | The pointer must be passed in the next request to get another piece of data until the output of the result contains 0 lines of history. |
result | array | Array of received data on orders |