Supported methods
List of all supported methods.| Command/info | Endpoints | GET | PUT | POST | DELETE |
|---|---|---|---|---|---|
| User account in admin area | admin/user | ||||
| User settings | admin/settings |
General
Data fields of a user account
| Name | Type | |
|---|---|---|
| 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”] |
| String | Email address of the user | |
| userName | String | User name of the user |
| permissions | Object | Permissions of the user for services |
Example
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
Permissions
| Technical name | Meaning | Values |
|---|---|---|
"admin" | Full access to all areas | 0 = Active |
"products" | Products | 0 = Read1 = Write2 = Create3 = Delete4 = WriteProtectedFields |
"productvariants" | Product variants | 0 = Read1 = Write2 = Create3 = Delete |
"productRatings" | Product reviews | 0 = Read1 = Write2 = Create3 = Delete |
"inventory" | Product stock | 0 = Read1 = Write2 = Create3 = Delete |
"productFields" | Product fields | 0 = Read1 = Write2 = Create3 = Delete |
"categories" | Categories | 0 = Read1 = Write2 = Create3 = Delete |
"categoryFields" | Category fields | 0 = Read1 = Write2 = Create3 = Delete |
"configuration" | Configurations | 0 = Read1 = Write2 = Create3 = Delete |
"seo" | SEO | 0 = Read1 = Write2 = Create3 = Delete |
"sitemaps" | Sitemaps | 0 = Read1 = Create2 = Write3 = Delete4 = Publish |
"datafeeds" | Data feeds | 0 = Read1 = Write2 = Create3 = Delete4 = Publish |
"orders" | Orders | 0 = Read1 = Write2 = Delete |
"inquiries" | Inquiries | 0 = Read1 = Write2 = Delete |
"texts" | Text blocks | 0 = Read1 = Write2 = Create3 = Delete4 = Publish |
"templates" | Shop page templates | 0 = Read4 = Publish |
"customerAccounts" | Customer data | 0 = Read1 = Write2 = Create3 = Delete |
"vouchers" | Vouchers | 0 = Read1 = Write2 = Create3 = Delete |
"transactions" | Transactions | 0 = Read1 = Write |
"keyValue" | Key-value store | 0 = Read1 = Write2 = Create3 = Delete |
"newsletter" | Newsletter | 0 = Read1 = Write2 = Create3 = Delete |
"blacklist" | Newsletter blacklist | 0 = Add1 = Remove |
"statistics" | All statistics | 0 = Read |
"logs" | Logs | 0 = Read1 = Write2 = Create3 = Delete |
"strapi" | Link to the Strapi CMS | 0 = Read |
"dashboard" | Dashboard in the AI | 0 = Read |
"imageconverter" | Image converter | 0 = Read1 = Write2 = Create3 = Delete4 = Publish |
"paypalonboarding" | PayPal onboarding | 0 = Read1 = Write2 = Create3 = Delete |
"paymentprovider" | Payment provider | 0 = Read1 = Write2 = Create3 = Delete |
Permissions example
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
Response
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 or 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.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
Response
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 byaccountId.
Example
Response
Error codes
| Error | Type | Reason |
|---|---|---|
| 401 Unauthorized | Not authorized: you are not logged in or 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
Response
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
Request body
Response
Error codes
| Error | Type | Reason |
|---|---|---|
| 401 Unauthorized | Not authorized: you are not logged in or 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.passwordEmail is not a boolean.role is not an array.permissions is not a JSON object. |
| 400 Bad Request | ”missing” | email or permissions is missing.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
Request body
Response
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. newPassword is shorter than 12 characters or too weak. oldPassword does not match the account password. 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
Request body
Response
Error codes
| Error | Type | Reason |
|---|---|---|
| 401 Unauthorized | Not authorized: you are not logged in or 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 byaccountId.
Example
Request body
Response
Error codes
| Error | Type | Reason |
|---|---|---|
| 401 Unauthorized | Not authorized: you are not logged in or do not have the required permissions. | |
| 400 Bad Request | Request body could not be loaded. | |
| 400 Bad Request | ”invalidFormat” | accountId is invalid.firstName, lastName, or email are not strings.role is not an array.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 byaccountId.
Example
Response
Error codes
| Error | Type | Reason |
|---|---|---|
| 401 Unauthorized | Not authorized: you are not logged in or do not have the required permissions. 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
Response
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
Request body
Response
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.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. |
