Skip to main content

Update the device link status

This API updates the link status between a TINGEEBOX device and shops/account numbers. Use it when you need to change the shop that manages a device or temporarily unlink it.

POST
URLhttps://open-api.tingee.vn/v1/device/update-shop-device-link-status

Update the list of shops whose transactions the TINGEEBOX device is allowed to show.

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 (the device must be linked to the Merchant).
typestring✕Device type (per DeviceTypeEnum, e.g. tingee-box-3ls). No need to pass it — the system determines it from uuid.
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).
shopsLinkToDeviceDtosobject[]✓List of shops whose link status to update. See details.

shopsLinkToDeviceDtos details​

FieldTypeRequiredDescription
shopIdnumber~Shop ID.
Required if vaAccountNumber is not passed.
vaAccountNumberstring~VA account number; the system uses the shop that contains this account when shopId is not passed.
Required if shopId is not passed.
isLinkToDeviceboolean✓true: link the device to the shop, false: unlink.
shopNamestring✕Shop name (for reference only; not used by the system).
fullAddressstring✕Shop address (for reference only; not used by the system).

Code samples​

curl --location --request POST 'https://open-api.tingee.vn/v1/device/update-shop-device-link-status' \
--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",
"type": "app-tingee",
"appType": "ocb-web",
"shopsLinkToDeviceDtos": [
{
"shopName": "Shop Demo",
"shopId": 101,
"isLinkToDevice": true,
"fullAddress": "123 Main St",
"vaAccountNumber": "123456789"
}
]
}'

Sample Response​

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

Common error codes​

CodeDescriptionHow to handle
1028Device not foundCheck that the device uuid is linked to the Merchant (or the merchantId passed).
1072Virtual account number linked to the Merchant not foundCheck that vaAccountNumber in shopsLinkToDeviceDtos belongs to the Merchant.
1070, 1071Shop does not exist or has been deletedCheck that the shopId / the virtual account's shop belongs to the Merchant and has not been deleted.
1104Shop has an account at a different bank than the one the device is locked toOnly link the device to shops whose accounts are at the same bank.
1037TingeeBox devices locked to different banks cannot be linked to the same shopDo not put devices locked to different banks in the same 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.