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
{
"token": "abcdefghijklmnqrstuvwxyz",
"from_id": "",
"limit": 3,
"endpoint": "qwerty"
}
Response example
{
"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"
},
{
"profile": {
"profile_id": "35bddfc13f62fc844058b093",
"xxh": "3560caf56145360f"
},
"external_id": "1234009",
"endpoint": "website",
"tags": [
"one",
"two"
],
"status": "delivered",
"delivery_cost": "10000",
"total_price": "100000",
"currency": "USD",
"custom_fields": {
"order_field_id_123": "data"
},
"region": "region_YnCrJj8Y1",
"lines": [
{
"external_id": "line_01",
"product": "iphone_test_1",
"base_price_per_item": "90000",
"min_price_per_item": "90000",
"final_price_per_item": "90000",
"count": 1,
"custom_fields": {
"1234": "data",
"line_field_id_123": "data"
},
"currency": "USD"
}
],
"create_time": "2021-12-29T10:48:23Z",
"update_time": "2021-12-29T10:48:23Z"
},
{
"profile": {
"profile_id": "21bddfc13f62fc844058b093",
"xxh": "2160caf56145360f"
},
"external_id": "1234008",
"endpoint": "website",
"tags": [
"one",
"two"
],
"status": "delivered",
"delivery_cost": "10000",
"total_price": "100000",
"currency": "USD",
"custom_fields": {
"order_field_id_123": "data"
},
"region": "region_YnCrJj8Y1",
"lines": [
{
"external_id": "line_01",
"status": "refunded",
"product": "iphone_test_1",
"base_price_per_item": "90000",
"min_price_per_item": "90000",
"final_price_per_item": "90000",
"count": 1,
"custom_fields": {
"1234": "data",
"line_field_id_123": "data"
},
"currency": "USD"
}
],
"create_time": "2021-12-29T10:49:22Z",
"update_time": "2021-12-29T10:49:22Z"
}
]
}
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 |