Skip to main content

List devices by shop or VA

This API returns all TINGEEBOX devices linked to a specific shop or a specific virtual account (VA).

POST
URLhttps://open-api.tingee.vn/v1/device/get-devices-link-to-shop-or-va

Query the list of devices by shopId or vaAccountNumber.

Header Request​

HeaderRequiredDescription
Content-Type✓application/json
x-client-id✓Partner identifier issued by TINGEE.
x-signature✓HMAC SHA512 authentication signature. See How to generate the signature.
x-request-timestamp✓Time the request is sent (format: yyyyMMddHHmmssSSS, UTC+7)

Body Parameter​

The data sent in the request body. You only need to pass one of the two values: vaAccountNumber or shopId.

FieldTypeRequiredDescription
merchantIdnumber~Merchant ID
(Required if you connect with a Master Merchant account).
vaAccountNumberstring~VA account number to check; the system returns the devices of the shop that contains this account.
Required if shopId is not passed. If both are passed, vaAccountNumber takes precedence.
shopIdnumber~ID of the shop to query.
Required if vaAccountNumber is not passed.

Code samples​

curl --location --request POST 'https://open-api.tingee.vn/v1/device/get-devices-link-to-shop-or-va' \
--header 'accept: application/json' \
--header 'x-client-id: YOUR_CLIENT_ID' \
--header 'x-request-timestamp: 20240509154004003' \
--header 'x-signature: YOUR_SIGNATURE' \
--header 'Content-Type: application/json' \
--data '{
"vaAccountNumber": "V1THENO84343344"
}'

Sample Response​

{
"code": "00",
"message": "Success",
"data": [
{
"type": "tingee-box-3ls",
"uuid": "DEVICE-001"
}
]
}
FieldTypeDescription
codestringResult code (00 = success).
messagestringResponse message.
dataarrayLinked TingeeBox devices (null if there are no devices).
data[].typestringDevice type (per DeviceTypeEnum, e.g. tingee-box-3ls).
data[].uuidstringDevice UUID.

Common error codes​

CodeDescriptionHow to handle
1031Shop not foundPass a valid shopId or vaAccountNumber that belongs to the Merchant.
1095, 1096Master Merchant merchantId errorPass the merchantId of a sub-Merchant that belongs to the calling Master Merchant.
90, 91, 92, 97Request authentication error (timestamp, client-id, signature)See System error codes.
OthersOther errorsSee Error codes.