{"openapi":"3.1.0","info":{"title":"Main-Pergola Produktkatalog","description":"Öffentliche Produktsuche, Artikeldaten und serverseitige Konfigurationspreise. Ergebnisse enthalten Bruttopreise und weisen Positionen auf Anfrage gesondert aus.","version":"1.0.0"},"servers":[{"url":"https://main-pergola.de"}],"paths":{"/agent-catalog":{"get":{"operationId":"getCatalogOverview","summary":"Katalog-Endpunkte auflisten","responses":{"200":{"description":"Katalog und seine URLs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogOverview"}}}}}}},"/agent-catalog/search":{"get":{"operationId":"searchCatalog","summary":"Nach Produkten und Artikelnummern suchen","parameters":[{"in":"query","name":"q","required":true,"schema":{"type":"string","minLength":2,"maxLength":100}}],"responses":{"200":{"description":"Passende Artikel dieses Shops.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResult"}}}},"400":{"description":"Die Eingabe ist ungültig.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Der Produktkatalog ist vorübergehend nicht erreichbar.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agent-catalog/products/{slug}":{"get":{"operationId":"getCatalogProduct","summary":"Artikeldaten und verfügbare Preisvarianten lesen","parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","maxLength":180,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}}],"responses":{"200":{"description":"Öffentliche Artikeldaten.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"400":{"description":"Die Eingabe ist ungültig.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Produkt nicht gefunden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Der Produktkatalog ist vorübergehend nicht erreichbar.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agent-catalog/price":{"get":{"operationId":"getPricingGuide","summary":"Eingabeschema und Beispiel für diesen Shop abrufen","responses":{"200":{"description":"Schema und Beispiel.","content":{"application/json":{"schema":{"type":"object"}}}}}},"post":{"operationId":"calculateConfigurationPrice","summary":"Konfigurationspreis aus dem Shop berechnen","description":"Bruttopreis oder Zwischensumme mit Positionen auf Anfrage. Die Berechnung löst keine Bestellung oder Anfrage aus.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"systemKey":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]*$","description":"Katalogsystem, z. B. classic, modul-m, modul-e oder lamellenpergola-nach-mass."},"variantSku":{"description":"Öffentliche Artikelnummer der Standardvariante.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9_.-]*$"},"widthCm":{"type":"number","minimum":1,"maximum":2000,"multipleOf":0.1},"depthCm":{"type":"number","minimum":1,"maximum":2000,"multipleOf":0.1},"frameColorKey":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]*$"},"louverColorKey":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]*$"},"mounting":{"type":"string","enum":["freestanding","wall_mounted"]},"accessoryVariants":{"description":"Zubehörvarianten mit Positionierung aus dem Katalog.","maxItems":12,"type":"array","items":{"type":"object","properties":{"variantSku":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9_.-]*$"},"quantity":{"type":"integer","minimum":1,"maximum":24},"placements":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"side":{"type":"string","enum":["front","back","left","right"]},"segmentIndex":{"type":"integer","minimum":0,"maximum":3},"quantity":{"type":"integer","minimum":1,"maximum":24}},"required":["side","quantity"],"additionalProperties":false}}},"required":["variantSku","quantity"],"additionalProperties":false}},"projectOptions":{"description":"Projektoptionen aus dem Maßkonfigurator.","maxItems":16,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9_.-]*$"},"optionKey":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9_.-]*$"},"side":{"type":"string","enum":["front","back","left","right"]},"segmentIndex":{"type":"integer","minimum":0,"maximum":3},"widthMm":{"type":"integer","exclusiveMinimum":0,"maximum":30000},"heightMm":{"type":"integer","exclusiveMinimum":0,"maximum":30000},"colorKey":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]*$"},"quantity":{"type":"integer","minimum":1,"maximum":4}},"required":["key","quantity"],"additionalProperties":false}},"assembly":{"type":"boolean"},"customFinish":{"type":"object","properties":{"clearHeightCm":{"type":"integer","minimum":1,"maximum":1000},"ralCode":{"type":"string","pattern":"^[1-9]\\d{3}$"},"colorKey":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]*$"}},"additionalProperties":false},"terraceEntryId":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9_.-]*$"},"terraceFamilyKey":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9_.-]*$"},"terraceVariantKey":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9_.-]*$"},"colorKey":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]*$"},"additionalPostCount":{"anyOf":[{"type":"number","const":2},{"type":"number","const":3}]}},"required":["systemKey"],"additionalProperties":false},"example":{"systemKey":"classic","variantSku":"MP-CL-300X300-ANT-F","assembly":true}}}},"responses":{"200":{"description":"Berechnete Preispositionen und offene Optionen.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigurationPrice"}}}},"400":{"description":"Ungültige Eingabe oder Preisabfrage vorübergehend nicht erreichbar.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingError"}}}},"403":{"description":"Ungültige Eingabe oder Preisabfrage vorübergehend nicht erreichbar.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingError"}}}},"413":{"description":"Ungültige Eingabe oder Preisabfrage vorübergehend nicht erreichbar.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingError"}}}},"415":{"description":"Ungültige Eingabe oder Preisabfrage vorübergehend nicht erreichbar.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingError"}}}},"422":{"description":"Ungültige Eingabe oder Preisabfrage vorübergehend nicht erreichbar.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingError"}}}},"429":{"description":"Ungültige Eingabe oder Preisabfrage vorübergehend nicht erreichbar.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingError"}}}},"503":{"description":"Ungültige Eingabe oder Preisabfrage vorübergehend nicht erreichbar.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingError"}}}}}}},"/agent-commerce/checkout-link":{"get":{"operationId":"prepareShopPurchase","summary":"Link für den Kauf im Shop vorbereiten","description":"Gibt die Shopseite zur Prüfung und Übernahme eines Artikels zurück. Für konfigurierbare Produkte führt der Link zur Produktauswahl.","parameters":[{"in":"query","name":"slug","required":true,"schema":{"type":"string","maxLength":180,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}},{"in":"query","name":"sku","schema":{"type":"string","maxLength":100}},{"in":"query","name":"quantity","schema":{"type":"integer","minimum":1,"maximum":20,"default":1}}],"responses":{"200":{"description":"Geprüfter Artikellink","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopPurchase"}}}},"400":{"description":"Die Eingabe ist ungültig.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Artikel nicht gefunden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Artikelnummer für dieses Produkt nicht bestätigt","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Der Produktkatalog ist vorübergehend nicht erreichbar.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Price":{"type":"object","required":["amount","currency","taxIncluded"],"additionalProperties":false,"properties":{"amount":{"type":"number","exclusiveMinimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"taxIncluded":{"const":true}}},"CatalogOverview":{"type":"object","required":["name","search","product","pricing","commerce","openapi"],"additionalProperties":false,"properties":{"name":{"type":"string"},"search":{"type":"string"},"product":{"type":"string"},"pricing":{"type":"string","format":"uri"},"commerce":{"type":"string","format":"uri"},"openapi":{"type":"string","format":"uri"}}},"ConfigurationPrice":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string","enum":["complete","partial","on_request"]},"currency":{"type":"string","const":"EUR"},"subtotalGross":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"totalGross":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"pricedOptions":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"gross":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["label","gross"],"additionalProperties":false}},"onRequest":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"reason":{"type":"string"}},"required":["label","reason"],"additionalProperties":false}},"notes":{"type":"array","items":{"type":"string"}},"configuratorUrl":{"type":"string"},"purchaseMode":{"type":"string","enum":["direct","request"]},"configuration":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["status","currency","subtotalGross","totalGross","pricedOptions","onRequest","notes","configuratorUrl"],"additionalProperties":false},"ShopPurchase":{"type":"object","required":["mode","productUrl","continueUrl","product","quantity","unitPriceGross","currency"],"properties":{"mode":{"enum":["review_in_shop","configure_on_product_page","request_quote","check_product_page"]},"productUrl":{"type":"string","format":"uri"},"continueUrl":{"type":"string","format":"uri"},"product":{"type":"object","required":["slug","name","articleNumber"],"properties":{"slug":{"type":"string"},"name":{"type":"string"},"articleNumber":{"type":["string","null"]}}},"quantity":{"type":"integer"},"unitPriceGross":{"type":["number","null"]},"currency":{"const":"EUR"}}},"PricingError":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}},"CatalogResult":{"type":"object","required":["slug","name","url","articleNumber","summary","price"],"additionalProperties":false,"properties":{"slug":{"type":"string","maxLength":180,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"articleNumber":{"type":["string","null"]},"summary":{"type":["string","null"]},"price":{"anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}]}}},"SearchResult":{"type":"object","required":["query","results"],"additionalProperties":false,"properties":{"query":{"type":"string"},"results":{"type":"array","maxItems":10,"items":{"$ref":"#/components/schemas/CatalogResult"}}}},"Product":{"type":"object","required":["slug","name","url","articleNumber","summary","price","variants"],"additionalProperties":false,"properties":{"slug":{"type":"string","maxLength":180,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"articleNumber":{"type":["string","null"]},"summary":{"type":["string","null"]},"price":{"anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}]},"variants":{"type":"array","items":{"type":"object","required":["articleNumber","label","price"],"additionalProperties":false,"properties":{"articleNumber":{"type":"string"},"label":{"type":"string"},"price":{"anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}]}}}}}},"Error":{"type":"object","required":["error"],"additionalProperties":false,"properties":{"error":{"type":"object","required":["message"],"additionalProperties":false,"properties":{"message":{"type":"string"}}}}}}}}