{
    "openapi": "3.1.0",
    "info": {
        "title": "Knippin Reseller API",
        "version": "1.0",
        "description": "Wholesale-API voor domeinregistratie. Authenticatie: Authorization: Bearer <sleutel>. Bedragen in EUR excl. btw."
    },
    "servers": [
        {
            "url": "https://api.knippin.eu/v1",
            "description": "Live"
        },
        {
            "url": "https://api-test.knippin.eu/v1",
            "description": "Test (sandbox, geen kosten)"
        }
    ],
    "security": [
        {
            "bearer": []
        }
    ],
    "components": {
        "securitySchemes": {
            "bearer": {
                "type": "http",
                "scheme": "bearer"
            }
        },
        "schemas": {
            "Errors": {
                "type": "object",
                "properties": {
                    "errors": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "error": {
                                    "type": "string"
                                },
                                "parameter": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "message": {
                                    "type": "string"
                                },
                                "details": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "paths": {
        "/v1/user/permissions": {
            "get": {
                "tags": [
                    "Account en saldo"
                ],
                "summary": "Sleutel en rechten",
                "description": "Geeft je account, de gebruikte sleutel (omgeving, IP-whitelist) en de rechten terug. Handig om je koppeling te testen.",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "example": {
                                    "account": {
                                        "customer_id": 1042,
                                        "name": "Voorbeeld Hosting B.V.",
                                        "billing": "prepaid",
                                        "price_group": "Reseller Brons"
                                    },
                                    "key": {
                                        "name": "Productie",
                                        "prefix": "a1b2c3d4",
                                        "environment": "live",
                                        "allowed_ips": [
                                            "203.0.113.10"
                                        ],
                                        "created_at": "2026-11-03T10:00:00+01:00"
                                    },
                                    "permissions": {
                                        "domains": [
                                            "read",
                                            "register",
                                            "renew",
                                            "transfer",
                                            "delete",
                                            "restore",
                                            "update"
                                        ],
                                        "contacts": [
                                            "read",
                                            "create",
                                            "delete"
                                        ],
                                        "finance": [
                                            "read",
                                            "deposit"
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fout",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Errors"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/finance/balance": {
            "get": {
                "tags": [
                    "Account en saldo"
                ],
                "summary": "Saldo",
                "description": "Prepaid: je tegoed. Achteraf betalen: de nog niet gefactureerde afname (negatief) en wat er binnen je kredietlimiet nog beschikbaar is (null = geen limiet).",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "example": {
                                    "currency": "EUR",
                                    "billing": "prepaid",
                                    "vat_included": false,
                                    "balance": "184.50",
                                    "available": "184.50",
                                    "credit_limit": null,
                                    "pending_deposits": "0.00",
                                    "sandbox": false
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fout",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Errors"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/finance/transactions": {
            "get": {
                "tags": [
                    "Account en saldo"
                ],
                "summary": "Transacties",
                "description": "Alle afname en opwaarderingen, nieuwste eerst. Filter optioneel op type (registration, renewal, transfer, restore, trade, deposit, refund, correction) of object (domeinnaam).",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "example": {
                                    "data": [
                                        {
                                            "id": 311,
                                            "type": "registration",
                                            "description": "Registratie",
                                            "object": "voorbeeld.nl",
                                            "amount": "-4.95",
                                            "period": 12,
                                            "status": "booked",
                                            "invoice": null,
                                            "created_at": "2026-11-03T10:12:00+01:00"
                                        }
                                    ],
                                    "pagination": {
                                        "current_page": 1,
                                        "per_page": 25,
                                        "total_pages": 1,
                                        "total_results": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fout",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Errors"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Pagina, standaard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Resultaten per pagina, 1-100 (standaard 25).",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "required": false,
                        "description": "Filter op soort.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "object",
                        "in": "query",
                        "required": false,
                        "description": "Filter op domeinnaam.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/v1/finance/deposits": {
            "post": {
                "tags": [
                    "Account en saldo"
                ],
                "summary": "Tegoed opwaarderen",
                "description": "Alleen voor prepaid. Maakt een factuur (bedrag + btw) en geeft een betaallink. Zodra de factuur betaald is, staat het tegoed op je saldo.",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "example": {
                                    "invoice": "F2026-0412",
                                    "amount": "250.00",
                                    "amount_incl_vat": "302.50",
                                    "status": "pending",
                                    "payment_url": "https://mijn.knippin.eu/betalen/…"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fout",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Errors"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "amount": {
                                        "type": "number",
                                        "description": "Bedrag excl. btw, minimaal 25."
                                    }
                                },
                                "required": [
                                    "amount"
                                ]
                            },
                            "example": {
                                "amount": 250
                            }
                        }
                    }
                }
            }
        },
        "/v1/tlds/pricing": {
            "get": {
                "tags": [
                    "Extensies en prijzen"
                ],
                "summary": "Prijslijst",
                "description": "Jouw prijzen voor registratie, verlenging en verhuizing. Zonder filter krijg je alle extensies (gepagineerd).",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "example": {
                                    "data": [
                                        {
                                            "tld": "nl",
                                            "currency": "EUR",
                                            "vat_included": false,
                                            "pricing_standard": [
                                                {
                                                    "period": 12,
                                                    "register": "4.95",
                                                    "renew": "4.95",
                                                    "transfer": "4.95"
                                                }
                                            ]
                                        }
                                    ],
                                    "pagination": {
                                        "current_page": 1,
                                        "per_page": 25,
                                        "total_pages": 1,
                                        "total_results": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fout",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Errors"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Pagina, standaard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Resultaten per pagina, 1-100 (standaard 25).",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "tld",
                        "in": "query",
                        "required": false,
                        "description": "Kommagescheiden, bv. nl,com,eu.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/v1/tlds/info/{tld}": {
            "get": {
                "tags": [
                    "Extensies en prijzen"
                ],
                "summary": "Eigenschappen extensie",
                "description": "Ondersteunde periodes, IDN, DNSSEC en het aantal nameservers.",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "example": {
                                    "tld": "nl",
                                    "category": "country",
                                    "continent": "europe",
                                    "country_code": "NL",
                                    "syntax_idn_supported": true,
                                    "dnssec_supported": true,
                                    "periods_create_months": [
                                        12
                                    ],
                                    "periods_renew_months": [
                                        12
                                    ],
                                    "nameservers_min": 2,
                                    "nameservers_max": 13
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fout",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Errors"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "tld",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/v1/domain-availability": {
            "post": {
                "tags": [
                    "Beschikbaarheid"
                ],
                "summary": "Beschikbaarheid controleren",
                "description": "status is free, active of een andere registry-status. Premiumdomeinen hebben geen vaste prijs en kunnen niet via de API geregistreerd worden.",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "example": {
                                    "data": [
                                        {
                                            "domain_name": "voorbeeld.nl",
                                            "status": "free",
                                            "premium": false,
                                            "price_register": "4.95",
                                            "price_transfer": "4.95",
                                            "currency": "EUR"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fout",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Errors"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "domain_names": {
                                        "type": "array",
                                        "description": "Lijst domeinnamen (max. 50)."
                                    }
                                },
                                "required": [
                                    "domain_names"
                                ]
                            },
                            "example": {
                                "domain_names": [
                                    "voorbeeld.nl",
                                    "voorbeeld.com"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/v1/domains": {
            "get": {
                "tags": [
                    "Domeinen"
                ],
                "summary": "Domeinen in je portfolio",
                "description": "Alle domeinen die je via de API beheert.",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "example": {
                                    "data": [
                                        {
                                            "domain_name": "voorbeeld.nl",
                                            "status": "registered",
                                            "registrant": "klant-001",
                                            "contacts": [
                                                {
                                                    "type": "admin",
                                                    "handle": "klant-001"
                                                },
                                                {
                                                    "type": "tech",
                                                    "handle": "mijn-tech"
                                                },
                                                {
                                                    "type": "billing",
                                                    "handle": "klant-001"
                                                }
                                            ],
                                            "dns_hosted": false,
                                            "nameservers": [
                                                "ns1.mijnhosting.nl",
                                                "ns2.mijnhosting.nl"
                                            ],
                                            "auto_renewal": true,
                                            "registered_at": "2026-11-03",
                                            "expires_at": "2027-11-03",
                                            "paid_until": "2027-11-03"
                                        }
                                    ],
                                    "pagination": {
                                        "current_page": 1,
                                        "per_page": 25,
                                        "total_pages": 1,
                                        "total_results": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fout",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Errors"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Pagina, standaard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Resultaten per pagina, 1-100 (standaard 25).",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "registered of deleted.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Deel van de domeinnaam.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "expires_before",
                        "in": "query",
                        "required": false,
                        "description": "Alleen domeinen die vóór deze datum (YYYY-MM-DD) verlopen.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/v1/domains/{domain}": {
            "get": {
                "tags": [
                    "Domeinen"
                ],
                "summary": "Domeingegevens",
                "description": "Gegevens van één domein uit je portfolio.",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "example": {
                                    "domain_name": "voorbeeld.nl",
                                    "status": "registered",
                                    "registrant": "klant-001",
                                    "contacts": [
                                        {
                                            "type": "admin",
                                            "handle": "klant-001"
                                        },
                                        {
                                            "type": "tech",
                                            "handle": "mijn-tech"
                                        },
                                        {
                                            "type": "billing",
                                            "handle": "klant-001"
                                        }
                                    ],
                                    "dns_hosted": false,
                                    "nameservers": [
                                        "ns1.mijnhosting.nl",
                                        "ns2.mijnhosting.nl"
                                    ],
                                    "auto_renewal": true,
                                    "registered_at": "2026-11-03",
                                    "expires_at": "2027-11-03",
                                    "paid_until": "2027-11-03"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fout",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Errors"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            },
            "post": {
                "tags": [
                    "Domeinen"
                ],
                "summary": "Domein registreren",
                "description": "Registreert het domein. Het antwoord bevat ook het afgeschreven bedrag (charged).",
                "responses": {
                    "201": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "example": {
                                    "domain_name": "voorbeeld.nl",
                                    "status": "registered",
                                    "registrant": "klant-001",
                                    "contacts": [
                                        {
                                            "type": "admin",
                                            "handle": "klant-001"
                                        },
                                        {
                                            "type": "tech",
                                            "handle": "mijn-tech"
                                        },
                                        {
                                            "type": "billing",
                                            "handle": "klant-001"
                                        }
                                    ],
                                    "dns_hosted": false,
                                    "nameservers": [
                                        "ns1.mijnhosting.nl",
                                        "ns2.mijnhosting.nl"
                                    ],
                                    "auto_renewal": true,
                                    "registered_at": "2026-11-03",
                                    "expires_at": "2027-11-03",
                                    "paid_until": "2027-11-03",
                                    "charged": "4.95"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fout",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Errors"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "registrant": {
                                        "type": "string",
                                        "description": "Handle van de houder (eerst aanmaken via /contacts)."
                                    },
                                    "contacts": {
                                        "type": "array",
                                        "description": "Lijst {type, handle} voor admin, tech en billing. Ontbrekende rollen krijgen de houder."
                                    },
                                    "nameservers": {
                                        "type": "array",
                                        "description": "2 tot 13 hostnamen. Leeg = DNS bij ons (dns_hosted)."
                                    },
                                    "auto_renewal": {
                                        "type": "boolean",
                                        "description": "Automatisch verlengen, standaard true (voor .nl verplicht)."
                                    },
                                    "period": {
                                        "type": "integer",
                                        "description": "Periode in maanden (12, 24, … 120), standaard 12."
                                    }
                                },
                                "required": [
                                    "registrant"
                                ]
                            },
                            "example": {
                                "registrant": "klant-001",
                                "contacts": [
                                    {
                                        "type": "tech",
                                        "handle": "mijn-tech"
                                    }
                                ],
                                "nameservers": [
                                    "ns1.mijnhosting.nl",
                                    "ns2.mijnhosting.nl"
                                ],
                                "period": 12
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "Domeinen"
                ],
                "summary": "Opheffen",
                "description": "Heft het domein op. Het gaat bij de registry in quarantaine en kan daar nog worden hersteld. Er volgt geen terugbetaling.",
                "responses": {
                    "204": {
                        "description": "OK"
                    },
                    "default": {
                        "description": "Fout",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Errors"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/v1/domains/{domain}/renew": {
            "post": {
                "tags": [
                    "Domeinen"
                ],
                "summary": "Verlengen",
                "description": "Verlengt het domein extra. Domeinen met auto_renewal worden ook automatisch verlengd; die verlenging wordt op de vervaldatum verrekend.",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "example": {
                                    "domain_name": "voorbeeld.nl",
                                    "status": "registered",
                                    "registrant": "klant-001",
                                    "contacts": [
                                        {
                                            "type": "admin",
                                            "handle": "klant-001"
                                        },
                                        {
                                            "type": "tech",
                                            "handle": "mijn-tech"
                                        },
                                        {
                                            "type": "billing",
                                            "handle": "klant-001"
                                        }
                                    ],
                                    "dns_hosted": false,
                                    "nameservers": [
                                        "ns1.mijnhosting.nl",
                                        "ns2.mijnhosting.nl"
                                    ],
                                    "auto_renewal": true,
                                    "registered_at": "2026-11-03",
                                    "expires_at": "2027-11-03",
                                    "paid_until": "2027-11-03",
                                    "charged": "4.95"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fout",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Errors"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "period": {
                                        "type": "integer",
                                        "description": "Periode in maanden (12, 24, …)."
                                    }
                                },
                                "required": [
                                    "period"
                                ]
                            },
                            "example": {
                                "period": 12
                            }
                        }
                    }
                }
            }
        },
        "/v1/domains/{domain}/restore": {
            "post": {
                "tags": [
                    "Domeinen"
                ],
                "summary": "Herstellen uit quarantaine",
                "description": "Herstelt een opgeheven domein. Kosten: verlengprijs plus eventuele hersteltoeslag.",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "example": {
                                    "domain_name": "voorbeeld.nl",
                                    "status": "registered",
                                    "registrant": "klant-001",
                                    "contacts": [
                                        {
                                            "type": "admin",
                                            "handle": "klant-001"
                                        },
                                        {
                                            "type": "tech",
                                            "handle": "mijn-tech"
                                        },
                                        {
                                            "type": "billing",
                                            "handle": "klant-001"
                                        }
                                    ],
                                    "dns_hosted": false,
                                    "nameservers": [
                                        "ns1.mijnhosting.nl",
                                        "ns2.mijnhosting.nl"
                                    ],
                                    "auto_renewal": true,
                                    "registered_at": "2026-11-03",
                                    "expires_at": "2027-11-03",
                                    "paid_until": "2027-11-03",
                                    "charged": "4.95"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fout",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Errors"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/v1/domains/{domain}/auto_renewal": {
            "patch": {
                "tags": [
                    "Domeinen"
                ],
                "summary": "Automatisch verlengen",
                "description": "Zet automatisch verlengen aan of uit. Uit = het domein vervalt op de vervaldatum.",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "example": {
                                    "domain_name": "voorbeeld.nl",
                                    "status": "registered",
                                    "registrant": "klant-001",
                                    "contacts": [
                                        {
                                            "type": "admin",
                                            "handle": "klant-001"
                                        },
                                        {
                                            "type": "tech",
                                            "handle": "mijn-tech"
                                        },
                                        {
                                            "type": "billing",
                                            "handle": "klant-001"
                                        }
                                    ],
                                    "dns_hosted": false,
                                    "nameservers": [
                                        "ns1.mijnhosting.nl",
                                        "ns2.mijnhosting.nl"
                                    ],
                                    "auto_renewal": true,
                                    "registered_at": "2026-11-03",
                                    "expires_at": "2027-11-03",
                                    "paid_until": "2027-11-03"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fout",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Errors"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "auto_renewal": {
                                        "type": "boolean",
                                        "description": "true of false."
                                    }
                                },
                                "required": [
                                    "auto_renewal"
                                ]
                            },
                            "example": {
                                "auto_renewal": false
                            }
                        }
                    }
                }
            }
        },
        "/v1/domains/{domain}/auth_code": {
            "post": {
                "tags": [
                    "Domeinen"
                ],
                "summary": "Verhuiscode opvragen",
                "description": "Geeft de auth-/EPP-code. Bij sommige extensies stuurt de registry de code rechtstreeks naar de houder (sent_to_registrant = true).",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "example": {
                                    "domain_name": "voorbeeld.nl",
                                    "auth_code": "Xk7-p2Qa-9fRt",
                                    "expiry": "2026-11-10",
                                    "sent_to_registrant": false
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fout",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Errors"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/v1/domains/{domain}/contacts": {
            "put": {
                "tags": [
                    "Domeinen"
                ],
                "summary": "Contacten wijzigen",
                "description": "Wijzigt admin-, tech- en/of billing-contact. De houder wijzig je met /trade.",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "example": {
                                    "domain_name": "voorbeeld.nl",
                                    "status": "registered",
                                    "registrant": "klant-001",
                                    "contacts": [
                                        {
                                            "type": "admin",
                                            "handle": "klant-001"
                                        },
                                        {
                                            "type": "tech",
                                            "handle": "mijn-tech"
                                        },
                                        {
                                            "type": "billing",
                                            "handle": "klant-001"
                                        }
                                    ],
                                    "dns_hosted": false,
                                    "nameservers": [
                                        "ns1.mijnhosting.nl",
                                        "ns2.mijnhosting.nl"
                                    ],
                                    "auto_renewal": true,
                                    "registered_at": "2026-11-03",
                                    "expires_at": "2027-11-03",
                                    "paid_until": "2027-11-03"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fout",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Errors"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "contacts": {
                                        "type": "array",
                                        "description": "Lijst {type, handle}; type is admin, tech of billing."
                                    }
                                },
                                "required": [
                                    "contacts"
                                ]
                            },
                            "example": {
                                "contacts": [
                                    {
                                        "type": "tech",
                                        "handle": "mijn-tech"
                                    }
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/v1/domains/{domain}/trade": {
            "put": {
                "tags": [
                    "Domeinen"
                ],
                "summary": "Houderwijziging",
                "description": "Zet het domein op een andere houder.",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "example": {
                                    "domain_name": "voorbeeld.nl",
                                    "status": "registered",
                                    "registrant": "klant-001",
                                    "contacts": [
                                        {
                                            "type": "admin",
                                            "handle": "klant-001"
                                        },
                                        {
                                            "type": "tech",
                                            "handle": "mijn-tech"
                                        },
                                        {
                                            "type": "billing",
                                            "handle": "klant-001"
                                        }
                                    ],
                                    "dns_hosted": false,
                                    "nameservers": [
                                        "ns1.mijnhosting.nl",
                                        "ns2.mijnhosting.nl"
                                    ],
                                    "auto_renewal": true,
                                    "registered_at": "2026-11-03",
                                    "expires_at": "2027-11-03",
                                    "paid_until": "2027-11-03"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fout",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Errors"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "registrant": {
                                        "type": "string",
                                        "description": "Handle van de nieuwe houder."
                                    },
                                    "auth_code": {
                                        "type": "string",
                                        "description": "Verplicht bij sommige extensies."
                                    }
                                },
                                "required": [
                                    "registrant"
                                ]
                            },
                            "example": {
                                "registrant": "nieuwe-houder"
                            }
                        }
                    }
                }
            }
        },
        "/v1/domains/{domain}/ns": {
            "patch": {
                "tags": [
                    "Domeinen"
                ],
                "summary": "Nameservers wijzigen",
                "description": "Eigen nameservers instellen, of dns_hosted: true voor DNS bij ons.",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "example": {
                                    "domain_name": "voorbeeld.nl",
                                    "status": "registered",
                                    "registrant": "klant-001",
                                    "contacts": [
                                        {
                                            "type": "admin",
                                            "handle": "klant-001"
                                        },
                                        {
                                            "type": "tech",
                                            "handle": "mijn-tech"
                                        },
                                        {
                                            "type": "billing",
                                            "handle": "klant-001"
                                        }
                                    ],
                                    "dns_hosted": false,
                                    "nameservers": [
                                        "ns1.mijnhosting.nl",
                                        "ns2.mijnhosting.nl"
                                    ],
                                    "auto_renewal": true,
                                    "registered_at": "2026-11-03",
                                    "expires_at": "2027-11-03",
                                    "paid_until": "2027-11-03"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fout",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Errors"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "nameservers": {
                                        "type": "array",
                                        "description": "2 tot 13 hostnamen."
                                    },
                                    "dns_hosted": {
                                        "type": "boolean",
                                        "description": "true = DNS bij ons (in plaats van nameservers)."
                                    }
                                }
                            },
                            "example": {
                                "nameservers": [
                                    "ns1.mijnhosting.nl",
                                    "ns2.mijnhosting.nl"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/v1/contacts": {
            "get": {
                "tags": [
                    "Contacten"
                ],
                "summary": "Contacten",
                "description": "Al je contacten.",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "example": {
                                    "data": [
                                        {
                                            "handle": "klant-001",
                                            "name": "Jan Jansen",
                                            "company_name": "Jansen B.V.",
                                            "address_1": "Dorpsstraat 1",
                                            "address_2": null,
                                            "postal_code": "1234 AB",
                                            "city": "Amsterdam",
                                            "state": null,
                                            "country": "NL",
                                            "phone": "+31.201234567",
                                            "email": "jan@jansen.nl",
                                            "created_at": "2026-11-03T10:00:00+01:00"
                                        }
                                    ],
                                    "pagination": {
                                        "current_page": 1,
                                        "per_page": 25,
                                        "total_pages": 1,
                                        "total_results": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fout",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Errors"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Pagina, standaard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Resultaten per pagina, 1-100 (standaard 25).",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Zoek op naam, bedrijf, e-mail of handle.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/v1/contacts/{handle}": {
            "get": {
                "tags": [
                    "Contacten"
                ],
                "summary": "Contactgegevens",
                "description": "Eén contact.",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "default": {
                        "description": "Fout",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Errors"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "handle",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            },
            "post": {
                "tags": [
                    "Contacten"
                ],
                "summary": "Contact aanmaken",
                "description": "Maakt het contact aan onder de gekozen handle. Een contact wijzigen kan niet: maak een nieuw contact aan en koppel dat.",
                "responses": {
                    "201": {
                        "description": "OK"
                    },
                    "default": {
                        "description": "Fout",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Errors"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "handle",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Volledige naam van de contactpersoon."
                                    },
                                    "company_name": {
                                        "type": "string",
                                        "description": "Bedrijfsnaam (leeg voor particulieren)."
                                    },
                                    "address_1": {
                                        "type": "string",
                                        "description": "Straat en huisnummer."
                                    },
                                    "address_2": {
                                        "type": "string",
                                        "description": "Tweede adresregel."
                                    },
                                    "postal_code": {
                                        "type": "string",
                                        "description": "Postcode."
                                    },
                                    "city": {
                                        "type": "string",
                                        "description": "Plaats."
                                    },
                                    "state": {
                                        "type": "string",
                                        "description": "Provincie/staat."
                                    },
                                    "country": {
                                        "type": "string",
                                        "description": "Landcode ISO 3166-1 alpha-2, bv. NL."
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Telefoon als +CC.NUMMER, bv. +31.201234567."
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "E-mailadres."
                                    }
                                },
                                "required": [
                                    "name",
                                    "address_1",
                                    "postal_code",
                                    "city",
                                    "country",
                                    "phone",
                                    "email"
                                ]
                            },
                            "example": {
                                "name": "Jan Jansen",
                                "company_name": "Jansen B.V.",
                                "address_1": "Dorpsstraat 1",
                                "postal_code": "1234 AB",
                                "city": "Amsterdam",
                                "country": "NL",
                                "phone": "+31.201234567",
                                "email": "jan@jansen.nl"
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "Contacten"
                ],
                "summary": "Contact verwijderen",
                "description": "Alleen als het contact niet meer aan een domein gekoppeld is.",
                "responses": {
                    "204": {
                        "description": "OK"
                    },
                    "default": {
                        "description": "Fout",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Errors"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "handle",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/v1/contacts/{handle}/tlddata/{registry}": {
            "post": {
                "tags": [
                    "Contacten"
                ],
                "summary": "Registry-gegevens",
                "description": "Extra gegevens die een registry vraagt, bv. voor SIDN (.nl) de rechtsvorm van een bedrijf: registry = sidn.",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "default": {
                        "description": "Fout",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Errors"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "handle",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "registry",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "legal_form": {
                                        "type": "string",
                                        "description": "Bv. BV, EENMANSZAAK, PERSOON."
                                    },
                                    "legal_form_regno": {
                                        "type": "string",
                                        "description": "KvK-nummer."
                                    }
                                }
                            },
                            "example": {
                                "legal_form": "BV",
                                "legal_form_regno": "12345678"
                            }
                        }
                    }
                }
            }
        },
        "/v1/transfers/{domain}": {
            "post": {
                "tags": [
                    "Verhuizingen"
                ],
                "summary": "Verhuizing aanvragen",
                "description": "Start de verhuizing.",
                "responses": {
                    "201": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "example": {
                                    "id": 18,
                                    "domain_name": "voorbeeld.com",
                                    "status": "pending",
                                    "message": null,
                                    "created_at": "2026-11-03T10:20:00+01:00",
                                    "completed_at": null,
                                    "charged": "8.95"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fout",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Errors"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "auth_code": {
                                        "type": "string",
                                        "description": "Verhuiscode van de huidige registrar."
                                    },
                                    "registrant": {
                                        "type": "string",
                                        "description": "Handle van de houder (eerst aanmaken via /contacts)."
                                    },
                                    "contacts": {
                                        "type": "array",
                                        "description": "Lijst {type, handle} voor admin, tech en billing. Ontbrekende rollen krijgen de houder."
                                    },
                                    "nameservers": {
                                        "type": "array",
                                        "description": "2 tot 13 hostnamen. Leeg = DNS bij ons (dns_hosted)."
                                    },
                                    "auto_renewal": {
                                        "type": "boolean",
                                        "description": "Automatisch verlengen, standaard true (voor .nl verplicht)."
                                    }
                                },
                                "required": [
                                    "auth_code",
                                    "registrant"
                                ]
                            },
                            "example": {
                                "auth_code": "Xk7-p2Qa-9fRt",
                                "registrant": "klant-001"
                            }
                        }
                    }
                }
            }
        },
        "/v1/transfers": {
            "get": {
                "tags": [
                    "Verhuizingen"
                ],
                "summary": "Verhuizingen",
                "description": "Al je verhuizingen.",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "default": {
                        "description": "Fout",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Errors"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Pagina, standaard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Resultaten per pagina, 1-100 (standaard 25).",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "pending, completed of failed.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/v1/transfers/{domain}/{id}": {
            "get": {
                "tags": [
                    "Verhuizingen"
                ],
                "summary": "Status verhuizing",
                "description": "Haalt de actuele status op bij de registry (id is optioneel: zonder id de laatste aanvraag).",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "example": {
                                    "id": 18,
                                    "domain_name": "voorbeeld.com",
                                    "status": "completed",
                                    "message": null,
                                    "created_at": "2026-11-03T10:20:00+01:00",
                                    "completed_at": "2026-11-08T03:00:00+01:00"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fout",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Errors"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        }
    }
}