Patch a Specific Prize Request
This endpoint patches a specific request for a loyalty prize
info
You can use this endpoint to to change status
in an admin list/table interface.
info
This operation requires admin or editor role.
HTTP Request
PATCH /api/v2/loyalty/request/{id}/
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | A unique integer value identifying this loyalty prize user |
body | body | Loyalty Prize User | false | The request body(loyalty prize user params) |
Example Body Parameters
- JSON
{
"status": "integer"
}
Enumerated Values
Parameter | Value | Description |
---|---|---|
status | 0 | pending |
status | 1 | refused |
status | 2 | sent |
Example Request
- JavaScript
- Bash
const inputBody = '{
"status": "integer"
}';
const headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json',
'Authorization': 'Bearer {access_token}'
};
fetch('/api/v2/loyalty/request/{id}/',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
# You can also use wget
curl -X PATCH /api/v2/loyalty/request/{id}/ \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access_token}' \
--DATA '{body}'
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 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"
}