{
    "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/cbs/sbi/index": {
            "get": {
                "operationId": "cbs.sbi.index",
                "description": "Returns all SBI codes from the local dataset. Optionally filter by `level` (1\u20135)\nand/or `parent_code` to retrieve only the direct children of a given SBI code.\n\nLevels: 1 = sectie (A\u2013U), 2 = afdeling, 3 = groep, 4 = klasse, 5 = subklasse.\n\nSource: [CBS Standaard Bedrijfsindeling 2025](https://www.cbs.nl/sbi)",
                "summary": "SBI code index",
                "tags": [
                    "CBS - SBI Codes",
                    "SbiIndex"
                ],
                "parameters": [
                    {
                        "name": "level",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 5
                        }
                    },
                    {
                        "name": "parent_code",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9.]*$",
                            "maxLength": 12
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of SBI codes",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "integer",
                                    "const": 200,
                                    "examples": [
                                        {
                                            "total": 2,
                                            "results": [
                                                {
                                                    "code": "A",
                                                    "code_numeric": "A",
                                                    "parent_code": null,
                                                    "level": 1,
                                                    "title": "Landbouw, bosbouw en visserij",
                                                    "has_children": true
                                                },
                                                {
                                                    "code": "01",
                                                    "code_numeric": "01",
                                                    "parent_code": "A",
                                                    "level": 2,
                                                    "title": "Landbouw, jacht en dienstverlening voor de landbouw en jacht",
                                                    "has_children": true
                                                }
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        }
    },
    "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"
                            ]
                        }
                    }
                }
            }
        }
    }
}