{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/entur/json-schema/entur-page-ticket-type-response-schema.json",
  "title": "PageTicketTypeResponse",
  "description": "Paged content",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/entur-codes-api-openapi.yml#/components/schemas/PageTicketTypeResponse",
  "required": [
    "items",
    "totalItems",
    "totalPages"
  ],
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "description": "All items for this page",
      "items": {
        "$ref": "#/$defs/TicketTypeResponse"
      }
    },
    "totalItems": {
      "type": "integer",
      "description": "Total items which could be returned",
      "format": "int64"
    },
    "totalPages": {
      "type": "integer",
      "description": "Total number of pages",
      "format": "int64"
    }
  },
  "$defs": {
    "TicketTypeResponse": {
      "required": [
        "canHaveStationPairs",
        "code",
        "countryCode",
        "description",
        "generatesTicketRights",
        "id",
        "isDeleted"
      ],
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "Ticket type id",
          "format": "int64"
        },
        "code": {
          "type": "string",
          "description": "Ticket type"
        },
        "description": {
          "type": "string",
          "description": "Ticket type description"
        },
        "countryCode": {
          "type": "string",
          "description": "Country code"
        },
        "generatesTicketRights": {
          "type": "boolean",
          "description": "Whether or not this this ticket type is relevant for sending as input to a Manual order. If this = false (the default), it will not generate new tickets rights by manual order."
        },
        "canHaveStationPairs": {
          "type": "boolean",
          "description": "Whether or not this ticket type is compatible with station pairs when placing a manual order. The default = false. "
        },
        "isDeleted": {
          "type": "boolean",
          "description": "Whether the ticket type is deleted."
        }
      },
      "description": "The Ticket type informs of which country it is valid in and what train class it covers."
    }
  }
}