Skip to main content

Have the device read out its security code (Read Security Code)

This API sends a command to a TINGEEBOX device so that it reads its own security code aloud through its speaker. The user (e.g. the cashier) listens to the code and enters it in the step that links the device to a shop (Add device to shop). The security code is not returned in the response.

POST
URLhttps://open-api.tingee.vn/v1/device/read-security-code

Send a command so that the TINGEEBOX device (identified by UUID) reads its security code aloud, for the step that links the device to a shop.

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​

FieldTypeRequiredDescription
merchantIdnumber~Merchant ID
(Required if you connect with a Master Merchant account).
uuidstring✓Unique device identifier (Device UUID).
If the device is already linked, it must belong to the calling Merchant (or the merchantId passed).

Code samples​

curl --location --request POST 'https://open-api.tingee.vn/v1/device/read-security-code' \
--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 '{
"uuid": "DEVICE-001"
}'

Sample Response​

{
"code": "00",
"message": "Success",
"data": null
}
FieldTypeDescription
codestringResult code (00 = success).
messagestringResponse message.
info

The API does not return the security code in the response. The device reads the security code aloud so the user can hear it and enter it in the linking step. After 30 seconds, the system automatically assigns a new security code to the device.


Common error codes​

CodeDescriptionHow to handle
1028Device not foundCheck the device uuid.
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.