Skip to main content

Get Loyalty Balances

Method : GET
URL : https://open.revenuemonster.my/v3/loyalty/balances
Sandbox URL : https://sb-open.revenuemonster.my/v3/loyalty/balances

note

Get loyalty balances

Request Parameters

Example Request

curl --location --request GET "https://sb-open.revenuemonster.my/v3/loyalty/balances" \
--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

ParameterTypeDescriptionExample
itemsArray(Refer to explanation below)
codeStringSuccessfully call this endpoint. If fail, will return error code object (Refer Appendix 1: Error Codes)"SUCCESS"
metaObjectInside meta have countand cursor{ "count": 2 , "cursor":""}

ParameterTypeDescriptionExample
idString"1647502414730379278"
storeObjectrefer below example
transactionIdString""
methodString"LOYALTY_CREDIT"
typeString"QUICK_PAY"
orderObjectrefer below example
terminalIdString""
currencyTypeString"MYR"
transactionAtDateTime"2022-01-27T04:02:46Z"
statusString"SUCCESS"
createdAtDateTimeCreation date time of merchant"2022-01-27T04:02:46Z"
updatedAtDateTimeLast update date time of merchant"2022-01-27T04:02:46Z"

Store object (store):
ParameterTypeDescriptionExample
idStringStore ID"1601912947341252990"
merchantSettlementIdStringMerchant Settlement ID"1596124535165747709"
nameStringStore Name"Mountain Food - Aeon Mall Shah Alam"
imageUrlStringYes"https://storage.googleapis.com/rm-prod-asset/img/store.png"
addressLine1StringStore Address 1"B-5-30, 5th Floor, Block Bougainvillea,"
addressLine2StringStore Address 2"PJU 6A, Lebuhraya SPRINT, 10 Boulevard,"
postCodeStringPostcode of store"47400"
cityStringCity of store"Petaling Jaya"
stateStringState of store"Selangor"
countryStringCountry of store"Malaysia"
countryCodeStringCountry code of store contact number"60"
phoneNumberStringPhone number of store"377334080"
geoLocationObjectGeo Location (latitude and longitude) of store{"latitude": 3.1349857, "longitude": 101.6136659 }
statusStringCurrent status of store"ACTIVE"
createdAtDateTimeCreation date time of store"2020-09-14T03:01:20Z"
updatedAtDateTimeLast update date time of store"2020-09-14T03:01:20Z"

Order object (order):
ParameterTypeRequiredDescriptionExample
idStringYesOrder ID (from Merchant), max: 24"134850717797247290"
titleStringYes""
detailStringYes""
amountUintYesAmount of order in cent (min RM 0.10 or amount: 10)100

Example Response

{
"items": [
{
"id": "1643256166719420340",
"store": {
"id": "1601912947341252990",
"merchantSettlementId": "1596124535165747709",
"name": "Mountain Food - Aeon Mall Shah Alam",
"imageUrl": "https://storage.googleapis.com/rm-prod-asset/img/store.png",
"addressLine1": "BUBBLEBEE SHAH ALAM, SEKSYEN 13, SHAH ALAM",
"addressLine2": "BUBBLEBEE SHAH ALAM, SEKSYEN 13, SHAH ALAM",
"postCode": "40100",
"city": "Shah Alam",
"state": "Selangor",
"country": "Malaysia",
"countryCode": "60",
"phoneNumber": "1123621544",
"geoLocation": {
"latitude": 3.0753809,
"longitude": 101.5502306
},
"status": "ACTIVE",
"createdAt": "2021-03-24T07:58:02Z",
"updatedAt": "2021-11-12T02:56:02Z"
},
"transactionId": "",
"method": "LOYALTY_CREDIT",
"type": "QUICK_PAY",
"order": {
"id": "220127120247232716",
"title": "In store payment",
"detail": "[Merchant app] Pay to Mountain Food - Aeon Mall Shah Alam with loyalty balance",
"amount": 100
},
"terminalId": "",
"currencyType": "MYR",
"transactionAt": "2022-01-27T04:02:46Z",
"status": "SUCCESS",
"createdAt": "2022-01-27T04:02:46Z",
"updatedAt": "2022-01-27T04:02:46Z"
},
{
"id": "1643256151642900798",
"store": {
"id": "1601912947341252990",
"merchantSettlementId": "1596124535165747709",
"name": "Mountain Food - Aeon Mall Shah Alam",
"imageUrl": "https://storage.googleapis.com/rm-prod-asset/img/store.png",
"addressLine1": "BUBBLEBEE SHAH ALAM, SEKSYEN 13, SHAH ALAM",
"addressLine2": "BUBBLEBEE SHAH ALAM, SEKSYEN 13, SHAH ALAM",
"postCode": "40100",
"city": "Shah Alam",
"state": "Selangor",
"country": "Malaysia",
"countryCode": "60",
"phoneNumber": "1123621544",
"geoLocation": {
"latitude": 3.0753809,
"longitude": 101.5502306
},
"status": "ACTIVE",
"createdAt": "2021-03-24T07:58:02Z",
"updatedAt": "2021-11-12T02:56:02Z"
},
"transactionId": "",
"method": "LOYALTY_CREDIT",
"type": "QUICK_PAY",
"order": {
"id": "220127120233232716",
"title": "In store payment",
"detail": "[Merchant app] Pay to Mountain Food - Aeon Mall Shah Alam with loyalty balance",
"amount": 100
},
"terminalId": "",
"currencyType": "MYR",
"transactionAt": "2022-01-27T04:02:31Z",
"status": "SUCCESS",
"createdAt": "2022-01-27T04:02:31Z",
"updatedAt": "2022-01-27T04:02:31Z"
}
],
"code": "SUCCESS",
"meta": {
"count": 50,
"cursor": "eyJzaWduYXR1cmUiOiJVUWdGcTdXekI3Q1JtYUhGQmRUVHJmVVFJeGc9IiwibmV4dCI6IkVoNEtFa3h2ZVdGc2RIbFVjbUZ1YzJGamRHbHZiaENDN04zUzlvRzJzQlkifQ"
}
}