> ## Documentation Index
> Fetch the complete documentation index at: https://dokumentation.websale.de/llms.txt
> Use this file to discover all available pages before exploring further.

# API reference user management

> Administer admin users and personal settings via the Admin Interface API: create accounts, update roles, and adjust dashboard or language preferences.

The user management API reference describes endpoints for managing user accounts and individual settings in the admin interface of the shop.

The interface can be used to create, edit, and delete users, as well as retrieve and update personal settings such as language or dashboard configuration. Access to the respective endpoints depends on the permissions of the logged-in user.

***

## Supported methods

List of all supported methods.

| **Command/info**                                                                                         | **Endpoints**  | **GET**               | **PUT**               | **POST**              | **DELETE**            |
| -------------------------------------------------------------------------------------------------------- | -------------- | --------------------- | --------------------- | --------------------- | --------------------- |
| [**User account in admin area**](/en/schnittstellen/admin-interface-api/api-referenz-benutzerverwaltung) | admin/user     | <Icon icon="check" /> | <Icon icon="check" /> | <Icon icon="check" /> | <Icon icon="check" /> |
| [**User settings**](/en/schnittstellen/admin-interface-api/api-referenz-benutzerverwaltung)              | admin/settings | <Icon icon="check" /> | <Icon icon="check" /> | <Icon icon="ban" />   | <Icon icon="ban" />   |

## General

### Data fields of a user account

| **Name**        | **Type** | **Usage**                                                                                                      |
| --------------- | -------- | -------------------------------------------------------------------------------------------------------------- |
| **id**          | Integer  | Unique ID of the user                                                                                          |
| **firstName**   | String   | First name of the user                                                                                         |
| **lastName**    | String   | Last name of the user                                                                                          |
| **role**        | Array    | Roles within the company as an array, e.g. \["marketing", "seo"]                                               |
| **email**       | String   | Email address of the user                                                                                      |
| **userName**    | String   | User name of the user                                                                                          |
| **permissions** | Object   | [Permissions](/en/schnittstellen/admin-interface-api/api-referenz-benutzerverwaltung) of the user for services |

#### Example

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "email": "vx-shop@websale.de",
    "firstName": "Horst",
    "id": 1,
    "lastName": "Schlämmer",
    "userName": "vx-shop",
    "permissions": {
        "admin": {
            "0": true
        }
    },
    "role": ["productMaintainer"]
}
```

### Data fields of user settings

| **Name**                                             | **Type** | **Usage**                                                |
| ---------------------------------------------------- | -------- | -------------------------------------------------------- |
| **dashboard.content\[]**                             | Array    | List of configured widgets on the user dashboard         |
| **dashboard.content\[].position.cols**               | Integer  | Number of columns the widget occupies                    |
| **dashboard.content\[].position.rows**               | Integer  | Number of rows the widget occupies                       |
| **dashboard.content\[].position.x**                  | Integer  | Horizontal position of the widget in the grid            |
| **dashboard.content\[].position.y**                  | Integer  | Vertical position of the widget in the grid              |
| **dashboard.content\[].settings**                    | Object   | Individual settings for the respective widget            |
| **dashboard.content\[].settings.shortcuts\[]**       | Array    | (Only for the "shortcuts" widget) List of link shortcuts |
| **dashboard.content\[].settings.shortcuts\[].label** | String   | Text displayed on the button                             |
| **dashboard.content\[].settings.shortcuts\[].route** | String   | Internal route opened on click                           |
| **dashboard.content\[].widgetId**                    | String   | Unique identifier of the widget used                     |
| **firstName**                                        | String   | First name of the user                                   |
| **language**                                         | String   | Language code of the user (e.g. "deu")                   |
| **lastName**                                         | String   | Last name of the user                                    |
| **salutation**                                       | String   | Salutation of the user (`m`, `w`, or `d`)                |
| **colorScheme**                                      | String   | Color scheme of the admin interface                      |

#### Example

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "dashboard": {
        "content": [
            {
                "position": {
                    "cols": 3,
                    "rows": 4,
                    "x": 0,
                    "y": 0
                },
                "settings": {},
                "widgetId": "salesTrend"
            },
            {
                "position": {
                    "cols": 3,
                    "rows": 2,
                    "x": 0,
                    "y": 4
                },
                "settings": {},
                "widgetId": "inbox"
            },
            {
                "position": {
                    "cols": 2,
                    "rows": 3,
                    "x": 3,
                    "y": 0
                },
                "settings": {},
                "widgetId": "conversion-rate-trends"
            },
            {
                "position": {
                    "cols": 2,
                    "rows": 5,
                    "x": 3,
                    "y": 3
                },
                "settings": {
                    "shortcuts": [
                        {
                            "label": "Zu Kategorien",
                            "route": "/categories"
                        },
                        {
                            "label": "Zu Produkten",
                            "route": "/products"
                        },
                        {
                            "label": "Zu Bestellungen",
                            "route": "/orders"
                        }
                    ]
                },
                "widgetId": "shortcuts"
            }
        ]
    },
    "firstName": "Horst",
    "language": "deu",
    "lastName": "Schlämmer",
    "salutation": "m",
    "colorScheme": "light"
}
```

