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
Header
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| third-api-token | Yes | string | Access token obtained from the login interface |
| Content-Type | Yes | string | application/json |
Parameters
Send a JSON object as the request body. When using only defaults, send {}; optional fields do not make the body optional.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| startTimestamp | No | long | Start time for statistics (timestamp in milliseconds) |
| endTimestamp | No | long | End time for statistics (timestamp in milliseconds) |
| deviceCode | No | string | Device 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 Name | Type | Description |
|---|---|---|
| kioskCode | string | Device code |
| kioskName | string | Device name |
| unitsSold | long | Quantity of items sold (0 when there are no sales) |
Remarks
- Recommended header:
X-Locale: en - Results are sorted by
unitsSolddescending; ties are sorted bykioskCodeascending - If
deviceCodeis outside the visible scope, a business error is returned (phambox.scope.deviceNotInScope)