{
  "openapi": "3.0.3",
  "info": {
    "title": "Roerdink B2B API",
    "version": "1.0.0",
    "description": "REST API for wholesale customers of **Roerdink** (B2B footwear wholesaler, the Netherlands) and the agencies that build their integrations: synchronise catalogue data and stock, place orders, and follow orders up to shipment.\n\n**Rules for integrations (and for AI assistants generating integration code)** - these reflect how the server behaves today:\n\n1. **Base URL** `https://api.roerdink.nl`; every endpoint is under `/api/v1`. JSON only. Send `Accept: application/json` (some clients otherwise receive XML) and `Content-Type: application/json` on requests with a body.\n2. **Authentication**: HTTP Basic on every request. Username and password are both GUIDs issued by Roerdink. Send the `Authorization: Basic ...` header **pre-emptively**: the server sends no `WWW-Authenticate` challenge, so clients that wait for one never authenticate. Keep credentials server-side, never in a browser or app.\n3. **Rate limit**: max. 50 requests per 60-second window per API account. Exceeding it returns `429` with a plain-text body and no `Retry-After` header; wait for the window to end.\n4. **Errors**: validation errors, unknown or foreign ids and missing permissions are currently returned as **HTTP 500** with a JSON body; the reason is in `ExceptionMessage`. Do not retry those blindly. An unexpected server error gives `Internal error (reference ...)`; quote that reference when you contact Roerdink.\n5. **Prices are set by Roerdink.** A `price` on an order line is ignored, as is `idcustomer`.\n6. **Identify products** on order lines by `productcode` (preferred), `ean`/`barcode` (exact match) or `idproduct`. The catalogue `model_id` is *not* a product id.\n7. **Store `idorder`** from the `POST /api/v1/orders` response. Roerdink overwrites `reference` shortly after creation; your reference then appears in `customer_remarks` as `Referentie klant: ...`.\n8. **Delivery address**: always send the full address. An address that is not registered for your account (postcode + house number) makes the order a dropshipment.\n9. **Do not modify orders after creation** and do not call `/process` or `/allocate`; Roerdink processes API orders automatically. There is no sandbox: every order is real.\n10. **Stock**: use `/api/v1/connectedstock?limit=1000&offset=...`. Stock is capped at 30 everywhere in this API, including `/products` and the webhooks (30 = 30 or more); `/connectedstock` only includes models released to your account.\n11. **Webhooks**: only `products.changed` and `products.free_stock_changed` are delivered. There are no order or shipment webhooks; poll `/api/v1/orders/{orderId}` and `/api/v1/picklists/{pickListId}/shipments`.\n\nA step-by-step guide with curl, PHP and C# samples: https://api.roerdink.nl/integration-guide.md (short rules for AI tools: https://api.roerdink.nl/llms.txt).\n\nProperties with a null value are omitted from responses. Field names are lower case as shown. Dates are ISO 8601 (Dutch local time). Amounts are in EUR.",
    "contact": {
      "name": "Roerdink",
      "url": "https://www.roerdink.nl/"
    }
  },
  "externalDocs": {
    "description": "Integration guide (Markdown)",
    "url": "https://api.roerdink.nl/integration-guide.md"
  },
  "servers": [
    {
      "url": "https://api.roerdink.nl",
      "description": "Production (there is no public sandbox)"
    }
  ],
  "security": [
    {
      "basicAuth": []
    }
  ],
  "tags": [
    {
      "name": "Orders",
      "description": "Create orders and read them back. Store `idorder`."
    },
    {
      "name": "Order status",
      "description": "Fulfilment status, backorders, picklists and shipments (track & trace)."
    },
    {
      "name": "Stock",
      "description": "Stock synchronisation. `freestock` is capped at 30."
    },
    {
      "name": "Catalogue",
      "description": "Product master data of the full assortment."
    },
    {
      "name": "Products",
      "description": "Single-product lookups in the warehouse system (find `idproduct`)."
    },
    {
      "name": "Webhooks",
      "description": "Push notifications for product changes. Only two events are delivered."
    },
    {
      "name": "Reference data",
      "description": "Lookup tables."
    }
  ],
  "paths": {
    "/api/v1/orders": {
      "get": {
        "tags": [
          "Orders"
        ],
        "operationId": "listOrders",
        "summary": "List your orders (one page of max. 100)",
        "description": "Returns one page (max. 100) of your own orders from the warehouse system. Always filtered to your account. Query parameters are forwarded to the warehouse system **in lower case**. Searching by your own reference is unreliable because `reference` is overwritten after creation; keep `idorder` and use `GET /api/v1/orders/{orderId}`.",
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Paging offset in steps of 100.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter on status.",
            "schema": {
              "type": "string",
              "enum": [
                "concept",
                "expected",
                "processing",
                "paused",
                "completed",
                "cancelled"
              ]
            }
          },
          {
            "name": "updated_after",
            "in": "query",
            "required": false,
            "description": "Only orders updated after this moment, format `YYYY-MM-DD HH:MM:SS` (Dutch local time).",
            "schema": {
              "type": "string"
            },
            "example": "2026-10-01 00:00:00"
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "Orders.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Order"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Orders"
        ],
        "operationId": "createOrder",
        "summary": "Create an order",
        "description": "Creates an order for your account. **Store `idorder` (and optionally `orderid`) from the response; it is the only stable key.**\n\nWhat happens on the server:\n1. Each line is resolved to a warehouse product (`idproduct`, then `ean`/`barcode`, then `productcode`; exact matches only). If one line fails the whole order is rejected.\n2. Prices you send are ignored; `idcustomer` is set to your account.\n3. Discontinued products: if `amount` exceeds the free stock the order is rejected (`Product is discontinued; amount requested not available`).\n4. Dropshipment is set when you send `dropshipment: true`, when your account is configured for it, or when the delivery address is not one of your registered addresses.\n\nShortly afterwards Roerdink processes the order automatically: it sets your net prices, rounds amounts up to the pack size (and then e-mails the order's `emailaddress`), overwrites `reference` with its own reference (your reference moves to `customer_remarks`) and moves the order from `concept` to `processing`. **Do not call `/process` or `/allocate` yourself.**\n\nThere is no sandbox: every order created here is a real order. Agree test orders with Roerdink.\n\nValidation failures return HTTP 500 with the reason in `ExceptionMessage`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderCreateRequest"
              },
              "example": {
                "reference": "WEB-100245",
                "customer_remarks": "Please deliver before noon",
                "deliveryname": "J. Jansen",
                "deliveryaddress": "Dorpsstraat 12",
                "deliveryaddress2": "",
                "deliveryzipcode": "1234 AB",
                "deliverycity": "Voorbeelddorp",
                "deliverycountry": "NL",
                "emailaddress": "j.jansen@example.com",
                "telephone": "+31612345678",
                "dropshipment": true,
                "products": [
                  {
                    "productcode": "10.123.045.42",
                    "amount": 1
                  },
                  {
                    "ean": "8712345678906",
                    "amount": 2
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "The created order (status `concept`). Line prices are provisional.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                },
                "example": {
                  "idorder": 48211934,
                  "idcustomer": 1234567,
                  "orderid": "O2026-104233",
                  "status": "concept",
                  "reference": "WEB-100245",
                  "customer_remarks": "Please deliver before noon",
                  "deliveryname": "J. Jansen",
                  "deliveryaddress": "Dorpsstraat 12",
                  "deliveryzipcode": "1234 AB",
                  "deliverycity": "Voorbeelddorp",
                  "deliverycountry": "NL",
                  "emailaddress": "j.jansen@example.com",
                  "telephone": "+31612345678",
                  "created": "2026-10-28T14:02:11+01:00",
                  "updated": "2026-10-28T14:02:11+01:00",
                  "products": [
                    {
                      "idorder_product": 301245501,
                      "idproduct": 9876543,
                      "idvatgroup": 101,
                      "productcode": "10.123.045.42",
                      "name": "Nordic Walker NW-2041 Zwart 42",
                      "price": 59.95,
                      "amount": 1
                    },
                    {
                      "idorder_product": 301245502,
                      "idproduct": 9876544,
                      "idvatgroup": 101,
                      "productcode": "10.123.045.43",
                      "name": "Nordic Walker NW-2041 Zwart 43",
                      "price": 59.95,
                      "amount": 2
                    }
                  ],
                  "picklists": [],
                  "dropshipment": true
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orders/{orderId}": {
      "parameters": [
        {
          "name": "orderId",
          "in": "path",
          "required": true,
          "description": "Numeric order id: the `idorder` value returned by `POST /api/v1/orders` (not the textual `orderid` such as `O2026-104233`). Must belong to your account.",
          "schema": {
            "type": "integer",
            "format": "int32"
          }
        }
      ],
      "get": {
        "tags": [
          "Orders"
        ],
        "operationId": "getOrder",
        "summary": "Get one order",
        "description": "Returns the order including `status`, lines and `picklists`. Use `picklists[].idpicklist` to get shipments. An order of another customer, or an unknown id, returns HTTP 500 (`Order given is not yours.` or an upstream error).",
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "The order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                },
                "example": {
                  "idorder": 48211934,
                  "idcustomer": 1234567,
                  "orderid": "O2026-104233",
                  "status": "processing",
                  "reference": "Roerdink order (NC): 734512",
                  "customer_remarks": "Referentie klant: WEB-100245 | Opmerkingen klant: Please deliver before noon",
                  "deliveryname": "J. Jansen",
                  "deliveryaddress": "Dorpsstraat 12",
                  "deliveryzipcode": "1234 AB",
                  "deliverycity": "Voorbeelddorp",
                  "deliverycountry": "NL",
                  "emailaddress": "j.jansen@example.com",
                  "telephone": "+31612345678",
                  "created": "2026-10-28T14:02:11+01:00",
                  "updated": "2026-10-28T14:09:40+01:00",
                  "products": [
                    {
                      "idorder_product": 301245501,
                      "idproduct": 9876543,
                      "idvatgroup": 101,
                      "productcode": "10.123.045.42",
                      "name": "Nordic Walker NW-2041 Zwart 42",
                      "price": 41.97,
                      "amount": 1
                    },
                    {
                      "idorder_product": 301245502,
                      "idproduct": 9876544,
                      "idvatgroup": 101,
                      "productcode": "10.123.045.43",
                      "name": "Nordic Walker NW-2041 Zwart 43",
                      "price": 41.97,
                      "amount": 2
                    }
                  ],
                  "picklists": [
                    {
                      "idpicklist": 55120987,
                      "picklistid": "P2026-88123",
                      "idorder": 48211934,
                      "status": "new",
                      "totalproducts": 3,
                      "totalpicked": 0,
                      "created": "2026-10-28T14:09:41+01:00"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Orders"
        ],
        "operationId": "updateOrder",
        "summary": "Update an order (discouraged)",
        "description": "Updates order fields. `reference` cannot be changed and prices are ignored.\n\n**Not recommended for normal integrations.** Roerdink prices and processes API orders automatically shortly after creation. Changes made through this endpoint after that moment are not reflected in Roerdink's own order administration (pricing, pack-size correction, invoicing). Treat orders as immutable after creation and contact Roerdink if an order must change.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "The updated order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Orders"
        ],
        "operationId": "deleteOrder",
        "summary": "Cancel an order (discouraged)",
        "description": "Asks the warehouse system to cancel/delete the order. Whether this succeeds depends on the order's state. Once Roerdink has processed the order (status `processing`), contact Roerdink instead: cancelling here does not update Roerdink's own order administration.",
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "`true` when the warehouse system accepted the request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean"
                },
                "example": true
              }
            }
          }
        }
      }
    },
    "/api/v1/orders/{orderId}/allocate": {
      "parameters": [
        {
          "name": "orderId",
          "in": "path",
          "required": true,
          "description": "Numeric order id: the `idorder` value returned by `POST /api/v1/orders` (not the textual `orderid` such as `O2026-104233`). Must belong to your account.",
          "schema": {
            "type": "integer",
            "format": "int32"
          }
        }
      ],
      "post": {
        "tags": [
          "Orders"
        ],
        "operationId": "allocateOrder",
        "summary": "Allocate stock for an order (discouraged)",
        "description": "Passes the `allocate` action to the warehouse system for your own order. Roerdink processes API orders automatically; calling this yourself can skip Roerdink's pack-size correction. Only use it when Roerdink asks you to.",
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "The order after the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orders/{orderId}/process": {
      "parameters": [
        {
          "name": "orderId",
          "in": "path",
          "required": true,
          "description": "Numeric order id: the `idorder` value returned by `POST /api/v1/orders` (not the textual `orderid` such as `O2026-104233`). Must belong to your account.",
          "schema": {
            "type": "integer",
            "format": "int32"
          }
        }
      ],
      "post": {
        "tags": [
          "Orders"
        ],
        "operationId": "processOrder",
        "summary": "Process an order (discouraged)",
        "description": "Passes the `process` action to the warehouse system for your own order. Roerdink processes API orders automatically; calling this yourself can skip Roerdink's pack-size correction. Only use it when Roerdink asks you to.",
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "The order after the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orders/{orderId}/reopen": {
      "parameters": [
        {
          "name": "orderId",
          "in": "path",
          "required": true,
          "description": "Numeric order id: the `idorder` value returned by `POST /api/v1/orders` (not the textual `orderid` such as `O2026-104233`). Must belong to your account.",
          "schema": {
            "type": "integer",
            "format": "int32"
          }
        }
      ],
      "post": {
        "tags": [
          "Orders"
        ],
        "operationId": "reopenOrder",
        "summary": "Reopen an order (discouraged)",
        "description": "Passes the `reopen` action to the warehouse system for your own order. Roerdink processes API orders automatically; calling this yourself can skip Roerdink's pack-size correction. Only use it when Roerdink asks you to.",
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "The order after the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orders/{orderId}/backorders": {
      "parameters": [
        {
          "name": "orderId",
          "in": "path",
          "required": true,
          "description": "Numeric order id: the `idorder` value returned by `POST /api/v1/orders` (not the textual `orderid` such as `O2026-104233`). Must belong to your account.",
          "schema": {
            "type": "integer",
            "format": "int32"
          }
        }
      ],
      "get": {
        "tags": [
          "Order status"
        ],
        "operationId": "listOrderBackorders",
        "summary": "Backorders of an order",
        "description": "Quantities of the order that are waiting for stock (the order is partly delivered).",
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "Backorders (empty array when none).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BackOrder"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orders/{orderId}/productstatus": {
      "parameters": [
        {
          "name": "orderId",
          "in": "path",
          "required": true,
          "description": "Numeric order id: the `idorder` value returned by `POST /api/v1/orders` (not the textual `orderid` such as `O2026-104233`). Must belong to your account.",
          "schema": {
            "type": "integer",
            "format": "int32"
          }
        }
      ],
      "get": {
        "tags": [
          "Order status"
        ],
        "operationId": "getOrderProductStatus",
        "summary": "Fulfilment status per product",
        "description": "Per product of the order: ordered, allocated, on picklist, backorder and delivered quantities.",
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "Status per product.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductStatusList"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orders/{orderId}/notes": {
      "parameters": [
        {
          "name": "orderId",
          "in": "path",
          "required": true,
          "description": "Numeric order id: the `idorder` value returned by `POST /api/v1/orders` (not the textual `orderid` such as `O2026-104233`). Must belong to your account.",
          "schema": {
            "type": "integer",
            "format": "int32"
          }
        }
      ],
      "get": {
        "tags": [
          "Order status"
        ],
        "operationId": "listOrderNotes",
        "summary": "Notes / log entries of an order",
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "Notes.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrderNote"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orders/{orderId}/tags": {
      "parameters": [
        {
          "name": "orderId",
          "in": "path",
          "required": true,
          "description": "Numeric order id: the `idorder` value returned by `POST /api/v1/orders` (not the textual `orderid` such as `O2026-104233`). Must belong to your account.",
          "schema": {
            "type": "integer",
            "format": "int32"
          }
        }
      ],
      "get": {
        "tags": [
          "Order status"
        ],
        "operationId": "listOrderTags",
        "summary": "Tags of an order",
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "Tags.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Tag"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Order status"
        ],
        "operationId": "addOrderTag",
        "summary": "Add a tag to an order (only when agreed with Roerdink)",
        "description": "Adds an existing tag by `idtag`. There is no endpoint to list available tags; only use tag ids Roerdink gave you. Not needed for normal integrations (use `dropshipment` on create instead).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TagInput"
              }
            }
          }
        },
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "The tag.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tag"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orders/{orderId}/products": {
      "parameters": [
        {
          "name": "orderId",
          "in": "path",
          "required": true,
          "description": "Numeric order id: the `idorder` value returned by `POST /api/v1/orders` (not the textual `orderid` such as `O2026-104233`). Must belong to your account.",
          "schema": {
            "type": "integer",
            "format": "int32"
          }
        }
      ],
      "get": {
        "tags": [
          "Orders"
        ],
        "operationId": "listOrderProducts",
        "summary": "Lines of an order",
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "Order lines (product objects with `idorder_product`, `amount` and `price`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Product"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Orders"
        ],
        "operationId": "addOrderProduct",
        "summary": "Add a line to an order (discouraged)",
        "description": "Adds a product line. Requires `idproduct` (no `ean`/`productcode` translation on this endpoint) and `amount`; the price is ignored.\n\n**Not recommended for normal integrations.** Roerdink prices and processes API orders automatically shortly after creation. Changes made through this endpoint after that moment are not reflected in Roerdink's own order administration (pricing, pack-size correction, invoicing). Treat orders as immutable after creation and contact Roerdink if an order must change.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "idproduct",
                  "amount"
                ],
                "properties": {
                  "idproduct": {
                    "type": "integer"
                  },
                  "amount": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "remarks": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "The added line.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orders/{orderId}/products/{idOrderProduct}": {
      "parameters": [
        {
          "name": "orderId",
          "in": "path",
          "required": true,
          "description": "Numeric order id: the `idorder` value returned by `POST /api/v1/orders` (not the textual `orderid` such as `O2026-104233`). Must belong to your account.",
          "schema": {
            "type": "integer",
            "format": "int32"
          }
        },
        {
          "name": "idOrderProduct",
          "in": "path",
          "required": true,
          "description": "Order line id (`idorder_product`) from the order's `products[]`.",
          "schema": {
            "type": "integer",
            "format": "int32"
          }
        }
      ],
      "put": {
        "tags": [
          "Orders"
        ],
        "operationId": "updateOrderProduct",
        "summary": "Change an order line (discouraged)",
        "description": "Changes e.g. the `amount` of a line; the price is ignored.\n\n**Not recommended for normal integrations.** Roerdink prices and processes API orders automatically shortly after creation. Changes made through this endpoint after that moment are not reflected in Roerdink's own order administration (pricing, pack-size correction, invoicing). Treat orders as immutable after creation and contact Roerdink if an order must change.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "remarks": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "The changed line.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Orders"
        ],
        "operationId": "deleteOrderProduct",
        "summary": "Remove an order line (discouraged)",
        "description": "Removes a line.\n\n**Not recommended for normal integrations.** Roerdink prices and processes API orders automatically shortly after creation. Changes made through this endpoint after that moment are not reflected in Roerdink's own order administration (pricing, pack-size correction, invoicing). Treat orders as immutable after creation and contact Roerdink if an order must change.",
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "`true` when removed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean"
                },
                "example": true
              }
            }
          }
        }
      }
    },
    "/api/v1/picklists/{pickListId}": {
      "parameters": [
        {
          "name": "pickListId",
          "in": "path",
          "required": true,
          "description": "Numeric picklist id (`idpicklist`), taken from `picklists[]` of `GET /api/v1/orders/{orderId}`. Must belong to your account.",
          "schema": {
            "type": "integer",
            "format": "int32"
          }
        }
      ],
      "get": {
        "tags": [
          "Order status"
        ],
        "operationId": "getPicklist",
        "summary": "Get a picklist (products of a shipment)",
        "description": "Returns the picklist including its products. A picklist of another customer returns HTTP 500 (`Picklist given is not yours.`).",
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "The picklist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Picklist"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/picklists/{pickListId}/shipments": {
      "parameters": [
        {
          "name": "pickListId",
          "in": "path",
          "required": true,
          "description": "Numeric picklist id (`idpicklist`), taken from `picklists[]` of `GET /api/v1/orders/{orderId}`. Must belong to your account.",
          "schema": {
            "type": "integer",
            "format": "int32"
          }
        }
      ],
      "get": {
        "tags": [
          "Order status"
        ],
        "operationId": "listPicklistShipments",
        "summary": "Shipments with track & trace",
        "description": "Shipments (parcels) of a picklist with `trackingcode` and `tracktraceurl`. Empty until the parcel has been labelled. There is no shipment webhook: poll this for open orders.",
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "Shipments.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Shipment"
                  }
                },
                "example": [
                  {
                    "idshipment": 7712345,
                    "idpicklist": 55120987,
                    "idorder": 48211934,
                    "provider": "postnl",
                    "providername": "PostNL",
                    "public_providername": "PostNL",
                    "profile_name": "Standaard pakket",
                    "trackingcode": "3SABCD1234567",
                    "tracktraceurl": "https://jouw.postnl.nl/track-and-trace/3SABCD1234567-NL-1234AB",
                    "labelurl": "https://example.invalid/label.pdf",
                    "cancelled": false,
                    "created": "2026-10-29T10:15:02+01:00"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/api/v1/connectedstock": {
      "get": {
        "tags": [
          "Stock"
        ],
        "operationId": "getConnectedStock",
        "summary": "Stock of the models released to your account (recommended stock sync)",
        "description": "Returns one row per size/colour variant of every active model that is released to your account. You (or Roerdink) release models via the catalogue on www.roerdink.nl; an empty array means no models are released yet - contact Roerdink.\n\n`stock[0].freestock` is capped at **30** (30 means 30 or more).\n\nPaging: request `?limit=1000&offset=0`, then `offset=1000`, `2000`, ... until a page has fewer than `limit` rows. Variants that disappear from the result are no longer available to you (deactivated or released no more): set them to 0 in your shop.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Without `limit` (or with 0) **all** rows are returned in one response and `offset` is ignored. Recommended: `1000`.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "example": 1000
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Number of rows to skip (only used together with `limit`). Rows are in a stable order.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "example": 0
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "Stock rows.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConnectedStockItem"
                  }
                },
                "example": [
                  {
                    "productcode": "10.123.045.42",
                    "barcode": "8712345678906",
                    "model_id": 6789,
                    "model_name": "NW-2041",
                    "size_code": "42",
                    "color_code": "Zwart",
                    "stock": [
                      {
                        "freestock": 30,
                        "minstock": 0,
                        "maxstock": 0
                      }
                    ]
                  },
                  {
                    "productcode": "10.123.045.43",
                    "barcode": "8712345678913",
                    "model_id": 6789,
                    "model_name": "NW-2041",
                    "size_code": "43",
                    "color_code": "Zwart",
                    "stock": [
                      {
                        "freestock": 0,
                        "minstock": 0,
                        "maxstock": 0,
                        "expected_in_days": 12
                      }
                    ]
                  },
                  {
                    "productcode": "10.123.045.44",
                    "barcode": "8712345678920",
                    "model_id": 6789,
                    "model_name": "NW-2041",
                    "size_code": "44",
                    "color_code": "Zwart",
                    "stock": [
                      {
                        "freestock": 3,
                        "minstock": 0,
                        "maxstock": 0,
                        "out_of_assortment": true
                      }
                    ]
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/api/v1/allstock": {
      "get": {
        "tags": [
          "Stock"
        ],
        "operationId": "getAllStock",
        "summary": "Stock of the full active assortment (requires permission)",
        "description": "Like `/connectedstock` but for every active variant, with fewer fields. Only available when Roerdink has granted full stock access to your account; otherwise HTTP 500 with `ExceptionMessage` `Geen toegang tot alle voorraad.` (no access). `freestock` is capped at 30. Same paging as `/connectedstock`.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Without `limit` (or with 0) **all** rows are returned in one response and `offset` is ignored. Recommended: `1000`.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "example": 1000
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Number of rows to skip (only used together with `limit`). Rows are in a stable order.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "example": 0
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "Stock rows.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AllStockItem"
                  }
                },
                "example": [
                  {
                    "productcode": "10.123.045.42",
                    "barcode": "8712345678906",
                    "stock": [
                      {
                        "freestock": 30
                      }
                    ]
                  },
                  {
                    "productcode": "10.123.045.43",
                    "barcode": "8712345678913",
                    "stock": [
                      {
                        "freestock": 0,
                        "expected_in_days": 12
                      }
                    ]
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/api/v1/catalogue": {
      "get": {
        "tags": [
          "Catalogue"
        ],
        "operationId": "getCatalogue",
        "summary": "Product data of the full active assortment (1000 per page)",
        "description": "Returns product data for every active size/colour variant: brand, model, size, colour, recommended retail price, description, images and categories. Not limited to released models and without stock figures (use `/connectedstock` for stock).\n\nFixed page size of **1000** (`limit` is ignored). Page with `?offset=0`, `1000`, `2000`, ... until a page has fewer than 1000 rows. Sorted by brand, model, variant.\n\n`price` here is the **recommended retail price**, not your purchase price.",
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Rows to skip, in steps of 1000.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "Catalogue rows.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CatalogueItem"
                  }
                },
                "example": [
                  {
                    "productcode": "10.123.045.42",
                    "barcode": "8712345678906",
                    "model_id": 6789,
                    "model_name": "NW-2041",
                    "size_code": "42",
                    "color_code": "Zwart",
                    "brand_id": 123,
                    "brand_name": "Nordic Walker",
                    "price": 119.95,
                    "description": "Comfortable leather walking shoe with removable footbed.",
                    "images": [
                      "https://www.roerdink.nl/write/assets/modellen/0006789/example-1.jpg",
                      "https://www.roerdink.nl/write/assets/modellen/0006789/example-2.jpg"
                    ],
                    "categories": [
                      {
                        "hcat_id": 12,
                        "hcat_name": "Dames",
                        "cat_id": 345,
                        "cat_name": "Wandelschoenen",
                        "model_url": "https://www.roerdink.nl/nl/winkel/12_dames/345_wandelschoenen/6789_nw2041.html"
                      }
                    ],
                    "stock": [
                      {}
                    ]
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/api/v1/products": {
      "get": {
        "tags": [
          "Products"
        ],
        "operationId": "listProducts",
        "summary": "Search products in the warehouse system (100 per page)",
        "description": "Returns one page (max. 100) of active products from the warehouse system, enriched with Roerdink data and your customer price (`price_order`). Query parameters are forwarded **in lower case**; `inactive` and `idsupplier` are not allowed and are dropped. Use this to find an `idproduct`; for bulk data use `/catalogue` and `/connectedstock`.",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Free-text search (fuzzy).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productcode",
            "in": "query",
            "required": false,
            "description": "Exact product code.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Paging offset in steps of 100.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "Products.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Product"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/products/lookup": {
      "get": {
        "tags": [
          "Products"
        ],
        "operationId": "lookupProduct",
        "summary": "Find one product by EAN or product code",
        "description": "Exact lookup by `ean` or `productcode` (at least one required; `ean` is tried first). Returns the enriched product including `idproduct`. Use it to check identifiers before placing an order. No match returns HTTP 500 (`No product found for ...`).",
        "parameters": [
          {
            "name": "ean",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "8712345678906"
          },
          {
            "name": "productcode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "10.123.045.42"
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "The product.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                },
                "example": {
                  "idproduct": 9876543,
                  "idvatgroup": 101,
                  "productcode": "10.123.045.42",
                  "name": "Nordic Walker NW-2041 Zwart 42",
                  "barcode": "8712345678906",
                  "price": 59.95,
                  "price_order": 41.97,
                  "discount": 17.98,
                  "discount_perc": 29.99,
                  "outlet": false,
                  "active": true,
                  "stock": [
                    {
                      "idwarehouse": 1001,
                      "freestock": 14
                    }
                  ],
                  "free_stock": 14,
                  "model_id": 6789,
                  "model_name": "NW-2041",
                  "categories": [
                    {
                      "hcat_id": 12,
                      "hcat_name": "Dames",
                      "cat_id": 345,
                      "cat_name": "Wandelschoenen"
                    }
                  ],
                  "purchase_in_quantities_of": 0,
                  "minimum_purchase_quantity": 0
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/products/{productId}": {
      "parameters": [
        {
          "name": "productId",
          "in": "path",
          "required": true,
          "description": "Warehouse product id (`idproduct`). Not the catalogue `model_id`.",
          "schema": {
            "type": "integer",
            "format": "int32"
          }
        }
      ],
      "get": {
        "tags": [
          "Products"
        ],
        "operationId": "getProduct",
        "summary": "Get one product by idproduct",
        "description": "Returns the enriched product. An unknown id returns HTTP 200 with body `null`.",
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "The product, or `null` when not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                },
                "example": {
                  "idproduct": 9876543,
                  "idvatgroup": 101,
                  "productcode": "10.123.045.42",
                  "name": "Nordic Walker NW-2041 Zwart 42",
                  "barcode": "8712345678906",
                  "price": 59.95,
                  "price_order": 41.97,
                  "discount": 17.98,
                  "discount_perc": 29.99,
                  "outlet": false,
                  "active": true,
                  "stock": [
                    {
                      "idwarehouse": 1001,
                      "freestock": 14
                    }
                  ],
                  "free_stock": 14,
                  "model_id": 6789,
                  "model_name": "NW-2041",
                  "categories": [
                    {
                      "hcat_id": 12,
                      "hcat_name": "Dames",
                      "cat_id": 345,
                      "cat_name": "Wandelschoenen"
                    }
                  ],
                  "purchase_in_quantities_of": 0,
                  "minimum_purchase_quantity": 0
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/products/{productId}/stock": {
      "parameters": [
        {
          "name": "productId",
          "in": "path",
          "required": true,
          "description": "Warehouse product id (`idproduct`). Not the catalogue `model_id`.",
          "schema": {
            "type": "integer",
            "format": "int32"
          }
        }
      ],
      "get": {
        "tags": [
          "Products"
        ],
        "operationId": "getProductStock",
        "summary": "Free stock of one product per warehouse",
        "description": "Informational. For stock synchronisation use `/connectedstock`.",
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "Stock per warehouse.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WarehouseStock"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/products/{productId}/stock/{warehouseId}": {
      "parameters": [
        {
          "name": "productId",
          "in": "path",
          "required": true,
          "description": "Warehouse product id (`idproduct`). Not the catalogue `model_id`.",
          "schema": {
            "type": "integer",
            "format": "int32"
          }
        },
        {
          "name": "warehouseId",
          "in": "path",
          "required": true,
          "description": "Warehouse id (`idwarehouse`).",
          "schema": {
            "type": "integer",
            "format": "int32"
          }
        }
      ],
      "get": {
        "tags": [
          "Products"
        ],
        "operationId": "getProductStockForWarehouse",
        "summary": "Free stock of one product in one warehouse",
        "description": "Informational. For stock synchronisation use `/connectedstock`.",
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "Stock.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WarehouseStock"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/products/{productId}/images": {
      "parameters": [
        {
          "name": "productId",
          "in": "path",
          "required": true,
          "description": "Warehouse product id (`idproduct`). Not the catalogue `model_id`.",
          "schema": {
            "type": "integer",
            "format": "int32"
          }
        }
      ],
      "get": {
        "tags": [
          "Products"
        ],
        "operationId": "listProductImages",
        "summary": "Images stored in the warehouse system for a product",
        "description": "Often empty. The product images of Roerdink are in `images` of `/catalogue`.",
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "Images.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProductImage"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/products/{productId}/warehouses": {
      "parameters": [
        {
          "name": "productId",
          "in": "path",
          "required": true,
          "description": "Warehouse product id (`idproduct`). Not the catalogue `model_id`.",
          "schema": {
            "type": "integer",
            "format": "int32"
          }
        }
      ],
      "get": {
        "tags": [
          "Products"
        ],
        "operationId": "listProductWarehouseSettings",
        "summary": "Warehouse stock-level settings of a product",
        "description": "Rarely needed by integrations.",
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "Settings.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WarehouseSetting"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/vatgroups": {
      "get": {
        "tags": [
          "Reference data"
        ],
        "operationId": "listVatGroups",
        "summary": "VAT groups",
        "description": "Maps `idvatgroup` (on products and order lines) to a VAT percentage.",
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "VAT groups.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/VatGroup"
                  }
                },
                "example": [
                  {
                    "idvatgroup": 101,
                    "name": "Hoog",
                    "percentage": 21
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/api/v1/hooks": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "listWebhooks",
        "summary": "List your webhook subscriptions",
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "Subscriptions (active and inactive).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Webhook"
                  }
                },
                "example": [
                  {
                    "idhook": 42,
                    "name": "Stock updates for my shop",
                    "event": "products.free_stock_changed",
                    "address": "https://shop.example.com/roerdink/webhook",
                    "active": true,
                    "secret": true
                  }
                ]
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "createWebhook",
        "summary": "Subscribe to product events",
        "description": "Creates a subscription. **Only `products.changed` and `products.free_stock_changed` are delivered**; other event names are accepted but never fire (there are no order or shipment webhooks). You can have one subscription per event; a second one returns HTTP 500 `Already subscribed to this hook`. Choose `address` carefully: it cannot be changed through the API (see `DELETE`). Missing fields return HTTP 500 (`Name is mandatory`, `Event is mandatory`, `Address is mandatory`).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCreateRequest"
              }
            }
          }
        },
        "callbacks": {
          "productEvent": {
            "{$request.body#/address}": {
              "post": {
                "summary": "Delivery of a product event to your endpoint",
                "description": "Roerdink POSTs this body to your `address` when a product changes (`products.changed`) or its free stock changes (`products.free_stock_changed`). Events cover **all** products of Roerdink, not only the ones released to you: ignore unknown `productcode`s.\n\n* `Content-Type` is `text/json` (UTF-8). Read the raw body before parsing.\n* Respond with any 2xx status within a few seconds and process asynchronously. Anything else (including timeouts) is retried: up to 15 attempts in total over roughly 24 hours (10 s, 30 s, 5 min, 10 min, 30 min, then hourly growing to 6 h). Retries resend the original body, so deliveries can arrive late, out of order or twice: make processing idempotent.\n* **Signature**: when the subscription has a `secret`, header `X-Picqer-Signature` holds the lowercase hex HMAC-SHA256 of the body, keyed with the secret. Known issue: the server computes it over an ASCII version of the body in which every non-ASCII character is replaced by `?`. If verification over the raw body fails and the body contains non-ASCII characters (e.g. `Str\u00f6vels`), recompute over that `?`-replaced text before rejecting the call. There is no timestamp or replay protection.",
                "parameters": [
                  {
                    "name": "X-Picqer-Signature",
                    "in": "header",
                    "required": false,
                    "description": "Lowercase hex HMAC-SHA256 of the body (only when a secret is set).",
                    "schema": {
                      "type": "string"
                    }
                  }
                ],
                "requestBody": {
                  "required": true,
                  "content": {
                    "text/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookPayload"
                      },
                      "example": {
                        "idhook": 42,
                        "name": "ProductsFreeStockChanged (auto-added @ 2026-03-02 10:15:00)",
                        "event": "products.free_stock_changed",
                        "event_triggered_at": "2026-10-28T14:05:12.345+01:00",
                        "data": {
                          "idproduct": 9876543,
                          "productcode": "10.123.045.42",
                          "name": "Nordic Walker NW-2041 Zwart 42",
                          "barcode": "8712345678906",
                          "price": 59.95,
                          "active": true,
                          "stock": [
                            {
                              "idwarehouse": 1001,
                              "freestock": 14
                            }
                          ]
                        }
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Delivery accepted; no retry."
                  },
                  "default": {
                    "description": "Any other status or a timeout: delivery is retried."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "The created subscription.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                },
                "example": {
                  "idhook": 42,
                  "name": "Stock updates for my shop",
                  "event": "products.free_stock_changed",
                  "address": "https://shop.example.com/roerdink/webhook",
                  "active": true,
                  "secret": true
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/hooks/{idhook}": {
      "parameters": [
        {
          "name": "idhook",
          "in": "path",
          "required": true,
          "description": "Webhook subscription id (`idhook`).",
          "schema": {
            "type": "integer",
            "format": "int32"
          }
        }
      ],
      "get": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "getWebhook",
        "summary": "Get one webhook subscription",
        "description": "Returns HTTP 200 with body `null` when the id is not yours or does not exist.",
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "200": {
            "description": "The subscription, or `null`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                },
                "example": {
                  "idhook": 42,
                  "name": "Stock updates for my shop",
                  "event": "products.free_stock_changed",
                  "address": "https://shop.example.com/roerdink/webhook",
                  "active": true,
                  "secret": true
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "deleteWebhook",
        "summary": "Unsubscribe (currently not effective)",
        "description": "**Known issue:** this endpoint returns HTTP 204 but the subscription currently stays active and deliveries continue. Because the subscription remains, you also cannot create a new one for the same event. To stop deliveries or change the address, contact Roerdink. An unknown id returns HTTP 500 (`Not found`).",
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "204": {
            "description": "Request accepted (see known issue)."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic",
        "description": "Username = API id (GUID), password = API password (GUID), both issued by Roerdink. Send the header on every request without waiting for a challenge. A missing, malformed, wrong or inactive account returns 401 with an empty body."
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Missing `Authorization` header, or unknown/inactive credentials. Empty body, no `WWW-Authenticate` header."
      },
      "TooManyRequests": {
        "description": "Rate limit exceeded (50 requests per 60 s per API account). No `Retry-After` header; the body states the remaining seconds.",
        "content": {
          "text/html": {
            "schema": {
              "type": "string"
            },
            "example": "Too many requests (quota will be replenished in 37 seconds)"
          }
        }
      },
      "ServerError": {
        "description": "Used for validation errors, unknown or foreign ids, missing permissions and genuine server or upstream failures. Read `ExceptionMessage`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "description": "Body of an HTTP 500 response (ASP.NET Web API error format). Read `ExceptionMessage` for the reason. For an unexpected server error it reads `Internal error (reference XXXXXXXX). ...`; quote that reference when you contact Roerdink.",
        "properties": {
          "Message": {
            "type": "string",
            "description": "Generic text, usually `An error has occurred.`"
          },
          "ExceptionMessage": {
            "type": "string",
            "description": "The actual reason, e.g. a validation message. English, except a few messages that are in Dutch (e.g. `Geen toegang tot alle voorraad.`)."
          }
        },
        "example": {
          "Message": "An error has occurred.",
          "ExceptionMessage": "Product not found. Tried idproduct=(none), ean=8712345678999, productcode=(none). Accepted identifiers: 'idproduct' (Picqer-internal id), 'ean' (= the 'barcode' field in the /catalogue response), 'productcode'."
        }
      },
      "OrderLineInput": {
        "type": "object",
        "description": "One order line. Identify the product with **at least one** of `productcode`, `ean`/`barcode` or `idproduct`. The server resolves them in this order and uses the first exact match: `idproduct`, then `ean` (exact barcode match), then `productcode` (exact match). If an identifier is given but nothing matches, the whole order is rejected (HTTP 500, `Product not found...`).\n\nAny `price` you send is ignored: Roerdink sets the price.",
        "required": [
          "amount"
        ],
        "properties": {
          "productcode": {
            "type": "string",
            "description": "Roerdink article code of one size/colour variant. Preferred identifier.",
            "example": "10.123.045.42"
          },
          "ean": {
            "type": "string",
            "description": "EAN/GTIN barcode of the variant (exact match).",
            "example": "8712345678906"
          },
          "barcode": {
            "type": "string",
            "description": "Alias for `ean` (this is the field name used in `/catalogue` and `/connectedstock`). Ignored when `ean` is also given."
          },
          "idproduct": {
            "type": "integer",
            "format": "int32",
            "description": "Warehouse product id, as returned by `/api/v1/products` or `/api/v1/products/lookup`. **Not** the catalogue `model_id`."
          },
          "amount": {
            "type": "integer",
            "format": "int32",
            "minimum": 1,
            "description": "Number of pairs/items. Use multiples of the product's pack size (`purchase_in_quantities_of`); otherwise Roerdink rounds the amount up and sends a notification e-mail to the order's `emailaddress` (for a dropshipment: your consumer)."
          },
          "remarks": {
            "type": "string",
            "description": "Optional remark for this line."
          }
        }
      },
      "OrderCreateRequest": {
        "type": "object",
        "description": "New order. Only the fields below are supported; do not send prices, `idcustomer`, discounts, templates or shipping profiles (they are ignored or overwritten).\n\n**Delivery address and dropshipment.** Always send the complete delivery address. If the postcode plus house number do not match one of the addresses Roerdink has on file for your account, the order is treated as a **dropshipment** (shipped to your end customer), even if you did not set `dropshipment`. A missing or incomplete postcode, or a foreign address that is not on file, also counts as dropshipment. You cannot force an order to be non-dropship. Put the house number in `deliveryaddress` (the last group of digits is used) and additions such as apartment numbers in `deliveryaddress2`.",
        "required": [
          "products"
        ],
        "properties": {
          "reference": {
            "type": "string",
            "maxLength": 255,
            "description": "Your own order number. **Will be overwritten** by Roerdink shortly after creation; it then appears in `customer_remarks` as `Referentie klant: <value>`. Store `idorder` from the response as your key."
          },
          "customer_remarks": {
            "type": "string",
            "description": "Free text remark. After processing it appears as `Opmerkingen klant: <value>` in `customer_remarks`."
          },
          "deliveryname": {
            "type": "string",
            "description": "Name of the recipient (company or person)."
          },
          "deliverycontactname": {
            "type": "string"
          },
          "deliveryaddress": {
            "type": "string",
            "description": "Street and house number, e.g. `Dorpsstraat 12`."
          },
          "deliveryaddress2": {
            "type": "string",
            "description": "Address addition (apartment, building)."
          },
          "deliveryzipcode": {
            "type": "string",
            "description": "Postcode. Spaces and punctuation are ignored for matching."
          },
          "deliverycity": {
            "type": "string"
          },
          "deliveryregion": {
            "type": "string"
          },
          "deliverycountry": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code, e.g. `NL`, `BE`, `DE`.",
            "example": "NL"
          },
          "telephone": {
            "type": "string",
            "description": "Recipient phone number (used by carriers)."
          },
          "emailaddress": {
            "type": "string",
            "format": "email",
            "description": "Recipient e-mail address (used by carriers)."
          },
          "preferred_delivery_date": {
            "type": "string",
            "format": "date",
            "description": "Optional preferred delivery date."
          },
          "dropshipment": {
            "type": "boolean",
            "description": "Set `true` when the order ships directly to your end customer. The server may also set it automatically (see above); it never switches it off."
          },
          "products": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/OrderLineInput"
            }
          }
        },
        "example": {
          "reference": "WEB-100245",
          "customer_remarks": "Please deliver before noon",
          "deliveryname": "J. Jansen",
          "deliveryaddress": "Dorpsstraat 12",
          "deliveryaddress2": "",
          "deliveryzipcode": "1234 AB",
          "deliverycity": "Voorbeelddorp",
          "deliverycountry": "NL",
          "emailaddress": "j.jansen@example.com",
          "telephone": "+31612345678",
          "dropshipment": true,
          "products": [
            {
              "productcode": "10.123.045.42",
              "amount": 1
            },
            {
              "ean": "8712345678906",
              "amount": 2
            }
          ]
        }
      },
      "OrderUpdateRequest": {
        "type": "object",
        "description": "Fields to change on an existing order (same field names as `OrderCreateRequest`). `reference` cannot be changed (it is ignored). Change order lines with the `/orders/{orderId}/products` endpoints; if you do send `products` here, `ean`/`barcode`/`productcode` are translated to `idproduct` and prices are ignored, but whether the warehouse system applies line changes through this endpoint is not guaranteed.",
        "properties": {
          "customer_remarks": {
            "type": "string"
          },
          "deliveryname": {
            "type": "string"
          },
          "deliverycontactname": {
            "type": "string"
          },
          "deliveryaddress": {
            "type": "string"
          },
          "deliveryaddress2": {
            "type": "string"
          },
          "deliveryzipcode": {
            "type": "string"
          },
          "deliverycity": {
            "type": "string"
          },
          "deliveryregion": {
            "type": "string"
          },
          "deliverycountry": {
            "type": "string"
          },
          "telephone": {
            "type": "string"
          },
          "emailaddress": {
            "type": "string"
          },
          "preferred_delivery_date": {
            "type": "string",
            "format": "date"
          }
        }
      },
      "OrderLine": {
        "type": "object",
        "description": "Order line as stored in the warehouse system.",
        "properties": {
          "idorder_product": {
            "type": "integer",
            "description": "Id of this order line."
          },
          "idproduct": {
            "type": "integer",
            "description": "Warehouse product id."
          },
          "idvatgroup": {
            "type": "integer"
          },
          "productcode": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "remarks": {
            "type": "string"
          },
          "price": {
            "type": "number",
            "format": "decimal",
            "description": "Unit price in EUR. Right after creation this is the gross price; Roerdink replaces it with your net price when it processes the order."
          },
          "amount": {
            "type": "integer"
          },
          "amount_cancelled": {
            "type": "integer"
          }
        }
      },
      "Order": {
        "type": "object",
        "description": "Order. Properties with a null value are omitted. Other properties of the warehouse system may be present; ignore what you do not need.",
        "properties": {
          "idorder": {
            "type": "integer",
            "description": "**Stable numeric key of the order.** Use it in all `/orders/{orderId}` calls."
          },
          "orderid": {
            "type": "string",
            "description": "Human-readable order number, e.g. `O2026-104233`."
          },
          "idcustomer": {
            "type": "integer",
            "description": "Your customer id in the warehouse system (set by the server)."
          },
          "status": {
            "type": "string",
            "enum": [
              "concept",
              "expected",
              "processing",
              "paused",
              "completed",
              "cancelled"
            ],
            "description": "`concept` right after creation; `processing` once Roerdink has accepted it; `completed` when everything has shipped."
          },
          "reference": {
            "type": "string",
            "description": "Initially your reference; later overwritten with Roerdink's internal reference (e.g. `Roerdink order (NC): 734512`). Do not parse it."
          },
          "customer_remarks": {
            "type": "string",
            "description": "After processing: `Referentie klant: <your reference>` optionally followed by ` | Opmerkingen klant: <your remarks>`. May contain additional text."
          },
          "deliveryname": {
            "type": "string"
          },
          "deliverycontactname": {
            "type": "string"
          },
          "deliveryaddress": {
            "type": "string"
          },
          "deliveryaddress2": {
            "type": "string"
          },
          "deliveryzipcode": {
            "type": "string"
          },
          "deliverycity": {
            "type": "string"
          },
          "deliveryregion": {
            "type": "string"
          },
          "deliverycountry": {
            "type": "string"
          },
          "telephone": {
            "type": "string"
          },
          "emailaddress": {
            "type": "string"
          },
          "preferred_delivery_date": {
            "type": "string",
            "format": "date-time"
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "updated": {
            "type": "string",
            "format": "date-time"
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderLine"
            }
          },
          "picklists": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Picklist"
            },
            "description": "Picklists created for this order. Use `idpicklist` to fetch shipments and track & trace."
          },
          "dropshipment": {
            "type": "boolean",
            "description": "Only in the response of `POST /api/v1/orders`: `true` when the order is handled as a dropshipment. Absent otherwise."
          }
        },
        "example": {
          "idorder": 48211934,
          "idcustomer": 1234567,
          "orderid": "O2026-104233",
          "status": "concept",
          "reference": "WEB-100245",
          "customer_remarks": "Please deliver before noon",
          "deliveryname": "J. Jansen",
          "deliveryaddress": "Dorpsstraat 12",
          "deliveryzipcode": "1234 AB",
          "deliverycity": "Voorbeelddorp",
          "deliverycountry": "NL",
          "emailaddress": "j.jansen@example.com",
          "telephone": "+31612345678",
          "created": "2026-10-28T14:02:11+01:00",
          "updated": "2026-10-28T14:02:11+01:00",
          "products": [
            {
              "idorder_product": 301245501,
              "idproduct": 9876543,
              "idvatgroup": 101,
              "productcode": "10.123.045.42",
              "name": "Nordic Walker NW-2041 Zwart 42",
              "price": 59.95,
              "amount": 1
            },
            {
              "idorder_product": 301245502,
              "idproduct": 9876544,
              "idvatgroup": 101,
              "productcode": "10.123.045.43",
              "name": "Nordic Walker NW-2041 Zwart 43",
              "price": 59.95,
              "amount": 2
            }
          ],
          "picklists": [],
          "dropshipment": true
        }
      },
      "PicklistProduct": {
        "type": "object",
        "properties": {
          "idproduct": {
            "type": "integer"
          },
          "idorder_product": {
            "type": "integer"
          },
          "productcode": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "amount": {
            "type": "integer"
          },
          "amount_picked": {
            "type": "integer"
          }
        }
      },
      "Picklist": {
        "type": "object",
        "description": "A picklist is the warehouse job for (part of) an order. A partly delivered order can have several.",
        "properties": {
          "idpicklist": {
            "type": "integer"
          },
          "picklistid": {
            "type": "string",
            "description": "Human-readable picklist number."
          },
          "idorder": {
            "type": "integer"
          },
          "status": {
            "type": "string",
            "description": "Warehouse status of the picklist, e.g. `new`, `closed`, `cancelled`."
          },
          "reference": {
            "type": "string"
          },
          "totalproducts": {
            "type": "integer"
          },
          "totalpicked": {
            "type": "integer"
          },
          "closed_at": {
            "type": "string",
            "format": "date-time"
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "updated": {
            "type": "string",
            "format": "date-time"
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PicklistProduct"
            }
          }
        }
      },
      "Shipment": {
        "type": "object",
        "description": "A shipment (parcel) created for a picklist. Contains track & trace data, no product lines; fetch the picklist for its products.",
        "properties": {
          "idshipment": {
            "type": "integer"
          },
          "idpicklist": {
            "type": "integer"
          },
          "idorder": {
            "type": "integer"
          },
          "provider": {
            "type": "string",
            "description": "Carrier key, e.g. `postnl`, `dhl`."
          },
          "providername": {
            "type": "string"
          },
          "public_providername": {
            "type": "string"
          },
          "profile_name": {
            "type": "string"
          },
          "trackingcode": {
            "type": "string",
            "description": "Carrier tracking code."
          },
          "trackingurl": {
            "type": "string"
          },
          "tracktraceurl": {
            "type": "string",
            "description": "Public track & trace URL for the recipient."
          },
          "labelurl": {
            "type": "string"
          },
          "cancelled": {
            "type": "boolean",
            "description": "Ignore cancelled shipments."
          },
          "created": {
            "type": "string",
            "format": "date-time"
          }
        },
        "example": {
          "idshipment": 7712345,
          "idpicklist": 55120987,
          "idorder": 48211934,
          "provider": "postnl",
          "providername": "PostNL",
          "public_providername": "PostNL",
          "profile_name": "Standaard pakket",
          "trackingcode": "3SABCD1234567",
          "tracktraceurl": "https://jouw.postnl.nl/track-and-trace/3SABCD1234567-NL-1234AB",
          "labelurl": "https://example.invalid/label.pdf",
          "cancelled": false,
          "created": "2026-10-29T10:15:02+01:00"
        }
      },
      "BackOrder": {
        "type": "object",
        "description": "A product quantity of the order that could not be delivered yet.",
        "properties": {
          "idbackorder": {
            "type": "integer"
          },
          "idorder": {
            "type": "integer"
          },
          "idproduct": {
            "type": "integer"
          },
          "amount": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ProductStatus": {
        "type": "object",
        "properties": {
          "idproduct": {
            "type": "integer"
          },
          "productcode": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "amount": {
            "type": "integer",
            "description": "Ordered."
          },
          "allocated": {
            "type": "integer"
          },
          "picklist": {
            "type": "integer",
            "description": "On a picklist (being picked)."
          },
          "backorder": {
            "type": "integer",
            "description": "Waiting for stock."
          },
          "delivered": {
            "type": "integer"
          }
        }
      },
      "ProductStatusList": {
        "type": "object",
        "properties": {
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductStatus"
            }
          }
        }
      },
      "OrderNote": {
        "type": "object",
        "properties": {
          "idorder_log": {
            "type": "integer"
          },
          "idorder": {
            "type": "integer"
          },
          "type": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Tag": {
        "type": "object",
        "properties": {
          "idtag": {
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "textColor": {
            "type": "string"
          },
          "inherit": {
            "type": "boolean"
          }
        }
      },
      "TagInput": {
        "type": "object",
        "required": [
          "idtag"
        ],
        "properties": {
          "idtag": {
            "type": "integer",
            "description": "Id of an existing tag, as agreed with Roerdink."
          }
        }
      },
      "Category": {
        "type": "object",
        "description": "Roerdink category of the model (names are Dutch).",
        "properties": {
          "hcat_id": {
            "type": "integer",
            "description": "Main category id."
          },
          "hcat_name": {
            "type": "string",
            "description": "Main category name, e.g. `Dames`."
          },
          "cat_id": {
            "type": "integer",
            "description": "Category id."
          },
          "cat_name": {
            "type": "string",
            "description": "Category name."
          },
          "model_url": {
            "type": "string",
            "format": "uri",
            "description": "Product page on www.roerdink.nl (catalogue only)."
          }
        }
      },
      "StockLevel": {
        "type": "object",
        "description": "Stock figures of one variant. Properties without a value are omitted.",
        "properties": {
          "freestock": {
            "type": "integer",
            "description": "Free (sellable) stock, **capped at 30**: `30` means 30 or more. Treat `0` or less as out of stock."
          },
          "expected_in_days": {
            "type": "integer",
            "description": "Only when `freestock` is 0 or less and the variant is not discontinued: estimated number of days until it is available again."
          },
          "out_of_assortment": {
            "type": "boolean",
            "description": "Present (`true`) when the variant is discontinued (sold while stock lasts). Absent otherwise. (`/connectedstock` and `/catalogue` only.)"
          },
          "minstock": {
            "type": "integer",
            "description": "Informational; can be ignored. (`/connectedstock` only.)"
          },
          "maxstock": {
            "type": "integer",
            "description": "Informational; can be ignored. (`/connectedstock` only.)"
          }
        }
      },
      "ConnectedStockItem": {
        "type": "object",
        "description": "Stock of one size/colour variant of a model released to your account.",
        "properties": {
          "productcode": {
            "type": "string",
            "description": "Roerdink article code (unique per variant). Recommended match key."
          },
          "barcode": {
            "type": "string",
            "description": "EAN of the variant. Send it as `ean` (or `barcode`) on order lines."
          },
          "model_id": {
            "type": "integer",
            "description": "Roerdink model id. Groups variants; **not** an `idproduct`."
          },
          "model_name": {
            "type": "string",
            "description": "Model code."
          },
          "size_code": {
            "type": "string",
            "description": "Size, e.g. `42` or `43 (UK9)`."
          },
          "color_code": {
            "type": "string",
            "description": "Colour name (Dutch), e.g. `Zwart`."
          },
          "stock": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StockLevel"
            },
            "description": "Always exactly one element."
          }
        },
        "example": {
          "productcode": "10.123.045.42",
          "barcode": "8712345678906",
          "model_id": 6789,
          "model_name": "NW-2041",
          "size_code": "42",
          "color_code": "Zwart",
          "stock": [
            {
              "freestock": 30,
              "minstock": 0,
              "maxstock": 0
            }
          ]
        }
      },
      "AllStockItem": {
        "type": "object",
        "properties": {
          "productcode": {
            "type": "string"
          },
          "barcode": {
            "type": "string"
          },
          "stock": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StockLevel"
            },
            "description": "Always exactly one element with `freestock` and, when out of stock, `expected_in_days`."
          }
        }
      },
      "CatalogueItem": {
        "type": "object",
        "description": "Product data of one size/colour variant.",
        "properties": {
          "productcode": {
            "type": "string"
          },
          "barcode": {
            "type": "string",
            "description": "EAN of the variant."
          },
          "model_id": {
            "type": "integer"
          },
          "model_name": {
            "type": "string"
          },
          "size_code": {
            "type": "string"
          },
          "color_code": {
            "type": "string",
            "description": "Colour name (Dutch)."
          },
          "brand_id": {
            "type": "integer"
          },
          "brand_name": {
            "type": "string"
          },
          "price": {
            "type": "number",
            "format": "decimal",
            "description": "**Recommended retail price** (consumer price, EUR). This is *not* your purchase price."
          },
          "description": {
            "type": "string",
            "description": "Model description text (may be Dutch, may contain simple markup)."
          },
          "images": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri"
            },
            "description": "Up to 6 image URLs (colour-specific when available)."
          },
          "categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Category"
            }
          },
          "stock": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StockLevel"
            },
            "description": "One element; only carries `out_of_assortment` (no stock figures - use `/connectedstock`)."
          }
        },
        "example": {
          "productcode": "10.123.045.42",
          "barcode": "8712345678906",
          "model_id": 6789,
          "model_name": "NW-2041",
          "size_code": "42",
          "color_code": "Zwart",
          "brand_id": 123,
          "brand_name": "Nordic Walker",
          "price": 119.95,
          "description": "Comfortable leather walking shoe with removable footbed.",
          "images": [
            "https://www.roerdink.nl/write/assets/modellen/0006789/example-1.jpg",
            "https://www.roerdink.nl/write/assets/modellen/0006789/example-2.jpg"
          ],
          "categories": [
            {
              "hcat_id": 12,
              "hcat_name": "Dames",
              "cat_id": 345,
              "cat_name": "Wandelschoenen",
              "model_url": "https://www.roerdink.nl/nl/winkel/12_dames/345_wandelschoenen/6789_nw2041.html"
            }
          ],
          "stock": [
            {}
          ]
        }
      },
      "WarehouseStock": {
        "type": "object",
        "description": "Free stock per warehouse, capped at 30 (30 means 30 or more). Physical and reserved quantities are not exposed.",
        "properties": {
          "idwarehouse": {
            "type": "integer"
          },
          "freestock": {
            "type": "integer"
          }
        }
      },
      "Product": {
        "type": "object",
        "description": "Product (one size/colour variant) as known in the warehouse system, enriched with Roerdink data and your customer-specific price. Properties with a null value are omitted; other warehouse properties may be present. For stock synchronisation use `/api/v1/connectedstock` instead.",
        "properties": {
          "idproduct": {
            "type": "integer",
            "description": "Warehouse product id; usable as `idproduct` on order lines."
          },
          "productcode": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "barcode": {
            "type": "string",
            "description": "EAN."
          },
          "idvatgroup": {
            "type": "integer"
          },
          "active": {
            "type": "boolean"
          },
          "price": {
            "type": "number",
            "format": "decimal",
            "description": "Gross wholesale unit price (EUR) before your discount."
          },
          "price_order": {
            "type": "number",
            "format": "decimal",
            "description": "Your net unit price, only present when a customer-specific discount applies. Indicative: the final price is set by Roerdink on the order."
          },
          "discount": {
            "type": "number",
            "format": "decimal",
            "description": "Discount amount per unit (with `price_order`)."
          },
          "discount_perc": {
            "type": "number",
            "format": "decimal",
            "description": "Discount percentage (with `price_order`)."
          },
          "outlet": {
            "type": "boolean",
            "description": "Outlet pricing applies (with `price_order`)."
          },
          "stock": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WarehouseStock"
            }
          },
          "free_stock": {
            "type": "integer",
            "description": "Total free stock over all warehouses (informational), capped at 30."
          },
          "model_id": {
            "type": "integer"
          },
          "model_name": {
            "type": "string"
          },
          "categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Category"
            }
          },
          "discontinued": {
            "type": "boolean",
            "description": "Present (`true`) when discontinued. Orders for more than the free stock of a discontinued product are rejected."
          },
          "purchase_in_quantities_of": {
            "type": "integer",
            "description": "Pack size; order in multiples of it. `0` = no restriction."
          },
          "minimum_purchase_quantity": {
            "type": "integer",
            "description": "Same value as `purchase_in_quantities_of`."
          },
          "expected_in_days": {
            "type": "integer",
            "description": "When `free_stock` is 0 or less: days until expected."
          },
          "expected_delivery_date": {
            "type": "string",
            "format": "date-time",
            "description": "When `free_stock` is 0 or less."
          }
        },
        "example": {
          "idproduct": 9876543,
          "idvatgroup": 101,
          "productcode": "10.123.045.42",
          "name": "Nordic Walker NW-2041 Zwart 42",
          "barcode": "8712345678906",
          "price": 59.95,
          "price_order": 41.97,
          "discount": 17.98,
          "discount_perc": 29.99,
          "outlet": false,
          "active": true,
          "stock": [
            {
              "idwarehouse": 1001,
              "freestock": 14
            }
          ],
          "free_stock": 14,
          "model_id": 6789,
          "model_name": "NW-2041",
          "categories": [
            {
              "hcat_id": 12,
              "hcat_name": "Dames",
              "cat_id": 345,
              "cat_name": "Wandelschoenen"
            }
          ],
          "purchase_in_quantities_of": 0,
          "minimum_purchase_quantity": 0
        }
      },
      "ProductImage": {
        "type": "object",
        "properties": {
          "idproduct": {
            "type": "integer"
          },
          "idproduct_image": {
            "type": "integer"
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "WarehouseSetting": {
        "type": "object",
        "properties": {
          "idproduct": {
            "type": "integer"
          },
          "idwarehouse": {
            "type": "integer"
          },
          "stock_level_order": {
            "type": "integer"
          },
          "stock_level_desired": {
            "type": "integer"
          },
          "stock_level_maximum": {
            "type": "integer"
          }
        }
      },
      "VatGroup": {
        "type": "object",
        "properties": {
          "idvatgroup": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "percentage": {
            "type": "integer"
          }
        }
      },
      "Webhook": {
        "type": "object",
        "description": "A webhook subscription of your API account.",
        "properties": {
          "idhook": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "event": {
            "type": "string"
          },
          "address": {
            "type": "string",
            "format": "uri"
          },
          "active": {
            "type": "boolean"
          },
          "secret": {
            "type": "boolean",
            "description": "Whether a signing secret is set (the secret itself is never returned)."
          }
        },
        "example": {
          "idhook": 42,
          "name": "Stock updates for my shop",
          "event": "products.free_stock_changed",
          "address": "https://shop.example.com/roerdink/webhook",
          "active": true,
          "secret": true
        }
      },
      "WebhookCreateRequest": {
        "type": "object",
        "required": [
          "name",
          "event",
          "address"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Your own label."
          },
          "event": {
            "type": "string",
            "enum": [
              "products.changed",
              "products.free_stock_changed"
            ],
            "description": "Only these two events are delivered. Other event names are currently accepted but **never fire**. One subscription per event per account."
          },
          "address": {
            "type": "string",
            "format": "uri",
            "description": "Your HTTPS endpoint that receives POST requests."
          },
          "secret": {
            "type": "string",
            "description": "Optional signing secret. Use ASCII characters only (e.g. a random hex string). When set, every delivery carries an `X-Picqer-Signature` header."
          }
        },
        "example": {
          "name": "Stock updates for my shop",
          "event": "products.free_stock_changed",
          "address": "https://shop.example.com/roerdink/webhook",
          "secret": "3f9a1c0e7b5d42e8a6c1f0b9d8e7a6c5"
        }
      },
      "WebhookProduct": {
        "type": "object",
        "description": "The product as known in the warehouse system (same shape as `Product`, without the Roerdink enrichment and without customer prices). Not limited to products released to your account.",
        "properties": {
          "idproduct": {
            "type": "integer"
          },
          "productcode": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "barcode": {
            "type": "string"
          },
          "price": {
            "type": "number",
            "format": "decimal",
            "description": "Gross wholesale unit price."
          },
          "active": {
            "type": "boolean"
          },
          "stock": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WarehouseStock"
            },
            "description": "Free stock per warehouse, capped at 30 like `/connectedstock` (30 means 30 or more)."
          }
        }
      },
      "WebhookPayload": {
        "type": "object",
        "description": "Body that Roerdink POSTs to your `address`.",
        "properties": {
          "idhook": {
            "type": "integer",
            "description": "Your subscription id."
          },
          "name": {
            "type": "string",
            "description": "Label of the upstream event source; informational."
          },
          "event": {
            "type": "string",
            "enum": [
              "products.changed",
              "products.free_stock_changed"
            ]
          },
          "event_triggered_at": {
            "type": "string",
            "format": "date-time",
            "description": "When Roerdink queued the delivery."
          },
          "data": {
            "$ref": "#/components/schemas/WebhookProduct"
          }
        },
        "example": {
          "idhook": 42,
          "name": "ProductsFreeStockChanged (auto-added @ 2026-03-02 10:15:00)",
          "event": "products.free_stock_changed",
          "event_triggered_at": "2026-10-28T14:05:12.345+01:00",
          "data": {
            "idproduct": 9876543,
            "productcode": "10.123.045.42",
            "name": "Nordic Walker NW-2041 Zwart 42",
            "barcode": "8712345678906",
            "price": 59.95,
            "active": true,
            "stock": [
              {
                "idwarehouse": 1001,
                "freestock": 14
              }
            ]
          }
        }
      }
    }
  }
}