### Permissions

| **Technical name**   | **Meaning**              | **Values**                                                                                              |
| -------------------- | ------------------------ | ------------------------------------------------------------------------------------------------------- |
| `"admin"`            | Full access to all areas | `0 = Active`                                                                                            |
| `"products"`         | Products                 | `0 = Read` <br /> `1 = Write` <br /> `2 = Create` <br /> `3 = Delete` <br /> `4 = WriteProtectedFields` |
| `"productvariants"`  | Product variants         | `0 = Read` <br /> `1 = Write` <br /> `2 = Create` <br /> `3 = Delete`                                   |
| `"productRatings"`   | Product reviews          | `0 = Read` <br /> `1 = Write` <br /> `2 = Create` <br /> `3 = Delete`                                   |
| `"inventory"`        | Product stock            | `0 = Read` <br /> `1 = Write` <br /> `2 = Create` <br /> `3 = Delete`                                   |
| `"productFields"`    | Product fields           | `0 = Read` <br /> `1 = Write` <br /> `2 = Create` <br /> `3 = Delete`                                   |
| `"categories"`       | Categories               | `0 = Read` <br /> `1 = Write` <br /> `2 = Create` <br /> `3 = Delete`                                   |
| `"categoryFields"`   | Category fields          | `0 = Read` <br /> `1 = Write` <br /> `2 = Create` <br /> `3 = Delete`                                   |
| `"configuration"`    | Configurations           | `0 = Read` <br /> `1 = Write` <br /> `2 = Create` <br /> `3 = Delete`                                   |
| `"seo"`              | SEO                      | `0 = Read` <br /> `1 = Write` <br /> `2 = Create` <br /> `3 = Delete`                                   |
| `"sitemaps"`         | Sitemaps                 | `0 = Read` <br /> `1 = Create` <br /> `2 = Write` <br /> `3 = Delete` <br /> `4 = Publish`              |
| `"datafeeds"`        | Data feeds               | `0 = Read` <br /> `1 = Write` <br /> `2 = Create` <br /> `3 = Delete` <br /> `4 = Publish`              |
| `"orders"`           | Orders                   | `0 = Read` <br /> `1 = Write` <br /> `2 = Delete`                                                       |
| `"inquiries"`        | Inquiries                | `0 = Read` <br /> `1 = Write` <br /> `2 = Delete`                                                       |
| `"texts"`            | Text blocks              | `0 = Read` <br /> `1 = Write` <br /> `2 = Create` <br /> `3 = Delete` <br /> `4 = Publish`              |
| `"templates"`        | Shop page templates      | `0 = Read` <br /> `4 = Publish`                                                                         |
| `"customerAccounts"` | Customer data            | `0 = Read` <br /> `1 = Write` <br /> `2 = Create` <br /> `3 = Delete`                                   |
| `"vouchers"`         | Vouchers                 | `0 = Read` <br /> `1 = Write` <br /> `2 = Create` <br /> `3 = Delete`                                   |
| `"transactions"`     | Transactions             | `0 = Read` <br /> `1 = Write`                                                                           |
| `"keyValue"`         | Key-value store          | `0 = Read` <br /> `1 = Write` <br /> `2 = Create` <br /> `3 = Delete`                                   |
| `"newsletter"`       | Newsletter               | `0 = Read` <br /> `1 = Write` <br /> `2 = Create` <br /> `3 = Delete`                                   |
| `"blacklist"`        | Newsletter blacklist     | `0 = Add` <br /> `1 = Remove`                                                                           |
| `"statistics"`       | All statistics           | `0 = Read`                                                                                              |
| `"logs"`             | Logs                     | `0 = Read` <br /> `1 = Write` <br /> `2 = Create` <br /> `3 = Delete`                                   |
| `"strapi"`           | Link to the Strapi CMS   | `0 = Read`                                                                                              |
| `"dashboard"`        | Dashboard in the AI      | `0 = Read`                                                                                              |
| `"imageconverter"`   | Image converter          | `0 = Read` <br /> `1 = Write` <br /> `2 = Create` <br /> `3 = Delete` <br /> `4 = Publish`              |
| `"paypalonboarding"` | PayPal onboarding        | `0 = Read` <br /> `1 = Write` <br /> `2 = Create` <br /> `3 = Delete`                                   |
| `"paymentprovider"`  | Payment provider         | `0 = Read` <br /> `1 = Write` <br /> `2 = Create` <br /> `3 = Delete`                                   |

