Skip to main content

Rewards List

Details

Used to list all avalibale rewards for a customer or generally.

URL : <base_url>/rewards/list

Method : POST

Authentication required : YES

Request parameters

In the request URL, provide the following parameter in the URL

ParameterTypeExampleDescription
numberstring+18761234567Optional parameter.

Success Response

Code : 200 OK

Content :

{
"success": true,
"data": [
{
"id": 1,
"created_at": "2021-08-20T22:15:38.000000Z",
"updated_at": "2021-08-20T22:16:03.000000Z",
"loyalty_id": 1,
"team_id": 1,
"points": 500,
"name": "1 free mini goddie bag",
"active": 1
},
{
"id": 2,
"created_at": "2021-08-20T22:22:52.000000Z",
"updated_at": "2021-08-20T22:22:52.000000Z",
"loyalty_id": 1,
"team_id": 1,
"points": 500,
"name": "1 free mini goddie bag",
"active": 0
}
]
}

Error Responses

Condition : invalid git card code.

Code : 400 BAD REQUEST

Content :

{
"message": "The given data was invalid.",
"errors": {
"loyalty": "Loyalty service not active for this account."
}
}

Condition : Invalid loyalty service.

Code : 400 BAD REQUEST

Content :

{
"message": "The given data was invalid.",
"errors": {
"loyalty": "Invalid loyalty subscription."
}
}