{
    "openapi": "3.0.3",
    "info": {
        "title": "HOPS24 Partner API",
        "version": "1.0.0",
        "description": "Bouncy castles, event machines and party equipment from local rental companies in Germany. Sandbox: use a hk_test_… key."
    },
    "servers": [
        {
            "url": "https://hops24.de/api/v1"
        }
    ],
    "components": {
        "securitySchemes": {
            "bearer": {
                "type": "http",
                "scheme": "bearer"
            }
        }
    },
    "security": [
        {
            "bearer": []
        }
    ],
    "paths": {
        "/status": {
            "get": {
                "summary": "Checks the key and shows plan, scopes and usage for the current month.",
                "description": "Prüft den Schlüssel und zeigt Paket, Rechte und Verbrauch im laufenden Monat.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "OK – {\"data\": …, \"meta\": …}"
                    },
                    "201": {
                        "description": "Created"
                    },
                    "422": {
                        "description": "invalid / consent_required / publication_requirements"
                    },
                    "400": {
                        "description": "invalid_parameter"
                    },
                    "401": {
                        "description": "unauthorized"
                    },
                    "403": {
                        "description": "insufficient_scope / origin_not_allowed / client_suspended"
                    },
                    "404": {
                        "description": "not_found"
                    },
                    "429": {
                        "description": "rate_limited / quota_exceeded"
                    }
                }
            }
        },
        "/categories": {
            "get": {
                "summary": "All categories with translations (de, en, es, fr, nl).",
                "description": "Alle Kategorien mit Übersetzungen (de, en, es, fr, nl). (Scope: listings:read)",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "OK – {\"data\": …, \"meta\": …}"
                    },
                    "201": {
                        "description": "Created"
                    },
                    "422": {
                        "description": "invalid / consent_required / publication_requirements"
                    },
                    "400": {
                        "description": "invalid_parameter"
                    },
                    "401": {
                        "description": "unauthorized"
                    },
                    "403": {
                        "description": "insufficient_scope / origin_not_allowed / client_suspended"
                    },
                    "404": {
                        "description": "not_found"
                    },
                    "429": {
                        "description": "rate_limited / quota_exceeded"
                    }
                }
            }
        },
        "/listings": {
            "get": {
                "summary": "Search public listings. Same logic as the search on hops24.de.",
                "description": "Suche nach öffentlichen Angeboten. Gleiche Logik wie die Suche auf hops24.de. (Scope: listings:read)",
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "description": "Free text (title, city, description)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "postal_code",
                        "in": "query",
                        "required": false,
                        "description": "Postcode or city; respects delivery areas",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "lat",
                        "in": "query",
                        "required": false,
                        "description": "Coordinates; finds providers whose delivery radius covers the point",
                        "schema": {
                            "type": "number"
                        }
                    },
                    {
                        "name": "lng",
                        "in": "query",
                        "required": false,
                        "description": "Coordinates; finds providers whose delivery radius covers the point",
                        "schema": {
                            "type": "number"
                        }
                    },
                    {
                        "name": "category",
                        "in": "query",
                        "required": false,
                        "description": "Category key from /categories",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "date",
                        "in": "query",
                        "required": false,
                        "description": "Only listings available on this day",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "max_price",
                        "in": "query",
                        "required": false,
                        "description": "Maximum “from” price in euros",
                        "schema": {
                            "type": "number"
                        }
                    },
                    {
                        "name": "placement",
                        "in": "query",
                        "required": false,
                        "description": "Only listings offering long-term placement",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "self_pickup",
                        "in": "query",
                        "required": false,
                        "description": "Only with self pickup",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "required": false,
                        "description": "newest (default), price, distance (requires lat/lng)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page (from 1) and results per page (1–50, default 20)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Page (from 1) and results per page (1–50, default 20)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK – {\"data\": …, \"meta\": …}"
                    },
                    "201": {
                        "description": "Created"
                    },
                    "422": {
                        "description": "invalid / consent_required / publication_requirements"
                    },
                    "400": {
                        "description": "invalid_parameter"
                    },
                    "401": {
                        "description": "unauthorized"
                    },
                    "403": {
                        "description": "insufficient_scope / origin_not_allowed / client_suspended"
                    },
                    "404": {
                        "description": "not_found"
                    },
                    "429": {
                        "description": "rate_limited / quota_exceeded"
                    }
                }
            }
        },
        "/listings/{id}": {
            "get": {
                "summary": "Listing details incl. description, all images and technical details.",
                "description": "Details eines Angebots inkl. Beschreibung, aller Bilder und technischer Angaben. (Scope: listings:read)",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK – {\"data\": …, \"meta\": …}"
                    },
                    "201": {
                        "description": "Created"
                    },
                    "422": {
                        "description": "invalid / consent_required / publication_requirements"
                    },
                    "400": {
                        "description": "invalid_parameter"
                    },
                    "401": {
                        "description": "unauthorized"
                    },
                    "403": {
                        "description": "insufficient_scope / origin_not_allowed / client_suspended"
                    },
                    "404": {
                        "description": "not_found"
                    },
                    "429": {
                        "description": "rate_limited / quota_exceeded"
                    }
                }
            }
        },
        "/listings/{id}/availability": {
            "get": {
                "summary": "Unavailable days of a listing from today.",
                "description": "Nicht verfügbare Tage eines Angebots ab heute. (Scope: availability:read)",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "months",
                        "in": "query",
                        "required": false,
                        "description": "Period in months (1–12, default 3)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK – {\"data\": …, \"meta\": …}"
                    },
                    "201": {
                        "description": "Created"
                    },
                    "422": {
                        "description": "invalid / consent_required / publication_requirements"
                    },
                    "400": {
                        "description": "invalid_parameter"
                    },
                    "401": {
                        "description": "unauthorized"
                    },
                    "403": {
                        "description": "insufficient_scope / origin_not_allowed / client_suspended"
                    },
                    "404": {
                        "description": "not_found"
                    },
                    "429": {
                        "description": "rate_limited / quota_exceeded"
                    }
                }
            }
        },
        "/inquiries": {
            "post": {
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "listing_id": {
                                        "type": "integer",
                                        "description": "Listing (required)"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Customer name and email (required)"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Customer name and email (required)"
                                    },
                                    "event_date": {
                                        "type": "string",
                                        "description": "Requested date or placement start (required)"
                                    },
                                    "event_end_date": {
                                        "type": "string",
                                        "description": "End date for multi-day events"
                                    },
                                    "request_type": {
                                        "type": "string",
                                        "description": "event (default) or placement (only if placement_available)"
                                    },
                                    "placement_location": {
                                        "type": "string",
                                        "description": "Placement location (required for placement)"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Optional"
                                    },
                                    "message": {
                                        "type": "string",
                                        "description": "Optional"
                                    },
                                    "consent": {
                                        "type": "boolean",
                                        "description": "Must be true: the customer agreed to the submission"
                                    }
                                }
                            }
                        }
                    }
                },
                "summary": "Submit a customer enquiry to the provider. It arrives in the provider’s HOPS24 inbox; the customer receives a confirmation. Returns 201.",
                "description": "Kundenanfrage an den Anbieter übermitteln. Landet im HOPS24-Posteingang des Anbieters; der Kunde erhält eine Bestätigung. Antwort 201. (Scope: inquiries:create)",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "OK – {\"data\": …, \"meta\": …}"
                    },
                    "201": {
                        "description": "Created"
                    },
                    "422": {
                        "description": "invalid / consent_required / publication_requirements"
                    },
                    "400": {
                        "description": "invalid_parameter"
                    },
                    "401": {
                        "description": "unauthorized"
                    },
                    "403": {
                        "description": "insufficient_scope / origin_not_allowed / client_suspended"
                    },
                    "404": {
                        "description": "not_found"
                    },
                    "429": {
                        "description": "rate_limited / quota_exceeded"
                    }
                }
            }
        },
        "/webhooks": {
            "get": {
                "summary": "Your webhooks with delivery status.",
                "description": "Eigene Webhooks mit Zustellstatus. (Scope: webhooks)",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "OK – {\"data\": …, \"meta\": …}"
                    },
                    "201": {
                        "description": "Created"
                    },
                    "422": {
                        "description": "invalid / consent_required / publication_requirements"
                    },
                    "400": {
                        "description": "invalid_parameter"
                    },
                    "401": {
                        "description": "unauthorized"
                    },
                    "403": {
                        "description": "insufficient_scope / origin_not_allowed / client_suspended"
                    },
                    "404": {
                        "description": "not_found"
                    },
                    "429": {
                        "description": "rate_limited / quota_exceeded"
                    }
                }
            },
            "post": {
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "url": {
                                        "type": "string",
                                        "description": "Target URL (https only, publicly reachable)"
                                    },
                                    "events": {
                                        "type": "array",
                                        "description": "inquiry.created, inquiry.replied",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "summary": "Create a webhook. The signing secret is only shown in this response.",
                "description": "Webhook anlegen. Das Secret zur Signaturprüfung wird nur in dieser Antwort angezeigt. (Scope: webhooks)",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "OK – {\"data\": …, \"meta\": …}"
                    },
                    "201": {
                        "description": "Created"
                    },
                    "422": {
                        "description": "invalid / consent_required / publication_requirements"
                    },
                    "400": {
                        "description": "invalid_parameter"
                    },
                    "401": {
                        "description": "unauthorized"
                    },
                    "403": {
                        "description": "insufficient_scope / origin_not_allowed / client_suspended"
                    },
                    "404": {
                        "description": "not_found"
                    },
                    "429": {
                        "description": "rate_limited / quota_exceeded"
                    }
                }
            }
        },
        "/webhooks/{id}/test": {
            "post": {
                "summary": "Send a webhook.test event.",
                "description": "Testereignis webhook.test senden. (Scope: webhooks)",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK – {\"data\": …, \"meta\": …}"
                    },
                    "201": {
                        "description": "Created"
                    },
                    "422": {
                        "description": "invalid / consent_required / publication_requirements"
                    },
                    "400": {
                        "description": "invalid_parameter"
                    },
                    "401": {
                        "description": "unauthorized"
                    },
                    "403": {
                        "description": "insufficient_scope / origin_not_allowed / client_suspended"
                    },
                    "404": {
                        "description": "not_found"
                    },
                    "429": {
                        "description": "rate_limited / quota_exceeded"
                    }
                }
            }
        },
        "/webhooks/{id}": {
            "delete": {
                "summary": "Delete a webhook.",
                "description": "Webhook löschen. (Scope: webhooks)",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK – {\"data\": …, \"meta\": …}"
                    },
                    "201": {
                        "description": "Created"
                    },
                    "422": {
                        "description": "invalid / consent_required / publication_requirements"
                    },
                    "400": {
                        "description": "invalid_parameter"
                    },
                    "401": {
                        "description": "unauthorized"
                    },
                    "403": {
                        "description": "insufficient_scope / origin_not_allowed / client_suspended"
                    },
                    "404": {
                        "description": "not_found"
                    },
                    "429": {
                        "description": "rate_limited / quota_exceeded"
                    }
                }
            }
        },
        "/me/listings": {
            "get": {
                "summary": "Provider integration: your own listings incl. inactive ones (key must be linked to a provider account).",
                "description": "Anbieter-Integration: eigene Angebote inkl. inaktiver (Schlüssel muss mit einem Anbieterkonto verknüpft sein). (Scope: own:inquiries:read)",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "OK – {\"data\": …, \"meta\": …}"
                    },
                    "201": {
                        "description": "Created"
                    },
                    "422": {
                        "description": "invalid / consent_required / publication_requirements"
                    },
                    "400": {
                        "description": "invalid_parameter"
                    },
                    "401": {
                        "description": "unauthorized"
                    },
                    "403": {
                        "description": "insufficient_scope / origin_not_allowed / client_suspended"
                    },
                    "404": {
                        "description": "not_found"
                    },
                    "429": {
                        "description": "rate_limited / quota_exceeded"
                    }
                }
            }
        },
        "/me/listings/{id}": {
            "patch": {
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Title (3–150 chars), description"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Title (3–150 chars), description"
                                    },
                                    "prices": {
                                        "type": "object",
                                        "description": "from, daily, weekend, delivery, setup, deposit, placement_monthly (euros, null clears)"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Activate/deactivate the listing"
                                    }
                                }
                            }
                        }
                    }
                },
                "summary": "Update your own listing. Activation requires the same minimum details as in the dashboard.",
                "description": "Eigenes Angebot ändern. Beim Aktivieren gelten dieselben Mindestanforderungen wie im Dashboard. (Scope: own:listings:write)",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK – {\"data\": …, \"meta\": …}"
                    },
                    "201": {
                        "description": "Created"
                    },
                    "422": {
                        "description": "invalid / consent_required / publication_requirements"
                    },
                    "400": {
                        "description": "invalid_parameter"
                    },
                    "401": {
                        "description": "unauthorized"
                    },
                    "403": {
                        "description": "insufficient_scope / origin_not_allowed / client_suspended"
                    },
                    "404": {
                        "description": "not_found"
                    },
                    "429": {
                        "description": "rate_limited / quota_exceeded"
                    }
                }
            }
        },
        "/me/inquiries": {
            "get": {
                "summary": "Your enquiries with status (new, waiting, answered, booked, closed) and customer details.",
                "description": "Eigene Anfragen mit Status (new, waiting, answered, booked, closed) und Kundendaten. (Scope: own:inquiries:read)",
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Filter by status",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK – {\"data\": …, \"meta\": …}"
                    },
                    "201": {
                        "description": "Created"
                    },
                    "422": {
                        "description": "invalid / consent_required / publication_requirements"
                    },
                    "400": {
                        "description": "invalid_parameter"
                    },
                    "401": {
                        "description": "unauthorized"
                    },
                    "403": {
                        "description": "insufficient_scope / origin_not_allowed / client_suspended"
                    },
                    "404": {
                        "description": "not_found"
                    },
                    "429": {
                        "description": "rate_limited / quota_exceeded"
                    }
                }
            }
        },
        "/me/bookings": {
            "get": {
                "summary": "Your orders within a period.",
                "description": "Eigene Aufträge in einem Zeitraum. (Scope: own:inquiries:read)",
                "parameters": [
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "description": "Period (default: today to +12 months)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "description": "Period (default: today to +12 months)",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK – {\"data\": …, \"meta\": …}"
                    },
                    "201": {
                        "description": "Created"
                    },
                    "422": {
                        "description": "invalid / consent_required / publication_requirements"
                    },
                    "400": {
                        "description": "invalid_parameter"
                    },
                    "401": {
                        "description": "unauthorized"
                    },
                    "403": {
                        "description": "insufficient_scope / origin_not_allowed / client_suspended"
                    },
                    "404": {
                        "description": "not_found"
                    },
                    "429": {
                        "description": "rate_limited / quota_exceeded"
                    }
                }
            }
        },
        "/me/blocked-dates": {
            "get": {
                "summary": "Blocked days from today (manual and calendar import).",
                "description": "Gesperrte Tage ab heute (manuell und aus Kalender-Import). (Scope: own:calendar:write)",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "OK – {\"data\": …, \"meta\": …}"
                    },
                    "201": {
                        "description": "Created"
                    },
                    "422": {
                        "description": "invalid / consent_required / publication_requirements"
                    },
                    "400": {
                        "description": "invalid_parameter"
                    },
                    "401": {
                        "description": "unauthorized"
                    },
                    "403": {
                        "description": "insufficient_scope / origin_not_allowed / client_suspended"
                    },
                    "404": {
                        "description": "not_found"
                    },
                    "429": {
                        "description": "rate_limited / quota_exceeded"
                    }
                }
            },
            "post": {
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "dates": {
                                        "type": "array",
                                        "description": "List of dates YYYY-MM-DD (max. 366)",
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "listing_id": {
                                        "type": "integer",
                                        "description": "Optional; omitted = all listings"
                                    },
                                    "reason": {
                                        "type": "string",
                                        "description": "Optional reason"
                                    }
                                }
                            }
                        }
                    }
                },
                "summary": "Block days (for one listing or all).",
                "description": "Tage sperren (für ein Angebot oder alle). (Scope: own:calendar:write)",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "OK – {\"data\": …, \"meta\": …}"
                    },
                    "201": {
                        "description": "Created"
                    },
                    "422": {
                        "description": "invalid / consent_required / publication_requirements"
                    },
                    "400": {
                        "description": "invalid_parameter"
                    },
                    "401": {
                        "description": "unauthorized"
                    },
                    "403": {
                        "description": "insufficient_scope / origin_not_allowed / client_suspended"
                    },
                    "404": {
                        "description": "not_found"
                    },
                    "429": {
                        "description": "rate_limited / quota_exceeded"
                    }
                }
            },
            "delete": {
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "dates": {
                                        "type": "array",
                                        "description": "List of dates YYYY-MM-DD",
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "listing_id": {
                                        "type": "integer",
                                        "description": "Optional"
                                    }
                                }
                            }
                        }
                    }
                },
                "summary": "Release manually blocked days (calendar imports stay).",
                "description": "Manuell gesperrte Tage wieder freigeben (Kalender-Importe bleiben). (Scope: own:calendar:write)",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "OK – {\"data\": …, \"meta\": …}"
                    },
                    "201": {
                        "description": "Created"
                    },
                    "422": {
                        "description": "invalid / consent_required / publication_requirements"
                    },
                    "400": {
                        "description": "invalid_parameter"
                    },
                    "401": {
                        "description": "unauthorized"
                    },
                    "403": {
                        "description": "insufficient_scope / origin_not_allowed / client_suspended"
                    },
                    "404": {
                        "description": "not_found"
                    },
                    "429": {
                        "description": "rate_limited / quota_exceeded"
                    }
                }
            }
        }
    }
}