Skip to main content

Sales by device

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

  • Statistics on the quantity of items sold, broken down by device (Kiosk)
  • By default returns all devices in the selected Group; devices with no sales in the time range are still returned with unitsSold=0
  • Optional deviceCode: when provided, returns only that device (must be within the current visible scope)
  • Queries use the account's selected Group.

Request URL

  • https://{GATEWAY_HOST}/third-center-web/openapi/v1/phamboxDashboard/salesByKiosk

Request Method

  • POST
Parameter NameRequiredTypeDescription
third-api-tokenYesstringAccess token obtained from the login interface
Content-TypeYesstringapplication/json

Parameters

Send a JSON object as the request body. When using only defaults, send {}; optional fields do not make the body optional.

Parameter NameRequiredTypeDescription
startTimestampNolongStart time for statistics (timestamp in milliseconds)
endTimestampNolongEnd time for statistics (timestamp in milliseconds)
deviceCodeNostringDevice code; omit to return all visible devices

Response Example

{
"code": 200,
"msg": "success",
"enMsg": null,
"data": [
{
"kioskCode": "K001",
"kioskName": "Lobby Kiosk",
"unitsSold": 256
},
{
"kioskCode": "K002",
"kioskName": "Floor 2 Kiosk",
"unitsSold": 0
}
]
}

Response Parameter Description

Response data: An array on success. An empty visible device set returns []; visible devices without sales remain in the array with unitsSold: 0.

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.

Parameter NameTypeDescription
kioskCodestringDevice code
kioskNamestringDevice name
unitsSoldlongQuantity of items sold (0 when there are no sales)

Remarks

  • Recommended header: X-Locale: en
  • Results are sorted by unitsSold descending; ties are sorted by kioskCode ascending
  • If deviceCode is outside the visible scope, a business error is returned (phambox.scope.deviceNotInScope)