{
  "components": {
    "headers": {
      "Deprecation": {
        "description": "Per RFC 9745: point in time (structured date `@<Unix seconds>`) from which the endpoint is deprecated. Only sent once a version is being retired.",
        "schema": {
          "examples": [
            "@1798761600"
          ],
          "type": "string"
        },
        "x-kiosa-de": {
          "description": "Nach RFC 9745: Zeitpunkt (Structured Date `@<Unix-Sekunden>`), ab dem der Endpunkt veraltet ist. Kommt erst, wenn eine Version abgekündigt wird."
        }
      },
      "RateLimit": {
        "description": "Remaining requests (r) and seconds until reset (t).",
        "schema": {
          "examples": [
            "\"default\";r=57;t=42"
          ],
          "type": "string"
        },
        "x-kiosa-de": {
          "description": "Übrige Anfragen (r) und Sekunden bis zum Reset (t)."
        }
      },
      "RateLimit-Policy": {
        "description": "Limit per token: 60 requests (q) per 60 seconds (w).",
        "schema": {
          "examples": [
            "\"default\";q=60;w=60"
          ],
          "type": "string"
        },
        "x-kiosa-de": {
          "description": "Limit je Token: 60 Anfragen (q) je 60 Sekunden (w)."
        }
      },
      "Retry-After": {
        "description": "Seconds until the next request is allowed.",
        "schema": {
          "minimum": 0,
          "type": "integer"
        },
        "x-kiosa-de": {
          "description": "Sekunden bis zur nächsten erlaubten Anfrage."
        }
      },
      "Sunset": {
        "description": "Per RFC 8594: HTTP date after which the endpoint will be shut down. Only sent once a version is being retired.",
        "schema": {
          "examples": [
            "Fri, 01 Jan 2027 00:00:00 GMT"
          ],
          "type": "string"
        },
        "x-kiosa-de": {
          "description": "Nach RFC 8594: HTTP-Datum, ab dem der Endpunkt abgeschaltet wird. Kommt erst, wenn eine Version abgekündigt wird."
        }
      },
      "WWW-Authenticate": {
        "description": "Bearer challenge per RFC 6750 with the error and the required scope.",
        "schema": {
          "examples": [
            "Bearer error=\"insufficient_scope\", scope=\"integrations:write\", resource_metadata=\"https://api.kiosa.ai/.well-known/oauth-protected-resource/v1\""
          ],
          "type": "string"
        },
        "x-kiosa-de": {
          "description": "Bearer-Challenge nach RFC 6750 mit Fehler und benötigtem Scope."
        }
      },
      "X-Request-Id": {
        "description": "ID of this request, for support: `req_` followed by a 26-character ULID.",
        "schema": {
          "examples": [
            "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A"
          ],
          "pattern": "^req_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
          "type": "string"
        },
        "x-kiosa-de": {
          "description": "ID dieser Anfrage, für Rückfragen: `req_` gefolgt von einer 26-stelligen ULID."
        }
      }
    },
    "schemas": {
      "Address": {
        "description": "Postal address; unknown parts are null.",
        "properties": {
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "City.",
            "x-kiosa-de": {
              "description": "Ort."
            }
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Country as ISO 3166-1 alpha-2 code.",
            "x-kiosa-de": {
              "description": "Land als ISO-3166-1-Alpha-2-Code."
            }
          },
          "postal_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Postal code.",
            "x-kiosa-de": {
              "description": "Postleitzahl."
            }
          },
          "street": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Street and house number.",
            "x-kiosa-de": {
              "description": "Straße und Hausnummer."
            }
          }
        },
        "required": [
          "street",
          "postal_code",
          "city",
          "country"
        ],
        "type": "object",
        "x-kiosa-de": {
          "description": "Postanschrift; unbekannte Teile sind null."
        }
      },
      "BranchList": {
        "description": "All branches at the provider.",
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ProviderBranch"
            },
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "type": "object",
        "x-kiosa-de": {
          "description": "Alle Filialen beim Anbieter."
        }
      },
      "BranchMapping": {
        "anyOf": [
          {
            "additionalProperties": false,
            "properties": {
              "branch_id": {
                "description": "Branch ID at the provider.",
                "minLength": 1,
                "type": "string",
                "x-kiosa-de": {
                  "description": "Filial-ID beim Anbieter."
                }
              },
              "location_id": {
                "description": "Kiosa location of this business.",
                "minLength": 1,
                "type": "string",
                "x-kiosa-de": {
                  "description": "Kiosa-Standort dieses Betriebs."
                }
              }
            },
            "required": [
              "branch_id",
              "location_id"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "branch_id": {
                "description": "Branch ID at the provider.",
                "minLength": 1,
                "type": "string",
                "x-kiosa-de": {
                  "description": "Filial-ID beim Anbieter."
                }
              },
              "ignore": {
                "const": true,
                "description": "Do not import this branch.",
                "type": "boolean",
                "x-kiosa-de": {
                  "description": "Diese Filiale nicht importieren."
                }
              }
            },
            "required": [
              "branch_id",
              "ignore"
            ],
            "type": "object"
          }
        ],
        "description": "Map a branch to a Kiosa location, or ignore the whole branch.",
        "x-kiosa-de": {
          "description": "Ordnet eine Filiale einem Kiosa-Standort zu oder ignoriert die ganze Filiale."
        }
      },
      "BranchMappingRequest": {
        "additionalProperties": false,
        "description": "Changes to the branch mapping.",
        "properties": {
          "mappings": {
            "description": "Branches to change. Branches not listed keep their mapping.",
            "items": {
              "$ref": "#/components/schemas/BranchMapping"
            },
            "minItems": 1,
            "type": "array",
            "x-kiosa-de": {
              "description": "Zu ändernde Filialen. Nicht genannte Filialen behalten ihre Zuordnung."
            }
          }
        },
        "required": [
          "mappings"
        ],
        "type": "object",
        "x-kiosa-de": {
          "description": "Änderungen an der Filial-Zuordnung."
        }
      },
      "ImportState": {
        "description": "An import run.",
        "properties": {
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "End of the run.",
            "x-kiosa-de": {
              "description": "Ende des Laufs."
            }
          },
          "started_at": {
            "description": "Start of the run.",
            "format": "date-time",
            "type": "string",
            "x-kiosa-de": {
              "description": "Beginn des Laufs."
            }
          },
          "status": {
            "description": "State of the import run.",
            "enum": [
              "running",
              "succeeded",
              "failed"
            ],
            "type": "string",
            "x-kiosa-de": {
              "description": "Stand des Importlaufs."
            }
          }
        },
        "required": [
          "status",
          "started_at",
          "finished_at"
        ],
        "type": "object",
        "x-kiosa-de": {
          "description": "Ein Importlauf."
        }
      },
      "Integration": {
        "description": "Full status of one integration.",
        "properties": {
          "api_key_last4": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Last four characters of the stored key. Kiosa never returns the key itself.",
            "x-kiosa-de": {
              "description": "Letzte vier Zeichen des gespeicherten Schlüssels. Kiosa gibt den Schlüssel selbst nie heraus."
            }
          },
          "company_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Company ID at the provider.",
            "x-kiosa-de": {
              "description": "Firmen-ID beim Anbieter."
            }
          },
          "connected_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the current credentials were stored.",
            "x-kiosa-de": {
              "description": "Wann die aktuellen Zugangsdaten gespeichert wurden."
            }
          },
          "initial_import": {
            "anyOf": [
              {
                "properties": {
                  "since": {
                    "description": "First day imported: 1 January of the previous year.",
                    "format": "date",
                    "type": "string",
                    "x-kiosa-de": {
                      "description": "Erster importierter Tag: 1. Januar des Vorjahres."
                    }
                  },
                  "status": {
                    "description": "State of the initial import.",
                    "enum": [
                      "waiting_for_mapping",
                      "running",
                      "succeeded",
                      "failed"
                    ],
                    "type": "string",
                    "x-kiosa-de": {
                      "description": "Stand des Erstimports."
                    }
                  }
                },
                "required": [
                  "status",
                  "since"
                ],
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Initial import of the history. It starts automatically once all branches are mapped.",
            "x-kiosa-de": {
              "description": "Erstimport der Historie. Er startet automatisch, sobald alle Filialen zugeordnet sind."
            }
          },
          "issues": {
            "description": "Open issues; empty when everything is fine.",
            "items": {
              "$ref": "#/components/schemas/IntegrationIssue"
            },
            "type": "array",
            "x-kiosa-de": {
              "description": "Offene Punkte; leer, wenn alles passt."
            }
          },
          "key_expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Expiry of the key, if known.",
            "x-kiosa-de": {
              "description": "Ablauf des Schlüssels, falls bekannt."
            }
          },
          "last_import": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ImportState"
              },
              {
                "type": "null"
              }
            ]
          },
          "provider": {
            "description": "Integration provider. v1 supports `ordio` only.",
            "enum": [
              "ordio"
            ],
            "type": "string",
            "x-kiosa-de": {
              "description": "Anbieter der Integration. v1 unterstützt nur `ordio`."
            }
          },
          "status": {
            "$ref": "#/components/schemas/IntegrationStatus"
          }
        },
        "required": [
          "provider",
          "status",
          "company_id",
          "api_key_last4",
          "key_expires_at",
          "connected_at",
          "initial_import",
          "last_import",
          "issues"
        ],
        "type": "object",
        "x-kiosa-de": {
          "description": "Vollständiger Status einer Integration."
        }
      },
      "IntegrationIssue": {
        "description": "Something the business or the partner has to resolve.",
        "properties": {
          "code": {
            "description": "Stable issue code. `other_staff_provider_active`: another staff system is already active for this business in Kiosa; the business contacts Kiosa to switch to ordio (the API never switches it off).",
            "enum": [
              "unmapped_branches",
              "key_expires_soon",
              "key_expired",
              "provider_auth_failed",
              "missing_provider_scopes",
              "import_failed",
              "other_staff_provider_active"
            ],
            "type": "string",
            "x-kiosa-de": {
              "description": "Stabiler Code des offenen Punkts. `other_staff_provider_active`: In Kiosa ist für diesen Betrieb schon ein anderes Personal-System aktiv. Melde dich bei uns, dann stellen wir auf ordio um (die API schaltet es nie ab)."
            }
          },
          "detail": {
            "description": "Human-readable explanation in English.",
            "type": "string",
            "x-kiosa-de": {
              "description": "Erklärung in Klartext (Englisch)."
            }
          }
        },
        "required": [
          "code",
          "detail"
        ],
        "type": "object",
        "x-kiosa-de": {
          "description": "Etwas, das der Betrieb oder der Partner erledigen muss."
        }
      },
      "IntegrationList": {
        "description": "All integrations of the business.",
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/IntegrationSummary"
            },
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "type": "object",
        "x-kiosa-de": {
          "description": "Alle Integrationen des Betriebs."
        }
      },
      "IntegrationStatus": {
        "description": "`not_connected`: no credentials stored. `testing`: Kiosa is still verifying the credentials. `needs_mapping`: connected, but at least one branch is not mapped yet. `active`: connected and fully mapped, imports run. `error`: the last test or import failed, see `issues`.",
        "enum": [
          "not_connected",
          "testing",
          "needs_mapping",
          "active",
          "error"
        ],
        "type": "string",
        "x-kiosa-de": {
          "description": "`not_connected`: keine Zugangsdaten gespeichert. `testing`: Kiosa prüft die Zugangsdaten noch. `needs_mapping`: verbunden, aber mindestens eine Filiale ist noch nicht zugeordnet. `active`: verbunden und vollständig zugeordnet, Importe laufen. `error`: der letzte Test oder Import ist fehlgeschlagen, siehe `issues`."
        }
      },
      "IntegrationSummary": {
        "description": "Short status of one integration.",
        "properties": {
          "last_import_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "End of the last successful import.",
            "x-kiosa-de": {
              "description": "Ende des letzten erfolgreichen Imports."
            }
          },
          "provider": {
            "description": "Integration provider. v1 supports `ordio` only.",
            "enum": [
              "ordio"
            ],
            "type": "string",
            "x-kiosa-de": {
              "description": "Anbieter der Integration. v1 unterstützt nur `ordio`."
            }
          },
          "status": {
            "$ref": "#/components/schemas/IntegrationStatus"
          },
          "writable": {
            "description": "`true` when this client may manage the integration through the API.",
            "type": "boolean",
            "x-kiosa-de": {
              "description": "`true`, wenn dieser Client die Integration über die API verwalten darf."
            }
          }
        },
        "required": [
          "provider",
          "status",
          "writable",
          "last_import_at"
        ],
        "type": "object",
        "x-kiosa-de": {
          "description": "Kurzstatus einer Integration."
        }
      },
      "IntegrationWithBranches": {
        "description": "Integration status including the branch mapping.",
        "properties": {
          "api_key_last4": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Last four characters of the stored key. Kiosa never returns the key itself.",
            "x-kiosa-de": {
              "description": "Letzte vier Zeichen des gespeicherten Schlüssels. Kiosa gibt den Schlüssel selbst nie heraus."
            }
          },
          "branches": {
            "description": "Branches at the provider with their mapping; empty while the status is `testing`.",
            "items": {
              "$ref": "#/components/schemas/ProviderBranch"
            },
            "type": "array",
            "x-kiosa-de": {
              "description": "Filialen beim Anbieter mit ihrer Zuordnung; leer, solange der Status `testing` ist."
            }
          },
          "company_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Company ID at the provider.",
            "x-kiosa-de": {
              "description": "Firmen-ID beim Anbieter."
            }
          },
          "connected_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the current credentials were stored.",
            "x-kiosa-de": {
              "description": "Wann die aktuellen Zugangsdaten gespeichert wurden."
            }
          },
          "initial_import": {
            "anyOf": [
              {
                "properties": {
                  "since": {
                    "description": "First day imported: 1 January of the previous year.",
                    "format": "date",
                    "type": "string",
                    "x-kiosa-de": {
                      "description": "Erster importierter Tag: 1. Januar des Vorjahres."
                    }
                  },
                  "status": {
                    "description": "State of the initial import.",
                    "enum": [
                      "waiting_for_mapping",
                      "running",
                      "succeeded",
                      "failed"
                    ],
                    "type": "string",
                    "x-kiosa-de": {
                      "description": "Stand des Erstimports."
                    }
                  }
                },
                "required": [
                  "status",
                  "since"
                ],
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Initial import of the history. It starts automatically once all branches are mapped.",
            "x-kiosa-de": {
              "description": "Erstimport der Historie. Er startet automatisch, sobald alle Filialen zugeordnet sind."
            }
          },
          "issues": {
            "description": "Open issues; empty when everything is fine.",
            "items": {
              "$ref": "#/components/schemas/IntegrationIssue"
            },
            "type": "array",
            "x-kiosa-de": {
              "description": "Offene Punkte; leer, wenn alles passt."
            }
          },
          "key_expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Expiry of the key, if known.",
            "x-kiosa-de": {
              "description": "Ablauf des Schlüssels, falls bekannt."
            }
          },
          "last_import": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ImportState"
              },
              {
                "type": "null"
              }
            ]
          },
          "provider": {
            "description": "Integration provider. v1 supports `ordio` only.",
            "enum": [
              "ordio"
            ],
            "type": "string",
            "x-kiosa-de": {
              "description": "Anbieter der Integration. v1 unterstützt nur `ordio`."
            }
          },
          "status": {
            "$ref": "#/components/schemas/IntegrationStatus"
          }
        },
        "required": [
          "provider",
          "status",
          "company_id",
          "api_key_last4",
          "key_expires_at",
          "connected_at",
          "initial_import",
          "last_import",
          "issues",
          "branches"
        ],
        "type": "object",
        "x-kiosa-de": {
          "description": "Status der Integration samt Filial-Zuordnung."
        }
      },
      "Location": {
        "description": "A location (restaurant) of the business.",
        "properties": {
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "id": {
            "description": "Kiosa location ID. Use it as `location_id` in branch mappings.",
            "type": "string",
            "x-kiosa-de": {
              "description": "Kiosa-Standort-ID. Verwende sie als `location_id` in Filial-Zuordnungen."
            }
          },
          "name": {
            "description": "Name of the location.",
            "type": "string",
            "x-kiosa-de": {
              "description": "Name des Standorts."
            }
          }
        },
        "required": [
          "id",
          "name",
          "address"
        ],
        "type": "object",
        "x-kiosa-de": {
          "description": "Ein Standort (Restaurant) des Betriebs."
        }
      },
      "LocationList": {
        "description": "All locations of the business.",
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Location"
            },
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "type": "object",
        "x-kiosa-de": {
          "description": "Alle Standorte des Betriebs."
        }
      },
      "Me": {
        "description": "The connection behind the access token.",
        "properties": {
          "account": {
            "description": "The business that granted access.",
            "properties": {
              "id": {
                "description": "Kiosa ID of the business.",
                "type": "string",
                "x-kiosa-de": {
                  "description": "Kiosa-ID des Betriebs."
                }
              },
              "name": {
                "description": "Name of the business.",
                "type": "string",
                "x-kiosa-de": {
                  "description": "Name des Betriebs."
                }
              },
              "slug": {
                "description": "Kiosa address of the business (`<slug>.kiosa.ai`).",
                "type": "string",
                "x-kiosa-de": {
                  "description": "Kiosa-Adresse des Betriebs (`<slug>.kiosa.ai`)."
                }
              }
            },
            "required": [
              "id",
              "name",
              "slug"
            ],
            "type": "object",
            "x-kiosa-de": {
              "description": "Der Betrieb, der den Zugriff erteilt hat."
            }
          },
          "consented_at": {
            "description": "When an admin of the business granted access to this client (ISO 8601 with offset).",
            "format": "date-time",
            "type": "string",
            "x-kiosa-de": {
              "description": "Wann ein Admin des Betriebs diesem Client den Zugriff erteilt hat (ISO 8601 mit Zeitzone)."
            }
          },
          "scopes": {
            "description": "Scopes granted to this token.",
            "items": {
              "$ref": "#/components/schemas/Scope"
            },
            "type": "array",
            "x-kiosa-de": {
              "description": "Scopes, die diesem Token gewährt sind."
            }
          }
        },
        "required": [
          "account",
          "consented_at",
          "scopes"
        ],
        "type": "object",
        "x-kiosa-de": {
          "description": "Die Verbindung hinter dem Access Token."
        }
      },
      "OrdioCredentials": {
        "additionalProperties": false,
        "description": "Credentials of the ordio integration.",
        "properties": {
          "api_key": {
            "description": "ordio API key with the scopes branches:read, shifts:read, absences:read and wages:read.",
            "minLength": 1,
            "type": "string",
            "x-kiosa-de": {
              "description": "ordio-API-Schlüssel mit den Scopes branches:read, shifts:read, absences:read und wages:read."
            }
          },
          "company_id": {
            "description": "ordio company ID.",
            "minLength": 1,
            "type": "string",
            "x-kiosa-de": {
              "description": "ordio-Firmen-ID."
            }
          },
          "key_expires_at": {
            "description": "Expiry of the key. Kiosa reminds the business before it expires.",
            "format": "date-time",
            "type": "string",
            "x-kiosa-de": {
              "description": "Ablauf des Schlüssels. Kiosa erinnert den Betrieb vorher."
            }
          }
        },
        "required": [
          "api_key",
          "company_id"
        ],
        "type": "object",
        "x-kiosa-de": {
          "description": "Zugangsdaten der ordio-Integration."
        }
      },
      "Problem": {
        "description": "RFC 9457 problem details. `title` and `detail` are always in English; localized texts per `code` are in the docs.",
        "properties": {
          "code": {
            "description": "Stable machine-readable error code. Branch on this, not on `title` or `detail`.",
            "enum": [
              "invalid_token",
              "insufficient_scope",
              "user_inactive",
              "partner_not_approved",
              "partner_suspended",
              "partner_apps_disabled",
              "admin_required",
              "not_found",
              "validation_failed",
              "rate_limited",
              "provider_auth_failed",
              "missing_provider_scopes",
              "provider_unreachable",
              "provider_not_allowed",
              "mapping_conflict",
              "internal_error",
              "payload_too_large",
              "upstream_unavailable",
              "upstream_timeout",
              "service_unavailable"
            ],
            "type": "string",
            "x-kiosa-de": {
              "description": "Stabiler, maschinenlesbarer Fehlercode. Werte diesen aus, nicht `title` oder `detail`."
            }
          },
          "detail": {
            "description": "Explanation of this occurrence.",
            "type": "string",
            "x-kiosa-de": {
              "description": "Erklärung dieses konkreten Falls."
            }
          },
          "invalid_params": {
            "description": "Only for `validation_failed`.",
            "items": {
              "properties": {
                "name": {
                  "description": "Field path, for example `mappings[0].location_id`.",
                  "type": "string",
                  "x-kiosa-de": {
                    "description": "Feldpfad, zum Beispiel `mappings[0].location_id`."
                  }
                },
                "reason": {
                  "description": "What is wrong with the field.",
                  "type": "string",
                  "x-kiosa-de": {
                    "description": "Was an dem Feld falsch ist."
                  }
                }
              },
              "required": [
                "name",
                "reason"
              ],
              "type": "object"
            },
            "type": "array",
            "x-kiosa-de": {
              "description": "Nur bei `validation_failed`."
            }
          },
          "missing_scopes": {
            "description": "Only for `missing_provider_scopes`: scopes the provider key lacks.",
            "items": {
              "type": "string"
            },
            "type": "array",
            "x-kiosa-de": {
              "description": "Nur bei `missing_provider_scopes`: Scopes, die dem Schlüssel des Anbieters fehlen."
            }
          },
          "request_id": {
            "description": "Same value as the X-Request-Id header: `req_` followed by a 26-character ULID.",
            "pattern": "^req_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "type": "string",
            "x-kiosa-de": {
              "description": "Gleicher Wert wie der Header X-Request-Id: `req_` gefolgt von einer 26-stelligen ULID."
            }
          },
          "status": {
            "description": "HTTP status code.",
            "type": "integer",
            "x-kiosa-de": {
              "description": "HTTP-Statuscode."
            }
          },
          "title": {
            "description": "Short summary of the error code.",
            "type": "string",
            "x-kiosa-de": {
              "description": "Kurzfassung des Fehlercodes."
            }
          },
          "type": {
            "description": "Documentation URL of the error code: `https://docs.kiosa.ai/en/reference/errors/#<code>`, identical in every language.",
            "format": "uri",
            "type": "string",
            "x-kiosa-de": {
              "description": "Doku-URL des Fehlercodes: `https://docs.kiosa.ai/en/reference/errors/#<code>`, in jeder Sprache gleich."
            }
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "detail",
          "code",
          "request_id"
        ],
        "type": "object",
        "x-kiosa-de": {
          "description": "Problem Details nach RFC 9457. `title` und `detail` sind immer englisch; übersetzte Texte je `code` stehen in der Doku."
        }
      },
      "ProviderBranch": {
        "description": "A branch at the provider and its Kiosa location.",
        "properties": {
          "branch_id": {
            "description": "Branch ID at the provider.",
            "type": "string",
            "x-kiosa-de": {
              "description": "Filial-ID beim Anbieter."
            }
          },
          "location_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Kiosa location the branch is mapped to.",
            "x-kiosa-de": {
              "description": "Kiosa-Standort, dem die Filiale zugeordnet ist."
            }
          },
          "mapping": {
            "description": "`mapped`: imported into `location_id`. `ignored`: not imported. `unmapped`: still open.",
            "enum": [
              "mapped",
              "ignored",
              "unmapped"
            ],
            "type": "string",
            "x-kiosa-de": {
              "description": "`mapped`: wird nach `location_id` importiert. `ignored`: wird nicht importiert. `unmapped`: noch offen."
            }
          },
          "name": {
            "description": "Branch name at the provider.",
            "type": "string",
            "x-kiosa-de": {
              "description": "Filialname beim Anbieter."
            }
          },
          "suggested_location_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Suggestion for an unmapped branch, based on a matching name.",
            "x-kiosa-de": {
              "description": "Vorschlag für eine offene Filiale, anhand eines gleichen Namens."
            }
          }
        },
        "required": [
          "branch_id",
          "name",
          "mapping",
          "location_id",
          "suggested_location_id"
        ],
        "type": "object",
        "x-kiosa-de": {
          "description": "Eine Filiale beim Anbieter und ihr Kiosa-Standort."
        }
      },
      "Scope": {
        "description": "OAuth scope.",
        "enum": [
          "account:read",
          "integrations:read",
          "integrations:write"
        ],
        "type": "string",
        "x-kiosa-de": {
          "description": "OAuth-Scope."
        }
      }
    },
    "securitySchemes": {
      "oauth2": {
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://api.kiosa.ai/api/oauth/authorize",
            "refreshUrl": "https://api.kiosa.ai/api/oauth/token",
            "scopes": {
              "account:read": "Read the business, its locations and the current connection.",
              "integrations:read": "Read the status of the business integrations.",
              "integrations:write": "Hand over provider credentials, map branches and disconnect integrations. Includes integrations:read."
            },
            "tokenUrl": "https://api.kiosa.ai/api/oauth/token"
          }
        },
        "type": "oauth2"
      }
    }
  },
  "info": {
    "contact": {
      "name": "Kiosa",
      "url": "https://docs.kiosa.ai"
    },
    "description": "The Kiosa API connects your software to the Kiosa account of a hospitality business. Version 1 covers setting up integrations: read the business and its locations, submit credentials, map branches, disconnect.\n\n**Partner preview:** every endpoint is published as a contract and may still change before general availability.\n\n## Authorization\nOAuth 2.0 authorization code flow with PKCE (S256). Your client ID is an https URL on your domain serving a client metadata document (CIMD); it is a public client without a secret. During authorization the user enters their Kiosa address; pass `login_hint=<slug>` to prefill it. Only admins of the business can consent. Access tokens are valid for 1 hour, refresh tokens rotate on every use. Tokens are issued for `resource=https://api.kiosa.ai/v1` and are valid for this API only. Revocation: `https://api.kiosa.ai/api/oauth/revoke`.\n\nThe API is only open to approved, active partners: a client that is not listed gets no scope at all, not even a read scope (authorization ends with `unauthorized_client`). `integrations:write` only covers the providers in the approval. The business can turn off partner apps in Kiosa at any time.\n\n## Errors\nErrors use `application/problem+json` (RFC 9457) with `type`, `title`, `status`, `detail`, `code` and `request_id`. `type` is `https://docs.kiosa.ai/en/reference/errors/#<code>`. Branch on `code`; the docs list every code.\n\n## Rate limits\nEach token may send 60 requests per minute. Every response carries `RateLimit-Policy: \"default\";q=60;w=60` and `RateLimit: \"default\";r=<remaining>;t=<seconds until reset>`. Exceeding the limit returns `429` with `Retry-After` in seconds.\n\n## Versioning\nThe major version is part of the path. New fields, endpoints and error codes are added without a version change; ignore unknown fields. Breaking changes only ship in a new major version; the previous one keeps running for at least 12 months and is announced with the `Deprecation` and `Sunset` headers.\n\n## Request ID\nEvery response carries `X-Request-Id` in the format `req_` + 26-character ULID (for example `req_01JDX5Q8M3V8F2K7ZB9T4N6C1A`); errors repeat it as `request_id`. Quote it when contacting Kiosa.",
    "title": "Kiosa API",
    "version": "1.0.0",
    "x-kiosa-de": {
      "description": "Mit der Kiosa API verbindest du deine Software mit dem Kiosa-Konto eines Gastronomiebetriebs. Version 1 deckt die Einrichtung von Integrationen ab: Betrieb und Standorte lesen, Zugangsdaten übergeben, Filialen zuordnen, trennen.\n\n**Partner-Vorschau:** Alle Endpunkte sind als Vertrag veröffentlicht und können sich bis zur allgemeinen Verfügbarkeit noch ändern.\n\n## Login\nOAuth 2.0 Authorization Code mit PKCE (S256). Dein Client ist eine https-URL auf deiner Domain mit einem Client-Metadaten-Dokument (CIMD), öffentlicher Client ohne Secret. Beim Login gibt der Gastronom seine Kiosa-Adresse ein; mit `login_hint=<slug>` füllst du sie vor. Nur Admins des Betriebs können zustimmen. Access Tokens gelten 1 Stunde, Refresh Tokens rotieren bei jeder Nutzung. Tokens werden mit `resource=https://api.kiosa.ai/v1` ausgestellt und gelten nur für diese API. Widerruf: `https://api.kiosa.ai/api/oauth/revoke`.\n\nDie API steht nur freigegebenen, aktiven Partnern offen: ein nicht eingetragener Client bekommt keinen Scope, auch keinen lesenden (Login endet mit `unauthorized_client`). `integrations:write` gilt nur für die Anbieter in der Freigabe. Der Betrieb kann Partner-Apps in Kiosa jederzeit abschalten.\n\n## Fehler\nFehler kommen als `application/problem+json` (RFC 9457) mit `type`, `title`, `status`, `detail`, `code` und `request_id`. `type` ist `https://docs.kiosa.ai/en/reference/errors/#<code>`. Werte `code` aus; die Liste aller Codes steht in der Doku.\n\n## Limits\nJe Token 60 Anfragen pro Minute. Jede Antwort trägt `RateLimit-Policy: \"default\";q=60;w=60` und `RateLimit: \"default\";r=<übrig>;t=<Sekunden bis Reset>`. Bei Überschreitung kommt `429` mit `Retry-After` in Sekunden.\n\n## Versionen\nDie Hauptversion steht im Pfad. Neue Felder, Endpunkte und Fehlercodes kommen ohne Versionssprung; ignoriere unbekannte Felder. Breaking Changes gibt es nur in einer neuen Hauptversion, die alte läuft mindestens 12 Monate parallel und wird mit den Headern `Deprecation` und `Sunset` angekündigt.\n\n## Request-ID\nJede Antwort trägt `X-Request-Id` im Format `req_` + 26-stellige ULID (zum Beispiel `req_01JDX5Q8M3V8F2K7ZB9T4N6C1A`); Fehler wiederholen sie als `request_id`. Nenne sie bei Rückfragen an Kiosa."
    }
  },
  "jsonSchemaDialect": "https://spec.openapis.org/oas/3.1/dialect/base",
  "openapi": "3.1.0",
  "paths": {
    "/integrations": {
      "get": {
        "description": "Returns every provider that can be managed through the API (v1: `ordio`) with a short status, including unconnected ones (`not_connected`). `writable` shows whether this client may manage the provider. More providers are added without a version change.",
        "operationId": "listIntegrations",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": [
                    {
                      "last_import_at": null,
                      "provider": "ordio",
                      "status": "needs_mapping",
                      "writable": true
                    }
                  ]
                },
                "schema": {
                  "$ref": "#/components/schemas/IntegrationList"
                }
              }
            },
            "description": "All integrations of the business that can be managed through the API.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Alle Integrationen des Betriebs, die über die API verwaltet werden können."
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "invalid_token": {
                    "summary": "Invalid token",
                    "value": {
                      "code": "invalid_token",
                      "detail": "The access token is missing, expired, revoked or not issued for this API. Use the refresh token to obtain a new access token; if that fails, the business has to grant access again.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 401,
                      "title": "Invalid token",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#invalid_token"
                    },
                    "x-kiosa-de": {
                      "summary": "Token ungültig"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `invalid_token`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWW-Authenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `invalid_token`"
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "insufficient_scope": {
                    "summary": "Insufficient scope",
                    "value": {
                      "code": "insufficient_scope",
                      "detail": "The token does not carry the scope this endpoint requires. Request the scope during authorization; the WWW-Authenticate header names it.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Insufficient scope",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#insufficient_scope"
                    },
                    "x-kiosa-de": {
                      "summary": "Scope fehlt"
                    }
                  },
                  "partner_apps_disabled": {
                    "summary": "Partner apps disabled",
                    "value": {
                      "code": "partner_apps_disabled",
                      "detail": "The business has turned off partner apps in Kiosa (Settings → Connected apps). Calls are rejected until it turns them back on.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Partner apps disabled",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#partner_apps_disabled"
                    },
                    "x-kiosa-de": {
                      "summary": "Partner-Apps abgeschaltet"
                    }
                  },
                  "partner_not_approved": {
                    "summary": "Partner not approved",
                    "value": {
                      "code": "partner_not_approved",
                      "detail": "The Kiosa API is only open to approved partners. Your client is not registered as a partner. Write to kontakt@kiosa.ai to apply for approval. Authorization already rejects such a client (`unauthorized_client`); calls get this code when the token belongs to a partner that has lost its approval since.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Partner not approved",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#partner_not_approved"
                    },
                    "x-kiosa-de": {
                      "summary": "Partner nicht freigegeben"
                    }
                  },
                  "partner_suspended": {
                    "summary": "Partner suspended",
                    "value": {
                      "code": "partner_suspended",
                      "detail": "Kiosa has suspended this client. All of its tokens are rejected with immediate effect.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Partner suspended",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#partner_suspended"
                    },
                    "x-kiosa-de": {
                      "summary": "Partner gesperrt"
                    }
                  },
                  "user_inactive": {
                    "summary": "User inactive",
                    "value": {
                      "code": "user_inactive",
                      "detail": "The user who granted access has been deactivated, is no longer a member of the business or no longer has a sufficient role. An admin of the business has to grant access again.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "User inactive",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#user_inactive"
                    },
                    "x-kiosa-de": {
                      "summary": "Nutzer nicht mehr berechtigt"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `insufficient_scope`, `user_inactive`, `partner_not_approved`, `partner_suspended`, `partner_apps_disabled`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWW-Authenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `insufficient_scope`, `user_inactive`, `partner_not_approved`, `partner_suspended`, `partner_apps_disabled`"
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "rate_limited": {
                    "summary": "Rate limited",
                    "value": {
                      "code": "rate_limited",
                      "detail": "Each client may send 60 requests per minute per business. Wait for the number of seconds in the Retry-After header, then retry.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 429,
                      "title": "Rate limited",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#rate_limited"
                    },
                    "x-kiosa-de": {
                      "summary": "Zu viele Anfragen"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `rate_limited`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `rate_limited`"
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "internal_error": {
                    "summary": "Internal error",
                    "value": {
                      "code": "internal_error",
                      "detail": "An unexpected error occurred at Kiosa. Retry later and quote the request_id when contacting support.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 500,
                      "title": "Internal error",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#internal_error"
                    },
                    "x-kiosa-de": {
                      "summary": "Interner Fehler"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `internal_error`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `internal_error`"
            }
          },
          "502": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "upstream_unavailable": {
                    "summary": "Upstream unavailable",
                    "value": {
                      "code": "upstream_unavailable",
                      "detail": "The Kiosa server hosting the business could not be reached or sent an invalid response. Retry later; write calls are idempotent.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 502,
                      "title": "Upstream unavailable",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#upstream_unavailable"
                    },
                    "x-kiosa-de": {
                      "summary": "Kiosa-Server nicht erreichbar"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `upstream_unavailable`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `upstream_unavailable`"
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "service_unavailable": {
                    "summary": "Service unavailable",
                    "value": {
                      "code": "service_unavailable",
                      "detail": "Kiosa is temporarily overloaded or unavailable. Wait for the number of seconds in the Retry-After header, if present, then retry.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 503,
                      "title": "Service unavailable",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#service_unavailable"
                    },
                    "x-kiosa-de": {
                      "summary": "Vorübergehend nicht verfügbar"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `service_unavailable`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `service_unavailable`"
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "upstream_timeout": {
                    "summary": "Upstream timeout",
                    "value": {
                      "code": "upstream_timeout",
                      "detail": "The Kiosa server hosting the business did not respond in time. The matching GET shows whether a write call already took effect; retrying is idempotent.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 504,
                      "title": "Upstream timeout",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#upstream_timeout"
                    },
                    "x-kiosa-de": {
                      "summary": "Zeitüberschreitung"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `upstream_timeout`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `upstream_timeout`"
            }
          }
        },
        "security": [
          {
            "oauth2": [
              "integrations:read"
            ]
          }
        ],
        "summary": "List integrations",
        "tags": [
          "integrations"
        ],
        "x-kiosa-availability": "partner_preview",
        "x-kiosa-de": {
          "description": "Liefert alle Anbieter, die über die API verwaltet werden können (v1: `ordio`), mit Kurzstatus, auch wenn sie noch nicht verbunden sind (`not_connected`). `writable` zeigt, ob dein Client den Anbieter verwalten darf. Weitere Anbieter kommen ohne Versionssprung hinzu.",
          "summary": "Integrationen auflisten"
        }
      }
    },
    "/integrations/{provider}": {
      "delete": {
        "description": "Deletes the credentials and stops running and future imports before responding. Data already imported stays in Kiosa. When you reconnect later, gaps longer than 7 days are not backfilled; the nightly sync only loads the last 7 days. If nothing is connected, the call also returns 204. This does not end the OAuth access of your client; use token revocation for that.",
        "operationId": "deleteIntegration",
        "parameters": [
          {
            "description": "Integration provider. v1 supports `ordio` only.",
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "enum": [
                "ordio"
              ],
              "type": "string"
            },
            "x-kiosa-de": {
              "description": "Anbieter der Integration. v1 unterstützt nur `ordio`."
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Integration disconnected.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Integration getrennt."
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "invalid_token": {
                    "summary": "Invalid token",
                    "value": {
                      "code": "invalid_token",
                      "detail": "The access token is missing, expired, revoked or not issued for this API. Use the refresh token to obtain a new access token; if that fails, the business has to grant access again.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 401,
                      "title": "Invalid token",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#invalid_token"
                    },
                    "x-kiosa-de": {
                      "summary": "Token ungültig"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `invalid_token`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWW-Authenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `invalid_token`"
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "admin_required": {
                    "summary": "Admin required",
                    "value": {
                      "code": "admin_required",
                      "detail": "Write calls require the user who granted access to still be an admin of the business. An admin has to grant access again.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Admin required",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#admin_required"
                    },
                    "x-kiosa-de": {
                      "summary": "Admin-Recht nötig"
                    }
                  },
                  "insufficient_scope": {
                    "summary": "Insufficient scope",
                    "value": {
                      "code": "insufficient_scope",
                      "detail": "The token does not carry the scope this endpoint requires. Request the scope during authorization; the WWW-Authenticate header names it.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Insufficient scope",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#insufficient_scope"
                    },
                    "x-kiosa-de": {
                      "summary": "Scope fehlt"
                    }
                  },
                  "partner_apps_disabled": {
                    "summary": "Partner apps disabled",
                    "value": {
                      "code": "partner_apps_disabled",
                      "detail": "The business has turned off partner apps in Kiosa (Settings → Connected apps). Calls are rejected until it turns them back on.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Partner apps disabled",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#partner_apps_disabled"
                    },
                    "x-kiosa-de": {
                      "summary": "Partner-Apps abgeschaltet"
                    }
                  },
                  "partner_not_approved": {
                    "summary": "Partner not approved",
                    "value": {
                      "code": "partner_not_approved",
                      "detail": "The Kiosa API is only open to approved partners. Your client is not registered as a partner. Write to kontakt@kiosa.ai to apply for approval. Authorization already rejects such a client (`unauthorized_client`); calls get this code when the token belongs to a partner that has lost its approval since.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Partner not approved",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#partner_not_approved"
                    },
                    "x-kiosa-de": {
                      "summary": "Partner nicht freigegeben"
                    }
                  },
                  "partner_suspended": {
                    "summary": "Partner suspended",
                    "value": {
                      "code": "partner_suspended",
                      "detail": "Kiosa has suspended this client. All of its tokens are rejected with immediate effect.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Partner suspended",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#partner_suspended"
                    },
                    "x-kiosa-de": {
                      "summary": "Partner gesperrt"
                    }
                  },
                  "provider_not_allowed": {
                    "summary": "Provider not allowed",
                    "value": {
                      "code": "provider_not_allowed",
                      "detail": "This client may not write integrations of this provider. Each partner is approved only for the providers agreed with Kiosa.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Provider not allowed",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#provider_not_allowed"
                    },
                    "x-kiosa-de": {
                      "summary": "Anbieter nicht erlaubt"
                    }
                  },
                  "user_inactive": {
                    "summary": "User inactive",
                    "value": {
                      "code": "user_inactive",
                      "detail": "The user who granted access has been deactivated, is no longer a member of the business or no longer has a sufficient role. An admin of the business has to grant access again.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "User inactive",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#user_inactive"
                    },
                    "x-kiosa-de": {
                      "summary": "Nutzer nicht mehr berechtigt"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `insufficient_scope`, `user_inactive`, `partner_not_approved`, `partner_suspended`, `partner_apps_disabled`, `admin_required`, `provider_not_allowed`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWW-Authenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `insufficient_scope`, `user_inactive`, `partner_not_approved`, `partner_suspended`, `partner_apps_disabled`, `admin_required`, `provider_not_allowed`"
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "not_found": {
                    "summary": "Not found",
                    "value": {
                      "code": "not_found",
                      "detail": "The resource does not exist or the provider is not supported by the API.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 404,
                      "title": "Not found",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#not_found"
                    },
                    "x-kiosa-de": {
                      "summary": "Nicht gefunden"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `not_found`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `not_found`"
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "rate_limited": {
                    "summary": "Rate limited",
                    "value": {
                      "code": "rate_limited",
                      "detail": "Each client may send 60 requests per minute per business. Wait for the number of seconds in the Retry-After header, then retry.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 429,
                      "title": "Rate limited",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#rate_limited"
                    },
                    "x-kiosa-de": {
                      "summary": "Zu viele Anfragen"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `rate_limited`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `rate_limited`"
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "internal_error": {
                    "summary": "Internal error",
                    "value": {
                      "code": "internal_error",
                      "detail": "An unexpected error occurred at Kiosa. Retry later and quote the request_id when contacting support.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 500,
                      "title": "Internal error",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#internal_error"
                    },
                    "x-kiosa-de": {
                      "summary": "Interner Fehler"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `internal_error`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `internal_error`"
            }
          },
          "502": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "upstream_unavailable": {
                    "summary": "Upstream unavailable",
                    "value": {
                      "code": "upstream_unavailable",
                      "detail": "The Kiosa server hosting the business could not be reached or sent an invalid response. Retry later; write calls are idempotent.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 502,
                      "title": "Upstream unavailable",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#upstream_unavailable"
                    },
                    "x-kiosa-de": {
                      "summary": "Kiosa-Server nicht erreichbar"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `upstream_unavailable`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `upstream_unavailable`"
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "service_unavailable": {
                    "summary": "Service unavailable",
                    "value": {
                      "code": "service_unavailable",
                      "detail": "Kiosa is temporarily overloaded or unavailable. Wait for the number of seconds in the Retry-After header, if present, then retry.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 503,
                      "title": "Service unavailable",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#service_unavailable"
                    },
                    "x-kiosa-de": {
                      "summary": "Vorübergehend nicht verfügbar"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `service_unavailable`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `service_unavailable`"
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "upstream_timeout": {
                    "summary": "Upstream timeout",
                    "value": {
                      "code": "upstream_timeout",
                      "detail": "The Kiosa server hosting the business did not respond in time. The matching GET shows whether a write call already took effect; retrying is idempotent.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 504,
                      "title": "Upstream timeout",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#upstream_timeout"
                    },
                    "x-kiosa-de": {
                      "summary": "Zeitüberschreitung"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `upstream_timeout`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `upstream_timeout`"
            }
          }
        },
        "security": [
          {
            "oauth2": [
              "integrations:write"
            ]
          }
        ],
        "summary": "Disconnect an integration",
        "tags": [
          "integrations"
        ],
        "x-kiosa-availability": "partner_preview",
        "x-kiosa-de": {
          "description": "Löscht die Zugangsdaten und stoppt laufende und künftige Importe, bevor die Antwort kommt. Bereits importierte Daten bleiben in Kiosa. Beim erneuten Verbinden holt Kiosa Lücken von mehr als 7 Tagen nicht nach; der nächtliche Abgleich lädt nur die letzten 7 Tage. Ist nichts verbunden, antwortet der Aufruf ebenfalls mit 204. Den OAuth-Zugriff deines Clients beendet das nicht; dafür gibt es den Widerruf.",
          "summary": "Integration trennen"
        }
      },
      "get": {
        "description": "Returns the full status of an integration: connection, initial import, last import and open issues. If nothing is connected, the status is `not_connected` (no 404). After a PUT answered with 202, poll this endpoint until the status is no longer `testing`.",
        "operationId": "getIntegration",
        "parameters": [
          {
            "description": "Integration provider. v1 supports `ordio` only.",
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "enum": [
                "ordio"
              ],
              "type": "string"
            },
            "x-kiosa-de": {
              "description": "Anbieter der Integration. v1 unterstützt nur `ordio`."
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "api_key_last4": "x9Qa",
                  "company_id": "1234",
                  "connected_at": "2026-11-24T10:15:02+01:00",
                  "initial_import": {
                    "since": "2025-01-01",
                    "status": "waiting_for_mapping"
                  },
                  "issues": [
                    {
                      "code": "unmapped_branches",
                      "detail": "1 ordio branch is not mapped to a Kiosa location yet."
                    }
                  ],
                  "key_expires_at": "2027-11-30T23:59:59+01:00",
                  "last_import": null,
                  "provider": "ordio",
                  "status": "needs_mapping"
                },
                "schema": {
                  "$ref": "#/components/schemas/Integration"
                }
              }
            },
            "description": "Status of the integration.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Status der Integration."
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "invalid_token": {
                    "summary": "Invalid token",
                    "value": {
                      "code": "invalid_token",
                      "detail": "The access token is missing, expired, revoked or not issued for this API. Use the refresh token to obtain a new access token; if that fails, the business has to grant access again.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 401,
                      "title": "Invalid token",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#invalid_token"
                    },
                    "x-kiosa-de": {
                      "summary": "Token ungültig"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `invalid_token`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWW-Authenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `invalid_token`"
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "insufficient_scope": {
                    "summary": "Insufficient scope",
                    "value": {
                      "code": "insufficient_scope",
                      "detail": "The token does not carry the scope this endpoint requires. Request the scope during authorization; the WWW-Authenticate header names it.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Insufficient scope",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#insufficient_scope"
                    },
                    "x-kiosa-de": {
                      "summary": "Scope fehlt"
                    }
                  },
                  "partner_apps_disabled": {
                    "summary": "Partner apps disabled",
                    "value": {
                      "code": "partner_apps_disabled",
                      "detail": "The business has turned off partner apps in Kiosa (Settings → Connected apps). Calls are rejected until it turns them back on.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Partner apps disabled",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#partner_apps_disabled"
                    },
                    "x-kiosa-de": {
                      "summary": "Partner-Apps abgeschaltet"
                    }
                  },
                  "partner_not_approved": {
                    "summary": "Partner not approved",
                    "value": {
                      "code": "partner_not_approved",
                      "detail": "The Kiosa API is only open to approved partners. Your client is not registered as a partner. Write to kontakt@kiosa.ai to apply for approval. Authorization already rejects such a client (`unauthorized_client`); calls get this code when the token belongs to a partner that has lost its approval since.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Partner not approved",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#partner_not_approved"
                    },
                    "x-kiosa-de": {
                      "summary": "Partner nicht freigegeben"
                    }
                  },
                  "partner_suspended": {
                    "summary": "Partner suspended",
                    "value": {
                      "code": "partner_suspended",
                      "detail": "Kiosa has suspended this client. All of its tokens are rejected with immediate effect.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Partner suspended",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#partner_suspended"
                    },
                    "x-kiosa-de": {
                      "summary": "Partner gesperrt"
                    }
                  },
                  "user_inactive": {
                    "summary": "User inactive",
                    "value": {
                      "code": "user_inactive",
                      "detail": "The user who granted access has been deactivated, is no longer a member of the business or no longer has a sufficient role. An admin of the business has to grant access again.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "User inactive",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#user_inactive"
                    },
                    "x-kiosa-de": {
                      "summary": "Nutzer nicht mehr berechtigt"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `insufficient_scope`, `user_inactive`, `partner_not_approved`, `partner_suspended`, `partner_apps_disabled`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWW-Authenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `insufficient_scope`, `user_inactive`, `partner_not_approved`, `partner_suspended`, `partner_apps_disabled`"
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "not_found": {
                    "summary": "Not found",
                    "value": {
                      "code": "not_found",
                      "detail": "The resource does not exist or the provider is not supported by the API.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 404,
                      "title": "Not found",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#not_found"
                    },
                    "x-kiosa-de": {
                      "summary": "Nicht gefunden"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `not_found`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `not_found`"
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "rate_limited": {
                    "summary": "Rate limited",
                    "value": {
                      "code": "rate_limited",
                      "detail": "Each client may send 60 requests per minute per business. Wait for the number of seconds in the Retry-After header, then retry.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 429,
                      "title": "Rate limited",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#rate_limited"
                    },
                    "x-kiosa-de": {
                      "summary": "Zu viele Anfragen"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `rate_limited`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `rate_limited`"
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "internal_error": {
                    "summary": "Internal error",
                    "value": {
                      "code": "internal_error",
                      "detail": "An unexpected error occurred at Kiosa. Retry later and quote the request_id when contacting support.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 500,
                      "title": "Internal error",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#internal_error"
                    },
                    "x-kiosa-de": {
                      "summary": "Interner Fehler"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `internal_error`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `internal_error`"
            }
          },
          "502": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "upstream_unavailable": {
                    "summary": "Upstream unavailable",
                    "value": {
                      "code": "upstream_unavailable",
                      "detail": "The Kiosa server hosting the business could not be reached or sent an invalid response. Retry later; write calls are idempotent.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 502,
                      "title": "Upstream unavailable",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#upstream_unavailable"
                    },
                    "x-kiosa-de": {
                      "summary": "Kiosa-Server nicht erreichbar"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `upstream_unavailable`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `upstream_unavailable`"
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "service_unavailable": {
                    "summary": "Service unavailable",
                    "value": {
                      "code": "service_unavailable",
                      "detail": "Kiosa is temporarily overloaded or unavailable. Wait for the number of seconds in the Retry-After header, if present, then retry.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 503,
                      "title": "Service unavailable",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#service_unavailable"
                    },
                    "x-kiosa-de": {
                      "summary": "Vorübergehend nicht verfügbar"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `service_unavailable`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `service_unavailable`"
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "upstream_timeout": {
                    "summary": "Upstream timeout",
                    "value": {
                      "code": "upstream_timeout",
                      "detail": "The Kiosa server hosting the business did not respond in time. The matching GET shows whether a write call already took effect; retrying is idempotent.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 504,
                      "title": "Upstream timeout",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#upstream_timeout"
                    },
                    "x-kiosa-de": {
                      "summary": "Zeitüberschreitung"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `upstream_timeout`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `upstream_timeout`"
            }
          }
        },
        "security": [
          {
            "oauth2": [
              "integrations:read"
            ]
          }
        ],
        "summary": "Get an integration",
        "tags": [
          "integrations"
        ],
        "x-kiosa-availability": "partner_preview",
        "x-kiosa-de": {
          "description": "Liefert den vollständigen Status einer Integration: Verbindung, Erstimport, letzter Import und offene Punkte. Ist nichts verbunden, ist der Status `not_connected` (kein 404). Nach einem PUT mit Antwort 202 fragst du hier ab, bis der Status nicht mehr `testing` ist.",
          "summary": "Integration abfragen"
        }
      },
      "put": {
        "description": "Submits the provider credentials. Kiosa verifies them with the provider right away (key valid, all required permissions present), stores them encrypted and maps branches with an unambiguously matching name to Kiosa locations. Once every branch is mapped, the initial import starts from 1 January of the previous year. The call is idempotent: the same body changes nothing and starts no second import; a new key replaces the old one. A new `company_id` discards all existing mappings. The business sees in Kiosa that the integration was connected.",
        "operationId": "putIntegration",
        "parameters": [
          {
            "description": "Integration provider. v1 supports `ordio` only.",
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "enum": [
                "ordio"
              ],
              "type": "string"
            },
            "x-kiosa-de": {
              "description": "Anbieter der Integration. v1 unterstützt nur `ordio`."
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_key": "<your-ordio-api-key>",
                "company_id": "1234",
                "key_expires_at": "2027-11-30T23:59:59+01:00"
              },
              "schema": {
                "$ref": "#/components/schemas/OrdioCredentials"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "api_key_last4": "x9Qa",
                  "branches": [
                    {
                      "branch_id": "4711",
                      "location_id": "cm3loc0000city0000000001",
                      "mapping": "mapped",
                      "name": "Trattoria City",
                      "suggested_location_id": null
                    },
                    {
                      "branch_id": "4712",
                      "location_id": null,
                      "mapping": "unmapped",
                      "name": "Trattoria am Hafen GmbH",
                      "suggested_location_id": "cm3loc0000hafen000000002"
                    },
                    {
                      "branch_id": "4713",
                      "location_id": null,
                      "mapping": "ignored",
                      "name": "Zentrale Verwaltung",
                      "suggested_location_id": null
                    }
                  ],
                  "company_id": "1234",
                  "connected_at": "2026-11-24T10:15:02+01:00",
                  "initial_import": {
                    "since": "2025-01-01",
                    "status": "waiting_for_mapping"
                  },
                  "issues": [
                    {
                      "code": "unmapped_branches",
                      "detail": "1 ordio branch is not mapped to a Kiosa location yet."
                    }
                  ],
                  "key_expires_at": "2027-11-30T23:59:59+01:00",
                  "last_import": null,
                  "provider": "ordio",
                  "status": "needs_mapping"
                },
                "schema": {
                  "$ref": "#/components/schemas/IntegrationWithBranches"
                }
              }
            },
            "description": "Credentials verified and stored, including the mapping suggestion.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Zugangsdaten geprüft und gespeichert, mit Zuordnungsvorschlag."
            }
          },
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "api_key_last4": "x9Qa",
                  "branches": [],
                  "company_id": "1234",
                  "connected_at": "2026-11-24T10:15:02+01:00",
                  "initial_import": null,
                  "issues": [],
                  "key_expires_at": "2027-11-30T23:59:59+01:00",
                  "last_import": null,
                  "provider": "ordio",
                  "status": "testing"
                },
                "schema": {
                  "$ref": "#/components/schemas/IntegrationWithBranches"
                }
              }
            },
            "description": "Verification takes longer than 10 seconds. Status `testing`; `GET /integrations/{provider}` returns the result.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Die Prüfung dauert länger als 10 Sekunden. Status `testing`; das Ergebnis liefert `GET /integrations/{provider}`."
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "invalid_token": {
                    "summary": "Invalid token",
                    "value": {
                      "code": "invalid_token",
                      "detail": "The access token is missing, expired, revoked or not issued for this API. Use the refresh token to obtain a new access token; if that fails, the business has to grant access again.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 401,
                      "title": "Invalid token",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#invalid_token"
                    },
                    "x-kiosa-de": {
                      "summary": "Token ungültig"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `invalid_token`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWW-Authenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `invalid_token`"
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "admin_required": {
                    "summary": "Admin required",
                    "value": {
                      "code": "admin_required",
                      "detail": "Write calls require the user who granted access to still be an admin of the business. An admin has to grant access again.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Admin required",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#admin_required"
                    },
                    "x-kiosa-de": {
                      "summary": "Admin-Recht nötig"
                    }
                  },
                  "insufficient_scope": {
                    "summary": "Insufficient scope",
                    "value": {
                      "code": "insufficient_scope",
                      "detail": "The token does not carry the scope this endpoint requires. Request the scope during authorization; the WWW-Authenticate header names it.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Insufficient scope",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#insufficient_scope"
                    },
                    "x-kiosa-de": {
                      "summary": "Scope fehlt"
                    }
                  },
                  "partner_apps_disabled": {
                    "summary": "Partner apps disabled",
                    "value": {
                      "code": "partner_apps_disabled",
                      "detail": "The business has turned off partner apps in Kiosa (Settings → Connected apps). Calls are rejected until it turns them back on.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Partner apps disabled",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#partner_apps_disabled"
                    },
                    "x-kiosa-de": {
                      "summary": "Partner-Apps abgeschaltet"
                    }
                  },
                  "partner_not_approved": {
                    "summary": "Partner not approved",
                    "value": {
                      "code": "partner_not_approved",
                      "detail": "The Kiosa API is only open to approved partners. Your client is not registered as a partner. Write to kontakt@kiosa.ai to apply for approval. Authorization already rejects such a client (`unauthorized_client`); calls get this code when the token belongs to a partner that has lost its approval since.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Partner not approved",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#partner_not_approved"
                    },
                    "x-kiosa-de": {
                      "summary": "Partner nicht freigegeben"
                    }
                  },
                  "partner_suspended": {
                    "summary": "Partner suspended",
                    "value": {
                      "code": "partner_suspended",
                      "detail": "Kiosa has suspended this client. All of its tokens are rejected with immediate effect.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Partner suspended",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#partner_suspended"
                    },
                    "x-kiosa-de": {
                      "summary": "Partner gesperrt"
                    }
                  },
                  "provider_not_allowed": {
                    "summary": "Provider not allowed",
                    "value": {
                      "code": "provider_not_allowed",
                      "detail": "This client may not write integrations of this provider. Each partner is approved only for the providers agreed with Kiosa.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Provider not allowed",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#provider_not_allowed"
                    },
                    "x-kiosa-de": {
                      "summary": "Anbieter nicht erlaubt"
                    }
                  },
                  "user_inactive": {
                    "summary": "User inactive",
                    "value": {
                      "code": "user_inactive",
                      "detail": "The user who granted access has been deactivated, is no longer a member of the business or no longer has a sufficient role. An admin of the business has to grant access again.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "User inactive",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#user_inactive"
                    },
                    "x-kiosa-de": {
                      "summary": "Nutzer nicht mehr berechtigt"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `insufficient_scope`, `user_inactive`, `partner_not_approved`, `partner_suspended`, `partner_apps_disabled`, `admin_required`, `provider_not_allowed`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWW-Authenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `insufficient_scope`, `user_inactive`, `partner_not_approved`, `partner_suspended`, `partner_apps_disabled`, `admin_required`, `provider_not_allowed`"
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "not_found": {
                    "summary": "Not found",
                    "value": {
                      "code": "not_found",
                      "detail": "The resource does not exist or the provider is not supported by the API.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 404,
                      "title": "Not found",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#not_found"
                    },
                    "x-kiosa-de": {
                      "summary": "Nicht gefunden"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `not_found`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `not_found`"
            }
          },
          "413": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "payload_too_large": {
                    "summary": "Payload too large",
                    "value": {
                      "code": "payload_too_large",
                      "detail": "The request body exceeds 64 KB. Kiosa did not process the request.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 413,
                      "title": "Payload too large",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#payload_too_large"
                    },
                    "x-kiosa-de": {
                      "summary": "Anfrage zu groß"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `payload_too_large`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `payload_too_large`"
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "missing_provider_scopes": {
                    "summary": "Missing provider scopes",
                    "value": {
                      "code": "missing_provider_scopes",
                      "detail": "The key works but lacks permissions Kiosa needs for the import; missing_scopes lists them. Issue a key with all permissions and submit it again.",
                      "missing_scopes": [
                        "wages:read"
                      ],
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 422,
                      "title": "Missing provider scopes",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#missing_provider_scopes"
                    },
                    "x-kiosa-de": {
                      "summary": "Schlüssel hat zu wenige Rechte"
                    }
                  },
                  "provider_auth_failed": {
                    "summary": "Provider rejected credentials",
                    "value": {
                      "code": "provider_auth_failed",
                      "detail": "The provider rejected the credentials (wrong or expired key, or a key of another company). Kiosa stored nothing.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 422,
                      "title": "Provider rejected credentials",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#provider_auth_failed"
                    },
                    "x-kiosa-de": {
                      "summary": "Anbieter lehnt Zugang ab"
                    }
                  },
                  "validation_failed": {
                    "summary": "Validation failed",
                    "value": {
                      "code": "validation_failed",
                      "detail": "The body or a parameter does not match the schema, for example a missing or unknown field or a location ID that does not belong to this business. invalid_params lists every affected field.",
                      "invalid_params": [
                        {
                          "name": "company_id",
                          "reason": "Required"
                        }
                      ],
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 422,
                      "title": "Validation failed",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#validation_failed"
                    },
                    "x-kiosa-de": {
                      "summary": "Anfrage ungültig"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `validation_failed`, `provider_auth_failed`, `missing_provider_scopes`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `validation_failed`, `provider_auth_failed`, `missing_provider_scopes`"
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "rate_limited": {
                    "summary": "Rate limited",
                    "value": {
                      "code": "rate_limited",
                      "detail": "Each client may send 60 requests per minute per business. Wait for the number of seconds in the Retry-After header, then retry.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 429,
                      "title": "Rate limited",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#rate_limited"
                    },
                    "x-kiosa-de": {
                      "summary": "Zu viele Anfragen"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `rate_limited`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `rate_limited`"
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "internal_error": {
                    "summary": "Internal error",
                    "value": {
                      "code": "internal_error",
                      "detail": "An unexpected error occurred at Kiosa. Retry later and quote the request_id when contacting support.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 500,
                      "title": "Internal error",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#internal_error"
                    },
                    "x-kiosa-de": {
                      "summary": "Interner Fehler"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `internal_error`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `internal_error`"
            }
          },
          "502": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "provider_unreachable": {
                    "summary": "Provider unreachable",
                    "value": {
                      "code": "provider_unreachable",
                      "detail": "Kiosa could not reach the provider or received an unexpected response. Retry later; repeating the PUT is idempotent.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 502,
                      "title": "Provider unreachable",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#provider_unreachable"
                    },
                    "x-kiosa-de": {
                      "summary": "Anbieter nicht erreichbar"
                    }
                  },
                  "upstream_unavailable": {
                    "summary": "Upstream unavailable",
                    "value": {
                      "code": "upstream_unavailable",
                      "detail": "The Kiosa server hosting the business could not be reached or sent an invalid response. Retry later; write calls are idempotent.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 502,
                      "title": "Upstream unavailable",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#upstream_unavailable"
                    },
                    "x-kiosa-de": {
                      "summary": "Kiosa-Server nicht erreichbar"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `upstream_unavailable`, `provider_unreachable`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `upstream_unavailable`, `provider_unreachable`"
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "service_unavailable": {
                    "summary": "Service unavailable",
                    "value": {
                      "code": "service_unavailable",
                      "detail": "Kiosa is temporarily overloaded or unavailable. Wait for the number of seconds in the Retry-After header, if present, then retry.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 503,
                      "title": "Service unavailable",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#service_unavailable"
                    },
                    "x-kiosa-de": {
                      "summary": "Vorübergehend nicht verfügbar"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `service_unavailable`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `service_unavailable`"
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "upstream_timeout": {
                    "summary": "Upstream timeout",
                    "value": {
                      "code": "upstream_timeout",
                      "detail": "The Kiosa server hosting the business did not respond in time. The matching GET shows whether a write call already took effect; retrying is idempotent.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 504,
                      "title": "Upstream timeout",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#upstream_timeout"
                    },
                    "x-kiosa-de": {
                      "summary": "Zeitüberschreitung"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `upstream_timeout`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `upstream_timeout`"
            }
          }
        },
        "security": [
          {
            "oauth2": [
              "integrations:write"
            ]
          }
        ],
        "summary": "Connect an integration",
        "tags": [
          "integrations"
        ],
        "x-kiosa-availability": "partner_preview",
        "x-kiosa-de": {
          "description": "Übergibt die Zugangsdaten des Anbieters. Kiosa prüft sie sofort beim Anbieter (Schlüssel gültig, alle nötigen Rechte vorhanden), speichert sie verschlüsselt und ordnet Filialen mit eindeutig gleichem Namen automatisch Kiosa-Standorten zu. Sind alle Filialen zugeordnet, startet der Erstimport ab 1. Januar des Vorjahres. Der Aufruf ist idempotent: derselbe Body ändert nichts und startet keinen zweiten Import; ein neuer Schlüssel ersetzt den alten. Eine neue `company_id` verwirft alle bisherigen Zuordnungen. Der Betrieb sieht in Kiosa, dass die Integration verbunden wurde.",
          "summary": "Integration verbinden"
        }
      }
    },
    "/integrations/{provider}/branch-mappings": {
      "put": {
        "description": "Maps provider branches to Kiosa locations or ignores whole branches. Only the listed branches change. `location_id` must be a location of this business (see `GET /locations`). Once every branch is mapped or ignored, the status changes to `active` and the initial import starts. Mappings by working area are maintained by Kiosa.",
        "operationId": "putIntegrationBranchMappings",
        "parameters": [
          {
            "description": "Integration provider. v1 supports `ordio` only.",
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "enum": [
                "ordio"
              ],
              "type": "string"
            },
            "x-kiosa-de": {
              "description": "Anbieter der Integration. v1 unterstützt nur `ordio`."
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "mappings": [
                  {
                    "branch_id": "4712",
                    "location_id": "cm3loc0000hafen000000002"
                  },
                  {
                    "branch_id": "4713",
                    "ignore": true
                  }
                ]
              },
              "schema": {
                "$ref": "#/components/schemas/BranchMappingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "api_key_last4": "x9Qa",
                  "branches": [
                    {
                      "branch_id": "4711",
                      "location_id": "cm3loc0000city0000000001",
                      "mapping": "mapped",
                      "name": "Trattoria City",
                      "suggested_location_id": null
                    },
                    {
                      "branch_id": "4712",
                      "location_id": "cm3loc0000hafen000000002",
                      "mapping": "mapped",
                      "name": "Trattoria am Hafen GmbH",
                      "suggested_location_id": null
                    },
                    {
                      "branch_id": "4713",
                      "location_id": null,
                      "mapping": "ignored",
                      "name": "Zentrale Verwaltung",
                      "suggested_location_id": null
                    }
                  ],
                  "company_id": "1234",
                  "connected_at": "2026-11-24T10:15:02+01:00",
                  "initial_import": {
                    "since": "2025-01-01",
                    "status": "running"
                  },
                  "issues": [],
                  "key_expires_at": "2027-11-30T23:59:59+01:00",
                  "last_import": {
                    "finished_at": null,
                    "started_at": "2026-11-24T10:16:40+01:00",
                    "status": "running"
                  },
                  "provider": "ordio",
                  "status": "active"
                },
                "schema": {
                  "$ref": "#/components/schemas/IntegrationWithBranches"
                }
              }
            },
            "description": "Mapping stored; integration status including branches.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Zuordnung gespeichert; Status der Integration samt Filialen."
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "invalid_token": {
                    "summary": "Invalid token",
                    "value": {
                      "code": "invalid_token",
                      "detail": "The access token is missing, expired, revoked or not issued for this API. Use the refresh token to obtain a new access token; if that fails, the business has to grant access again.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 401,
                      "title": "Invalid token",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#invalid_token"
                    },
                    "x-kiosa-de": {
                      "summary": "Token ungültig"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `invalid_token`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWW-Authenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `invalid_token`"
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "admin_required": {
                    "summary": "Admin required",
                    "value": {
                      "code": "admin_required",
                      "detail": "Write calls require the user who granted access to still be an admin of the business. An admin has to grant access again.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Admin required",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#admin_required"
                    },
                    "x-kiosa-de": {
                      "summary": "Admin-Recht nötig"
                    }
                  },
                  "insufficient_scope": {
                    "summary": "Insufficient scope",
                    "value": {
                      "code": "insufficient_scope",
                      "detail": "The token does not carry the scope this endpoint requires. Request the scope during authorization; the WWW-Authenticate header names it.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Insufficient scope",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#insufficient_scope"
                    },
                    "x-kiosa-de": {
                      "summary": "Scope fehlt"
                    }
                  },
                  "partner_apps_disabled": {
                    "summary": "Partner apps disabled",
                    "value": {
                      "code": "partner_apps_disabled",
                      "detail": "The business has turned off partner apps in Kiosa (Settings → Connected apps). Calls are rejected until it turns them back on.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Partner apps disabled",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#partner_apps_disabled"
                    },
                    "x-kiosa-de": {
                      "summary": "Partner-Apps abgeschaltet"
                    }
                  },
                  "partner_not_approved": {
                    "summary": "Partner not approved",
                    "value": {
                      "code": "partner_not_approved",
                      "detail": "The Kiosa API is only open to approved partners. Your client is not registered as a partner. Write to kontakt@kiosa.ai to apply for approval. Authorization already rejects such a client (`unauthorized_client`); calls get this code when the token belongs to a partner that has lost its approval since.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Partner not approved",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#partner_not_approved"
                    },
                    "x-kiosa-de": {
                      "summary": "Partner nicht freigegeben"
                    }
                  },
                  "partner_suspended": {
                    "summary": "Partner suspended",
                    "value": {
                      "code": "partner_suspended",
                      "detail": "Kiosa has suspended this client. All of its tokens are rejected with immediate effect.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Partner suspended",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#partner_suspended"
                    },
                    "x-kiosa-de": {
                      "summary": "Partner gesperrt"
                    }
                  },
                  "provider_not_allowed": {
                    "summary": "Provider not allowed",
                    "value": {
                      "code": "provider_not_allowed",
                      "detail": "This client may not write integrations of this provider. Each partner is approved only for the providers agreed with Kiosa.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Provider not allowed",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#provider_not_allowed"
                    },
                    "x-kiosa-de": {
                      "summary": "Anbieter nicht erlaubt"
                    }
                  },
                  "user_inactive": {
                    "summary": "User inactive",
                    "value": {
                      "code": "user_inactive",
                      "detail": "The user who granted access has been deactivated, is no longer a member of the business or no longer has a sufficient role. An admin of the business has to grant access again.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "User inactive",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#user_inactive"
                    },
                    "x-kiosa-de": {
                      "summary": "Nutzer nicht mehr berechtigt"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `insufficient_scope`, `user_inactive`, `partner_not_approved`, `partner_suspended`, `partner_apps_disabled`, `admin_required`, `provider_not_allowed`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWW-Authenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `insufficient_scope`, `user_inactive`, `partner_not_approved`, `partner_suspended`, `partner_apps_disabled`, `admin_required`, `provider_not_allowed`"
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "not_found": {
                    "summary": "Not found",
                    "value": {
                      "code": "not_found",
                      "detail": "The resource does not exist or the provider is not supported by the API.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 404,
                      "title": "Not found",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#not_found"
                    },
                    "x-kiosa-de": {
                      "summary": "Nicht gefunden"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `not_found`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `not_found`"
            }
          },
          "409": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "mapping_conflict": {
                    "summary": "Mapping conflict",
                    "value": {
                      "code": "mapping_conflict",
                      "detail": "The mapping references branches that no longer belong to the connected company, for example because the credentials changed in the meantime. Fetch the branches again and resend the mapping.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 409,
                      "title": "Mapping conflict",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#mapping_conflict"
                    },
                    "x-kiosa-de": {
                      "summary": "Zuordnung veraltet"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `mapping_conflict`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `mapping_conflict`"
            }
          },
          "413": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "payload_too_large": {
                    "summary": "Payload too large",
                    "value": {
                      "code": "payload_too_large",
                      "detail": "The request body exceeds 64 KB. Kiosa did not process the request.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 413,
                      "title": "Payload too large",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#payload_too_large"
                    },
                    "x-kiosa-de": {
                      "summary": "Anfrage zu groß"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `payload_too_large`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `payload_too_large`"
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "validation_failed": {
                    "summary": "Validation failed",
                    "value": {
                      "code": "validation_failed",
                      "detail": "The body or a parameter does not match the schema, for example a missing or unknown field or a location ID that does not belong to this business. invalid_params lists every affected field.",
                      "invalid_params": [
                        {
                          "name": "company_id",
                          "reason": "Required"
                        }
                      ],
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 422,
                      "title": "Validation failed",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#validation_failed"
                    },
                    "x-kiosa-de": {
                      "summary": "Anfrage ungültig"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `validation_failed`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `validation_failed`"
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "rate_limited": {
                    "summary": "Rate limited",
                    "value": {
                      "code": "rate_limited",
                      "detail": "Each client may send 60 requests per minute per business. Wait for the number of seconds in the Retry-After header, then retry.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 429,
                      "title": "Rate limited",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#rate_limited"
                    },
                    "x-kiosa-de": {
                      "summary": "Zu viele Anfragen"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `rate_limited`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `rate_limited`"
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "internal_error": {
                    "summary": "Internal error",
                    "value": {
                      "code": "internal_error",
                      "detail": "An unexpected error occurred at Kiosa. Retry later and quote the request_id when contacting support.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 500,
                      "title": "Internal error",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#internal_error"
                    },
                    "x-kiosa-de": {
                      "summary": "Interner Fehler"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `internal_error`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `internal_error`"
            }
          },
          "502": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "upstream_unavailable": {
                    "summary": "Upstream unavailable",
                    "value": {
                      "code": "upstream_unavailable",
                      "detail": "The Kiosa server hosting the business could not be reached or sent an invalid response. Retry later; write calls are idempotent.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 502,
                      "title": "Upstream unavailable",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#upstream_unavailable"
                    },
                    "x-kiosa-de": {
                      "summary": "Kiosa-Server nicht erreichbar"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `upstream_unavailable`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `upstream_unavailable`"
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "service_unavailable": {
                    "summary": "Service unavailable",
                    "value": {
                      "code": "service_unavailable",
                      "detail": "Kiosa is temporarily overloaded or unavailable. Wait for the number of seconds in the Retry-After header, if present, then retry.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 503,
                      "title": "Service unavailable",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#service_unavailable"
                    },
                    "x-kiosa-de": {
                      "summary": "Vorübergehend nicht verfügbar"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `service_unavailable`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `service_unavailable`"
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "upstream_timeout": {
                    "summary": "Upstream timeout",
                    "value": {
                      "code": "upstream_timeout",
                      "detail": "The Kiosa server hosting the business did not respond in time. The matching GET shows whether a write call already took effect; retrying is idempotent.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 504,
                      "title": "Upstream timeout",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#upstream_timeout"
                    },
                    "x-kiosa-de": {
                      "summary": "Zeitüberschreitung"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `upstream_timeout`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `upstream_timeout`"
            }
          }
        },
        "security": [
          {
            "oauth2": [
              "integrations:write"
            ]
          }
        ],
        "summary": "Map branches",
        "tags": [
          "integrations"
        ],
        "x-kiosa-availability": "partner_preview",
        "x-kiosa-de": {
          "description": "Ordnet Filialen beim Anbieter Kiosa-Standorten zu oder ignoriert ganze Filialen. Nur die genannten Filialen ändern sich. `location_id` muss ein Standort dieses Betriebs sein (siehe `GET /locations`). Sind danach alle Filialen zugeordnet oder ignoriert, wechselt der Status auf `active` und der Erstimport startet. Zuordnungen nach Arbeitsbereichen pflegt Kiosa selbst.",
          "summary": "Filialen zuordnen"
        }
      }
    },
    "/integrations/{provider}/branches": {
      "get": {
        "description": "Returns the branches at the provider with their mapped Kiosa location or a suggestion. If the integration is not connected, the call returns 404 `not_found`.",
        "operationId": "listIntegrationBranches",
        "parameters": [
          {
            "description": "Integration provider. v1 supports `ordio` only.",
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "enum": [
                "ordio"
              ],
              "type": "string"
            },
            "x-kiosa-de": {
              "description": "Anbieter der Integration. v1 unterstützt nur `ordio`."
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": [
                    {
                      "branch_id": "4711",
                      "location_id": "cm3loc0000city0000000001",
                      "mapping": "mapped",
                      "name": "Trattoria City",
                      "suggested_location_id": null
                    },
                    {
                      "branch_id": "4712",
                      "location_id": null,
                      "mapping": "unmapped",
                      "name": "Trattoria am Hafen GmbH",
                      "suggested_location_id": "cm3loc0000hafen000000002"
                    },
                    {
                      "branch_id": "4713",
                      "location_id": null,
                      "mapping": "ignored",
                      "name": "Zentrale Verwaltung",
                      "suggested_location_id": null
                    }
                  ]
                },
                "schema": {
                  "$ref": "#/components/schemas/BranchList"
                }
              }
            },
            "description": "Branches at the provider.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Filialen beim Anbieter."
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "invalid_token": {
                    "summary": "Invalid token",
                    "value": {
                      "code": "invalid_token",
                      "detail": "The access token is missing, expired, revoked or not issued for this API. Use the refresh token to obtain a new access token; if that fails, the business has to grant access again.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 401,
                      "title": "Invalid token",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#invalid_token"
                    },
                    "x-kiosa-de": {
                      "summary": "Token ungültig"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `invalid_token`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWW-Authenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `invalid_token`"
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "insufficient_scope": {
                    "summary": "Insufficient scope",
                    "value": {
                      "code": "insufficient_scope",
                      "detail": "The token does not carry the scope this endpoint requires. Request the scope during authorization; the WWW-Authenticate header names it.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Insufficient scope",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#insufficient_scope"
                    },
                    "x-kiosa-de": {
                      "summary": "Scope fehlt"
                    }
                  },
                  "partner_apps_disabled": {
                    "summary": "Partner apps disabled",
                    "value": {
                      "code": "partner_apps_disabled",
                      "detail": "The business has turned off partner apps in Kiosa (Settings → Connected apps). Calls are rejected until it turns them back on.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Partner apps disabled",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#partner_apps_disabled"
                    },
                    "x-kiosa-de": {
                      "summary": "Partner-Apps abgeschaltet"
                    }
                  },
                  "partner_not_approved": {
                    "summary": "Partner not approved",
                    "value": {
                      "code": "partner_not_approved",
                      "detail": "The Kiosa API is only open to approved partners. Your client is not registered as a partner. Write to kontakt@kiosa.ai to apply for approval. Authorization already rejects such a client (`unauthorized_client`); calls get this code when the token belongs to a partner that has lost its approval since.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Partner not approved",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#partner_not_approved"
                    },
                    "x-kiosa-de": {
                      "summary": "Partner nicht freigegeben"
                    }
                  },
                  "partner_suspended": {
                    "summary": "Partner suspended",
                    "value": {
                      "code": "partner_suspended",
                      "detail": "Kiosa has suspended this client. All of its tokens are rejected with immediate effect.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Partner suspended",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#partner_suspended"
                    },
                    "x-kiosa-de": {
                      "summary": "Partner gesperrt"
                    }
                  },
                  "user_inactive": {
                    "summary": "User inactive",
                    "value": {
                      "code": "user_inactive",
                      "detail": "The user who granted access has been deactivated, is no longer a member of the business or no longer has a sufficient role. An admin of the business has to grant access again.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "User inactive",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#user_inactive"
                    },
                    "x-kiosa-de": {
                      "summary": "Nutzer nicht mehr berechtigt"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `insufficient_scope`, `user_inactive`, `partner_not_approved`, `partner_suspended`, `partner_apps_disabled`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWW-Authenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `insufficient_scope`, `user_inactive`, `partner_not_approved`, `partner_suspended`, `partner_apps_disabled`"
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "not_found": {
                    "summary": "Not found",
                    "value": {
                      "code": "not_found",
                      "detail": "The resource does not exist or the provider is not supported by the API.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 404,
                      "title": "Not found",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#not_found"
                    },
                    "x-kiosa-de": {
                      "summary": "Nicht gefunden"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `not_found`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `not_found`"
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "rate_limited": {
                    "summary": "Rate limited",
                    "value": {
                      "code": "rate_limited",
                      "detail": "Each client may send 60 requests per minute per business. Wait for the number of seconds in the Retry-After header, then retry.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 429,
                      "title": "Rate limited",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#rate_limited"
                    },
                    "x-kiosa-de": {
                      "summary": "Zu viele Anfragen"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `rate_limited`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `rate_limited`"
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "internal_error": {
                    "summary": "Internal error",
                    "value": {
                      "code": "internal_error",
                      "detail": "An unexpected error occurred at Kiosa. Retry later and quote the request_id when contacting support.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 500,
                      "title": "Internal error",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#internal_error"
                    },
                    "x-kiosa-de": {
                      "summary": "Interner Fehler"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `internal_error`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `internal_error`"
            }
          },
          "502": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "provider_unreachable": {
                    "summary": "Provider unreachable",
                    "value": {
                      "code": "provider_unreachable",
                      "detail": "Kiosa could not reach the provider or received an unexpected response. Retry later; repeating the PUT is idempotent.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 502,
                      "title": "Provider unreachable",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#provider_unreachable"
                    },
                    "x-kiosa-de": {
                      "summary": "Anbieter nicht erreichbar"
                    }
                  },
                  "upstream_unavailable": {
                    "summary": "Upstream unavailable",
                    "value": {
                      "code": "upstream_unavailable",
                      "detail": "The Kiosa server hosting the business could not be reached or sent an invalid response. Retry later; write calls are idempotent.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 502,
                      "title": "Upstream unavailable",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#upstream_unavailable"
                    },
                    "x-kiosa-de": {
                      "summary": "Kiosa-Server nicht erreichbar"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `upstream_unavailable`, `provider_unreachable`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `upstream_unavailable`, `provider_unreachable`"
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "service_unavailable": {
                    "summary": "Service unavailable",
                    "value": {
                      "code": "service_unavailable",
                      "detail": "Kiosa is temporarily overloaded or unavailable. Wait for the number of seconds in the Retry-After header, if present, then retry.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 503,
                      "title": "Service unavailable",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#service_unavailable"
                    },
                    "x-kiosa-de": {
                      "summary": "Vorübergehend nicht verfügbar"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `service_unavailable`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `service_unavailable`"
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "upstream_timeout": {
                    "summary": "Upstream timeout",
                    "value": {
                      "code": "upstream_timeout",
                      "detail": "The Kiosa server hosting the business did not respond in time. The matching GET shows whether a write call already took effect; retrying is idempotent.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 504,
                      "title": "Upstream timeout",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#upstream_timeout"
                    },
                    "x-kiosa-de": {
                      "summary": "Zeitüberschreitung"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `upstream_timeout`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `upstream_timeout`"
            }
          }
        },
        "security": [
          {
            "oauth2": [
              "integrations:read"
            ]
          }
        ],
        "summary": "List branches",
        "tags": [
          "integrations"
        ],
        "x-kiosa-availability": "partner_preview",
        "x-kiosa-de": {
          "description": "Liefert die Filialen beim Anbieter mit ihrem zugeordneten Kiosa-Standort oder einem Vorschlag. Ist die Integration nicht verbunden, antwortet der Aufruf mit 404 `not_found`.",
          "summary": "Filialen auflisten"
        }
      }
    },
    "/locations": {
      "get": {
        "description": "Returns all locations of the business with ID, name and address. Use the IDs to map provider branches via `PUT /integrations/{provider}/branch-mappings`.",
        "operationId": "listLocations",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": [
                    {
                      "address": {
                        "city": "Hamburg",
                        "country": "DE",
                        "postal_code": "20095",
                        "street": "Musterstraße 1"
                      },
                      "id": "cm3loc0000city0000000001",
                      "name": "Trattoria City"
                    },
                    {
                      "address": {
                        "city": "Hamburg",
                        "country": "DE",
                        "postal_code": "20457",
                        "street": "Hafenweg 7"
                      },
                      "id": "cm3loc0000hafen000000002",
                      "name": "Trattoria am Hafen"
                    }
                  ]
                },
                "schema": {
                  "$ref": "#/components/schemas/LocationList"
                }
              }
            },
            "description": "All locations of the business.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Alle Standorte des Betriebs."
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "invalid_token": {
                    "summary": "Invalid token",
                    "value": {
                      "code": "invalid_token",
                      "detail": "The access token is missing, expired, revoked or not issued for this API. Use the refresh token to obtain a new access token; if that fails, the business has to grant access again.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 401,
                      "title": "Invalid token",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#invalid_token"
                    },
                    "x-kiosa-de": {
                      "summary": "Token ungültig"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `invalid_token`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWW-Authenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `invalid_token`"
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "insufficient_scope": {
                    "summary": "Insufficient scope",
                    "value": {
                      "code": "insufficient_scope",
                      "detail": "The token does not carry the scope this endpoint requires. Request the scope during authorization; the WWW-Authenticate header names it.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Insufficient scope",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#insufficient_scope"
                    },
                    "x-kiosa-de": {
                      "summary": "Scope fehlt"
                    }
                  },
                  "partner_apps_disabled": {
                    "summary": "Partner apps disabled",
                    "value": {
                      "code": "partner_apps_disabled",
                      "detail": "The business has turned off partner apps in Kiosa (Settings → Connected apps). Calls are rejected until it turns them back on.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Partner apps disabled",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#partner_apps_disabled"
                    },
                    "x-kiosa-de": {
                      "summary": "Partner-Apps abgeschaltet"
                    }
                  },
                  "partner_not_approved": {
                    "summary": "Partner not approved",
                    "value": {
                      "code": "partner_not_approved",
                      "detail": "The Kiosa API is only open to approved partners. Your client is not registered as a partner. Write to kontakt@kiosa.ai to apply for approval. Authorization already rejects such a client (`unauthorized_client`); calls get this code when the token belongs to a partner that has lost its approval since.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Partner not approved",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#partner_not_approved"
                    },
                    "x-kiosa-de": {
                      "summary": "Partner nicht freigegeben"
                    }
                  },
                  "partner_suspended": {
                    "summary": "Partner suspended",
                    "value": {
                      "code": "partner_suspended",
                      "detail": "Kiosa has suspended this client. All of its tokens are rejected with immediate effect.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Partner suspended",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#partner_suspended"
                    },
                    "x-kiosa-de": {
                      "summary": "Partner gesperrt"
                    }
                  },
                  "user_inactive": {
                    "summary": "User inactive",
                    "value": {
                      "code": "user_inactive",
                      "detail": "The user who granted access has been deactivated, is no longer a member of the business or no longer has a sufficient role. An admin of the business has to grant access again.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "User inactive",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#user_inactive"
                    },
                    "x-kiosa-de": {
                      "summary": "Nutzer nicht mehr berechtigt"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `insufficient_scope`, `user_inactive`, `partner_not_approved`, `partner_suspended`, `partner_apps_disabled`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWW-Authenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `insufficient_scope`, `user_inactive`, `partner_not_approved`, `partner_suspended`, `partner_apps_disabled`"
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "rate_limited": {
                    "summary": "Rate limited",
                    "value": {
                      "code": "rate_limited",
                      "detail": "Each client may send 60 requests per minute per business. Wait for the number of seconds in the Retry-After header, then retry.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 429,
                      "title": "Rate limited",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#rate_limited"
                    },
                    "x-kiosa-de": {
                      "summary": "Zu viele Anfragen"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `rate_limited`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `rate_limited`"
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "internal_error": {
                    "summary": "Internal error",
                    "value": {
                      "code": "internal_error",
                      "detail": "An unexpected error occurred at Kiosa. Retry later and quote the request_id when contacting support.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 500,
                      "title": "Internal error",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#internal_error"
                    },
                    "x-kiosa-de": {
                      "summary": "Interner Fehler"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `internal_error`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `internal_error`"
            }
          },
          "502": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "upstream_unavailable": {
                    "summary": "Upstream unavailable",
                    "value": {
                      "code": "upstream_unavailable",
                      "detail": "The Kiosa server hosting the business could not be reached or sent an invalid response. Retry later; write calls are idempotent.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 502,
                      "title": "Upstream unavailable",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#upstream_unavailable"
                    },
                    "x-kiosa-de": {
                      "summary": "Kiosa-Server nicht erreichbar"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `upstream_unavailable`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `upstream_unavailable`"
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "service_unavailable": {
                    "summary": "Service unavailable",
                    "value": {
                      "code": "service_unavailable",
                      "detail": "Kiosa is temporarily overloaded or unavailable. Wait for the number of seconds in the Retry-After header, if present, then retry.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 503,
                      "title": "Service unavailable",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#service_unavailable"
                    },
                    "x-kiosa-de": {
                      "summary": "Vorübergehend nicht verfügbar"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `service_unavailable`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `service_unavailable`"
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "upstream_timeout": {
                    "summary": "Upstream timeout",
                    "value": {
                      "code": "upstream_timeout",
                      "detail": "The Kiosa server hosting the business did not respond in time. The matching GET shows whether a write call already took effect; retrying is idempotent.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 504,
                      "title": "Upstream timeout",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#upstream_timeout"
                    },
                    "x-kiosa-de": {
                      "summary": "Zeitüberschreitung"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `upstream_timeout`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `upstream_timeout`"
            }
          }
        },
        "security": [
          {
            "oauth2": [
              "account:read"
            ]
          }
        ],
        "summary": "List locations",
        "tags": [
          "account"
        ],
        "x-kiosa-availability": "partner_preview",
        "x-kiosa-de": {
          "description": "Liefert alle Standorte des Betriebs mit ID, Name und Adresse. Die IDs brauchst du, um Filialen eines Anbieters per `PUT /integrations/{provider}/branch-mappings` zuzuordnen.",
          "summary": "Standorte auflisten"
        }
      }
    },
    "/me": {
      "get": {
        "description": "Returns the business that granted access, when access was granted and the granted scopes. A good first call after authorization to link the business in your system.",
        "operationId": "getMe",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "account": {
                    "id": "cm3acc0000trattoria00001",
                    "name": "Trattoria Beispiel GmbH",
                    "slug": "trattoria-beispiel"
                  },
                  "consented_at": "2026-11-24T09:30:00+01:00",
                  "scopes": [
                    "account:read",
                    "integrations:write"
                  ]
                },
                "schema": {
                  "$ref": "#/components/schemas/Me"
                }
              }
            },
            "description": "The connection of the token.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Die Verbindung des Tokens."
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "invalid_token": {
                    "summary": "Invalid token",
                    "value": {
                      "code": "invalid_token",
                      "detail": "The access token is missing, expired, revoked or not issued for this API. Use the refresh token to obtain a new access token; if that fails, the business has to grant access again.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 401,
                      "title": "Invalid token",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#invalid_token"
                    },
                    "x-kiosa-de": {
                      "summary": "Token ungültig"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `invalid_token`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWW-Authenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `invalid_token`"
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "insufficient_scope": {
                    "summary": "Insufficient scope",
                    "value": {
                      "code": "insufficient_scope",
                      "detail": "The token does not carry the scope this endpoint requires. Request the scope during authorization; the WWW-Authenticate header names it.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Insufficient scope",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#insufficient_scope"
                    },
                    "x-kiosa-de": {
                      "summary": "Scope fehlt"
                    }
                  },
                  "partner_apps_disabled": {
                    "summary": "Partner apps disabled",
                    "value": {
                      "code": "partner_apps_disabled",
                      "detail": "The business has turned off partner apps in Kiosa (Settings → Connected apps). Calls are rejected until it turns them back on.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Partner apps disabled",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#partner_apps_disabled"
                    },
                    "x-kiosa-de": {
                      "summary": "Partner-Apps abgeschaltet"
                    }
                  },
                  "partner_not_approved": {
                    "summary": "Partner not approved",
                    "value": {
                      "code": "partner_not_approved",
                      "detail": "The Kiosa API is only open to approved partners. Your client is not registered as a partner. Write to kontakt@kiosa.ai to apply for approval. Authorization already rejects such a client (`unauthorized_client`); calls get this code when the token belongs to a partner that has lost its approval since.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Partner not approved",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#partner_not_approved"
                    },
                    "x-kiosa-de": {
                      "summary": "Partner nicht freigegeben"
                    }
                  },
                  "partner_suspended": {
                    "summary": "Partner suspended",
                    "value": {
                      "code": "partner_suspended",
                      "detail": "Kiosa has suspended this client. All of its tokens are rejected with immediate effect.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "Partner suspended",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#partner_suspended"
                    },
                    "x-kiosa-de": {
                      "summary": "Partner gesperrt"
                    }
                  },
                  "user_inactive": {
                    "summary": "User inactive",
                    "value": {
                      "code": "user_inactive",
                      "detail": "The user who granted access has been deactivated, is no longer a member of the business or no longer has a sufficient role. An admin of the business has to grant access again.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 403,
                      "title": "User inactive",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#user_inactive"
                    },
                    "x-kiosa-de": {
                      "summary": "Nutzer nicht mehr berechtigt"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `insufficient_scope`, `user_inactive`, `partner_not_approved`, `partner_suspended`, `partner_apps_disabled`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWW-Authenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `insufficient_scope`, `user_inactive`, `partner_not_approved`, `partner_suspended`, `partner_apps_disabled`"
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "rate_limited": {
                    "summary": "Rate limited",
                    "value": {
                      "code": "rate_limited",
                      "detail": "Each client may send 60 requests per minute per business. Wait for the number of seconds in the Retry-After header, then retry.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 429,
                      "title": "Rate limited",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#rate_limited"
                    },
                    "x-kiosa-de": {
                      "summary": "Zu viele Anfragen"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `rate_limited`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `rate_limited`"
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "internal_error": {
                    "summary": "Internal error",
                    "value": {
                      "code": "internal_error",
                      "detail": "An unexpected error occurred at Kiosa. Retry later and quote the request_id when contacting support.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 500,
                      "title": "Internal error",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#internal_error"
                    },
                    "x-kiosa-de": {
                      "summary": "Interner Fehler"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `internal_error`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `internal_error`"
            }
          },
          "502": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "upstream_unavailable": {
                    "summary": "Upstream unavailable",
                    "value": {
                      "code": "upstream_unavailable",
                      "detail": "The Kiosa server hosting the business could not be reached or sent an invalid response. Retry later; write calls are idempotent.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 502,
                      "title": "Upstream unavailable",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#upstream_unavailable"
                    },
                    "x-kiosa-de": {
                      "summary": "Kiosa-Server nicht erreichbar"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `upstream_unavailable`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `upstream_unavailable`"
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "service_unavailable": {
                    "summary": "Service unavailable",
                    "value": {
                      "code": "service_unavailable",
                      "detail": "Kiosa is temporarily overloaded or unavailable. Wait for the number of seconds in the Retry-After header, if present, then retry.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 503,
                      "title": "Service unavailable",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#service_unavailable"
                    },
                    "x-kiosa-de": {
                      "summary": "Vorübergehend nicht verfügbar"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `service_unavailable`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `service_unavailable`"
            }
          },
          "504": {
            "content": {
              "application/problem+json": {
                "examples": {
                  "upstream_timeout": {
                    "summary": "Upstream timeout",
                    "value": {
                      "code": "upstream_timeout",
                      "detail": "The Kiosa server hosting the business did not respond in time. The matching GET shows whether a write call already took effect; retrying is idempotent.",
                      "request_id": "req_01JDX5Q8M3V8F2K7ZB9T4N6C1A",
                      "status": 504,
                      "title": "Upstream timeout",
                      "type": "https://docs.kiosa.ai/en/reference/errors/#upstream_timeout"
                    },
                    "x-kiosa-de": {
                      "summary": "Zeitüberschreitung"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error: `upstream_timeout`",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "x-kiosa-de": {
              "description": "Fehler: `upstream_timeout`"
            }
          }
        },
        "security": [
          {
            "oauth2": [
              "account:read"
            ]
          }
        ],
        "summary": "Get the connection",
        "tags": [
          "account"
        ],
        "x-kiosa-availability": "partner_preview",
        "x-kiosa-de": {
          "description": "Liefert den Betrieb, der den Zugriff erteilt hat, den Zeitpunkt der Zustimmung und die gewährten Scopes. Gut als erster Aufruf nach dem Login, um den Betrieb in deinem System zuzuordnen.",
          "summary": "Verbindung abfragen"
        }
      }
    }
  },
  "security": [
    {
      "oauth2": []
    }
  ],
  "servers": [
    {
      "url": "https://api.kiosa.ai/v1"
    }
  ],
  "tags": [
    {
      "description": "The business and locations your client has access to.",
      "name": "account",
      "x-kiosa-de": {
        "description": "Betrieb und Standorte, für die dein Client freigegeben ist."
      }
    },
    {
      "description": "Connect, map and disconnect integrations of the business.",
      "name": "integrations",
      "x-kiosa-de": {
        "description": "Integrationen des Betriebs verbinden, zuordnen und trennen."
      }
    }
  ],
  "x-kiosa-errors": {
    "admin_required": {
      "description": "Write calls require the user who granted access to still be an admin of the business. An admin has to grant access again.",
      "status": 403,
      "title": "Admin required",
      "type": "https://docs.kiosa.ai/en/reference/errors/#admin_required",
      "x-kiosa-de": {
        "description": "Schreibende Aufrufe verlangen, dass der Nutzer, der die Verbindung erteilt hat, weiterhin Admin des Betriebs ist. Ein Admin muss die Verbindung neu erteilen.",
        "title": "Admin-Recht nötig"
      }
    },
    "insufficient_scope": {
      "description": "The token does not carry the scope this endpoint requires. Request the scope during authorization; the WWW-Authenticate header names it.",
      "status": 403,
      "title": "Insufficient scope",
      "type": "https://docs.kiosa.ai/en/reference/errors/#insufficient_scope",
      "x-kiosa-de": {
        "description": "Das Token trägt den Scope nicht, den dieser Endpunkt verlangt. Fordere den Scope beim Login an; der Header WWW-Authenticate nennt ihn.",
        "title": "Scope fehlt"
      }
    },
    "internal_error": {
      "description": "An unexpected error occurred at Kiosa. Retry later and quote the request_id when contacting support.",
      "status": 500,
      "title": "Internal error",
      "type": "https://docs.kiosa.ai/en/reference/errors/#internal_error",
      "x-kiosa-de": {
        "description": "Bei Kiosa ist ein unerwarteter Fehler passiert. Wiederhole die Anfrage später und nenne bei Rückfragen die request_id.",
        "title": "Interner Fehler"
      }
    },
    "invalid_token": {
      "description": "The access token is missing, expired, revoked or not issued for this API. Use the refresh token to obtain a new access token; if that fails, the business has to grant access again.",
      "status": 401,
      "title": "Invalid token",
      "type": "https://docs.kiosa.ai/en/reference/errors/#invalid_token",
      "x-kiosa-de": {
        "description": "Das Access Token fehlt, ist abgelaufen, widerrufen oder gilt nicht für diese API. Hol dir mit dem Refresh Token ein neues Access Token; schlägt das fehl, muss der Betrieb die Verbindung neu erteilen.",
        "title": "Token ungültig"
      }
    },
    "mapping_conflict": {
      "description": "The mapping references branches that no longer belong to the connected company, for example because the credentials changed in the meantime. Fetch the branches again and resend the mapping.",
      "status": 409,
      "title": "Mapping conflict",
      "type": "https://docs.kiosa.ai/en/reference/errors/#mapping_conflict",
      "x-kiosa-de": {
        "description": "Die Zuordnung nennt Filialen, die nicht mehr zur verbundenen Firma gehören, etwa weil die Zugangsdaten inzwischen gewechselt wurden. Lies die Filialen neu und sende die Zuordnung erneut.",
        "title": "Zuordnung veraltet"
      }
    },
    "missing_provider_scopes": {
      "description": "The key works but lacks permissions Kiosa needs for the import; missing_scopes lists them. Issue a key with all permissions and submit it again.",
      "status": 422,
      "title": "Missing provider scopes",
      "type": "https://docs.kiosa.ai/en/reference/errors/#missing_provider_scopes",
      "x-kiosa-de": {
        "description": "Der Schlüssel funktioniert, ihm fehlen aber Rechte, die Kiosa für den Import braucht. missing_scopes nennt sie. Stell einen Schlüssel mit allen Rechten aus und übergib ihn erneut.",
        "title": "Schlüssel hat zu wenige Rechte"
      }
    },
    "not_found": {
      "description": "The resource does not exist or the provider is not supported by the API.",
      "status": 404,
      "title": "Not found",
      "type": "https://docs.kiosa.ai/en/reference/errors/#not_found",
      "x-kiosa-de": {
        "description": "Die Ressource gibt es nicht, oder der Anbieter wird von der API nicht unterstützt.",
        "title": "Nicht gefunden"
      }
    },
    "partner_apps_disabled": {
      "description": "The business has turned off partner apps in Kiosa (Settings → Connected apps). Calls are rejected until it turns them back on.",
      "status": 403,
      "title": "Partner apps disabled",
      "type": "https://docs.kiosa.ai/en/reference/errors/#partner_apps_disabled",
      "x-kiosa-de": {
        "description": "Der Betrieb hat Partner-Apps in Kiosa unter Einstellungen → Verbundene Apps abgeschaltet. Erst wenn er sie wieder einschaltet, nimmt die API Aufrufe an.",
        "title": "Partner-Apps abgeschaltet"
      }
    },
    "partner_not_approved": {
      "description": "The Kiosa API is only open to approved partners. Your client is not registered as a partner. Write to kontakt@kiosa.ai to apply for approval. Authorization already rejects such a client (`unauthorized_client`); calls get this code when the token belongs to a partner that has lost its approval since.",
      "status": 403,
      "title": "Partner not approved",
      "type": "https://docs.kiosa.ai/en/reference/errors/#partner_not_approved",
      "x-kiosa-de": {
        "description": "Die Kiosa API steht nur freigegebenen Partnern offen. Dein Client ist nicht als Partner eingetragen. Melde dich unter kontakt@kiosa.ai, um die Freigabe zu beantragen. Beim Login lehnt Kiosa einen solchen Client schon ab (`unauthorized_client`); diesen Code bekommt ein Aufruf mit einem Token, dessen Partner die Freigabe inzwischen verloren hat.",
        "title": "Partner nicht freigegeben"
      }
    },
    "partner_suspended": {
      "description": "Kiosa has suspended this client. All of its tokens are rejected with immediate effect.",
      "status": 403,
      "title": "Partner suspended",
      "type": "https://docs.kiosa.ai/en/reference/errors/#partner_suspended",
      "x-kiosa-de": {
        "description": "Kiosa hat die Freigabe deines Clients gesperrt. Alle Tokens des Clients sind ab sofort ungültig.",
        "title": "Partner gesperrt"
      }
    },
    "payload_too_large": {
      "description": "The request body exceeds 64 KB. Kiosa did not process the request.",
      "status": 413,
      "title": "Payload too large",
      "type": "https://docs.kiosa.ai/en/reference/errors/#payload_too_large",
      "x-kiosa-de": {
        "description": "Der Body ist größer als 64 KB. Kiosa hat die Anfrage nicht verarbeitet.",
        "title": "Anfrage zu groß"
      }
    },
    "provider_auth_failed": {
      "description": "The provider rejected the credentials (wrong or expired key, or a key of another company). Kiosa stored nothing.",
      "status": 422,
      "title": "Provider rejected credentials",
      "type": "https://docs.kiosa.ai/en/reference/errors/#provider_auth_failed",
      "x-kiosa-de": {
        "description": "Der Anbieter hat die Zugangsdaten abgelehnt (Schlüssel falsch, abgelaufen oder gehört zu einer anderen Firma). Kiosa hat nichts gespeichert.",
        "title": "Anbieter lehnt Zugang ab"
      }
    },
    "provider_not_allowed": {
      "description": "This client may not write integrations of this provider. Each partner is approved only for the providers agreed with Kiosa.",
      "status": 403,
      "title": "Provider not allowed",
      "type": "https://docs.kiosa.ai/en/reference/errors/#provider_not_allowed",
      "x-kiosa-de": {
        "description": "Dein Client darf für diesen Anbieter nicht schreiben. Jeder Partner ist nur für die Anbieter freigegeben, die mit Kiosa vereinbart sind.",
        "title": "Anbieter nicht erlaubt"
      }
    },
    "provider_unreachable": {
      "description": "Kiosa could not reach the provider or received an unexpected response. Retry later; repeating the PUT is idempotent.",
      "status": 502,
      "title": "Provider unreachable",
      "type": "https://docs.kiosa.ai/en/reference/errors/#provider_unreachable",
      "x-kiosa-de": {
        "description": "Kiosa konnte den Anbieter nicht erreichen oder hat eine unerwartete Antwort bekommen. Wiederhole die Anfrage später; ein erneuter PUT ist idempotent.",
        "title": "Anbieter nicht erreichbar"
      }
    },
    "rate_limited": {
      "description": "Each client may send 60 requests per minute per business. Wait for the number of seconds in the Retry-After header, then retry.",
      "status": 429,
      "title": "Rate limited",
      "type": "https://docs.kiosa.ai/en/reference/errors/#rate_limited",
      "x-kiosa-de": {
        "description": "Je Client und Betrieb sind 60 Anfragen pro Minute erlaubt. Warte die Sekunden aus dem Header Retry-After ab und wiederhole die Anfrage dann.",
        "title": "Zu viele Anfragen"
      }
    },
    "service_unavailable": {
      "description": "Kiosa is temporarily overloaded or unavailable. Wait for the number of seconds in the Retry-After header, if present, then retry.",
      "status": 503,
      "title": "Service unavailable",
      "type": "https://docs.kiosa.ai/en/reference/errors/#service_unavailable",
      "x-kiosa-de": {
        "description": "Kiosa ist gerade ausgelastet oder kurz nicht verfügbar. Warte die Sekunden aus dem Header Retry-After ab, falls vorhanden, und wiederhole die Anfrage dann.",
        "title": "Vorübergehend nicht verfügbar"
      }
    },
    "upstream_timeout": {
      "description": "The Kiosa server hosting the business did not respond in time. The matching GET shows whether a write call already took effect; retrying is idempotent.",
      "status": 504,
      "title": "Upstream timeout",
      "type": "https://docs.kiosa.ai/en/reference/errors/#upstream_timeout",
      "x-kiosa-de": {
        "description": "Der Kiosa-Server, auf dem der Betrieb liegt, hat nicht rechtzeitig geantwortet. Ob ein schreibender Aufruf schon gewirkt hat, zeigt der passende GET; ein Wiederholen ist idempotent.",
        "title": "Zeitüberschreitung"
      }
    },
    "upstream_unavailable": {
      "description": "The Kiosa server hosting the business could not be reached or sent an invalid response. Retry later; write calls are idempotent.",
      "status": 502,
      "title": "Upstream unavailable",
      "type": "https://docs.kiosa.ai/en/reference/errors/#upstream_unavailable",
      "x-kiosa-de": {
        "description": "Der Kiosa-Server, auf dem der Betrieb liegt, war nicht erreichbar oder hat ungültig geantwortet. Wiederhole die Anfrage später; schreibende Aufrufe sind idempotent.",
        "title": "Kiosa-Server nicht erreichbar"
      }
    },
    "user_inactive": {
      "description": "The user who granted access has been deactivated, is no longer a member of the business or no longer has a sufficient role. An admin of the business has to grant access again.",
      "status": 403,
      "title": "User inactive",
      "type": "https://docs.kiosa.ai/en/reference/errors/#user_inactive",
      "x-kiosa-de": {
        "description": "Der Nutzer, der die Verbindung erteilt hat, ist deaktiviert, gehört nicht mehr zum Betrieb oder hat keine ausreichende Rolle mehr. Ein Admin des Betriebs muss die Verbindung neu erteilen.",
        "title": "Nutzer nicht mehr berechtigt"
      }
    },
    "validation_failed": {
      "description": "The body or a parameter does not match the schema, for example a missing or unknown field or a location ID that does not belong to this business. invalid_params lists every affected field.",
      "status": 422,
      "title": "Validation failed",
      "type": "https://docs.kiosa.ai/en/reference/errors/#validation_failed",
      "x-kiosa-de": {
        "description": "Der Body oder ein Parameter entspricht nicht dem Schema, zum Beispiel ein fehlendes oder unbekanntes Feld oder eine Standort-ID, die nicht zu diesem Betrieb gehört. invalid_params nennt jedes betroffene Feld.",
        "title": "Anfrage ungültig"
      }
    }
  },
  "x-kiosa-scopes-de": {
    "account:read": "Deinen Betrieb, seine Standorte und die eigene Verbindung lesen.",
    "integrations:read": "Den Status der Integrationen deines Betriebs lesen.",
    "integrations:write": "Zugangsdaten eines Anbieters übergeben, Filialen zuordnen und Integrationen trennen. Schließt integrations:read ein."
  }
}
