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

# Schnellstart

> Starte deinen ersten Aufruf der Aniva Partner API in wenigen Minuten: Finde einen Teststandort, erstelle ein Profil und buche eine Blutabnahme.

Diese Anleitung führt dich durch den Kernablauf: einen Teststandort finden, ein Patientenprofil erstellen, einen Termin planen und eine Blutabnahme bestätigen.

## Voraussetzungen

Du benötigst einen von Aniva ausgestellten Partner-API-Schlüssel.

> [!NOTE]
>
> Wenn du noch keinen API-Schlüssel hast, kontaktiere Aniva, um einen für dein Partnerkonto ausstellen zu lassen.

## Schritte

**1. Verfügbare Standorte auflisten**

Rufe die Liste der Teststandorte ab, um eine `location_id` für den geplanten Termin zu finden.

```bash theme={null}
curl https://anivahealth.com/api/v1/locations \
  -H "x-api-key: YOUR_API_KEY"
```

**Beispielantwort**

```json theme={null}
[
  {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "Aniva Berlin Mitte",
    "company_name": "Aniva GmbH",
    "street": "Unter den Linden",
    "house_number": "42",
    "address_line_2": null,
    "city": "Berlin",
    "state": "Berlin",
    "postal_code": "10117",
    "country_name": "Germany",
    "country_code": "DE",
    "timezone": "Europe/Berlin",
    "contact_phone": "+4930987654321",
    "email": "berlin-mitte@anivahealth.com",
    "website": "https://anivahealth.com",
    "google_maps_url": null,
    "image_url": null,
    "open_hours": {
      "monday": [{ "open": "08:00", "close": "18:00" }],
      "tuesday": [{ "open": "08:00", "close": "18:00" }],
      "wednesday": [{ "open": "08:00", "close": "18:00" }],
      "thursday": [{ "open": "08:00", "close": "18:00" }],
      "friday": [{ "open": "08:00", "close": "16:00" }],
      "saturday": [],
      "sunday": []
    }
  }
]
```

Notiere dir die `id` des gewünschten Standorts. Du brauchst sie in Schritt 3.

**2. Profil erstellen**

Erstelle ein Patientenprofil, indem du die demografischen Daten übermittelst. Über `profile_group` wird das Profil mit deinem Partnerkonto verknüpft – hier wird entweder die unveränderliche UUID der Gruppe oder ihr lesbarer Slug akzeptiert.

```bash theme={null}
curl -X POST https://anivahealth.com/api/v1/profiles \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "first_name": "Jordan",
    "last_name": "Rivera",
    "sex": 1,
    "date_of_birth": "1990-04-15",
    "profile_group": "your-profile-group"
  }'
```

**Felder des Request-Bodys**

| Feld | Typ | Erforderlich | Beschreibung |
| - | - | - | - |
| `first_name` | string | Ja | Vorname des Patienten |
| `last_name` | string | Ja | Nachname des Patienten |
| `sex` | integer | Ja\*\* | `1` = männlich, `2` = weiblich (ISO/IEC 5218) |
| `date_of_birth` | string | Ja\*\* | Geburtsdatum im Format `YYYY-MM-DD`. Muss in der Vergangenheit liegen, nicht vor 1900, und einem Alter von 16–100 entsprechen. |
| `profile_group` | string | Ja\* | UUID oder Slug deiner Partner-Profilgruppe. Die UUID ist die stabile Referenz; der Slug wird ebenfalls akzeptiert. |
| `profile_group_slug` | string | Nein | **Veraltet.** Slug-Alias für `profile_group`. Entweder `profile_group` oder `profile_group_slug` ist erforderlich. |
| `email` | string | Nein | E-Mail-Adresse des Patienten. Wird automatisch generiert, wenn sie fehlt. |
| `language` | string | Nein | `en`, `de` oder `fi`. Standardmäßig `en`. |
| `phone` | string | Nein | Telefonnummer im E.164-Format, zum Beispiel `+4915123456789`. |
| `height` | number | Nein | Körpergröße in Zentimetern. |
| `weight` | number | Nein | Gewicht in Kilogramm. |
| `transactional_emails_enabled` | boolean | Nein | Überschreibt die Standardeinstellung der Profilgruppe für operative E-Mails. |
| `marketing_emails_enabled` | boolean | Nein | Überschreibt die Standardeinstellung der Profilgruppe für Marketing-E-Mails. |