#### Permissions example

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
"permissions": {
    "admin": {
        "0": false
    },
    "newsletter": {
        "0": true,
        "1": true,
        "2": true,
        "3": true
    },
    "customerAccounts": {
        "0": true,
        "1": false,
        "2": false,
        "3": false
    },
    "products": {
        "0": true,
        "1": false,
        "2": false,
        "3": false,
        "4": false
    }
}
```

The user does not have full access (the `admin.0` (`admin.active`) permission is set to `false`).

They can use the entire newsletter service — the permissions `newsletter.0` (`newsletter.Read`), `newsletter.1` (`newsletter.Write`), `newsletter.2` (`newsletter.Create`), and `newsletter.3` (`newsletter.Delete`) are set to `true` — and read customer and product data — `customerAccounts.0` (`customerAccounts.Read`) and `products.0` (`products.Read`) are set to `true`.

## Methods for user accounts

The `/admin/user` endpoint enables the management of user accounts. Through it, users can be created, modified, deleted, and retrieved.

### GET admin/user

This endpoint returns a list of all user accounts from the admin interface of the shop.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/admin/user
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "endReached": true,
    "items": [
        {
            "id": 1,
            "role": [],
            "firstName": "",
            "lastName": "",
            "email": "",
            "permissions": {...}
        },
        ...
    ],
    "nextPageToken": "NA",
    "totalCount": 5
}
```

#### Filter fields

`id`, `firstName`, `lastName`, `email`, `privileges`, `websale`

#### Sort fields

`id`, `firstName`, `lastName`, `email`, `websale`

#### Error codes

| **Error**        | **Type**            | **Reason**                                                |
| ---------------- | ------------------- | --------------------------------------------------------- |
| 401 Unauthorized |                     | Not authorized: you are not logged in.                    |
| 403 Forbidden    |                     | You do not have the required permissions to read users.   |
| 400 Bad Request  | "invalidValue"      |                                                           |
| 400 Bad Request  | "unknownDataField"  | A filter or sort field is invalid.                        |
| 400 Bad Request  | "unknownOperation"  | A filter type is invalid.                                 |
| 400 Bad Request  | "invalidCharacters" | `size` is not an integer.<br />A filter value is invalid. |
| 400 Bad Request  | "syntaxError"       | `sort` contains more than one or no ":".                  |

### GET admin/user/self

