---
title: "Updates whether a notification is enabled."
---

> 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}/notifications/{notification}`

## Authentication

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

## Path parameters

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

## Header parameters

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

- `enabled` (`updateNotification.enabled`; boolean, optional)

## Example request

```json
{
  "enabled": true
}
```

## Code samples

### cURL

```bash
curl --request PATCH \
  --url 'https://api.sherpo.io/merchant/v1/stores/<store>/notifications/<notification>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "enabled": true
}
'
```

### TypeScript

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

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

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

print(response.text)
```

## Responses

### 200

Updates whether a notification is enabled.

#### Example

```json
{
  "id": "string",
  "event": "string",
  "target": {
    "kind": "string",
    "id": "string"
  },
  "locale": "string",
  "channel": "string",
  "enabled": true,
  "in_effect": true
}
```

- `id` (`updateNotification.response.200.id`; string, required)
- `event` (`updateNotification.response.200.event`; string, required)
- `target` (`updateNotification.response.200.target`; any of, required)
  - any of: `object`, `null`
- `locale` (`updateNotification.response.200.locale`; string, required)
- `channel` (`updateNotification.response.200.channel`; string, required)
- `enabled` (`updateNotification.response.200.enabled`; boolean, required)
- `in_effect` (`updateNotification.response.200.in_effect`; boolean, 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` (`updateNotification.response.default.type`; string, required)
  - format `uri`
- `title` (`updateNotification.response.default.title`; string, required)
- `status` (`updateNotification.response.default.status`; integer, required)
- `detail` (`updateNotification.response.default.detail`; string, required)
- `code` (`updateNotification.response.default.code`; string, optional)
- `context` (`updateNotification.response.default.context`; object, optional)
- `reached_core` (`updateNotification.response.default.reached_core`; boolean, optional)
- `core_answer` (`updateNotification.response.default.core_answer`; string, optional)


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