> ## 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 shop modes

> Check via the Admin Interface API whether a subshop fulfils the prerequisites for going live, including detection of payment methods in sandbox mode.

The `shopStatus/` endpoint provides an interface that lets you check whether all prerequisites for switching a subshop to live are fulfilled. The actual status change is not performed via this endpoint but as a regular write access to the configuration.

A functional description of the three modes and the transitions between them can be found at [Shop modes](https://dokumentation.websale.de/frontend/funktionsubersicht/inaktiv-seite).

***

## Supported methods

List of all supported methods

| Command/Info    | Endpoints                       | DELETE              | GET                   | POST                | PUT                 |
| --------------- | ------------------------------- | ------------------- | --------------------- | ------------------- | ------------------- |
| Readiness check | `shopStatus/goLive/{subshopId}` | <Icon icon="ban" /> | <Icon icon="check" /> | <Icon icon="ban" /> | <Icon icon="ban" /> |

## Method for the readiness check

The following method checks whether a subshop is allowed to switch to active mode. It is read-only and does not make any changes. All active online payment methods are checked. If one of these payment methods is still in sandbox mode, it is reported as a blocker.

To use this method you need the corresponding permissions to read configuration data.

### GET shopStatus/goLive/\{subshopId}

Checks for the specified subshop whether the prerequisites for switching to "Active" mode are fulfilled.

#### Example

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

#### Response - readiness fulfilled

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

#### Response - blocker found (payment method PayPal in sandbox mode)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "allowed": false,
    "blockers": {
        "paypal": "sandbox"
    }
}
```

#### Response fields

| Name       | Type   | Meaning                                                                                                                                              |
| ---------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `allowed`  | bool   | `true` if no blockers were found and the switch to "Active" is permitted.<br />`false` if blockers were found.                                       |
| `blockers` | object | Only present if `allowed = false`. <br />Key: technical identifier of the blocking payment method.<br />Value: reason for blocking (e.g. `sandbox`). |

#### 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 configuration data. |

<Info>
  **Setting the status**\
  This interface does not provide its own method for setting the status. The status change is performed as a regular write access to the [configuration node](https://dokumentation.websale.de/konfiguration/general-allgemeine-shopeinstellungen#general-general-allgemeine-basiseinstellungen) with the body `{ "data": { "status": "active" } }`. See [API reference configuration](https://dokumentation.websale.de/schnittstellen/admin-interface-api/api-referenz-konfiguration#get-config/nodes//overwrites).
</Info>

<Warning>
  When setting the status directly via the configuration endpoint, no readiness check is performed. The switch to `active` is applied even if active online payment methods are still running in sandbox mode. Therefore, always call the GET method described here before setting the status, so the check is not bypassed.
</Warning>
