{
    "openapi": "3.1.0",
    "info": {
        "title": "GetApi",
        "version": "0.0.1",
        "description": "## Authenticatie\n\nAlle API-endpoints vereisen authenticatie. Stuur je API-sleutel mee met **\u00e9\u00e9n** van deze methoden:\n\n**Optie 1 \u2014 X-Api-Key-header (aanbevolen)**\n```\nX-Api-Key: ga_live_xxxxxxxxxxxxxxxxxxxx\n```\n\n**Optie 2 \u2014 Bearer-token**\n```\nAuthorization: Bearer ga_live_xxxxxxxxxxxxxxxxxxxx\n```\n\nJe API-sleutels beheer je in je [dashboard](https://getapi.nl/dashboard).\n\n## AI- en agentbetalingen (x402)\n\nSommige endpoints ondersteunen directe betalingen voor AI-agents via het **x402**-protocol (https://www.x402.org).\nEen API-sleutel of account is niet nodig. Stuur een normaal verzoek zonder sleutel;\nde server antwoordt met **HTTP 402** en een `PAYMENT-REQUIRED`-header:\n\n```\nPAYMENT-REQUIRED: <base64 JSON PaymentRequirements>\n```\n\nDeze base64-string bevat onder andere `network`, `asset`, `amount` en `payTo`.\nJe agent ondertekent een EIP-3009 *transferWithAuthorization* voor het opgegeven `amount` in USDC naar dat `payTo`-adres,\ncodeert de handtekening als base64 en verstuurt het verzoek opnieuw met:\n\n```\nPAYMENT-SIGNATURE: <base64 SignedAuthorization>\n```\n\nDe server verifieert de handtekening via een facilitator, levert de data en settle de betaling on-chain.\nDe succesresponse bevat een `PAYMENT-RESPONSE`-header met de transactiegegevens.\nEen eenmalige `nonce` voorkomt replay-aanvallen. Betalingen gaan in USDC op **Base**;\nde prijs wordt bepaald door de `credit_cost` van het endpoint.",
        "contact": {
            "email": "info@wdnoord.nl"
        },
        "x-guidance": "GetAPI.nl is een Nederlandse API-platform voor lookups en validaties (postcode,\nadres, kenteken, BTW, e-mail, KVK, IBAN, energiemaatwerk, overheidsdata). Elke\nendpoint accepteert een API key via de X-Api-Key header of Authorization:\nBearer <key>.\n\nSommige endpoints zijn ook direct betaalbaar voor AI-agents via het x402-protocol\n(https://www.x402.org) zonder account of API key: stuur een verzoek zonder key,\nde server antwoordt met HTTP 402 en een PAYMENT-REQUIRED header (base64 JSON met\nnetwork, asset, amount, payTo). Teken daarna een EIP-3009 transferWithAuthorization\nvoor het gevraagde bedrag in USDC op Base en hertrail met een PAYMENT-SIGNATURE\nheader. De server verifieert, levert de data en settleert on-chain.\n\nTips voor agents:\n- Lees eerst de PAYMENT-REQUIRED header van een 402-antwoord; die is leidend.\n- Geef altijd de exact door de server gevraagde parameters mee.\n- Een endpoint met een \"x-payment-info\" blok vereist betaling voor gebruik."
    },
    "servers": [
        {
            "url": "https://api.getapi.nl",
            "description": "GetAPI"
        }
    ],
    "security": [
        {
            "ApiKeyAuth": []
        },
        {
            "BearerAuth": []
        },
        {
            "ApiKeyAuth": []
        },
        {
            "BearerAuth": []
        }
    ],
    "paths": {
        "/v1/validate/vat": {
            "post": {
                "operationId": "validation.vat",
                "description": "Valideert een Europees btw-nummer via het offici\u00eble VIES-systeem van de Europese Commissie. De landcode moet uit de eerste twee tekens van het btw-nummer bestaan (bijv. `NL820646660B01`). Ondersteunde landen: alle 27 EU-lidstaten + Noord-Ierland (XI). Wanneer een lidstaat dit levert, bevat de response de bedrijfsnaam en het adres.",
                "summary": "EU-btw-nummer valideren (VIES)",
                "tags": [
                    "VAT Validation",
                    "Vat"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "vat_number": {
                                        "type": "string",
                                        "pattern": "^[A-Z]{2}[A-Z0-9+*]{2,13}$",
                                        "minLength": 4,
                                        "maxLength": 15
                                    }
                                },
                                "required": [
                                    "vat_number"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "VAT number is valid",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "examples": [
                                        {
                                            "valid": true,
                                            "vat_number": "NL820646660B01",
                                            "country_code": "NL",
                                            "request_date": "2026-03-20T18:25:46.822Z",
                                            "company": {
                                                "name": "ABN AMRO BANK N.V.",
                                                "address": "GUSTAV MAHLERLAAN 00010\n1082PP AMSTERDAM"
                                            },
                                            "error": null,
                                            "message": "BTW-nummer is geldig."
                                        }
                                    ],
                                    "properties": {
                                        "valid": {
                                            "type": "boolean"
                                        },
                                        "vat_number": {
                                            "type": "string"
                                        },
                                        "country_code": {
                                            "type": "string"
                                        },
                                        "request_date": {
                                            "type": "string"
                                        },
                                        "company": {
                                            "type": [
                                                "object",
                                                "null"
                                            ],
                                            "properties": {
                                                "name": {
                                                    "type": "string"
                                                },
                                                "address": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "name",
                                                "address"
                                            ]
                                        },
                                        "error": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "valid",
                                        "vat_number",
                                        "country_code",
                                        "request_date",
                                        "company",
                                        "error",
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Unprocessable content",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "examples": [
                                        {
                                            "valid": false,
                                            "vat_number": "NL123456789B01",
                                            "country_code": "NL",
                                            "request_date": "2026-03-20T18:19:57.809Z",
                                            "company": null,
                                            "message": "BTW-nummer is ongeldig of niet geregistreerd."
                                        }
                                    ],
                                    "properties": {
                                        "valid": {
                                            "type": [
                                                "boolean",
                                                "null"
                                            ]
                                        },
                                        "vat_number": {
                                            "type": "string"
                                        },
                                        "country_code": {
                                            "type": "string"
                                        },
                                        "request_date": {
                                            "type": "string"
                                        },
                                        "company": {
                                            "type": [
                                                "object",
                                                "null"
                                            ],
                                            "properties": {
                                                "name": {
                                                    "type": "string"
                                                },
                                                "address": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "name",
                                                "address"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "valid",
                                        "vat_number",
                                        "country_code",
                                        "request_date",
                                        "company",
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "Service temporarily unavailable",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "examples": [
                                        {
                                            "valid": null,
                                            "vat_number": "NL820646660B01",
                                            "country_code": "NL",
                                            "request_date": "2026-03-20T18:25:46.822Z",
                                            "company": null,
                                            "error": "upstream_unavailable",
                                            "message": "De brondata is tijdelijk niet beschikbaar. Probeer het later opnieuw."
                                        }
                                    ],
                                    "properties": {
                                        "valid": {
                                            "type": [
                                                "boolean",
                                                "null"
                                            ]
                                        },
                                        "vat_number": {
                                            "type": "string"
                                        },
                                        "country_code": {
                                            "type": "string"
                                        },
                                        "request_date": {
                                            "type": "string"
                                        },
                                        "company": {
                                            "type": [
                                                "object",
                                                "null"
                                            ],
                                            "properties": {
                                                "name": {
                                                    "type": "string"
                                                },
                                                "address": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "name",
                                                "address"
                                            ]
                                        },
                                        "error": {
                                            "type": "string"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "valid",
                                        "vat_number",
                                        "country_code",
                                        "request_date",
                                        "company",
                                        "error",
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "Payment Required"
                    }
                },
                "x-payment-info": {
                    "price": {
                        "mode": "fixed",
                        "currency": "USD",
                        "amount": "0.010000"
                    },
                    "protocols": [
                        {
                            "x402": {}
                        }
                    ]
                },
                "parameters": []
            }
        }
    },
    "components": {
        "securitySchemes": {
            "ApiKeyAuth": {
                "type": "apiKey",
                "in": "header",
                "name": "X-Api-Key"
            },
            "BearerAuth": {
                "type": "http",
                "scheme": "bearer"
            }
        }
    }
}