> For the complete documentation index, see [llms.txt](https://help.openloyalty.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.openloyalty.io/api-reference/tier.md).

# Tier

These endpoints will allow you to easily manage tiers.

## Get tier’s details

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br>\
> This method returns a specific Tier from the system.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Tier","description":"These endpoints will allow you to easily manage tiers."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"tier":{"name":"tier","in":"path","description":"Tier ID","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"TierResponse":{"required":["levelId","name","hasPhoto","storeCode","active","rewards","translations","createdAt","updatedAt","sortOrder","isDefault","conditions"],"properties":{"levelId":{"description":"This field show tier id","type":"string","format":"uuid"},"name":{"description":"This field show tier name","type":"string"},"description":{"description":"This field show tier description","type":"string"},"hasPhoto":{"description":"This field show if tier have photo","type":"boolean"},"storeCode":{"description":"The field shows what store tier it is in","type":"string"},"tierSet":{"description":"This field shows related tier set","required":["tierSetId","name"],"properties":{"tierSetId":{"description":"This field shows tier set id","type":"string","format":"uuid"},"name":{"description":"This field shows tier set name","type":"string"}},"type":"object","additionalProperties":false},"conditions":{"description":"This field shows conditions that member must meet to be at this tier","type":"array","items":{"required":["conditionId","attribute","value"],"properties":{"conditionId":{"type":"string","format":"uuid"},"attribute":{"description":"Specifies the type of attribute. The possible values are:\n- `activeUnits`: The number of units currently active. - `totalEarnedUnits`: The total number of units earned. - `monthsSinceJoiningProgram`: The number of months since the program was joined. - `totalSpending`: The total amount of spending. - `cumulatedEarnedUnits`: The total number of units earned that will be reset when recalculation occur\n","enum":["activeUnits","totalEarnedUnits","monthsSinceJoiningProgram","totalSpending","cumulatedEarnedUnits"]},"value":{"description":"This field shows the value that was specified for the attribute","type":"string"}},"type":"object","additionalProperties":false}},"active":{"description":"The field shows whether the tier is active","type":"boolean"},"rewards":{"description":"Lifetime benefits associated with tier.","type":"array","items":{"required":["rewardId","name","code","active","createdAt","updatedAt"],"properties":{"rewardId":{"description":"Reward ID.","required":["rewardId"],"properties":{"rewardId":{"type":"string","format":"uuid"}},"type":"object"},"name":{"description":"Benefit name.","type":"string"},"value":{"description":"Benefit value.","type":"number","format":"float"},"code":{"description":"Benefit code.","type":"string"},"labels":{"$ref":"#/components/schemas/Labels"},"active":{"description":"Benefit availability","type":"boolean"},"startAt":{"description":"Benefit availability start date","type":"string","format":"date-time"},"endAt":{"description":"Benefit availability end date","type":"string","format":"date-time"},"createdAt":{"description":"Benefit created at date","type":"string","format":"date-time"},"updatedAt":{"description":"Benefit updated at date","type":"string","format":"date-time"},"createdBy":{"description":"Benefit created by","type":"string","format":"uuid"},"updatedBy":{"description":"Benefit updated by","type":"string","format":"uuid"}},"type":"object","additionalProperties":false}},"sortOrder":{"description":"This field shows order of tiers, the higher the number, the higher the tier.","type":"number"},"isDefault":{"description":"This field shows whether the tier is the default tier that was created automatically along with the tier set. Tier serves as the starting tier in tie set","type":"boolean"},"translations":{"type":"array","items":{"required":["id","locale"],"properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"locale":{"type":"string"}},"type":"object"}},"createdAt":{"description":"tier created at date","type":"string","format":"date-time"},"updatedAt":{"description":"tier updated at date","type":"string","format":"date-time"},"createdBy":{"description":"tier created by","type":"string","format":"uuid"},"updatedBy":{"description":"tier updated by","type":"string","format":"uuid"},"conditionValue":{"type":"number","format":"float","deprecated":true}},"type":"object","additionalProperties":false},"Labels":{"description":"A list of custom attributes used for tagging and describing resources. Each item in the list contains a key-value pair, where `key` is the name of the attribute, and `value` is the value assigned to that attribute.\n","type":"array","items":{"required":["key","value"],"properties":{"key":{"description":"The name of the custom attribute.","type":"string"},"value":{"description":"The value assigned to the custom attribute.","type":"string"}},"type":"object","additionalProperties":false}},"ExpiredToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"InvalidToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"Unauthorized":{"required":["message"],"properties":{"message":{"type":"string"}},"type":"object"}},"responses":{"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/tier/{tier}":{"get":{"tags":["Tier"],"summary":"Get tier’s details","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method returns a specific Tier from the system.\n","operationId":"_tierGet","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/tier"}],"responses":{"200":{"description":"Tier details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TierResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ExpiredToken"},{"$ref":"#/components/schemas/InvalidToken"},{"$ref":"#/components/schemas/Unauthorized"}]}}}},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}},"deprecated":true}}}}
````

## Update tier’s details

> This method allows updating a specific Tier in the system.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Tier","description":"These endpoints will allow you to easily manage tiers."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"tier":{"name":"tier","in":"path","description":"Tier ID","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"LevelFormType":{"required":["translations","conditionValue","rewards"],"properties":{"translations":{"$ref":"#/components/schemas/TranslationsType"},"active":{"type":"boolean"},"conditionValue":{"type":"number"},"rewards":{"type":"array","items":{"$ref":"#/components/schemas/RewardFormType"}}},"type":"object"},"TranslationsType":{"required":["en"],"properties":{"en":{"$ref":"#/components/schemas/LocaleTranslation"},"es":{"$ref":"#/components/schemas/LocaleTranslation"}},"type":"object"},"LocaleTranslation":{"type":"object"},"RewardFormType":{"required":["name","value","code","startAt","endAt"],"properties":{"name":{"type":"string"},"value":{"type":"number"},"code":{"type":"string"},"active":{"type":"boolean"},"startAt":{"type":"string","format":"date"},"endAt":{"type":"string","format":"date"},"labels":{"type":"array","items":{"$ref":"#/components/schemas/LabelType"}}},"type":"object"},"LabelType":{"required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"Translations":{"description":"This field is used to save the name and description in the language of your choice.\nYou need to add at least one name in the default language.\n","required":["en"],"properties":{"en":{"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"}},"type":"object","additionalProperties":false},"pl":{"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"}},"type":"object"}},"type":"object","additionalProperties":false}},"responses":{"BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"required":["code","message","errors"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"required":["message","parameters","plural","code","path"],"properties":{"message":{"type":"string"},"parameters":{},"plural":{"type":"integer","nullable":true},"code":{"type":"string"},"path":{"type":"string"}},"type":"object"}}},"type":"object"}}}},"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/tier/{tier}":{"put":{"tags":["Tier"],"summary":"Update tier’s details","description":"This method allows updating a specific Tier in the system.\n","operationId":"tierPut","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/tier"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"properties":{"level":{"allOf":[{"$ref":"#/components/schemas/LevelFormType"},{"properties":{"translations":{"$ref":"#/components/schemas/Translations"}},"type":"object","property":null}]}},"type":"object"}}}},"responses":{"200":{"description":"Return updated tier ID.","content":{"application/json":{"schema":{"properties":{"levelId":{"description":"Updated tier identity","type":"string"}},"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}},"deprecated":true}}}}
````

## Delete a tier

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br>\
> This method allows removing a specific Tier from the system.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Tier","description":"These endpoints will allow you to easily manage tiers."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"tier":{"name":"tier","in":"path","description":"Tier ID","required":true,"schema":{"type":"string","format":"uuid"}}},"responses":{"NoContent":{"description":"Success. No content."},"BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"required":["code","message","errors"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"required":["message","parameters","plural","code","path"],"properties":{"message":{"type":"string"},"parameters":{},"plural":{"type":"integer","nullable":true},"code":{"type":"string"},"path":{"type":"string"}},"type":"object"}}},"type":"object"}}}},"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"required":["message"],"properties":{"message":{"type":"string"}},"type":"object"}}}},"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/tier/{tier}":{"delete":{"tags":["Tier"],"summary":"Delete a tier","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method allows removing a specific Tier from the system.\n","operationId":"tierDelete","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/tier"}],"responses":{"204":{"$ref":"#/components/responses/NoContent"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}},"deprecated":true}}}}
````

