Skip to main content

Redeem Voucher

{% raw %}

Method : POST
URL : https://open.revenuemonster.my/v3/loyalty/me/voucher/{voucher-code}/redeem?countryCode=60&phoneNumber=187824152
Sandbox URL : https://sb-open.revenuemonster.my/v3/loyalty/me/voucher/{voucher-code}/redeem?countryCode=60&phoneNumber=187824152

  • Redeem Voucher by input {voucher-code}
  • Using Query String to input the country code and phone number

Request Parameters

Example Request

curl --location --request POST "{{open_base_path}}/v3/loyalty/me/voucher/rms@xR43u4bRhUU/redeem?countryCode=60&phoneNumber=187824152" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjIwMTgtMy0xOCIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsiYXBpX2NsaWVudEBFaGNLQzA5QmRYUm9RMnhwWlc1MEVQZUEyYXJ4dk1PSUZnIl0sImV4cCI6MTU5MzU4MDY0NSwiaWF0IjoxNTkwOTg4NjQ1LCJpc3MiOiJodHRwczovL29hdXRoLnJldmVudWVtb25zdGVyLm15IiwianRpIjoiRWh3S0VFOUJkWFJvUVdOalpYTnpWRzlyWlc0UXMtNnI5LVgzbElvVyIsIm5iZiI6MTU5MDk4ODY0NSwic3ViIjoiRWhRS0NFMWxjbU5vWVc1MEVMUF9wNlNKNnFQN0ZSSVFDZ1JWYzJWeUVPaXZfb1dKNnFQN0ZRIn0.RKtXykw3y0ov3mKKa_K2h5FZB2jXtqf3gNRwwnzzA4xTMdY09mEHlFupMeUmchFW2XHYK254LdMYbF4ZhjxK9K51UUdQBYH-zZpo0WWtPSZqrPGtT-c4z_sEO73EDVcek3rDwyWiXvjSKDpsZM7NOdKRm5tvT3qNK-7C7WMUjSXDcBzbTFhwfOAOO1n-wMR9H_w0DuIE-yMjEZkOdt7GUIBC8F5izATlZH0FRTx4VAwQWY4gjjQ9-3PbUbHx-NKiFXwCOAsxu-79PiF0HDEHb6ZOCGywNmKuanEXqLonli0caZiUZfrdT53y3Xnd3W2SEr6s7ZQxWnQO5PeOU7BQYA" \
--header "X-Signature: sha256 bFGc2JOEFqdI91DE5VXYBUllr+9DHcrrylRFU3i1r72aPmJreljn0dU+nwPSwTH/dTQUiZ9C2aQSF8AuT959EW4WEyEZ6VWgt9gCyZaU/bcOQ/ZIhKc06+uwzivVhAzpbUtG5tm5/sBp4ig6Sk7L6SE0Ecu6Tm0FhYl0qdgZvrTh4EEpLs3kHIuYL9QXKJILfKlu4gTX1Exrt7nNyEr8ndeUMaKYrj3FckMbRtmCwc829SsVp6FAgvoDPnguUJ+VjLF1e9NXhar2JwYjuqMkwsmUWRDbittqCgCCfaPF8anarlLsoXbdYEa7bp9BYp2U/Dw3Xd2MlamEZSR8H+Dosw==" \
--header "X-Nonce-Str: VYNknZohxwicZMaWbNdBKUrnrxDtaRhN" \
--header "X-Timestamp: 1528450585" \



Response Parameters

itemObject

Voucher 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 (item):
keyString

Voucher Key (Internal Usage)

Example: "EhIKBk1lbWJlchDOuOKz24XWkg4SGQoNTWVtYmVyUHJvZmlsZRDl-MTxiPOPjzY"

labelString

Voucher Label

Example: "asdasd"

voucherBatchKeyString

Voucher Batch Key

Example: "EhQKCE1lcmNoYW50EJXVzd3wraqTORIYCgxWb3VjaGVyQmF0Y2gQs4n7iuzioaQW"

typeString

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

Example: "CASH"

amountUint

Amount of the voucher

Example: 100

discountRateUint

Voucher Discount Rate

Example: 0

minimumSpendAmountUint

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 at

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

payloadObject

Refer to explanation below

Example: (Refer to explanation below)

qrUrlString

Voucher QRcode URL

Example: ""

codeString

Voucher Code

Example: "xR43u4bRhUU"

isShippingBool

Voucher Shipping

Example: false

addressObject

Refer to explanation below

Example: (Refer to explanation below)

expiryObject

Expiry date time

Example: (Refer to explanation below)

usedAtDateTime

Voucher Use

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

redeemedAtDateTime

Voucher Redeem

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

isDeviceRedeemBool

Voucher Redeem Device

Example: true

statusString

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

Example: "VOID"

voucherComboKeyString

Voucher Combo Key

Example: null

isMarketPlaceBool

Last update date time

Example: false

createdAtDateTime

Create date time

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

updatedAtDateTime

Last update date time

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


Payload object:
tncArray

Example: ["T&C"]

contactInfoObject

Refer to explanation below

Example: (Refer to explanation below)


Expiry object:
typeString

Voucher Type ("DYNAMIC" , "STATIC")

Example: "DYNAMIC"

dayUint

Expired Day

Example: 1

expiredAtDateTime

Voucher Expired

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


Address object:
addressLine1String

Address 1

Example: ""

addressLine2String

Address 2

Example: ""

postcodeString

Postcode

Example: ""

cityString

City

Example: ""

stateString

State

Example: ""

countryString

Country

Example: ""


Example Response

{
  "item": {
    "key": "EhQKCE1lcmNoYW50EJXVzd3wraqTORIcCgdWb3VjaGVyGhFybXNAeFI0M3U0YlJoVVUtMA",
    "label": "asdasd",
    "voucherBatchKey": "EhQKCE1lcmNoYW50EJXVzd3wraqTORIYCgxWb3VjaGVyQmF0Y2gQs4n7iuzioaQW",
    "type": "CASH",
    "amount": 100,
    "discountRate": 0,
    "minimumSpendAmount": 0,
    "origin": "SYSTEM",
    "imageUrl": "",
    "memberProfile": null,
    "assignedAt": "0001-01-01T00:00:00Z",
    "payload": null,
    "qrUrl": "",
    "code": "rms@xR43u4bRhUU",
    "isShipping": false,
    "address": null,
    "expiry": {
      "type": "DYNAMIC",
      "day": 1,
      "expiredAt": "2020-11-26T04:33:04Z"
    },
    "usedAt": "2020-11-25T13:58:55+08:00",
    "redeemedAt": "2020-11-25T04:33:04Z",
    "isDeviceRedeem": true,
    "status": "VOID",
    "voucherComboKey": null,
    "isMarketPlace": false,
    "createdAt": "2020-11-18T06:43:19Z",
    "updatedAt": "2020-11-25T05:58:56Z"
  },
  "code": "SUCCESS"
}

{% endraw %}