Skip to main content

Create a Prize Request

This endpoint creates a request for a loyalty prize

info

This operation requires authentication

HTTP Request

POST /api/v2/loyalty/request/

Parameters

NameInTypeRequiredDescription
prizebodyintegertrueA unique integer value identifying the requested prize

Example Body Parameters

{
"prize": "integer"
}

Example Request

const inputBody = '{
"prize": "integer"
}';
const headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json',
'Authorization': 'Bearer {access_token}'
};

fetch('/api/v2/loyalty/request/',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

Responses

StatusMeaningDescriptionSchema
201CreatedResponse status codeLoyalty Prize User

Example responses

{
"id": "integer",
"user": {User},
"prize": {Prize},
"prize_points": "integer",
"pending_at": "string",
"status": "integer",
"status_description": "string"
}