---
title: "Sets or clears an integration's settings. Turning on one that sends buyer and order data, or changing where it sends them, needs the read scopes that data carries."
---

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

`PUT /v1/stores/{store}/integrations/{integration}`

## Authentication

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

## Path parameters

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

## Header parameters

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

- `config` (`setIntegration.config`; map<any of>, optional)
- `enabled` (`setIntegration.enabled`; boolean, optional)

## Example request

```json
{
  "config": {
    "property1": true,
    "property2": true
  },
  "enabled": true
}
```

## Code samples

### cURL

```bash
curl --request PUT \
  --url 'https://api.sherpo.io/merchant/v1/stores/<store>/integrations/<integration>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "config": {
    "property1": true,
    "property2": true
  },
  "enabled": true
}
'
```

### TypeScript

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

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

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

print(response.text)
```

## Responses

### 200

Sets or clears an integration's settings. Turning on one that sends buyer and order data, or changing where it sends them, needs the read scopes that data carries.

#### Example

```json
{
  "id": "string",
  "name": "string",
  "description": "string",
  "kind": "string",
  "sets_cookies": true,
  "enabled": true,
  "connection_ended_at": "string",
  "config_schema": {
    "property1": true,
    "property2": true
  },
  "secret_set": {
    "property1": true,
    "property2": true
  }
}
```

- `id` (`setIntegration.response.200.id`; string, required)
- `name` (`setIntegration.response.200.name`; string, required)
- `description` (`setIntegration.response.200.description`; any of, required)
  - any of: `string`, `null`
- `kind` (`setIntegration.response.200.kind`; string, required)
- `sets_cookies` (`setIntegration.response.200.sets_cookies`; boolean, required)
- `enabled` (`setIntegration.response.200.enabled`; boolean, required)
- `connection_ended_at` (`setIntegration.response.200.connection_ended_at`; any of, required)
  - any of: `string`, `null`
- `config_schema` (`setIntegration.response.200.config_schema`; map<any of>, required)
- `secret_set` (`setIntegration.response.200.secret_set`; map<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` (`setIntegration.response.default.type`; string, required)
  - format `uri`
- `title` (`setIntegration.response.default.title`; string, required)
- `status` (`setIntegration.response.default.status`; integer, required)
- `detail` (`setIntegration.response.default.detail`; string, required)
- `code` (`setIntegration.response.default.code`; string, optional)
- `context` (`setIntegration.response.default.context`; object, optional)
- `reached_core` (`setIntegration.response.default.reached_core`; boolean, optional)
- `core_answer` (`setIntegration.response.default.core_answer`; string, optional)


Source: https://docs.sherpo.io/merchant-api/reference/set-integration/index.md
