{
  "openapi": "3.1.0",
  "info": {
    "title": "ORCA Demo API",
    "version": "0.1.0",
    "description": "Gemeinsame Simulation (Standard shared); ORCA_DEMO_MODE=session isoliert Browser. Reset und Archiv gelten für die gewählte Welt. Cookie kennzeichnet die Demo, ist keine Anmeldung. Unix-Zeitstempel in Sekunden, CHF-Beträge in Rappen. Keine Live-Zahlung."
  },
  "servers": [
    {
      "url": "/orca/api"
    }
  ],
  "paths": {
    "/session": {
      "post": {
        "operationId": "session",
        "summary": "Sitzung starten oder laden",
        "security": [],
        "responses": {
          "200": {
            "description": "Ergebnis",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/State"
                }
              }
            }
          },
          "400": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              },
              "example": {}
            }
          }
        }
      }
    },
    "/tech": {
      "get": {
        "operationId": "tech",
        "summary": "Live-Protokoll auch während laufender Aufträge lesen",
        "security": [
          {
            "demoCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Ergebnis",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TechLog"
                }
              }
            }
          },
          "400": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/state": {
      "get": {
        "operationId": "state",
        "summary": "Aktuellen Zustand lesen",
        "security": [
          {
            "demoCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Ergebnis",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/State"
                }
              }
            }
          },
          "400": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/cart": {
      "post": {
        "operationId": "cart",
        "summary": "Absolute Artikelmenge im aktiven Kundenkorb setzen",
        "security": [
          {
            "demoCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Ergebnis",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "persona": {
                    "type": "string",
                    "enum": [
                      "guest",
                      "alex",
                      "sam"
                    ]
                  },
                  "article": {
                    "type": "string",
                    "enum": [
                      "2119478",
                      "1250302",
                      "6624138",
                      "6388979",
                      "7811072"
                    ]
                  },
                  "quantity": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 5
                  }
                },
                "required": [
                  "article",
                  "quantity"
                ]
              },
              "example": {
                "persona": "guest",
                "article": "2119478",
                "quantity": 2
              }
            }
          }
        }
      }
    },
    "/reserve": {
      "post": {
        "operationId": "reserve",
        "summary": "Gesamten Warenkorb reservieren; Checkout-Frist starten",
        "security": [
          {
            "demoCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Ergebnis",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "order_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "order_id"
                ]
              },
              "example": {
                "order_id": "ORDER_ID"
              }
            }
          }
        }
      }
    },
    "/pay": {
      "post": {
        "operationId": "pay",
        "summary": "Testzahlung starten",
        "security": [
          {
            "demoCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Ergebnis",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "order_id": {
                    "type": "string"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "normal",
                      "delayed",
                      "decline"
                    ]
                  }
                },
                "required": [
                  "order_id"
                ]
              },
              "example": {
                "order_id": "ORDER_ID",
                "mode": "normal"
              }
            }
          }
        }
      }
    },
    "/cancel": {
      "post": {
        "operationId": "cancel",
        "summary": "Unbezahlte Reservation freigeben",
        "security": [
          {
            "demoCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Ergebnis",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "order_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "order_id"
                ]
              },
              "example": {
                "order_id": "ORDER_ID"
              }
            }
          }
        }
      }
    },
    "/pickup": {
      "post": {
        "operationId": "pickup",
        "summary": "Ausgabe mit Abholcode starten",
        "security": [
          {
            "demoCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Ergebnis",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string"
                  }
                },
                "required": [
                  "token"
                ]
              },
              "example": {
                "token": "ORCA:PICKUP_TOKEN"
              }
            }
          }
        }
      }
    },
    "/recover": {
      "post": {
        "operationId": "recover",
        "summary": "Ausstehende Vorgänge mit vorhandenen Kennungen abgleichen",
        "security": [
          {
            "demoCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Ergebnis",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              },
              "example": {}
            }
          }
        }
      }
    },
    "/reset": {
      "post": {
        "operationId": "reset",
        "summary": "Simulation zurücksetzen; im Standardmodus shared für alle Besucher",
        "security": [
          {
            "demoCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Ergebnis",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              },
              "example": {}
            }
          }
        }
      }
    },
    "/journal/archive": {
      "post": {
        "operationId": "journal/archive",
        "summary": "Journalnachrichten archivieren; gleicher Puffer, maximal 300 Einträge insgesamt",
        "security": [
          {
            "demoCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Ergebnis",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 300
                  }
                },
                "required": [
                  "ids"
                ]
              },
              "example": {
                "ids": [
                  "EVENT_ID"
                ]
              }
            }
          }
        }
      }
    },
    "/advance": {
      "post": {
        "operationId": "advance",
        "summary": "Demo-Uhr vorspulen",
        "security": [
          {
            "demoCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Ergebnis",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "seconds": {
                    "type": "integer",
                    "enum": [
                      60,
                      300,
                      900,
                      1200,
                      1680
                    ]
                  }
                },
                "required": [
                  "seconds"
                ]
              },
              "example": {
                "seconds": 900
              }
            }
          }
        }
      }
    },
    "/fault": {
      "post": {
        "operationId": "fault",
        "summary": "Fehlerfall in der Simulation setzen",
        "security": [
          {
            "demoCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Ergebnis",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Fehler oder Abgleich erforderlich",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "gollmann",
                      "propharma"
                    ]
                  },
                  "value": {
                    "type": "string",
                    "enum": [
                      "none",
                      "partial",
                      "lost_output_reply",
                      "reserve_fail",
                      "offline",
                      "lost_booking_reply"
                    ]
                  }
                },
                "required": [
                  "role",
                  "value"
                ]
              },
              "example": {
                "role": "gollmann",
                "value": "lost_output_reply"
              }
            }
          }
        }
      }
    },
    "/qr/{order_id}": {
      "get": {
        "operationId": "qr",
        "summary": "QR-Code eines eigenen bezahlten Auftrags",
        "security": [
          {
            "demoCookie": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "SVG QR-Code",
            "content": {
              "image/svg+xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Kein eigener Abholauftrag"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ]
      },
      "Result": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          },
          "order": {
            "$ref": "#/components/schemas/Order"
          }
        },
        "required": [
          "ok"
        ]
      },
      "Product": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "ean": {
            "type": "string"
          },
          "gtin": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "price": {
            "type": "integer"
          },
          "stock": {
            "type": [
              "integer",
              "null"
            ]
          },
          "available": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "price",
          "available"
        ]
      },
      "Order": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "persona": {
            "type": "string",
            "enum": [
              "guest",
              "alex",
              "sam"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "draft",
              "reserved",
              "reservation_unknown",
              "payment_pending",
              "paid_pending",
              "ready",
              "dispensing",
              "uncertain",
              "partial",
              "dispensed",
              "release_pending",
              "cancelled",
              "expired"
            ]
          },
          "items": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "minimum": 0
            }
          },
          "delivered": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "minimum": 0
            }
          },
          "total_cents": {
            "type": "integer"
          },
          "created": {
            "type": "number"
          },
          "checkout_until": {
            "type": [
              "number",
              "null"
            ]
          },
          "hold_until": {
            "type": [
              "number",
              "null"
            ]
          },
          "pickup_token": {
            "type": "string"
          },
          "payment_reference": {
            "type": "string"
          },
          "payment_state": {
            "type": "string",
            "enum": [
              "unpaid",
              "pending",
              "paid"
            ]
          },
          "booking_state": {
            "type": "string",
            "enum": [
              "not_due",
              "pending",
              "booked"
            ]
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "state",
          "items",
          "total_cents",
          "checkout_until",
          "hold_until"
        ]
      },
      "Event": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "time": {
            "type": "number"
          },
          "kind": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "data": {},
          "archived": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "kind",
          "message"
        ]
      },
      "TechLog": {
        "type": "object",
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Event"
            }
          },
          "reset_id": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "events"
        ]
      },
      "Sale": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "items": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "minimum": 0
            }
          },
          "delivered": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "minimum": 0
            }
          },
          "booking": {
            "type": "string"
          },
          "balance_cents": {
            "type": "integer"
          },
          "payments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "reference": {
                  "type": "string"
                },
                "amount": {
                  "type": "string"
                }
              },
              "required": []
            }
          }
        },
        "required": []
      },
      "State": {
        "type": "object",
        "properties": {
          "server_time": {
            "type": "number"
          },
          "adapter_online": {
            "type": "boolean"
          },
          "external_roles": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "gollmann",
                "propharma"
              ]
            }
          },
          "personas": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Product"
            }
          },
          "orders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Order"
            }
          },
          "sales": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Sale"
            }
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Event"
            },
            "maxItems": 300
          },
          "fault": {
            "type": "string"
          },
          "wawi_fault": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "demo_mode": {
            "type": "string",
            "enum": [
              "shared",
              "session"
            ]
          },
          "reset_id": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "server_time",
          "adapter_online",
          "products",
          "orders",
          "sales",
          "events"
        ]
      }
    },
    "securitySchemes": {
      "demoCookie": {
        "type": "apiKey",
        "in": "cookie",
        "name": "orca_demo"
      }
    }
  }
}
