Skip to main content

List orders

Applies to: API integrators with third-party API access.

Use Content-Type: application/json and optionally X-Locale: en. The third-api-token header is required. See common headers and error handling.

Brief Description

  • Paginated query for the order list of a single device
  • deviceCode is required; optional tradeNo filters by external trade number (tradeNoOut)
  • Pagination is passed via URL Query (current / size); filter conditions are passed via Request Body
  • includeHistory controls whether archived historical orders are included:
    • false (default): query current orders only
    • true: query both current and archived orders
  • Data scope follows the user identity and groupId associated with the Token; the device must be within the current permission scope
  • Results are sorted by business time descending (prefer pay_end_timestamp; fall back to trade_start_timestamp)

Request URL

  • https://{GATEWAY_HOST}/third-center-web/openapi/v1/phamboxOrder/queryOrderList?current=1&size=10

Request Method

  • POST
Parameter NameRequiredTypeDescription
third-api-tokenYesstringAccess token obtained from the login interface

Parameters

URL Query:

Parameter NameRequiredTypeDescription
currentNointCurrent page number; default is 1
sizeNointNumber of records per page; default is 10

Request Body:

Parameter NameRequiredTypeDescription
deviceCodeYesstringDevice code
tradeNoNostringExternal trade number (tradeNoOut); leave empty to query by device only
includeHistoryNobooleanWhether to include archived historical orders. Default is false (current orders only). Set to true to also query archived orders

Response Example

{
"code": 200,
"msg": "success",
"enMsg": null,
"data": {
"total": 35,
"current": 1,
"size": 10,
"records": [
{
"orderId": "ord-10001",
"orgId": "org-001",
"deviceCode": "KIOSK-001",
"payChannelCodeInt": 8001,
"totalAmount": 1299,
"tradeNo": "OUT202607170001",
"userId": "user-openid-001",
"detailVOList": [
{
"aisleCode": "A01",
"goodsId": "goods-001",
"goodsName": "Vitamin C 500mg",
"payAmount": 1299,
"shipmentAisleCode": "A01",
"shipmentStatus": 1,
"shipmentFailDesc": null,
"shipmentErrCode": null,
"shipmentTime": "2026-07-17 10:00:00"
}
]
}
]
}
}

Response Parameter Description

Response data: A pagination object on success. An empty result keeps the pagination wrapper with records: [].

Errors: data may be null, a string or an array of messages. Check the HTTP status and code before reading success data. See error handling.

Response:

Parameter NameTypeDescription
totallongTotal number of matching orders
currentlongCurrent page number
sizelongPage size
recordsarrayOrder list of the current page
records[].orderIdstringOrder ID
records[].orgIdstringOrganization ID
records[].deviceCodestringDevice code
records[].payChannelCodeIntintPayment channel code; see channel codes
records[].totalAmountintTotal amount (minor currency unit, e.g. cents)
records[].tradeNostringExternal trade number (tradeNoOut)
records[].userIdstringUser identifier
records[].detailVOListarrayOrder line items
records[].detailVOList[].aisleCodestringAisle code
records[].detailVOList[].goodsIdstringProduct ID
records[].detailVOList[].goodsNamestringProduct name
records[].detailVOList[].payAmountintPaid amount (minor currency unit)
records[].detailVOList[].shipmentAisleCodestringShipment aisle code
records[].detailVOList[].shipmentStatusintShipment status: 1 succeeded, 2 notification in progress, 64 failed; preserve other codes as unknown
records[].detailVOList[].shipmentFailDescstring / nullShipment failure description
records[].detailVOList[].shipmentErrCodestring / nullShipment error code
records[].detailVOList[].shipmentTimestring / nullShipment time, when available; see date format

Notes

  • If deviceCode is missing or blank, the API returns a business error.
  • If the device is not within the current Token group permission scope, the API returns a business error (phambox.scope.deviceNotInScope).
  • If current / size are omitted, the API defaults to page 1 with size 10.
  • If includeHistory is omitted or null, it is treated as false (current orders only).
  • Breaking change vs previous API: data is now a pagination object (total / current / size / records) instead of { "list": [...] }. Read items from data.records.