Skip to main content

Get Voucher Batch By Key

Retrieve all vouchers belonging to a specific voucher batch by its batchkey.

When to Use

Use this endpoint when:

  • Listing every voucher in a given batch
  • Auditing voucher issuance under a batch

How to Use

Endpoint
GET/v3/voucher-batch/{batchKey}/vouchers

GET /v3/voucher-batch/{batchkey}/vouchers. Find batchkey via the merchant portal or Get Voucher Batches.


Request Parameters

note
  • The URL is consists of [base_URL]/v3/voucher-batch/[batchkey]/vouchers.

  • [batchkey] can be retrieved by viewing at merchant portal or using endpoint Get voucher By Batches

  • Pass an empty JSON object Example: {}

Response Parameters

itemsOBJECT

Transaction object

keySTRING

Voucher key

Example: "EhQKCE1lcmNoYW50EJXVzd3wraqTORIVCgdWb3VjaGVyGgpOQWtsRWZiVmRW"

labelSTRING

label of voucher for merchant remarks

Example: "Free Breakfast”

voucherBatchKeySTRING

Parent key of current voucher

Example: "EhQKCE1lcmNoYW50EJXVzd3wraqTORIYCgxWb3VjaGVyQmF0Y2gQkvnGweaB2uQg"

typeSTRING

Define type of vouchers: DISCOUNT, GIFT, CASH

Example: “GIFT"

amountINTEGER

Required if type = CASH, notation in cents, eg. RM 1.00 = 100

Example: 10000

discountRateINTEGER

Required if type = DISCOUNT, notation without decimals, eg. 1% = 100

Example: 0

minimumSpendAmountINTEGER

Minimum spend amount

Example: 0

originSTRING

SYSTEM (voucher code generated from RM server), SELF (voucher code uploaded from merchant csv file)

Example: “SYSTEM”

imageUrlSTRING

Image URL of current voucher, optional

Example: Image Url link (Refer to the below code)

memberProfileOBJECT

Assigned member's profile (null if unassigned)

idSTRING

Member ID

Example: "1039768290679711875"

nameSTRING

Member name

Example: "yussuf"

emailSTRING

Email address of member

Example: "[email protected]"

nricSTRING

IC Number

Example: ""

addressOBJECT

Member address

addressLine1STRING

Address 1

Example: ""

addressLine2STRING

Address 2

Example: ""

postcodeSTRING

Postcode

Example: ""

citySTRING

City

Example: ""

stateSTRING

State

Example: ""

countrySTRING

Country

Example: ""

genderSTRING

Gender

Example: ""

stateSTRING

Member state (empty if not set)

Example: ""

birthDateSTRING

Member Birth Date

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

loyaltyPointINTEGER

Loyalty point balance

Example: 0

creditINTEGER

Credit balance

Example: 112

countryCodeSTRING

Country code of member contact number

Example: "60"

phoneNumberSTRING

Phone number of member

Example: "176473298"

profileImageUrlSTRING

Member profile image URL

Example: "https://storage.googleapis.com/rm-sandbox-asset/img/avatar.png"

hasPinCodeBOOLEAN

User Pin

Example: false

memberTierSTRING

Member tier (null if not tiered)

Example: null

statusSTRING

Member status

Example: "ACTIVE"

createdAtDATETIME

Member creation date time

Example: "2018-10-19T03:39:47Z"

assignedAtDATETIME

Date time the voucher was assigned to a member

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

qrUrlSTRING

QR code URL of the voucher (empty if not applicable)

Example: ""

codeSTRING

Voucher's redeemable code

Example: "UUEra22VSy2"

isShippingBOOLEAN

True if items/goods to be delivered physically to customers

Example: false

addressOBJECT

Shipping address (null if not applicable)

expiryOBJECT

Expiry date time of current voucher

typeSTRING

DYNAMIC (days from now), FIX (specific fixed date)

Example: "DYNAMIC"

dayINTEGER

Only required by DYNAMIC expiry type. To indicate number of days from now until expiry.

Example: 30

expiredAtDATETIME

Only required by FIXED. To indicate specific expiry date.

Example: "2020-10-07T17:44:26.679908+08:00"

usedAtDATETIME

Date time the voucher was used

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

redeemedAtDATETIME

Date time the voucher was redeemed

Example: "2019-03-22T04:58:38Z"

isDeviceRedeemBOOLEAN

TRUE means only can be redeemed through merchant app. FALSE means customer can do redemption from own loyalty app.

Example: false

statusSTRING

Voucher's status

Example: "REDEEMED"

voucherComboKeySTRING

Combo key this voucher belongs to (null if not part of a combo)

Example: null

createdAtDATETIME

Date time of voucher being created (UTC)

Example: "2018-06-21T11:08:00Z"

updatedAtDATETIME

Date time of voucher being updated (UTC)

Example: "2018-09-28T17:19:44.686549977Z"

codeSTRING

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

Example: "SUCCESS"

metaOBJECT

Pagination metadata

countINTEGER

Total number of vouchers returned

Example: 1