Customer Level API

These endpoints will allow you to see Levels for a customer.

Get a complete list of levels

To retrieve a complete list of levels, you need to call the /api/<storeCode>/customer/level endpoint with the GET method.

Definition

GET /api/<storeCode>/customer/level
Parameter Parameter type Description
Authorization header Token received during authentication
<storeCode> query Code of the store to get the levels of.
page query (optional) Start from page, by default 1
perPage query (optional) Number of items to display per page, by default = 10
sort query (optional) Sort by column name, by default = name
direction query (optional) Direction of sorting [ASC, DESC], by default = ASC

Example

curl http://localhost:8181/api/DEFAULT/customer/level \
    -X "GET" \
    -H "Accept: application/json" \
    -H "Content-type: application/x-www-form-urlencoded" \
    -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6..."

Note

The eyJhbGciOiJSUzI1NiIsInR5cCI6… authorization token is an example value. Your value may be different. Read more about Authorization here.

Example Response

STATUS: 200 OK
{
  "levels": [
    {
      "name": "level1",
      "description": "example level",
      "conditionValue": 20,
      "hasPhoto": true
    },
    {
      "name": "level2",
      "description": "example level",
      "conditionValue": 200,
      "hasPhoto": false
    },
  ],
  "total": 2
}