{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/kvk-nl/json-schema/kvk-nl-resultaat-schema.json",
  "title": "Resultaat",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/kvk-nl-zoeken-openapi.yml#/components/schemas/Resultaat",
  "type": "object",
  "properties": {
    "pagina": {
      "type": "integer",
      "description": "Geeft aan op welke pagina je bent. Start vanaf pagina 1",
      "format": "int32"
    },
    "resultatenPerPagina": {
      "type": "integer",
      "description": "Geeft het aantal zoek resultaten per pagina weer",
      "format": "int32"
    },
    "totaal": {
      "type": "integer",
      "description": "Totaal aantal zoekresultaten gevonden. De API Zoeken toont max. 1000 resultaten.",
      "format": "int32"
    },
    "vorige": {
      "type": "string",
      "description": "Link naar de vorige pagina indien beschikbaar"
    },
    "volgende": {
      "type": "string",
      "description": "Link naar de volgende pagina indien beschikbaar"
    },
    "resultaten": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ResultaatItem"
      }
    },
    "links": {
      "$ref": "#/$defs/Links"
    }
  },
  "$defs": {
    "Adres": {
      "type": "object",
      "properties": {
        "binnenlandsAdres": {
          "$ref": "#/$defs/BinnenlandsAdres"
        },
        "buitenlandsAdres": {
          "$ref": "#/$defs/BuitenlandsAdres"
        }
      },
      "description": "Binnenlands of buitenlands adres"
    },
    "AdresType": {
      "type": "string",
      "description": "Bezoekadres of postadres",
      "enum": [
        "bezoekadres",
        "postadres"
      ]
    },
    "BinnenlandsAdres": {
      "type": "object",
      "properties": {
        "type": {
          "$ref": "#/$defs/AdresType"
        },
        "straatnaam": {
          "type": "string"
        },
        "huisnummer": {
          "type": "integer",
          "format": "int32"
        },
        "huisletter": {
          "type": "string"
        },
        "postbusnummer": {
          "type": "integer",
          "description": "Postbusnummer wordt alleen getoond indien het een postadres betreft",
          "format": "int32"
        },
        "postcode": {
          "type": "string"
        },
        "plaats": {
          "type": "string"
        }
      }
    },
    "BuitenlandsAdres": {
      "type": "object",
      "properties": {
        "type": {
          "$ref": "#/$defs/AdresType"
        },
        "straatHuisnummer": {
          "type": "string",
          "description": "Het straat/huisnummer is een combinatie van de straat en huisnummer"
        },
        "postcodeWoonplaats": {
          "type": "string",
          "description": "De postcode/woonplaats is de combinatie van een eventuele postcode en woonplaats"
        },
        "land": {
          "type": "string",
          "description": "De naam van het land waar het adres bevindt"
        }
      }
    },
    "Links": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "rel": {
            "type": "string"
          },
          "href": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    },
    "ResultaatItem": {
      "type": "object",
      "properties": {
        "kvkNummer": {
          "type": "string",
          "description": "Nederlands Kamer van Koophandel nummer dat bestaat uit 8 cijfers"
        },
        "rsin": {
          "type": "string",
          "description": "Rechtspersonen Samenwerkingsverbanden Informatie Nummer dat bestaat uit 9 cijfers"
        },
        "vestigingsnummer": {
          "type": "string",
          "description": "Vestigingsnummer dat bestaat uit 12 cijfers"
        },
        "naam": {
          "type": "string",
          "description": "De naam waaronder een vestiging of rechtspersoon handelt"
        },
        "adres": {
          "$ref": "#/$defs/Adres"
        },
        "type": {
          "type": "string",
          "description": "hoofdvestiging/nevenvestiging/rechtspersoon"
        },
        "actief": {
          "type": "string",
          "description": "Indicatie of inschrijving actief is"
        },
        "vervallenNaam": {
          "type": "string",
          "description": "Bevat de vervallen naam waaronder een vestiging of rechtspersoon heeft gehandeld"
        },
        "links": {
          "$ref": "#/$defs/Links"
        }
      }
    }
  }
}