## Get tier's photo

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br>\
> This method returns a photo added to a specific Tier.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Tier","description":"These endpoints will allow you to easily manage tiers."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"tier":{"name":"tier","in":"path","description":"Tier ID","required":true,"schema":{"type":"string","format":"uuid"}}},"responses":{"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/tier/{tier}/photo":{"get":{"tags":["Tier"],"summary":"Get tier's photo","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method returns a photo added to a specific Tier.\n","operationId":"tierGetPhoto","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/tier"}],"responses":{"200":{"description":"Returned when successful.","content":{"image/*":{"schema":{"type":"string","format":"binary"}}}},"302":{"description":"Redirect to presigned URL when presigned URLs are enabled."},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````

## Add a tier’s photo

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br>\
> This method allows adding a photo to a specific Tier.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Tier","description":"These endpoints will allow you to easily manage tiers."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"tier":{"name":"tier","in":"path","description":"Tier ID","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"LevelPhotoFormType":{"required":["file"],"properties":{"file":{"type":"object"}},"type":"object"}},"responses":{"BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"required":["code","message","errors"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"required":["message","parameters","plural","code","path"],"properties":{"message":{"type":"string"},"parameters":{},"plural":{"type":"integer","nullable":true},"code":{"type":"string"},"path":{"type":"string"}},"type":"object"}}},"type":"object"}}}},"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/tier/{tier}/photo":{"post":{"tags":["Tier"],"summary":"Add a tier’s photo","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method allows adding a photo to a specific Tier.\n","operationId":"tierPostPhoto","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/tier"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"properties":{"photo":{"$ref":"#/components/schemas/LevelPhotoFormType"}},"type":"object"}}}},"responses":{"200":{"description":"Returned when successful"},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````

## Delete tier’s photo

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br>\
> This method allows removing a photo from a specific Tier.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Tier","description":"These endpoints will allow you to easily manage tiers."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"tier":{"name":"tier","in":"path","description":"Tier ID","required":true,"schema":{"type":"string","format":"uuid"}}},"responses":{"BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"required":["code","message","errors"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"required":["message","parameters","plural","code","path"],"properties":{"message":{"type":"string"},"parameters":{},"plural":{"type":"integer","nullable":true},"code":{"type":"string"},"path":{"type":"string"}},"type":"object"}}},"type":"object"}}}},"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/tier/{tier}/photo":{"delete":{"tags":["Tier"],"summary":"Delete tier’s photo","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method allows removing a photo from a specific Tier.\n","operationId":"tierDeletePhoto","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/tier"}],"responses":{"200":{"description":"Returned when successful"},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````

## Export tier’s members list

> This method returns a file with all Members assigned to a specific Tier.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Tier","description":"These endpoints will allow you to easily manage tiers."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"tier":{"name":"tier","in":"path","description":"Tier ID","required":true,"schema":{"type":"string","format":"uuid"}}},"responses":{"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/tier/{tier}/export":{"get":{"tags":["Tier"],"summary":"Export tier’s members list","description":"This method returns a file with all Members assigned to a specific Tier.\n","operationId":"tierGetCsvTier","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/tier"}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string"}}}},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}},"deprecated":true}}}}
````

## Add a tier

> This method allows adding a new Tier to the system.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Tier","description":"These endpoints will allow you to easily manage tiers."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}}},"schemas":{"LevelFormType":{"required":["translations","conditionValue","rewards"],"properties":{"translations":{"$ref":"#/components/schemas/TranslationsType"},"active":{"type":"boolean"},"conditionValue":{"type":"number"},"rewards":{"type":"array","items":{"$ref":"#/components/schemas/RewardFormType"}}},"type":"object"},"TranslationsType":{"required":["en"],"properties":{"en":{"$ref":"#/components/schemas/LocaleTranslation"},"es":{"$ref":"#/components/schemas/LocaleTranslation"}},"type":"object"},"LocaleTranslation":{"type":"object"},"RewardFormType":{"required":["name","value","code","startAt","endAt"],"properties":{"name":{"type":"string"},"value":{"type":"number"},"code":{"type":"string"},"active":{"type":"boolean"},"startAt":{"type":"string","format":"date"},"endAt":{"type":"string","format":"date"},"labels":{"type":"array","items":{"$ref":"#/components/schemas/LabelType"}}},"type":"object"},"LabelType":{"required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"Translations":{"description":"This field is used to save the name and description in the language of your choice.\nYou need to add at least one name in the default language.\n","required":["en"],"properties":{"en":{"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"}},"type":"object","additionalProperties":false},"pl":{"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"}},"type":"object"}},"type":"object","additionalProperties":false}},"responses":{"BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"required":["code","message","errors"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"required":["message","parameters","plural","code","path"],"properties":{"message":{"type":"string"},"parameters":{},"plural":{"type":"integer","nullable":true},"code":{"type":"string"},"path":{"type":"string"}},"type":"object"}}},"type":"object"}}}},"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/tier/create":{"post":{"tags":["Tier"],"summary":"Add a tier","description":"This method allows adding a new Tier to the system.\n","operationId":"tierPost","parameters":[{"$ref":"#/components/parameters/storeCode"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"properties":{"level":{"allOf":[{"$ref":"#/components/schemas/LevelFormType"},{"properties":{"translations":{"$ref":"#/components/schemas/Translations"}},"type":"object","property":null}]}},"type":"object"}}}},"responses":{"200":{"description":"Return created tier ID.","content":{"application/json":{"schema":{"properties":{"levelId":{"description":"Created tier identity","type":"string"}},"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/AccessDenied"}},"deprecated":true}}}}
````