This endpoint loads the data of the currently logged-in user account.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/admin/user/self
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "email": "m.mustermann@websale.de",
    "firstName": "Max",
    "id": 1,
    "lastName": "Mustermann",
    "userName": "m.mustermann",
    "permissions": {
        "admin": {
            "0": false
        },
        "newsletter": {
            "0": true,
            "1": true,
            "2": true,
            "3": true
        }
    },
    "role": ["marketing"]
}
```

#### Error codes

| **Error**        | **Type** | **Reason**                                 |
| ---------------- | -------- | ------------------------------------------ |
| 401 Unauthorized |          | Not authorized: you are not logged in.     |
| 404 Not Found    |          | The account was not found in the database. |

### GET admin/user/\{accountId}

This endpoint loads the data of a specific user account by `accountId`.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/admin/user/123456
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "email": "m.mustermann@websale.de",
    "firstName": "Max",
    "id": 1,
    "lastName": "Mustermann",
    "userName": "m.mustermann",
    "permissions": {
        "admin": {
            "0": false
        },
        "newsletter": {
            "0": true,
            "1": true,
            "2": true,
            "3": true
        }
    },
    "role": ["marketing"]
}
```

#### Error codes

| **Error**        | **Type**        | **Reason**                                              |
| ---------------- | --------------- | ------------------------------------------------------- |
| 401 Unauthorized |                 | Not authorized: you are not logged in.                  |
| 403 Forbidden    |                 | You do not have the required permissions to read users. |
| 400 Bad Request  | "invalidFormat" | `accountId` is invalid.                                 |
| 400 Bad Request  | "invalidValue"  | `accountId` is 0.                                       |
| 404 Not Found    |                 | The account was not found in the database.              |

### GET admin/permissions

This endpoint returns a list of all permissions a user can have.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/admin/permissions
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "items": [
        {
            "id": "strapi",
            "permissions": [
                {
                    "id": 0,
                    "name": "read"
                }
            ]
        },
        {
            "id": "logs",
            "permissions": [
                {
                    "id": 0,
                    "name": "read"
                },
                {
                    "id": 1,
                    "name": "write"
                },
                {
                    "id": 2,
                    "name": "create"
                },
                {
                    "id": 3,
                    "name": "delete"
                }
            ]
        },
        {
            "id": "blacklist",
            "permissions": [
                {
                    "id": 0,
                    "name": "write"
                },
                {
                    "id": 1,
                    "name": "delete"
                }
            ]
        },
        ...
    ]
}
```

### POST admin/user

This endpoint creates a new user account for the admin interface.

When creating, either a password can be set directly or an email with a password setup link can be sent.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/admin/user
```

#### Request body

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "email": "m.mustermann@websale.de",
    "firstName": "Max",
    "lastName": "Mustermann",
    "permissions": {
        "admin": {
            "0": false
        },
        "newsletter": {
            "0": true,
            "1": true,
            "2": true,
            "3": true
        }
    },
    "role": ["marketing"],
    "passwordEmail": true
}
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "id": 42,
    "role": ["marketing"],
    "firstName": "Max",
    "lastName": "Mustermann",
    "email": "m.mustermann@websale.de",
    "permissions": {...}
}
```

#### Error codes

| **Error**               | **Type**             | **Reason**                                                                                                                                                                    |
| ----------------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 401 Unauthorized        |                      | Not authorized: you are not logged in.                                                                                                                                        |
| 403 Forbidden           |                      | You do not have the required permissions.                                                                                                                                     |
| 400 Bad Request         |                      | Request body could not be loaded.                                                                                                                                             |
| 400 Bad Request         | "invalidFormat"      | `firstName`, `lastName`, `email`, or `password` are not strings.<br />`passwordEmail` is not a boolean.<br />`role` is not an array.<br />`permissions` is not a JSON object. |
| 400 Bad Request         | "missing"            | `email` or `permissions` is missing.<br />`password` is missing (if `passwordEmail` is not set to `true`).                                                                    |
| 400 Bad Request         | "invalidCombination" | A password is specified although `passwordEmail` is set to `true`.                                                                                                            |
| 400 Bad Request         | "unknownDataField"   | An unknown field was sent.                                                                                                                                                    |
| 503 Service Unavailable | "internalError"      | Email could not be sent.                                                                                                                                                      |

### POST admin/passwordChange

This endpoint changes the password of the currently logged-in user account.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/admin/passwordChange
```

