Register webhooks
Register url to receive order status or inventory stock or aftersale status (FD/CR) when it changes
1. API endpoint
https://api.tikinow.vn/business/v1/register-webhooks
2. Header request
Content-Type: application/json
Authorization: Bearer + token: token get from API get token or login into public app, in-house app
3. CURL Example
curl --location 'https://api.tikinow.vn/business/v1/register-webhooks' \
--header 'Authorization: Bearer xxx' \
--header 'Content-Type: application/json' \
--data '{
"sync_inventory_location": [
"sgn3",
"tbn1",
"tbn2",
"tbn3",
"tiger1",
"tiger2"
],
"sync_webhook": {
"order": {
"url": "https://your_domain/webhooks/order",
"secret_key": "sjYKaAFXDaS4qxeykux4WL1qMI0gzAc0"
},
"stock": {
"url": "https://your_domain/webhooks/stock",
"secret_key": "sjYKaAFXDaS4qxeykux4WL1qMI0gzAc0"
}
"aftersale": {
"url": "https://your_domain/webhooks/aftersale",
"secret_key": "sjYKaAFXDaS4qxeykux4WL1qMI0gzAc0"
}
},
"external_partner_id": "41235121321"
}'
4. Payload
| Field | Type | Mandatory | Description |
|---|---|---|---|
| sync_inventory_location | Array | Yes | List of Tiki warehouse code |
| sync_webhook | Object | Yes | Webhook register info |
| sync_webhook.order | Object | Yes | Webhook order info |
| sync_webhook.order.url | String | Yes | URL receive order status |
| sync_webhook.order.secret_key | Float | Yes | Secret key to hash payload data, must string length 32 characters, ref: https://randomkeygen.com/ get key in CodeIgniter Encryption Keys – Can be used for any other 256-bit key requirement. |
| sync_webhook.stock | Object | No | Webhook inventory stock info, If you don’t want to receive the data, you don’t need to declare it. |
| sync_webhook.stock.url | String | Yes | URL receive inventory stock |
| sync_webhook.stock.secret_key | String | Yes | Secret key to hash payload data, must string length 32 characters, ref: https://randomkeygen.com/ get key in CodeIgniter Encryption Keys – Can be used for any other 256-bit key requirement. |
| sync_webhook.aftersale | Object | No | Webhook CR/FD. If you don’t want to receive the data, you don’t need to declare it. |
| sync_webhook.aftersale.url | String | Yes | URL receive FD/CR |
| sync_webhook.aftersale.secret_key | String | Yes | Secret key to hash payload data, must string length 32 characters, ref: https://randomkeygen.com/ get key in CodeIgniter Encryption Keys – Can be used for any other 256-bit key requirement. |
| external_partner_id | String | No | Shop ID or Shop code |
5. Response
Error
{
"success": false,
"error": {
"status_code": 401,
"message": "Unauthorized",
"message_code": "INVALID_TOKEN"
},
"meta_data": {
"request_id": "97b2702c775f57c565b5a3c6f01052a1"
}
}
Success
{
"success": true,
"meta_data": {
"request_id": "97b2702c775f57c565b5a3c6f01052a1"
}
}