---
title: "Sets or clears the store's icon from a file."
---

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

`PUT /v1/stores/{store}/icon`

## Authentication

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

## Path parameters

- `store` (`setStoreIcon.path.store`; string, required) — The store's id.

## Request body

_Required._

- `image` (`setStoreIcon.image`; any of, required)
  - any of: `string`, `string`

## Example request

```json
{
  "image": "string"
}
```

## Code samples

### cURL

```bash
curl --request PUT \
  --url 'https://api.sherpo.io/merchant/v1/stores/<store>/icon' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "image": "string"
}
'
```

### TypeScript

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

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

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

print(response.text)
```

## Responses

### 200

Sets or clears the store's icon from a file.

#### Example

```json
{
  "id": "string",
  "name": "string",
  "locale": "string",
  "location": "string",
  "hostname": "string",
  "swatch": "string",
  "icon": "string",
  "created_at": "string"
}
```

- `id` (`setStoreIcon.response.200.id`; string, required)
- `name` (`setStoreIcon.response.200.name`; string, required)
- `locale` (`setStoreIcon.response.200.locale`; string, required)
- `location` (`setStoreIcon.response.200.location`; any of, required)
  - any of: `string`, `null`
- `hostname` (`setStoreIcon.response.200.hostname`; any of, required)
  - any of: `string`, `null`
- `swatch` (`setStoreIcon.response.200.swatch`; any of, required)
  - any of: `string`, `null`
- `icon` (`setStoreIcon.response.200.icon`; string, required)
- `created_at` (`setStoreIcon.response.200.created_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` (`setStoreIcon.response.default.type`; string, required)
  - format `uri`
- `title` (`setStoreIcon.response.default.title`; string, required)
- `status` (`setStoreIcon.response.default.status`; integer, required)
- `detail` (`setStoreIcon.response.default.detail`; string, required)
- `code` (`setStoreIcon.response.default.code`; string, optional)
- `context` (`setStoreIcon.response.default.context`; object, optional)
- `reached_core` (`setStoreIcon.response.default.reached_core`; boolean, optional)
- `core_answer` (`setStoreIcon.response.default.core_answer`; string, optional)


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