[C] Got It API intergration - Tasking scope_ Updated 20032026

1. Get list products 

GET    {domain}/api/rewardhub/v1.0/gifts

Headers
  • Authorization: Bearer <YOUR_CLIENT_TOKEN>
  • Content-Type: application/json
  • Accept: application/json
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",
            "categories": [
                {
                    "id": 79,
                    "name_vi": "Cafe & Bánh",
                    "name_en": "Cafe & Cake",
                    "image": "reward-hub/7/categories/1770023792_iWQXh.png"
                },
                {
                    "id": 81,
                    "name_vi": "Giải trí",
                    "name_en": "Entertainments",
                    "image": "reward-hub/7/categories/1770024508_bPh3J.png"
                }
            ]
        },
        {
            "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",
            "categories": [
                {
                    "id": 79,
                    "name_vi": "Cafe & Bánh",
                    "name_en": "Cafe & Cake",
                    "image": "reward-hub/7/categories/1770023792_iWQXh.png"
                }
            ]
        }
    ],
    "from": 1,
    "to": 1,
    "current_page": 1,
    "last_page": 51,
    "per_page": 1,
    "total": 51
}

2. Get detail product

GET    {domain}/api/rewardhub/v1.0/gifts/{giftID}

Headers
  • Authorization: Bearer <YOUR_CLIENT_TOKEN>
  • Content-Type: application/json
  • Accept: application/json
Params request

Parameter Type Required Description
gift_id number yes gift ID

Example

Get list product

Request

/api/rewardhub/v1.0/gifts/123

Response

{
  "data": {
    "type": "voucher",
    "id": 67836,
    "name": "voucher name",
    "detail": {
      "image": "https://img-stg.gotit.vn/compress/580x580/2024/07/1720693728_FZRSz.png",
      "description": "Description in HTML",
      "term": "<p><strong> ĐIỀU KHOẢN & ĐIỀU KIỆN SỬ DỤNG CHUNG </strong><br>- Mỗi Thẻ quà tặng Got It chỉ dùng một lần, được áp dụng nhiều Thẻ quà tặng để thanh toán một hóa đơn.<br>- Vui lòng lưu ý thời hạn sử dụng trên Thẻ quà tặng.<br>- Thẻ quà tặng Got It sử dụng tại cửa hàng của các đối tác liên kết với Got It, khách hàng vui lòng cung cấp mã thẻ quà tặng cho thu ngân.<br>- Đối với các đối tác có áp dụng các kênh online (hotline đặt hàng/web/app):<br>+ Đọc mã Thẻ quà tặng cho nhân viên qua kênh hotline đặt hàng<br>+ Điền mã thẻ tại bước thanh toán online (web/app) tùy theo từng loại Thẻ quà tặng<br>- Đối với thẻ quà tặng sản phẩm, nếu khách hàng muốn đổi sản phẩm khác hoặc sản phẩm đã hết hàng, khách hàng vui lòng lựa chọn sản phẩm khác để thay thế.<br>- Khách hàng sẽ thanh toán thêm phần chênh lệch nếu sử dụng quá giá trị của thẻ quà tặng (nếu có)<br>- Thẻ quà tặng không được quy đổi thành tiền mặt, không được hoàn lại tiền.<br>- Got It không chịu trách nhiệm về các khiếu nại liên quan đến việc mua bán thẻ quà tặng từ các nguồn không chính thức.<br>- Khách hàng có trách nhiệm bảo mật thông tin Thẻ quà tặng sau khi mua. Got It sẽ không chịu trách nhiệm hoàn trả các mã thẻ bị mất hoặc ở trạng thái “Đã sử dụng” với bất kì lý do gì.<br>- Khách hàng vui lòng liên hệ với nhà cung cấp khi có thắc mắc hoặc khiếu nại liên quan đến chất lượng của sản phẩm/ dịch vụ theo hotline 1900 55 88 20 hoặc <a class=\"email\" href=\"mailto:support@gotit.vn\">support@gotit.vn</a><br>- Đối với các tranh chấp giữa khách hàng và nhà cung cấp, Got It sẽ không chịu trách nhiệm.<br>- Got It có quyền sửa chữa hoặc thay đổi điều khoản và điều kiện mà không thông báo trước.</p>",
      "guide": ""
      "prices": [
          {
              "point": 1,
              "price": 1000,
              "price_id": 42885
          },
          {
              "point": 100,
              "price": 100000,
              "price_id": 42892
          }
      ],
      "categories": [
          {
              "id": 79,
              "name_vi": "Cafe & Bánh",
              "name_en": "Cafe & Cake",
              "image": "reward-hub/7/categories/1770023792_iWQXh.png"
          },
          {
              "id": 81,
              "name_vi": "Giải trí",
              "name_en": "Entertainments",
              "image": "reward-hub/7/categories/1770024508_bPh3J.png"
          }
      ]
    }
  }
}

 