#### Request body

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "newPassword": <new password>,
    "newPasswordAgain": <new password>,
    "oldPassword": <old password>
}
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "success": true
}
```

#### Error codes

| **Error**        | **Type**           | **Reason**                                                                                                                                                                                                                                              |
| ---------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 400 Bad Request  |                    | Request body could not be loaded.                                                                                                                                                                                                                       |
| 400 Bad Request  | "missing"          | `newPassword`, `newPasswordAgain`, or `oldPassword` is missing.                                                                                                                                                                                         |
| 400 Bad Request  | "invalidValue"     | `newPassword` and `newPasswordAgain` do not match. <br />`newPassword` is shorter than 12 characters or too weak. <br />`oldPassword` does not match the account password. <br />`newPassword`, `newPasswordAgain`, or `oldPassword` are empty strings. |
| 400 Bad Request  | "invalidFormat"    | `newPassword`, `newPasswordAgain`, or `oldPassword` are not strings.                                                                                                                                                                                    |
| 400 Bad Request  | "unknownDataField" | An unknown field was sent.                                                                                                                                                                                                                              |
| 401 Unauthorized |                    | Not authorized: you do not have the required write permissions.                                                                                                                                                                                         |
| 403 Forbidden    |                    | The account is locked.                                                                                                                                                                                                                                  |

### POST admin/resend/\{accountId}

This endpoint sends an email with a password reset link to the email address associated with the user account.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/admin/resend/9
```

#### Request body

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{}
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "id": 9,
    "success": true
}
```

#### Error codes

| **Error**               | **Type**        | **Reason**                                 |
| ----------------------- | --------------- | ------------------------------------------ |
| 401 Unauthorized        |                 | Not authorized: you are not logged in.     |
| 403 Forbidden           |                 | You do not have administrator permissions. |
| 400 Bad Request         | "invalidFormat" | `accountId` is not an integer.             |
| 400 Bad Request         | "invalidValue"  | `accountId` is 0.                          |
| 404 Not Found           |                 | The account was not found.                 |
| 503 Service Unavailable | "internalError" | The email could not be sent.               |

### PUT admin/user/\{accountId}

This endpoint updates the information of a user account by `accountId`.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/admin/user/123456
```

#### Request body

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "email": "m.mustermann@websale.de",
    "firstName": "Max",
    "lastName": "Mustermann",
    "permissions": {
        "admin": {
            "0": false
        },
        "newsletter": {
            "0": true,
            "1": true,
            "2": true,
            "3": true
        }
    },
    "role": ["marketing"]
}
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "id": 42,
    "role": ["marketing"],
    "firstName": "Max",
    "lastName": "Mustermann",
    "email": "m.mustermann@websale.de",
    "permissions": {...}
}
```

#### Error codes

| **Error**        | **Type**           | **Reason**                                                                                                                                              |
| ---------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 401 Unauthorized |                    | Not authorized: you are not logged in.                                                                                                                  |
| 403 Forbidden    |                    | You do not have the required permissions.                                                                                                               |
| 400 Bad Request  |                    | Request body could not be loaded.                                                                                                                       |
| 400 Bad Request  | "invalidFormat"    | `accountId` is invalid.<br />`firstName`, `lastName`, or `email` are not strings.<br />`role` is not an array.<br />`permissions` is not a JSON object. |
| 400 Bad Request  | "unknownDataField" | An unknown field was sent.                                                                                                                              |
| 404 Not Found    |                    | The account was not found.                                                                                                                              |

### DELETE admin/user/\{accountId}

This endpoint deletes an existing user account by `accountId`.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/admin/user/123456
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "success": true
}
```

