Skip to main content

Get Voucher Batch By Key

{% raw %}

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

Method : GET
Url : https://sb-open.revenuemonster.my/v3/voucher-batch/EhQKCE1lcmNoYW50EJXVzd3wraqTORIYCgxWb3VjaGVyQmF0Y2gQi5rUhcrdx78V/vouchers

Sandbox Url : https://sb-open.revenuemonster.my/v3/voucher-batch/EhQKCE1lcmNoYW50EJXVzd3wraqTORIYCgxWb3VjaGVyQmF0Y2gQi5rUhcrdx78V/vouchers

To get Multiple voucher batches by Key .

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

itemsObject

Transaction object

Example: (Refer to explanation below)

codeString

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

Example: "SUCCESS"


Voucher object (items):
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"

amountUint

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

Example: 10000

discountRateUint

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

Example: 0

imageUrlString

Image URL of current voucher, optional

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

quantityUint

Total quantity of voucher(s) in this batch

Example: 1

balanceQuantityUint

Total quantity of voucher(s) remaining in this batch

Example: 0

usedQuantityUint

Total quantity of voucher(s) used/assigned/redeemed in this batch

Example: 1

expiryObject of Expiry

Expiry date time of current voucher

Example: (Refer below)

originString

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

Example: “SYSTEM”

isShippingBoolean

True if items/goods to be delivered physically to customers

Example: false

reasonString

Will show if voucher batch is fail during creation. Optional.

Example: ”"

isDeviceRedeemBoolean

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

Example: false

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"


Expiry object (expiry):
typeString

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

Example: "DYNAMIC"

dayUint

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

Example: 30

expiryAtDateTime

Only required by FIXED. To indicate specific expiry date.

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

{% endraw %}