{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/publiq/json-schema/publiq-social-tariff-validation-schema.json",
  "title": "SocialTariffValidation",
  "description": "SocialTariffValidation information",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/publiq-socialtariffvalidation-api-openapi.yml#/components/schemas/SocialTariffValidation",
  "x-stoplight": {
    "id": "gryzsngewgyjv"
  },
  "type": "object",
  "properties": {
    "user": {
      "$ref": "#/$defs/SocialTariffValidationPerson"
    },
    "children": {
      "type": "array",
      "x-stoplight": {
        "id": "f6pyicmviravx"
      },
      "description": "Optional list of children of the identified persion.",
      "items": {
        "$ref": "#/$defs/SocialTariffValidationPerson"
      }
    }
  },
  "required": [
    "user"
  ],
  "$defs": {
    "SocialTariffValidationPerson": {
      "type": "object",
      "description": "SocialTariffValidationPerson",
      "properties": {
        "inszNumber": {
          "type": "string",
          "description": "INSZ number of the identified person"
        },
        "familyName": {
          "type": "string",
          "description": "Family name of the identified person"
        },
        "givenName": {
          "type": "string",
          "description": "Given name of the identified person"
        },
        "hasSocialTariff": {
          "type": "boolean",
          "description": "True if the person is entitled to social tariff"
        },
        "uitpasNumber": {
          "type": "string",
          "description": "Optional `uitpasNumber` if the person with the given `inszNumber` already has an UiTPAS. If this property is not null, the user cannot proceed registration of a new passholder."
        },
        "street": {
          "type": "string",
          "description": "Street and house number of the user if known."
        },
        "postalCode": {
          "type": "string",
          "description": "Postal code of the user if known."
        },
        "city": {
          "type": "string",
          "description": "City of the user if known."
        },
        "idToken": {
          "type": "string",
          "description": "Social Tariff Validation ID token of the user used in /`POST orders` request."
        },
        "idTokenExpiresAt": {
          "type": "string",
          "format": "date-time",
          "description": "Date and time until the ID token is valid. If the ID token is expired it can't be used in `POST /orders`. The client must repeat the social tariff validation flow to obtain a new ID token."
        }
      },
      "required": [
        "inszNumber",
        "familyName",
        "givenName",
        "hasSocialTariff",
        "idToken",
        "idTokenExpiresAt"
      ],
      "title": "SocialTariffValidationPerson"
    }
  }
}