OLD - Got It - Biz API

Got It - Biz API called to generate and send vouchers
Authentication

All request must carry “X-GI-Authorization” with the value of hash key from following instructions. We call it the API Unique Key

Type Definitions
Object
pageSize
number required
page
number required
pageTotal
number
voucher
Object
voucherCode
string
voucherLink
string
voucherImageLink
string
product
productdetail
product

Every single Got It voucher is belong to a product. Product is one of physical products from vendor (e.g. a cup of coffee at Highlands store); or as a cash amount can be used to pay the bill at store (e.g. voucher 100.000 VND to pay bill at Ministop)

Fields and Data Type:

Object
productId
number

Product Unique Id

productNm
string

Product Name

productImg
string

Link to product image

brandId
number

Brand Id

brandNm
string

Brand Name

size
Array of product price

Array of product sizes or product prices

productDesc
string

Product Text Description

terms
string

Text of Terms & Conditions

storeList
Array of store

Array of stores that the voucher can be redeemed at.

link
string

Link to see the product details at Got It site

product price

Detail of product price

Object
sizeId
number

Price/Size Id

priceNm
string

Name of price or product size

pricePrice
number

Amount (in VND)

category

Category of Brands

Object
categoryId
number

Category Id

categoryNm
string

Category Name

categoryImg
string

Link to see category details and it’s brands in Got It site

store

Details of store that end user can redeemed Got It vouchers at.

Object
storeId
number

Store Id

storeNm
string

Store Name

storeAddr
string

Store location address

lat
number

Lattitude in Google map

long
number

Long Lattitude in Google map

brand

Details of brand

Object
brandId
number

Brand Id

brandNm
string

Brand Name

brandImg
string

Link to brand logo

slug
string

URL name

categoryID
Array of number

Array of categories that brand is belong to

Category-Brand-Product
GET /brand/{CategoryID}
POST /product/list
POST /product/detail
GET /brand/getAll
GET /category/getAll
BrandByCategory
GET /brand/{CategoryID}

Authentication

X-GI-Authorization

Path variables

CategoryID
string required

Responses

200 200
Body
application/json
Array of brand
Examples
ProductList
POST /product/list

Request body

application/json
Object
Example:
{
  "minPrice" : 0,
  "maxPrice" : 0,
  "categoryId" : 0,
  "orderBy" : 0,
  "brandId" : 0,
  "pagination" : {
    "pageSize" : 5,
    "page" : 1
  }
}
minPrice
integer
maxPrice
integer
categoryId
integer
orderBy
integer
brandId
integer
pagination
pagination required

Responses

200 200
Body
application/json
Object
productList
Array of product
pagination
ProductDetail
POST /product/detail

Authentication

X-GI-Authorization

Request body

application/json
Object
Example:
{
  "productId" : 20
}
productId
integer

Responses

200 200
Body
application/json
Brand
GET /brand/getAll

Authentication

X-GI-Authorization

Responses

200 200
Body
application/json
Array of brand
Examples
Category
GET /category/getAll

Authentication

X-GI-Authorization

Responses

200 200
Body
application/json
Array of category
Examples
Issue Voucher
POST /transaction
POST /transaction/check
POST /transactiongroup
POST /transaction/checkmultiple
Transaction
POST /transaction

Authentication

X-GI-Authorization

Request body

application/json
Object
productId
number required
productPriceId
number required
quantity
number required
campaignNm
string required
expiryDate
string required

Format “YYYY-MM-DD”

voucherRefId
string

Voucher Reference ID Unique

Responses

200 200
Body
application/json
Object
refId
string
invoiceNo
string
voucher
Check
POST /transaction/check

Authentication

X-GI-Authorization

Used to check vouchers after initial transaction.

Request headers

voucherRefId
string required

Request body

application/json
Object
voucherRefId
string required

Responses

200 200
Body
application/json
Object
refId
string
invoiceNo
string
voucher
Transaction Group
POST /transactiongroup

Authentication

X-GI-Authorization

Request body

application/json
Object
productList
Array required
Object
productId
string
productPriceId
string
quantity
string
refId
string required
campaignNm
string required
expiryDate
string required

Format “YYYY-MM-DD”

voucherRefId
string

Voucher Reference ID Unique

Responses

200 200
Body
application/json
Object
refId
string
invoiceNo
string
voucher
Object
voucherLink
string
voucherLinkCode
string
Check Multiple
POST /transaction/checkmultiple

Authentication

X-GI-Authorization

Used to check mutliple vouchers which have same voucherRefId after initial transaction.

Request headers

voucherRefId
string required

Request body

application/json
Object
voucherRefId
string required

Responses

200 200
Body
application/json
Object
refId
string
invoiceNo
string
vouchers
Array of voucher
Send
POST /send/email
POST /send/sms
Send Email
POST /send/email

Authentication

X-GI-Authorization

Request body

application/json
Object
voucherLinkCode
string required
email
string required
receiverNm
string required
senderNm
string required
message
string
voucherCode
string

Responses

200 OK

Sent successfully

Body
application/json
Object
stt
string

Status. If success, stt = 1

200 Failed

Sent failed with message

Body
Object
code
string

Error code

msg
string

Message from error

500 500
Body
application/json
Object
errorCode
string
message
string
Send SMS
POST /send/sms

Authentication

X-GI-Authorization

Request body

application/json
Object
voucherLinkCode
string required
phoneNo
string required
receiverNm
string required
senderNm
string required
message
string
voucherCode
string

Responses

200 OK

Sent Successfully

Body
application/json
Object
stt
string

Status. If success, stt = 1

200 Failed

Sent failed with message

Body
Object
code
string

Error code

msg
string

Message from error

500 500
Body
application/json
Object
errorCode
string
message
string