{
  "openapi": "3.1.0",
  "info": {
    "title": "Qrona Newsletter API",
    "version": "1",
    "description": "Kontakte, Listen, Kontaktfelder, Verteilerlisten, die Unterdrückungsliste, E-Commerce und Webhooks im Qrona Newsletter. Schlüssel werden unter Einstellungen → API-Schlüssel erstellt. Dokumentation: https://newsletter.qrona.se/de/developer",
    "contact": {
      "name": "Qrona",
      "email": "support@qrona.se",
      "url": "https://newsletter.qrona.se/de/developer"
    }
  },
  "servers": [
    {
      "url": "https://newsletter.qrona.se"
    }
  ],
  "tags": [
    {
      "name": "Der Schlüssel",
      "description": "Überprüfen Sie, ob der Schlüssel funktioniert, für welchen Arbeitsbereich er gilt und was er tun darf."
    },
    {
      "name": "Kontakte",
      "description": "Kontakte sind die Empfänger des Arbeitsbereichs. Ein Kontakt wird anhand seiner E-Mail-Adresse identifiziert, die sich nie ändert. Legen Sie nur Kontakte an, die in Mailings eingewilligt haben (oder bei denen Sie eine andere Rechtsgrundlage haben): Ein aktiver Kontakt ist durch Mailings an Verteiler auch dann erreichbar, wenn er auf keiner Liste steht."
    },
    {
      "name": "Listen",
      "description": "Listen sind Zielgruppen mit eigenem Anmeldemodus: Beim Double-Opt-In müssen Neuanmeldungen per E-Mail bestätigt werden."
    },
    {
      "name": "Mitglieder auflisten",
      "description": "Wer steht auf einer Liste und meldet sich dazu an? Für Anmeldungen über die API gelten dieselben Regeln wie für die Formulare: Wer sich abgemeldet hat oder unterdrückt wurde, wird niemals hinzugefügt, ohne sich selbst zu bestätigen."
    },
    {
      "name": "Kontaktfelder",
      "description": "Die eigenen Felder des Arbeitsbereichs – die Schlüssel, die in Feldern eines Kontakts verwendet werden können."
    },
    {
      "name": "Verteilerlisten",
      "description": "Verteilerlisten sind Kontakte, die Bedingungen erfüllen (Segmente). Erfordert, dass die Person hinter dem Schlüssel ein Administrator ist."
    },
    {
      "name": "Sperrliste",
      "description": "Adressen, an die der Arbeitsbereich niemals sendet: Abmeldungen, Bounces, Spam-Beschwerden und manuell hinzugefügte Unterdrückungen."
    },
    {
      "name": "Geschäfte",
      "description": "Ein Webshop im Arbeitsbereich. Alles im E-Commerce gehört zu einem Shop und wird durch die eigenen IDs des Shops identifiziert, die Sie auswählen. PUT erstellt oder aktualisiert, sodass derselbe Aufruf wiederholt werden kann, ohne dass etwas dupliziert wird."
    },
    {
      "name": "Kunden",
      "description": "Personen, die im Shop eingekauft haben – mit oder ohne Einwilligung in den Mailing. Ein Kunde wird nie zum Kontakt: Er ist mit dem Workspace-Kontakt mit derselben Adresse verknüpft, solange dieser existiert, für Einkaufskonditionen in Verteilerlisten."
    },
    {
      "name": "Produkte",
      "description": "Die Produkte des Shops mit Varianten, für Bedingungen wie „hat Produkt X gekauft“."
    },
    {
      "name": "Bestellungen",
      "description": "Die Bestellungen des Geschäfts mit Zeilen. Bezahlte Bestellungen zählen als Käufe unter bestimmten Bedingungen und als Umsatz für die Kampagne, aus der der Kunde kam (Kampagnen_ID)."
    },
    {
      "name": "Karren",
      "description": "Offene Warenkörbe. Löschen Sie den Warenkorb, sobald daraus eine Bestellung geworden ist."
    },
    {
      "name": "Einnahmen",
      "description": "Umsatz pro Kampagne: die bezahlten Bestellungen, die über die Links der Kampagne kamen."
    },
    {
      "name": "Charge",
      "description": "Up to 500 calls in one, for example to import old orders. Each operation is validated and run as if it had been sent on its own."
    },
    {
      "name": "Nachrichten",
      "description": "Eine Nachricht nach der anderen an einen Empfänger, erstellt aus einer Qrona-Vorlage und den eigenen Daten der Nachricht. Nur für das Add-on Byråstöd: Klientkommunikation, mit Qronas Systemschlüssel – der Schlüssel einer Person kann keine Nachrichten senden."
    },
    {
      "name": "Qrona-Vorlagen",
      "description": "Die Vorlagen, aus denen die Nachrichten erstellt werden, werden im Qrona Newsletter anhand eines Datenvertrags erstellt. Zeigen Sie eine Vorschau einer Vorlage mit Daten an, genau so, wie sie gesendet wurden."
    },
    {
      "name": "Webhooks",
      "description": "URLs, die über Anmeldungen, Abmeldungen, Bounces und Spam-Beschwerden im Arbeitsbereich benachrichtigt werden, signiert mit HMAC. Erfordert, dass die Person hinter dem Schlüssel ein Administrator ist."
    }
  ],
  "paths": {
    "/api/v1": {
      "get": {
        "operationId": "root.get",
        "summary": "Holen Sie sich die Details des Schlüssels",
        "description": "Für welchen Arbeitsbereich der Schlüssel gilt, für wen er fungiert und was er tun darf. Nützlich zum Testen der Verbindung.\n\nAlle gültigen Schlüssel.",
        "tags": [
          "Der Schlüssel"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [],
        "responses": {
          "200": {
            "description": "Die Details des Schlüssels.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Root"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/contacts": {
      "get": {
        "operationId": "contacts.list",
        "summary": "Kontakte auflisten",
        "description": "Die Kontakte, die der Schlüssel in der ID-Reihenfolge sehen darf, Seite für Seite.\n\nDie Antwort enthält die eigenen Kontakte des Arbeitsbereichs und diejenigen, die auf einer Ebene darüber mit ihm geteilt wurden (gemeinsam genutzt: true), begrenzt durch die Kontaktregeln der Person hinter dem Schlüssel.\n\nRufen Sie die nächste Seite mit Cursor=next_cursor ab, bis has_more false ist. Für eine laufende Synchronisierung: Speichern Sie die Zeit, bevor Sie beginnen, und rufen Sie sie dann mit „update_since“ ab.\n\nErfordert: contacts:read.",
        "tags": [
          "Kontakte"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "contacts:read"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Die maximale Anzahl von Elementen in der Antwort (1–500, Standard 100).",
            "schema": {
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor aus der vorherigen Antwort für die nächste Seite. Für die erste Seite weglassen.",
            "schema": {
              "type": "string",
              "maxLength": 400
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Nur Kontakte mit diesem Status. Wenn weggelassen: alle außer gelöscht.",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "unsubscribed",
                "bounced",
                "complained",
                "deleted"
              ]
            }
          },
          {
            "name": "list_id",
            "in": "query",
            "required": false,
            "description": "Nur Kontakte, die auf der Liste stehen (unabhängig vom Status der Mitgliedschaft).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
            }
          },
          {
            "name": "segment_id",
            "in": "query",
            "required": false,
            "description": "Nur Kontakte in der Verteilerliste.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "description": "Nur Kontakte mit diesem Tag (genaue Schreibweise).",
            "schema": {
              "type": "string",
              "maxLength": 50
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "description": "Seitdem haben sich nur die Kontakte geändert (ISO 8601). Nützlich für die Synchronisierung: Speichern Sie die Zeit des vorherigen Abrufs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "origin",
            "in": "query",
            "required": false,
            "description": "own: nur die eigenen des Arbeitsbereichs · shared: nur diejenigen, die von einer höheren Ebene aus geteilt werden.",
            "schema": {
              "type": "string",
              "enum": [
                "own",
                "shared"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Eine Seite mit Kontakten.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactPage"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Die Angaben sind ungültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "contacts.create",
        "summary": "Kontakt erstellen",
        "description": "Ein neuer Kontakt im Arbeitsbereich. Wenn die Adresse bereits existiert, lautet die Antwort 409 contact_exists.\n\n„consent_source“ ist der Nachweis der Einwilligung und erforderlich. In den Feldern müssen Kontaktfelder enthalten sein, die im Arbeitsbereich obligatorisch sind.\n\nZum Erstellen oder Aktualisieren im selben Aufruf: Verwenden Sie POST /contacts/upsert.\n\nErfordert: contacts:write.",
        "tags": [
          "Kontakte"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "contacts:write"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Ein Schlüssel Ihrer Wahl (z. B. eine UUID). Der gleiche Schlüssel und der gleiche Anruf innerhalb von 24 Stunden geben erneut die gleiche Antwort, ohne dass etwas zweimal gemacht wird.",
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "maxLength": 254,
                    "description": "Die E-Mail-Adresse.",
                    "example": "anna@example.se"
                  },
                  "first_name": {
                    "description": "Vorname.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last_name": {
                    "description": "Nachname.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "company": {
                    "description": "Unternehmen.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "phone": {
                    "description": "Telefonnummer. Ohne Ländercode wird es entsprechend dem Land des Arbeitsbereichs interpretiert.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 50
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "fields": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "pattern": "^[a-z0-9_]{1,40}$"
                    },
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 1000
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": "Benutzerdefinierte Felder nach Schlüssel (GET /fields). Die Werte werden anhand des Feldtyps überprüft. null oder „“ entfernt einen Wert. Schlüssel, die keine Felder im Arbeitsbereich sind, werden als Freiformfelder gespeichert. Sensible Felder (persönliche Identitätsnummern) können nicht über die API festgelegt werden.",
                    "example": {
                      "kundnummer": "K-2041",
                      "ort": "Göteborg"
                    }
                  },
                  "tags": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "description": "Schlagworte.",
                    "example": [
                      "kund"
                    ]
                  },
                  "consent_source": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 255,
                    "description": "Wie die Person den Mailings zugestimmt hat, in Ihren eigenen Worten. Als Beweis gespeichert.",
                    "example": "Kryssade i rutan i kassan på butik.se"
                  },
                  "list_ids": {
                    "description": "Listen, zu denen der Kontakt direkt hinzugefügt werden kann (z. B. wenn eine Person einen Kontakt in der App hinzufügt).",
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                    }
                  }
                },
                "required": [
                  "email",
                  "consent_source"
                ],
                "additionalProperties": false
              },
              "example": {
                "email": "anna@example.se",
                "first_name": "Anna",
                "last_name": "Svensson",
                "fields": {
                  "kundnummer": "K-2041"
                },
                "tags": [
                  "kund"
                ],
                "consent_source": "Kryssade i rutan i kassan på butik.se"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Der neue Kontakt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactDetail"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: Die Anfrage konnte nicht gelesen werden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "contact_exists: Der Kontakt existiert bereits · suppressed: Die Adresse wird unterdrückt · idempotency_in_progress: Die Anfrage ist bereits in Bearbeitung",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_media_type: Falscher Inhaltstyp",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Die Angaben sind ungültig · idempotency_key_reused: Idempotency-Key wird bereits verwendet",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/contacts/upsert": {
      "post": {
        "operationId": "contacts.upsert",
        "summary": "Kontakt erstellen oder aktualisieren",
        "description": "Erstellt den Kontakt, wenn die Adresse neu ist; andernfalls wird es aktualisiert. Der übliche Ruf nach einer Integration.\n\nReagiert mit 201, wenn der Kontakt erstellt wurde, und mit 200, wenn er aktualisiert wurde. Nur die von Ihnen gesendeten Felder werden geändert. add_tags/remove_tags ändern Tags, ohne die anderen zu berühren.\n\n„consent_source“ ist erforderlich, wenn der Kontakt erstellt wird. Die Adresse wird im Textkörper gesendet, niemals in der URL, sodass sie nicht in Protokollen landet.\n\nDie Listenmitgliedschaft wird hier nicht geändert: Melden Sie sich mit POST /lists/ bei einer Liste an.{id}/Mitglieder.\n\nErfordert: contacts:write.",
        "tags": [
          "Kontakte"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "contacts:write"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Ein Schlüssel Ihrer Wahl (z. B. eine UUID). Der gleiche Schlüssel und der gleiche Anruf innerhalb von 24 Stunden geben erneut die gleiche Antwort, ohne dass etwas zweimal gemacht wird.",
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "maxLength": 254,
                    "description": "Die E-Mail-Adresse.",
                    "example": "anna@example.se"
                  },
                  "first_name": {
                    "description": "Vorname.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last_name": {
                    "description": "Nachname.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "company": {
                    "description": "Unternehmen.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "phone": {
                    "description": "Telefonnummer. Ohne Ländercode wird es entsprechend dem Land des Arbeitsbereichs interpretiert.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 50
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "fields": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "pattern": "^[a-z0-9_]{1,40}$"
                    },
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 1000
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": "Benutzerdefinierte Felder nach Schlüssel (GET /fields). Die Werte werden anhand des Feldtyps überprüft. null oder „“ entfernt einen Wert. Schlüssel, die keine Felder im Arbeitsbereich sind, werden als Freiformfelder gespeichert. Sensible Felder (persönliche Identitätsnummern) können nicht über die API festgelegt werden.",
                    "example": {
                      "kundnummer": "K-2041",
                      "ort": "Göteborg"
                    }
                  },
                  "tags": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "description": "Ersetzt alle Tags. Nicht zusammen mit add_tags/remove_tags verwenden.",
                    "example": [
                      "kund"
                    ]
                  },
                  "add_tags": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "description": "Tags zum Hinzufügen; die anderen bleiben erhalten.",
                    "example": [
                      "kund"
                    ]
                  },
                  "remove_tags": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "description": "Zu entfernende Tags.",
                    "example": [
                      "kund"
                    ]
                  },
                  "consent_source": {
                    "description": "Wie die Person zugestimmt hat. Erforderlich, wenn der Kontakt erstellt wird; ändert nichts an einem bestehenden Kontakt.",
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 255,
                    "example": "Kryssade i rutan i kassan på butik.se"
                  }
                },
                "required": [
                  "email"
                ],
                "additionalProperties": false
              },
              "example": {
                "email": "anna@example.se",
                "first_name": "Anna",
                "fields": {
                  "kundnummer": "K-2041"
                },
                "add_tags": [
                  "kund"
                ],
                "consent_source": "Kryssade i rutan i kassan på butik.se"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Der Kontakt (201, falls er erstellt wurde).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactDetail"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: Die Anfrage konnte nicht gelesen werden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "shared_contact: Der Kontakt wird geteilt · forbidden: Nicht erlaubt · insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "contact_erased: Der Kontakt wurde gelöscht · suppressed: Die Adresse wird unterdrückt · idempotency_in_progress: Die Anfrage ist bereits in Bearbeitung",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_media_type: Falscher Inhaltstyp",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Die Angaben sind ungültig · idempotency_key_reused: Idempotency-Key wird bereits verwendet",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/contacts/lookup": {
      "post": {
        "operationId": "contacts.lookup",
        "summary": "Suchen Sie nach Kontakten per E-Mail",
        "description": "Bis zu 100 Adressen in einem Anruf. The response has the contacts that exist (all statuses, including deleted).\n\nDie Adressen werden im Textkörper gesendet, sodass sie nicht in Protokollen landen. Eine Adresse kann zwei Übereinstimmungen ergeben: einen eigenen Kontakt und einen gemeinsamen Kontakt von einer Ebene darüber.\n\nErfordert: contacts:read.",
        "tags": [
          "Kontakte"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "contacts:read"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Ein Schlüssel Ihrer Wahl (z. B. eine UUID). Der gleiche Schlüssel und der gleiche Anruf innerhalb von 24 Stunden geben erneut die gleiche Antwort, ohne dass etwas zweimal gemacht wird.",
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "emails": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 254
                    },
                    "description": "Bis zu 100 Adressen.",
                    "example": [
                      "anna@example.se",
                      "bo@example.se"
                    ]
                  }
                },
                "required": [
                  "emails"
                ],
                "additionalProperties": false
              },
              "example": {
                "emails": [
                  "anna@example.se",
                  "bo@example.se"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Die vorhandenen Kontakte.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactList"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: Die Anfrage konnte nicht gelesen werden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "idempotency_in_progress: Die Anfrage ist bereits in Bearbeitung",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_media_type: Falscher Inhaltstyp",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Die Angaben sind ungültig · idempotency_key_reused: Idempotency-Key wird bereits verwendet",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/contacts/{id}": {
      "get": {
        "operationId": "contacts.get",
        "summary": "Nehmen Sie Kontakt auf",
        "description": "Ein Kontakt mit den Listen, auf denen es steht.\n\nErfordert: contacts:read.",
        "tags": [
          "Kontakte"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "contacts:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Die ID des Kontakts.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,20}$",
              "example": "1042"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Der Kontakt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactDetail"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "contacts.update",
        "summary": "Kontakt aktualisieren",
        "description": "Ändert die von Ihnen gesendeten Felder. Die E-Mail-Adresse kann nicht geändert werden.\n\nNur die eigenen Kontakte des Arbeitsbereichs können geändert werden: Ein freigegebener Kontakt gibt 403 shared_contact zurück.\n\nErfordert: contacts:write.",
        "tags": [
          "Kontakte"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "contacts:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Die ID des Kontakts.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,20}$",
              "example": "1042"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "first_name": {
                    "description": "Vorname.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last_name": {
                    "description": "Nachname.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "company": {
                    "description": "Unternehmen.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "phone": {
                    "description": "Telefonnummer. Ohne Ländercode wird es entsprechend dem Land des Arbeitsbereichs interpretiert.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 50
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "fields": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "pattern": "^[a-z0-9_]{1,40}$"
                    },
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 1000
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": "Benutzerdefinierte Felder nach Schlüssel (GET /fields). Die Werte werden anhand des Feldtyps überprüft. null oder „“ entfernt einen Wert. Schlüssel, die keine Felder im Arbeitsbereich sind, werden als Freiformfelder gespeichert. Sensible Felder (persönliche Identitätsnummern) können nicht über die API festgelegt werden.",
                    "example": {
                      "kundnummer": "K-2041",
                      "ort": "Göteborg"
                    }
                  },
                  "tags": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "description": "Ersetzt alle Tags. Nicht zusammen mit add_tags/remove_tags verwenden.",
                    "example": [
                      "kund"
                    ]
                  },
                  "add_tags": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "description": "Tags zum Hinzufügen; die anderen bleiben erhalten.",
                    "example": [
                      "kund"
                    ]
                  },
                  "remove_tags": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "description": "Zu entfernende Tags.",
                    "example": [
                      "kund"
                    ]
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "last_name": "Berg",
                "fields": {
                  "ort": "Malmö"
                },
                "remove_tags": [
                  "vip"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Der Kontakt nach der Änderung.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactDetail"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: Die Anfrage konnte nicht gelesen werden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "shared_contact: Der Kontakt wird geteilt · insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_media_type: Falscher Inhaltstyp",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Die Angaben sind ungültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/contacts/{id}/unsubscribe": {
      "post": {
        "operationId": "contacts.unsubscribe",
        "summary": "Kontakt abbestellen",
        "description": "Die Person möchte keine Mailings mehr: Der Kontakt verlässt alle Listen, erhält den Status abgemeldet und die Adresse wird unterdrückt.\n\nDas Gleiche gilt, wenn sich die Person selbst abmeldet. Nur die Person kann sich erneut anmelden, indem sie dies per E-Mail bestätigt. Tut nichts, wenn der Kontakt bereits abgemeldet ist.\n\nErfordert: contacts:write.",
        "tags": [
          "Kontakte"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "contacts:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Die ID des Kontakts.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,20}$",
              "example": "1042"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Ein Schlüssel Ihrer Wahl (z. B. eine UUID). Der gleiche Schlüssel und der gleiche Anruf innerhalb von 24 Stunden geben erneut die gleiche Antwort, ohne dass etwas zweimal gemacht wird.",
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Der Kontakt nach der Abmeldung.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactDetail"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "shared_contact: Der Kontakt wird geteilt · insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "idempotency_in_progress: Die Anfrage ist bereits in Bearbeitung",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "idempotency_key_reused: Idempotency-Key wird bereits verwendet",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/contacts/{id}/erase": {
      "post": {
        "operationId": "contacts.erase",
        "summary": "Kontakt löschen (DSGVO)",
        "description": "Löscht die persönlichen Daten des Kontakts dauerhaft. Die Adresse wird unterdrückt, sodass sie nie wieder Mailings erhält.\n\nName, Telefonnummer, benutzerdefinierte Felder, Tags und Umfrageantworten werden entfernt und der Kontakt verlässt alle Listen. Übrig bleiben die Adresse in der Unterdrückungsliste und ein Eintrag im Einwilligungsprotokoll über die Löschung. Kann nicht rückgängig gemacht werden.\n\nErfordert den Bereich „contacts:erase“.\n\nErfordert: contacts:erase.",
        "tags": [
          "Kontakte"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "contacts:erase"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Die ID des Kontakts.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,20}$",
              "example": "1042"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Ein Schlüssel Ihrer Wahl (z. B. eine UUID). Der gleiche Schlüssel und der gleiche Anruf innerhalb von 24 Stunden geben erneut die gleiche Antwort, ohne dass etwas zweimal gemacht wird.",
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Gelöscht."
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "shared_contact: Der Kontakt wird geteilt · insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "idempotency_in_progress: Die Anfrage ist bereits in Bearbeitung",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "idempotency_key_reused: Idempotency-Key wird bereits verwendet",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/lists": {
      "get": {
        "operationId": "lists.list",
        "summary": "Listenlisten",
        "description": "Die Listen des Arbeitsbereichs mit der Anzahl der Mitglieder.\n\nErfordert: lists:read.",
        "tags": [
          "Listen"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "lists:read"
        ],
        "responses": {
          "200": {
            "description": "Alle Listen.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListList"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "lists.create",
        "summary": "Liste erstellen",
        "description": "Eine neue Liste. Double-Opt-In ist aktiviert, sofern Sie nichts anderes angeben.\n\nErfordert: lists:write.",
        "tags": [
          "Listen"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "lists:write"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Ein Schlüssel Ihrer Wahl (z. B. eine UUID). Der gleiche Schlüssel und der gleiche Anruf innerhalb von 24 Stunden geben erneut die gleiche Antwort, ohne dass etwas zweimal gemacht wird.",
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 1000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "double_opt_in": {
                    "description": "Neue Anmeldungen müssen per E-Mail bestätigt werden. Standard: true.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              },
              "example": {
                "name": "Kunder från webbutiken",
                "double_opt_in": true
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Die neue Liste.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/List"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: Die Anfrage konnte nicht gelesen werden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "idempotency_in_progress: Die Anfrage ist bereits in Bearbeitung",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_media_type: Falscher Inhaltstyp",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Die Angaben sind ungültig · idempotency_key_reused: Idempotency-Key wird bereits verwendet",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/lists/{id}": {
      "get": {
        "operationId": "lists.get",
        "summary": "Liste abrufen",
        "description": "Eine Liste mit Mitgliederzahlen.\n\nErfordert: lists:read.",
        "tags": [
          "Listen"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "lists:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Die ID der Liste.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "example": "3f1c2a4e-8b7d-4c1e-9f0a-2d6b5e7c8a91"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Die Liste.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/List"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "lists.update",
        "summary": "Liste aktualisieren",
        "description": "Name, Beschreibung und Anmeldemodus.\n\nErfordert: lists:write.",
        "tags": [
          "Listen"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "lists:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Die ID der Liste.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "example": "3f1c2a4e-8b7d-4c1e-9f0a-2d6b5e7c8a91"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 1000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "double_opt_in": {
                    "description": "Neue Anmeldungen müssen per E-Mail bestätigt werden. Standard: true.",
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "name": "Nyhetsbrev – kunder"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Die Liste nach der Änderung.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/List"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: Die Anfrage konnte nicht gelesen werden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_media_type: Falscher Inhaltstyp",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Die Angaben sind ungültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "lists.delete",
        "summary": "Liste löschen",
        "description": "Löscht die Liste. Die Kontakte bleiben bestehen. Nicht möglich, solange eine Kampagne, die versendet werden soll, die Liste verwendet.\n\nErfordert: lists:write.",
        "tags": [
          "Listen"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "lists:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Die ID der Liste.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "example": "3f1c2a4e-8b7d-4c1e-9f0a-2d6b5e7c8a91"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Gelöscht."
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "list_in_use: Die Liste wird verwendet",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/lists/{id}/members": {
      "get": {
        "operationId": "members.list",
        "summary": "Mitglieder auflisten",
        "description": "Die Mitglieder der Liste, Seite für Seite.\n\nErfordert: lists:read, contacts:read.",
        "tags": [
          "Mitglieder auflisten"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "lists:read",
          "contacts:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Die ID der Liste.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "example": "3f1c2a4e-8b7d-4c1e-9f0a-2d6b5e7c8a91"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Die maximale Anzahl von Elementen in der Antwort (1–500, Standard 100).",
            "schema": {
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor aus der vorherigen Antwort für die nächste Seite. Für die erste Seite weglassen.",
            "schema": {
              "type": "string",
              "maxLength": 400
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "abonniert: erhält Mailings · ausstehend: wartet auf Bestätigung · abgemeldet: ist gegangen · blockiert: auf der Liste, aber nicht erreichbar.",
            "schema": {
              "type": "string",
              "enum": [
                "subscribed",
                "pending",
                "unsubscribed",
                "blocked"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Eine Seite mit Mitgliedern.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberPage"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Die Angaben sind ungültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "members.create",
        "summary": "Melden Sie sich für die Liste an",
        "description": "Tragen Sie eine Adresse mit einem Einverständnisnachweis in die Liste ein. Der Kontakt wird erstellt, wenn er nicht existiert.\n\nMit dem Status „Ausstehend“ (die Standardeinstellung bei Listen mit Double-Opt-In) erhält die Person eine Bestätigungs-E-Mail und wird bei der Bestätigung hinzugefügt. Mit dem Abonnieren wird die Person sofort hinzugefügt – Sie bestätigen dann, dass eine Einwilligung vorliegt.\n\nJeder, der sich zuvor abgemeldet hat, erhält immer eine Bestätigungs-E-Mail, egal was Sie senden: Keine Integration kann jemanden gegen seinen Willen wieder anmelden. Adressen, die zurückgesendet werden, eine Spam-Beschwerde eingereicht haben, gelöscht oder unterdrückt werden, werden mit 409 blockiert angezeigt.\n\nAntwortet mit 201, wenn sich etwas geändert hat, und mit 200, wenn die Person bereits Mitglied war (oder gerade eine Bestätigungs-E-Mail erhalten hat – eine neue wird frühestens zehn Minuten später gesendet).\n\nErfordert: contacts:write.",
        "tags": [
          "Mitglieder auflisten"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "contacts:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Die ID der Liste.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "example": "3f1c2a4e-8b7d-4c1e-9f0a-2d6b5e7c8a91"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Ein Schlüssel Ihrer Wahl (z. B. eine UUID). Der gleiche Schlüssel und der gleiche Anruf innerhalb von 24 Stunden geben erneut die gleiche Antwort, ohne dass etwas zweimal gemacht wird.",
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "maxLength": 254,
                    "description": "Die E-Mail-Adresse.",
                    "example": "anna@example.se"
                  },
                  "first_name": {
                    "description": "Vorname. Füllt nur das aus, was bei einem vorhandenen Kontakt fehlt.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last_name": {
                    "description": "Nachname.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "company": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "description": "abonniert: sofort hinzugefügt. ausstehend: Eine Bestätigungs-E-Mail wird gesendet und die Person wird hinzugefügt, wenn sie bestätigt. Standard: der eigene Modus der Liste. Wer sich zuvor abgemeldet hat, erhält immer eine Bestätigungs-E-Mail.",
                    "type": "string",
                    "enum": [
                      "subscribed",
                      "pending"
                    ]
                  },
                  "consent": {
                    "type": "object",
                    "properties": {
                      "text": {
                        "type": "string",
                        "minLength": 10,
                        "maxLength": 5000,
                        "description": "Genau der Text, dem die Person zugestimmt hat.",
                        "example": "Ja, jag vill få nyhetsbrev från Exempel AB."
                      },
                      "source": {
                        "description": "Wo es passiert ist.",
                        "example": "Kassan på butik.se",
                        "type": "string",
                        "maxLength": 200
                      },
                      "ip": {
                        "description": "Die IP-Adresse der Person (nicht die Ihres Servers).",
                        "type": "string",
                        "maxLength": 45
                      },
                      "user_agent": {
                        "description": "Der Browser der Person.",
                        "type": "string",
                        "maxLength": 255
                      }
                    },
                    "required": [
                      "text"
                    ],
                    "additionalProperties": false,
                    "description": "Der Einwilligungsnachweis. Wird im Einwilligungsprotokoll gespeichert."
                  }
                },
                "required": [
                  "email",
                  "consent"
                ],
                "additionalProperties": false
              },
              "example": {
                "email": "anna@example.se",
                "first_name": "Anna",
                "consent": {
                  "text": "Ja, jag vill få nyhetsbrev från Exempel AB.",
                  "source": "Kassan på butik.se",
                  "ip": "203.0.113.7"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Das Ergebnis (200, wenn sich nichts geändert hat).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: Die Anfrage konnte nicht gelesen werden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "blocked: Die Adresse erhält keine Mailings · sending_not_enabled: Mailings werden nicht genehmigt · idempotency_in_progress: Die Anfrage ist bereits in Bearbeitung",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_media_type: Falscher Inhaltstyp",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Die Angaben sind ungültig · idempotency_key_reused: Idempotency-Key wird bereits verwendet",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/lists/{id}/members/{contact_id}": {
      "delete": {
        "operationId": "members.delete",
        "summary": "Aus Liste entfernen",
        "description": "Entfernt den Kontakt aus der Liste (eine administrative Änderung, keine Abmeldung).\n\nWenn es die Person ist, die keine Mailings mehr möchte: Verwenden Sie POST /Kontakte/{id}/abmelden.\n\nErfordert: contacts:write.",
        "tags": [
          "Mitglieder auflisten"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "contacts:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Die ID der Liste.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "example": "3f1c2a4e-8b7d-4c1e-9f0a-2d6b5e7c8a91"
            }
          },
          {
            "name": "contact_id",
            "in": "path",
            "required": true,
            "description": "Die ID des Kontakts.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,20}$",
              "example": "1042"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Entfernt (auch wenn der Kontakt kein Mitglied war)."
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "shared_contact: Der Kontakt wird geteilt · insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/fields": {
      "post": {
        "operationId": "fields.create",
        "summary": "Kontaktfeld erstellen",
        "description": "Erstellt ein Feld über dieselbe Registrierung, die von der Schnittstelle verwendet wird.\n\nErfordert: fields:write.",
        "tags": [
          "Kontaktfelder"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "fields:write"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Ein Schlüssel Ihrer Wahl (z. B. eine UUID). Der gleiche Schlüssel und der gleiche Anruf innerhalb von 24 Stunden geben erneut die gleiche Antwort, ohne dass etwas zweimal gemacht wird.",
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "key": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "text",
                      "number",
                      "date",
                      "boolean",
                      "select",
                      "email",
                      "phone",
                      "url",
                      "personnummer"
                    ]
                  },
                  "options": {
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 100
                    }
                  },
                  "required": {
                    "type": "boolean"
                  },
                  "show_in_list": {
                    "type": "boolean"
                  },
                  "purpose_confirmed": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "label",
                  "type"
                ],
                "additionalProperties": false
              },
              "example": {
                "label": "Region",
                "type": "select",
                "options": [
                  "Norr",
                  "Syd"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Das erstellte Feld.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Field"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: Die Anfrage konnte nicht gelesen werden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "limit_reached: The limit has been reached · idempotency_in_progress: Die Anfrage ist bereits in Bearbeitung",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_media_type: Falscher Inhaltstyp",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Die Angaben sind ungültig · idempotency_key_reused: Idempotency-Key wird bereits verwendet",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "fields.list",
        "summary": "Kontaktfelder auflisten",
        "description": "Die benutzerdefinierten Felder des Arbeitsbereichs, einschließlich derjenigen, die von einer Ebene darüber stammen.\n\nErfordert: fields:read.",
        "tags": [
          "Kontaktfelder"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "fields:read"
        ],
        "responses": {
          "200": {
            "description": "Alle Felder werden verwendet.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FieldList"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/fields/{id}": {
      "get": {
        "operationId": "fields.get",
        "summary": "Kontaktfeld abrufen",
        "description": "Liest die gemeinsame Felddefinition, einschließlich archivierter Felder.\n\nErfordert: fields:read.",
        "tags": [
          "Kontaktfelder"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "fields:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Die Feld-ID.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "example": "3f1c2a4e-8b7d-4c1e-9f0a-2d6b5e7c8a91"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Das Feld.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Field"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "fields.update",
        "summary": "Kontaktfeld aktualisieren",
        "description": "Aktualisiert die Definition, ohne die Feldidentität, den Schlüssel oder den Typ zu ändern.\n\nErfordert: fields:write.",
        "tags": [
          "Kontaktfelder"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "fields:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Die Feld-ID.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "example": "3f1c2a4e-8b7d-4c1e-9f0a-2d6b5e7c8a91"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "options": {
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 100
                    }
                  },
                  "required": {
                    "type": "boolean"
                  },
                  "show_in_list": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "label": "Regionstillhörighet"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Die aktualisierte Felddefinition.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Field"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: Die Anfrage konnte nicht gelesen werden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_media_type: Falscher Inhaltstyp",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Die Angaben sind ungültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "fields.delete",
        "summary": "Kontaktfeld archivieren",
        "description": "Archiviert die Definition und behält vorhandene Werte bei.\n\nErfordert: fields:write.",
        "tags": [
          "Kontaktfelder"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "fields:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Die Feld-ID.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "example": "3f1c2a4e-8b7d-4c1e-9f0a-2d6b5e7c8a91"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Das Feld ist archiviert."
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/segments": {
      "post": {
        "operationId": "segments.create",
        "summary": "Verteilerliste erstellen",
        "description": "Speichert eine gemeinsame Auswahldefinition. Erstellt keine Abonnements.\n\nErfordert: segments:write.",
        "tags": [
          "Verteilerlisten"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "segments:write"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Ein Schlüssel Ihrer Wahl (z. B. eine UUID). Der gleiche Schlüssel und der gleiche Anruf innerhalb von 24 Stunden geben erneut die gleiche Antwort, ohne dass etwas zweimal gemacht wird.",
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 1000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "rules": {}
                },
                "required": [
                  "name",
                  "rules"
                ],
                "additionalProperties": false
              },
              "example": {
                "name": "Kunder",
                "rules": {
                  "match": "all",
                  "rules": [
                    {
                      "field": "tag",
                      "op": "eq",
                      "value": "Kund"
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Die Verteilerliste.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Segment"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: Die Anfrage konnte nicht gelesen werden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "idempotency_in_progress: Die Anfrage ist bereits in Bearbeitung",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_media_type: Falscher Inhaltstyp",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Die Angaben sind ungültig · idempotency_key_reused: Idempotency-Key wird bereits verwendet",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "segments.list",
        "summary": "Verteilerlisten auflisten",
        "description": "Die Verteilerlisten des Arbeitsbereichs mit Anzahl. Die Kontakte in einem werden mit GET /contacts?segment_id= abgerufen.\n\nErfordert: segments:read.",
        "tags": [
          "Verteilerlisten"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "segments:read"
        ],
        "responses": {
          "200": {
            "description": "Alle Verteilerlisten.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SegmentList"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/segments/{id}": {
      "patch": {
        "operationId": "segments.update",
        "summary": "Verteilerliste aktualisieren",
        "description": "Aktualisiert dieselbe Auswahldefinition, die von der Schnittstelle und dem Senden verwendet wird.\n\nErfordert: segments:write.",
        "tags": [
          "Verteilerlisten"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "segments:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Die ID der Verteilerliste.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "example": "3f1c2a4e-8b7d-4c1e-9f0a-2d6b5e7c8a91"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 1000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "rules": {}
                },
                "additionalProperties": false
              },
              "example": {
                "name": "Aktuella kunder"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Die Verteilerliste.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Segment"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: Die Anfrage konnte nicht gelesen werden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_media_type: Falscher Inhaltstyp",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Die Angaben sind ungültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "segments.delete",
        "summary": "Verteilerliste löschen",
        "description": "Verhindert das Löschen, wenn die Liste von einer bevorstehenden Kampagne verwendet wird.\n\nErfordert: segments:write.",
        "tags": [
          "Verteilerlisten"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "segments:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Die ID der Verteilerliste.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "example": "3f1c2a4e-8b7d-4c1e-9f0a-2d6b5e7c8a91"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Die Verteilerliste wird gelöscht."
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "list_in_use: Die Liste wird verwendet",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "segments.get",
        "summary": "Verteilerliste abrufen",
        "description": "Eine Verteilerliste mit Zählungen.\n\nErfordert: segments:read.",
        "tags": [
          "Verteilerlisten"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "segments:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Die ID der Verteilerliste.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "example": "3f1c2a4e-8b7d-4c1e-9f0a-2d6b5e7c8a91"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Die Verteilerliste.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Segment"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/suppressions": {
      "get": {
        "operationId": "suppressions.list",
        "summary": "Unterdrückte Adressen auflisten",
        "description": "Die Unterdrückungsliste des Arbeitsbereichs, Seite für Seite. Nützlich, um einen Webshop mit Abmeldungen synchron zu halten.\n\nErfordert: contacts:read.",
        "tags": [
          "Sperrliste"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "contacts:read"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Die maximale Anzahl von Elementen in der Antwort (1–500, Standard 100).",
            "schema": {
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor aus der vorherigen Antwort für die nächste Seite. Für die erste Seite weglassen.",
            "schema": {
              "type": "string",
              "maxLength": 400
            }
          },
          {
            "name": "reason",
            "in": "query",
            "required": false,
            "description": "Nur Unterdrückungen dieser Art.",
            "schema": {
              "type": "string",
              "enum": [
                "unsubscribed",
                "bounced",
                "complained",
                "manual",
                "imported"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Eine Seite mit unterdrückten Adressen.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuppressionPage"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Die Angaben sind ungültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/stores": {
      "get": {
        "operationId": "stores.list",
        "summary": "Geschäfte auflisten",
        "description": "Die Speicher des Arbeitsbereichs mit der Angabe, wie viel jeder einzelne eingesandt hat.\n\nErfordert: ecommerce:read.",
        "tags": [
          "Geschäfte"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "ecommerce:read"
        ],
        "responses": {
          "200": {
            "description": "Alle Geschäfte.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoreList"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/stores/{store_id}": {
      "get": {
        "operationId": "stores.get",
        "summary": "Holen Sie sich den Laden",
        "description": "Ein Laden.\n\nErfordert: ecommerce:read.",
        "tags": [
          "Geschäfte"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "ecommerce:read"
        ],
        "parameters": [
          {
            "name": "store_id",
            "in": "path",
            "required": true,
            "description": "Die von Ihnen gewählte Shop-ID.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "example": "butik-se"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Der Laden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Store"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "stores.upsert",
        "summary": "Shop erstellen oder aktualisieren",
        "description": "Erstellt den Shop mit Ihrer ID oder aktualisiert ihn. Der erste Aufruf für einen Webshop.\n\nReagiert mit 201, wenn der Store erstellt wurde, und mit 200, wenn er aktualisiert wurde. Sie wählen die ID des Shops selbst (z. B. butik-se) und sie ändert sich nie: Alles andere im E-Commerce befindet sich unter /stores/{store_id}.\n\nBei Domain erhalten Links zum Shop in den Mailings des Arbeitsbereichs den Parameter qn_cid=<campaign id>. Speichern Sie es im Shop, wenn der Kunde ankommt, und senden Sie es als Kampagnen-ID bei der Bestellung. Die Bestellung zählt dann als Umsatz der Kampagne.\n\nErfordert: ecommerce:write.",
        "tags": [
          "Geschäfte"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "ecommerce:write"
        ],
        "parameters": [
          {
            "name": "store_id",
            "in": "path",
            "required": true,
            "description": "Die von Ihnen gewählte Shop-ID.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "example": "butik-se"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Der Name des Shops, wie in der App angezeigt.",
                    "example": "Exempelbutiken"
                  },
                  "domain": {
                    "description": "Die Domain des Shops, z. B. butik.se. Links dorthin (und zu Subdomains) in den Mailings des Arbeitsbereichs erhalten qn_cid=<campaign ID>, die der Shop als Campaign_id bei der Bestellung zurücksendet.",
                    "example": "butik.se",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 253
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$",
                    "description": "Die Währung des Shops (ISO 4217). Bestellungen und Warenkörbe ohne eigene Währung erhalten diese.",
                    "example": "SEK"
                  }
                },
                "required": [
                  "name",
                  "currency"
                ],
                "additionalProperties": false
              },
              "example": {
                "name": "Exempelbutiken",
                "domain": "butik.se",
                "currency": "SEK"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Der Store (201, falls er erstellt wurde).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Store"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: Die Anfrage konnte nicht gelesen werden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "limit_reached: The limit has been reached",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_media_type: Falscher Inhaltstyp",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Die Angaben sind ungültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "stores.delete",
        "summary": "Shop löschen",
        "description": "Löscht den Shop und alles darin: Kunden, Produkte, Bestellungen und Warenkörbe. Kann nicht rückgängig gemacht werden.\n\nAuch die Einnahmen der Kampagnen aus dem Store verschwinden. Die Kontakte im Arbeitsbereich werden nicht berührt.\n\nErfordert: ecommerce:write.",
        "tags": [
          "Geschäfte"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "ecommerce:write"
        ],
        "parameters": [
          {
            "name": "store_id",
            "in": "path",
            "required": true,
            "description": "Die von Ihnen gewählte Shop-ID.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "example": "butik-se"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Gelöscht."
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/stores/{store_id}/customers": {
      "get": {
        "operationId": "customers.list",
        "summary": "Kunden auflisten",
        "description": "Die Kunden des Geschäfts, Seite für Seite.\n\nErfordert: ecommerce:read.",
        "tags": [
          "Kunden"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "ecommerce:read"
        ],
        "parameters": [
          {
            "name": "store_id",
            "in": "path",
            "required": true,
            "description": "Die von Ihnen gewählte Shop-ID.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "example": "butik-se"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Die maximale Anzahl von Elementen in der Antwort (1–500, Standard 100).",
            "schema": {
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor aus der vorherigen Antwort für die nächste Seite. Für die erste Seite weglassen.",
            "schema": {
              "type": "string",
              "maxLength": 400
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "description": "Nur das, was sich seitdem geändert hat (ISO 8601).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Eine Seite mit Kunden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerPage"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Die Angaben sind ungültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/stores/{store_id}/customers/{customer_id}": {
      "get": {
        "operationId": "customers.get",
        "summary": "Kunden gewinnen",
        "description": "Ein Kunde mit der Anzahl der bezahlten Bestellungen und deren Gesamtsumme.\n\nErfordert: ecommerce:read.",
        "tags": [
          "Kunden"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "ecommerce:read"
        ],
        "parameters": [
          {
            "name": "store_id",
            "in": "path",
            "required": true,
            "description": "Die von Ihnen gewählte Shop-ID.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "example": "butik-se"
            }
          },
          {
            "name": "customer_id",
            "in": "path",
            "required": true,
            "description": "Die Kundennummer in Ihrem Shop.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._~:@-]{1,100}$",
              "example": "1042"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Der Kunde.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "customers.upsert",
        "summary": "Kunden anlegen oder aktualisieren",
        "description": "Erstellt den Kunden mit der Shop-ID oder aktualisiert ihn. Bestellungen und Warenkörbe erledigen dies selbst mit ihrem Kunden.\n\nEin Kunde wird nie zum Ansprechpartner und erhält nie Mailings, weil er einen Kauf getätigt hat. Wenn der Kunde dem Erhalt von Newslettern zugestimmt hat: Tragen Sie ihn mit POST /lists/ in eine Liste ein.{id}/Mitglieder, mit dem Nachweis der Einwilligung.\n\nFelder, die Sie auslassen, bleiben erhalten; null löscht sie. Gibt 201 zurück, wenn der Kunde erstellt wurde, und 200, wenn er aktualisiert wurde.\n\nErfordert: ecommerce:write.",
        "tags": [
          "Kunden"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "ecommerce:write"
        ],
        "parameters": [
          {
            "name": "store_id",
            "in": "path",
            "required": true,
            "description": "Die von Ihnen gewählte Shop-ID.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "example": "butik-se"
            }
          },
          {
            "name": "customer_id",
            "in": "path",
            "required": true,
            "description": "Die Kundennummer in Ihrem Shop.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._~:@-]{1,100}$",
              "example": "1042"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "maxLength": 254,
                    "description": "Die E-Mail-Adresse des Kunden.",
                    "example": "anna@example.se"
                  },
                  "first_name": {
                    "description": "Vorname.",
                    "example": "Anna",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last_name": {
                    "description": "Nachname.",
                    "example": "Svensson",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "company": {
                    "description": "Unternehmen.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "email"
                ],
                "additionalProperties": false
              },
              "example": {
                "email": "anna@example.se",
                "first_name": "Anna",
                "last_name": "Svensson"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Der Kunde (201, falls er erstellt wurde).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: Die Anfrage konnte nicht gelesen werden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_media_type: Falscher Inhaltstyp",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Die Angaben sind ungültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "customers.delete",
        "summary": "Kunde löschen",
        "description": "Löscht den Kunden und seine Warenkörbe. Die Bestellungen bleiben ohne Kunden, so dass die Einnahmen der Kampagnen korrekt bleiben.\n\nVerwenden Sie diese Option, wenn ein Kunde darum bittet, aus dem Shop gelöscht zu werden. Wenn ein Kontakt im Arbeitsbereich (DSGVO) gelöscht wird, werden Kunden mit derselben Adresse auf die gleiche Weise entfernt.\n\nErfordert: ecommerce:write.",
        "tags": [
          "Kunden"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "ecommerce:write"
        ],
        "parameters": [
          {
            "name": "store_id",
            "in": "path",
            "required": true,
            "description": "Die von Ihnen gewählte Shop-ID.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "example": "butik-se"
            }
          },
          {
            "name": "customer_id",
            "in": "path",
            "required": true,
            "description": "Die Kundennummer in Ihrem Shop.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._~:@-]{1,100}$",
              "example": "1042"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Gelöscht."
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/stores/{store_id}/products": {
      "get": {
        "operationId": "products.list",
        "summary": "Produkte auflisten",
        "description": "Die Produkte des Shops mit Varianten, Seite für Seite.\n\nErfordert: ecommerce:read.",
        "tags": [
          "Produkte"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "ecommerce:read"
        ],
        "parameters": [
          {
            "name": "store_id",
            "in": "path",
            "required": true,
            "description": "Die von Ihnen gewählte Shop-ID.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "example": "butik-se"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Die maximale Anzahl von Elementen in der Antwort (1–250, Standard 100).",
            "schema": {
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 250
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor aus der vorherigen Antwort für die nächste Seite. Für die erste Seite weglassen.",
            "schema": {
              "type": "string",
              "maxLength": 400
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "description": "Nur das, was sich seitdem geändert hat (ISO 8601).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Eine Seite mit Produkten.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductPage"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Die Angaben sind ungültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/stores/{store_id}/products/{product_id}": {
      "get": {
        "operationId": "products.get",
        "summary": "Produkt erhalten",
        "description": "Ein Produkt mit Varianten.\n\nErfordert: ecommerce:read.",
        "tags": [
          "Produkte"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "ecommerce:read"
        ],
        "parameters": [
          {
            "name": "store_id",
            "in": "path",
            "required": true,
            "description": "Die von Ihnen gewählte Shop-ID.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "example": "butik-se"
            }
          },
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "description": "Die Produkt-ID in Ihrem Shop.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._~:@-]{1,100}$",
              "example": "731"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Das Produkt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "products.upsert",
        "summary": "Produkt erstellen oder aktualisieren",
        "description": "Erstellt das Produkt mit der Shop-ID oder aktualisiert es. Wenn Varianten gesendet werden, werden alle Varianten ersetzt.\n\nFelder, die Sie auslassen, bleiben erhalten; null löscht sie. Gibt 201 zurück, wenn das Produkt erstellt wurde, und 200, wenn es aktualisiert wurde.\n\nErfordert: ecommerce:write.",
        "tags": [
          "Produkte"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "ecommerce:write"
        ],
        "parameters": [
          {
            "name": "store_id",
            "in": "path",
            "required": true,
            "description": "Die von Ihnen gewählte Shop-ID.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "example": "butik-se"
            }
          },
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "description": "Die Produkt-ID in Ihrem Shop.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._~:@-]{1,100}$",
              "example": "731"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "Der Name des Produkts.",
                    "example": "T-shirt i ekologisk bomull"
                  },
                  "url": {
                    "description": "Die Produktseite im Shop.",
                    "example": "https://butik.se/produkt/t-shirt",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2048
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "image_url": {
                    "description": "Das Bild des Produkts.",
                    "example": "https://butik.se/bilder/t-shirt.jpg",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2048
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "vendor": {
                    "description": "Hersteller oder Marke.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "product_type": {
                    "description": "Produkttyp oder Kategorie.",
                    "example": "Kläder",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "variants": {
                    "description": "Die Varianten (höchstens 100). Ersetzt beim Versand alle Varianten.",
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9._~:@-]{1,100}$",
                          "description": "Die ID der Variante in Ihrem Shop.",
                          "example": "731-blue-m"
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255,
                          "example": "Blå, M"
                        },
                        "sku": {
                          "description": "Artikelnummer.",
                          "example": "TS-BLU-M",
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "price": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 999999999999.99,
                              "description": "Preis pro Einheit.",
                              "example": 249
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "inventory_quantity": {
                          "description": "Menge auf Lager.",
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -1000000,
                              "maximum": 1000000000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "url": {
                          "description": "Die Seite der Variante.",
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 2048
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "image_url": {
                          "description": "Das Bild der Variante.",
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 2048
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "title"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "title"
                ],
                "additionalProperties": false
              },
              "example": {
                "title": "T-shirt i ekologisk bomull",
                "url": "https://butik.se/produkt/t-shirt",
                "image_url": "https://butik.se/bilder/t-shirt.jpg",
                "product_type": "Kläder",
                "variants": [
                  {
                    "id": "731-blue-m",
                    "title": "Blå, M",
                    "sku": "TS-BLU-M",
                    "price": 249,
                    "inventory_quantity": 12
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Das Produkt (201, falls es erstellt wurde).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: Die Anfrage konnte nicht gelesen werden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_media_type: Falscher Inhaltstyp",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Die Angaben sind ungültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "products.delete",
        "summary": "Produkt löschen",
        "description": "Löscht das Produkt und seine Varianten. Bestellzeilen, in denen dies erwähnt wird, bleiben bestehen.\n\nErfordert: ecommerce:write.",
        "tags": [
          "Produkte"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "ecommerce:write"
        ],
        "parameters": [
          {
            "name": "store_id",
            "in": "path",
            "required": true,
            "description": "Die von Ihnen gewählte Shop-ID.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "example": "butik-se"
            }
          },
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "description": "Die Produkt-ID in Ihrem Shop.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._~:@-]{1,100}$",
              "example": "731"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Gelöscht."
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/stores/{store_id}/orders": {
      "get": {
        "operationId": "orders.list",
        "summary": "Bestellungen auflisten",
        "description": "Die Bestellungen des Shops mit Zeilen, Seite für Seite.\n\nErfordert: ecommerce:read.",
        "tags": [
          "Bestellungen"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "ecommerce:read"
        ],
        "parameters": [
          {
            "name": "store_id",
            "in": "path",
            "required": true,
            "description": "Die von Ihnen gewählte Shop-ID.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "example": "butik-se"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Die maximale Anzahl von Elementen in der Antwort (1–250, Standard 100).",
            "schema": {
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 250
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor aus der vorherigen Antwort für die nächste Seite. Für die erste Seite weglassen.",
            "schema": {
              "type": "string",
              "maxLength": 400
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "description": "Nur die Bestellungen des Kunden (die Kunden-ID des Shops).",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "campaign_id",
            "in": "query",
            "required": false,
            "description": "Nur Bestellungen aus der Kampagne.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
            }
          },
          {
            "name": "financial_status",
            "in": "query",
            "required": false,
            "description": "Nur Bestellungen mit diesem Status.",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "paid",
                "refunded",
                "cancelled"
              ]
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "description": "Nur das, was sich seitdem geändert hat (ISO 8601).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Eine Seite mit Bestellungen.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderPage"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Die Angaben sind ungültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/stores/{store_id}/orders/{order_id}": {
      "get": {
        "operationId": "orders.get",
        "summary": "Holen Sie sich Ordnung",
        "description": "Eine Bestellung mit Linien.\n\nErfordert: ecommerce:read.",
        "tags": [
          "Bestellungen"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "ecommerce:read"
        ],
        "parameters": [
          {
            "name": "store_id",
            "in": "path",
            "required": true,
            "description": "Die von Ihnen gewählte Shop-ID.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "example": "butik-se"
            }
          },
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "description": "Die Bestell-ID in Ihrem Shop.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._~:@-]{1,100}$",
              "example": "50087"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Die Bestellung.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "orders.upsert",
        "summary": "Auftrag erstellen oder aktualisieren",
        "description": "Erstellt die Bestellung mit der Shop-ID oder aktualisiert sie – sendet die Bestellung erneut, wenn sie sich ändert (bezahlt, erstattet, storniert).\n\nDie Bestellung wird vollständig versendet: der Kunde, der Gesamtbetrag und alle Zeilen. Der Kunde wird damit angelegt bzw. aktualisiert und die Zeilen ersetzen die bisherigen. Kampagnen-ID, Finanzstatus, Währung, verarbeitetes_at und die Teilbeträge behalten ihre Werte, wenn Sie sie weglassen.\n\nNur bezahlte Bestellungen (paid) zählen in den Konditionen der Verteilerlisten als Käufe und in der Kampagnen-ID als Umsatz für die Kampagne. Teilweise Rückerstattung: Senden Sie die Bestellung erneut mit dem neuen Gesamtbetrag.\n\nReagiert mit 201, wenn die Bestellung erstellt wurde, und mit 200, wenn sie aktualisiert wurde.\n\nErfordert: ecommerce:write.",
        "tags": [
          "Bestellungen"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "ecommerce:write"
        ],
        "parameters": [
          {
            "name": "store_id",
            "in": "path",
            "required": true,
            "description": "Die von Ihnen gewählte Shop-ID.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "example": "butik-se"
            }
          },
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "description": "Die Bestell-ID in Ihrem Shop.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._~:@-]{1,100}$",
              "example": "50087"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "customer": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9._~:@-]{1,100}$",
                        "description": "Die Kundennummer in Ihrem Shop.",
                        "example": "1042"
                      },
                      "email": {
                        "type": "string",
                        "maxLength": 254,
                        "description": "Die E-Mail-Adresse des Kunden.",
                        "example": "anna@example.se"
                      },
                      "first_name": {
                        "description": "Vorname.",
                        "example": "Anna",
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 100
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "last_name": {
                        "description": "Nachname.",
                        "example": "Svensson",
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 100
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "company": {
                        "description": "Unternehmen.",
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 200
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "email"
                    ],
                    "additionalProperties": false,
                    "description": "Der Kunde. Mit der Bestellung erstellt oder aktualisiert (gleiche Regeln wie PUT /customers/{customer_id})."
                  },
                  "campaign_id": {
                    "description": "Die Kampagne, aus der der Kunde kam: der Wert von qn_cid für den Link, auf den er geklickt hat. Gilt nur für die eigenen Kampagnen des Arbeitsbereichs; Eine unbekannte ID wird nicht gespeichert (die Bestellung jedoch schon).",
                    "example": "6d1f0c3a-2b4e-4f6a-8c9d-0e1f2a3b4c5d",
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "financial_status": {
                    "description": "bezahlt: bezahlt – zählt als Kauf · ausstehend: wartet auf Zahlung · erstattet: erstattet · storniert: storniert. Standard bei Erstellung der Bestellung: bezahlt.",
                    "type": "string",
                    "enum": [
                      "pending",
                      "paid",
                      "refunded",
                      "cancelled"
                    ]
                  },
                  "currency": {
                    "description": "Standard: die Währung des Shops.",
                    "type": "string",
                    "pattern": "^[A-Z]{3}$",
                    "example": "SEK"
                  },
                  "order_total": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 999999999999.99,
                    "description": "Der Gesamtbetrag der Bestellung, einschließlich Mehrwertsteuer und Versand.",
                    "example": 548
                  },
                  "tax_total": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 999999999999.99,
                        "description": "Davon Mehrwertsteuer.",
                        "example": 109.6
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "shipping_total": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 999999999999.99,
                        "description": "Davon Versand.",
                        "example": 49
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "discount_total": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 999999999999.99,
                        "description": "Rabatt.",
                        "example": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "processed_at": {
                    "description": "Bei der Bestellung im Shop (ISO 8601). Standard beim Anlegen der Bestellung: jetzt. Senden Sie es beim Importieren alter Bestellungen.",
                    "example": "2026-10-12T14:03:00Z",
                    "type": "string"
                  },
                  "lines": {
                    "minItems": 1,
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9._~:@-]{1,100}$",
                          "description": "Die ID der Linie in Ihrem Shop.",
                          "example": "1"
                        },
                        "product_id": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9._~:@-]{1,100}$",
                          "description": "Die Produkt-ID in Ihrem Shop.",
                          "example": "731"
                        },
                        "variant_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^[A-Za-z0-9._~:@-]{1,100}$",
                              "description": "Die ID der Variante in Ihrem Shop.",
                              "example": "731-blue-m"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "title": {
                          "description": "Was gekauft wurde, wie es auf der Bestellung stand.",
                          "example": "T-shirt i ekologisk bomull, blå, M",
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 255
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "quantity": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 1000000,
                          "description": "Menge.",
                          "example": 2
                        },
                        "price": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 999999999999.99,
                          "description": "Preis pro Einheit.",
                          "example": 249
                        },
                        "discount": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 999999999999.99,
                              "description": "Rabatt auf die Linie.",
                              "example": 499
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "product_id",
                        "quantity",
                        "price"
                      ],
                      "additionalProperties": false
                    },
                    "description": "Die Zeilen der Bestellung (höchstens 500). Ersetzt alle Zeilen. Die Produkte müssen nicht eingereicht worden sein."
                  }
                },
                "required": [
                  "customer",
                  "order_total",
                  "lines"
                ],
                "additionalProperties": false
              },
              "example": {
                "customer": {
                  "id": "1042",
                  "email": "anna@example.se",
                  "first_name": "Anna",
                  "last_name": "Svensson"
                },
                "campaign_id": "6d1f0c3a-2b4e-4f6a-8c9d-0e1f2a3b4c5d",
                "financial_status": "paid",
                "currency": "SEK",
                "order_total": 548,
                "tax_total": 109.6,
                "shipping_total": 49,
                "processed_at": "2026-10-12T14:03:00Z",
                "lines": [
                  {
                    "id": "1",
                    "product_id": "731",
                    "variant_id": "731-blue-m",
                    "title": "T-shirt i ekologisk bomull, blå, M",
                    "quantity": 2,
                    "price": 249
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Die Bestellung (201, falls sie erstellt wurde).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: Die Anfrage konnte nicht gelesen werden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_media_type: Falscher Inhaltstyp",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Die Angaben sind ungültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "orders.delete",
        "summary": "Auftrag löschen",
        "description": "Löscht die Bestellung. Eine stornierte oder erstattete Bestellung sollte besser mit dem neuen Status versendet werden.\n\nErfordert: ecommerce:write.",
        "tags": [
          "Bestellungen"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "ecommerce:write"
        ],
        "parameters": [
          {
            "name": "store_id",
            "in": "path",
            "required": true,
            "description": "Die von Ihnen gewählte Shop-ID.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "example": "butik-se"
            }
          },
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "description": "Die Bestell-ID in Ihrem Shop.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._~:@-]{1,100}$",
              "example": "50087"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Gelöscht."
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/stores/{store_id}/carts": {
      "get": {
        "operationId": "carts.list",
        "summary": "Einkaufswagen auflisten",
        "description": "Die geöffneten Warenkörbe des Shops, Seite für Seite.\n\nErfordert: ecommerce:read.",
        "tags": [
          "Karren"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "ecommerce:read"
        ],
        "parameters": [
          {
            "name": "store_id",
            "in": "path",
            "required": true,
            "description": "Die von Ihnen gewählte Shop-ID.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "example": "butik-se"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Die maximale Anzahl von Elementen in der Antwort (1–250, Standard 100).",
            "schema": {
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 250
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor aus der vorherigen Antwort für die nächste Seite. Für die erste Seite weglassen.",
            "schema": {
              "type": "string",
              "maxLength": 400
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "description": "Nur das, was sich seitdem geändert hat (ISO 8601).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Eine Seite mit Einkaufswagen.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CartPage"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Die Angaben sind ungültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/stores/{store_id}/carts/{cart_id}": {
      "get": {
        "operationId": "carts.get",
        "summary": "Warenkorb holen",
        "description": "Ein Wagen mit Linien.\n\nErfordert: ecommerce:read.",
        "tags": [
          "Karren"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "ecommerce:read"
        ],
        "parameters": [
          {
            "name": "store_id",
            "in": "path",
            "required": true,
            "description": "Die von Ihnen gewählte Shop-ID.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "example": "butik-se"
            }
          },
          {
            "name": "cart_id",
            "in": "path",
            "required": true,
            "description": "Die Warenkorb-ID in Ihrem Shop.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._~:@-]{1,100}$",
              "example": "c-8812"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Der Wagen.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Cart"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "carts.upsert",
        "summary": "Warenkorb erstellen oder aktualisieren",
        "description": "Erstellt den Warenkorb mit der Shop-ID oder aktualisiert ihn. Die Zeilen ersetzen die vorherigen.\n\nEin Warenkorb gehört immer einem Kunden, der damit erstellt oder aktualisiert wird. Löschen Sie den Warenkorb, sobald daraus eine Bestellung geworden ist.\n\nErfordert: ecommerce:write.",
        "tags": [
          "Karren"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "ecommerce:write"
        ],
        "parameters": [
          {
            "name": "store_id",
            "in": "path",
            "required": true,
            "description": "Die von Ihnen gewählte Shop-ID.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "example": "butik-se"
            }
          },
          {
            "name": "cart_id",
            "in": "path",
            "required": true,
            "description": "Die Warenkorb-ID in Ihrem Shop.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._~:@-]{1,100}$",
              "example": "c-8812"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "customer": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9._~:@-]{1,100}$",
                        "description": "Die Kundennummer in Ihrem Shop.",
                        "example": "1042"
                      },
                      "email": {
                        "type": "string",
                        "maxLength": 254,
                        "description": "Die E-Mail-Adresse des Kunden.",
                        "example": "anna@example.se"
                      },
                      "first_name": {
                        "description": "Vorname.",
                        "example": "Anna",
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 100
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "last_name": {
                        "description": "Nachname.",
                        "example": "Svensson",
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 100
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "company": {
                        "description": "Unternehmen.",
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 200
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "email"
                    ],
                    "additionalProperties": false,
                    "description": "Der Kunde. Mit der Bestellung erstellt oder aktualisiert (gleiche Regeln wie PUT /customers/{customer_id})."
                  },
                  "campaign_id": {
                    "description": "Die Kampagne, aus der der Kunde kam: der Wert von qn_cid für den Link, auf den er geklickt hat. Gilt nur für die eigenen Kampagnen des Arbeitsbereichs; Eine unbekannte ID wird nicht gespeichert (die Bestellung jedoch schon).",
                    "example": "6d1f0c3a-2b4e-4f6a-8c9d-0e1f2a3b4c5d",
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "checkout_url": {
                    "description": "Die URL, unter der der Kunde den Kauf abschließen kann.",
                    "example": "https://butik.se/kassa?korg=c-8812",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2048
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "currency": {
                    "description": "Standard: die Währung des Shops.",
                    "type": "string",
                    "pattern": "^[A-Z]{3}$",
                    "example": "SEK"
                  },
                  "order_total": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 999999999999.99,
                    "description": "Der Gesamtbetrag des Warenkorbs.",
                    "example": 498
                  },
                  "tax_total": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 999999999999.99,
                        "description": "Davon Mehrwertsteuer.",
                        "example": 499
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "lines": {
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9._~:@-]{1,100}$",
                          "description": "Die ID der Linie in Ihrem Shop.",
                          "example": "1"
                        },
                        "product_id": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9._~:@-]{1,100}$",
                          "description": "Die Produkt-ID in Ihrem Shop.",
                          "example": "731"
                        },
                        "variant_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^[A-Za-z0-9._~:@-]{1,100}$",
                              "description": "Die ID der Variante in Ihrem Shop.",
                              "example": "731-blue-m"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "title": {
                          "description": "Was gekauft wurde, wie es auf der Bestellung stand.",
                          "example": "T-shirt i ekologisk bomull, blå, M",
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 255
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "quantity": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 1000000,
                          "description": "Menge.",
                          "example": 2
                        },
                        "price": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 999999999999.99,
                          "description": "Preis pro Einheit.",
                          "example": 249
                        }
                      },
                      "required": [
                        "id",
                        "product_id",
                        "quantity",
                        "price"
                      ],
                      "additionalProperties": false
                    },
                    "description": "Die Linien des Wagens. Ersetzt alle Zeilen."
                  }
                },
                "required": [
                  "customer",
                  "order_total",
                  "lines"
                ],
                "additionalProperties": false
              },
              "example": {
                "customer": {
                  "id": "1042",
                  "email": "anna@example.se"
                },
                "checkout_url": "https://butik.se/kassa?korg=c-8812",
                "order_total": 498,
                "lines": [
                  {
                    "id": "1",
                    "product_id": "731",
                    "variant_id": "731-blue-m",
                    "quantity": 2,
                    "price": 249
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Der Warenkorb (201, falls er erstellt wurde).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Cart"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: Die Anfrage konnte nicht gelesen werden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_media_type: Falscher Inhaltstyp",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Die Angaben sind ungültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "carts.delete",
        "summary": "Warenkorb löschen",
        "description": "Löscht den Warenkorb, beispielsweise wenn daraus eine Bestellung geworden ist.\n\nErfordert: ecommerce:write.",
        "tags": [
          "Karren"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "ecommerce:write"
        ],
        "parameters": [
          {
            "name": "store_id",
            "in": "path",
            "required": true,
            "description": "Die von Ihnen gewählte Shop-ID.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "example": "butik-se"
            }
          },
          {
            "name": "cart_id",
            "in": "path",
            "required": true,
            "description": "Die Warenkorb-ID in Ihrem Shop.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._~:@-]{1,100}$",
              "example": "c-8812"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Gelöscht."
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/revenue": {
      "get": {
        "operationId": "revenue.list",
        "summary": "Umsatz pro Kampagne",
        "description": "Die Kampagnen des Arbeitsbereichs mit den daraus resultierenden bezahlten Bestellungen, neueste Kampagne zuerst.\n\nEine Bestellung zählt für die Kampagne in ihrer Kampagnen-ID (qn_cid aus dem Link, auf den der Kunde geklickt hat). Die Beträge werden pro Währung summiert. seitdem und bis gelten für den Zeitpunkt der Bestellung (processed_at).\n\nErfordert: ecommerce:read.",
        "tags": [
          "Einnahmen"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "ecommerce:read"
        ],
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "Nur Bestellungen ab diesem Zeitpunkt (ISO 8601).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "description": "Nur Bestellungen vor diesem Zeitpunkt (ISO 8601).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "campaign_id",
            "in": "query",
            "required": false,
            "description": "Nur die Kampagne.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
            }
          },
          {
            "name": "store_id",
            "in": "query",
            "required": false,
            "description": "Nur die Bestellungen des Shops.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Die Kampagnen mit Umsatz (höchstens 500).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignRevenueList"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Die Angaben sind ungültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/batch": {
      "post": {
        "operationId": "batch.run",
        "summary": "Führen Sie mehrere Anrufe durch",
        "description": "Bis zu 500 Anrufe in einem, nacheinander. Useful for importing history: customers, products and orders.\n\nJede Operation ist ein gewöhnlicher Aufruf unter /api/v1 – Methode, Pfad und Text – und wird genau so geprüft und ausgeführt, als ob sie einzeln gesendet worden wäre: mit den Gültigkeitsbereichen des Schlüssels und den gleichen Fehlern. Die Antworten kommen in der gleichen Reihenfolge, mit Status und Text für jede Antwort. Ein fehlgeschlagener Vorgang stoppt die anderen nicht.\n\nFür das Minutenlimit zählt der gesamte Batch als ein Anruf, höchstens jedoch 20 Batches pro Minute und Schlüssel. Upsert mit PUT macht es sicher, einen unterbrochenen Batch erneut auszuführen; Mit Idempotency-Key erhält ein erneut gesendeter Stapel dieselbe Antwort, ohne dass er erneut ausgeführt werden muss.\n\nAlle gültigen Schlüssel.",
        "tags": [
          "Charge"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Ein Schlüssel Ihrer Wahl (z. B. eine UUID). Der gleiche Schlüssel und der gleiche Anruf innerhalb von 24 Stunden geben erneut die gleiche Antwort, ohne dass etwas zweimal gemacht wird.",
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "operations": {
                    "minItems": 1,
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "method": {
                          "type": "string",
                          "enum": [
                            "GET",
                            "POST",
                            "PUT",
                            "PATCH",
                            "DELETE"
                          ],
                          "example": "PUT"
                        },
                        "path": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2048,
                          "description": "Der Pfad unter /api/v1, mit der Abfragezeichenfolge, falls der Aufruf eine hat.",
                          "example": "/stores/butik-se/orders/50087"
                        },
                        "body": {
                          "description": "Der Anfragetext als JSON-Objekt.",
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        }
                      },
                      "required": [
                        "method",
                        "path"
                      ],
                      "additionalProperties": false
                    },
                    "description": "Die Vorgänge (höchstens 500), die nacheinander ausgeführt werden."
                  }
                },
                "required": [
                  "operations"
                ],
                "additionalProperties": false
              },
              "example": {
                "operations": [
                  {
                    "method": "PUT",
                    "path": "/stores/butik-se/products/731",
                    "body": {
                      "title": "T-shirt i ekologisk bomull",
                      "variants": [
                        {
                          "id": "731-blue-m",
                          "title": "Blå, M",
                          "price": 249
                        }
                      ]
                    }
                  },
                  {
                    "method": "PUT",
                    "path": "/stores/butik-se/orders/50087",
                    "body": {
                      "customer": {
                        "id": "1042",
                        "email": "anna@example.se"
                      },
                      "order_total": 548,
                      "processed_at": "2024-11-29T10:12:00Z",
                      "lines": [
                        {
                          "id": "1",
                          "product_id": "731",
                          "quantity": 2,
                          "price": 249
                        }
                      ]
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Die Antworten in der gleichen Reihenfolge wie die Vorgänge.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResult"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: Die Anfrage konnte nicht gelesen werden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "idempotency_in_progress: Die Anfrage ist bereits in Bearbeitung",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_media_type: Falscher Inhaltstyp",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Die Angaben sind ungültig · idempotency_key_reused: Idempotency-Key wird bereits verwendet",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/webhooks": {
      "get": {
        "operationId": "webhooks.list",
        "summary": "Webhooks auflisten",
        "description": "Die Webhooks des Arbeitsbereichs.\n\nErfordert: webhooks:read.",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "webhooks:read"
        ],
        "responses": {
          "200": {
            "description": "Alle Webhooks.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookList"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "webhooks.create",
        "summary": "Webhook erstellen",
        "description": "Ein neuer Webhook. Die Antwort enthält das Geheimnis, mit dem Lieferungen signiert werden – es wird erst jetzt angezeigt.\n\nDie URL muss https sein, sich am Standardport befinden und über das Internet erreichbar sein. Jede Lieferung ist ein POST mit JSON und dem Header Qrona-Signature; innerhalb von zehn Sekunden mit 2xx antworten. Lesen Sie mehr im Webhooks-Leitfaden.\n\nErfordert: webhooks:write.",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "webhooks:write"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Ein Schlüssel Ihrer Wahl (z. B. eine UUID). Der gleiche Schlüssel und der gleiche Anruf innerhalb von 24 Stunden geben erneut die gleiche Antwort, ohne dass etwas zweimal gemacht wird.",
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 2048,
                    "description": "Die URL, die die Ereignisse empfängt (https, Standardport, aus dem Internet erreichbar).",
                    "example": "https://butik.se/wp-json/qrona/v1/webhook"
                  },
                  "events": {
                    "minItems": 1,
                    "maxItems": 5,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "automation.step",
                        "contact.subscribed",
                        "contact.unsubscribed",
                        "contact.bounced",
                        "contact.complained"
                      ]
                    },
                    "description": "Die Ereignisse, die der Webhook empfängt: automation.step (Schritt in einem Kontaktablauf), contact.subscribed (Anmeldung), contact.unsubscribed (Abbestellen), contact.bounced (Bounce), contact.complained (Spam-Beschwerde).",
                    "example": [
                      "contact.unsubscribed",
                      "contact.bounced",
                      "contact.complained"
                    ]
                  },
                  "description": {
                    "description": "What the webhook is for.",
                    "example": "Avregistreringar till WooCommerce",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "include_api": {
                    "description": "Senden Sie auch über die API vorgenommene Änderungen. Standard: false, damit einer Integration nichts über ihre eigenen Änderungen mitgeteilt wird.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "url",
                  "events"
                ],
                "additionalProperties": false
              },
              "example": {
                "url": "https://butik.se/wp-json/qrona/v1/webhook",
                "events": [
                  "contact.unsubscribed",
                  "contact.bounced",
                  "contact.complained"
                ],
                "description": "Avregistreringar till WooCommerce"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Der neue Webhook mit dem Geheimnis.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookCreated"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: Die Anfrage konnte nicht gelesen werden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "limit_reached: The limit has been reached · idempotency_in_progress: Die Anfrage ist bereits in Bearbeitung",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_media_type: Falscher Inhaltstyp",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Die Angaben sind ungültig · idempotency_key_reused: Idempotency-Key wird bereits verwendet",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/webhooks/{id}": {
      "get": {
        "operationId": "webhooks.get",
        "summary": "Webhook abrufen",
        "description": "Ein Webhook und wie seine Lieferungen ablaufen.\n\nErfordert: webhooks:read.",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "webhooks:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Die ID des Webhooks.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "example": "5e2d9b7c-1a3f-4c6e-8d0b-2f4a6c8e0b1d"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Der Webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "webhooks.update",
        "summary": "Webhook aktualisieren",
        "description": "URL, Ereignisse und Beschreibung, oder deaktivieren und aktivieren Sie sie.\n\nEin Webhook, dessen Lieferungen 100 Mal hintereinander fehlgeschlagen sind, ist deaktiviert. Schalten Sie es mit active: true wieder ein, wenn der Empfänger funktioniert.\n\nErfordert: webhooks:write.",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "webhooks:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Die ID des Webhooks.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "example": "5e2d9b7c-1a3f-4c6e-8d0b-2f4a6c8e0b1d"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 2048,
                    "description": "Die URL, die die Ereignisse empfängt (https, Standardport, aus dem Internet erreichbar).",
                    "example": "https://butik.se/wp-json/qrona/v1/webhook"
                  },
                  "events": {
                    "minItems": 1,
                    "maxItems": 5,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "automation.step",
                        "contact.subscribed",
                        "contact.unsubscribed",
                        "contact.bounced",
                        "contact.complained"
                      ]
                    },
                    "description": "Die Ereignisse, die der Webhook empfängt: automation.step (Schritt in einem Kontaktablauf), contact.subscribed (Anmeldung), contact.unsubscribed (Abbestellen), contact.bounced (Bounce), contact.complained (Spam-Beschwerde).",
                    "example": [
                      "contact.unsubscribed",
                      "contact.bounced",
                      "contact.complained"
                    ]
                  },
                  "description": {
                    "description": "What the webhook is for.",
                    "example": "Avregistreringar till WooCommerce",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "include_api": {
                    "description": "Senden Sie auch über die API vorgenommene Änderungen. Standard: false, damit einer Integration nichts über ihre eigenen Änderungen mitgeteilt wird.",
                    "type": "boolean"
                  },
                  "active": {
                    "description": "false deaktiviert den Webhook. true aktiviert es erneut (und setzt die Anzahl der fehlgeschlagenen Lieferungen zurück).",
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "events": [
                  "contact.subscribed",
                  "contact.unsubscribed"
                ],
                "active": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Der Webhook nach der Änderung.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: Die Anfrage konnte nicht gelesen werden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_media_type: Falscher Inhaltstyp",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Die Angaben sind ungültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "webhooks.delete",
        "summary": "Webhook löschen",
        "description": "Löscht den Webhook. Ausstehende Lieferungen werden nicht versendet.\n\nErfordert: webhooks:write.",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "webhooks:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Die ID des Webhooks.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "example": "5e2d9b7c-1a3f-4c6e-8d0b-2f4a6c8e0b1d"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Gelöscht."
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/webhooks/{id}/deliveries": {
      "get": {
        "operationId": "webhooks.deliveries",
        "summary": "Lieferungen auflisten",
        "description": "Die Zustellungen des Webhooks in den letzten 30 Tagen, das Neueste zuerst: was gesendet wurde, wie der Empfänger reagiert hat und wann der nächste Versuch unternommen wird.\n\nErfordert: webhooks:read.",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "webhooks:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Die ID des Webhooks.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "example": "5e2d9b7c-1a3f-4c6e-8d0b-2f4a6c8e0b1d"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Die maximale Anzahl von Elementen in der Antwort (1–100, Standard 25).",
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor aus der vorherigen Antwort für die nächste Seite. Für die erste Seite weglassen.",
            "schema": {
              "type": "string",
              "maxLength": 400
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Nur Lieferungen mit diesem Status.",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "delivered",
                "failed"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Eine Seite mit Lieferungen.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveryPage"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Die Angaben sind ungültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/webhooks/{id}/test": {
      "post": {
        "operationId": "webhooks.test",
        "summary": "Testen Sie den Webhook",
        "description": "Sendet sofort einen Ping an die URL und antwortet mit dem Ergebnis. Nicht erneut versucht.\n\nErfordert: webhooks:write.",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "webhooks:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Die ID des Webhooks.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "example": "5e2d9b7c-1a3f-4c6e-8d0b-2f4a6c8e0b1d"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Ein Schlüssel Ihrer Wahl (z. B. eine UUID). Der gleiche Schlüssel und der gleiche Anruf innerhalb von 24 Stunden geben erneut die gleiche Antwort, ohne dass etwas zweimal gemacht wird.",
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Das Ergebnis.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookTest"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "idempotency_in_progress: Die Anfrage ist bereits in Bearbeitung",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "idempotency_key_reused: Idempotency-Key wird bereits verwendet",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/messages": {
      "post": {
        "operationId": "messages.send",
        "summary": "Nachricht senden",
        "description": "Eine Nachricht an einen Empfänger, erstellt aus der neuesten veröffentlichten Version der Vorlage und den Daten. Sofort gesendet.\n\nDie Daten werden vor dem Senden mit dem Datenvertrag der Vorlage abgeglichen. Die Nachricht behält die Vorlagenversion und den HTML-SHA-256 bei, sodass das Gesendete immer wieder angezeigt werden kann.\n\nidempotency_key ist pro Arbeitsbereich eindeutig: Derselbe Schlüssel antwortet erneut mit 200 mit der ersten Nachricht und sendet nichts Neues, sodass ein erneuter Versuch nie zu einem Duplikat wird. Der gleiche Schlüssel mit anderem Inhalt ergibt 409 idempotency_conflict.\n\nEine Nachricht, die möglicherweise nicht gesendet wird – die Adresse ist für ihre Klasse gesperrt oder das Kontingent des Monats ist aufgebraucht – wird mit dem Status unterdrückt und einem Grund gespeichert und die Empfangsnachricht.unterdrückt wird gesendet. Die Antwort ist immer noch 201.\n\nErfordert: messages:send.",
        "tags": [
          "Nachrichten"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "messages:send"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Ein Schlüssel Ihrer Wahl (z. B. eine UUID). Der gleiche Schlüssel und der gleiche Anruf innerhalb von 24 Stunden geben erneut die gleiche Antwort, ohne dass etwas zweimal gemacht wird.",
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "template": {
                    "type": "string",
                    "pattern": "^[a-z0-9][a-z0-9_.-]{1,99}$",
                    "description": "Der Schlüssel der Vorlage. Die Nachricht wird aus der neuesten veröffentlichten Version der Vorlage erstellt.",
                    "example": "byra.momsunderlag"
                  },
                  "to": {
                    "type": "object",
                    "properties": {
                      "email": {
                        "type": "string",
                        "maxLength": 254,
                        "description": "Die Adresse des Empfängers.",
                        "example": "ekonomi@klienten.se"
                      },
                      "name": {
                        "description": "Der Name des Empfängers. Füllt {{first_name}} und {{last_name}} in der Vorlage.",
                        "example": "Eva Ekonom",
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 200
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "email"
                    ],
                    "additionalProperties": false
                  },
                  "category": {
                    "type": "string",
                    "enum": [
                      "service",
                      "marketing"
                    ],
                    "description": "Dienst: Erinnerungen und Briefe innerhalb des Auftrags – gestoppt durch einen Bounce, eine Spam-Beschwerde, eine Löschung und eine manuelle Blockierung, niemals durch eine Abmeldung und hat keinen Abmeldelink. Marketing: Planungs- und Wissensbriefe – folgt den üblichen Regeln des Arbeitsbereichs, Abmeldungen und der monatlichen Obergrenze."
                  },
                  "topic": {
                    "type": "object",
                    "properties": {
                      "key": {
                        "type": "string",
                        "pattern": "^[a-z0-9][a-z0-9_.-]{0,63}$",
                        "description": "Der Schlüssel des Nachrichtentyps in Qrona. Derselbe Schlüssel ist für immer derselbe Typ.",
                        "example": "moms_punktskatt"
                      },
                      "label": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120,
                        "description": "Der Name des Typs, wie er dem Empfänger auf der Abmeldeseite angezeigt wird.",
                        "example": "Moms och punktskatt"
                      }
                    },
                    "required": [
                      "key",
                      "label"
                    ],
                    "additionalProperties": false,
                    "description": "Nur Marketing: Der Nachrichtentyp, zu dem die Nachricht gehört. Der Empfänger kann den Typ mit einem Klick selbstständig verlassen (List-Unsubscribe und die Seite) und erhält dann keine Nachrichten des Typs (Grund topic_unsubscribed) mehr, sondern die anderen Typen und Erinnerungen des Unternehmens wie bisher."
                  },
                  "test": {
                    "description": "Eine Test-E-Mail: Der Betreff beginnt mit [TEST], sie geht nur an die eigenen Adressen der Organisation (ein Mitglied oder eine Adresse in einer verifizierten Absenderdomäne), wird nie als Kunde gezählt und ihr Abmeldelink ändert nichts.",
                    "type": "boolean"
                  },
                  "data": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {},
                    "description": "Die Daten der Nachricht, bereit zur Anzeige (formatierte Beträge, ausgeschriebene Daten). Wird anhand des Datenvertrags der Vorlage überprüft.",
                    "example": {
                      "klient": {
                        "namn": "Exempel AB"
                      },
                      "period": {
                        "etikett": "september 2026",
                        "intern_deadline": "fredag 2 oktober"
                      },
                      "konsult": {
                        "namn": "Karin Konsult"
                      },
                      "knapp": {
                        "url": "https://byran.q.qrona.se/portal/underlag",
                        "text": "Ladda upp underlaget"
                      },
                      "saknas": [
                        {
                          "typ": "Kvitton",
                          "beskrivning": "Inköp med företagskortet",
                          "belopp": "4 312 kr"
                        }
                      ]
                    }
                  },
                  "idempotency_key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "pattern": "^[\\x21-\\x7e]+$",
                    "description": "Eindeutig pro Arbeitsbereich und Nachricht, z.B. die Mailing-ID in Qrona. Derselbe Schlüssel gibt erneut dieselbe Nachricht aus, niemals eine neue.",
                    "example": "occ_20261023_0042"
                  },
                  "reference": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "Qronas Referenz. Kommt in jeder Quittung zurück (Webhook).",
                    "example": "occ_20261023_0042"
                  },
                  "client_ref": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "Der Mandant der Kanzlei, pseudonym. Grundlage der Rechnung ist die Anzahl der unterschiedlichen Kunden pro Monat.",
                    "example": "kl_7f3a"
                  },
                  "reply_to": {
                    "description": "Die Antwortadresse für diese Nachricht, z.B. der Berater des Kunden. Ohne: die Add-ons.",
                    "example": "karin@byran.se",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 320
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "template",
                  "to",
                  "category",
                  "data",
                  "idempotency_key",
                  "reference",
                  "client_ref"
                ],
                "additionalProperties": false
              },
              "example": {
                "template": "byra.momsunderlag",
                "to": {
                  "email": "ekonomi@klienten.se",
                  "name": "Eva Ekonom"
                },
                "category": "service",
                "data": {
                  "klient": {
                    "namn": "Exempel AB"
                  },
                  "period": {
                    "etikett": "september 2026",
                    "intern_deadline": "fredag 2 oktober"
                  },
                  "konsult": {
                    "namn": "Karin Konsult"
                  },
                  "knapp": {
                    "url": "https://byran.q.qrona.se/portal/underlag",
                    "text": "Ladda upp underlaget"
                  },
                  "saknas": [
                    {
                      "typ": "Kvitton",
                      "beskrivning": "Inköp med företagskortet",
                      "belopp": "4 312 kr"
                    }
                  ]
                },
                "idempotency_key": "occ_20261023_0042",
                "reference": "occ_20261023_0042",
                "client_ref": "kl_7f3a"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Die Nachricht (200, wenn idempotency_key bereits mit demselben Inhalt verwendet wurde).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: Die Anfrage konnte nicht gelesen werden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "template_not_published: Die Vorlage wird nicht veröffentlicht · idempotency_conflict: idempotency_key wird bereits verwendet · sender_not_configured: Absender fehlt · sender_dmarc_missing: DMARC fehlt · sending_not_enabled: Mailings werden nicht genehmigt · idempotency_in_progress: Die Anfrage ist bereits in Bearbeitung",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_media_type: Falscher Inhaltstyp",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Die Angaben sind ungültig · idempotency_key_reused: Idempotency-Key wird bereits verwendet",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/messages/{id}": {
      "get": {
        "operationId": "messages.get",
        "summary": "Nachricht erhalten",
        "description": "Eine Nachricht und wie sie lief: gesendet, zugestellt, zurückgesendet …\n\nErfordert: messages:send.",
        "tags": [
          "Nachrichten"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "messages:send"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Die ID der Nachricht.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "example": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Die Nachricht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/messages/reach": {
      "post": {
        "operationId": "messages.reach",
        "summary": "Wen eine Nachricht erreicht",
        "description": "Pro Adresse: Was stoppt eine Nachricht jetzt und welche Nachrichtentypen hat die Adresse hinterlassen? Es wird nichts gesendet.\n\nEs gelten die gleichen Regeln wie beim Senden einer Nachricht, und zwar für viele Adressen gleichzeitig: Qrona zeigt damit an, wer was bekommt, ohne etwas zu senden. Eine Adresse, die sich nicht im Arbeitsbereich befindet, kann durch nichts gestoppt werden.\n\nErfordert: messages:send.",
        "tags": [
          "Nachrichten"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "messages:send"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Ein Schlüssel Ihrer Wahl (z. B. eine UUID). Der gleiche Schlüssel und der gleiche Anruf innerhalb von 24 Stunden geben erneut die gleiche Antwort, ohne dass etwas zweimal gemacht wird.",
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "emails": {
                    "minItems": 1,
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 254
                    },
                    "description": "Die zu überprüfenden Adressen, höchstens 500 pro Anruf. Groß- und Kleinschreibung gelten dabei als gleich.",
                    "example": [
                      "anna@klienten.se"
                    ]
                  }
                },
                "required": [
                  "emails"
                ],
                "additionalProperties": false
              },
              "example": {
                "emails": [
                  "anna@klienten.se",
                  "per@klienten.se"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Eine Zeile pro Adresse, in der Reihenfolge, in der sie gesendet wurden (ohne Duplikate).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageReach"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: Die Anfrage konnte nicht gelesen werden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "idempotency_in_progress: Die Anfrage ist bereits in Bearbeitung",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_media_type: Falscher Inhaltstyp",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Die Angaben sind ungültig · idempotency_key_reused: Idempotency-Key wird bereits verwendet",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/sender": {
      "get": {
        "operationId": "messages.sender",
        "summary": "Der Absender",
        "description": "Der Absender des Add-ons, wie eine Nachricht ihn erhält, und ob seine Domain DMARC hat – für Qronas «Live-Modus».\n\nNur zum Lesen. Der Absender wird unter Einstellungen → Add-ons gewählt, der DMARC-Eintrag unter Einstellungen → Domänen hinzugefügt.\n\nErfordert: messages:send.",
        "tags": [
          "Nachrichten"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "messages:send"
        ],
        "responses": {
          "200": {
            "description": "Der Absender, oder domain null, wenn das Add-on keinen verifizierten Absender hat.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddonSender"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/templates/{key}": {
      "get": {
        "operationId": "templates.get",
        "summary": "Holen Sie sich eine Vorlage",
        "description": "Die veröffentlichte Version der Vorlage, woher sie in der Vorlagenbibliothek von Qrona und ihren gesperrten Blöcken stammt – für Lotsens Vorlagenansicht.\n\nNur zum Lesen. Das Design wurde im Qrona Newsletter geändert.\n\nErfordert: templates:render.",
        "tags": [
          "Qrona-Vorlagen"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "templates:render"
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "description": "Der Schlüssel der Vorlage, der mit dem des Datenvertrags identisch ist.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9][a-z0-9_.-]{1,99}$",
              "example": "byra.momsunderlag"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Die Vorlage.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateStatus"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/templates/{key}/render": {
      "post": {
        "operationId": "templates.render",
        "summary": "Render-Vorlage",
        "description": "Die neueste veröffentlichte Version der Vorlage mit den Daten, genau so, wie sie gesendet werden – für die Vorschau in Qrona.\n\nDie Daten werden wie beim Senden einer Nachricht mit dem Datenvertrag der Vorlage abgeglichen. Es wird nichts gesendet und nichts aufbewahrt.\n\nErfordert: templates:render.",
        "tags": [
          "Qrona-Vorlagen"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scopes": [
          "templates:render"
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "description": "Der Schlüssel der Vorlage, der mit dem des Datenvertrags identisch ist.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9][a-z0-9_.-]{1,99}$",
              "example": "byra.momsunderlag"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Ein Schlüssel Ihrer Wahl (z. B. eine UUID). Der gleiche Schlüssel und der gleiche Anruf innerhalb von 24 Stunden geben erneut die gleiche Antwort, ohne dass etwas zweimal gemacht wird.",
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {},
                    "description": "Die Daten der Nachricht, bereit zur Anzeige (formatierte Beträge, ausgeschriebene Daten). Wird anhand des Datenvertrags der Vorlage überprüft.",
                    "example": {
                      "klient": {
                        "namn": "Exempel AB"
                      },
                      "period": {
                        "etikett": "september 2026",
                        "intern_deadline": "fredag 2 oktober"
                      },
                      "konsult": {
                        "namn": "Karin Konsult"
                      },
                      "knapp": {
                        "url": "https://byran.q.qrona.se/portal/underlag",
                        "text": "Ladda upp underlaget"
                      },
                      "saknas": [
                        {
                          "typ": "Kvitton",
                          "beskrivning": "Inköp med företagskortet",
                          "belopp": "4 312 kr"
                        }
                      ]
                    }
                  },
                  "category": {
                    "description": "Die Klasse, die die Nachricht haben soll (wie beim Senden). Ohne: Service.",
                    "type": "string",
                    "enum": [
                      "service",
                      "marketing"
                    ]
                  },
                  "to": {
                    "description": "Ein Empfänger, dem man es zeigen kann. Ohne: ein Beispielname.",
                    "type": "object",
                    "properties": {
                      "email": {
                        "type": "string",
                        "maxLength": 254,
                        "description": "Die Adresse des Empfängers.",
                        "example": "ekonomi@klienten.se"
                      },
                      "name": {
                        "description": "Der Name des Empfängers. Füllt {{first_name}} und {{last_name}} in der Vorlage.",
                        "example": "Eva Ekonom",
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 200
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "email"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "data"
                ],
                "additionalProperties": false
              },
              "example": {
                "data": {
                  "klient": {
                    "namn": "Exempel AB"
                  },
                  "knapp": {
                    "url": "https://byran.q.qrona.se/portal/underlag",
                    "text": "Ladda upp underlaget"
                  }
                },
                "category": "service"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Die gerenderte Vorlage.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RenderedMessage"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: Die Anfrage konnte nicht gelesen werden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: API-Schlüssel fehlt · invalid_key: Unbekannter API-Schlüssel · key_revoked: Der API-Schlüssel wurde widerrufen · key_expired: Der API-Schlüssel ist abgelaufen · key_inactive: Der API-Schlüssel ist nicht mehr gültig",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Abonnement erforderlich",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope: Dem Schlüssel fehlt der erforderliche Umfang · forbidden: Nicht erlaubt · workspace_suspended: Der Arbeitsbereich ist angehalten",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Nicht gefunden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "template_not_published: Die Vorlage wird nicht veröffentlicht · idempotency_in_progress: Die Anfrage ist bereits in Bearbeitung",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "unsupported_media_type: Falscher Inhaltstyp",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "validation_failed: Die Angaben sind ungültig · idempotency_key_reused: Idempotency-Key wird bereits verwendet",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: Zu viele Anfragen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "internal_error: Auf unserer Seite ist etwas schief gelaufen",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "qn_live_…",
        "description": "API-Schlüssel in der Autorisierung: Inhaber. Geltungsbereiche: contacts:read (kontakte lesen), contacts:write (kontakte bearbeiten), contacts:erase (kontakte löschen (dsgvo)), lists:read (listen lesen), lists:write (listen bearbeiten), fields:write (kontaktfeld aktualisieren), segments:write (verteilerlisten aktualisieren), fields:read (kontaktfelder lesen), segments:read (verteilerlisten lesen), ecommerce:read (lesen sie e-commerce), ecommerce:write (e-commerce bearbeiten), webhooks:read (webhooks lesen), webhooks:write (webhooks bearbeiten), messages:send (senden sie nachrichten), templates:render (nachrichten in der vorschau anzeigen)."
      }
    },
    "schemas": {
      "Problem": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "detail": {
            "type": "string"
          },
          "code": {
            "type": "string",
            "description": "The error code, for programs. Siehe Fehlercodes."
          },
          "request_id": {
            "description": "Identisch mit dem X-Request-Id-Header. Geben Sie es an, wenn Sie uns kontaktieren.",
            "type": "string"
          },
          "errors": {
            "description": "Bei validation_failed: Was ist falsch, pro Feld.",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "field",
                "message"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "code"
        ],
        "additionalProperties": false,
        "description": "Ein Fehler (application/problem+json, RFC 9457).",
        "example": {
          "type": "https://newsletter.qrona.se/developer/api/errors#validation_failed",
          "title": "Uppgifterna stämmer inte",
          "status": 422,
          "code": "validation_failed",
          "request_id": "6c0e1f5a-…",
          "errors": [
            {
              "field": "email",
              "message": "Ange en giltig e-postadress."
            }
          ]
        }
      },
      "Root": {
        "type": "object",
        "properties": {
          "api_version": {
            "type": "string"
          },
          "workspace": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": false
          },
          "key": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "prefix": {
                "type": "string"
              },
              "scopes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "contacts:read",
                    "contacts:write",
                    "contacts:erase",
                    "lists:read",
                    "lists:write",
                    "fields:read",
                    "fields:write",
                    "segments:read",
                    "segments:write",
                    "ecommerce:read",
                    "ecommerce:write",
                    "webhooks:read",
                    "webhooks:write",
                    "messages:send",
                    "templates:render"
                  ]
                }
              }
            },
            "required": [
              "id",
              "name",
              "prefix",
              "scopes"
            ],
            "additionalProperties": false
          },
          "acting_as": {
            "type": "object",
            "properties": {
              "id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "role": {
                "type": "string",
                "enum": [
                  "owner",
                  "admin",
                  "editor",
                  "viewer"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "role"
            ],
            "additionalProperties": false,
            "description": "Die Person, als die der Schlüssel fungiert, und ihre aktuelle Rolle im Arbeitsbereich. Für den Systemschlüssel von Qrona ist die ID null."
          }
        },
        "required": [
          "api_version",
          "workspace",
          "key",
          "acting_as"
        ],
        "additionalProperties": false,
        "description": "Um welchen Schlüssel es sich handelt und wo er gilt.",
        "example": {
          "api_version": "1",
          "workspace": {
            "id": "0b8f…",
            "name": "Exempel AB"
          },
          "key": {
            "id": "5d1e…",
            "name": "Webbutiken (WooCommerce)",
            "prefix": "qn_live_AbCd",
            "scopes": [
              "contacts:read",
              "contacts:write",
              "fields:read",
              "lists:read"
            ]
          },
          "acting_as": {
            "id": "7a2c…",
            "name": "Anna Svensson",
            "role": "admin"
          }
        }
      },
      "ContactPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Contact"
            }
          },
          "has_more": {
            "type": "boolean",
            "description": "Es gibt noch mehr: Rufen Sie die nächste Seite mit Cursor=next_cursor ab.",
            "example": false
          },
          "next_cursor": {
            "description": "Als Cursor für die nächste Seite senden. null auf der letzten Seite.",
            "example": null,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "additionalProperties": false,
        "description": "Eine Seite mit Kontakten."
      },
      "Contact": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Die ID des Kontakts."
          },
          "email": {
            "type": "string",
            "description": "Die E-Mail-Adresse (Kleinbuchstaben). Ändert sich nie: Einwilligungen und Unterdrückungen gelten für die Adresse."
          },
          "first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "company": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "description": "Im internationalen Format (E.164), z.B. +46701234567.",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "unsubscribed",
              "bounced",
              "complained",
              "deleted"
            ],
            "description": "aktiv: kann Mailings empfangen · abgemeldet: hat sich von allem abgemeldet · zurückgesendet: die Adresse wird zurückgesendet · beschwert: hat Spam gemeldet · gelöscht: gelöscht (DSGVO), die persönlichen Daten sind weg."
          },
          "fields": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": [
                "string",
                "number",
                "boolean"
              ]
            },
            "description": "Benutzerdefinierte Felder nach Schlüssel (siehe GET /fields). Sensible Felder, wie z. B. persönliche Identifikationsnummern, werden niemals versendet."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "source": {
            "type": "string",
            "description": "Wie der Kontakt hinzugefügt wurde: manuell, Import, Formular, API …"
          },
          "consent": {
            "type": "object",
            "properties": {
              "at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "description": "Als die Einwilligung erteilt wurde.",
                    "example": "2026-10-19T08:30:00.000Z"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "source": {
                "description": "Wie die Person zugestimmt hat, in Ihren eigenen Worten.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "at",
              "source"
            ],
            "additionalProperties": false
          },
          "suppression": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "description": "abgemeldet, zurückgesendet, reklamiert, manuell oder importiert."
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Als die Adresse unterdrückt wurde.",
                    "example": "2026-10-19T08:30:00.000Z"
                  }
                },
                "required": [
                  "reason",
                  "created_at"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "Die Unterdrückung der Adresse durch den Arbeitsbereich. Eine unterdrückte Adresse erhält unabhängig vom Status niemals Mailings."
          },
          "shared": {
            "type": "boolean",
            "description": "Von einer höheren Ebene in der Organisation freigegeben: Kann von hier aus gelesen und Mailings empfangen werden, kann aber nur dort geändert werden, wo es hingehört."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Wann der Kontakt erstellt wurde.",
            "example": "2026-10-19T08:30:00.000Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Wann der Kontakt zuletzt geändert wurde.",
            "example": "2026-10-19T08:30:00.000Z"
          },
          "unsubscribed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Wenn die Person sich abgemeldet hat.",
                "example": "2026-10-19T08:30:00.000Z"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "email",
          "first_name",
          "last_name",
          "company",
          "phone",
          "status",
          "fields",
          "tags",
          "source",
          "consent",
          "suppression",
          "shared",
          "created_at",
          "updated_at",
          "unsubscribed_at"
        ],
        "additionalProperties": false,
        "description": "Ein Kontakt (Empfänger) im Arbeitsbereich.",
        "example": {
          "id": "1042",
          "email": "anna@example.se",
          "first_name": "Anna",
          "last_name": "Svensson",
          "company": "Exempel AB",
          "phone": "+46701234567",
          "status": "active",
          "fields": {
            "kundnummer": "K-2041",
            "ort": "Göteborg"
          },
          "tags": [
            "kund",
            "vip"
          ],
          "source": "api",
          "consent": {
            "at": "2026-10-19T08:30:00.000Z",
            "source": "Kryssade i rutan i kassan på butik.se"
          },
          "suppression": null,
          "shared": false,
          "created_at": "2026-10-19T08:30:00.000Z",
          "updated_at": "2026-10-19T08:30:00.000Z",
          "unsubscribed_at": null
        }
      },
      "ContactDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Die ID des Kontakts."
          },
          "email": {
            "type": "string",
            "description": "Die E-Mail-Adresse (Kleinbuchstaben). Ändert sich nie: Einwilligungen und Unterdrückungen gelten für die Adresse."
          },
          "first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "company": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "description": "Im internationalen Format (E.164), z.B. +46701234567.",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "unsubscribed",
              "bounced",
              "complained",
              "deleted"
            ],
            "description": "aktiv: kann Mailings empfangen · abgemeldet: hat sich von allem abgemeldet · zurückgesendet: die Adresse wird zurückgesendet · beschwert: hat Spam gemeldet · gelöscht: gelöscht (DSGVO), die persönlichen Daten sind weg."
          },
          "fields": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": [
                "string",
                "number",
                "boolean"
              ]
            },
            "description": "Benutzerdefinierte Felder nach Schlüssel (siehe GET /fields). Sensible Felder, wie z. B. persönliche Identifikationsnummern, werden niemals versendet."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "source": {
            "type": "string",
            "description": "Wie der Kontakt hinzugefügt wurde: manuell, Import, Formular, API …"
          },
          "consent": {
            "type": "object",
            "properties": {
              "at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "description": "Als die Einwilligung erteilt wurde.",
                    "example": "2026-10-19T08:30:00.000Z"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "source": {
                "description": "Wie die Person zugestimmt hat, in Ihren eigenen Worten.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "at",
              "source"
            ],
            "additionalProperties": false
          },
          "suppression": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "description": "abgemeldet, zurückgesendet, reklamiert, manuell oder importiert."
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Als die Adresse unterdrückt wurde.",
                    "example": "2026-10-19T08:30:00.000Z"
                  }
                },
                "required": [
                  "reason",
                  "created_at"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "Die Unterdrückung der Adresse durch den Arbeitsbereich. Eine unterdrückte Adresse erhält unabhängig vom Status niemals Mailings."
          },
          "shared": {
            "type": "boolean",
            "description": "Von einer höheren Ebene in der Organisation freigegeben: Kann von hier aus gelesen und Mailings empfangen werden, kann aber nur dort geändert werden, wo es hingehört."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Wann der Kontakt erstellt wurde.",
            "example": "2026-10-19T08:30:00.000Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Wann der Kontakt zuletzt geändert wurde.",
            "example": "2026-10-19T08:30:00.000Z"
          },
          "unsubscribed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Wenn die Person sich abgemeldet hat.",
                "example": "2026-10-19T08:30:00.000Z"
              },
              {
                "type": "null"
              }
            ]
          },
          "lists": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "list_id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "subscribed",
                    "pending",
                    "unsubscribed"
                  ],
                  "description": "abonniert: auf der Liste · ausstehend: wartet auf Bestätigung per E-Mail · abgemeldet: hat die Liste verlassen."
                },
                "subscribed_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "description": "Wenn die Person der Liste beigetreten ist.",
                      "example": "2026-10-19T08:30:00.000Z"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "list_id",
                "name",
                "status",
                "subscribed_at"
              ],
              "additionalProperties": false
            },
            "description": "Die Listen des Arbeitsbereichs, in denen sich der Kontakt befindet. Leer für einen gemeinsamen Kontakt."
          }
        },
        "required": [
          "id",
          "email",
          "first_name",
          "last_name",
          "company",
          "phone",
          "status",
          "fields",
          "tags",
          "source",
          "consent",
          "suppression",
          "shared",
          "created_at",
          "updated_at",
          "unsubscribed_at",
          "lists"
        ],
        "additionalProperties": false,
        "description": "Ein Kontakt mit seinen Listen.",
        "example": {
          "id": "1042",
          "email": "anna@example.se",
          "first_name": "Anna",
          "last_name": "Svensson",
          "company": "Exempel AB",
          "phone": "+46701234567",
          "status": "active",
          "fields": {
            "kundnummer": "K-2041",
            "ort": "Göteborg"
          },
          "tags": [
            "kund",
            "vip"
          ],
          "source": "api",
          "consent": {
            "at": "2026-10-19T08:30:00.000Z",
            "source": "Kryssade i rutan i kassan på butik.se"
          },
          "suppression": null,
          "shared": false,
          "created_at": "2026-10-19T08:30:00.000Z",
          "updated_at": "2026-10-19T08:30:00.000Z",
          "unsubscribed_at": null,
          "lists": [
            {
              "list_id": "3f1c2a4e-8b7d-4c1e-9f0a-2d6b5e7c8a91",
              "name": "Nyhetsbrev",
              "status": "subscribed",
              "subscribed_at": "2026-10-19T08:30:00.000Z"
            }
          ]
        }
      },
      "ContactList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Contact"
            }
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "description": "Kontakte."
      },
      "ListList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/List"
            }
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "description": "Listen."
      },
      "List": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "double_opt_in": {
            "type": "boolean",
            "description": "Neuanmeldungen müssen vor dem Hinzufügen per E-Mail bestätigt werden."
          },
          "form_enabled": {
            "type": "boolean",
            "description": "Das öffentliche Anmeldeformular der Liste ist geöffnet."
          },
          "counts": {
            "type": "object",
            "properties": {
              "subscribed": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991,
                "description": "Mailings empfangen: auf der Liste, aktiv und nicht unterdrückt."
              },
              "pending": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991,
                "description": "Hat sich angemeldet, aber noch nicht bestätigt."
              },
              "unsubscribed": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "blocked": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991,
                "description": "Auf der Liste, aber nicht erreichbar: Sie springen zurück, haben eine Spam-Beschwerde eingereicht oder werden unterdrückt."
              }
            },
            "required": [
              "subscribed",
              "pending",
              "unsubscribed",
              "blocked"
            ],
            "additionalProperties": false,
            "description": "Nur die Kontakte, die die Person hinter dem Schlüssel sehen kann."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Als die Liste erstellt wurde.",
            "example": "2026-10-19T08:30:00.000Z"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "double_opt_in",
          "form_enabled",
          "counts",
          "created_at"
        ],
        "additionalProperties": false,
        "description": "Eine Liste: eine Zielgruppe mit eigenem Anmeldemodus.",
        "example": {
          "id": "3f1c2a4e-8b7d-4c1e-9f0a-2d6b5e7c8a91",
          "name": "Nyhetsbrev",
          "description": "Månadsbrevet till kunder",
          "double_opt_in": true,
          "form_enabled": true,
          "counts": {
            "subscribed": 1840,
            "pending": 12,
            "unsubscribed": 96,
            "blocked": 7
          },
          "created_at": "2026-09-01T10:00:00.000Z"
        }
      },
      "MemberPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Member"
            }
          },
          "has_more": {
            "type": "boolean",
            "description": "Es gibt noch mehr: Rufen Sie die nächste Seite mit Cursor=next_cursor ab.",
            "example": false
          },
          "next_cursor": {
            "description": "Als Cursor für die nächste Seite senden. null auf der letzten Seite.",
            "example": null,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "additionalProperties": false,
        "description": "Eine Seite mit Mitgliedern."
      },
      "Member": {
        "type": "object",
        "properties": {
          "contact_id": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "subscribed",
              "pending",
              "unsubscribed"
            ]
          },
          "contact_status": {
            "type": "string",
            "enum": [
              "active",
              "unsubscribed",
              "bounced",
              "complained",
              "deleted"
            ]
          },
          "sendable": {
            "type": "boolean",
            "description": "Empfängt derzeit Mailings an die Liste (auf der Liste, aktiv und nicht unterdrückt)."
          },
          "subscribed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Als die Person beigetreten ist.",
                "example": "2026-10-19T08:30:00.000Z"
              },
              {
                "type": "null"
              }
            ]
          },
          "unsubscribed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Als die Person die Liste verließ.",
                "example": "2026-10-19T08:30:00.000Z"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Als die Mitgliedschaft erstellt wurde.",
            "example": "2026-10-19T08:30:00.000Z"
          }
        },
        "required": [
          "contact_id",
          "email",
          "first_name",
          "last_name",
          "status",
          "contact_status",
          "sendable",
          "subscribed_at",
          "unsubscribed_at",
          "created_at"
        ],
        "additionalProperties": false,
        "description": "Die Mitgliedschaft eines Kontakts in einer Liste.",
        "example": {
          "contact_id": "1042",
          "email": "anna@example.se",
          "first_name": "Anna",
          "last_name": "Svensson",
          "status": "subscribed",
          "contact_status": "active",
          "sendable": true,
          "subscribed_at": "2026-10-19T08:30:00.000Z",
          "unsubscribed_at": null,
          "created_at": "2026-10-19T08:30:00.000Z"
        }
      },
      "Subscription": {
        "type": "object",
        "properties": {
          "list_id": {
            "type": "string"
          },
          "contact_id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "subscribed",
              "pending"
            ],
            "description": "ausstehend: Eine Bestätigungs-E-Mail wurde gesendet (oder wurde gerade gesendet) und die Person tritt bei, wenn sie bestätigt."
          },
          "confirmation_sent": {
            "type": "boolean",
            "description": "Gerade wurde eine Bestätigungs-E-Mail verschickt."
          },
          "created_contact": {
            "type": "boolean",
            "description": "Der Kontakt existierte nicht und wurde erstellt."
          }
        },
        "required": [
          "list_id",
          "contact_id",
          "status",
          "confirmation_sent",
          "created_contact"
        ],
        "additionalProperties": false,
        "description": "Das Ergebnis einer Anmeldung zu einer Liste.",
        "example": {
          "list_id": "3f1c2a4e-8b7d-4c1e-9f0a-2d6b5e7c8a91",
          "contact_id": "1042",
          "status": "pending",
          "confirmation_sent": true,
          "created_contact": true
        }
      },
      "Field": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
            "description": "Die Feld-ID.",
            "example": "3f1c2a4e-8b7d-4c1e-9f0a-2d6b5e7c8a91"
          },
          "key": {
            "type": "string",
            "description": "Der Schlüssel in Feldern eines Kontakts und in Zusammenführungsfeldern wie z {{attr.kundnummer}}."
          },
          "label": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "text",
              "number",
              "date",
              "boolean",
              "select",
              "email",
              "phone",
              "url",
              "personnummer"
            ]
          },
          "options": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Die Optionen für ein Feld vom Typ „select“."
          },
          "required": {
            "type": "boolean",
            "description": "Muss beim Erstellen eines Kontakts angegeben werden."
          },
          "sensitive": {
            "type": "boolean",
            "description": "Sensibles Feld (persönliche Identitätsnummer): kann über die API weder gelesen noch geschrieben werden."
          },
          "inherited": {
            "type": "boolean",
            "description": "Das Feld kommt von einer höheren Ebene in der Organisation."
          }
        },
        "required": [
          "id",
          "key",
          "label",
          "type",
          "options",
          "required",
          "sensitive",
          "inherited"
        ],
        "additionalProperties": false,
        "description": "Ein benutzerdefiniertes Kontaktfeld.",
        "example": {
          "id": "ae1d48b2-ea7e-4630-ad4f-597b4be6725d",
          "key": "kundnummer",
          "label": "Kundnummer",
          "type": "text",
          "options": null,
          "required": false,
          "sensitive": false,
          "inherited": false
        }
      },
      "Segment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "rules": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "match": {
                    "type": "string",
                    "enum": [
                      "all",
                      "any"
                    ]
                  },
                  "rules": {
                    "type": "array",
                    "items": {}
                  }
                },
                "required": [
                  "match",
                  "rules"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "matching": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Kontakte, die derzeit den Bedingungen entsprechen (nicht gelöscht)."
          },
          "active": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Davon: aktiv."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Als die Liste erstellt wurde.",
            "example": "2026-10-19T08:30:00.000Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Wann die Bedingungen zuletzt geändert wurden.",
            "example": "2026-10-19T08:30:00.000Z"
          }
        },
        "required": [
          "id",
          "rules",
          "name",
          "description",
          "matching",
          "active",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false,
        "description": "Eine Verteilerliste: Kontakte, die Bedingungen erfüllen.",
        "example": {
          "id": "9b2e4c1a-7d3f-4e8a-b6c5-1f0e2d3c4b5a",
          "name": "Kunder i Göteborg",
          "description": null,
          "rules": {
            "match": "all",
            "rules": [
              {
                "field": "tag",
                "op": "eq",
                "value": "Kund"
              }
            ]
          },
          "matching": 412,
          "active": 398,
          "created_at": "2026-09-12T09:00:00.000Z",
          "updated_at": "2026-10-02T14:20:00.000Z"
        }
      },
      "FieldList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Field"
            }
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "description": "Kontaktfelder."
      },
      "SegmentList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Segment"
            }
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "description": "Verteilerlisten."
      },
      "SuppressionPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Suppression"
            }
          },
          "has_more": {
            "type": "boolean",
            "description": "Es gibt noch mehr: Rufen Sie die nächste Seite mit Cursor=next_cursor ab.",
            "example": false
          },
          "next_cursor": {
            "description": "Als Cursor für die nächste Seite senden. null auf der letzten Seite.",
            "example": null,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "additionalProperties": false,
        "description": "Eine Seite mit unterdrückten Adressen."
      },
      "Suppression": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "reason": {
            "type": "string",
            "description": "abgemeldet, zurückgesendet, reklamiert, manuell oder importiert."
          },
          "detail": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Als die Adresse unterdrückt wurde.",
            "example": "2026-10-19T08:30:00.000Z"
          },
          "contact_id": {
            "description": "Der Kontakt mit der Adresse, falls vorhanden, die der Schlüssel sehen kann.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "email",
          "reason",
          "detail",
          "created_at",
          "contact_id"
        ],
        "additionalProperties": false,
        "description": "Eine Adresse, an die der Arbeitsbereich niemals sendet.",
        "example": {
          "email": "nej-tack@example.se",
          "reason": "unsubscribed",
          "detail": "Avregistrerad via länk",
          "created_at": "2026-10-01T07:00:00.000Z",
          "contact_id": "877"
        }
      },
      "StoreList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Store"
            }
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "description": "Geschäfte."
      },
      "Store": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Die ID des Geschäfts."
          },
          "name": {
            "type": "string"
          },
          "domain": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": "string"
          },
          "counts": {
            "type": "object",
            "properties": {
              "customers": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "products": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "orders": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "carts": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "customers",
              "products",
              "orders",
              "carts"
            ],
            "additionalProperties": false,
            "description": "Wie viel der Laden eingesandt hat."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Als der Shop erstellt wurde.",
            "example": "2026-10-19T08:30:00.000Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Wann der Shop das letzte Mal geändert wurde.",
            "example": "2026-10-19T08:30:00.000Z"
          }
        },
        "required": [
          "id",
          "name",
          "domain",
          "currency",
          "counts",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false,
        "description": "Ein Webshop im Arbeitsbereich.",
        "example": {
          "id": "butik-se",
          "name": "Exempelbutiken",
          "domain": "butik.se",
          "currency": "SEK",
          "counts": {
            "customers": 1840,
            "products": 312,
            "orders": 5120,
            "carts": 14
          },
          "created_at": "2026-10-19T08:30:00.000Z",
          "updated_at": "2026-10-19T08:30:00.000Z"
        }
      },
      "CustomerPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Customer"
            }
          },
          "has_more": {
            "type": "boolean",
            "description": "Es gibt noch mehr: Rufen Sie die nächste Seite mit Cursor=next_cursor ab.",
            "example": false
          },
          "next_cursor": {
            "description": "Als Cursor für die nächste Seite senden. null auf der letzten Seite.",
            "example": null,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "additionalProperties": false,
        "description": "Eine Seite mit Kunden."
      },
      "Customer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "company": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact_id": {
            "description": "Der Kontakt des Arbeitsbereichs mit derselben Adresse, sofern vorhanden. Ein Kunde wird nie von alleine zum Ansprechpartner.",
            "type": [
              "string",
              "null"
            ]
          },
          "orders_count": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Bezahlte Bestellungen."
          },
          "total_spent": {
            "type": "number",
            "description": "Die Summe der bezahlten Bestellungen."
          },
          "last_order_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Die letzte bezahlte Bestellung.",
                "example": "2026-10-19T08:30:00.000Z"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Als der Kunde zum ersten Mal eingeschickt wurde.",
            "example": "2026-10-19T08:30:00.000Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Wann der Kunde zuletzt geändert wurde.",
            "example": "2026-10-19T08:30:00.000Z"
          }
        },
        "required": [
          "id",
          "email",
          "first_name",
          "last_name",
          "company",
          "contact_id",
          "orders_count",
          "total_spent",
          "last_order_at",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false,
        "description": "Ein Kunde im Geschäft – jemand, der einen Kauf getätigt hat, mit oder ohne Zustimmung zu Mailings.",
        "example": {
          "id": "1042",
          "email": "anna@example.se",
          "first_name": "Anna",
          "last_name": "Svensson",
          "company": null,
          "contact_id": "877",
          "orders_count": 3,
          "total_spent": 1847,
          "last_order_at": "2026-10-12T14:03:00.000Z",
          "created_at": "2026-03-02T09:00:00.000Z",
          "updated_at": "2026-10-12T14:03:00.000Z"
        }
      },
      "ProductPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Product"
            }
          },
          "has_more": {
            "type": "boolean",
            "description": "Es gibt noch mehr: Rufen Sie die nächste Seite mit Cursor=next_cursor ab.",
            "example": false
          },
          "next_cursor": {
            "description": "Als Cursor für die nächste Seite senden. null auf der letzten Seite.",
            "example": null,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "additionalProperties": false,
        "description": "Eine Seite mit Produkten."
      },
      "Product": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "image_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "vendor": {
            "type": [
              "string",
              "null"
            ]
          },
          "product_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "variants": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "sku": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "price": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "inventory_quantity": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "url": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "image_url": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "title",
                "sku",
                "price",
                "inventory_quantity",
                "url",
                "image_url"
              ],
              "additionalProperties": false
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Als das Produkt zum ersten Mal eingeschickt wurde.",
            "example": "2026-10-19T08:30:00.000Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Wann das Produkt zuletzt geändert wurde.",
            "example": "2026-10-19T08:30:00.000Z"
          }
        },
        "required": [
          "id",
          "title",
          "url",
          "image_url",
          "vendor",
          "product_type",
          "variants",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false,
        "description": "Ein Produkt im Shop, mit Varianten.",
        "example": {
          "id": "731",
          "title": "T-shirt i ekologisk bomull",
          "url": "https://butik.se/produkt/t-shirt",
          "image_url": "https://butik.se/bilder/t-shirt.jpg",
          "vendor": null,
          "product_type": "Kläder",
          "variants": [
            {
              "id": "731-blue-m",
              "title": "Blå, M",
              "sku": "TS-BLU-M",
              "price": 249,
              "inventory_quantity": 12,
              "url": null,
              "image_url": null
            }
          ],
          "created_at": "2026-10-19T08:30:00.000Z",
          "updated_at": "2026-10-19T08:30:00.000Z"
        }
      },
      "OrderPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Order"
            }
          },
          "has_more": {
            "type": "boolean",
            "description": "Es gibt noch mehr: Rufen Sie die nächste Seite mit Cursor=next_cursor ab.",
            "example": false
          },
          "next_cursor": {
            "description": "Als Cursor für die nächste Seite senden. null auf der letzten Seite.",
            "example": null,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "additionalProperties": false,
        "description": "Eine Seite mit Bestellungen."
      },
      "Order": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "customer": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "email"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "null, wenn der Kunde gelöscht wurde: Die Bestellung zählt weiterhin zum Umsatz der Kampagne."
          },
          "campaign_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "financial_status": {
            "type": "string",
            "enum": [
              "pending",
              "paid",
              "refunded",
              "cancelled"
            ]
          },
          "currency": {
            "type": "string"
          },
          "order_total": {
            "type": "number"
          },
          "tax_total": {
            "type": [
              "number",
              "null"
            ]
          },
          "shipping_total": {
            "type": [
              "number",
              "null"
            ]
          },
          "discount_total": {
            "type": [
              "number",
              "null"
            ]
          },
          "processed_at": {
            "type": "string",
            "format": "date-time",
            "description": "Als die Bestellung aufgegeben wurde.",
            "example": "2026-10-19T08:30:00.000Z"
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "product_id": {
                  "type": "string"
                },
                "variant_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "title": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "quantity": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "price": {
                  "type": "number"
                },
                "discount": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "product_id",
                "variant_id",
                "title",
                "quantity",
                "price",
                "discount"
              ],
              "additionalProperties": false
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Als die Bestellung zum ersten Mal eingeschickt wurde.",
            "example": "2026-10-19T08:30:00.000Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Wann die Bestellung zuletzt geändert wurde.",
            "example": "2026-10-19T08:30:00.000Z"
          }
        },
        "required": [
          "id",
          "customer",
          "campaign_id",
          "financial_status",
          "currency",
          "order_total",
          "tax_total",
          "shipping_total",
          "discount_total",
          "processed_at",
          "lines",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false,
        "description": "Eine Bestellung im Laden.",
        "example": {
          "id": "50087",
          "customer": {
            "id": "1042",
            "email": "anna@example.se"
          },
          "campaign_id": "6d1f0c3a-2b4e-4f6a-8c9d-0e1f2a3b4c5d",
          "financial_status": "paid",
          "currency": "SEK",
          "order_total": 548,
          "tax_total": 109.6,
          "shipping_total": 49,
          "discount_total": 0,
          "processed_at": "2026-10-12T14:03:00.000Z",
          "lines": [
            {
              "id": "1",
              "product_id": "731",
              "variant_id": "731-blue-m",
              "title": "T-shirt i ekologisk bomull, blå, M",
              "quantity": 2,
              "price": 249,
              "discount": null
            }
          ],
          "created_at": "2026-10-12T14:03:05.000Z",
          "updated_at": "2026-10-12T14:03:05.000Z"
        }
      },
      "CartPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Cart"
            }
          },
          "has_more": {
            "type": "boolean",
            "description": "Es gibt noch mehr: Rufen Sie die nächste Seite mit Cursor=next_cursor ab.",
            "example": false
          },
          "next_cursor": {
            "description": "Als Cursor für die nächste Seite senden. null auf der letzten Seite.",
            "example": null,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "additionalProperties": false,
        "description": "Eine Seite mit Einkaufswagen."
      },
      "Cart": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "customer": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "email": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "email"
            ],
            "additionalProperties": false
          },
          "campaign_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "checkout_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": "string"
          },
          "order_total": {
            "type": "number"
          },
          "tax_total": {
            "type": [
              "number",
              "null"
            ]
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "product_id": {
                  "type": "string"
                },
                "variant_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "title": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "quantity": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "price": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "product_id",
                "variant_id",
                "title",
                "quantity",
                "price"
              ],
              "additionalProperties": false
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Als der Warenkorb zum ersten Mal eingeschickt wurde.",
            "example": "2026-10-19T08:30:00.000Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Wann der Warenkorb zuletzt geändert wurde.",
            "example": "2026-10-19T08:30:00.000Z"
          }
        },
        "required": [
          "id",
          "customer",
          "campaign_id",
          "checkout_url",
          "currency",
          "order_total",
          "tax_total",
          "lines",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false,
        "description": "Ein offener Einkaufswagen.",
        "example": {
          "id": "c-8812",
          "customer": {
            "id": "1042",
            "email": "anna@example.se"
          },
          "campaign_id": null,
          "checkout_url": "https://butik.se/kassa?korg=c-8812",
          "currency": "SEK",
          "order_total": 498,
          "tax_total": 99.6,
          "lines": [
            {
              "id": "1",
              "product_id": "731",
              "variant_id": "731-blue-m",
              "title": "T-shirt i ekologisk bomull, blå, M",
              "quantity": 2,
              "price": 249
            }
          ],
          "created_at": "2026-10-19T08:30:00.000Z",
          "updated_at": "2026-10-19T08:30:00.000Z"
        }
      },
      "CampaignRevenueList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CampaignRevenue"
            }
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "description": "Kampagnen mit Umsatz."
      },
      "CampaignRevenue": {
        "type": "object",
        "properties": {
          "campaign_id": {
            "type": "string"
          },
          "campaign_name": {
            "type": "string"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Als die Kampagne mit dem Senden begann.",
                "example": "2026-10-19T08:30:00.000Z"
              },
              {
                "type": "null"
              }
            ]
          },
          "orders": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Bezahlte Bestellungen aus der Kampagne."
          },
          "revenue": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "currency": {
                  "type": "string"
                },
                "amount": {
                  "type": "number"
                },
                "orders": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "currency",
                "amount",
                "orders"
              ],
              "additionalProperties": false
            },
            "description": "Umsatz pro Währung."
          }
        },
        "required": [
          "campaign_id",
          "campaign_name",
          "started_at",
          "orders",
          "revenue"
        ],
        "additionalProperties": false,
        "description": "Der Umsatz einer Kampagne: die bezahlten Bestellungen, die über ihre Links eingingen.",
        "example": {
          "campaign_id": "6d1f0c3a-2b4e-4f6a-8c9d-0e1f2a3b4c5d",
          "campaign_name": "Höstrean",
          "started_at": "2026-10-10T07:00:00.000Z",
          "orders": 41,
          "revenue": [
            {
              "currency": "SEK",
              "amount": 28640,
              "orders": 41
            }
          ]
        }
      },
      "BatchResult": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991,
                  "description": "Der HTTP-Status des Vorgangs."
                },
                "body": {
                  "description": "Die Antwort des Vorgangs: die übliche Antwort, ein Fehler (problem+json) oder null (204)."
                }
              },
              "required": [
                "status",
                "body"
              ],
              "additionalProperties": false
            }
          },
          "succeeded": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "failed": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "results",
          "succeeded",
          "failed"
        ],
        "additionalProperties": false,
        "description": "Die Antworten in der gleichen Reihenfolge wie die Vorgänge.",
        "example": {
          "results": [
            {
              "status": 201,
              "body": {
                "id": "50087",
                "financial_status": "paid",
                "order_total": 548
              }
            },
            {
              "status": 422,
              "body": {
                "type": "https://newsletter.qrona.se/developer/api/errors#validation_failed",
                "status": 422,
                "code": "validation_failed",
                "errors": [
                  {
                    "field": "lines",
                    "message": "En order har minst en rad."
                  }
                ]
              }
            }
          ],
          "succeeded": 1,
          "failed": 1
        }
      },
      "WebhookList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Webhook"
            }
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "description": "Webhooks."
      },
      "Webhook": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "automation.step",
                "contact.subscribed",
                "contact.unsubscribed",
                "contact.bounced",
                "contact.complained"
              ]
            }
          },
          "include_api": {
            "type": "boolean"
          },
          "active": {
            "type": "boolean"
          },
          "disabled_reason": {
            "description": "Warum sich der Webhook selbst deaktiviert hat (die Lieferungen sind fehlgeschlagen) oder null.",
            "type": [
              "string",
              "null"
            ]
          },
          "consecutive_failures": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Fehlgeschlagene Zustellversuche in Folge."
          },
          "last_success_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Die letzte erfolgreiche Lieferung.",
                "example": "2026-10-19T08:30:00.000Z"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_failure_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Der jüngste gescheiterte Versuch.",
                "example": "2026-10-19T08:30:00.000Z"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Wann der Webhook erstellt wurde.",
            "example": "2026-10-19T08:30:00.000Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Wann der Webhook zuletzt geändert wurde.",
            "example": "2026-10-19T08:30:00.000Z"
          }
        },
        "required": [
          "id",
          "url",
          "description",
          "events",
          "include_api",
          "active",
          "disabled_reason",
          "consecutive_failures",
          "last_success_at",
          "last_failure_at",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false,
        "description": "Ein Webhook: eine URL, die die Ereignisse des Arbeitsbereichs empfängt.",
        "example": {
          "id": "5e2d9b7c-1a3f-4c6e-8d0b-2f4a6c8e0b1d",
          "url": "https://butik.se/wp-json/qrona/v1/webhook",
          "description": "Avregistreringar till WooCommerce",
          "events": [
            "contact.bounced",
            "contact.complained",
            "contact.unsubscribed"
          ],
          "include_api": false,
          "active": true,
          "disabled_reason": null,
          "consecutive_failures": 0,
          "last_success_at": "2026-10-19T08:31:00.000Z",
          "last_failure_at": null,
          "created_at": "2026-10-19T08:30:00.000Z",
          "updated_at": "2026-10-19T08:30:00.000Z"
        }
      },
      "WebhookCreated": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "automation.step",
                "contact.subscribed",
                "contact.unsubscribed",
                "contact.bounced",
                "contact.complained"
              ]
            }
          },
          "include_api": {
            "type": "boolean"
          },
          "active": {
            "type": "boolean"
          },
          "disabled_reason": {
            "description": "Warum sich der Webhook selbst deaktiviert hat (die Lieferungen sind fehlgeschlagen) oder null.",
            "type": [
              "string",
              "null"
            ]
          },
          "consecutive_failures": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Fehlgeschlagene Zustellversuche in Folge."
          },
          "last_success_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Die letzte erfolgreiche Lieferung.",
                "example": "2026-10-19T08:30:00.000Z"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_failure_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Der jüngste gescheiterte Versuch.",
                "example": "2026-10-19T08:30:00.000Z"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Wann der Webhook erstellt wurde.",
            "example": "2026-10-19T08:30:00.000Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Wann der Webhook zuletzt geändert wurde.",
            "example": "2026-10-19T08:30:00.000Z"
          },
          "secret": {
            "type": "string",
            "description": "Das Geheimnis, mit dem die Lieferungen signiert werden (Qrona-Signatur). Wird jetzt nur angezeigt – bewahren Sie es mit dem Empfänger auf."
          }
        },
        "required": [
          "id",
          "url",
          "description",
          "events",
          "include_api",
          "active",
          "disabled_reason",
          "consecutive_failures",
          "last_success_at",
          "last_failure_at",
          "created_at",
          "updated_at",
          "secret"
        ],
        "additionalProperties": false,
        "description": "Der neue Webhook mit dem Geheimnis.",
        "example": {
          "id": "5e2d9b7c-1a3f-4c6e-8d0b-2f4a6c8e0b1d",
          "url": "https://butik.se/wp-json/qrona/v1/webhook",
          "description": "Avregistreringar till WooCommerce",
          "events": [
            "contact.bounced",
            "contact.complained",
            "contact.unsubscribed"
          ],
          "include_api": false,
          "active": true,
          "disabled_reason": null,
          "consecutive_failures": 0,
          "last_success_at": "2026-10-19T08:31:00.000Z",
          "last_failure_at": null,
          "created_at": "2026-10-19T08:30:00.000Z",
          "updated_at": "2026-10-19T08:30:00.000Z",
          "secret": "whsec_…"
        }
      },
      "WebhookDeliveryPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookDelivery"
            }
          },
          "has_more": {
            "type": "boolean",
            "description": "Es gibt noch mehr: Rufen Sie die nächste Seite mit Cursor=next_cursor ab.",
            "example": false
          },
          "next_cursor": {
            "description": "Als Cursor für die nächste Seite senden. null auf der letzten Seite.",
            "example": null,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "additionalProperties": false,
        "description": "Eine Seite mit Lieferungen."
      },
      "WebhookDelivery": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Die ID der Lieferung (der Qrona-Delivery-Header)."
          },
          "event_id": {
            "type": "string",
            "description": "Die ID des Ereignisses (ID im Textkörper): ist in allen Webhooks, die das Ereignis empfangen, gleich."
          },
          "type": {
            "type": "string",
            "description": "Das Ereignis oder ein Ping für einen Test."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "delivered",
              "failed"
            ],
            "description": "ausstehend: Warten auf einen (neuen) Versuch · zugestellt: Der Empfänger hat 2xx geantwortet · fehlgeschlagen: aufgegeben."
          },
          "attempts": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "response_status": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "Der HTTP-Status des Empfängers beim letzten Versuch."
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "next_attempt_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Nächster Versuch.",
                "example": "2026-10-19T08:30:00.000Z"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Als das Ereignis passierte.",
            "example": "2026-10-19T08:30:00.000Z"
          },
          "delivered_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Als es geliefert wurde.",
                "example": "2026-10-19T08:30:00.000Z"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "event_id",
          "type",
          "status",
          "attempts",
          "response_status",
          "error",
          "next_attempt_at",
          "created_at",
          "delivered_at"
        ],
        "additionalProperties": false,
        "description": "Ein an einen Webhook gesendetes Ereignis.",
        "example": {
          "id": "9a8b7c6d-5e4f-4a3b-2c1d-0e9f8a7b6c5d",
          "event_id": "7f3c1a2e-5b4d-4e6f-8a9b-0c1d2e3f4a5b",
          "type": "contact.unsubscribed",
          "status": "delivered",
          "attempts": 1,
          "response_status": 200,
          "error": null,
          "next_attempt_at": null,
          "created_at": "2026-10-19T08:30:00.000Z",
          "delivered_at": "2026-10-19T08:30:04.000Z"
        }
      },
      "WebhookTest": {
        "type": "object",
        "properties": {
          "delivery_id": {
            "type": "string"
          },
          "ok": {
            "type": "boolean",
            "description": "Der Empfänger antwortete 2xx."
          },
          "response_status": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "delivery_id",
          "ok",
          "response_status",
          "error"
        ],
        "additionalProperties": false,
        "description": "Das Ergebnis eines Tests.",
        "example": {
          "delivery_id": "1b2c3d4e-5f6a-4b7c-8d9e-0f1a2b3c4d5e",
          "ok": true,
          "response_status": 200,
          "error": null
        }
      },
      "Message": {
        "type": "object",
        "properties": {
          "message_id": {
            "type": "string",
            "description": "Die ID der Nachricht."
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "sending",
              "sent",
              "delivered",
              "bounced",
              "complained",
              "failed",
              "suppressed"
            ],
            "description": "In der Warteschlange: Wartet auf einen weiteren Versuch. · Gesendet: an den sendenden Dienst übergeben."
          },
          "reason": {
            "description": "Warum eine Nachricht nicht gesendet wurde: „unzustellbar“, „beschwert“, „manuell“, „gelöscht“, „abbestellt“ (nur Marketing), „topic_unsubscribed“ (nur Marketing mit einem Thema), „service_limit“, „monthly_cap“ oder „Zahlung“.",
            "type": [
              "string",
              "null"
            ]
          },
          "template": {
            "type": "string"
          },
          "template_version": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Die Vorlagenversion, aus der die Nachricht erstellt wurde. Veröffentlichte Versionen ändern sich nie."
          },
          "html_sha256": {
            "type": "string",
            "description": "SHA-256 des HTML-Codes, den der Empfänger erhalten hat."
          },
          "category": {
            "type": "string",
            "enum": [
              "service",
              "marketing"
            ]
          },
          "topic": {
            "description": "Der Schlüssel des Nachrichtentyps oder null.",
            "type": [
              "string",
              "null"
            ]
          },
          "test": {
            "type": "boolean",
            "description": "Eine Test-E-Mail."
          },
          "reference": {
            "type": "string"
          },
          "client_ref": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Wann die Nachricht empfangen wurde.",
            "example": "2026-10-23T08:30:00.000Z"
          }
        },
        "required": [
          "message_id",
          "status",
          "reason",
          "template",
          "template_version",
          "html_sha256",
          "category",
          "topic",
          "test",
          "reference",
          "client_ref",
          "created_at"
        ],
        "additionalProperties": false,
        "description": "Eine Nachricht an einen Empfänger.",
        "example": {
          "message_id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
          "status": "sent",
          "reason": null,
          "template": "byra.momsunderlag",
          "template_version": 3,
          "html_sha256": "f3b1c2d4e5a6978812345678909abcdef0123456789abcdef0123456789abcde",
          "category": "service",
          "topic": null,
          "test": false,
          "reference": "occ_20261023_0042",
          "client_ref": "kl_7f3a",
          "created_at": "2026-10-23T08:30:00.000Z"
        }
      },
      "MessageReach": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "email": {
                  "type": "string",
                  "description": "Die Adresse in Kleinbuchstaben."
                },
                "marketing": {
                  "description": "Was stoppt eine Marketing-Nachricht an die Adresse jetzt: abgemeldet, zurückgesendet, beanstandet, manuell, importiert oder gelöscht. null: nichts hält es auf.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "service": {
                  "description": "Was stoppt eine Service-Nachricht an die Adresse jetzt: zurückgesendet, beanstandet, manuell, importiert oder gelöscht (eine Abmeldung stoppt sie nie). null: nichts hält es auf.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "topics_left": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "key": {
                        "type": "string",
                        "description": "Der Schlüssel des Nachrichtentyps."
                      },
                      "label": {
                        "type": "string",
                        "description": "Der Name des Typs, als die Adresse ihn verließ."
                      },
                      "left_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "Wenn die Adresse den Typ verlassen hat.",
                        "example": "2026-10-23T08:30:00.000Z"
                      }
                    },
                    "required": [
                      "key",
                      "label",
                      "left_at"
                    ],
                    "additionalProperties": false
                  },
                  "description": "Die Nachrichtentypen, die die Adresse hinterlassen hat. Eine Marketingbotschaft dieser Art wird mit dem Grund topic_unsubscribed als unterdrückt gehalten."
                }
              },
              "required": [
                "email",
                "marketing",
                "service",
                "topics_left"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false,
        "description": "Wen eine Nachricht erreichen würde: pro Adresse, was sie jetzt stoppt und welche Nachrichtentypen die Adresse hinterlassen hat.",
        "example": {
          "data": [
            {
              "email": "anna@klienten.se",
              "marketing": null,
              "service": null,
              "topics_left": [
                {
                  "key": "moms_punktskatt",
                  "label": "Moms och punktskatt",
                  "left_at": "2026-11-22T09:14:00.000Z"
                }
              ]
            },
            {
              "email": "per@klienten.se",
              "marketing": "unsubscribed",
              "service": null,
              "topics_left": []
            }
          ]
        }
      },
      "AddonSender": {
        "type": "object",
        "properties": {
          "addon": {
            "type": "string",
            "description": "Das Add-on, zu dem der Systemschlüssel gehört."
          },
          "domain": {
            "description": "Die Absenderdomäne. null: Das Add-on hat keinen verifizierten Absender, und es wird nichts gesendet.",
            "type": [
              "string",
              "null"
            ]
          },
          "address": {
            "description": "Die Absenderadresse.",
            "type": [
              "string",
              "null"
            ]
          },
          "from_name": {
            "description": "Der Absendername.",
            "type": [
              "string",
              "null"
            ]
          },
          "reply_to": {
            "description": "Die Antwortadresse, falls eine gewählt ist.",
            "type": [
              "string",
              "null"
            ]
          },
          "dmarc": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "ok",
                      "missing",
                      "unknown"
                    ],
                    "description": "ok: Die Domain (oder ihre Organisationsdomain) hat einen DMARC-Eintrag. missing: kein Eintrag, und es werden keine Marketingnachrichten gesendet (sender_dmarc_missing). unknown: Die Abfrage hat gerade keine Antwort geliefert."
                  },
                  "found_at": {
                    "description": "Die Domain, auf der der Eintrag liegt: die Absenderdomäne selbst oder ihre Organisationsdomain. null ohne Eintrag.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "state",
                  "found_at"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "DMARC für die Absenderdomäne. null ohne Absender."
          }
        },
        "required": [
          "addon",
          "domain",
          "address",
          "from_name",
          "reply_to",
          "dmarc"
        ],
        "additionalProperties": false,
        "description": "Der Absender des Add-ons, wie eine Nachricht ihn erhält, und ob seine Domain DMARC hat.",
        "example": {
          "addon": "byra-klientkommunikation",
          "domain": "byran.se",
          "address": "nyheter@byran.se",
          "from_name": "Byrån",
          "reply_to": null,
          "dmarc": {
            "state": "ok",
            "found_at": "byran.se"
          }
        }
      },
      "TemplateStatus": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Die ID der Vorlage im Qrona Newsletter (die Seite /templates/{id})."
          },
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "published_version": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "Die Version, aus der eine Nachricht jetzt erstellt wird. null: nicht veröffentlicht."
          },
          "updated_at": {
            "type": "string"
          },
          "draft_changed": {
            "type": "boolean",
            "description": "Der Entwurf weicht von der veröffentlichten Version ab: Änderungen, die noch nicht veröffentlicht wurden."
          },
          "origin": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "library_version": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991,
                    "description": "Die Version in der Vorlagenbibliothek von Qrona, aus der die Kopie stammt oder die zuletzt erstellt wurde."
                  },
                  "pending_version": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Eine neuere Version von Qrona wartet auf Überprüfung."
                  },
                  "kept_version": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Eine neuere Version von Qrona, die das Unternehmen ablehnte („Behalte meine“)."
                  },
                  "untouched": {
                    "type": "boolean",
                    "description": "Das Unternehmen hat die Kopie nicht verändert: Sie folgt eigenständig den Versionen von Qrona."
                  }
                },
                "required": [
                  "library_version",
                  "pending_version",
                  "kept_version",
                  "untouched"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "Woher die Vorlage stammt. null: die unternehmenseigene Vorlage."
          },
          "locked": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "text": {
                  "type": "string",
                  "description": "Der Text des Blocks ohne Formatierung, wobei die Felder der Vorlage beibehalten werden ({{data.klient.namn}})."
                },
                "when": {
                  "description": "Das Feld, mit dem der Block nur angezeigt wird („Nur anzeigen, wenn“).",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "type",
                "text",
                "when"
              ],
              "additionalProperties": false
            },
            "description": "Qronas gesperrte Blöcke in der veröffentlichten Version: Die Firma ändert das Aussehen, niemals den Text oder die Links."
          },
          "fields": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Die Anzahl der Felder im Datenvertrag der Vorlage."
          }
        },
        "required": [
          "id",
          "key",
          "name",
          "published_version",
          "updated_at",
          "draft_changed",
          "origin",
          "locked",
          "fields"
        ],
        "additionalProperties": false,
        "description": "Eine Qrona-Vorlage, wie sie Qrona zeigt: die Version, woher sie stammt und die gesperrten Blöcke.",
        "example": {
          "id": "3f2a9c1e-5b7d-4e8a-9c21-7d4e5f6a8b90",
          "key": "lotsen.nyhet",
          "name": "Lotsen: nyhet",
          "published_version": 2,
          "updated_at": "2026-11-22T09:00:00.000Z",
          "draft_changed": false,
          "origin": {
            "library_version": 1,
            "pending_version": null,
            "kept_version": null,
            "untouched": false
          },
          "locked": [
            {
              "type": "text",
              "text": "Därför får {{data.klient.namn}} det här: {{data.varfor}}",
              "when": "varfor"
            }
          ],
          "fields": 12
        }
      },
      "RenderedMessage": {
        "type": "object",
        "properties": {
          "template": {
            "type": "string"
          },
          "template_version": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Die gerenderte Version: die zuletzt veröffentlichte Version, aus der jetzt eine Nachricht erstellt werden würde."
          },
          "subject": {
            "type": "string",
            "description": "Die Betreffzeile, ausgefüllt."
          },
          "html": {
            "type": "string",
            "description": "Die Nachricht als HTML, genau so, wie sie gesendet wird (die Links zur Webversion und zum Abbestellen führen in einer Vorschau zu nichts)."
          },
          "text": {
            "type": "string",
            "description": "Die Klartextversion."
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Was sollte beachtet werden, z.B. ein Link ohne Adresse."
          }
        },
        "required": [
          "template",
          "template_version",
          "subject",
          "html",
          "text",
          "warnings"
        ],
        "additionalProperties": false,
        "description": "Eine mit Daten gerenderte Qrona-Vorlage.",
        "example": {
          "template": "byra.momsunderlag",
          "template_version": 3,
          "subject": "Underlag till momsen för september 2026",
          "html": "<!doctype html><html>…</html>",
          "text": "Hej Eva! …",
          "warnings": []
        }
      }
    }
  }
}