---
title: "Changes a business ban's value or note; its kind stays."
---

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

`PATCH /v1/stores/{store}/business_bans/{ban}`

## Authentication

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

## Path parameters

- `store` (`updateBusinessBan.path.store`; string, required) — The store's id.
- `ban` (`updateBusinessBan.path.ban`; string, required)
  - minLength 1

## Request body

_Optional._

- `value` (`updateBusinessBan.value`; string, optional) — A new value of the ban's own kind, as `createCustomerBan` takes it.
  - minLength 1; maxLength 254
- `note` (`updateBusinessBan.note`; any of, optional) — Why the address is banned, or null to clear it; trimmed.
  - any of: `string`, `null`

## Example request

```json
{
  "value": "string",
  "note": "string"
}
```

## Code samples

### cURL

```bash
curl --request PATCH \
  --url 'https://api.sherpo.io/merchant/v1/stores/<store>/business_bans/<ban>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "value": "string",
  "note": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://api.sherpo.io/merchant/v1/stores/<store>/business_bans/<ban>';
const options = {
  method: 'PATCH',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({value: 'string', note: '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>/business_bans/<ban>"

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

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

print(response.text)
```

## Responses

### 200

Changes a business ban's value or note; its kind stays.

#### Example

```json
{
  "id": "string",
  "kind": "string",
  "value": "string",
  "note": "string",
  "created_at": "string",
  "updated_at": "string"
}
```

- `id` (`updateBusinessBan.response.200.id`; string, required)
- `kind` (`updateBusinessBan.response.200.kind`; string, required) — `domain` (with its subdomains), `email` (exact) or `pattern` (matched whole on the lowercased address).
- `value` (`updateBusinessBan.response.200.value`; string, required) — The domain or address in lowercase, a domain in ASCII; the pattern as written.
- `note` (`updateBusinessBan.response.200.note`; any of, required) — Why the address is banned, for staff alone; null for none.
  - any of: `string`, `null`
- `created_at` (`updateBusinessBan.response.200.created_at`; string, required)
- `updated_at` (`updateBusinessBan.response.200.updated_at`; string, required)

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


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