3. Get Order

POST    {domain}/api/rewardhub/v1.0/get-order

Headers
  • Authorization: Bearer <YOUR_CLIENT_TOKEN>
  • Content-Type: application/json
  • Accept: application/json
Body request
STT Name Type Required Description
1 order_id

string

image.png

ID đơn hàng cần lấy thông tin

Example:

POST /api/rewardhub/v1.0/get-order
Authorization: Bearer <gi_access_token>
{
"order_id": "GOTIT-ORDER-123456"
}

Response

Success
{
"code": "000000",
"message": "Valid order",
"data": {
"order_id": "GOTIT-ORDER-123456",
"status": "DRAFT",
"items": [ {
"gift_id": 88001,
"gift_name": "Voucher Starbucks 100k",
"price_id": 99001,
"point_required": 10000,
"quantity": 1
}
],
"total_points": 10000,
"expire_at": "2026-02-09T10:45:00.000000Z"
}
}

Error
000000 => 'Valid order'
010101 => 'Order is invalid'
010102 => 'Order is expired'
010103 => 'Order is not found or is no longer valid'
000098 => 'Validation error. Please check your request and try again.'
000099 => 'Internal server error. Please try again later'

4. API issue gift

POST    {domain}/api/rewardhub/v1.0/gifts/issue

Headers
  • Authorization: Bearer <YOUR_CLIENT_TOKEN>
  • Content-Type: application/json
  • Accept: application/json
Body request
STT Name Type Required Description
1 request_id

string

image.png

Used for reconciliation and idempotency checks
2 order_id

string

image.png

the Order ID received from Got It

Required if source = rewardhub

3
issuer_identify_id

string

 

Identifier of the issuer
Required if source = externalService
4
recipient_identify_id

string

image.png

Identifier of the recipient
5
current_point

int


Current point of the recipient user
Required if source = rewardhub
6
source

string

image.png Acceptable value: externalService, rewardhub

Use externalService when the caller is from the task function, and rewardhub when the request comes from the exchange gift page.

 

7
items

array

image.png

List vouchers will be issued

8
items.product_id

int

image.png

Identifier of the voucher

9
items.price_id

int

image.png

Identifier of the voucher price

10
items.quantity

int

image.png

The voucher quantity which will be issued

11
items.point

int


Gift's point that used for redemption
Required if source = rewardhub

Example:

POST /api/rewardhub/v1.0/gifts/issue
Authorization: Bearer <gi_access_token>

{
  "request_id": "VIB_20260304_000001",
  "order_id": "1000023"
  "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": [
          {
              "gift_id": 88001,
              "gift_name": "Voucher Highland Coffee 50k",
              "quantity": 1
          },
          {
              "gift_id": 88001,
              "gift_name": "Voucher Highland Coffee 100k",
              "quantity": 1
          }
     ],
  }
}

Error
{
   "statusCode": 401,
   "statusMessage": "Unauthorized",
   "data": {}
}

5. Get user token

POST    {domain}/api/rewardhub/v1.0/user-token

Headers
  • Authorization: Bearer <YOUR_CLIENT_TOKEN>
  • Content-Type: application/json
  • Accept: application/json
Body request
# Parameter Type Required Description
1 user_id string Yes This can be a user ID or any key-value pair representing the end user.
2 user_name string Yes It can be any value, no need to send name of user
3 user_point string Yes User point.
4 user_tier_code string Yes VIB can send user 's card type which will be considered as a tier in Reward Hub
5 extra object Yes

structure:

  • theme 
  • language
  • source

extra.theme required|string Yes
  • Default is "orange".
    • Only accept: blue/orange

extra.language required|string Yes
  • Default is "vi".
    • Only accept: vi/en

extra.source required|string Yes
  • Default is vib.
    • Only accept: vib/max
Example
Request
{
    "user_id": "uuid-user",
    "user_name": "User Test",
    "user_point": 100000,
    "user_tier_code": "golden",
    "extra": 
        ["theme": "blue",
        "language": "vi",
         "source":"vib"]
}
Response
{
    "statusCode": 200,
    "statusMessage": "Success",
    "data": {
        "token": "877|InDcg9RCnXdWfDHSehrrAGooBis8P0FHhIjASQH005aa4698",
        "expires_at": "2025-08-25 15:55:50",
        "token_type": "Bearer"
    }
}


Revision #13
Created 20 March 2026 14:18:19 by Quỳnh. Trần Lâm Nhật
Updated 2 April 2026 17:14:25 by Quỳnh. Trần Lâm Nhật