---
title: "Updates the customer's name and preferences."
---

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

`PATCH /v1/stores/{store}/profile`

## Authentication

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

## Path parameters

- `store` (`updateProfile.path.store`; string, required) — A hostname of the store.

## Request body

_Optional._

- `display_name` (`updateProfile.display_name`; any of, optional)
  - any of: `string`, `null`
- `locale` (`updateProfile.locale`; any of, optional)
  - any of: `string`, `null`

## Example request

```json
{
  "display_name": "string",
  "locale": "string"
}
```

## Code samples

### cURL

```bash
curl --request PATCH \
  --url 'https://api.sherpo.io/customer/v1/stores/<store>/profile' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "display_name": "string",
  "locale": "string"
}
'
```

### TypeScript

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

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

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

print(response.text)
```

## Responses

### 200

Updates the customer's name and preferences.

#### Example

```json
{
  "contacts": [
    {
      "kind": "string",
      "value": "string",
      "verified_at": "string"
    }
  ],
  "id": "string",
  "display_name": "string",
  "locale": "string",
  "country": "string",
  "created_at": "string"
}
```

- `contacts` (`updateProfile.response.200.contacts`; array<object>, required)
  - `kind` (`updateProfile.response.200.contacts.kind`; string, required)
  - `value` (`updateProfile.response.200.contacts.value`; string, required)
  - `verified_at` (`updateProfile.response.200.contacts.verified_at`; any of, required)
    - any of: `string`, `null`
- `id` (`updateProfile.response.200.id`; string, required)
- `display_name` (`updateProfile.response.200.display_name`; any of, required)
  - any of: `string`, `null`
- `locale` (`updateProfile.response.200.locale`; any of, required)
  - any of: `string`, `null`
- `country` (`updateProfile.response.200.country`; any of, required)
  - any of: `string`, `null`
- `created_at` (`updateProfile.response.200.created_at`; any of, required)
  - any of: `string`, `null`

### default

A problem; see https://api.sherpo.io/customer/docs/errors.

#### Example

```json
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "context": {},
  "reached_core": true,
  "core_answer": "string"
}
```

- `type` (`updateProfile.response.default.type`; string, required)
  - format `uri`
- `title` (`updateProfile.response.default.title`; string, required)
- `status` (`updateProfile.response.default.status`; integer, required)
- `detail` (`updateProfile.response.default.detail`; string, required)
- `code` (`updateProfile.response.default.code`; string, optional)
- `context` (`updateProfile.response.default.context`; object, optional)
- `reached_core` (`updateProfile.response.default.reached_core`; boolean, optional)
- `core_answer` (`updateProfile.response.default.core_answer`; string, optional)


Source: https://docs.sherpo.io/customer-api/reference/update-profile/index.md
