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
| Field | Data Type | Mandatory | Format | Description |
|---|---|---|---|---|
| requestID | String (36) | YES | UUID | Unique identifier for the request. |
| rc | Integer (3) | YES | Numeric | Response code indicating the status of the operation. |
| Message | String (200) | YES | Alphanumeric | A descriptive message regarding the response. |
| data | JSON Object | YES | JSON Object | Detail information from data. |
| data.id | String (36) | YES | UUID | Unique ID of the customer. |
| name | String (200) | YES | Alphanumeric | Name of the customer. |
| totalPoint | Integer (10) | YES | Numeric | Total points accumulated by the customer. |
| customerId | String (36) | YES | UUID | Identifier of the customer. |
| String (200) | YES | User's email address. | ||
| phoneNumber | String (200) | YES | Numeric | User's phone number. |
| provinceName | String (200) | NO | Alphanumeric | Name of the province where the customer resides. |
| cityName | String (200) | NO | Alphanumeric | Name of the city where the customer resides. |
| districtName | String (200) | NO | Alphanumeric | Name of the district where the customer resides. |
| postalCode | String (200) | NO | Alphanumeric | Postal code of the customer's address. |
| detailAddress | String (200) | NO | Alphanumeric | Detailed address of the customer. |
| tierLevels | Array | YES | Array | List of tier levels available. |
| tierLevels.id | String (36) | YES | UUID | Unique ID of the tier level. |
| name | String (200) | YES | Alphanumeric | Name of the tier level. |
| iconFile | String (200) | YES | URL | URL of the tier’s icon image. |
| valueCriteria1 | Integer (10) | YES | Numeric | Minimum value required for the first criterion (e.g., total spending). |
| valueCriteria2 | Integer (10) | YES | Numeric | Minimum value required for the second criterion (e.g., transaction count). |
| criteriaName | String (200) | YES | Alphanumeric | The name or type of criteria used for tier evaluation. |
| description | String (200) | NO | Alphanumeric | Description of the tier (if any). |
| tierBenefit | Array | YES | Array | List of benefits with the tier. |
| tierBenefit.id | String (36) | YES | UUID | Unique identifier of the tier benefit. |
| benefitTitle | String (200) | YES | Alphanumeric | Title or short name of the benefit. |
| benefitDescription | String (200) | YES | Alphanumeric | Detailed explanation of the benefit. |
| benefitType | String (200) | YES | Alphanumeric | Type of benefit (e.g., Cashback Rewards, Percentage Discount). |
| benefitValue | Integer (10) | YES | Numeric | Value or percentage of the benefit (e.g., 5 means 5%). |
| currentTierLevelId | String (36) | YES | UUID | ID of the customer's current tier. |
| currentProgressCriteria1 | Integer (10) | YES | Numeric | Customer's progress toward next tier based on first criterion. |
| currentProgressCriteria2 | Integer (10) | YES | Numeric | Customer's progress toward next tier based on second criterion. |
| currentCriteriaName | String (200) | YES | Alphanumeric | Type of progress criteria used (e.g., "Amount OR Frequency"). |
| isParameterIdentic | Boolean | YES | True / false | Indicates whether tier criteria parameters are identical across tiers. |
| nextValueCriteria1 | Integer (10) | YES | Numeric | Target value of the first criterion for the next tier. |
| nextValueCriteria2 | Integer (10) | YES | Numeric | Target value of the second criterion for the next tier. |
| percentage | Integer (10) | YES | Numeric | Percentage of customer's progress toward the next tier. |
| endOfPeriod | String (32) | YES | Timestamp | End 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
}
}