{
  "openapi": "3.0.3",
  "info": {
    "title": "KledingDrukdeal.nl Kledingkiezer",
    "version": "1.1.0",
    "description": "Openbare WooCommerce-productinformatie. Bedragen in eurocenten. Prijzen zijn afhankelijk van kleur, maat, oplage en drukkeuzes. Verzending wordt in de webshop gecontroleerd. Bekijk de productpagina voor definitieve beschikbaarheid. Deze interface maakt geen bestelling aan en verstuurt geen offerte. Stuur geen persoonsgegevens. Stock is per colour/size and may be unknown; availability is not a quantity guarantee. Prices come from the existing calculator. Public discovery feed: https://kledingdrukdeal.nl/?kdd_openai_feed=1 (NL/EUR; OpenAI market approval pending)."
  },
  "servers": [
    {
      "url": "https://kledingdrukdeal.nl/wp-json"
    }
  ],
  "paths": {
    "/kdd-kledingkiezer/v1/catalog": {
      "get": {
        "operationId": "search_products",
        "description": "Zoek op artikelnaam of SKU. Gebruik de filterwaarden uit get_filters.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Productnaam of artikelcode."
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Paginanummer."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "Aantal per pagina."
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Categorie-ID of ondersteunde menukeuze."
          },
          {
            "name": "kdd_kleur",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Kleursleutel uit de filters."
          },
          {
            "name": "kdd_maat",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Maatsleutel uit de filters."
          },
          {
            "name": "kdd_merk",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Merk; gebruik exact de value uit get_filters."
          },
          {
            "name": "kdd_productsoort",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Productsoort; gebruik exact de value uit get_filters."
          },
          {
            "name": "kdd_doelgroep",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Doelgroep; gebruik exact de value uit get_filters."
          },
          {
            "name": "kdd_mouw",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Mouwlengte; gebruik exact de value uit get_filters."
          },
          {
            "name": "kdd_sluiting",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Sluiting; gebruik exact de value uit get_filters."
          },
          {
            "name": "kdd_pasvorm",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Pasvorm; gebruik exact de value uit get_filters."
          }
        ],
        "responses": {
          "200": {
            "description": "Actuele openbare webshopgegevens.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Item"
                      }
                    },
                    "pages": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "De vraag kon niet worden verwerkt. Lees de melding en vraag ontbrekende keuzes uit."
          }
        }
      }
    },
    "/kdd-kledingkiezer/v1/filters": {
      "get": {
        "operationId": "get_filters",
        "description": "Beschikbare filtervelden en waarden voor het gekozen assortiment.",
        "parameters": [
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Categorie-ID."
          },
          {
            "name": "kdd_kleur",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Eerder gekozen kleursleutel."
          }
        ],
        "responses": {
          "200": {
            "description": "Actuele openbare webshopgegevens.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "options": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "value": {
                                  "type": "string"
                                },
                                "label": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "De vraag kon niet worden verwerkt. Lees de melding en vraag ontbrekende keuzes uit."
          }
        }
      }
    },
    "/kdd-productinformatie/v1/products/{id}": {
      "get": {
        "operationId": "get_product_details",
        "description": "Bekijk merk, SKU, categorieën, zichtbare kenmerken, beschrijving en directe links. Ontbrekende brongegevens blijven leeg.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Actuele openbare webshopgegevens.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Details"
                }
              }
            }
          },
          "default": {
            "description": "De vraag kon niet worden verwerkt. Lees de melding en vraag ontbrekende keuzes uit."
          }
        }
      }
    },
    "/kdd-productinformatie/v1/compare": {
      "get": {
        "operationId": "compare_products",
        "description": "Vergelijk twee of drie gepubliceerde artikelen in één antwoord. Gebruik optionsUrl voor kleuren, maten en drukopties en calculate_print_price voor een exacte vergelijking.",
        "parameters": [
          {
            "name": "ids",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]{0,9}(,[1-9][0-9]{0,9}){1,2}$"
            },
            "description": "Twee of drie verschillende product-ID’s, met komma’s gescheiden."
          }
        ],
        "responses": {
          "200": {
            "description": "Actuele openbare webshopgegevens.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Details"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "De vraag kon niet worden verwerkt. Lees de melding en vraag ontbrekende keuzes uit."
          }
        }
      }
    },
    "/kdd-kledingkiezer/v1/products/{id}": {
      "get": {
        "operationId": "get_print_positions_and_stock",
        "description": "Officiële drukposities, afbeeldingen, beschikbare kleur- en maatuitvoeringen en basisprijzen. available=true geeft geen garantie voor een specifiek aantal. Bij null of ontbrekende voorraad moet de webshop de voorraad bevestigen.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Actuele openbare webshopgegevens.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Item"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "configurable": {
                          "type": "boolean"
                        },
                        "currency": {
                          "type": "string"
                        },
                        "checkedAt": {
                          "type": "string"
                        },
                        "groups": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "options": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    },
                                    "image": {
                                      "type": "string",
                                      "nullable": true
                                    },
                                    "positions": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        },
                        "colors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "sizes": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "size": {
                                      "type": "string"
                                    },
                                    "unitInclCents": {
                                      "type": "integer"
                                    },
                                    "available": {
                                      "type": "boolean",
                                      "nullable": true
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "De vraag kon niet worden verwerkt. Lees de melding en vraag ontbrekende keuzes uit."
          }
        }
      }
    },
    "/kdd-kledingkiezer/v1/price": {
      "post": {
        "operationId": "calculate_print_price",
        "description": "Gebruik de actieve WooCommerce-prijsberekening voor één artikel met een of meerdere uitvoeringen. Gebruik een unieke id voor elke groep. Neem kleur, maat en druk-ID’s letterlijk over uit de productopties.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "productId": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "groups": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 10,
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[1-9][0-9]{0,5}$",
                          "example": "1",
                          "description": "Unieke uitvoeringscode binnen deze aanvraag: 1 t/m 999999 als tekst. Gebruik bijvoorbeeld 1, 2, 3."
                        },
                        "color": {
                          "type": "string"
                        },
                        "sizes": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 9999
                          }
                        },
                        "prints": {
                          "type": "object",
                          "description": "Groeps-ID naar gekozen optie-ID uit de productgegevens.",
                          "additionalProperties": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "id",
                        "color",
                        "sizes",
                        "prints"
                      ]
                    }
                  }
                },
                "required": [
                  "productId",
                  "groups"
                ]
              },
              "example": {
                "productId": 17674,
                "groups": [
                  {
                    "id": "1",
                    "color": "White",
                    "sizes": {
                      "M": 10
                    },
                    "prints": {
                      "a62c810": "5hcp3",
                      "2a0133a": "cg5h9",
                      "c10ccde": "e1kcr"
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Actuele openbare webshopgegevens.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "quantity": {
                      "type": "integer"
                    },
                    "currency": {
                      "type": "string"
                    },
                    "garmentInclCents": {
                      "type": "integer"
                    },
                    "printInclCents": {
                      "type": "integer"
                    },
                    "discountInclCents": {
                      "type": "integer"
                    },
                    "extraDiscountInclCents": {
                      "type": "integer"
                    },
                    "totalInclCents": {
                      "type": "integer"
                    },
                    "netCents": {
                      "type": "integer",
                      "nullable": true
                    },
                    "vatCents": {
                      "type": "integer",
                      "nullable": true
                    },
                    "averageInclCents": {
                      "type": "integer"
                    },
                    "shipping": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "De vraag kon niet worden verwerkt. Lees de melding en vraag ontbrekende keuzes uit."
          }
        }
      }
    },
    "/kdd-kledingkiezer/v1/vragen": {
      "post": {
        "operationId": "answer_customer_question",
        "description": "Beantwoord klantvragen over bijvoorbeeld levering, digitale proefdruk, maten en logo’s. Voeg bij een specifiek model het product-ID toe. Geef bij een concrete prijsvraag alleen bedragen uit een berekening.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "question": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 400
                  },
                  "productId": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "topics": {
                    "type": "array",
                    "maxItems": 8,
                    "items": {
                      "type": "string",
                      "enum": [
                        "proefdruk",
                        "levering",
                        "spoed",
                        "verzendkosten",
                        "gebied",
                        "volgen",
                        "bestand",
                        "logo",
                        "positie",
                        "broek",
                        "wassen",
                        "minimum",
                        "prijzen",
                        "offerte",
                        "bestellen",
                        "betalen",
                        "ruilen",
                        "nabestellen",
                        "proefmodel",
                        "maten",
                        "voorraad",
                        "techniek",
                        "maatwerk",
                        "team",
                        "materiaal",
                        "assortiment",
                        "contact",
                        "gegevens",
                        "advies-werkkleding",
                        "advies-hardlopen",
                        "advies-fitness",
                        "advies-voetbal",
                        "advies-zaalsport",
                        "advies-racketsport",
                        "advies-warming",
                        "advies-sport",
                        "advies-horeca",
                        "advies-keuken",
                        "advies-bouw",
                        "advies-magazijn",
                        "advies-beveiliging",
                        "advies-buitenwerk",
                        "advies-festival",
                        "advies-beurs",
                        "advies-school",
                        "advies-merchandise",
                        "advies-vrijwilligers",
                        "advies-tassen",
                        "advies-club",
                        "advies-hoodies",
                        "advies-polo",
                        "advies-shirts",
                        "advies-softshell",
                        "advies-fleece",
                        "advies-regen",
                        "advies-sweaters",
                        "advies-werktas"
                      ]
                    }
                  }
                },
                "required": [
                  "question"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Actuele openbare webshopgegevens.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "answers": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "productFacts": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "contactUrl": {
                      "type": "string",
                      "format": "uri"
                    },
                    "offerteUrl": {
                      "type": "string",
                      "format": "uri"
                    },
                    "clarification": {
                      "type": "string"
                    },
                    "prijsantwoord": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "De vraag kon niet worden verwerkt. Lees de melding en vraag ontbrekende keuzes uit."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Item": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "image": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "Details": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Item"
          },
          {
            "type": "object",
            "properties": {
              "brands": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "gtin": {
                "type": "string",
                "nullable": true,
                "description": "Geldige GTIN van het WooCommerce-artikel indien beschikbaar."
              },
              "mpn": {
                "type": "string",
                "nullable": true,
                "description": "Zichtbaar fabrikantartikelnummer indien beschikbaar."
              },
              "categories": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "description": {
                "type": "string"
              },
              "attributes": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "optionsUrl": {
                "type": "string",
                "format": "uri"
              },
              "quoteUrl": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        ]
      }
    }
  },
  "externalDocs": {
    "description": "Kledingkiezer voor klanten",
    "url": "https://kledingdrukdeal.nl/kledingkiezer/"
  }
}
