Skip to content

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 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 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 The lastUpdateSince and lastUpdateTo fields specify a date range for retrieving inventories (based on the order update time)
lastUpdateTo UTC timestamp false 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
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
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 External order id
externalOrderSn string External order sn
externalOrderStatus string External order order status
externalCreateAt UTC timestamp External order create time
nextCursor object[] Gets the index of the next page
more boolean Is there any more data

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,
        "content": [
            {
                "orderId": "SO634B738DCFF47111184F103",
                "channel": "SHOPEE_ID",
                "shopId": "SH5F066B59E21B84001111A97",
                "orderType": "NORMAL",
                "orderStatus": "SHIPPING",
                "country": "ID",
                "currency": "IDR",
                "totalAmount": 276691.0,
                "paymentMethod": "COD",
                "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,
                "nextCursor": [
                    1665889161100,
                    "221016H3X1193B-0"
                ]
            },
            {
                "orderId": "SO634B7DA111177C000148CACF",
                "channel": "SHOPEE_ID",
                "shopId": "SH5F066B59111184000174CA97",
                "orderType": "NORMAL",
                "orderStatus": "SHIPPING",
                "country": "ID",
                "currency": "IDR",
                "totalAmount": 90790.0,
                "paymentMethod": "Online Payment",
                "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
}