\*\* Optional, wenn deine Profilgruppe dem Patienten erlaubt, beides auf der Kit-Aktivierungsseite einzugeben. Siehe
[Profile](https://docs.anivahealth.com/de/concepts/profiles.md#geburtsdatum-und-geschlecht-vom-patienten-eingeben-lassen).

**Beispielantwort (201 Created)**

```json theme={null}
{
  "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "handle": null,
  "first_name": "Jordan",
  "last_name": "Rivera",
  "email": "jordan.rivera@example.com",
  "phone": null,
  "sex": 1,
  "date_of_birth": "1990-04-15",
  "height": null,
  "weight": null,
  "language": "en",
  "transactional_emails_enabled": null,
  "created_at": "2026-04-01T10:00:00Z",
  "updated_at": null
}
```

Notiere dir die `id` aus der Antwort. Du verwendest sie im nächsten Schritt als `profile_id`.

**3. Termin planen**

Erstelle einen Termin mit der `profile_id` aus Schritt 2 und der `location_id` aus Schritt 1. Setze `scheduled_at` auf den Beginn eines Zeitfensters, das [Verfügbarkeit abrufen](https://docs.anivahealth.com/de/api/locations/get-availability.md) für diesen Standort zurückgibt. Die API lehnt Zeiten ab, die nicht im Zeitraster liegen.

```bash theme={null}
curl -X POST https://anivahealth.com/api/v1/appointments \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "profile_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "location_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "scheduled_at": "2026-04-10T09:00:00Z"
  }'
```

**Beispielantwort (201 Created)**

```json theme={null}
{
  "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
  "profile_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "location_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "scheduled_at": "2026-04-10T09:00:00Z",
  "status": "confirmed",
  "cancellation_reason": null,
  "results_ready_emails": [],
  "created_at": "2026-04-01T10:05:00Z",
  "updated_at": null,
  "profile": {
    "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "handle": null,
    "first_name": "Jordan",
    "last_name": "Rivera",
    "email": "jordan.rivera@example.com",
    "phone": null,
    "sex": 1,
    "date_of_birth": "1990-04-15",
    "height": null,
    "weight": null,
    "language": "en",
    "transactional_emails_enabled": null,
    "created_at": "2026-04-01T10:00:00Z",
    "updated_at": null
  },
  "panels": [],
  "individual_biomarkers": [],
  "shipments": [],
  "lab_codes": []
}
```

Notiere dir die `id` des Termins. Du brauchst sie, um die Blutabnahme zu bestätigen.

**4. Blutabnahme bestätigen**

Übermittle nach abgeschlossener Blutabnahme den Laborcode (Röhrchen-Barcode), um die Blutabnahme zu bestätigen und die Laborauftrags-Pipeline auszulösen. Bei einer Blutabnahme, deren Röhrchen mehrere Codes tragen, wird stattdessen `lab_codes` gesendet – siehe [Blutabnahme bestätigen](https://docs.anivahealth.com/de/api/appointments/confirm-blood-draw.md).

```bash theme={null}
curl -X POST https://anivahealth.com/api/v1/appointments/c3d4e5f6-a7b8-9012-cdef-123456789012/confirm \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "lab_code": "7642001234"
  }'
```

**Beispielantwort (200 OK)**

```json theme={null}
{
  "success": true
}
```

Nach der Bestätigung wird die Laborauftrags-Pipeline ausgelöst. Du kannst den Termin abrufen, um zu prüfen, ob sich der Status auf `"blood_drawn"` geändert hat.

## Nächste Schritte

* [Füge Panels zu einem Termin hinzu](https://docs.anivahealth.com/de/api/appointments/add-panels.md), um festzulegen, welche Labortests durchgeführt werden sollen.
* [Aktualisiere einen Termin](https://docs.anivahealth.com/de/api/appointments/update-appointment.md), um ihn vor der Blutabnahme zu verschieben oder den Standort zu ändern.
* [Storniere einen Termin](https://docs.anivahealth.com/de/api/appointments/cancel-appointment.md), wenn er nicht mehr benötigt wird.
* [Rufe Laborergebnisse ab](https://docs.anivahealth.com/de/api/appointments/get-results.md), um klinische und genetische Ergebnisse nach der Verarbeitung zu erhalten.
* [Lade Dokumente herunter](https://docs.anivahealth.com/de/api/documents/download-document.md), um Laborberichte als PDF abzurufen.
* [Rufe ein Profil ab](https://docs.anivahealth.com/de/api/profiles/get-profile.md), um Patientendaten zu prüfen oder anzuzeigen.
* Sieh dir die vollständige [API-Referenz](https://docs.anivahealth.com/de/api/profiles/create-profile.md) für alle verfügbaren Endpunkte und Parameter an.


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