Skip to main content

List devices

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 of device (kiosk) list for the current OpenAPI user
  • Data scope follows the user identity and selected groupId associated with the Token
  • Supports optional filters: device code, device name, group, Business Logic, Status, and online status
  • Each row includes online status (isOnline); this is not the same as Status (status)

Request URL

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

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.

URL Query:

Parameter NameRequiredTypeDescription
currentNointPage number, default 1
sizeNointPage size, default 10

Request Body:

Parameter NameRequiredTypeDescription
deviceCodeNostringDevice code (exact match)
deviceNameNostringDevice name (fuzzy match)
groupIdNostringExtra filter by group; overall data scope is still limited by the Token account / selected group
businessLogicNointBusiness Logic: 0=Vending, 1=Sampling
statusNointStatus (business operating status, not online): 1=Active, 2=InActive, 3=Pending Install, 4=Out Of Service
isOnlineNointOnline filter: 1=online only, 0=offline only

Response Example

{
"code": 200,
"msg": "success",
"enMsg": null,
"data": {
"total": 1,
"current": 1,
"size": 10,
"records": [
{
"deviceCode": "KIOSK-EXAMPLE-001",
"deviceName": "Example Lobby Kiosk",
"businessLogic": 1,
"status": 1,
"isOnline": 1,
"modelId": "model-001",
"modelName": "Example Model",
"locationId": "loc-001",
"locationName": "Lobby",
"locationText": "Main lobby entrance",
"tax": 0.08,
"lastTransactionTimestamp": 1710000000000,
"lastServiceTimestamp": 1709500000000,
"groups": [
{
"groupId": "g-001",
"groupName": "Downtown"
}
]
}
]
}
}

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 records
currentlongCurrent page number
sizelongPage size
recordsarrayDevice list
records[].deviceCodestringDevice code
records[].deviceNamestringDevice name
records[].businessLogicintBusiness Logic: 0=Vending, 1=Sampling
records[].statusintStatus: 1=Active, 2=InActive, 3=Pending Install, 4=Out Of Service
records[].isOnlineintOnline status: 1=online, 0=offline
records[].modelIdstringDevice model ID
records[].modelNamestringDevice model name
records[].locationIdstringLocation ID
records[].locationNamestringLocation name
records[].locationTextstringFree-text location
records[].taxdouble / nullTax rate as a decimal ratio (e.g. 0.08 means 8%)
records[].lastTransactionTimestamplong / nullLast transaction time (Unix milliseconds); null when unavailable
records[].lastServiceTimestamplong / nullLast service / last main online time (Unix milliseconds); null when unavailable
records[].groupsarrayBound groups
records[].groups[].groupIdstringGroup ID
records[].groups[].groupNamestringGroup name

Notes

  • status is the business operating status shown as Active / InActive / Pending Install / Out Of Service. isOnline is the device connectivity status. Do not treat status as online/offline.
  • Request and response use the same field names for Business Logic (businessLogic) and Status (status).
  • Queries use the selected Group and the supplied filters.
  • Request header must include Content-Type: application/json and third-api-token; X-Locale: en is recommended.