{
  "openapi": "3.1.0",
  "info": {
    "title": "Debecker agent API",
    "version": "1.0.0",
    "description": "The same tools as the MCP server at https://www.debecker.be/mcp and the WebMCP tools on www.debecker.be, with identical names and parameters. Guide: https://www.debecker.be/developers",
    "contact": {
      "name": "Debecker",
      "url": "https://www.debecker.be/contact"
    }
  },
  "servers": [
    {
      "url": "https://www.debecker.be"
    }
  ],
  "paths": {
    "/api/agent/search_catalog": {
      "post": {
        "operationId": "search_catalog",
        "summary": "Zoeken in de catalogus",
        "description": "Zoek in de live catalogus van Debecker (tafelgerei voor horeca en thuis: porselein, glaswerk, bestek, tafellampen, buffet). Gebruik dit zodra de shopper een producttype, merk, collectie, artikelnummer of budget noemt. Geeft maximaal 8 bestelbare producten met prijs in EUR en de product-URL. Met de login van een B2B-klant krijg je nettoprijzen excl. btw, anders prijzen incl. 21% btw. Roep daarna get_product aan voor varianten en verpakking.",
        "tags": [
          "Public"
        ],
        "security": [
          {},
          {
            "supabaseBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120,
                    "description": "Wat de shopper zoekt: producttype, merk, collectie of artikelnummer. Vier talen mogelijk."
                  },
                  "brand": {
                    "description": "Beperk tot één merk, exact zoals list_collections het teruggeeft.",
                    "type": "string",
                    "maxLength": 80
                  },
                  "collection": {
                    "description": "Beperk tot één collectie van dat merk.",
                    "type": "string",
                    "maxLength": 120
                  },
                  "max_price": {
                    "description": "Maximale prijs in EUR per stuk.",
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "limit": {
                    "default": 6,
                    "description": "Aantal resultaten, 1 tot 8.",
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 8
                  },
                  "language": {
                    "default": "nl",
                    "description": "Taal van titels, beschrijvingen en URL's. Standaard nl.",
                    "type": "string",
                    "enum": [
                      "nl",
                      "fr",
                      "en",
                      "de"
                    ]
                  }
                },
                "required": [
                  "query"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success: JSON object with ok: true.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Fout"
          },
          "404": {
            "$ref": "#/components/responses/Fout"
          },
          "429": {
            "$ref": "#/components/responses/Fout"
          }
        }
      }
    },
    "/api/agent/get_product": {
      "post": {
        "operationId": "get_product",
        "summary": "Product opvragen",
        "description": "Haal één product op: titel, korte beschrijving, prijs, verpakkingsgrootte (aantal stuks per verpakking), alle koopbare varianten met SKU en kleur, en de URL. Gebruik dit voor manage_cart met action add, om de juiste variant_sku te kiezen.",
        "tags": [
          "Public"
        ],
        "security": [
          {},
          {
            "supabaseBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "description": "Product-id (uuid) uit search_catalog.",
                    "type": "string",
                    "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                  },
                  "handle": {
                    "description": "De slug uit de product-URL, bv. spiegelau-wit-wijnglas-met-arabeskpatroon-14aca83f.",
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 200
                  },
                  "url": {
                    "description": "Volledige product-URL op www.debecker.be.",
                    "type": "string",
                    "format": "uri"
                  },
                  "language": {
                    "default": "nl",
                    "description": "Taal van titels, beschrijvingen en URL's. Standaard nl.",
                    "type": "string",
                    "enum": [
                      "nl",
                      "fr",
                      "en",
                      "de"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success: JSON object with ok: true.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Fout"
          },
          "404": {
            "$ref": "#/components/responses/Fout"
          },
          "429": {
            "$ref": "#/components/responses/Fout"
          }
        }
      }
    },
    "/api/agent/list_collections": {
      "post": {
        "operationId": "list_collections",
        "summary": "Merken en collecties",
        "description": "Lijst de merken van de webshop, of de collecties van één merk met het aantal producten en de URL. Gebruik dit om te browsen of om een merk- of collectienaam exact te krijgen voor search_catalog.",
        "tags": [
          "Public"
        ],
        "security": [
          {},
          {
            "supabaseBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "brand": {
                    "description": "Merk waarvan je de collecties wilt. Zonder merk krijg je de merkenlijst.",
                    "type": "string",
                    "maxLength": 80
                  },
                  "query": {
                    "description": "Filter op naam.",
                    "type": "string",
                    "maxLength": 80
                  },
                  "language": {
                    "default": "nl",
                    "description": "Taal van titels, beschrijvingen en URL's. Standaard nl.",
                    "type": "string",
                    "enum": [
                      "nl",
                      "fr",
                      "en",
                      "de"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success: JSON object with ok: true.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Fout"
          },
          "404": {
            "$ref": "#/components/responses/Fout"
          },
          "429": {
            "$ref": "#/components/responses/Fout"
          }
        }
      }
    },
    "/api/agent/get_store_info": {
      "post": {
        "operationId": "get_store_info",
        "summary": "Winkelinformatie",
        "description": "Feitelijke informatie over Debecker: verzendkosten en drempels per land, levering, retourbeleid, betaalmethodes, kortingen, contact en de openingsuren van de showroom in Kortrijk. Alles komt uit de site zelf; wat niet vastligt, staat als unknown met een link naar de pagina.",
        "tags": [
          "Public"
        ],
        "security": [
          {},
          {
            "supabaseBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "topic": {
                    "default": "all",
                    "description": "Onderwerp; all geeft alles.",
                    "type": "string",
                    "enum": [
                      "shipping",
                      "returns",
                      "payment",
                      "contact",
                      "hours",
                      "discounts",
                      "all"
                    ]
                  },
                  "language": {
                    "default": "nl",
                    "description": "Taal van titels, beschrijvingen en URL's. Standaard nl.",
                    "type": "string",
                    "enum": [
                      "nl",
                      "fr",
                      "en",
                      "de"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success: JSON object with ok: true.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Fout"
          },
          "404": {
            "$ref": "#/components/responses/Fout"
          },
          "429": {
            "$ref": "#/components/responses/Fout"
          }
        }
      }
    },
    "/api/agent/b2b_order_history": {
      "post": {
        "operationId": "b2b_order_history",
        "summary": "B2B-orderhistoriek",
        "description": "Toon de eerdere bestellingen van de ingelogde B2B-klant (webshop en facturen): ordernummer, datum, bedrag excl. btw en aantal regels. Met order_number krijg je ook de regels (artikel, SKU, aantal verpakkingen, prijs). Vereist de login van een goedgekeurde B2B-klant; zonder login krijg je AUTH_REQUIRED.",
        "tags": [
          "B2B (login)"
        ],
        "security": [
          {
            "supabaseBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "order_number": {
                    "description": "Ordernummer of factuurnummer voor de regels van één bestelling.",
                    "type": "string",
                    "maxLength": 60
                  },
                  "limit": {
                    "default": 5,
                    "description": "Aantal recentste bestellingen, 1 tot 20.",
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20
                  },
                  "language": {
                    "default": "nl",
                    "description": "Taal van titels, beschrijvingen en URL's. Standaard nl.",
                    "type": "string",
                    "enum": [
                      "nl",
                      "fr",
                      "en",
                      "de"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success: JSON object with ok: true.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Fout"
          },
          "401": {
            "$ref": "#/components/responses/Fout"
          },
          "404": {
            "$ref": "#/components/responses/Fout"
          },
          "429": {
            "$ref": "#/components/responses/Fout"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "supabaseBearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Supabase access token of a signed-in, approved B2B customer. Only needed for B2B tools; public tools work without it."
      }
    },
    "responses": {
      "Fout": {
        "description": "Error: { ok: false, code, message }. Codes: VALIDATION, AUTH_REQUIRED, FORBIDDEN, NOT_FOUND, UNKNOWN_TOOL, UNAVAILABLE.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "ok",
                "code",
                "message"
              ],
              "properties": {
                "ok": {
                  "const": false
                },
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}