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

# Supplier switches API

> Create supplier switches in a structure batch, and follow each switch until it takes effect.

> [!NOTE]
>
> This API is alpha. It can change without notice. Today it covers the German market.

Use these endpoints to take over supply of accounting points as the new supplier. [Supplier switches](https://docs.engrate.io/market-communication/structuring/supplier-switches.md) explains the process and how it works in Germany.

| Endpoint | What it does |
| - | - |
| [Submit Structure Batch](https://docs.engrate.io/api-reference/structuring/submit-structure-batch.md) | Create 1 to 100 supplier switches. Engrate applies all of them or none of them. |
| [List Supplier Switches](https://docs.engrate.io/api-reference/structuring/list-supplier-switches.md) | Read the state, the declared data and the switch requests of your supplier switches. |
| [List EnFG Privilege Reasons](https://docs.engrate.io/api-reference/structuring/list-enfg-privilege-reasons.md) | Get the codes for reduced levies that a German consumption switch can declare. |

## The flow

1. Submit a structure batch with one `create.supplier-switch` action for each accounting point. Keep the `supplier_switch_id` of each result.
2. Engrate makes a switch request to the grid operator. The switch goes from `pending` to `requested`. The `delivery_status` of the request shows where its message is on its way to the market.
3. Read the switch with [List Supplier Switches](https://docs.engrate.io/api-reference/structuring/list-supplier-switches.md). The grid operator accepts or rejects the switch.
4. From the effective date, an accepted switch is `effected`. The accounting point shows the new supply period. See [Accounting points API](https://docs.engrate.io/api-reference/accounting-points/overview.md).

## Errors

| Status | When | What to do |
| - | - | - |
| `400` | Your organization is not set up for the market. | Contact Engrate. |
| `404` | Your organization is not set up for market communication. | Contact Engrate. |
| `409` | An action names an accounting point that already has an open switch, or two actions name the same accounting point. Engrate applied nothing. | Remove or change the actions that `conflicts` names, then submit the batch again. |
| `422` | The batch is not valid. For example, a MaLo-ID does not have 11 digits. | Correct the fields that `detail` names. |

All endpoints take your organization's API key in the `authorization` header. See [Authentication](https://docs.engrate.io/guides/authentication.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.