---
title: "Adds a tier to a product, with the settings its category takes, 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

`POST /v1/stores/{store}/products/{product}/tiers`

## Authentication

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

## Path parameters

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

## Header parameters

- `Idempotency-Key` (`createTier.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

_Required._

- `name` (`createTier.name`; string, required)
  - minLength 1; maxLength 120
- `settings` (`createTier.settings`; object, optional) — What the tier's holders get by the product's category; `software` only on a software product, `event` on an event.
  - `software` (`createTier.settings.software`; object, optional) — A software tier: what its licenses unlock, answered by a license check.
    - `features` (`createTier.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` (`createTier.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` (`createTier.settings.event`; object, optional) — An event's ticket type: how many guests it takes.
    - `capacity` (`createTier.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

## 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 POST \
  --url 'https://api.sherpo.io/merchant/v1/stores/<store>/products/<product>/tiers' \
  --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';
const options = {
  method: 'POST',
  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"

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.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 201

Adds a tier to a product, with the settings its category takes, 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` (`createTier.response.201.in_use`; object, required)
  - `prices` (`createTier.response.201.in_use.prices`; number, required)
  - `grants` (`createTier.response.201.in_use.grants`; number, required)
  - `orders` (`createTier.response.201.in_use.orders`; number, required)
  - `discounts` (`createTier.response.201.in_use.discounts`; number, required)
  - `gates` (`createTier.response.201.in_use.gates`; number, required)
- `id` (`createTier.response.201.id`; string, required)
- `product_id` (`createTier.response.201.product_id`; string, required)
- `rank` (`createTier.response.201.rank`; number, required)
- `name` (`createTier.response.201.name`; string, required)
- `settings` (`createTier.response.201.settings`; object, required)
  - `software` (`createTier.response.201.settings.software`; object, optional) — A software tier: what its licenses unlock, answered by a license check.
    - `features` (`createTier.response.201.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` (`createTier.response.201.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` (`createTier.response.201.settings.event`; object, optional) — An event's ticket type: how many guests it takes.
    - `capacity` (`createTier.response.201.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` (`createTier.response.default.type`; string, required)
  - format `uri`
- `title` (`createTier.response.default.title`; string, required)
- `status` (`createTier.response.default.status`; integer, required)
- `detail` (`createTier.response.default.detail`; string, required)
- `code` (`createTier.response.default.code`; string, optional)
- `context` (`createTier.response.default.context`; object, optional)
- `reached_core` (`createTier.response.default.reached_core`; boolean, optional)
- `core_answer` (`createTier.response.default.core_answer`; string, optional)


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