#### Error codes

| **Error**        | **Type**        | **Reason**                                                                                         |
| ---------------- | --------------- | -------------------------------------------------------------------------------------------------- |
| 401 Unauthorized |                 | Not authorized: you are not logged in.                                                             |
| 403 Forbidden    |                 | You do not have the required permissions.<br />An account owned by Websale AG must not be deleted. |
| 400 Bad Request  | "invalidFormat" | `accountId` is invalid.                                                                            |
| 400 Bad Request  | "invalidValue"  | `accountId` is 0.                                                                                  |
| 404 Not Found    |                 | The account was not found.                                                                         |

## Methods for user settings

The `/admin/settings` endpoint enables the saving and retrieving of user-related settings.

### GET admin/settings

This endpoint loads the current settings of the currently logged-in user, such as language, name, and dashboard configuration.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/admin/settings
```

#### Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "dashboard": {
        "content": [
            {
                "position": {
                    "cols": 2,
                    "rows": 2,
                    "x": 0,
                    "y": 0
                },
                "settings": {
                    "timeBetweenReloads": -1
                },
                "widgetId": "salesToday"
            }
        ]
    },
    "colorScheme": "light",
    "firstName": "Max",
    "language": "deu",
    "lastName": "Mustermann",
    "salutation": "m"
}
```

#### Error codes

| **Error**     | **Type** | **Reason**                                          |
| ------------- | -------- | --------------------------------------------------- |
| 404 Not Found |          | There are no saved settings for the active account. |

### PUT admin/settings

This endpoint updates the user settings. Parameters not provided retain their previous value.

#### Example

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.<your-shop>.de/admin/api/v1/admin/settings
```

#### Request body

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "dashboard": {
        "content": [
            {
                "position": {
                    "cols": 2,
                    "rows": 2,
                    "x": 0,
                    "y": 0
                },
                "settings": {
                    "timeBetweenReloads": -1
                },
                "widgetId": "salesToday"
            }
        ]
    },
    "colorScheme": "light",
    "firstName": "Max",
    "language": "deu",
    "lastName": "Mustermann",
    "salutation": "m"
}
```

#### Response

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<Settings as JSON, same as with GET>
```

#### Error codes

| **Error**               | **Type**           | **Reason**                                                                                                                                                                                                                           |
| ----------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 400 Bad Request         |                    | Request body could not be loaded.                                                                                                                                                                                                    |
| 400 Bad Request         | "missing"          | `dashboard.content`, `dashboard.content.widgetId`, `dashboard.content.position`, `dashboard.content.position.cols`, `dashboard.content.position.rows`, `dashboard.content.position.x`, or `dashboard.content.position.y` is missing. |
| 400 Bad Request         | "unknownDataField" | An unknown field was sent.                                                                                                                                                                                                           |
| 400 Bad Request         | "invalidFormat"    | `dashboard` is not a JSON object.<br />`salutation`, `language`, `colorScheme`, `firstName`, or `lastName` are not strings.                                                                                                          |
| 400 Bad Request         | "invalidValue"     | `salutation` is not a valid value (allowed: `m`, `w`, `d`).                                                                                                                                                                          |
| 401 Unauthorized        |                    | Not authorized: you do not have the required write permissions.                                                                                                                                                                      |
| 404 Not Found           |                    | There are no saved settings for the active account.                                                                                                                                                                                  |
| 503 Service Unavailable | "internalError"    | Saving failed.                                                                                                                                                                                                                       |

## Support

For technical questions and assistance, our support team is available to you: [To the customer portal](https://websale.atlassian.net/servicedesk/customer/portal/6)

Bei technischen Fragen und Hilfestellungen ist unser Support-Team für Sie erreichbar: [Zum Kundenportal](https://websale.atlassian.net/servicedesk/customer/portal/6)

Bitte senden Sie uns eine möglichst detaillierte Beschreibung sowie Screenshots, Requests/Antworten, damit wir Ihre Anfrage zeitnah und zielführend beantworten können.
