{ "openapi": "3.0.1", "info": { "title": "Railcard Data Management", "description": "", "version": "3" }, "tags": [], "paths": { "/health": { "get": { "summary": "HealthCheck", "deprecated": false, "description": "", "tags": [], "parameters": [ { "name": "client_id", "in": "header", "description": "Unique client id identifying the organisation making the request", "required": true, "example": "{{client_id}}", "schema": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[\\w+]+$", "default": "{{client_id}}", "example": "PoPODqdVmrFXLzdEpGSa" } }, { "name": "User-Agent", "in": "header", "description": "Name and version number of system making the request, e.g. RDGRuntime/7.41.2", "required": true, "example": "{{user-agent}}", "schema": { "type": "string", "pattern": "^[\\x20-\\x7E]+$", "minLength": 1, "maxLength": 256, "default": "{{user-agent}}", "example": "PostmanRuntime/7.47.2" } }, { "name": "X-Correlation-Cust-Id", "in": "header", "description": "Unique client correlation id that can be used to trace requests", "example": "", "schema": { "type": "string", "maxLength": 100, "pattern": "^[A-Za-z0-9_-]+$" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "version": { "type": "integer" }, "message": { "type": "string" } }, "required": [ "version", "message" ] }, "example": { "version": 1, "message": "Service is available" } } }, "headers": {} } }, "security": [ { "bearerAuth": [] } ] } }, "/railcards/{railcardId}": { "get": { "summary": "Get Railcard", "deprecated": false, "description": "Retrieve a specific Railcard \n\nAuthorized clients: RDG and TPRs", "tags": [], "parameters": [ { "name": "railcardId", "in": "path", "description": "Either Railcard Number or yourRailcardId (UUID)", "required": true, "example": "08ZMA0962619701 ", "schema": { "type": "string", "pattern": "^[a-zA-Z0-9-]+$", "minLength": 11, "maxLength": 36 } }, { "name": "client_id", "in": "header", "description": "Unique client id identifying the organisation making the request", "required": true, "example": "{{client_id}}", "schema": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[\\w+]+$", "default": "{{client_id}}", "example": "PoPODqdVmrFXLzdEpGSa" } }, { "name": "User-Agent", "in": "header", "description": "Name and version number of system making the request, e.g. RDGRuntime/7.41.2", "required": true, "example": "{{user-agent}}", "schema": { "type": "string", "pattern": "^[\\x20-\\x7E]+$", "minLength": 1, "maxLength": 256, "default": "{{user-agent}}", "example": "PostmanRuntime/7.47.2" } }, { "name": "X-Correlation-Cust-Id", "in": "header", "description": "Unique client correlation id that can be used to trace requests", "required": false, "example": "", "schema": { "type": "string", "maxLength": 100, "pattern": "^[A-Za-z0-9_-]+$" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RailcardResponse" }, "example": { "yourRailcardId": "b4494f4f-0a4f-4f08-b73e-3a7c4a820ea7", "railcardType": "TSU", "railcardValidFrom": "2025-03-09T12:40:16Z", "railcardValidTo": "2026-08-29T15:07:13Z", "railcardTypeName": "SixteenToSeventeen", "railcardNumber": "08ZMA0962619701", "railcardState": "Active", "railcardRequestedDate": "2025-09-22T15:33:05Z", "railcardUsableTo": "2026-08-29T15:07:13Z", "cardholders": [ { "cardholderId": 1423378, "cardholderTitle": "Mr", "cardholderForename": "Young", "cardholderSurname": "Person", "cardholderType": "Primary" } ] } } }, "headers": { "Content-Type": { "example": "application/json; charset=utf-8", "required": true, "description": "Response body is JSON encoded in UTF-8", "schema": { "type": "string" } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Errors" }, "example": { "errors": [ { "code": "GBR_EXCEPTION_3000", "message": "Invalid payload: Single cardholder must be of type Primary", "timestamp": "2025-10-07T13:31:00.632Z" } ] } } }, "headers": {} }, "401": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Errors" }, "example": { "errors": [ { "code": "GBR-AUTH-2001", "message": "Unauthorised User", "timestamp": "01/Oct/2025:15:32:07 +0000" } ] } } }, "headers": {} }, "404": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Errors" } } }, "headers": {} } }, "security": [] }, "delete": { "summary": "Delete Railcard", "deprecated": false, "description": "Delete a specific Railcard by Railcard number or yourRailcardId\n\nAuthorized clients: RDG and TPRs", "tags": [], "parameters": [ { "name": "railcardId", "in": "path", "description": "Either Railcard Number or yourRailcardId (UUID)", "required": true, "example": "08ZMA0962619701", "schema": { "type": "string", "pattern": "^[a-zA-Z0-9-]+$", "minLength": 11, "maxLength": 36 } }, { "name": "client_id", "in": "header", "description": "Unique client id identifying the organisation making the request", "required": true, "example": "{{client_id}}", "schema": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[\\w+]+$", "default": "{{client_id}}", "example": "PoPODqdVmrFXLzdEpGSa" } }, { "name": "User-Agent", "in": "header", "description": "Name and version number of system making the request, e.g. RDGRuntime/7.41.2", "required": true, "example": "{{user-agent}}", "schema": { "type": "string", "pattern": "^[\\x20-\\x7E]+$", "minLength": 1, "maxLength": 256, "default": "{{user-agent}}", "example": "PostmanRuntime/7.47.2" } }, { "name": "X-Correlation-Cust-Id", "in": "header", "description": "Unique client correlation id that can be used to trace requests", "example": "", "schema": { "type": "string", "maxLength": 100, "pattern": "^[A-Za-z0-9_-]+$" } } ], "responses": { "204": { "description": "", "headers": {} } }, "security": [ { "bearerAuth": [] } ] }, "patch": { "summary": "Update Railcard State", "deprecated": false, "description": "Updates the railcard state \n\nAuthorized clients: RDG and TPRs", "tags": [], "parameters": [ { "name": "railcardId", "in": "path", "description": "Either Railcard Number or yourRailcardId (UUID)\n", "required": true, "example": "08ZMA0962619701", "schema": { "type": "string", "pattern": "^[a-zA-Z0-9-]+$", "minLength": 11, "maxLength": 36 } }, { "name": "client_id", "in": "header", "description": "Unique client id identifying the organisation making the request", "required": true, "example": "{{client_id}}", "schema": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[\\w+]+$", "default": "{{client_id}}", "example": "PoPODqdVmrFXLzdEpGSa" } }, { "name": "User-Agent", "in": "header", "description": "Name and version number of system making the request, e.g. RDGRuntime/7.41.2", "required": true, "example": "{{user-agent}}", "schema": { "type": "string", "pattern": "^[\\x20-\\x7E]+$", "minLength": 1, "maxLength": 256, "default": "{{user-agent}}", "example": "PostmanRuntime/7.47.2" } }, { "name": "X-Correlation-Cust-Id", "in": "header", "description": "Unique client correlation id that can be used to trace requests", "example": "", "schema": { "type": "string", "maxLength": 100, "pattern": "^[A-Za-z0-9_-]+$" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "railcardState": { "$ref": "#/components/schemas/RailcardState" } }, "required": [ "railcardState" ] }, "example": { "railcardState": "Active" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RailcardResponse" }, "example": { "yourRailcardId": "b4494f4f-0a4f-4f08-b73e-3a7c4a820ea7", "railcardType": "TSU", "railcardValidFrom": "2025-03-09T12:40:16Z", "railcardValidTo": "2026-08-29T15:07:13Z", "railcardTypeName": "SixteenToSeventeen", "railcardNumber": "08ZMA0962619701", "railcardState": "Hotlisted", "railcardRequestedDate": "2025-09-22T15:33:05Z", "railcardUsableTo": "2026-08-29T15:07:13Z", "cardholders": [ { "cardholderId": 1423378, "cardholderTitle": "Mr", "cardholderForename": "Young", "cardholderSurname": "Person", "cardholderType": "Primary" } ] } } }, "headers": {} } }, "security": [ { "bearerAuth": [] } ] } }, "/railcards": { "post": { "summary": "Create Railcard", "deprecated": false, "description": "Create a new railcard\n\nAuthorized clients: RDG and TPRs", "tags": [], "parameters": [ { "name": "client_id", "in": "header", "description": "Unique client id identifying the organisation making the request", "required": true, "example": "{{client_id}}", "schema": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[\\w+]+$", "default": "{{client_id}}", "example": "PoPODqdVmrFXLzdEpGSa" } }, { "name": "User-Agent", "in": "header", "description": "Name and version number of system making the request, e.g. RDGRuntime/7.41.2", "required": true, "example": "{{user-agent}}", "schema": { "type": "string", "pattern": "^[\\x20-\\x7E]+$", "minLength": 1, "maxLength": 256, "default": "{{user-agent}}", "example": "PostmanRuntime/7.47.2" } }, { "name": "X-Correlation-Cust-Id", "in": "header", "description": "Unique client correlation id that can be used to trace requests", "example": "", "schema": { "type": "string", "maxLength": 100, "pattern": "^[A-Za-z0-9_-]+$" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "railcardType": { "$ref": "#/components/schemas/RailcardType" }, "railcardValidFrom": { "type": "string", "description": "The date and time when the Digital Railcard becomes valid, it must no later that one calendar month from the Digital Railcard creation date and time.", "format": "date-time" }, "railcardValidTo": { "type": "string", "description": "The date and time the railcard is valid until", "format": "date-time" }, "railcardTypeName": { "type": "string", "description": "Available types are \"Young\", \"Santander\", \"DevonandCornwall\", \"TwoTogether\", \"Family\", \"Senior\", \"DisabledPersons\", \"Network\", \"TwentySixToThirty\", \"SixteenToSeventeen\", \"Veterans\" and \"GoldRecordCard\"", "maxLength": 255, "pattern": "^[A-Za-z0-9 ]*$" }, "railcardNumber": { "description": "Railcard number created by the card issuer", "$ref": "#/components/schemas/RailcardNumber" }, "yourRailcardId": { "type": "string", "format": "uuid", "title": "", "example": "f4a3c742-e9c6-4c18-8f4b-b76b377b7574" }, "railcardRequestedDate": { "type": "string", "description": "Date and time the railcard was requested", "format": "date-time" }, "fulfilmentType": { "$ref": "#/components/schemas/FulfilmentType" }, "railcardState": { "$ref": "#/components/schemas/RailcardState", "description": "Current state of the railcard" }, "railcardUsableTo": { "$ref": "#/components/schemas/NullableDateTime", "description": "Required only if Railcard Type is requires a usable_to date (currently 'TSU' railcard type)" }, "cardholders": { "type": "array", "items": { "$ref": "#/components/schemas/CardholderCreate" }, "description": "Exactly one Primary cardholder; optional one Secondary (any order). Each cardholder requires one type of image detail to be provided; cardholder_photo_rrs_key, cardholder_photo_url, cardholder_photo_key", "minItems": 1, "maxItems": 2 } }, "required": [ "railcardType", "railcardValidFrom", "railcardValidTo", "railcardNumber", "railcardRequestedDate", "cardholders", "fulfilmentType", "railcardState" ] }, "examples": { "1": { "value": { "railcardType": "2TR", "railcardValidFrom": "2025-03-09T12:40:16Z", "railcardValidTo": "2026-08-29T15:07:13Z", "railcardTypeName": "TwoTogether", "railcardNumber": "08ZMA0962619712", "railcardRequestedDate": "2025-09-22T15:33:05Z", "railcardTransactionReference": "912902836866022", "railcardUsableTo": "", "cardholders": [ { "cardholderTitle": "Mr", "cardholderForename": "John", "cardholderSurname": "Smith", "cardholderType": "Primary" }, { "cardholderTitle": "Mrs", "cardholderForename": "Jane", "cardholderSurname": "Rogers", "cardholderType": "Secondary" } ] }, "summary": "Two Cardholders" }, "2": { "value": { "railcardType": "NEW", "railcardValidFrom": "2025-03-09T12:40:16Z", "railcardValidTo": "2026-08-29T15:07:13Z", "railcardTypeName": "Network", "railcardNumber": "08ZMA0962619713", "railcardRequestedDate": "2025-09-22T15:33:05Z", "railcardTransactionReference": "912902836866023", "railcardUsableTo": "", "cardholders": [ { "cardholderTitle": "Mr", "cardholderForename": "Grace", "cardholderSurname": "Kelly", "cardholderType": "Primary" } ] }, "summary": "Single Cardholder" } } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "yourRailcardId": { "type": "string", "format": "uuid" } }, "description": "Token", "required": [ "yourRailcardId" ] }, "example": { "yourRailcardId": "b9505ae8-c9f9-422c-85b3-99b6cc2a2d47" } } }, "headers": {} } }, "security": [ { "bearerAuth": [] } ] } }, "/railcards/{railcardId}/cardholders": { "put": { "summary": "Update Cardholder For Railcard", "deprecated": false, "description": "Update the cardholder for a railcard\n\nAuthorized clients: RDG and TPRs", "tags": [], "parameters": [ { "name": "railcardId", "in": "path", "description": "Either Railcard Number or yourRailcardId (UUID)", "required": true, "example": "08ZMA0962619701 ", "schema": { "type": "string", "pattern": "^[a-zA-Z0-9-]+$", "minLength": 11, "maxLength": 36 } }, { "name": "client_id", "in": "header", "description": "Unique client id identifying the organisation making the request", "required": true, "example": "{{client_id}}", "schema": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[\\w+]+$", "default": "{{client_id}}", "example": "PoPODqdVmrFXLzdEpGSa" } }, { "name": "User-Agent", "in": "header", "description": "Name and version number of system making the request, e.g. RDGRuntime/7.41.2", "required": true, "example": "{{user-agent}}", "schema": { "type": "string", "pattern": "^[\\x20-\\x7E]+$", "minLength": 1, "maxLength": 256, "default": "{{user-agent}}", "example": "PostmanRuntime/7.47.2" } }, { "name": "X-Correlation-Cust-Id", "in": "header", "description": "Unique client correlation id that can be used to trace requests", "example": "", "schema": { "type": "string", "maxLength": 100, "pattern": "^[A-Za-z0-9_-]+$" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CardholderUpdate" }, "example": { "cardholderTitle": "Mr", "cardholderForename": "Young", "cardholderSurname": "Person", "cardholderType": "Primary" } } } }, "responses": { "204": { "description": "", "headers": {} } }, "security": [ { "bearerAuth": [] } ] }, "post": { "summary": "Add Cardholder To Railcard", "deprecated": false, "description": "Adds a cardholder to a Railcard\n\nAuthorized clients: RDG and TPRs", "tags": [], "parameters": [ { "name": "railcardId", "in": "path", "description": "Either Railcard Number or yourRailcardId (UUID)", "required": true, "example": "08ZMA0962619701", "schema": { "type": "string", "pattern": "^[a-zA-Z0-9-]+$", "minLength": 11, "maxLength": 36 } }, { "name": "client_id", "in": "header", "description": "Unique client id identifying the organisation making the request", "required": true, "example": "{{client_id}}", "schema": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[\\w+]+$", "default": "{{client_id}}", "example": "PoPODqdVmrFXLzdEpGSa" } }, { "name": "User-Agent", "in": "header", "description": "Name and version number of system making the request, e.g. RDGRuntime/7.41.2", "required": true, "example": "{{user-agent}}", "schema": { "type": "string", "pattern": "^[\\x20-\\x7E]+$", "minLength": 1, "maxLength": 256, "default": "{{user-agent}}", "example": "PostmanRuntime/7.47.2" } }, { "name": "X-Correlation-Cust-Id", "in": "header", "description": "Unique client correlation id that can be used to trace requests", "example": "", "schema": { "type": "string", "maxLength": 100, "pattern": "^[A-Za-z0-9_-]+$" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CardholderCreate" }, "example": { "cardholderTitle": "Mr", "cardholderForename": "John", "cardholderSurname": "Smith", "cardholderType": "Secondary" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "cardholderId": { "type": "integer", "format": "int32" } }, "required": [ "cardholderId" ] }, "example": { "cardholderId": 64567 } } }, "headers": {} } }, "security": [ { "bearerAuth": [] } ] } }, "/railcards/{railcardId}/cardholders/{cardholderKey}": { "delete": { "summary": "Remove Cardholder From Railcard", "deprecated": false, "description": "Removes a specific cardholder from a railcard \n\nAuthorized clients: RDG and TPRs", "tags": [], "parameters": [ { "name": "railcardId", "in": "path", "description": "Either Railcard Number or yourRailcardId (UUID)", "required": true, "example": "08ZMA0962619701", "schema": { "type": "string", "pattern": "^[a-zA-Z0-9-]+$", "minLength": 11, "maxLength": 36 } }, { "name": "cardholderKey", "in": "path", "description": "Either Cardholder id returned from Get Railcard or Primary / Secondary type", "required": true, "example": "14671 | Primary", "schema": { "oneOf": [ { "type": "string", "enum": [ "Primary", "Secondary" ] }, { "type": "integer", "format": "int32", "minimum": 1 } ], "type": "string" } }, { "name": "client_id", "in": "header", "description": "Unique client id identifying the organisation making the request", "required": true, "example": "{{client_id}}", "schema": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[\\w+]+$", "default": "{{client_id}}", "example": "PoPODqdVmrFXLzdEpGSa" } }, { "name": "User-Agent", "in": "header", "description": "Name and version number of system making the request, e.g. RDGRuntime/7.41.2", "required": true, "example": "{{user-agent}}", "schema": { "type": "string", "pattern": "^[\\x20-\\x7E]+$", "minLength": 1, "maxLength": 256, "default": "{{user-agent}}", "example": "PostmanRuntime/7.47.2" } }, { "name": "X-Correlation-Cust-Id", "in": "header", "description": "Unique client correlation id that can be used to trace requests", "example": "", "schema": { "type": "string", "maxLength": 100, "pattern": "^[A-Za-z0-9_-]+$" } } ], "responses": { "204": { "description": "", "headers": {} } }, "security": [ { "bearerAuth": [] } ] } } }, "components": { "schemas": { "CardholderUpdate": { "type": "object", "properties": { "cardholderId": { "type": "integer", "description": "Cardholder id returned from Get Railcard" }, "cardholderTitle": { "type": "string", "maxLength": 30, "minLength": 1, "pattern": "^(?!.*[×÷ˇ˘μ])[A-Za-zÀ-žºª .'’\\-]+$" }, "cardholderForename": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^(?!.*[×÷ˇ˘μ])[A-Za-zÀ-ž .'’\\-]+$" }, "cardholderSurname": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^(?!.*[×÷ˇ˘μ])[A-Za-zÀ-ž .'’\\-]+$" }, "cardholderType": { "$ref": "#/components/schemas/CardHolderType", "description": "Primary or Secondary" } }, "required": [ "cardholderTitle", "cardholderForename", "cardholderSurname" ] }, "CardholderCreate": { "type": "object", "properties": { "cardholderTitle": { "type": "string", "maxLength": 30, "minLength": 1, "pattern": "^(?!.*[×÷ˇ˘μ])[A-Za-zÀ-žºª .'’\\-]+$" }, "cardholderForename": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^(?!.*[×÷ˇ˘μ])[A-Za-zÀ-ž .'’\\-]+$" }, "cardholderSurname": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^(?!.*[×÷ˇ˘μ])[A-Za-zÀ-ž .'’\\-]+$" }, "cardholderType": { "$ref": "#/components/schemas/CardHolderType" } }, "required": [ "cardholderTitle", "cardholderForename", "cardholderSurname", "cardholderType" ] }, "Error": { "title": "RDG Error Object", "type": "object", "properties": { "code": { "title": "Error Code", "type": "string", "description": "A unique (by service) code for an error" }, "message": { "title": "Error Message", "type": "string", "description": "Short description of an error" }, "timestamp": { "title": "Error Timestamp", "type": "string", "format": "date-time", "description": "Timestamp of an error" }, "context": { "title": "Context", "description": "Additional context in relation to the notice.", "type": "object", "patternProperties": { "[a-zA-Z0-9_]*": { "type": "string" } }, "properties": {} } } }, "Errors": { "title": "Error Array", "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/Error" } } } }, "NullableDateTime": { "oneOf": [ { "type": "string", "title": "", "description": "", "format": "date-time" }, { "type": "string", "enum": [ "" ], "title": "", "description": "" } ] }, "FulfilmentType": { "type": "string", "enum": [ "Digital", "Plastic" ] }, "RailcardType": { "type": "string", "minLength": 3, "maxLength": 3, "pattern": "^[A-Za-z]*$", "example": "TSU" }, "CardHolderType": { "type": "string", "enum": [ "Primary", "Secondary" ] }, "RailcardNumber": { "type": "string", "minLength": 11, "maxLength": 22, "pattern": "^[A-Za-z0-9]+$", "example": "08ZMA0216737889" }, "RailcardState": { "type": "string", "enum": [ "Active", "Awaiting Approval", "Hotlisted", "Preparing to dispatch", "Dispatched", "Revoked", "Replaced", "Cancelled" ], "default": "Active" }, "CardholderResponse": { "type": "object", "properties": { "cardholderID": { "type": "integer" }, "cardholderTitle": { "type": "string", "pattern": "^(?!.*[×÷ˇ˘μ])[A-Za-z0-9À-ž .]+$", "minLength": 1, "maxLength": 10 }, "cardholderForename": { "type": "string", "pattern": "^(?!.*[×÷ˇ˘μ])[A-Za-z0-9À-ž ]+$", "minLength": 1, "maxLength": 100 }, "cardholderSurname": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^(?!.*[×÷ˇ˘μ])[A-Za-z0-9À-ž ]+$" }, "cardholderType": { "$ref": "#/components/schemas/CardHolderType" } }, "required": [ "cardholderTitle", "cardholderForename", "cardholderSurname", "cardholderType", "cardholderID" ] }, "RailcardResponse": { "type": "object", "properties": { "yourRailcardId": { "type": "string", "format": "uuid", "minLength": 36, "maxLength": 36 }, "railcardType": { "$ref": "#/components/schemas/RailcardType" }, "railcardValidFrom": { "type": "string", "description": "The date and time when the Digital Railcard becomes valid, it must no later that one calendar month from the Digital Railcard creation date and time.", "format": "date-time" }, "railcardValidTo": { "type": "string", "description": "The date and time the railcard is valid until", "format": "date-time" }, "railcardTypeName": { "type": "string", "description": "Available types are \"Young\", \"Santander\", \"DevonandCornwall\", \"TwoTogether\", \"Family\", \"Senior\", \"DisabledPersons\", \"Network\", \"TwentySixToThirty\", \"SixteenToSeventeen\", \"Veterans\" and \"GoldRecordCard\"", "maxLength": 255, "pattern": "^[A-Za-z0-9 ]$" }, "railcardNumber": { "$ref": "#/components/schemas/RailcardNumber", "description": "Railcard number created by the card issuer" }, "railcardState": { "$ref": "#/components/schemas/RailcardState" }, "railcardRequestedDate": { "type": "string", "format": "date-time" }, "railcardUsableTo": { "$ref": "#/components/schemas/NullableDateTime", "description": "The date and time the railcard is valid until only if Railcard Type is \"SixteenToSeventeen\". Railcard usable to is required only if Railcard Type is \"SixteenToSeventeen\"." }, "cardholders": { "type": "array", "items": { "$ref": "#/components/schemas/CardholderResponse" }, "description": "Exactly one Primary cardholder; optional one Secondary (any order).", "minItems": 1, "maxItems": 2 } }, "required": [ "railcardType", "railcardValidFrom", "railcardValidTo", "railcardNumber", "railcardUsableTo", "cardholders", "railcardState", "yourRailcardId", "railcardRequestedDate" ] } }, "securitySchemes": { "bearerAuth": { "type": "apiKey", "in": "header", "name": "Authorization", "description": "JWT Authorization header using the Bearer scheme. Example: \"Authorization: Bearer {token}\"" } } }, "servers": [ { "url": "/api/v3" } ], "security": [] }