Skip to main content

Add a device to a shop (Add Device To Shop)

This API links a TINGEEBOX device to a shop or a virtual account (VA). Once registered, the device can perform tasks such as showing QR codes, reading amounts aloud, or announcing transaction notifications.

POST
URLhttps://open-api.tingee.vn/v1/device/add-device-to-shop

Link a new TINGEEBOX device to the Merchant's management system.

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 (max 50 characters).
securityCodestring✓Device security code (max 100 characters). Call Read out security code so the device reads the code aloud, then pass the code the user heard.
vaAccountNumbersstring[]~List of VA account numbers; the device is linked to the shops that contain these accounts.
Required if shopIds is not passed; ignored when shopIds is passed.
shopIdsnumber[]~List of shop IDs to link
(Required if vaAccountNumbers is not passed).
appTypestring✓Integration platform (per AppTypeEnum): baas, ocb-web, ocb-app, bidv-web, bidv-app, stb-web, stb-app, vcb-web, vcb-app, tingee-web, tingee-app, tingee-merchant-app, TingeeMerchant, loa-hub, mini-app-mbb, mini-app-zalo.
The device type must be allowed on this platform in TINGEE's configuration. Open API partners usually pass baas (or the value TINGEE provides when issuing the account).

Code samples​

curl --location --request POST 'https://open-api.tingee.vn/v1/device/add-device-to-shop' \
--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",
"securityCode": "ABC123XYZ",
"shopIds": [
12
],
"appType": "ocb-web",
"vaAccountNumbers": [
"123456789"
]
}'

Sample Response​

{
"code": "00",
"message": "Success",
"data": [
{
"type": "tingee-box-3ls",
"uuid": "DEVICE-001"
}
]
}
FieldTypeDescription
codestringResult code (00 = success).
messagestringResponse message.
dataarrayTingeeBox devices currently linked to the shop (the last shop processed in the list), including the newly added device.
data[].typestringDevice type (e.g. tingee-box-3ls).
data[].uuidstringDevice UUID.

Common error codes​

CodeDescriptionHow to handle
1078Incorrect device security codeCall Read out security code so the device reads a new code, then resend immediately; the code changes automatically after about 30 seconds.
1055Device is already linked to another business/household businessCheck uuid; ask the previous owner to unlink it or contact TINGEE to reset the device.
1028Device not foundCheck the device uuid.
1047Virtual account number not foundCheck that vaAccountNumbers belong to the calling Merchant.
1070Shop does not exist or has been deletedCheck that shopIds belong to the Merchant and have not been deleted.
1037, 1038Device is locked to a different bank than the shop's existing devices/accountsOnly link devices locked to the same bank as the shop, or choose another shop.
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.