{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/publiq/json-schema/publiq-card-schema.json",
  "title": "Card",
  "description": "Representation of an UiTPAS card.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/publiq-cards-api-openapi.yml#/components/schemas/Card",
  "x-stoplight": {
    "id": "zqvfbrdvemv9g"
  },
  "type": "object",
  "properties": {
    "uitpasNumber": {
      "type": "string",
      "x-stoplight": {
        "id": "wt5795os9zlly"
      },
      "description": "UiTPAS number of this card."
    },
    "cardSystem": {
      "$ref": "#/$defs/CardSystem"
    },
    "cardType": {
      "type": "string",
      "x-stoplight": {
        "id": "0wg00e7ok83tp"
      },
      "enum": [
        "NFC_CARD",
        "DIGITAL"
      ],
      "description": "Type of this card."
    },
    "status": {
      "type": "string",
      "x-stoplight": {
        "id": "ic0htdaaq5wmr"
      },
      "description": "Status of this card.",
      "enum": [
        "PROVISIONED",
        "LOCAL_STOCK",
        "ACTIVE",
        "BLOCKED",
        "DELETED"
      ]
    },
    "socialTariff": {
      "type": "boolean",
      "x-stoplight": {
        "id": "k6sdxxpe9zvpe"
      },
      "description": "Indicated the social tariff status of this card."
    }
  },
  "required": [
    "uitpasNumber",
    "cardSystem",
    "status",
    "socialTariff"
  ],
  "$defs": {
    "CardSystem": {
      "title": "CardSystem",
      "description": "A region, usually one or multiple municipalities in Belgium, that uses UiTPAS and provides discounts and/or rewards. For example \"Paspartoe\" (Brussels), UiTPAS Leuven, UiTPAS Hasselt, UiTPAS Gent, and so on.",
      "type": "object",
      "x-tags": [
        "Models"
      ],
      "properties": {
        "id": {
          "type": "integer",
          "description": "ID of the card system"
        },
        "name": {
          "type": "string",
          "description": "Name of the card system. This field is always available in responses."
        },
        "branding": {
          "type": "object",
          "description": "Branding information of the card system",
          "properties": {
            "logo": {
              "type": "string",
              "description": "URL to the logo of the card system"
            },
            "primaryColor": {
              "type": "string",
              "description": "Color code of the primary branding color."
            },
            "secondaryColor": {
              "type": "string",
              "description": "Color code of the secondary branding color."
            }
          }
        },
        "links": {
          "type": "object",
          "description": "Links of the card system",
          "properties": {
            "website": {
              "type": "string",
              "description": "URL of the website of the card system"
            }
          }
        },
        "cities": {
          "type": "array",
          "description": "List of cities that are part of this card system",
          "items": {
            "$ref": "#/$defs/City"
          }
        },
        "permanent": {
          "type": "boolean",
          "description": "Indicates whether this is a permanent card system"
        },
        "allowsCardlessRegistration": {
          "type": "boolean",
          "description": "Indicates if cardless registration is enabled"
        },
        "cardlessRegistrationType": {
          "type": "string",
          "description": "Indicates the types of online cardless registrations this cardsystem supports.",
          "enum": [
            "ALL",
            "REGULAR",
            "SOCIALTARIFF",
            "NONE"
          ]
        },
        "socialTariffInfo": {
          "type": "string",
          "description": "Optional information about social tariff entitlement in this card system."
        }
      },
      "required": [
        "id"
      ]
    },
    "City": {
      "title": "City",
      "type": "object",
      "x-tags": [
        "Models"
      ],
      "properties": {
        "postalCode": {
          "type": "string",
          "description": "Postalcode of the city"
        },
        "name": {
          "type": "string",
          "description": "Name of the city"
        }
      },
      "required": [
        "postalCode",
        "name"
      ]
    }
  }
}