[C] Got It API intergration - Tasking scope
| Date | PIC | Version | Changelog |
| 2026-03-04 | Minh | 1. |
Initiate |
Integration Flow
Authentication
1. Get client token
POST {domain}/api/rewardhub/v1.0/token
Got It service provides an API that allows clients to obtain an access token.
Headers
- Content-Type: application/json
-
Accept: application/json
Body request
| # | Name | Type | Required | Description |
|---|---|---|---|---|
| 1 | client_id |
string (255) |
Yes |
Provided by Got It to the client |
| 2 | client_secret |
string (255) |
Yes |
Provided by Got It to the client |
| 3 |
app_uuid
|
string (255) |
Yes |
Provided by Got It to the client |
Example
Request
{
"app_uuid": "9db081d9-eb77-49ea-b882-9d96937fd123",
"client_id": "9db081d9-eb77-49ea-b882-9d96937fManh",
"client_secret": "ugHfM11M1yckEhdd4xvtnLYYDKtPibkDy4gI4000"
}
Response
{
"statusCode": 200,
"statusMessage": "Success",
"data": {
"token_type": "Bearer",
"expires_in": 1296000,
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiI5ZGIwODFkOS1lYjc3LTQ5ZWEtYjg4Mi05ZDk2OTM3Zk1hbmgiLCJqdGkiOiJmODQxNDgzZDkwZTZhMzIyODE1MDFhMDA4NjEzODgxMjEyODY0ZTVhY2ZkMTU3MzkzNTliMDFjOThlMjI3MDEyZWY4YTBmMDhjZmQ5NWJjYyIsImlhdCI6MTc1MDk4ODYwNy45MDQ2ODMsIm5iZiI6MTc1MDk4ODYwNy45MDQ2ODcsImV4cCI6MTc1MjI4NDYwNy44NzU0OTUsInN1YiI6IiIsInNjb3BlcyI6WyJnb3RpdF9leHRlcm5hbF9yZXdhcmRfaHViIl19.rYY31cFN797-07bT2DeQH06a4ThOxi5IIo-dlg7MBCrGIfapi8qba8bZM8q-o4TTm0r3ArXAiglWzgx8DhdceV29n_cb4mZeB_3bJ5m1Vs4mEiRlIer2fnDrS30rWZqx_sp86YlCuO71vz_QUr9x3FskUgihndHxwexnLyGhu2qCBOpr4QHMJk5QNa3ftDFwTyCCYUQwq2VcBitbQginqSqhJ3s_aAvt2jb7uKEFDeD8QkhaZh6yukiwzVHgPOIogyZGJ8YqyxFrsHMfDW0FUvePj_0G5WE5CNKwD9Tua_tR5q7T2olBiJlBZkevHlnBeKXDcGBj0miz-sLxMe7Pg7voFkhtYULbcs735xyjiF2edFVW-bRhio0ZZpLFZFvIV5ZrJ6FUZwFeo6UF4BGORI3h5DljsmBfx2rSRznknclWJiQgOZP1dzN18gvvtMQjcyiyLJ6C11s7CK2S9vvueRhvipCzB5MkdpPF1jXx2hiCe8X2SHkKJ_hSWpucOPItcaOCNari7Kl81n6jkDljhMGmY1kDH69Mm6D7qNZdrwQo0BGPSQv6LAnviFWUOU8DtVZjWE2am_ZKno0_uuGUn-wr3uVbDpehu-hUhmZKXEx2WPaqlXI4oE5UDeG8Xk_hCZ7FidAsF5TAHkuyzaHx_181IfzczRKduYzsno9VrWE"
}
}
APIs Provided by Got It to the Client
1. Get list products
GET {domain}/api/rewardhub/v1.0/gifts
Headers
Params request
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | no | Product name |
| sort_by | string | no | Field name to sort ASC. Value can be in (id, point). Default value id |
| dir | string | no | Direction to sort. Value in asc, desc. Default value: asc |
| from_point | number | no | Filter gift point must >= from_point |
| to_point | number | no | Filter gift point must <= to_point. Validation: to_point >= from_point |
| page | number | no | The page number to retrieve |
| per_page | number | no | The number of items per page |
Example
Get list product
Request
/gifts?page=1&per_page=10
Response
{
"data": [
{
"type": "voucher",
"gift_id": 422,
"price_id": 1899,
"price_value": 100000,
"name": "Voucher Highlands Coffee",
"image": "https://img-stg.gotit.vn/compress/580x580/2025/09/1758182739_EuMAg.png",
"brand": {
"logo": "https://img-stg.gotit.vn/compress/brand/1507286551_cmUef.png",
"name": "Highlands Coffee"
},
"url": "products/422"
},
{
"type": "voucher",
"gift_id": 1561,
"price_id": 1789,
"price_value": 50000,
"name": "Voucher VNVC",
"image": "https://img-stg.gotit.vn/compress/580x580/2025/10/1760429959_ZCj5n.png",
"brand": {
"logo": "https://img-stg.gotit.vn/compress/brand/2023/06/1687338533_Tsw5z.png",
"name": "VNVC"
},
"url": "products/1561"
}
],
"from": 1,
"to": 1,
"current_page": 1,
"last_page": 51,
"per_page": 1,
"total": 51
}
2. API issue gift
GET {domain}/api/rewardhub/v1.0/gifts/issue
Headers
Body request
Example:
POST /api/rewardhub/v1.0/gifts/issue
Authorization: Bearer <gi_access_token>
{
"request_id": "VIB_20260304_000001",
"issuer_identify_id": "id-of-user-A",
"recipient_identify_id": "id-of-user-B",
"source": "externalService",
"current_point": 10000,
"items": [
{
"gift_id": 88001,
"price_id": 99001,
"quantity": 1,
"point": 1000
},
{
"gift_id": 88001,
"price_id": 99002,
"quantity": 1,
"point": 2000
}
]
}
Response
Success
{
"statusCode": 200,
"statusMessage": "success",
"data": {
"transaction_id": "VIB_20260304_000001",
"issuer_identify_id": "id-of-user-A",
"recipient_identify_id": "id-of-user-B",
"created_at": "2026-03-04T10:30:00.000000Z",
"items": [
{
"product_id": 88001,
"product_name": "Voucher Highland Coffee 50k",
"quantity": 1
},
{
"product_id": 88001,
"product_name": "Voucher Highland Coffee 100k",
"quantity": 1
}
],
}
}
Error
{
"statusCode": 401,
"statusMessage": "Unauthorized",
"data": {}
}
List of HTTP Status Codes
| HTTP Status Code | Status Code | Message | Description |
| 200 | 200 | Success | |
| ... | ... | ... | ... |
| 400 | 400 | Bad Request | In case validation fails The status code will be explained in detail |
| ... | ... | ... | ... |
| 400 |
4001 |
client_id or client_secret is invalid |
The system will validate the |
| 400 | 4002 |
The Client ID field is required. | |
| 400 | 4003 |
The Client ID field is invalid. | check validation: > 255 characters |
| 400 | 4004 | The Client Secret field is required. | |
| 400 | 4005 | The Client Secret field is invalid. | check validation: > 255 characters |
| 400 | 4006 | The App UUID field is required. | |
| 400 | 4007 | The App UUID field is invalid. | |
| 400 | 4008 | The User ID field is required. | |
| 400 | 4009 | The User Point field is required. | |
| 400 | 4010 | The User ID field is invalid. | |
| 400 | 4011 | The User Point field is invalid. | |
| 400 | 4012 | The User Name field is invalid. | |
| 400 | 4013 | The Extra field is invalid. | |
| 400 | 4014 | The User Tier Code field is invalid. |
check validation: > 50 characters Does not exist or exists but is not functioning |
| ... | ... | ... | ... |
| 401 | 401 | Unauthorized | User login / token login invalid |
| 403 | 403 | Forbidden | User does not have permission |
| 404 | 404 | Not Found | |
| 405 | 405 | Method Not Allowed | |
| 419 | 419 | Token Expired | Token expired. Please request a new token |
| ... | ... | ... | ... |
| 500 | 500 | Internal server error. Please try again later | |
| 503 | 503 | Service Unavailable | |
| 504 | 504 | Gateway Timeout | |
| ... | ... | ... | ... |