## Activate a tier

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br>\
> This method allows activating a specific Tier.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Tier","description":"These endpoints will allow you to easily manage tiers."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"tier":{"name":"tier","in":"path","description":"Tier ID","required":true,"schema":{"type":"string","format":"uuid"}}},"responses":{"BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"required":["code","message","errors"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"required":["message","parameters","plural","code","path"],"properties":{"message":{"type":"string"},"parameters":{},"plural":{"type":"integer","nullable":true},"code":{"type":"string"},"path":{"type":"string"}},"type":"object"}}},"type":"object"}}}},"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/tier/{tier}/activate":{"post":{"tags":["Tier"],"summary":"Activate a tier","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method allows activating a specific Tier.\n","operationId":"tierPostActivate","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/tier"}],"requestBody":{"content":{"application/json":{"schema":{"required":["active"],"properties":{"active":{"description":"If the tier should be active","type":"boolean"}},"type":"object"}}}},"responses":{"200":{"description":"Returned when successful"},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````

## Get tier sets list

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br>\
> This method returns a list of all created TierSets in the system.\
> Currently, it returns one available tierSet, but in the future, if the multi-tier sets created, it will return a list of all tierSets from the specific tenant (storeCode).<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Tier","description":"These endpoints will allow you to easily manage tiers."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"page":{"name":"_page","in":"query","description":"Number of page with results, starts from 1","required":false,"schema":{"type":"integer","default":1,"minimum":1}},"itemsOnPage":{"name":"_itemsOnPage","in":"query","description":"Items on one page","required":false,"schema":{"type":"integer","default":10,"maximum":50,"minimum":1}},"orderBy":{"name":"_orderBy","in":"query","description":"Sorting order. If sorting is not chosen, the rows will be returned in an unspecified order. Sort order: * `asc` - Ascending, from A to Z * `desc` - Descending, from Z to A","required":false,"style":"deepObject","explode":true,"schema":{"type":"object","additionalProperties":{"type":"string","enum":["asc","desc"]}}}},"schemas":{"TierSetResponseList":{"required":["tierSetId","name","translations","active","conditions","downgrade","createdAt","updatedAt","isMigrated","tiers","labels","isDefault"],"properties":{"tierSetId":{"description":"Tier set id","type":"string","format":"uuid"},"name":{"description":"Tier set name","type":"string"},"description":{"description":"Tier set description","type":"string"},"active":{"description":"The field shows whether the tier set is active","type":"boolean"},"createdAt":{"description":"Tier set created at date","type":"string","format":"date-time"},"updatedAt":{"description":"Tier set updated at date","type":"string","format":"date-time"},"labels":{"$ref":"#/components/schemas/Labels"},"conditions":{"description":"Conditions are determined by the tier set configuration","type":"array","items":{"required":["id","attribute"],"properties":{"id":{"type":"string","format":"uuid"},"attribute":{"description":"Specifies the type of attribute. The possible values are:\n- `activeUnits`: The number of units currently active. - `totalEarnedUnits`: The total number of units earned. - `monthsSinceJoiningProgram`: The number of months since the program was joined. - `totalSpending`: The total amount of spending. - `cumulatedEarnedUnits`: The total number of units earned that will be reset when recalculation occur\n","type":"string","enum":["activeUnits","totalEarnedUnits","monthsSinceJoiningProgram","totalSpending","cumulatedEarnedUnits"]},"walletType":{"description":"This field occurs for attributes related to units","type":"string"}},"type":"object","additionalProperties":false}},"tiers":{"description":"This field return tiers belong to tier set","type":"array","items":{"required":["levelId","name","active"],"properties":{"levelId":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"active":{"description":"The field shows whether the tier is active"}},"type":"object","additionalProperties":false}},"translations":{"$ref":"#/components/schemas/Translations"},"isMigrated":{"description":"This field shows whether the tier set has been migrated from the old tier system","type":"boolean"},"isDefault":{"description":"This field shows which tier set was added first, which means that the tier set is default","type":"boolean"},"downgrade":{"$ref":"#/components/schemas/Downgrade"}},"type":"object","additionalProperties":false},"Labels":{"description":"A list of custom attributes used for tagging and describing resources. Each item in the list contains a key-value pair, where `key` is the name of the attribute, and `value` is the value assigned to that attribute.\n","type":"array","items":{"required":["key","value"],"properties":{"key":{"description":"The name of the custom attribute.","type":"string"},"value":{"description":"The value assigned to the custom attribute.","type":"string"}},"type":"object","additionalProperties":false}},"Translations":{"description":"This field is used to save the name and description in the language of your choice.\nYou need to add at least one name in the default language.\n","required":["en"],"properties":{"en":{"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"}},"type":"object","additionalProperties":false},"pl":{"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"}},"type":"object"}},"type":"object","additionalProperties":false},"Downgrade":{"description":"Downgrade settings","properties":{"mode":{"description":"Specifies the mode of downgrade. The possible values are:\n- `none`: Downgrade will not occur.\n- `automatic`: Downgrade will occur automatically when the conditions for being at a given tier are not met.\n- `periodic`: Downgrade will occur periodically. If this mode is selected, you must also choose a `period`.\n","type":"string","enum":["none","automatic","periodic"]},"period":{"description":"Specifies the period for periodic downgrades. This is only available when the mode is set to `periodic`.\n- `registration_anniversary`: Downgrade occurs annually on the anniversary of your registration date. For example,  if you registered on 2020-10-10, the next downgrade will take place on 2025-10-10, followed by 2026-10-10, and so on.\n- `annual_recalculation_on_chosen_dates`: Allows you to specify a list of dates on which the downgrade will occur every year. For instance, if you add 03-10 and 07-15, downgrades will happen annually on March 10 and July 15.\n- `recalculation_every_month_after_tier_promotion`: Enables you to set a specific interval (in months) after the last tier promotion for the downgrade to occur. For example,  if your promotion date is 2025-10-10 and the interval is set to 2 months, your downgrade date will be 2025-12-10.\n","type":"string","enum":["registration_anniversary","annual_recalculation_on_chosen_dates","recalculation_every_month_after_tier_promotion","yearly","monthly","weekly"]},"recalculationDates":{"description":"Specifies dates when recalculation will be annually started. This is only available when the period is set to `annual_recalculation_on_chosen_dates`.\n","type":"array","items":{"type":"string"}},"interval":{"description":"Specifies the number of months that must pass after the last tier promotion to start downgrade. This is only available when the period is set to `recalculation_every_month_after_tier_promotion`.\n","type":"integer"}},"type":"object","additionalProperties":false},"SearchableTotalResponse":{"required":["all","filtered","estimated"],"properties":{"all":{"type":"integer","deprecated":true},"filtered":{"type":"integer","deprecated":true},"estimated":{"description":"Field estimated is used to show that the results are estimated. It might happen when there are more than 5000 results due to performance optimization.","type":"boolean","deprecated":true}},"type":"object","deprecated":true},"ExpiredToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"InvalidToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"Unauthorized":{"required":["message"],"properties":{"message":{"type":"string"}},"type":"object"}},"responses":{"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/tierSet":{"get":{"tags":["Tier"],"summary":"Get tier sets list","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method returns a list of all created TierSets in the system.\nCurrently, it returns one available tierSet, but in the future, if the multi-tier sets created, it will return a list of all tierSets from the specific tenant (storeCode).\n","operationId":"_getTierSetList","parameters":[{"$ref":"#/components/parameters/storeCode"},{"name":"name","in":"query","required":false,"schema":{"type":"string"}},{"name":"active","in":"query","description":"Filter by active filed","required":false,"schema":{"type":"boolean"}},{"name":"createdAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/itemsOnPage"},{"$ref":"#/components/parameters/orderBy"}],"responses":{"200":{"description":"Tier set list.","content":{"application/json":{"schema":{"required":["items","total"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TierSetResponseList"}},"total":{"$ref":"#/components/schemas/SearchableTotalResponse"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ExpiredToken"},{"$ref":"#/components/schemas/InvalidToken"},{"$ref":"#/components/schemas/Unauthorized"}]}}}},"403":{"$ref":"#/components/responses/AccessDenied"}}}}}}
````

## Add a tier set

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br>\
> This method allows adding a new TierSet to the system.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Tier","description":"These endpoints will allow you to easily manage tiers."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}}},"schemas":{"PostTierSet":{"required":["tierSet"],"properties":{"tierSet":{"required":["translations","conditions"],"properties":{"translations":{"$ref":"#/components/schemas/Translations"},"active":{"description":"The field determines whether the tier set will be active","type":"boolean"},"labels":{"$ref":"#/components/schemas/Labels"},"conditions":{"description":"Conditions settings","type":"array","items":{"required":["attribute"],"properties":{"attribute":{"description":"Specifies the type of attribute. The possible values are:\n- `activeUnits`: The number of units currently active. - `totalEarnedUnits`: The total number of units earned. - `monthsSinceJoiningProgram`: The number of months since the program was joined. - `totalSpending`: The total amount of spending. - `cumulatedEarnedUnits`: The total number of units earned that will be reset when recalculation occur\n","type":"string","enum":["activeUnits","totalEarnedUnits","monthsSinceJoiningProgram","totalSpending","cumulatedEarnedUnits"]},"walletType":{"description":"This field is only required for attributes related to units","type":"string"}},"type":"object","additionalProperties":false}},"downgrade":{"$ref":"#/components/schemas/Downgrade"}},"type":"object","additionalProperties":false}},"type":"object","additionalProperties":false},"Translations":{"description":"This field is used to save the name and description in the language of your choice.\nYou need to add at least one name in the default language.\n","required":["en"],"properties":{"en":{"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"}},"type":"object","additionalProperties":false},"pl":{"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"}},"type":"object"}},"type":"object","additionalProperties":false},"Labels":{"description":"A list of custom attributes used for tagging and describing resources. Each item in the list contains a key-value pair, where `key` is the name of the attribute, and `value` is the value assigned to that attribute.\n","type":"array","items":{"required":["key","value"],"properties":{"key":{"description":"The name of the custom attribute.","type":"string"},"value":{"description":"The value assigned to the custom attribute.","type":"string"}},"type":"object","additionalProperties":false}},"Downgrade":{"description":"Downgrade settings","properties":{"mode":{"description":"Specifies the mode of downgrade. The possible values are:\n- `none`: Downgrade will not occur.\n- `automatic`: Downgrade will occur automatically when the conditions for being at a given tier are not met.\n- `periodic`: Downgrade will occur periodically. If this mode is selected, you must also choose a `period`.\n","type":"string","enum":["none","automatic","periodic"]},"period":{"description":"Specifies the period for periodic downgrades. This is only available when the mode is set to `periodic`.\n- `registration_anniversary`: Downgrade occurs annually on the anniversary of your registration date. For example,  if you registered on 2020-10-10, the next downgrade will take place on 2025-10-10, followed by 2026-10-10, and so on.\n- `annual_recalculation_on_chosen_dates`: Allows you to specify a list of dates on which the downgrade will occur every year. For instance, if you add 03-10 and 07-15, downgrades will happen annually on March 10 and July 15.\n- `recalculation_every_month_after_tier_promotion`: Enables you to set a specific interval (in months) after the last tier promotion for the downgrade to occur. For example,  if your promotion date is 2025-10-10 and the interval is set to 2 months, your downgrade date will be 2025-12-10.\n","type":"string","enum":["registration_anniversary","annual_recalculation_on_chosen_dates","recalculation_every_month_after_tier_promotion","yearly","monthly","weekly"]},"recalculationDates":{"description":"Specifies dates when recalculation will be annually started. This is only available when the period is set to `annual_recalculation_on_chosen_dates`.\n","type":"array","items":{"type":"string"}},"interval":{"description":"Specifies the number of months that must pass after the last tier promotion to start downgrade. This is only available when the period is set to `recalculation_every_month_after_tier_promotion`.\n","type":"integer"}},"type":"object","additionalProperties":false},"ExpiredToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"InvalidToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"Unauthorized":{"required":["message"],"properties":{"message":{"type":"string"}},"type":"object"}},"responses":{"BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"required":["code","message","errors"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"required":["message","parameters","plural","code","path"],"properties":{"message":{"type":"string"},"parameters":{},"plural":{"type":"integer","nullable":true},"code":{"type":"string"},"path":{"type":"string"}},"type":"object"}}},"type":"object"}}}},"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/tierSet":{"post":{"tags":["Tier"],"summary":"Add a tier set","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method allows adding a new TierSet to the system.\n","operationId":"_tierSetPost","parameters":[{"$ref":"#/components/parameters/storeCode"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostTierSet"}}}},"responses":{"200":{"description":"Successfully created tier set .","content":{"application/json":{"schema":{"properties":{"tierSetId":{"description":"Created tierSet identity","type":"string","format":"uuid"}},"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ExpiredToken"},{"$ref":"#/components/schemas/InvalidToken"},{"$ref":"#/components/schemas/Unauthorized"}]}}}},"403":{"$ref":"#/components/responses/AccessDenied"}}}}}}
````

## Return tier set member progress.

> This method returns detailed member progress information for a specific tier set

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Tier","description":"These endpoints will allow you to easily manage tiers."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"tierSet":{"name":"tierSet","in":"path","description":"TierSet ID","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"TierSetMemberProgress":{"required":["tierSetId","tierSetName","downgrade","manually","nextTierCurrentProgress"],"properties":{"currentTierId":{"description":"The field displays the member's current tier id","type":"string","format":"uuid"},"currentTierName":{"description":"The field displays the member's current tier name","type":"string"},"nextTierId":{"description":"The field displays the member's next tier id","type":"string","format":"uuid"},"nextTierName":{"description":"The field displays the member's next tier name","type":"string"},"tierSetId":{"description":"The field will show the tierSet id in which the tier is located","type":"string","format":"uuid"},"tierSetName":{"description":"The field will show the tierSet id in which the tier is located","type":"string"},"currentProgress":{"description":"Shows you your current progress percentage and what progress you are missing to reach the next tier","type":"number","format":"double"},"lastPromotionAt":{"description":"Shows when the last promotion to a higher tier occurred","type":"string","format":"date-time"},"lastDowngradeAt":{"description":"Shows when the last downgrade to a lower tier occurred","type":"string","format":"date-time"},"nextRecalculationAt":{"description":"Shows the date of the next recalculation","type":"string","format":"date-time"},"manually":{"description":"Shows whether the current tier has been assigned manually","type":"boolean"},"downgrade":{"description":"Shows downgrade mode","type":"string"},"nextTierCurrentProgress":{"type":"array","items":{"required":["conditionId","attribute"],"properties":{"conditionId":{"description":"Shows conditions id","type":"string","format":"uuid"},"attribute":{"description":"The field shows condition attribute","type":"string","enum":["activeUnits","totalEarnedUnits","monthsSinceJoiningProgram","totalSpending","cumulatedEarnedUnits"]},"currentValue":{"description":"The field shows your current value for condition attribute","type":"number","format":"float"},"valueGoal":{"description":"The field shows what value to aim for to reach the next level","type":"number","format":"float"},"walletType":{"description":"This field shows chosen wallet only for attributes related to units","type":"string"}},"type":"object","additionalProperties":false}}},"type":"object","additionalProperties":false},"ExpiredToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"InvalidToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"Unauthorized":{"required":["message"],"properties":{"message":{"type":"string"}},"type":"object"}},"responses":{"BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"required":["code","message","errors"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"required":["message","parameters","plural","code","path"],"properties":{"message":{"type":"string"},"parameters":{},"plural":{"type":"integer","nullable":true},"code":{"type":"string"},"path":{"type":"string"}},"type":"object"}}},"type":"object"}}}},"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/member/{member}/tierSet/{tierSet}":{"get":{"tags":["Tier"],"summary":"Return tier set member progress.","description":"This method returns detailed member progress information for a specific tier set","operationId":"_tierSetMemberProgress","parameters":[{"$ref":"#/components/parameters/storeCode"},{"name":"member","in":"path","required":true,"schema":{"type":"string","pattern":"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|email=[a-zA-Z0-9!#$%&'\\.*+\\-@=?^_`{|}~;]+|phone=[0-9+]+|loyaltyCardNumber=[0-9a-zA-Z\\._-]+"}},{"$ref":"#/components/parameters/tierSet"}],"responses":{"200":{"description":"Tier set member progress.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TierSetMemberProgress"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ExpiredToken"},{"$ref":"#/components/schemas/InvalidToken"},{"$ref":"#/components/schemas/Unauthorized"}]}}}},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````

## Get tiers list

> This method returns a list of all created Tiers in the system.  \
> If sorting is not chosen, the rows will be returned in an unspecified order.  \
> To sort a result, use an \`\_orderBy\` parameter in query.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Tier","description":"These endpoints will allow you to easily manage tiers."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"page":{"name":"_page","in":"query","description":"Number of page with results, starts from 1","required":false,"schema":{"type":"integer","default":1,"minimum":1}},"itemsOnPage":{"name":"_itemsOnPage","in":"query","description":"Items on one page","required":false,"schema":{"type":"integer","default":10,"maximum":50,"minimum":1}},"orderBy":{"name":"_orderBy","in":"query","description":"Sorting order. If sorting is not chosen, the rows will be returned in an unspecified order. Sort order: * `asc` - Ascending, from A to Z * `desc` - Descending, from Z to A","required":false,"style":"deepObject","explode":true,"schema":{"type":"object","additionalProperties":{"type":"string","enum":["asc","desc"]}}}},"schemas":{"TierResponse":{"required":["levelId","name","hasPhoto","storeCode","active","rewards","translations","createdAt","updatedAt","sortOrder","isDefault","conditions"],"properties":{"levelId":{"description":"This field show tier id","type":"string","format":"uuid"},"name":{"description":"This field show tier name","type":"string"},"description":{"description":"This field show tier description","type":"string"},"hasPhoto":{"description":"This field show if tier have photo","type":"boolean"},"storeCode":{"description":"The field shows what store tier it is in","type":"string"},"tierSet":{"description":"This field shows related tier set","required":["tierSetId","name"],"properties":{"tierSetId":{"description":"This field shows tier set id","type":"string","format":"uuid"},"name":{"description":"This field shows tier set name","type":"string"}},"type":"object","additionalProperties":false},"conditions":{"description":"This field shows conditions that member must meet to be at this tier","type":"array","items":{"required":["conditionId","attribute","value"],"properties":{"conditionId":{"type":"string","format":"uuid"},"attribute":{"description":"Specifies the type of attribute. The possible values are:\n- `activeUnits`: The number of units currently active. - `totalEarnedUnits`: The total number of units earned. - `monthsSinceJoiningProgram`: The number of months since the program was joined. - `totalSpending`: The total amount of spending. - `cumulatedEarnedUnits`: The total number of units earned that will be reset when recalculation occur\n","enum":["activeUnits","totalEarnedUnits","monthsSinceJoiningProgram","totalSpending","cumulatedEarnedUnits"]},"value":{"description":"This field shows the value that was specified for the attribute","type":"string"}},"type":"object","additionalProperties":false}},"active":{"description":"The field shows whether the tier is active","type":"boolean"},"rewards":{"description":"Lifetime benefits associated with tier.","type":"array","items":{"required":["rewardId","name","code","active","createdAt","updatedAt"],"properties":{"rewardId":{"description":"Reward ID.","required":["rewardId"],"properties":{"rewardId":{"type":"string","format":"uuid"}},"type":"object"},"name":{"description":"Benefit name.","type":"string"},"value":{"description":"Benefit value.","type":"number","format":"float"},"code":{"description":"Benefit code.","type":"string"},"labels":{"$ref":"#/components/schemas/Labels"},"active":{"description":"Benefit availability","type":"boolean"},"startAt":{"description":"Benefit availability start date","type":"string","format":"date-time"},"endAt":{"description":"Benefit availability end date","type":"string","format":"date-time"},"createdAt":{"description":"Benefit created at date","type":"string","format":"date-time"},"updatedAt":{"description":"Benefit updated at date","type":"string","format":"date-time"},"createdBy":{"description":"Benefit created by","type":"string","format":"uuid"},"updatedBy":{"description":"Benefit updated by","type":"string","format":"uuid"}},"type":"object","additionalProperties":false}},"sortOrder":{"description":"This field shows order of tiers, the higher the number, the higher the tier.","type":"number"},"isDefault":{"description":"This field shows whether the tier is the default tier that was created automatically along with the tier set. Tier serves as the starting tier in tie set","type":"boolean"},"translations":{"type":"array","items":{"required":["id","locale"],"properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"locale":{"type":"string"}},"type":"object"}},"createdAt":{"description":"tier created at date","type":"string","format":"date-time"},"updatedAt":{"description":"tier updated at date","type":"string","format":"date-time"},"createdBy":{"description":"tier created by","type":"string","format":"uuid"},"updatedBy":{"description":"tier updated by","type":"string","format":"uuid"},"conditionValue":{"type":"number","format":"float","deprecated":true}},"type":"object","additionalProperties":false},"Labels":{"description":"A list of custom attributes used for tagging and describing resources. Each item in the list contains a key-value pair, where `key` is the name of the attribute, and `value` is the value assigned to that attribute.\n","type":"array","items":{"required":["key","value"],"properties":{"key":{"description":"The name of the custom attribute.","type":"string"},"value":{"description":"The value assigned to the custom attribute.","type":"string"}},"type":"object","additionalProperties":false}},"SearchableTotalResponse":{"required":["all","filtered","estimated"],"properties":{"all":{"type":"integer","deprecated":true},"filtered":{"type":"integer","deprecated":true},"estimated":{"description":"Field estimated is used to show that the results are estimated. It might happen when there are more than 5000 results due to performance optimization.","type":"boolean","deprecated":true}},"type":"object","deprecated":true},"ExpiredToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"InvalidToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"Unauthorized":{"required":["message"],"properties":{"message":{"type":"string"}},"type":"object"}},"responses":{"BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"required":["code","message","errors"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"required":["message","parameters","plural","code","path"],"properties":{"message":{"type":"string"},"parameters":{},"plural":{"type":"integer","nullable":true},"code":{"type":"string"},"path":{"type":"string"}},"type":"object"}}},"type":"object"}}}},"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/tier":{"get":{"tags":["Tier"],"summary":"Get tiers list","description":"This method returns a list of all created Tiers in the system.  \nIf sorting is not chosen, the rows will be returned in an unspecified order.  \nTo sort a result, use an `_orderBy` parameter in query.\n","operationId":"_tierGetList","parameters":[{"$ref":"#/components/parameters/storeCode"},{"name":"levelId","in":"query","required":false,"schema":{"type":"string"}},{"name":"conditionValue","in":"query","required":false,"schema":{"type":"number"}},{"name":"name","in":"query","required":false,"schema":{"type":"string"}},{"name":"description","in":"query","required":false,"schema":{"type":"string"}},{"name":"active","in":"query","description":"Filter by active filed","required":false,"schema":{"type":"boolean"}},{"name":"reward:name","in":"query","required":false,"schema":{"type":"string"}},{"name":"reward:code","in":"query","required":false,"schema":{"type":"string"}},{"name":"reward:value","in":"query","required":false,"schema":{"type":"number"}},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/itemsOnPage"},{"$ref":"#/components/parameters/orderBy"}],"responses":{"200":{"description":"List of tiers","content":{"application/json":{"schema":{"required":["items","total"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TierResponse"}},"total":{"$ref":"#/components/schemas/SearchableTotalResponse"}},"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ExpiredToken"},{"$ref":"#/components/schemas/InvalidToken"},{"$ref":"#/components/schemas/Unauthorized"}]}}}},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}},"deprecated":true}}}}
````

## GET /api/{storeCode}/member/{member}/tierSet

> Get list of tier sets which member is assigned

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Tier","description":"These endpoints will allow you to easily manage tiers."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}}},"schemas":{"MemberTierSet":{"required":["currentTierId","tierSetId","tierSetName","currentTierName","manually"],"properties":{"currentTierId":{"description":"Current member tier for tier set","type":"string","format":"uuid"},"tierSetId":{"description":"Tier set Id","type":"string","format":"uuid"},"tierSetName":{"description":"Tier set name","type":"string"},"currentTierName":{"description":"Tier name","type":"string"},"manually":{"description":"The field will indicate whether a given tier in tier set has been assigned manually","type":"boolean"}},"type":"object","additionalProperties":false},"SearchableTotalResponse":{"required":["all","filtered","estimated"],"properties":{"all":{"type":"integer","deprecated":true},"filtered":{"type":"integer","deprecated":true},"estimated":{"description":"Field estimated is used to show that the results are estimated. It might happen when there are more than 5000 results due to performance optimization.","type":"boolean","deprecated":true}},"type":"object","deprecated":true},"ExpiredToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"InvalidToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"Unauthorized":{"required":["message"],"properties":{"message":{"type":"string"}},"type":"object"}},"responses":{"BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"required":["code","message","errors"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"required":["message","parameters","plural","code","path"],"properties":{"message":{"type":"string"},"parameters":{},"plural":{"type":"integer","nullable":true},"code":{"type":"string"},"path":{"type":"string"}},"type":"object"}}},"type":"object"}}}},"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/member/{member}/tierSet":{"get":{"tags":["Tier"],"summary":"Get list of tier sets which member is assigned","operationId":"_memberTierSetList","parameters":[{"$ref":"#/components/parameters/storeCode"},{"name":"member","in":"path","required":true,"schema":{"type":"string","pattern":"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|email=[a-zA-Z0-9!#$%&'\\.*+\\-@=?^_{|}~;]+|phone=[0-9+]+|loyaltyCardNumber=[0-9a-zA-Z\\._-]+"}},{"name":"currentTierId","in":"query","description":"Filter by current tier id field","required":false,"schema":{"type":"string"}},{"name":"tierSetId","in":"query","description":"Filter by tier set Id field","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of member tier sets.","content":{"application/json":{"schema":{"required":["items","total"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MemberTierSet"}},"total":{"$ref":"#/components/schemas/SearchableTotalResponse"}},"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ExpiredToken"},{"$ref":"#/components/schemas/InvalidToken"},{"$ref":"#/components/schemas/Unauthorized"}]}}}},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````

## Get tier set’s details

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br><br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Tier","description":"These endpoints will allow you to easily manage tiers."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"tierSet":{"name":"tierSet","in":"path","description":"TierSet ID","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"TierSetResponse":{"required":["tierSetId","name","createdAt","updatedAt","conditions","isMigrated","isDefault"],"properties":{"tierSetId":{"description":"Tier set name id.","type":"string","format":"uuid"},"name":{"description":"Tier set name.","type":"string"},"description":{"description":"Tier set description.","type":"string"},"active":{"description":"The filed shows if tier set is active.","type":"boolean"},"createdAt":{"description":"Tier set created at date.","type":"string","format":"date-time"},"updatedAt":{"description":"Tier set updated at date.","type":"string","format":"date-time"},"labels":{"$ref":"#/components/schemas/Labels"},"conditions":{"description":"Condition settings for a given tier set","type":"array","items":{"required":["id","attribute"],"properties":{"id":{"type":"string","format":"uuid"},"attribute":{"description":"Specifies the type of attribute. The possible values are:\n- `activeUnits`: The number of units currently active. - `totalEarnedUnits`: The total number of units earned. - `monthsSinceJoiningProgram`: The number of months since the program was joined. - `totalSpending`: The total amount of spending. - `cumulatedEarnedUnits`: The total number of units earned that will be reset when recalculation occur\n","type":"string","enum":["activeUnits","totalEarnedUnits","monthsSinceJoiningProgram","totalSpending","cumulatedEarnedUnits"]},"walletType":{"description":"This field is occur for attributes related to units","type":"string"}},"type":"object","additionalProperties":false}},"tiers":{"description":"This field return tiers belong to tier set","type":"array","items":{"required":["levelId","name","active"],"properties":{"levelId":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"active":{"description":"The field shows whether the tier is active"}},"type":"object","additionalProperties":false}},"translations":{"$ref":"#/components/schemas/Translations"},"isMigrated":{"description":"This field shows whether the tier set has been migrated from the old tier system","type":"boolean"},"isDefault":{"description":"This field shows which tier set was added first, which means that the tier set is default","type":"boolean"},"downgrade":{"$ref":"#/components/schemas/Downgrade"}},"type":"object","additionalProperties":false},"Labels":{"description":"A list of custom attributes used for tagging and describing resources. Each item in the list contains a key-value pair, where `key` is the name of the attribute, and `value` is the value assigned to that attribute.\n","type":"array","items":{"required":["key","value"],"properties":{"key":{"description":"The name of the custom attribute.","type":"string"},"value":{"description":"The value assigned to the custom attribute.","type":"string"}},"type":"object","additionalProperties":false}},"Translations":{"description":"This field is used to save the name and description in the language of your choice.\nYou need to add at least one name in the default language.\n","required":["en"],"properties":{"en":{"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"}},"type":"object","additionalProperties":false},"pl":{"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"}},"type":"object"}},"type":"object","additionalProperties":false},"Downgrade":{"description":"Downgrade settings","properties":{"mode":{"description":"Specifies the mode of downgrade. The possible values are:\n- `none`: Downgrade will not occur.\n- `automatic`: Downgrade will occur automatically when the conditions for being at a given tier are not met.\n- `periodic`: Downgrade will occur periodically. If this mode is selected, you must also choose a `period`.\n","type":"string","enum":["none","automatic","periodic"]},"period":{"description":"Specifies the period for periodic downgrades. This is only available when the mode is set to `periodic`.\n- `registration_anniversary`: Downgrade occurs annually on the anniversary of your registration date. For example,  if you registered on 2020-10-10, the next downgrade will take place on 2025-10-10, followed by 2026-10-10, and so on.\n- `annual_recalculation_on_chosen_dates`: Allows you to specify a list of dates on which the downgrade will occur every year. For instance, if you add 03-10 and 07-15, downgrades will happen annually on March 10 and July 15.\n- `recalculation_every_month_after_tier_promotion`: Enables you to set a specific interval (in months) after the last tier promotion for the downgrade to occur. For example,  if your promotion date is 2025-10-10 and the interval is set to 2 months, your downgrade date will be 2025-12-10.\n","type":"string","enum":["registration_anniversary","annual_recalculation_on_chosen_dates","recalculation_every_month_after_tier_promotion","yearly","monthly","weekly"]},"recalculationDates":{"description":"Specifies dates when recalculation will be annually started. This is only available when the period is set to `annual_recalculation_on_chosen_dates`.\n","type":"array","items":{"type":"string"}},"interval":{"description":"Specifies the number of months that must pass after the last tier promotion to start downgrade. This is only available when the period is set to `recalculation_every_month_after_tier_promotion`.\n","type":"integer"}},"type":"object","additionalProperties":false},"ExpiredToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"InvalidToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"Unauthorized":{"required":["message"],"properties":{"message":{"type":"string"}},"type":"object"}},"responses":{"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/tierSet/{tierSet}":{"get":{"tags":["Tier"],"summary":"Get tier set’s details","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\n","operationId":"_tierSetGet","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/tierSet"}],"responses":{"200":{"description":"Tier set details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TierSetResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ExpiredToken"},{"$ref":"#/components/schemas/InvalidToken"},{"$ref":"#/components/schemas/Unauthorized"}]}}}},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````

## Update a tier set

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br><br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Tier","description":"These endpoints will allow you to easily manage tiers."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"tierSet":{"name":"tierSet","in":"path","description":"TierSet ID","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"PutTierSet":{"required":["tierSet"],"properties":{"tierSet":{"required":["translations","conditions"],"properties":{"translations":{"$ref":"#/components/schemas/Translations"},"active":{"description":"The field determines whether the tier set will be active","type":"boolean"},"labels":{"$ref":"#/components/schemas/Labels"},"conditions":{"type":"array","items":{"required":["attribute"],"properties":{"id":{"description":"Leave empty to add a new condition. Use existing id to update specific condition.","type":"string","format":"uuid"},"attribute":{"description":"Specifies the type of attribute. The possible values are:\n- `activeUnits`: The number of units currently active. - `totalEarnedUnits`: The total number of units earned. - `monthsSinceJoiningProgram`: The number of months since the program was joined. - `totalSpending`: The total amount of spending. - `cumulatedEarnedUnits`: The total number of units earned that will be reset when recalculation occur\n","type":"string","enum":["activeUnits","totalEarnedUnits","monthsSinceJoiningProgram","totalSpending","cumulatedEarnedUnits"]},"walletType":{"description":"This field is only required for attributes related to units","type":"string"}},"type":"object","additionalProperties":false}},"downgrade":{"$ref":"#/components/schemas/Downgrade"}},"type":"object","additionalProperties":false}},"type":"object","additionalProperties":false},"Translations":{"description":"This field is used to save the name and description in the language of your choice.\nYou need to add at least one name in the default language.\n","required":["en"],"properties":{"en":{"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"}},"type":"object","additionalProperties":false},"pl":{"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"}},"type":"object"}},"type":"object","additionalProperties":false},"Labels":{"description":"A list of custom attributes used for tagging and describing resources. Each item in the list contains a key-value pair, where `key` is the name of the attribute, and `value` is the value assigned to that attribute.\n","type":"array","items":{"required":["key","value"],"properties":{"key":{"description":"The name of the custom attribute.","type":"string"},"value":{"description":"The value assigned to the custom attribute.","type":"string"}},"type":"object","additionalProperties":false}},"Downgrade":{"description":"Downgrade settings","properties":{"mode":{"description":"Specifies the mode of downgrade. The possible values are:\n- `none`: Downgrade will not occur.\n- `automatic`: Downgrade will occur automatically when the conditions for being at a given tier are not met.\n- `periodic`: Downgrade will occur periodically. If this mode is selected, you must also choose a `period`.\n","type":"string","enum":["none","automatic","periodic"]},"period":{"description":"Specifies the period for periodic downgrades. This is only available when the mode is set to `periodic`.\n- `registration_anniversary`: Downgrade occurs annually on the anniversary of your registration date. For example,  if you registered on 2020-10-10, the next downgrade will take place on 2025-10-10, followed by 2026-10-10, and so on.\n- `annual_recalculation_on_chosen_dates`: Allows you to specify a list of dates on which the downgrade will occur every year. For instance, if you add 03-10 and 07-15, downgrades will happen annually on March 10 and July 15.\n- `recalculation_every_month_after_tier_promotion`: Enables you to set a specific interval (in months) after the last tier promotion for the downgrade to occur. For example,  if your promotion date is 2025-10-10 and the interval is set to 2 months, your downgrade date will be 2025-12-10.\n","type":"string","enum":["registration_anniversary","annual_recalculation_on_chosen_dates","recalculation_every_month_after_tier_promotion","yearly","monthly","weekly"]},"recalculationDates":{"description":"Specifies dates when recalculation will be annually started. This is only available when the period is set to `annual_recalculation_on_chosen_dates`.\n","type":"array","items":{"type":"string"}},"interval":{"description":"Specifies the number of months that must pass after the last tier promotion to start downgrade. This is only available when the period is set to `recalculation_every_month_after_tier_promotion`.\n","type":"integer"}},"type":"object","additionalProperties":false},"ExpiredToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"InvalidToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"Unauthorized":{"required":["message"],"properties":{"message":{"type":"string"}},"type":"object"}},"responses":{"NoContent":{"description":"Success. No content."},"BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"required":["code","message","errors"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"required":["message","parameters","plural","code","path"],"properties":{"message":{"type":"string"},"parameters":{},"plural":{"type":"integer","nullable":true},"code":{"type":"string"},"path":{"type":"string"}},"type":"object"}}},"type":"object"}}}},"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/tierSet/{tierSet}":{"put":{"tags":["Tier"],"summary":"Update a tier set","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\n","operationId":"_tierSetPut","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/tierSet"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutTierSet"}}}},"responses":{"204":{"$ref":"#/components/responses/NoContent"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ExpiredToken"},{"$ref":"#/components/schemas/InvalidToken"},{"$ref":"#/components/schemas/Unauthorized"}]}}}},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````

## Get tiers list from a tier set

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br><br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Tier","description":"These endpoints will allow you to easily manage tiers."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"tierSet":{"name":"tierSet","in":"path","description":"TierSet ID","required":true,"schema":{"type":"string","format":"uuid"}},"page":{"name":"_page","in":"query","description":"Number of page with results, starts from 1","required":false,"schema":{"type":"integer","default":1,"minimum":1}},"itemsOnPage":{"name":"_itemsOnPage","in":"query","description":"Items on one page","required":false,"schema":{"type":"integer","default":10,"maximum":50,"minimum":1}},"orderBy":{"name":"_orderBy","in":"query","description":"Sorting order. If sorting is not chosen, the rows will be returned in an unspecified order. Sort order: * `asc` - Ascending, from A to Z * `desc` - Descending, from Z to A","required":false,"style":"deepObject","explode":true,"schema":{"type":"object","additionalProperties":{"type":"string","enum":["asc","desc"]}}}},"schemas":{"TierSetTiersResponse":{"required":["levelId","tierSet","name","storeCode","active","rewards","createdAt","updatedAt","translations","isDefault","hasPhoto","conditions"],"properties":{"levelId":{"description":"This field show tier id","type":"string","format":"uuid"},"tierSet":{"description":"This field shows related tier set","required":["tierSetId","name"],"properties":{"tierSetId":{"properties":{"tierSetId":{"type":"string","format":"uuid"}},"type":"object"},"name":{"type":"string"}},"type":"object","additionalProperties":false},"name":{"description":"This field show tier name","type":"string"},"description":{"description":"This field show tier description","type":"string"},"storeCode":{"description":"The field shows what store tier it is in","type":"string"},"active":{"description":"The field shows whether the tier is active","type":"boolean"},"rewards":{"type":"array","items":{"required":["rewardId","name","code","active","createdAt","updatedAt"],"properties":{"rewardId":{"description":"Reward ID.","type":"string","format":"uuid"},"name":{"description":"Benefit name.","type":"string"},"value":{"description":"Benefit value.","type":"number","format":"float"},"code":{"description":"Benefit code.","type":"string"},"labels":{"$ref":"#/components/schemas/Labels"},"active":{"type":"boolean"},"startAt":{"type":"string","format":"date-time"},"endAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string","format":"uuid"},"updatedBy":{"type":"string","format":"uuid"}},"type":"object","additionalProperties":false}},"conditions":{"description":"This field shows conditions that member must meet to be at this tier","type":"array","items":{"required":["conditionId","attribute","value"],"properties":{"conditionId":{"type":"string","format":"uuid"},"attribute":{"description":"Specifies the type of attribute. The possible values are:\n- `activeUnits`: The number of units currently active. - `totalEarnedUnits`: The total number of units earned. - `monthsSinceJoiningProgram`: The number of months since the program was joined. - `totalSpending`: The total amount of spending. - `cumulatedEarnedUnits`: The total number of units earned that will be reset when recalculation occur\n","enum":["activeUnits","totalEarnedUnits","monthsSinceJoiningProgram","totalSpending","cumulatedEarnedUnits"]},"value":{"description":"This field shows the value that was specified for the attribute","type":"number","format":"float"}},"type":"object","additionalProperties":false}},"translations":{"$ref":"#/components/schemas/Translations"},"createdAt":{"description":"This field shows date then tier was created at","type":"string","format":"date-time"},"updatedAt":{"description":"This field shows date then tier was updated at","type":"string","format":"date-time"},"hasPhoto":{"description":"This field show if tier have photo","type":"boolean"},"conditionValue":{"type":"number","format":"float","deprecated":true},"isDefault":{"description":"This field shows whether the tier is the default tier that was created automatically along with the tier set. Tier serves as the starting tier in tie set","type":"boolean"}},"type":"object","additionalProperties":false},"Labels":{"description":"A list of custom attributes used for tagging and describing resources. Each item in the list contains a key-value pair, where `key` is the name of the attribute, and `value` is the value assigned to that attribute.\n","type":"array","items":{"required":["key","value"],"properties":{"key":{"description":"The name of the custom attribute.","type":"string"},"value":{"description":"The value assigned to the custom attribute.","type":"string"}},"type":"object","additionalProperties":false}},"Translations":{"description":"This field is used to save the name and description in the language of your choice.\nYou need to add at least one name in the default language.\n","required":["en"],"properties":{"en":{"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"}},"type":"object","additionalProperties":false},"pl":{"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"}},"type":"object"}},"type":"object","additionalProperties":false},"SearchableTotalResponse":{"required":["all","filtered","estimated"],"properties":{"all":{"type":"integer","deprecated":true},"filtered":{"type":"integer","deprecated":true},"estimated":{"description":"Field estimated is used to show that the results are estimated. It might happen when there are more than 5000 results due to performance optimization.","type":"boolean","deprecated":true}},"type":"object","deprecated":true},"ExpiredToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"InvalidToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"Unauthorized":{"required":["message"],"properties":{"message":{"type":"string"}},"type":"object"}},"responses":{"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/tierSet/{tierSet}/tiers":{"get":{"tags":["Tier"],"summary":"Get tiers list from a tier set","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\n","operationId":"_getTierSetTiers","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/tierSet"},{"name":"name","in":"query","required":false,"schema":{"type":"string"}},{"name":"active","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"createdAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/itemsOnPage"},{"$ref":"#/components/parameters/orderBy"}],"responses":{"200":{"description":"Tiers list","content":{"application/json":{"schema":{"required":["items","total"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TierSetTiersResponse"}},"total":{"$ref":"#/components/schemas/SearchableTotalResponse"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ExpiredToken"},{"$ref":"#/components/schemas/InvalidToken"},{"$ref":"#/components/schemas/Unauthorized"}]}}}},"403":{"$ref":"#/components/responses/AccessDenied"}}}}}}
````

## Update existing tier list with conditions

> \<label style="background-color: #D4EDBC;padding:5px;">Management\</label>\<br>\<br>\
> Method allows to edit existing tier list with conditions.<br>

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Tier","description":"These endpoints will allow you to easily manage tiers."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"tierSet":{"name":"tierSet","in":"path","description":"TierSet ID","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"TiersListPut":{"type":"array","items":{"required":["conditions","translations"],"properties":{"levelId":{"description":"Leave empty to add a new tier. Use existing id to update specific tier.","type":"string","format":"uuid"},"translations":{"$ref":"#/components/schemas/Translations"},"active":{"description":"Tier availability","type":"boolean"},"conditions":{"description":"Conditions are determined by the tier set configuration","type":"array","items":{"required":["conditionId","value"],"properties":{"conditionId":{"description":"Relevant conditionId from the tier set configuration","type":"string","format":"uuid"},"value":{"description":"Minimal value for the tier. Remember it must not be lower than the lower tier’s value.","type":"number","format":"float"}},"type":"object"}},"rewards":{"description":"Lifetime benefits associated with tier.","type":"array","items":{"required":["name","code"],"properties":{"rewardId":{"description":"Reward ID. Leave empty to to add a new benefit.","type":"string","format":"uuid"},"name":{"description":"Benefit name.","type":"string"},"value":{"description":"Benefit value.","type":"number","format":"float"},"code":{"description":"Benefit code.","type":"string"},"labels":{"description":"Custom attributes","type":"array","items":{"properties":{"key":{"description":"Custom attribute key","type":"string"},"value":{"description":"Custom attribute value","type":"string"}},"type":"object"}},"active":{"description":"Benefit availability","type":"boolean"},"startAt":{"description":"Benefit availability start date","type":"string","format":"date-time"},"endAt":{"description":"Benefit availability end date","type":"string","format":"date-time"}},"type":"object"}}},"type":"object","additionalProperties":false}},"Translations":{"description":"This field is used to save the name and description in the language of your choice.\nYou need to add at least one name in the default language.\n","required":["en"],"properties":{"en":{"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"}},"type":"object","additionalProperties":false},"pl":{"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"}},"type":"object"}},"type":"object","additionalProperties":false}},"responses":{"NoContent":{"description":"Success. No content."},"BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"required":["code","message","errors"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"required":["message","parameters","plural","code","path"],"properties":{"message":{"type":"string"},"parameters":{},"plural":{"type":"integer","nullable":true},"code":{"type":"string"},"path":{"type":"string"}},"type":"object"}}},"type":"object"}}}},"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/tierSet/{tierSet}/tiers":{"put":{"tags":["Tier"],"summary":"Update existing tier list with conditions","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nMethod allows to edit existing tier list with conditions.\n","operationId":"_tierPutList","parameters":[{"$ref":"#/components/parameters/storeCode"},{"$ref":"#/components/parameters/tierSet"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"required":["tiers"],"properties":{"tiers":{"$ref":"#/components/schemas/TiersListPut"}},"type":"object"}}}},"responses":{"204":{"$ref":"#/components/responses/NoContent"},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.openloyalty.io/api-reference/tier.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
