Loyalty Program Service API
- LoyaltyProgramService
- Parameters
- getLevels
- Examples
- getLevelsById
- Parameters
- Examples
- getUserProfile
- Examples
Loyalty Program Micro Service API SDK
- url string service url
- token (string | null) user access token if available (optional, default null)
Get Loyalty Levels
#### Examples
``javascript`
To use
(async () => {
const LoyaltyProgramService = new LoyaltyProgramService(url, token);
const list = await LoyaltyProgramService.getLevels();
})();
Returns Array array of loyalty levels
Get Loyalty Level by id
#### Parameters
- id string level id
#### Examples
`javascript`
To use
(async () => {
const LoyaltyProgramService = new LoyaltyProgramService(url, token);
const list = await LoyaltyProgramService.getLevelsById(id);
})();
Returns object object of loyalty level
Get Loyalty Levels
#### Examples
`javascript``
To use
(async () => {
const LoyaltyProgramService = new LoyaltyProgramService(url, token);
const list = await LoyaltyProgramService.getUserProfile();
})();
Returns Object object of user profile