---
title: "Sets the order of a product's tiers."
---

> 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/reorder`

## Authentication

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

## Path parameters

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

## Header parameters

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

- `tiers` (`reorderTiers.tiers`; array<object>, required)
  - `id` (`reorderTiers.tiers.id`; string, required)
    - minLength 1; maxLength 512
- `from` (`reorderTiers.from`; object, optional) — The order the seller saw; a reorder over a moved order is refused.
  - `tiers` (`reorderTiers.from.tiers`; array<object>, required)
    - `id` (`reorderTiers.from.tiers.id`; string, required)
      - minLength 1; maxLength 512

## Example request

```json
{
  "tiers": [
    {
      "id": "string"
    }
  ],
  "from": {
    "tiers": [
      {
        "id": "string"
      }
    ]
  }
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.sherpo.io/merchant/v1/stores/<store>/products/<product>/tiers/reorder' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "tiers": [
    {
      "id": "string"
    }
  ],
  "from": {
    "tiers": [
      {
        "id": "string"
      }
    ]
  }
}
'
```

### TypeScript

```typescript
const url = 'https://api.sherpo.io/merchant/v1/stores/<store>/products/<product>/tiers/reorder';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({tiers: [{id: 'string'}], from: {tiers: [{id: 'string'}]}})
};

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/reorder"

payload = {
    "tiers": [{ "id": "string" }],
    "from": { "tiers": [{ "id": "string" }] }
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

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

print(response.text)
```

## Responses

### 200

Sets the order of a product's tiers.

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


Source: https://docs.sherpo.io/merchant-api/reference/reorder-tiers/index.md
