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

# Validation Endpoints for IBAN and Market Location IDs

> Use the Lumenaza validation API to verify IBANs and 11-digit market location identifiers before submitting consumer or producer registrations.

The Lumenaza API provides lightweight validation endpoints you can call before submitting a consumer or producer registration. Use these to surface input errors in your UI immediately — before making a full registration call that would return a 400.

***

## Validate an IBAN

```
GET /v3/validation/bank_data_iban/
```

Validates an IBAN (International Bank Account Number) for correct format and check digit.

<ParamField query="iban" type="string" required>
  The IBAN to validate (e.g. `DE89370400440532013000`).
</ParamField>

### Responses

**200 OK** — The IBAN is valid. No response body.

**400 Bad Request** — The IBAN failed validation.

<ResponseField name="detail" type="string">
  A human-readable error message describing the validation failure.
</ResponseField>

<CodeGroup>
  ```bash Valid IBAN theme={null}
  curl --request GET \
    --url "https://api.lumenaza.de/v3/validation/bank_data_iban/?iban=DE89370400440532013000" \
    --header "Authorization: Bearer <token>"
  # Returns: HTTP 200 (no body)
  ```

  ```bash Invalid IBAN theme={null}
  curl --request GET \
    --url "https://api.lumenaza.de/v3/validation/bank_data_iban/?iban=DE00000000000000000000" \
    --header "Authorization: Bearer <token>"
  # Returns: HTTP 400
  ```
</CodeGroup>

**Common 400 errors:**

| Error | Detail message |
| - | - |
| Unsupported country code | `"the IBAN country code is currently not supported"` |
| Invalid check digit | `"IBAN check digit validation failed"` |

***

## Validate a Market Location ID

```
GET /v3/validation/market_location/
```

Validates an 11-digit German market location identifier (Marktlokations-ID / MaLo-ID). These identifiers are required when registering consumers (`meteringpoint_id`) or producers (`market_location_identifier`).

<ParamField query="market_location_id" type="string" required>
  The 11-digit numeric market location identifier to validate.
</ParamField>

### Responses

**200 OK** — The market location ID is valid. No response body.

**400 Bad Request** — The ID failed validation.

<ResponseField name="detail" type="string">
  A human-readable error message describing the validation failure.
</ResponseField>

<CodeGroup>
  ```bash Valid market location ID theme={null}
  curl --request GET \
    --url "https://api.lumenaza.de/v3/validation/market_location/?market_location_id=51238696600" \
    --header "Authorization: Bearer <token>"
  # Returns: HTTP 200 (no body)
  ```
</CodeGroup>

**Common 400 errors:**

| Error | Detail message |
| - | - |
| Non-digit character | `"market location identifier contains non-digit character"` |
| Too many characters | `"market location identifier contains too many characters"` |
| Too few characters | `"market location identifier contains too few characters"` |
| Invalid start digit | `"market location identifier must start with a digit between 1-9"` |
| Invalid check digit | `"check digit validation failed"` |

<Note>
  Market location IDs must be exactly 11 digits, start with a digit between 1 and 9, and have a valid check digit. Use this endpoint to validate user-entered IDs before submitting registration requests.
</Note>

***

## Validate a Preferred Delivery Start

```
GET /v3/validation/preferred_delivery_start/
```

Checks whether a proposed delivery start date is valid for a given customer type and subscription reason.

<ParamField query="preferred_delivery_start" type="string" required>
  The proposed delivery start date in `YYYY-MM-DD` format.
</ParamField>

<ParamField query="customer_type" type="string" required>
  The type of customer being registered.
</ParamField>

<ParamField query="change_reason" type="string" required>
  The subscription reason code: `E01` (move), `E02` (new installation), or `E03` (supplier switch).
</ParamField>

### Responses

**200 OK** — The delivery start date is valid. No response body.

**400 Bad Request** — The date is not valid for the given parameters.

<ResponseField name="detail" type="string">
  A human-readable error message.
</ResponseField>

<ResponseField name="earliest_possible_delivery_start" type="string">
  When the delivery start is too early, this field contains the earliest date that would be accepted (ISO date format).
</ResponseField>

**Common 400 errors:**

| Error | Detail message |
| - | - |
| Unknown customer type | `"unknown customer_type"` |
| Unsupported change reason | `"unsupported change_reason for selected customer_type"` |
| Date not possible | `"delivery start to this date is not possible"` (includes `earliest_possible_delivery_start`) |


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