{
  "openapi": "3.0.1",
  "info": {
    "title": "PostDS-AdresinBeeld-Basic-v1",
    "description": "Passthrough API to fetch adress details.",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api-sandbox.postnl.nl/",
      "description": "Non-Production server"
    },
    {
      "url": "https://api.postnl.nl/",
      "description": "Production server"
    }
  ],
  "paths": {
    "/address/national/insight/v1/basic": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/adresinbeeldRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/adresinbeeldResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostDS-AdresinBeeld-BasicBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Invalid apikey",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostDS-AdresinBeeld-BasicUnauthorized"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostDS-AdresinBeeld-BasicMethodNotAllowed"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostDS-AdresinBeeld-BasicTooManyRequest"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {}
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "adresinbeeldRequest": {
        "type": "object",
        "example": {
          "PostalCode": "3039DD",
          "HouseNumber": 24,
          "HouseNumberAddition": "a",
          "Selection": [
            "selectie1",
            "selectie2"
          ]
        }
      },
      "adresinbeeldResponse": {
        "type": "object",
        "example": {
          "Address": {
            "PostalCode": "3039DD",
            "HouseNumber": 24,
            "HouseNumberAddition": "A"
          }
        }
      },
      "PostDS-AdresinBeeld-BasicBadRequest": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Query must include PostalCode, HouseNumber and Selection"
          },
          "http_status_code": {
            "type": "number",
            "example": 400
          }
        }
      },
      "PostDS-AdresinBeeld-BasicUnauthorized": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Failed to resolve API Key variable 'request.header.apikey'"
          },
          "http_status_code": {
            "type": "number",
            "example": 401
          }
        }
      },
      "PostDS-AdresinBeeld-BasicMethodNotAllowed": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Only POST requests allowed"
          },
          "http_status_code": {
            "type": "number",
            "example": 405
          }
        }
      },
      "PostDS-AdresinBeeld-BasicTooManyRequest": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Too many requests. Rate limit exceeded!"
          },
          "http_status_code": {
            "type": "number",
            "example": 429
          }
        }
      }
    },
    "securitySchemes": {
      "apikey": {
        "type": "apiKey",
        "name": "apikey",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "apikey": []
    }
  ]
}