{
    "openapi": "3.1.2",
    "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.\n\n## Credits en foutcodes\n\n- Alleen een geslaagde call met data (HTTP 2xx) kost credits. Bij 4xx, 5xx, een leeg antwoord (`found:false`) of een validatiefout wordt niets afgeschreven.\n- Een leeg saldo geeft **HTTP 402** met `error: insufficient_credits`, `topup_url` en `X-Credits-Remaining: 0`. Er is geen `Retry-After`; wachten helpt niet.\n- Een te hoog requesttempo geeft **HTTP 429** met `error: rate_limited`, `retry_after` en de `Retry-After`-header. De limiet geldt per minuut per API-sleutel; `X-RateLimit-Reset` is een Unix-timestamp, `Retry-After` is in seconden.\n- Een x402-betaalchallenge gebruikt ook **402**, maar bevat een `accepts`-array in de body en/of een `PAYMENT-REQUIRED`-header. Zo onderscheid je hem van een leeg saldo.\n- Stuur bij GET-requests met creditkosten een `Idempotency-Key` mee: dezelfde sleutel binnen 10 minuten levert hetzelfde antwoord en boekt maximaal \u00e9\u00e9n keer af.",
        "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/ndw/emissiezones": {
            "get": {
                "operationId": "ndw.emissiezones",
                "description": "Retourneert een overzicht van alle milieuzones (lage-emissiezones en nul-emissiezones) in Nederland. Data is afkomstig van het NDW Open Data-platform (DATEX II-formaat). Optioneel pagineren met `page` (plus `per_page`, max 500; alleen dan bevat de response een `meta`-blok). Filter op zonetype of stad.",
                "summary": "Emissiezones lijst",
                "tags": [
                    "NDW - Emission zones",
                    "NdwEmissiezones"
                ],
                "parameters": [
                    {
                        "name": "zone_type",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "enum": [
                                "low_emission",
                                "zero_emission",
                                null
                            ]
                        }
                    },
                    {
                        "name": "city",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 100
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 500
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of emission zones",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "examples": [
                                        {
                                            "total": 1,
                                            "results": [
                                                {
                                                    "id": "NDW11_1022dd10-d4f5-47b1-9cc4-02219b3fb7b1",
                                                    "name": "Milieuzone Arnhem",
                                                    "city": "Arnhem",
                                                    "zone_type": "low_emission",
                                                    "controlled_zone_type": "lowemissionzone",
                                                    "status": "active",
                                                    "url_for_further_information": "https://www.arnhem.nl/stad_en_wijken/Wegen_en_vervoer/milieuzones",
                                                    "regulation_id": "stcrt-2020-31211",
                                                    "access_restriction_type": "noEntry",
                                                    "geometry": {
                                                        "type": "Polygon",
                                                        "coordinates": [
                                                            [
                                                                [
                                                                    5.87,
                                                                    51.97
                                                                ],
                                                                [
                                                                    5.93,
                                                                    51.97
                                                                ],
                                                                [
                                                                    5.93,
                                                                    51.99
                                                                ],
                                                                [
                                                                    5.87,
                                                                    51.99
                                                                ],
                                                                [
                                                                    5.87,
                                                                    51.97
                                                                ]
                                                            ]
                                                        ]
                                                    },
                                                    "vehicle_restrictions": [
                                                        {
                                                            "type": "condition_set",
                                                            "id": "NDW11_1022dd10-d4f5-47b1-9cc4-02219b3fb7b1_CS",
                                                            "label": "CS",
                                                            "operator": "and",
                                                            "conditions": [
                                                                {
                                                                    "type": "validity_condition",
                                                                    "id": "..._VAC",
                                                                    "label": "VAC",
                                                                    "validity_status": "definedByValidityTimeSpec",
                                                                    "valid_from": "2025-03-01T00:00:00Z",
                                                                    "valid_until": "2999-01-01T00:00:00Z"
                                                                },
                                                                {
                                                                    "type": "location_condition",
                                                                    "id": "..._area",
                                                                    "label": "area"
                                                                },
                                                                {
                                                                    "type": "vehicle_condition",
                                                                    "id": "..._restriction_VC",
                                                                    "label": "VC",
                                                                    "vehicle_characteristics": {
                                                                        "fuelType": [
                                                                            "diesel"
                                                                        ],
                                                                        "vehicleType": [
                                                                            "anyVehicle"
                                                                        ]
                                                                    }
                                                                },
                                                                {
                                                                    "type": "condition_set",
                                                                    "id": "..._EX_CS",
                                                                    "label": "EX_CS",
                                                                    "operator": "or",
                                                                    "negate": true,
                                                                    "conditions": [
                                                                        {
                                                                            "type": "vehicle_condition",
                                                                            "id": "..._oldtimerExemption_A",
                                                                            "label": "A",
                                                                            "vehicle_characteristics": {
                                                                                "comparisonOperator": [
                                                                                    "greaterThanOrEqualTo"
                                                                                ],
                                                                                "vehicleAge": [
                                                                                    "40"
                                                                                ]
                                                                            }
                                                                        }
                                                                    ]
                                                                }
                                                            ]
                                                        }
                                                    ],
                                                    "valid_from": "2025-03-01T00:00:00+00:00",
                                                    "valid_until": null
                                                }
                                            ]
                                        }
                                    ],
                                    "properties": {
                                        "total": {
                                            "type": "integer",
                                            "description": "Totaal aantal gevonden resultaten."
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "page": {
                                                    "type": "integer",
                                                    "description": "Huidige pagina."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Aantal resultaten per pagina."
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "description": "Laatste pagina."
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Totaal aantal resultaten."
                                                }
                                            },
                                            "required": [
                                                "page",
                                                "per_page",
                                                "last_page",
                                                "total"
                                            ],
                                            "description": "Paginering van de resultaten."
                                        },
                                        "results": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string",
                                                        "description": "Identificatie van de zone bij NDW."
                                                    },
                                                    "name": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "description": "Naam van de zone."
                                                    },
                                                    "city": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "description": "Plaatsnaam."
                                                    },
                                                    "zone_type": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "description": "Soort zone, bijvoorbeeld low_emission (milieuzone)."
                                                    },
                                                    "controlled_zone_type": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "description": "Type gereguleerde zone volgens NDW, bijvoorbeeld lowemissionzone."
                                                    },
                                                    "status": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "description": "Status van de zone, bijvoorbeeld active."
                                                    },
                                                    "url_for_further_information": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "description": "Link naar meer informatie over de zone."
                                                    },
                                                    "regulation_id": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "description": "Verwijzing naar de regelgeving, bijvoorbeeld een Staatscourant-publicatie."
                                                    },
                                                    "access_restriction_type": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "description": "Soort toegangsbeperking volgens NDW, bijvoorbeeld noEntry."
                                                    },
                                                    "geometry": {
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "additionalProperties": [],
                                                        "description": "Begrenzing van de zone als GeoJSON."
                                                    },
                                                    "vehicle_restrictions": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "additionalProperties": []
                                                        },
                                                        "description": "Voorwaarden voor voertuigen in de zone."
                                                    },
                                                    "valid_from": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "description": "Datum en tijd vanaf wanneer de zone geldt."
                                                    },
                                                    "valid_until": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "description": "Datum en tijd tot wanneer de zone geldt, leeg als er geen einddatum is."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "name",
                                                    "city",
                                                    "zone_type",
                                                    "controlled_zone_type",
                                                    "status",
                                                    "url_for_further_information",
                                                    "regulation_id",
                                                    "access_restriction_type",
                                                    "geometry",
                                                    "vehicle_restrictions",
                                                    "valid_from",
                                                    "valid_until"
                                                ]
                                            },
                                            "description": "De gevonden zones."
                                        }
                                    },
                                    "required": [
                                        "total",
                                        "results"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "402": {
                        "description": "Payment Required"
                    }
                },
                "x-payment-info": {
                    "price": {
                        "mode": "fixed",
                        "currency": "USD",
                        "amount": "0.005000"
                    },
                    "protocols": [
                        {
                            "x402": {}
                        }
                    ]
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "ApiKeyAuth": {
                "type": "apiKey",
                "in": "header",
                "name": "X-Api-Key"
            },
            "BearerAuth": {
                "type": "http",
                "scheme": "bearer"
            }
        },
        "responses": {
            "ValidationException": {
                "description": "Unprocessable content",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "error": {
                                    "type": "string",
                                    "description": "Machine-readable error code."
                                },
                                "message": {
                                    "type": "string",
                                    "description": "Human-readable error message."
                                },
                                "errors": {
                                    "type": "object",
                                    "description": "A detailed description of each field that failed validation.",
                                    "additionalProperties": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "required": [
                                "error",
                                "message",
                                "errors"
                            ]
                        }
                    }
                }
            }
        }
    }
}