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
▾
/v3/voucher-batch/{batchKey}/vouchersGET /v3/voucher-batch/{batchkey}/vouchers. Find batchkey via the merchant portal or Get Voucher Batches.
Request Parameters
▾
-
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
▾
Transaction object
Voucher key
Example: "EhQKCE1lcmNoYW50EJXVzd3wraqTORIVCgdWb3VjaGVyGgpOQWtsRWZiVmRW"
label of voucher for merchant remarks
Example: "Free Breakfast”
Parent key of current voucher
Example: "EhQKCE1lcmNoYW50EJXVzd3wraqTORIYCgxWb3VjaGVyQmF0Y2gQkvnGweaB2uQg"
Define type of vouchers: DISCOUNT, GIFT, CASH
Example: “GIFT"
Required if type = CASH, notation in cents, eg. RM 1.00 = 100
Example: 10000
Required if type = DISCOUNT, notation without decimals, eg. 1% = 100
Example: 0
Minimum spend amount
Example: 0
SYSTEM (voucher code generated from RM server), SELF (voucher code uploaded from merchant csv file)
Example: “SYSTEM”
Image URL of current voucher, optional
Example: Image Url link (Refer to the below code)
Assigned member's profile (null if unassigned)
Member ID
Example: "1039768290679711875"
Member name
Example: "yussuf"
Email address of member
Example: "[email protected]"
IC Number
Example: ""
Member address
Address 1
Example: ""
Address 2
Example: ""
Postcode
Example: ""
City
Example: ""
State
Example: ""
Country
Example: ""
Gender
Example: ""
Member state (empty if not set)
Example: ""
Member Birth Date
Example: "0001-01-01T00:00:00Z"
Loyalty point balance
Example: 0
Credit balance
Example: 112
Country code of member contact number
Example: "60"
Phone number of member
Example: "176473298"
Member profile image URL
Example: "https://storage.googleapis.com/rm-sandbox-asset/img/avatar.png"
User Pin
Example: false
Member tier (null if not tiered)
Example: null
Member status
Example: "ACTIVE"
Member creation date time
Example: "2018-10-19T03:39:47Z"
Date time the voucher was assigned to a member
Example: "0001-01-01T00:00:00Z"
QR code URL of the voucher (empty if not applicable)
Example: ""
Voucher's redeemable code
Example: "UUEra22VSy2"
True if items/goods to be delivered physically to customers
Example: false
Shipping address (null if not applicable)
Expiry date time of current voucher
DYNAMIC (days from now), FIX (specific fixed date)
Example: "DYNAMIC"
Only required by DYNAMIC expiry type. To indicate number of days from now until expiry.
Example: 30
Only required by FIXED. To indicate specific expiry date.
Example: "2020-10-07T17:44:26.679908+08:00"
Date time the voucher was used
Example: "0001-01-01T00:00:00Z"
Date time the voucher was redeemed
Example: "2019-03-22T04:58:38Z"
TRUE means only can be redeemed through merchant app. FALSE means customer can do redemption from own loyalty app.
Example: false
Voucher's status
Example: "REDEEMED"
Combo key this voucher belongs to (null if not part of a combo)
Example: null
Date time of voucher being created (UTC)
Example: "2018-06-21T11:08:00Z"
Date time of voucher being updated (UTC)
Example: "2018-09-28T17:19:44.686549977Z"
Successfully call this endpoint. If fail, will return error code object (Refer Appendix 1: Error Codes)
Example: "SUCCESS"
Pagination metadata
Total number of vouchers returned
Example: 1