---
title: "Renames a tier or changes its settings, such as the features a software tier's licenses unlock."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.sherpo.io/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Sherpo merchant API › product

`PATCH /v1/stores/{store}/products/{product}/tiers/{tier}`

## Authentication

- `bearer`, http, header `Authorization`, scopes: `product:write`

## Path parameters

- `store` (`updateTier.path.store`; string, required) — The store's id.
- `product` (`updateTier.path.product`; string, required) — An id, or `slug:<slug>`.
  - minLength 1
- `tier` (`updateTier.path.tier`; string, required)
  - minLength 1

## Header parameters

- `Idempotency-Key` (`updateTier.header.Idempotency-Key`; string, optional) — Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.
  - minLength 1; maxLength 255; pattern `^[\x21-\x7E]+$`

## Request body

_Optional._

- `name` (`updateTier.name`; string, optional)
  - minLength 1; maxLength 120
- `settings` (`updateTier.settings`; object, optional) — Merged onto the stored settings; null deletes a key.
  - `software` (`updateTier.settings.software`; any of, optional) — A software tier: what its licenses unlock, answered by a license check.
    - any of: `object`, `null`
  - `event` (`updateTier.settings.event`; any of, optional) — An event's ticket type: how many guests it takes.
    - any of: `object`, `null`

## Example request

```json
{
  "name": "string",
  "settings": {
    "software": {
      "features": [
        "string"
      ],
      "activation_limit": 1
    },
    "event": {
      "capacity": 1
    },
    "property1": true,
    "property2": true
  }
}
```

## Code samples

### cURL

```bash
curl --request PATCH \
  --url 'https://api.sherpo.io/merchant/v1/stores/<store>/products/<product>/tiers/<tier>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "string",
  "settings": {
    "software": {
      "features": [
        "string"
      ],
      "activation_limit": 1
    },
    "event": {
      "capacity": 1
    },
    "property1": true,
    "property2": true
  }
}
'
```

### TypeScript

```typescript
const url = 'https://api.sherpo.io/merchant/v1/stores/<store>/products/<product>/tiers/<tier>';
const options = {
  method: 'PATCH',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({
    name: 'string',
    settings: {
      software: {features: ['string'], activation_limit: 1},
      event: {capacity: 1},
      property1: true,
      property2: true
    }
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sherpo.io/merchant/v1/stores/<store>/products/<product>/tiers/<tier>"

payload = {
    "name": "string",
    "settings": {
        "software": {
            "features": ["string"],
            "activation_limit": 1
        },
        "event": { "capacity": 1 },
        "property1": True,
        "property2": True
    }
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Renames a tier or changes its settings, such as the features a software tier's licenses unlock.

#### Example

```json
{
  "in_use": {
    "prices": 0,
    "grants": 0,
    "orders": 0,
    "discounts": 0,
    "gates": 0
  },
  "id": "string",
  "product_id": "string",
  "rank": 0,
  "name": "string",
  "settings": {
    "software": {
      "features": [
        "string"
      ],
      "activation_limit": 1
    },
    "event": {
      "capacity": 1
    },
    "property1": true,
    "property2": true
  }
}
```

- `in_use` (`updateTier.response.200.in_use`; object, required)
  - `prices` (`updateTier.response.200.in_use.prices`; number, required)
  - `grants` (`updateTier.response.200.in_use.grants`; number, required)
  - `orders` (`updateTier.response.200.in_use.orders`; number, required)
  - `discounts` (`updateTier.response.200.in_use.discounts`; number, required)
  - `gates` (`updateTier.response.200.in_use.gates`; number, required)
- `id` (`updateTier.response.200.id`; string, required)
- `product_id` (`updateTier.response.200.product_id`; string, required)
- `rank` (`updateTier.response.200.rank`; number, required)
- `name` (`updateTier.response.200.name`; string, required)
- `settings` (`updateTier.response.200.settings`; object, required)
  - `software` (`updateTier.response.200.settings.software`; object, optional) — A software tier: what its licenses unlock, answered by a license check.
    - `features` (`updateTier.response.200.settings.software.features`; array<string>, optional) — Distinct flags the seller's software reads: letters and digits, single hyphens, underscores, dots or colons between them.
      - minLength 1; maxLength 64; pattern `^[A-Za-z0-9]+(?:[-_.:][A-Za-z0-9]+)*$`
    - `activation_limit` (`updateTier.response.200.settings.software.activation_limit`; integer, optional) — The devices its licenses activate at once, over the product's default; none holds the product's.
      - min 1; max 10000
  - `event` (`updateTier.response.200.settings.event`; object, optional) — An event's ticket type: how many guests it takes.
    - `capacity` (`updateTier.response.200.settings.event.capacity`; integer, optional) — How many guests this ticket type takes, within the event's own capacity; none means no limit of its own.
      - min 1; max 1000000

### default

A problem; see https://api.sherpo.io/merchant/docs/errors.

#### Example

```json
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "context": {},
  "reached_core": true,
  "core_answer": "string"
}
```

- `type` (`updateTier.response.default.type`; string, required)
  - format `uri`
- `title` (`updateTier.response.default.title`; string, required)
- `status` (`updateTier.response.default.status`; integer, required)
- `detail` (`updateTier.response.default.detail`; string, required)
- `code` (`updateTier.response.default.code`; string, optional)
- `context` (`updateTier.response.default.context`; object, optional)
- `reached_core` (`updateTier.response.default.reached_core`; boolean, optional)
- `core_answer` (`updateTier.response.default.core_answer`; string, optional)


Source: https://docs.sherpo.io/merchant-api/reference/update-tier/index.md
