{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/avoindata-prh-fi/json-schema/avoindata-prh-fi-post-office-entry-schema.json",
  "title": "PostOfficeEntry",
  "description": "Postal addresses",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/avoindata-prh-fi-ytj-openapi.yml#/components/schemas/PostOfficeEntry",
  "type": "object",
  "required": [
    "postCode",
    "city",
    "active",
    "languageCode"
  ],
  "properties": {
    "postCode": {
      "type": "string",
      "description": "Postal code",
      "minLength": 5,
      "maxLength": 5
    },
    "city": {
      "type": "string",
      "description": "Town or city",
      "maxLength": 50
    },
    "active": {
      "type": "boolean",
      "description": "Is the detail active"
    },
    "languageCode": {
      "type": "string",
      "description": "[Language code](/opendata-ytj-api/v3/description?code=KIELI&lang=en)\n",
      "maxLength": 8
    },
    "municipalityCode": {
      "type": [
        "string",
        "null"
      ],
      "description": "Municipality code",
      "minLength": 3,
      "maxLength": 3
    }
  }
}