Skip to main content

Total Point & Tier Level

This API is used to retrieve detailed loyalty status information, including the customer’s total active points and tier level.

Endpoint

URL : {BaseURL}/api/v1/ashboard/:customerId
Method : GET
Header : Content-Type : Application/JSON
Header : Authorization : {{pwa_token}}

Request

This section describes the request parameters and provides examples of JSON requests used to authentication user.
Sample JSON Request
curl --location --globoff '{{BaseURL}}/api/v1/dashboard/{{customerid}}' \
--header 'Authorization: {{pwa_token}}' \
--header 'Content-Type: application/json'

Response

This section describes the response parameters and provides JSON response examples returned after a successful request.
Description Parameter Response
FieldData TypeMandatoryFormatDescription
requestIDString
(36)
YESUUIDUnique identifier for the request.
rcInteger
(3)
YESNumericResponse code indicating the status of the operation.
MessageString
(200)
YESAlphanumericA descriptive message regarding the response.
dataJSON ObjectYESJSON ObjectDetail information from data.
data.idString
(36)
YESUUIDUnique ID of the customer.
nameString
(200)
YESAlphanumericName of the customer.
totalPointInteger
(10)
YESNumericTotal points accumulated by the customer.
customerIdString
(36)
YESUUIDIdentifier of the customer.
emailString
(200)
YESEmailUser's email address.
phoneNumberString
(200)
YESNumericUser's phone number.
provinceNameString
(200)
NOAlphanumericName of the province where the customer resides.
cityNameString
(200)
NOAlphanumericName of the city where the customer resides.
districtNameString
(200)
NOAlphanumericName of the district where the customer resides.
postalCodeString
(200)
NOAlphanumericPostal code of the customer's address.
detailAddressString
(200)
NOAlphanumericDetailed address of the customer.
tierLevelsArrayYESArrayList of tier levels available.
tierLevels.idString
(36)
YESUUIDUnique ID of the tier level.
nameString
(200)
YESAlphanumericName of the tier level.
iconFileString
(200)
YESURLURL of the tier’s icon image.
valueCriteria1Integer
(10)
YESNumericMinimum value required for the first criterion (e.g., total spending).
valueCriteria2Integer
(10)
YESNumericMinimum value required for the second criterion (e.g., transaction count).
criteriaNameString
(200)
YESAlphanumericThe name or type of criteria used for tier evaluation.
descriptionString
(200)
NOAlphanumericDescription of the tier (if any).
tierBenefitArrayYESArrayList of benefits with the tier.
tierBenefit.idString
(36)
YESUUIDUnique identifier of the tier benefit.
benefitTitleString
(200)
YESAlphanumericTitle or short name of the benefit.
benefitDescriptionString
(200)
YESAlphanumericDetailed explanation of the benefit.
benefitTypeString
(200)
YESAlphanumericType of benefit (e.g., Cashback Rewards, Percentage Discount).
benefitValueInteger
(10)
YESNumericValue or percentage of the benefit (e.g., 5 means 5%).
currentTierLevelIdString
(36)
YESUUIDID of the customer's current tier.
currentProgressCriteria1Integer
(10)
YESNumericCustomer's progress toward next tier based on first criterion.
currentProgressCriteria2Integer
(10)
YESNumericCustomer's progress toward next tier based on second criterion.
currentCriteriaNameString
(200)
YESAlphanumericType of progress criteria used (e.g., "Amount OR Frequency").
isParameterIdenticBooleanYESTrue / falseIndicates whether tier criteria parameters are identical across tiers.
nextValueCriteria1Integer
(10)
YESNumericTarget value of the first criterion for the next tier.
nextValueCriteria2Integer
(10)
YESNumericTarget value of the second criterion for the next tier.
percentageInteger
(10)
YESNumericPercentage of customer's progress toward the next tier.
endOfPeriodString
(32)
YESTimestampEnd date of the current tier period, or null if not applicable.
Sample JSON Response
{
"requestID": "b7848f6b-c304-4518-9cce-7bb84b642yyy",
"rc": 200,
"message": "read data successfully",
"data": {
"id": "cust-64229118-64c3-4de5-9c75-9f0d86fa2yyy",
"name": "Tridessy",
"totalPoint": 5585,
"customerId": "64229118-64c3-4de5-9c75-9f0d86fa2yyy",
"email": "me@mail.com",
"phoneNumber": "+6282253633026",
"provinceName": "",
"cityName": "",
"districtName": "",
"postalCode": "",
"detailAddress": "",
"tierLevels": [
{
"id": "3dcedfbd-65d6-4058-b8c9-43fd1f12969a",
"name": "Silver",
"iconFile": "{{BaseURL}}/api/tier-level/tiers/icons/tier-level-3.png",
"valueCriteria1": 500000,
"valueCriteria2": 3,
"criteriaName": "Amount OR Frequency",
"description": "",
"tierBenefit": [
{
"id": "ed94084c-7dd4-4d92-8bd9-333673e49yyy",
"benefitTitle": "Cashback 5%",
"benefitDescription": "Cashback hingga 5% untuk semua transaksi hotel",
"benefitType": "Cashback Rewards",
"benefitValue": 5
}
]
},
{
"id": "8c139f8a-01d7-4eaf-9c74-94ce5fccfyyy",
"name": "Gold",
"iconFile": "{{BaseURL}}/api/tier-level/tiers/icons/tier-level-2.png",
"valueCriteria1": 4000000,
"valueCriteria2": 8,
"criteriaName": "Amount OR Frequency",
"description": "",
"tierBenefit": [
{
"id": "afbefa42-e0bd-45b5-aa16-714c23561yyy",
"benefitTitle": "Diskon 5%",
"benefitDescription": "Diskon 5% untuk setiap transaksi hotel",
"benefitType": "Percentage Discount",
"benefitValue": 5
}
]
},
{
"id": "a35cb164-02d9-4050-bc4f-4d10aae00yyy",
"name": "Diamond",
"iconFile": "{{BaseURL}}/api/tier-level/tiers/icons/tier-level-10.png",
"valueCriteria1": 10000000,
"valueCriteria2": 25,
"criteriaName": "Amount OR Frequency",
"description": "",
"tierBenefit": [
{
"id": "cab17180-25d8-4553-b678-8159513d1yyy",
"benefitTitle": "Cashback 10%",
"benefitDescription": "Cashback 10% untuk semua transaksi hotel",
"benefitType": "Cashback Rewards",
"benefitValue": 10
},
{
"id": "92cf1946-0ea2-4d5c-b656-3d76432bayyy",
"benefitTitle": "Diskon 10%",
"benefitDescription": "Diskon 10% untuk semua transaksi hotel",
"benefitType": "Percentage Discount",
"benefitValue": 10
},
{
"id": "a940d092-46b7-41f0-bc5d-746c18e8cyyy",
"benefitTitle": "Point 3x",
"benefitDescription": "Poin 3x lipat untuk semua transaksi hotel",
"benefitType": "Points Multiplier",
"benefitValue": 3
}
]
}
],
"currentTierLevelId": "61b3e258-27f4-45f4-b645-09ed2930byyy",
"currentProgressCriteria1": 100000,
"currentProgressCriteria2": 1,
"currentCriteriaName": "Amount OR Frequency",
"isParameterIdentic": true,
"nextValueCriteria1": 500000,
"nextValueCriteria2": 3,
"percentage": 33,
"endOfPeriod": null
}
}