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
Name | In | Type | Required | Description |
---|---|---|---|---|
prize | body | integer | true | A unique integer value identifying the requested prize |
Example Body Parameters
- JSON
{
"prize": "integer"
}
Example Request
- JavaScript
- Bash
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);
});
# You can also use wget
curl -X POST /api/v2/loyalty/request/ \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access_token}' \
--DATA '{body}'
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Response status code | Loyalty Prize User |
Example responses
- 200
{
"id": "integer",
"user": {User},
"prize": {Prize},
"prize_points": "integer",
"pending_at": "string",
"status": "integer",
"status_description": "string"
}