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
Image URL of current voucher, optional
Example: Image Url link (Refer to the below code)
Total quantity of voucher(s) in this batch
Example: 1
Total quantity of voucher(s) remaining in this batch
Example: 0
Total quantity of voucher(s) used/assigned/redeemed in this batch
Example: 1
Expiry date time of current voucher
DYNAMIC (days from now), FIXED (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"
SYSTEM (voucher code generated from RM server), SELF (voucher code uploaded from merchant csv file)
Example: “SYSTEM”
True if items/goods to be delivered physically to customers
Example: false
Will show if voucher batch is fail during creation. Optional.
Example: ”"
TRUE means only can be redeemed through merchant app. FALSE means customer can do redemption from own loyalty app.
Example: false
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"