> 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/update-a-tier-set.md).

# Update a tier set

Management\ <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":"http","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","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":["code","message"],"properties":{"code":{"type":"integer"},"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"}}}}}}
````


---

# 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, and the optional `goal` query parameter:

```
GET https://help.openloyalty.io/api-reference/tier/update-a-tier-set.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
