{
    "openapi": "3.1.0",
    "info": {
        "title": "GetApi",
        "version": "0.0.1",
        "description": "## Authentication\n\nAll API endpoints require authentication. Include your API key in every request using **one** of the following methods:\n\n**Option 1 \u2014 X-Api-Key header (recommended)**\n```\nX-Api-Key: ga_live_xxxxxxxxxxxxxxxxxxxx\n```\n\n**Option 2 \u2014 Bearer token**\n```\nAuthorization: Bearer ga_live_xxxxxxxxxxxxxxxxxxxx\n```\n\nYou can generate and manage API keys in your [dashboard](https://getapi.nl/dashboard)."
    },
    "servers": [
        {
            "url": "https://api.getapi.nl/api/",
            "description": "GetAPI"
        }
    ],
    "security": [
        {
            "ApiKeyAuth": []
        },
        {
            "BearerAuth": []
        },
        {
            "ApiKeyAuth": []
        },
        {
            "BearerAuth": []
        }
    ],
    "paths": {
        "/v1/rdw/vehicle": {
            "get": {
                "operationId": "rdw.vehicle",
                "description": "Returns vehicle registration data from the RDW Basisregistratie Voertuigen,\nenriched with fuel + emission information and a national milieuzone compliance flag. All results are cached for 24 hours.\n\nThe `allowed_in_green_zones` flag is derived from the emission class and fuel type\nusing Dutch national milieuzone standards (2024\u20132025):\n\n\u2014 Electric / hydrogen / CNG: always allowed\n\n\u2014 Petrol (any Euro class): allowed\n\n\u2014 Diesel Euro 6+: allowed\n\n\u2014 Diesel Euro 5 and below: not allowed\n\n\u2014 Unknown fuel or emission class: `null`",
                "summary": "Vehicle lookup by Dutch license plate (kenteken)",
                "tags": [
                    "Vehicle Intelligence",
                    "Vehicle"
                ],
                "parameters": [
                    {
                        "name": "license_plate",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9\\-\\s]{2,7}[A-Za-z0-9]$",
                            "minLength": 4,
                            "maxLength": 9
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Vehicle found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "integer",
                                    "const": 200,
                                    "examples": [
                                        {
                                            "found": true,
                                            "license_plate": "AB-123-C",
                                            "vehicle": {
                                                "brand": "Tesla",
                                                "model": "Model 3",
                                                "color": "Wit",
                                                "fuel_type": "Elektriciteit",
                                                "mass_empty": 1822,
                                                "power_kw": 239,
                                                "top_speed_kmh": 225,
                                                "registration_date": "2021-03-15",
                                                "first_admission_date": "2021-03-01"
                                            },
                                            "compliance": {
                                                "apk_expiry_date": "2027-04-01",
                                                "tachograph_expiry_date": null,
                                                "emission_class": 6,
                                                "allowed_in_green_zones": true,
                                                "transfer_possible": true,
                                                "recall_active": false,
                                                "export_indicator": false,
                                                "taxi": false,
                                                "liability_insured": true,
                                                "last_odometer_report": "Logisch"
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "404": {
                        "description": "License plate not found in RDW",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "examples": [
                                        {
                                            "found": false,
                                            "license_plate": "XX-000-X",
                                            "vehicle": null,
                                            "compliance": null,
                                            "error": null
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "RDW Open Data service temporarily unavailable",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "examples": [
                                        {
                                            "found": null,
                                            "license_plate": "AB-123-C",
                                            "vehicle": null,
                                            "compliance": null,
                                            "error": "rdw_unavailable"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "ApiKeyAuth": {
                "type": "apiKey",
                "in": "header",
                "name": "X-Api-Key"
            },
            "BearerAuth": {
                "type": "http",
                "scheme": "bearer"
            }
        },
        "responses": {
            "ValidationException": {
                "description": "Validation error",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Errors overview."
                                },
                                "errors": {
                                    "type": "object",
                                    "description": "A detailed description of each field that failed validation.",
                                    "additionalProperties": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "required": [
                                "message",
                                "errors"
                            ]
                        }
                    }
                }
            }
        }
    }
}