├── .gitignore ├── .prettierrc ├── renovate.json ├── package.json ├── LICENSE └── pass.schema.json /.gitignore: -------------------------------------------------------------------------------- 1 | *.tgz 2 | node_modules/ 3 | package-lock.json 4 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": false, 3 | "parser": "json" 4 | } 5 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "config:base" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@walletpass/json-schemas", 3 | "version": "1.0.0", 4 | "description": "JSON schemas for Apple Wallet Passes files", 5 | "main": "./pass.schema.json", 6 | "scripts": { 7 | "test": "jest" 8 | }, 9 | "files": ["*.schema.json"], 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/walletpass/json-schemas.git" 13 | }, 14 | "keywords": ["json", "schema", "apple", "wallet", "pass", "passkit"], 15 | "author": "Konstantin Vyatkin ", 16 | "license": "MIT", 17 | "bugs": { 18 | "url": "https://github.com/walletpass/json-schemas/issues" 19 | }, 20 | "homepage": "https://github.com/walletpass/json-schemas#readme", 21 | "devDependencies": { 22 | "ajv": "8.11.2", 23 | "prettier": "3.5.0" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Web PassKit 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /pass.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Pass", 4 | "description": "Apple Wallet pass with localizations, NFC and web service push updates support.", 5 | "type": "object", 6 | "definitions": { 7 | "w3cDate": { 8 | "title": "ISO 8601 Date", 9 | "description": "An ISO 8601 formatted date represented as a JSON string.", 10 | "type": "string", 11 | "pattern": "^20[1-9]{2}-[01]\\d-[0-3]\\dT[0-5]\\d:[0-5]\\d(:[0-5]\\d)?(Z|([+-][01]\\d:[03]0)$)" 12 | }, 13 | "color": { 14 | "title": "Color", 15 | "description": "CSS-style RGB triple color.", 16 | "type": "string", 17 | "pattern": "^rgba?\\(\\s*(1?\\d{1,2}|2[0-4]\\d|25[0-5])\\s*,\\s*(1?\\d{1,2}|2[0-4]\\d|25[0-5])\\s*,\\s*(1?\\d{1,2}|2[0-4]\\d|25[0-5])\\s*(?:,\\s*([+-]?[\\d.]+)\\s*)?\\)$" 18 | }, 19 | "currencyCode": { 20 | "title": "Currency Code", 21 | "description": "ISO 4217 currency code.", 22 | "type": "string", 23 | "pattern": "^[A-Z]{3,3}$" 24 | }, 25 | "currencyAmount": { 26 | "title": "Currency Amount", 27 | "description": "An ISO 4217 currency code and an amount.", 28 | "type": "object", 29 | "additionalProperties": false, 30 | "properties": { 31 | "currencyCode": { "$ref": "#/definitions/currencyCode" }, 32 | "amount": { 33 | "title": "Amount", 34 | "type": "string" 35 | } 36 | } 37 | }, 38 | "personNameComponents": { 39 | "title": "Person Name Components", 40 | "description": "An object that manages the separate parts of a person's name", 41 | "type": "object", 42 | "properties": { 43 | "namePrefix": { 44 | "title": "Name Prefix", 45 | "description": "The portion of a name’s full form of address that precedes the name itself.", 46 | "type": "string", 47 | "examples": ["Dr.", "Mr.", "Ms."] 48 | }, 49 | "givenName": { 50 | "title": "Given Name", 51 | "description": "Name bestowed upon an individual to differentiate them from other members of a group that share a family name.", 52 | "type": "string", 53 | "examples": ["Johnathan"] 54 | }, 55 | "middleName": { 56 | "title": "Middle Name", 57 | "description": "Secondary name bestowed upon an individual to differentiate them from others that have the same given name.", 58 | "type": "string", 59 | "examples": ["Maple"] 60 | }, 61 | "familyName": { 62 | "title": "Family Name", 63 | "description": "Name bestowed upon an individual to denote membership in a group or family.", 64 | "type": "string", 65 | "examples": ["Appleseed"] 66 | }, 67 | "nameSuffix": { 68 | "title": "Name Suffix", 69 | "description": "The portion of a name’s full form of address that follows the name itself.", 70 | "type": "string", 71 | "examples": ["Esq.", "Jr.", "Ph.D."] 72 | }, 73 | "nickname": { 74 | "title": "Nickname", 75 | "description": "Name substituted for the purposes of familiarity.", 76 | "type": "string", 77 | "examples": ["Johnny"] 78 | }, 79 | "phoneticRepresentation": { 80 | "title": "Phonetic Representation", 81 | "description": "The phonetic representation name components of the receiver.", 82 | "type": "object", 83 | "$ref": "#/definitions/personNameComponents", 84 | "not": { 85 | "required": ["phoneticRepresentation"] 86 | } 87 | } 88 | } 89 | }, 90 | "seat": { 91 | "title": "Seat", 92 | "description": "A dictionary with seat information", 93 | "type": "object", 94 | "properties": { 95 | "seatSection": { 96 | "type": "string" 97 | }, 98 | "seatRow": { 99 | "type": "string" 100 | }, 101 | "seatNumber": { 102 | "type": "string" 103 | }, 104 | "seatIdentifier": { 105 | "type": "string" 106 | }, 107 | "seatType": { 108 | "type": "string" 109 | }, 110 | "seatDescription": { 111 | "type": "string" 112 | } 113 | } 114 | }, 115 | "field": { 116 | "title": "Field", 117 | "description": "Keys that define an individual field.", 118 | "type": "object", 119 | "additionalProperties": false, 120 | "properties": { 121 | "attributedValue": { 122 | "title": "Attributed Value", 123 | "description": "Attributed value of the field.\nThe value may contain HTML markup for links. Only the tag and its href attribute are supported. This key’s value overrides the text specified by the value key.\nAvailable in iOS 7.0.", 124 | "anyOf": [ 125 | { "type": "number" }, 126 | { "type": "string" }, 127 | { "$ref": "#/definitions/w3cDate" } 128 | ], 129 | "examples": [ 130 | "Edit my profile" 131 | ] 132 | }, 133 | "changeMessage": { 134 | "title": "Change Message", 135 | "description": "Format string for the alert text that is displayed when the pass is updated. The format string must contain the escape %@, which is replaced with the field’s new value. If you don’t specify a change message, the user isn’t notified when the field changes.\nLocalizable.", 136 | "type": "string", 137 | "examples": ["Gate changed to %@."] 138 | }, 139 | "dataDetectorTypes": { 140 | "title": "Data Detector Types", 141 | "description": "Data detectors that are applied to the field’s value. Provide an empty array to use no data detectors. Data detectors are applied only to back fields.", 142 | "type": "array", 143 | "uniqueItems": true, 144 | "items": { 145 | "anyOf": [ 146 | { "const": "PKDataDetectorTypePhoneNumber" }, 147 | { "const": "PKDataDetectorTypeLink" }, 148 | { "const": "PKDataDetectorTypeAddress" }, 149 | { "const": "PKDataDetectorTypeCalendarEvent" } 150 | ] 151 | }, 152 | "default": [ 153 | "PKDataDetectorTypePhoneNumber", 154 | "PKDataDetectorTypeLink", 155 | "PKDataDetectorTypeAddress", 156 | "PKDataDetectorTypeCalendarEvent" 157 | ] 158 | }, 159 | "key": { 160 | "title": "Key", 161 | "description": "The key must be unique within the scope of the entire pass.", 162 | "type": "string", 163 | "examples": ["departure-gate."] 164 | }, 165 | "label": { 166 | "title": "Label", 167 | "description": "Label text for the field.\nLocalizable.", 168 | "type": "string" 169 | }, 170 | "textAlignment": { 171 | "title": "Text Alignment", 172 | "description": "Alignment for the field’s contents.\nThis key is not allowed for primary fields or back fields.", 173 | "type": "string", 174 | "enum": [ 175 | "PKTextAlignmentLeft", 176 | "PKTextAlignmentCenter", 177 | "PKTextAlignmentRight", 178 | "PKTextAlignmentNatural" 179 | ], 180 | "default": "PKTextAlignmentNatural" 181 | }, 182 | "value": { 183 | "title": "Value", 184 | "description": "Value of the field", 185 | "anyOf": [ 186 | { "type": "number" }, 187 | { "type": "string" }, 188 | { 189 | "$ref": "#/definitions/w3cDate" 190 | } 191 | ], 192 | "examples": [42] 193 | }, 194 | "dateStyle": { 195 | "title": "Date Style", 196 | "description": "Style of date to display.", 197 | "type": "string", 198 | "enum": [ 199 | "PKDateStyleNone", 200 | "PKDateStyleShort", 201 | "PKDateStyleMedium", 202 | "PKDateStyleLong", 203 | "PKDateStyleFull" 204 | ] 205 | }, 206 | "ignoresTimeZone": { 207 | "title": "Ignores Time Zone", 208 | "description": "Always display the time and date in the given time zone, not in the user’s current time zone.\nThe format for a date and time always requires a time zone, even if it will be ignored. For backward compatibility with iOS 6, provide an appropriate time zone, so that the information is displayed meaningfully even without ignoring time zones.\nThis key does not affect how relevance is calculated.\nAvailable in iOS 7.0.", 209 | "type": "boolean", 210 | "default": false 211 | }, 212 | "isRelative": { 213 | "title": "Is Relative", 214 | "description": "If true, the label’s value is displayed as a relative date; otherwise, it is displayed as an absolute date.\nThis key does not affect how relevance is calculated.", 215 | "type": "boolean", 216 | "default": false 217 | }, 218 | "timeStyle": { 219 | "title": "Time Style", 220 | "description": "Style of time to display.", 221 | "type": "string", 222 | "enum": [ 223 | "PKDateStyleNone", 224 | "PKDateStyleShort", 225 | "PKDateStyleMedium", 226 | "PKDateStyleLong", 227 | "PKDateStyleFull" 228 | ] 229 | }, 230 | "currencyCode": { 231 | "$ref": "#/definitions/currencyCode" 232 | }, 233 | "numberStyle": { 234 | "title": "Number Style", 235 | "description": "Style of number to display. Number styles have the same meaning as the Cocoa number formatter styles with corresponding names. See https://developer.apple.com/documentation/foundation/nsnumberformatterstyle", 236 | "type": "string", 237 | "enum": [ 238 | "PKNumberStyleDecimal", 239 | "PKNumberStylePercent", 240 | "PKNumberStyleScientific", 241 | "PKNumberStyleSpellOut" 242 | ] 243 | }, 244 | "semantics": { 245 | "title": "Semantics", 246 | "description": "Machine-readable metadata to allow the system to offer Wallet passes to users intelligently.", 247 | "$comment": "All semantic data is optional and different semantic fields can be placed in auxiliary, primary, secondary, header or back fields.", 248 | "type": "object", 249 | "properties": { 250 | "totalPrice": { 251 | "title": "Total Price", 252 | "description": "The total price for the pass.", 253 | "$ref": "#/definitions/currencyAmount" 254 | }, 255 | "duration": { 256 | "title": "Duration", 257 | "description": "The duration of the event or transit journey, in seconds.", 258 | "type": "number" 259 | }, 260 | "seats": { 261 | "title": "Seats", 262 | "description": "Seating details for all seats at the event or transit journey.", 263 | "type": "array", 264 | "items": { 265 | "$ref": "#/definitions/seat" 266 | } 267 | }, 268 | "silenceRequested": { 269 | "title": "Silence Requested", 270 | "description": "Request the user's device to remain silent during a the event or transit journey. This key may not be honored and the system will determine the length of the silence period.", 271 | "type": "boolean" 272 | }, 273 | "departureLocation": { 274 | "title": "Departure Location", 275 | "description": "The geographic coordinates of the transit departure, suitable to be shown on a map. If possible, precise locations are more useful to travelers, such as the specific location of the gate at an airport.", 276 | "$ref": "#/definitions/location" 277 | }, 278 | "departureLocationDescription": { 279 | "title": "Departure Location Description", 280 | "description": "A brief description of the departure location.", 281 | "type": "string", 282 | "examples": ["San Francisco"] 283 | }, 284 | "destinationLocation": { 285 | "title": "Destination Location", 286 | "description": "The geographic coordinates of the transit destination, suitable to be shown on a map.", 287 | "$ref": "#/definitions/location" 288 | }, 289 | "destinationLocationDescription": { 290 | "title": "Destination Location Description", 291 | "description": "A brief description of the destination location.", 292 | "$ref": "#/definitions/location" 293 | }, 294 | "transitProvider": { 295 | "title": "Transit Provider", 296 | "description": "The name of the transit company.", 297 | "type": "string" 298 | }, 299 | "vehicleName": { 300 | "title": "Vehicle Name", 301 | "description": "The name of the vehicle being boarded, such as the name of a boat.", 302 | "type": "string" 303 | }, 304 | "vehicleNumber": { 305 | "title": "Vehicle Number", 306 | "description": "The identifier of the vehicle being boarded, such as the aircraft registration number or train number.", 307 | "type": "string" 308 | }, 309 | "vehicleType": { 310 | "title": "Vehicle Type", 311 | "description": "A brief description of the type of vehicle being boarded, such as the model and manufacturer of a plane or the class of a boat.", 312 | "type": "string" 313 | }, 314 | "originalDepartureDate": { 315 | "title": "Original Departure Date", 316 | "description": "The original scheduled date and time of departure.", 317 | "$ref": "#/definitions/w3cDate" 318 | }, 319 | "currentDepartureDate": { 320 | "title": "Current Departure Date", 321 | "description": "The updated date and time of departure, if different than the original scheduled date.", 322 | "$ref": "#/definitions/w3cDate" 323 | }, 324 | "originalArrivalDate": { 325 | "title": "Original Arrival Date", 326 | "description": "The original scheduled date and time of arrival.", 327 | "$ref": "#/definitions/w3cDate" 328 | }, 329 | "currentArrivalDate": { 330 | "title": "Current Arrival Date", 331 | "description": "The updated date and time of arrival, if different than the original scheduled date.", 332 | "$ref": "#/definitions/w3cDate" 333 | }, 334 | "originalBoardingDate": { 335 | "title": "Original Boarding Date", 336 | "description": "The original scheduled date and time of boarding.", 337 | "$ref": "#/definitions/w3cDate" 338 | }, 339 | "currentBoardingDate": { 340 | "title": "Current Boarding Date", 341 | "description": "The updated date and time of boarding, if different than the original scheduled date.", 342 | "$ref": "#/definitions/w3cDate" 343 | }, 344 | "boardingGroup": { 345 | "title": "Boarding Group", 346 | "description": "A group number for boarding.", 347 | "type": "string" 348 | }, 349 | "boardingSequenceNumber": { 350 | "title": "Boarding Sequence Number", 351 | "description": "A sequence number for boarding.", 352 | "type": "string" 353 | }, 354 | "confirmationNumber": { 355 | "title": "Confirmation Number", 356 | "description": "A booking or reservation confirmation number.", 357 | "type": "string" 358 | }, 359 | "transitStatus": { 360 | "title": "Transit Status", 361 | "description": "A brief description of the current status of the vessel being boarded. For delayed statuses, provide currentBoardingDate, currentDepartureDate, and currentArrivalDate where available.", 362 | "type": "string", 363 | "examples": ["On Time", "Delayed"] 364 | }, 365 | "transitStatusReason": { 366 | "title": "Transit Status Reason", 367 | "description": "A brief description explaining the reason for the current transitStatus", 368 | "type": "string", 369 | "examples": ["Thunderstorms"] 370 | }, 371 | "passengerName": { 372 | "title": "Passenger Name", 373 | "description": "The passenger's name.", 374 | "$ref": "#/definitions/personNameComponents" 375 | }, 376 | "membershipProgramName": { 377 | "title": "Membership Program Name", 378 | "description": "The name of a frequent flyer or loyalty program.", 379 | "type": "string" 380 | }, 381 | "membershipProgramNumber": { 382 | "title": "Membership Program Number", 383 | "description": "The ticketed passenger's frequent flyer or loyalty number.", 384 | "type": "string" 385 | }, 386 | "priorityStatus": { 387 | "title": "Priority Status", 388 | "description": "he priority status held by the ticketed passenger", 389 | "type": "string", 390 | "examples": ["Gold", "Silver"] 391 | }, 392 | "securityScreening": { 393 | "title": "Security Screening", 394 | "description": " The type of security screening that the ticketed passenger will be subject to, such as 'Priority'.", 395 | "type": "string" 396 | }, 397 | "flightCode": { 398 | "title": "Flight Code", 399 | "description": "The IATA flight code", 400 | "type": "string", 401 | "examples": ["EX123"] 402 | }, 403 | "airlineCode": { 404 | "title": "The IATA airline code", 405 | "description": "The IATA airline code, such as 'EX' for flightCode 'EX123'.", 406 | "type": "string", 407 | "examples": ["EX"] 408 | }, 409 | "flightNumber": { 410 | "title": "Flight Number", 411 | "description": "The numeric portion of the IATA flightCode, such as 123 for flightCode 'EX123'", 412 | "type": "number", 413 | "examples": [123] 414 | }, 415 | "departureAirportCode": { 416 | "title": "Departure Airport Code", 417 | "description": "The IATA airport code for the departure airport.", 418 | "type": "string", 419 | "examples": ["SFO", "SJC"] 420 | }, 421 | "departureAirportName": { 422 | "title": "Departure Airport Name", 423 | "description": "The full name of the departure airport", 424 | "type": "string", 425 | "examples": ["San Francisco International Airport"] 426 | }, 427 | "departureTerminal": { 428 | "title": "Departure Terminal", 429 | "description": "The terminal name or letter of the departure terminal, such as 'A'. Do not include the word 'Terminal'", 430 | "type": "string", 431 | "examples": ["A"] 432 | }, 433 | "departureGate": { 434 | "title": "Departure Gate", 435 | "description": "The gate number or letters of the departure gate, such as '1A'. Do not include the word 'Gate'.", 436 | "type": "string", 437 | "examples": ["1A"] 438 | }, 439 | "destinationAirportCode": { 440 | "title": "Destination Airport Code", 441 | "description": "The IATA airport code for the destination airport.", 442 | "type": "string", 443 | "examples": ["SFO", "SJC"] 444 | }, 445 | "destinationAirportName": { 446 | "title": "Destination Airport Name", 447 | "description": "The full name of the destination airport", 448 | "type": "string", 449 | "examples": ["San Francisco International Airport"] 450 | }, 451 | "destinationTerminal": { 452 | "title": "Destination Terminal", 453 | "description": "The terminal name or letter of the destination terminal, such as 'A'. Do not include the word 'Terminal'", 454 | "type": "string", 455 | "examples": ["A"] 456 | }, 457 | "destinationGate": { 458 | "title": "Destination Gate", 459 | "description": "The gate number or letters of the destination gate, such as '1A'. Do not include the word 'Gate'.", 460 | "type": "string", 461 | "examples": ["1A"] 462 | }, 463 | "departurePlatform": { 464 | "title": "Departure Platform", 465 | "description": "The name of the departure platform, such as 'A'. Do not include the word 'Platform'.", 466 | "type": "string", 467 | "examples": ["A"] 468 | }, 469 | "departureStationName": { 470 | "title": "Departure Station Name", 471 | "description": "The name of the departure station.", 472 | "type": "string", 473 | "examples": ["1st Street Station"] 474 | }, 475 | "destinationPlatform": { 476 | "title": "Destination Platform", 477 | "description": "The name of the destination platform, such as 'A'. Do not include the word 'Platform'.", 478 | "type": "string", 479 | "examples": ["A"] 480 | }, 481 | "destinationStationName": { 482 | "title": "Destination Station Name", 483 | "description": "The name of the destination station.", 484 | "type": "string", 485 | "examples": ["1st Street Station"] 486 | }, 487 | "carNumber": { 488 | "title": "Car Number", 489 | "description": "The car number.", 490 | "type": "string" 491 | }, 492 | "eventName": { 493 | "title": "Event Name", 494 | "description": "The full name for the event, such as the title of a movie.", 495 | "type": "string" 496 | }, 497 | "venueName": { 498 | "title": "Venue Name", 499 | "description": "The full name of the venue.", 500 | "type": "string" 501 | }, 502 | "venueLocation": { 503 | "title": "Venue Location", 504 | "description": "The geographic coordinates of the venue.", 505 | "$ref": "#/definitions/location" 506 | }, 507 | "venueEntrance": { 508 | "title": "Venue Entrance", 509 | "description": "The full name of the entrance to use to gain access to the ticketed event.", 510 | "type": "string", 511 | "examples": ["Gate A"] 512 | }, 513 | "venuePhoneNumber": { 514 | "title": "Venue Phone Number", 515 | "description": "The phone number for enquiries about the venue's ticketed event.", 516 | "type": "string" 517 | }, 518 | "venueRoom": { 519 | "title": "Venue Room", 520 | "description": "The full name of the room where the ticketed event is taking place.", 521 | "type": "string" 522 | }, 523 | "eventType": { 524 | "title": "Event Type", 525 | "description": "The event type.", 526 | "type": "string", 527 | "enum": [ 528 | "PKEventTypeGeneric", 529 | "PKEventTypeLivePerformance", 530 | "PKEventTypeMovie", 531 | "PKEventTypeSports", 532 | "PKEventTypeConference", 533 | "PKEventTypeConvention", 534 | "PKEventTypeWorkshop", 535 | "PKEventTypeSocialGathering" 536 | ] 537 | }, 538 | "eventStartDate": { 539 | "title": "Event Start Date", 540 | "description": "The date and time the event starts.", 541 | "$ref": "#/definitions/w3cDate" 542 | }, 543 | "eventEndDate": { 544 | "title": "Event End Date", 545 | "description": "The date and time the event ends.", 546 | "$ref": "#/definitions/w3cDate" 547 | }, 548 | "artistIDs": { 549 | "title": "Artist IDs", 550 | "description": "The Adam IDs for the artists performing, in decreasing order of significance.", 551 | "type": "array", 552 | "items": { 553 | "type": "string" 554 | } 555 | }, 556 | "performerNames": { 557 | "title": "Performer Names", 558 | "description": "The full names of the performers and opening acts, in decreasing order of significance.", 559 | "type": "array", 560 | "items": { 561 | "type": "string" 562 | } 563 | }, 564 | "genre": { 565 | "title": "Genre", 566 | "description": "The genre of the performance.", 567 | "type": "string" 568 | }, 569 | "leagueName": { 570 | "title": "League Name", 571 | "description": "he unabbreviated league name for a sporting event.", 572 | "type": "string" 573 | }, 574 | "leagueAbbreviation": { 575 | "title": "League Abbreviation", 576 | "description": "The abbreviated league name for a sporting event.", 577 | "type": "string" 578 | }, 579 | "homeTeamLocation": { 580 | "title": "Home Team Location", 581 | "description": "The home location of the home team.", 582 | "type": "string" 583 | }, 584 | "homeTeamName": { 585 | "title": "Home Team Name", 586 | "description": "The name of the home team.", 587 | "type": "string" 588 | }, 589 | "homeTeamAbbreviation": { 590 | "title": "Home Team Abbreviation", 591 | "description": "The unique abbreviation of the home team's name.", 592 | "type": "string" 593 | }, 594 | "awayTeamLocation": { 595 | "title": "Away Team Location", 596 | "description": "The home location of the away team.", 597 | "type": "string" 598 | }, 599 | "awayTeamName": { 600 | "title": "Away Team Name", 601 | "description": "The name of the away team.", 602 | "type": "string" 603 | }, 604 | "awayTeamAbbreviation": { 605 | "title": "Away Team Abbreviation", 606 | "description": "The unique abbreviation of the away team's name.", 607 | "type": "string" 608 | }, 609 | "sportName": { 610 | "title": "Sport Name", 611 | "description": "The commonly used local name of the sport.", 612 | "type": "string" 613 | }, 614 | "balance": { 615 | "title": "Balance", 616 | "description": "The balance redeemable with the pass.", 617 | "$ref": "#/definitions/currencyAmount" 618 | } 619 | } 620 | } 621 | }, 622 | "required": ["key", "value"] 623 | }, 624 | "numericArray": { 625 | "type": "array", 626 | "items": { 627 | "type": "number" 628 | } 629 | }, 630 | "transitTypeNotRequired": { 631 | "not": { 632 | "required": ["transitType"] 633 | } 634 | }, 635 | "groupingIdentifierNotRequired": { 636 | "not": { 637 | "required": ["groupingIdentifier"] 638 | } 639 | }, 640 | "beacon": { 641 | "title": "Beacon", 642 | "description": "Information about a location beacon.", 643 | "type": "object", 644 | "additionalProperties": false, 645 | "properties": { 646 | "major": { 647 | "title": "Major", 648 | "description": "Major identifier of a Bluetooth Low Energy location beacon.", 649 | "type": "integer", 650 | "minimum": 0, 651 | "maximum": 65535, 652 | "$comment": "16-bit unsigned integer" 653 | }, 654 | "minor": { 655 | "title": "Minor", 656 | "description": "Minor identifier of a Bluetooth Low Energy location beacon.", 657 | "type": "integer", 658 | "minimum": 0, 659 | "maximum": 65535, 660 | "$comment": "16-bit unsigned integer" 661 | }, 662 | "proximityUUID": { 663 | "title": "Proximity UUID", 664 | "description": "Unique identifier of a Bluetooth Low Energy location beacon.", 665 | "type": "string" 666 | }, 667 | "relevantText": { 668 | "title": "Relevant Text", 669 | "description": "Text displayed on the lock screen when the pass is currently relevant.", 670 | "type": "string", 671 | "examples": ["Store nearby on 1st and Main."] 672 | } 673 | }, 674 | "required": ["proximityUUID"] 675 | }, 676 | "location": { 677 | "title": "Location", 678 | "description": "Information about a location.", 679 | "type": "object", 680 | "additionalProperties": false, 681 | "properties": { 682 | "altitude": { 683 | "title": "Altitude", 684 | "description": "Altitude, in meters, of the location.", 685 | "type": "number" 686 | }, 687 | "latitude": { 688 | "title": "Latitude", 689 | "description": "Latitude, in degrees, of the location.", 690 | "type": "number", 691 | "minimum": -90, 692 | "maximum": 90 693 | }, 694 | "longitude": { 695 | "title": "Longitude", 696 | "description": "Longitude, in degrees, of the location.", 697 | "type": "number", 698 | "minimum": -180, 699 | "maximum": 180 700 | }, 701 | "relevantText": { 702 | "title": "Relevant Text", 703 | "description": "Text displayed on the lock screen when the pass is currently relevant.", 704 | "type": "string", 705 | "examples": ["Store nearby on 1st and Main."] 706 | } 707 | }, 708 | "required": ["latitude", "longitude"] 709 | }, 710 | "passStructure": { 711 | "title": "Pass Structure", 712 | "description": "Keys that define the structure of the pass.\nThese keys are used for all pass styles and partition the fields into the various parts of the pass.", 713 | "type": "object", 714 | "properties": { 715 | "auxiliaryFields": { 716 | "title": "Auxiliary Fields", 717 | "description": "Additional fields to be displayed on the front of the pass.", 718 | "type": "array", 719 | "items": { 720 | "$ref": "#/definitions/field" 721 | } 722 | }, 723 | "backFields": { 724 | "title": "Back Fields", 725 | "description": "Fields to be on the back of the pass.", 726 | "type": "array", 727 | "items": { 728 | "$ref": "#/definitions/field" 729 | } 730 | }, 731 | "headerFields": { 732 | "title": "Header Fields", 733 | "description": "Fields to be displayed in the header on the front of the pass.Use header fields sparingly; unlike all other fields, they remain visible when a stack of passes are displayed.", 734 | "type": "array", 735 | "items": { 736 | "$ref": "#/definitions/field" 737 | } 738 | }, 739 | "primaryFields": { 740 | "title": "Primary Fields", 741 | "description": "Fields to be displayed prominently on the front of the pass.", 742 | "type": "array", 743 | "items": { 744 | "$ref": "#/definitions/field" 745 | } 746 | }, 747 | "secondaryFields": { 748 | "title": "Secondary Fields", 749 | "description": "Fields to be displayed on the front of the pass.", 750 | "type": "array", 751 | "items": { 752 | "$ref": "#/definitions/field" 753 | } 754 | }, 755 | "transitType": { 756 | "title": "Transit Type", 757 | "description": "Type of transit.", 758 | "type": "string", 759 | "enum": [ 760 | "PKTransitTypeAir", 761 | "PKTransitTypeBoat", 762 | "PKTransitTypeBus", 763 | "PKTransitTypeGeneric", 764 | "PKTransitTypeTrain" 765 | ] 766 | } 767 | } 768 | }, 769 | "barcode": { 770 | "title": "Barcode", 771 | "description": "Information about a pass’s barcode.", 772 | "type": "object", 773 | "additionalProperties": false, 774 | "properties": { 775 | "altText": { 776 | "title": "Alternative Text", 777 | "description": "Text displayed near the barcode. For example, a human-readable version of the barcode data in case the barcode doesn’t scan.", 778 | "type": "string" 779 | }, 780 | "format": { 781 | "title": "Format", 782 | "description": "Barcode format. PKBarcodeFormatCode128 may only be used for dictionaries in the barcodes array.", 783 | "type": "string", 784 | "enum": [ 785 | "PKBarcodeFormatQR", 786 | "PKBarcodeFormatPDF417", 787 | "PKBarcodeFormatAztec", 788 | "PKBarcodeFormatCode128" 789 | ] 790 | }, 791 | "message": { 792 | "title": "Message", 793 | "description": "Message or payload to be displayed as a barcode.", 794 | "type": "string" 795 | }, 796 | "messageEncoding": { 797 | "title": "Message Encoding", 798 | "description": "Text encoding that is used to convert the message from the string representation to a data representation to render the barcode. The value is typically iso-8859-1, but you may use another encoding that is supported by your barcode scanning infrastructure.", 799 | "type": "string" 800 | } 801 | }, 802 | "required": ["format", "message", "messageEncoding"] 803 | }, 804 | "nfc": { 805 | "title": "NFC", 806 | "description": "Information about the NFC payload passed to an Apple Pay terminal.", 807 | "type": "object", 808 | "additionalProperties": false, 809 | "properties": { 810 | "message": { 811 | "title": "Message", 812 | "description": "The payload to be transmitted to the Apple Pay terminal. Must be 64 bytes or less. Messages longer than 64 bytes are truncated by the system.", 813 | "type": "string" 814 | }, 815 | "encryptionPublicKey": { 816 | "title": "Encryption Public Key", 817 | "description": " The public encryption key used by the Value Added Services protocol. Use a Base64 encoded X.509 SubjectPublicKeyInfo structure containing a ECDH public key for group P256.", 818 | "type": "string" 819 | } 820 | }, 821 | "required": ["message"] 822 | } 823 | }, 824 | "properties": { 825 | "description": { 826 | "title": "Description", 827 | "description": "Brief description of the pass, used by the iOS accessibility technologies.\nDon’t try to include all of the data on the pass in its description, just include enough detail to distinguish passes of the same type.\n Localizable.", 828 | "type": "string" 829 | }, 830 | "formatVersion": { 831 | "title": "Format Version", 832 | "description": "Version of the file format.", 833 | "const": 1 834 | }, 835 | "organizationName": { 836 | "title": "Organization Name", 837 | "description": "Display name of the organization that originated and signed the pass.\n Localizable.", 838 | "type": "string" 839 | }, 840 | "passTypeIdentifier": { 841 | "title": "Pass Type Identifier", 842 | "description": "Pass type identifier, as issued by Apple. The value must correspond with your signing certificate.", 843 | "type": "string" 844 | }, 845 | "serialNumber": { 846 | "title": "Serial Number", 847 | "description": "Serial number that uniquely identifies the pass. No two passes with the same pass type identifier may have the same serial number.", 848 | "type": "string" 849 | }, 850 | "teamIdentifier": { 851 | "title": "Team Identifier", 852 | "description": "Team identifier of the organization that originated and signed the pass, as issued by Apple.", 853 | "type": "string" 854 | }, 855 | "appLaunchURL": { 856 | "title": "App Launch URL", 857 | "description": "A URL to be passed to the associated app when launching it. The app receives this URL in the application:didFinishLaunchingWithOptions: and application:openURL:options: methods of its app delegate.", 858 | "type": "string", 859 | "format": "iri" 860 | }, 861 | "associatedStoreIdentifiers": { 862 | "title": "Associated Store Identifiers", 863 | "description": "A list of iTunes Store item identifiers for the associated apps.\nOnly one item in the list is used—the first item identifier for an app compatible with the current device. If the app is not installed, the link opens the App Store and shows the app. If the app is already installed, the link launches the app.", 864 | "$ref": "#/definitions/numericArray" 865 | }, 866 | "userInfo": { 867 | "title": "User Info", 868 | "description": "Custom information for companion apps. This data is not displayed to the user.\nFor example, a pass for a cafe could include information about the user’s favorite drink and sandwich in a machine-readable form for the companion app to read, making it easy to place an order for “the usual” from the app.\nAvailable in iOS 7.0.", 869 | "type": "object" 870 | }, 871 | "expirationDate": { 872 | "title": "Expiration Date", 873 | "description": "Date and time when the pass expires.\nAvailable in iOS 7.0.", 874 | "$ref": "#/definitions/w3cDate" 875 | }, 876 | "voided": { 877 | "title": "Voided", 878 | "description": "Indicates that the pass is void—for example, a one time use coupon that has been redeemed.\nAvailable in iOS 7.0.", 879 | "type": "boolean", 880 | "default": false 881 | }, 882 | "beacons": { 883 | "title": "Beacons", 884 | "description": "Beacons marking locations where the pass is relevant.\nAvailable in iOS 7.0.", 885 | "type": "array", 886 | "items": { 887 | "$ref": "#/definitions/beacon" 888 | } 889 | }, 890 | "locations": { 891 | "title": "Locations", 892 | "description": "Locations where the pass is relevant. For example, the location of your store.", 893 | "type": "array", 894 | "items": { 895 | "$ref": "#/definitions/location" 896 | } 897 | }, 898 | "maxDistance": { 899 | "title": "Maximum Distance", 900 | "description": "Maximum distance in meters from a relevant latitude and longitude that the pass is relevant. This number is compared to the pass’s default distance and the smaller value is used.\nAvailable in iOS 7.0.", 901 | "type": "number" 902 | }, 903 | "relevantDate": { 904 | "title": "Relevant Date", 905 | "description": "Date and time when the pass becomes relevant. For example, the start time of a movie.\nRecommended for event tickets and boarding passes.", 906 | "$ref": "#/definitions/w3cDate" 907 | }, 908 | "boardingPass": { 909 | "title": "Boarding Pass", 910 | "description": "Information specific to a boarding pass.", 911 | "$ref": "#/definitions/passStructure", 912 | "required": ["transitType"] 913 | }, 914 | "coupon": { 915 | "title": "Coupon", 916 | "description": "Information specific to a coupon.", 917 | "$ref": "#/definitions/passStructure", 918 | "anyOf": [{ "$ref": "#/definitions/transitTypeNotRequired" }] 919 | }, 920 | "eventTicket": { 921 | "title": "Event Ticket", 922 | "description": "Information specific to an event ticket.", 923 | "$ref": "#/definitions/passStructure", 924 | "anyOf": [{ "$ref": "#/definitions/transitTypeNotRequired" }] 925 | }, 926 | "generic": { 927 | "title": "Generic Pass", 928 | "description": "Information specific to a generic pass.", 929 | "$ref": "#/definitions/passStructure", 930 | "anyOf": [{ "$ref": "#/definitions/transitTypeNotRequired" }] 931 | }, 932 | "storeCard": { 933 | "title": "Store Card", 934 | "description": "Information specific to a store card.", 935 | "$ref": "#/definitions/passStructure", 936 | "anyOf": [{ "$ref": "#/definitions/transitTypeNotRequired" }] 937 | }, 938 | "barcode": { 939 | "title": "Barcode", 940 | "description": "Information specific to the pass’s barcode.\nDeprecated in iOS 9.0 and later; use barcodes instead.", 941 | "$ref": "#/definitions/barcode" 942 | }, 943 | "barcodes": { 944 | "title": "Barcodes", 945 | "description": "Information specific to the pass’s barcode. The system uses the first valid barcode dictionary in the array. Additional dictionaries can be added as fallbacks.\nAvailable only in iOS 9.0 and later.", 946 | "type": "array", 947 | "items": { 948 | "$ref": "#/definitions/barcode" 949 | } 950 | }, 951 | "backgroundColor": { 952 | "title": "Background Color", 953 | "description": "Background color of the pass, specified as an CSS-style RGB triple.", 954 | "$ref": "#/definitions/color", 955 | "examples": ["rgb(23, 187, 82)"] 956 | }, 957 | "foregroundColor": { 958 | "title": "Foreground Color", 959 | "description": "Foreground color of the pass, specified as a CSS-style RGB triple", 960 | "$ref": "#/definitions/color", 961 | "examples": ["rgb(100, 10, 110)"] 962 | }, 963 | "groupingIdentifier": { 964 | "title": "Grouping Identifier", 965 | "description": "Identifier used to group related passes. If a grouping identifier is specified, passes with the same style, pass type identifier, and grouping identifier are displayed as a group. Otherwise, passes are grouped automatically.\nUse this to group passes that are tightly related, such as the boarding passes for different connections of the same trip.\nAvailable in iOS 7.0.", 966 | "type": "string" 967 | }, 968 | "labelColor": { 969 | "title": "Label Color", 970 | "description": "olor of the label text, specified as a CSS-style RGB triple.\nIf omitted, the label color is determined automatically.", 971 | "$ref": "#/definitions/color", 972 | "examples": ["rgb(255, 255, 255)"] 973 | }, 974 | "logoText": { 975 | "title": "Logo Text", 976 | "description": "Text displayed next to the logo on the pass.\nLocalizable.", 977 | "type": "string" 978 | }, 979 | "suppressStripShine": { 980 | "title": "Suppress Strip Shine", 981 | "description": "If true, the strip image is displayed without a shine effect. The default value prior to iOS 7.0 is false. In iOS 7.0, a shine effect is never applied, and this key is deprecated.", 982 | "type": "boolean", 983 | "default": false 984 | }, 985 | "authenticationToken": { 986 | "title": "Authentication Token", 987 | "description": "The authentication token to use with the web service.", 988 | "type": "string", 989 | "minLength": 16 990 | }, 991 | "webServiceURL": { 992 | "title": "Web Service URL", 993 | "description": "The URL of a web service that conforms to the API described in PassKit Web Service Reference. The web service must use the HTTPS protocol; the leading https:// is included in the value of this key. On devices configured for development, there is UI in Settings to allow HTTP web services.", 994 | "type": "string", 995 | "pattern": "^https://" 996 | }, 997 | "nfc": { 998 | "title": "NFC", 999 | "description": "Information used for Value Added Service Protocol transactions.\nAvailable in iOS 9.0.", 1000 | "$ref": "#/definitions/nfc" 1001 | } 1002 | }, 1003 | "dependencies": { 1004 | "appLaunchURL": { "required": ["associatedStoreIdentifiers"] }, 1005 | "coupon": { "$ref": "#/definitions/groupingIdentifierNotRequired" }, 1006 | "generic": { "$ref": "#/definitions/groupingIdentifierNotRequired" }, 1007 | "storeCard": { "$ref": "#/definitions/groupingIdentifierNotRequired" } 1008 | }, 1009 | "required": [ 1010 | "description", 1011 | "formatVersion", 1012 | "organizationName", 1013 | "passTypeIdentifier", 1014 | "serialNumber" 1015 | ] 1016 | } 1017 | --------------------------------------------------------------------------------