{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/entur/main/json-schema/entur-entitlement-response-schema.json", "title": "EntitlementResponse", "description": "Entitlement containing information about contract, product, contract holder and ticker order", "x-generated": "2026-10-09", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/entur-personnel-tickets-openapi.yml#/components/schemas/EntitlementResponse", "required": [ "contractOwnerCustomerNumber", "contractOwnerDisplayName", "contractUUID", "contractValidFrom", "isSeniorCitizen", "passengerCategory", "productId", "productVersion" ], "type": "object", "properties": { "productId": { "type": "string", "description": "Id of the product connected to the contracts loyalty program" }, "displayName": { "type": "array", "description": "Display name for loyalty program", "items": { "$ref": "#/$defs/LocalizedText" } }, "productVersion": { "type": "string", "description": "Version of the product connected to the contracts loyalty program" }, "contractUUID": { "type": "string", "description": "Contract UUID, used to identify a contract" }, "contractExternalRef": { "type": "string", "description": "External contract reference if set." }, "contractOwnerCustomerNumber": { "type": "integer", "description": "Contract owner customer number", "format": "int64" }, "contractOwnerDisplayName": { "type": "string", "description": "Contract owners first and last name" }, "contractOwnerBirthDate": { "$ref": "#/$defs/LocalDateResponse" }, "contractValidFrom": { "type": "string", "description": "Contract consumable from date" }, "contractValidTo": { "type": "string", "description": "Contract expiration date" }, "contractParent": { "type": "string", "description": "If present, contract UUID of the parent contract. This field is usually set if the contract is created by a coupon usage, whereas this contract has a time constraint and the parent has a coupon constraint." }, "remainingCoupons": { "type": "integer", "description": "Remaining coupons connected to the contract", "format": "int64" }, "couponsLimit": { "type": "integer", "description": "How many coupons the contract has. Default is cascaded from Loyalty Program Version. If set, the contract will be blocked for usage when all coupons are used. Coupons are registered via an OrderLineEvent.", "format": "int64" }, "ticketOrderId": { "type": "string", "description": "If present, a ticket is included in this right. It may be distributed or redistributed to this device." }, "isSeniorCitizen": { "type": "boolean", "description": "Whether the contract owner is considered a senior citizen", "deprecated": true }, "passengerCategory": { "type": "string", "description": "Passenger category.", "enum": [ "STUDENT", "SENIOR_CITIZEN", "ADULT" ] } }, "$defs": { "LocalDateResponse": { "required": [ "day", "month", "year" ], "type": "object", "properties": { "day": { "type": "integer", "format": "int32" }, "month": { "type": "integer", "format": "int32" }, "year": { "type": "integer", "format": "int32" } }, "description": "Contract owners birth day" }, "LocalizedText": { "required": [ "description", "languageCode", "text" ], "type": "object", "properties": { "languageCode": { "type": "string", "description": "Language code according to ISO 639-3" }, "text": { "type": "string", "description": "Text localized to the language given in languageCode" }, "description": { "type": "string", "description": "Loyalty program description. Supports any kind of text" } }, "description": "Localized text with language code" } } }