Skip to main content

Get Voucher By Code

Retrieve voucher details for a specific member by voucherCode.

When to Use

Use this endpoint when:

  • Showing a member's specific voucher details
  • Verifying voucher status before redemption

How to Use

Endpoint
GET/v3/loyalty/me/voucher/{voucherCode}

GET /v3/loyalty/me/voucher/{voucherCode} with countryCode and phoneNumber as query parameters.


Request Parameters

No request body. The voucher is identified by the voucherCode path parameter.

Response Parameters

itemOBJECT

Voucher object

keySTRING

Voucher Key (Internal Usage)

Example: "EhIKBk1lbWJlchDOuOKz24XWkg4SGQoNTWVtYmVyUHJvZmlsZRDl-MTxiPOPjzY"

labelSTRING

Voucher Label

Example: "asdasd"

voucherBatchKeySTRING

Voucher Batch Key

Example: "EhQKCE1lcmNoYW50EJXVzd3wraqTORIYCgxWb3VjaGVyQmF0Y2gQs4n7iuzioaQW"

typeSTRING

Voucher Type ("CASH", "DISCOUNT", "GIFT")

Example: "CASH"

amountINTEGER

Amount of the voucher

Example: 100

discountRateINTEGER

Voucher Discount Rate

Example: 0

minimumSpendAmountINTEGER

Set a Minimum Spend Amount

Example: 0

originSTRING

Origin is for determine voucher source ("SYSTEM", "SELF", "MARKETPLACE" )

Example: "SYSTEM"

imageUrlSTRING

Voucher Image

Example: ""

memberProfileOBJECT

Member Profile (refer to profile page)

Example: null

assignedAtDATETIME

Voucher Assign

Example: "0001-01-01T00:00:00Z"

payloadOBJECT

Refer to explanation below

tncARRAY

Example: ["T&C"]

contactInfoOBJECT

Refer to explanation below

emailSTRING

Email

Example: ""

phoneNumberSTRING

Phone Number

Example: ""

qrUrlSTRING

Voucher QRcode URL

Example: ""

codeSTRING

Voucher Code

Example: "xR43u4bRhUU"

isShippingBOOLEAN

Voucher Shipping

Example: false

addressOBJECT

Refer to explanation below

addressLine1STRING

Address 1

Example: ""

addressLine2STRING

Address 2

Example: ""

postcodeSTRING

Postcode

Example: ""

citySTRING

City

Example: ""

stateSTRING

State

Example: ""

countrySTRING

Country

Example: ""

expiryOBJECT

Expiry date time

typeSTRING

Voucher Type ("DYNAMIC" , "STATIC")

Example: "DYNAMIC"

dayINTEGER

Expired Day

Example: 1

expiredAtDATETIME

Voucher Expired

Example: "2020-11-26T04:33:04Z"

usedAtDATETIME

Voucher Use

Example: "2020-11-25T13:58:55+08:00"

redeemedAtDATETIME

Voucher Redeem

Example: "2020-11-25T04:33:04Z"

isDeviceRedeemBOOLEAN

Voucher Redeem Device

Example: true

statusSTRING

Voucher Status ("VALID", "ISSUE", "REDEEMED", "VOID", "EXPIRED", "MARKET_PLACE")

Example: "VOID"

voucherComboKeySTRING

Voucher Combo Key

Example: null

isMarketPlaceBOOLEAN

Voucher is in Market Place ?

Example: false

createdAtDATETIME

Create date time

Example: "2020-11-18T06:43:19Z"

updatedAtDATETIME

Last update date time

Example: "2020-11-25T05:58:56Z"

codeSTRING

Successfully call this endpoint. If fail, will return error code object (Refer Appendix 1: Error Codes)

Example: "SUCCESS"