Skip to main content

Device profile

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

  • Query overview / profile information for a single device (online status, running status, stock, cabinet door status, etc.)
  • deviceCode is required; only one device can be queried per request
  • Data scope follows the user identity and groupId associated with the Token; the device must be within the current permission scope

Request URL

  • https://{GATEWAY_HOST}/third-center-web/openapi/v1/phamboxDevice/deviceProfile

Request Method

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

Parameters

Request Body:

Parameter NameRequiredTypeDescription
deviceCodeYesstringDevice code (single device only)

Response Example

{
"code": 200,
"msg": "success",
"enMsg": null,
"data": {
"list": [
{
"deviceId": "dev-001",
"deviceCode": "KIOSK-001",
"deviceName": "Lobby Kiosk A",
"isRunning": 1,
"isOnline": 1,
"isGoodsMerge": 0,
"totalCurrStock": 120,
"cabinets": [
{
"cabinetCode": 0,
"doorStatus": 0
}
]
}
]
}
}

Response Parameter Description

Response data: object containing a list array on success. An empty result is { "list": [] }, not a top-level array.

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
listarrayDevice profile list (normally 0 or 1 item for a single-device query)
list[].deviceIdstringDevice ID
list[].deviceCodestringDevice code
list[].deviceNamestringDevice name
list[].isRunningint1 within its configured operating schedule (also the default when no schedule exists), 0 outside it; not the device-list business status
list[].isOnlineint / nullMain-controller online flag, normally 1 online / 0 offline; see the missing-telemetry limitation below
list[].isGoodsMergeint / nullGoods merge: 1 enabled, 0 disabled; may be null when settings are absent
list[].totalCurrStocklong / nullTotal current stock; may be null when no stock aggregate is available
list[].cabinetsarray / nullCabinet list; may be null when operational telemetry is absent
list[].cabinets[].cabinetCodeintZero-based cabinet code; the first cabinet is 0
list[].cabinets[].doorStatusintDoor status (1 open, 0 closed)

Notes

  • Online status: isOnline defaults to 1 when no operational record exists and may be null when a record has no online flag. To check connectivity, use List devices or Online devices, which count missing online flags as offline.
  • 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).