v2/ListOrder¶
Use this API to get order list of all orders which are updated within specific period of time
POST /openapi/order/v2/list-order
Request Parameters¶
Parameter | Type | Required | Description |
---|---|---|---|
size |
integer |
false |
Page size, default is 10, max page entries should be less than or equal to 100 |
channel |
string |
false |
Default null for all channels, see Ginee Channel for details |
shopIdList |
array(string) |
false |
Default null for all shop, should be an existed shop id may start with SH , Maximum 50 |
orderNumbers |
string[] |
false |
E-commerce marketplace order number (order number displayed in the ginee erp order list),Maximum of 100 |
orderStatus |
string |
false |
Default null, please refer to Order Status for details |
orderType |
string |
false |
Default null, please refer to Order Type for details |
createSince |
UTC timestamp |
false |
Channel market create time, The createSince and createTo fields specify a date range for retrieving inventories (based on the order create time),one of createSince and lastUpdateSince must have a value |
createTo |
UTC timestamp |
false |
Channel market create time, The createSince and createTo fields specify a date range for retrieving inventories (based on the order create time),A single request can only query data within 15 days, createSince and createTo must be within 15 days if they have a value |
lastUpdateSince |
UTC timestamp |
false |
Channel market update time, The lastUpdateSince and lastUpdateTo fields specify a date range for retrieving inventories (based on the order update time) |
lastUpdateTo |
UTC timestamp |
false |
Channel market update time, The lastUpdateSince and lastUpdateTo fields specify a date range for retrieving inventories (based on the order update time),A single request can only query data within 15 days. lastUpdateSince and lastUpdateTo, if they have values, must be within 15 days |
nextCursor |
object[] |
false |
Gets the index of the next page, the nextCursor of the last data in the Response is used as a parameter. |
historicalData |
boolean |
false |
Whether it is historical data, if it is more than 3 months from the current time, it is historical data and the value should be true, if it is within 3 months, it is not historical data and can be ignored, default false |
Response Parameters¶
Parameter | Type | Description |
---|---|---|
content |
array(object) |
order data,See Order Info |
nextCursor |
array(object) |
Gets the index of the next page |
Order Info¶
Parameter | Type | Description |
---|---|---|
orderId |
string |
Order id |
country |
string |
The Country the order belongs to |
channel |
string |
The Channel the order belongs to |
shopId |
string |
The Shop the shop belongs to |
orderType |
string |
Default null, see Order Type for details |
orderStatus |
string |
Default null, see Order Status for details |
currency |
string |
Order currency |
totalAmount |
decimal |
Order total amount |
paymentMethod |
string |
Payment method |
problemOrderTypes |
array |
Problem type,values: STOCKOUT,DISTRIBUTION_UNASSIGNED_WAREHOUSE, DISTRIBUTION_MSKU_NOT_MATCHED, DISTRIBUTION_MSKU_NOT_MATCHED_WAREHOUSE, DISTRIBUTION_WAREHOUSE_ALLOCATION_ERROR, DISTRIBUTION_FAILED_CREATE_OUT_ORDER |
promisedToShipBefore |
string |
Last ship to date |
createAt |
UTC timestamp |
Order create time |
payAt |
UTC timestamp |
Order pay time |
lastUpdateAt |
UTC timestamp |
Order last update date time |
externalOrderId |
string |
Channel market order id |
externalOrderSn |
string |
Channel market order sn |
externalOrderStatus |
string |
Channel market order status |
externalCreateAt |
UTC timestamp |
Channel market order create time |
externalUpdateAt |
UTC timestamp |
Channel market order update time |
Request Example¶
!!! example(First request)
``` bash
curl -X POST \
-H "X-Advai-Country: ID" \
-H "Authorization: {Your Access Key} + ':' + signature" \
-H "Content-Type: application/json" \
-d '{
"lastUpdateSince":"2020-12-01T00:00:00Z",
"lastUpdateTo":"2020-12-15T00:00:00Z"
}' \
"{Ginee Host}/openapi/order/v2/list-order"
```
Success
{
"code": "SUCCESS",
"message": "成功",
"data": {
"more": true,
"nextCursor": [
166589111743000,
"22101611H6BFDRYH-0"
]
"content": [
{
"orderId": "SO634B738DCFF47111184F103",
"channel": "SHOPEE_ID",
"shopId": "SH5F066B59E21B84001111A97",
"orderType": "NORMAL",
"orderStatus": "SHIPPING",
"country": "ID",
"currency": "IDR",
"totalAmount": 276691.0,
"paymentMethod": "COD",
"problemOrderTypes": ["STOCKOUT","DISTRIBUTION_FAILED_CREATE_OUT_ORDER"],
"payAt": null,
"promisedToShipBefore": "2022-10-18T02:59:35Z",
"createAt": "2022-10-16T02:59:25Z",
"lastUpdateAt": "2022-10-17T15:06:25Z",
"externalShopId": null,
"externalOrderId": "221016111193B",
"externalOrderSn": "221016111193B",
"externalOrderStatus": "SHIPPED",
"externalCreateAt": "2022-10-16T02:59:22Z",
"externalUpdateAt": "2022-10-17T13:32:47Z",
"closeAt": null,
"customerName": "Herry PS",
"totalQuantity": 1
},
{
"orderId": "SO634B7DA111177C000148CACF",
"channel": "SHOPEE_ID",
"shopId": "SH5F066B59111184000174CA97",
"orderType": "NORMAL",
"orderStatus": "SHIPPING",
"country": "ID",
"currency": "IDR",
"totalAmount": 90790.0,
"paymentMethod": "Online Payment",
"problemOrderTypes": null,
"payAt": "2022-10-16T03:43:14Z",
"promisedToShipBefore": "2022-10-18T03:43:25Z",
"createAt": "2022-10-16T03:42:27Z",
"lastUpdateAt": "2022-10-17T15:06:25Z",
"externalShopId": null,
"externalOrderId": "221011111BFDRYH",
"externalOrderSn": "2210111111FDRYH",
"externalOrderStatus": "SHIPPED",
"externalCreateAt": "2022-10-16T03:42:23Z",
"externalUpdateAt": "2022-10-17T14:28:20Z",
"closeAt": null,
"customerName": "Rohmadi",
"totalQuantity": 1,
"nextCursor": [
166589111743000,
"22101611H6BFDRYH-0"
]
}
]
},
"extra": null,
"transactionId": "1239aa187881c2e1",
"pricingStrategy": "PAY"
}
!!! example(Get Next Page)
``` bash
curl -X POST \
-H "X-Advai-Country: ID" \
-H "Authorization: {Your Access Key} + ':' + signature" \
-H "Content-Type: application/json" \
-d '{
"lastUpdateSince":"2020-12-01T00:00:00Z",
"lastUpdateTo":"2020-12-15T00:00:00Z",
"nextCursor": [
166589111743000,
"22101611H6BFDRYH-0"
]
}' \
"{Ginee Host}/openapi/order/v2/list-order"
```
Parameter error
{
"code": "PARAMETER_ERROR",
"message": "StartTime should less than or equals endTime",
"data": null,
"extra": null
}