{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Mortuno Standort-Einreichung – Planungsformat v0.1",
  "description": "Geplantes Datenformat. Es existiert noch keine produktive API. Einreichung und Prüfung sind keine automatische Veröffentlichung oder Verifizierung.",
  "type": "object",
  "required": [
    "external_id",
    "company_name",
    "category_ids",
    "country_code",
    "publication_authorized"
  ],
  "properties": {
    "external_id": {
      "type": "string",
      "minLength": 1
    },
    "company_name": {
      "type": "string",
      "minLength": 1
    },
    "location_name": {
      "type": "string"
    },
    "category_ids": {
      "type": "array",
      "items": {
        "enum": [
          "bestattungen",
          "ueberfuehrungen",
          "friedhoefe",
          "tierbestattung",
          "gesundheit",
          "versicherungen",
          "recht",
          "begleitung",
          "gestaltung",
          "hersteller"
        ]
      },
      "minItems": 1,
      "uniqueItems": true
    },
    "country_code": {
      "type": "string",
      "pattern": "^[A-Z]{2}$"
    },
    "street": {
      "type": "string"
    },
    "postal_code": {
      "type": "string"
    },
    "city": {
      "type": "string"
    },
    "phone": {
      "type": "string"
    },
    "website": {
      "type": "string",
      "format": "uri"
    },
    "description": {
      "type": "string",
      "maxLength": 3000
    },
    "languages": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "service_areas": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "source_url": {
      "type": "string",
      "format": "uri"
    },
    "publication_authorized": {
      "const": true
    }
  },
  "additionalProperties": false
}