{
  "openapi": "3.1.0",
  "info": {
    "title": "WIVA Copyshop PDF-Druck",
    "version": "1.0.1",
    "description": "PDF-Druckaufträge vorbereiten. Kostenpflichtiger Abschluss ausschließlich im vorhandenen Website-Checkout."
  },
  "servers": [
    {
      "url": "https://copyshop.automailer.de/API-KI"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "paths": {
    "/action-capabilities(1).php": {
      "post": {
        "operationId": "copyshop_capabilities",
        "summary": "Verfügbare Druckarten und Grenzen anzeigen",
        "description": "Verfügbare Druckarten und Grenzen anzeigen.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ergebnis",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Ungültige Anfrage"
          },
          "401": {
            "description": "API-Key fehlt oder ungültig"
          },
          "422": {
            "description": "PDF oder Parameter nicht unterstützt"
          },
          "429": {
            "description": "Kontingent erreicht"
          },
          "503": {
            "description": "Nicht eingerichtet"
          }
        }
      }
    },
    "/action-upload_link(1).php": {
      "post": {
        "operationId": "copyshop_upload_link",
        "summary": "Persönlichen Upload-Link erzeugen, wenn die KI keinen PDF-Dateizugriff hat",
        "description": "Persönlichen Upload-Link erzeugen, wenn die KI keinen PDF-Dateizugriff hat. Link dem Kunden zeigen, danach Upload-Status abfragen.",
        "x-openai-isConsequential": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ergebnis",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Ungültige Anfrage"
          },
          "401": {
            "description": "API-Key fehlt oder ungültig"
          },
          "422": {
            "description": "PDF oder Parameter nicht unterstützt"
          },
          "429": {
            "description": "Kontingent erreicht"
          },
          "503": {
            "description": "Nicht eingerichtet"
          }
        }
      }
    },
    "/action-upload_status(1).php": {
      "post": {
        "operationId": "copyshop_upload_status",
        "summary": "Nach dem Kunden-Upload die file_id ermitteln",
        "description": "Nach dem Kunden-Upload die file_id ermitteln.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "upload_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "upload_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ergebnis",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Ungültige Anfrage"
          },
          "401": {
            "description": "API-Key fehlt oder ungültig"
          },
          "422": {
            "description": "PDF oder Parameter nicht unterstützt"
          },
          "429": {
            "description": "Kontingent erreicht"
          },
          "503": {
            "description": "Nicht eingerichtet"
          }
        }
      }
    },
    "/action-upload(1).php": {
      "post": {
        "operationId": "copyshop_upload_pdf",
        "summary": "Eine PDF mit Einwilligung des Nutzers zur Druckvorbereitung übertragen",
        "description": "Eine PDF mit Einwilligung des Nutzers zur Druckvorbereitung übertragen. URL muss für den Server erreichbar und freigegeben sein; sonst upload_link verwenden. Keine Bestellung.",
        "x-openai-isConsequential": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "openaiFileIdRefs": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 1,
                    "items": {
                      "type": "string"
                    },
                    "description": "Genau eine vom Nutzer bereitgestellte oder erstellte PDF aus diesem Chat."
                  }
                },
                "required": [
                  "openaiFileIdRefs"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ergebnis",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Ungültige Anfrage"
          },
          "401": {
            "description": "API-Key fehlt oder ungültig"
          },
          "422": {
            "description": "PDF oder Parameter nicht unterstützt"
          },
          "429": {
            "description": "Kontingent erreicht"
          },
          "503": {
            "description": "Nicht eingerichtet"
          }
        }
      }
    },
    "/action-quote(1).php": {
      "post": {
        "operationId": "copyshop_quote",
        "summary": "Aktuellen unverbindlichen A4-Preis für ein bereits geprüftes PDF abfragen",
        "description": "Aktuellen unverbindlichen A4-Preis für ein bereits geprüftes PDF abfragen. Kein A3-Preis und kein Tarifvergleich.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "file_id": {
                    "type": "string"
                  },
                  "copies": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1000,
                    "default": 1
                  },
                  "paper": {
                    "type": "string",
                    "enum": [
                      "80",
                      "120"
                    ],
                    "default": "80"
                  },
                  "color": {
                    "type": "string",
                    "enum": [
                      "bw",
                      "color"
                    ],
                    "default": "bw"
                  },
                  "print": {
                    "type": "string",
                    "enum": [
                      "simplex",
                      "duplex"
                    ],
                    "default": "simplex"
                  }
                },
                "required": [
                  "file_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ergebnis",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Ungültige Anfrage"
          },
          "401": {
            "description": "API-Key fehlt oder ungültig"
          },
          "422": {
            "description": "PDF oder Parameter nicht unterstützt"
          },
          "429": {
            "description": "Kontingent erreicht"
          },
          "503": {
            "description": "Nicht eingerichtet"
          }
        }
      }
    },
    "/action-prepare(1).php": {
      "post": {
        "operationId": "copyshop_prepare_checkout",
        "summary": "Druckauftrag vorbereiten und persönlichen Bestelllink liefern",
        "description": "Druckauftrag vorbereiten und persönlichen Bestelllink liefern. Keine Bestellung und keine Zahlung. A4: ein PDF mit Optionen. Copyshop: mehrere/A3 PDFs, Optionen erst im Browser; copies/paper/color/print dann weglassen.",
        "x-openai-isConsequential": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "file_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1,
                    "maxItems": 50
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "a4",
                      "copyshop"
                    ],
                    "default": "a4"
                  },
                  "idempotency_key": {
                    "type": "string",
                    "minLength": 16,
                    "maxLength": 100
                  },
                  "copies": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1000,
                    "default": 1
                  },
                  "paper": {
                    "type": "string",
                    "enum": [
                      "80",
                      "120"
                    ],
                    "default": "80"
                  },
                  "color": {
                    "type": "string",
                    "enum": [
                      "bw",
                      "color"
                    ],
                    "default": "bw"
                  },
                  "print": {
                    "type": "string",
                    "enum": [
                      "simplex",
                      "duplex"
                    ],
                    "default": "simplex"
                  }
                },
                "required": [
                  "file_ids",
                  "mode",
                  "idempotency_key"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ergebnis",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Ungültige Anfrage"
          },
          "401": {
            "description": "API-Key fehlt oder ungültig"
          },
          "422": {
            "description": "PDF oder Parameter nicht unterstützt"
          },
          "429": {
            "description": "Kontingent erreicht"
          },
          "503": {
            "description": "Nicht eingerichtet"
          }
        }
      }
    },
    "/action-status(1).php": {
      "post": {
        "operationId": "copyshop_draft_status",
        "summary": "Status der Vorbereitung lesen",
        "description": "Status der Vorbereitung lesen. handed_off bedeutet nur an Website übergeben; Zahlung und tatsächlicher Auftrag werden nicht nachverfolgt.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "draft_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "draft_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ergebnis",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Ungültige Anfrage"
          },
          "401": {
            "description": "API-Key fehlt oder ungültig"
          },
          "422": {
            "description": "PDF oder Parameter nicht unterstützt"
          },
          "429": {
            "description": "Kontingent erreicht"
          },
          "503": {
            "description": "Nicht eingerichtet"
          }
        }
      }
    }
  }
}