---
title: "Stops a license from checking as valid, whatever its holder's access."
---

> 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 › customer

`POST /v1/stores/{store}/products/{product}/licenses/{license}/disable`

## Authentication

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

## Path parameters

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

## Header parameters

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

- `reason` (`disableLicense.reason`; any of, optional) — Why, kept with the license and told in its event.
  - any of: `string`, `null`

## Example request

```json
{
  "reason": "string"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.sherpo.io/merchant/v1/stores/<store>/products/<product>/licenses/<license>/disable' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "reason": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://api.sherpo.io/merchant/v1/stores/<store>/products/<product>/licenses/<license>/disable';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({reason: '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>/licenses/<license>/disable"

payload = { "reason": "string" }
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

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

print(response.text)
```

## Responses

### 200

Stops a license from checking as valid, whatever its holder's access.

#### Example

```json
{
  "subscription": {
    "id": "string",
    "status": "string",
    "current_period_end": "string",
    "cancel_at_period_end": true,
    "ended_at": "string"
  },
  "activations": {
    "count": 0,
    "limit": 0
  },
  "key_ending": "string",
  "tier": {
    "id": "string",
    "name": "string",
    "rank": 0
  },
  "customer": {
    "id": "string",
    "name": "string",
    "email": "string",
    "phone": "string",
    "erased": true
  },
  "id": "string",
  "product_id": "string",
  "customer_id": "string",
  "source": "string",
  "status": "string",
  "expires_at": "string",
  "reason": "string",
  "has_access": true,
  "activation_limit": 0,
  "uses": 0,
  "metadata": {
    "property1": true,
    "property2": true
  },
  "created_at": "string",
  "disabled_at": "string",
  "disabled_reason": "string",
  "replaced_by": "string",
  "last_verified_at": "string"
}
```

- `subscription` (`disableLicense.response.200.subscription`; any of, required) — The subscription behind its access; null for a one-time purchase or a grant, or without `subscription:read`.
  - any of: `object`, `null`
- `activations` (`disableLicense.response.200.activations`; object, required) — The devices it counts now and the most it may hold, its own limit, else its tier's, else its product's; `limit` null when nothing limits it.
  - `count` (`disableLicense.response.200.activations.count`; number, required)
  - `limit` (`disableLicense.response.200.activations.limit`; any of, required)
    - any of: `number`, `null`
- `key_ending` (`disableLicense.response.200.key_ending`; string, required) — The key's last characters, so a support reply can name it; `getLicense` answers it whole.
- `tier` (`disableLicense.response.200.tier`; any of, required) — The tier its access opens, else the one it last opened; null for access with no tier.
  - any of: `object`, `null`
- `customer` (`disableLicense.response.200.customer`; any of, required)
  - any of: `object`, `null`
- `id` (`disableLicense.response.200.id`; string, required)
- `product_id` (`disableLicense.response.200.product_id`; string, required)
- `customer_id` (`disableLicense.response.200.customer_id`; string, required)
- `source` (`disableLicense.response.200.source`; string, required)
- `status` (`disableLicense.response.200.status`; string, required) — Where it stands now: `active`, `expired`, `revoked`, `disabled` or `replaced`.
- `expires_at` (`disableLicense.response.200.expires_at`; any of, required) — When access ends; null while it never does.
  - any of: `string`, `null`
- `reason` (`disableLicense.response.200.reason`; any of, required) — Why it reads its status: `replaced`, `disabled`, `lapse`, `refund` or `revoke`; null while active, or before any access began.
  - any of: `string`, `null`
- `has_access` (`disableLicense.response.200.has_access`; boolean, required) — Whether its holder has access now, whatever its status; false before access begins.
- `activation_limit` (`disableLicense.response.200.activation_limit`; any of, required)
  - any of: `number`, `null`
- `uses` (`disableLicense.response.200.uses`; number, required)
- `metadata` (`disableLicense.response.200.metadata`; map<any of>, required)
- `created_at` (`disableLicense.response.200.created_at`; any of, required)
  - any of: `string`, `null`
- `disabled_at` (`disableLicense.response.200.disabled_at`; any of, required)
  - any of: `string`, `null`
- `disabled_reason` (`disableLicense.response.200.disabled_reason`; any of, required)
  - any of: `string`, `null`
- `replaced_by` (`disableLicense.response.200.replaced_by`; any of, required)
  - any of: `string`, `null`
- `last_verified_at` (`disableLicense.response.200.last_verified_at`; any of, required)
  - any of: `string`, `null`

### 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` (`disableLicense.response.default.type`; string, required)
  - format `uri`
- `title` (`disableLicense.response.default.title`; string, required)
- `status` (`disableLicense.response.default.status`; integer, required)
- `detail` (`disableLicense.response.default.detail`; string, required)
- `code` (`disableLicense.response.default.code`; string, optional)
- `context` (`disableLicense.response.default.context`; object, optional)
- `reached_core` (`disableLicense.response.default.reached_core`; boolean, optional)
- `core_answer` (`disableLicense.response.default.core_answer`; string, optional)


Source: https://docs.sherpo.io/merchant-api/reference/disable-license/index.md
