Setting the loyalty level of a user
Returns an OK code and a JSON for the user. A sample is shown below:
{
"result": {
"code": 1,
"status": "ok"
},
"results": {
"loyalty_level": {
"id": 123,
"campaign_id": 123123,
"name": "VIP",
"description": "VIP level in the Loyalty Programme",
"automated_level_logic": "0"
}
},
"result_type": "alter-user-loyalty-level"
}
Overview
- Call name: alter-user-loyalty-level
- Endpoint URL: https://api0.spaaza.com/auth/alter-user-loyalty-level
- Request methods: PUT
- Auth required: yes
X-Spaaza-MyPrice-App-Hostname
header requirement: mandatory when using privileged authenticationX-Spaaza-Request
header: optional and can be used for to record signup channel (see below)
Introduction
This API call changes the loyalty level of a user to that supplied.
HTTP Parameters
The following HTTP parameters can be passed to the API:
Parameter | Description |
---|---|
user_id | (string/integer, mandatory) the ID of the user (programme member) in the Spaaza system. If the member_number parameter is supplied, this parameter should not be used. |
member_number | (string/integer, mandatory unless the user_id parameter is supplied) the member number in the programme of the user (member) whose loyalty level is being changed. If the user_id parameter is supplied then this parameter is not needed and the user_id parameter will take precedence. |
loyalty_level_id | (integer, mandatory) the ID of the loyalty level which that of the user (programme member) is to be changed to. |
Permissions and Authentication
Admin authentication: the performing user needs to be logged in and have write access
to the entity (business or chain) to which the user is connected.
Privileged authentication: the use of privileged authentication is not permitted for this endpoint.