{"openapi":"3.0.3","info":{"title":"WalletPassAPI","version":"1","description":"Apple Wallet and Google Wallet passes from one API. Guides: /docs."},"servers":[{"url":"https://api.walletpassapi.com"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Your workspace's API key (wpk_…), from Settings."}},"schemas":{"Pass":{"type":"object","properties":{"style":{"type":"string","enum":["generic","loyalty","coupon","event"],"description":"The kind of pass. It sets the layout and how large the main field is. Left out, it follows from the images: a strip image makes a store card."},"barcodeValue":{"type":"string","maxLength":1024,"nullable":true,"description":"What the barcode holds. Null or empty means no barcode."},"barcodeFormat":{"type":"string","enum":["QR","PDF417","Aztec","Code128"],"description":"The barcode's kind. Needed when there's a barcodeValue."},"barcodeAltText":{"type":"string","maxLength":128,"description":"Text under the barcode. Left out, it's the value; empty hides it."},"logoText":{"type":"string","maxLength":64,"description":"The name beside the logo, top left."},"description":{"type":"string","maxLength":128,"description":"The title of the pass's details page in Apple Wallet, read aloud by VoiceOver, and the line under the pass name on its install page. Left out, the logo text."},"organizationName":{"type":"string","minLength":1,"maxLength":64,"description":"Your business's name: on the lock screen, the share sheet and the pass's details."},"headerFields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64},"label":{"type":"string","maxLength":64},"value":{"type":"string","maxLength":1024},"changeMessage":{"type":"string","maxLength":128}},"required":["key","value"],"additionalProperties":false},"maxItems":10,"default":[],"description":"Top right, visible while the pass is stacked in Wallet. Keep it to one short value."},"primaryFields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64},"label":{"type":"string","maxLength":64},"value":{"type":"string","maxLength":1024},"changeMessage":{"type":"string","maxLength":128}},"required":["key","value"],"additionalProperties":false},"maxItems":10,"default":[],"description":"The main value, shown large: points, a balance, an event's name."},"secondaryFields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64},"label":{"type":"string","maxLength":64},"value":{"type":"string","maxLength":1024},"changeMessage":{"type":"string","maxLength":128}},"required":["key","value"],"additionalProperties":false},"maxItems":10,"default":[],"description":"The row under the main value."},"backFields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64},"label":{"type":"string","maxLength":64},"value":{"type":"string","maxLength":1024},"changeMessage":{"type":"string","maxLength":128}},"required":["key","value"],"additionalProperties":false},"maxItems":10,"default":[],"description":"On the back of the Apple pass and in the Google pass's details: terms, contact details, links."},"footerFields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64},"label":{"type":"string","maxLength":64},"value":{"type":"string","maxLength":1024},"changeMessage":{"type":"string","maxLength":128}},"required":["key","value"],"additionalProperties":false},"maxItems":2,"default":[],"description":"The bottom row: the poster layout's footer, and the auxiliary row elsewhere."},"auxiliaryFields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64},"label":{"type":"string","maxLength":64},"value":{"type":"string","maxLength":1024},"changeMessage":{"type":"string","maxLength":128}},"required":["key","value"],"additionalProperties":false},"maxItems":4,"description":"The row under that, on the classic layouts."},"locations":{"type":"array","items":{"type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"altitude":{"type":"number"},"relevantText":{"type":"string","maxLength":128}},"required":["latitude","longitude"],"additionalProperties":false},"maxItems":10,"default":[],"description":"Places where the pass appears on the lock screen when the holder is near."},"featuredActions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"type":{"type":"string","enum":["viewSchedule","watchTrailer","listenToMusic","call","place","addToBalance","order","shop","membershipBenefits","bookAppointment","bookCar","bookFlight","bookStay","viewOffersRewards"]},"url":{"type":"string"},"placeIdentifier":{"type":"string","pattern":"^[A-Za-z0-9]{4,64}$"}},"required":["id","type"],"additionalProperties":false},"maxItems":2,"default":[],"description":"Buttons on the pass, such as call or book: up to 2."},"sharingProhibited":{"type":"boolean","default":true,"description":"Hides Apple Wallet's share button."},"colorPreset":{"type":"string","enum":["dark","blue","green","red","purple","orange"],"description":"A ready-made background colour."},"color":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$","description":"Your own background colour. Text colours are chosen to stay readable on it."},"expirationDays":{"type":"integer","minimum":1,"maximum":3650,"description":"Expires this many days after it's issued."},"expiresAt":{"type":"string","format":"date-time","description":"Expires at this moment, at most 10 years ahead. It wins over expirationDays."},"logoURL":{"type":"string","description":"An image: the reference from [Upload an image](/docs/reference/images/upload) with type=logo. Top left, beside the logo text. Upload 660 × 660 pixels, or that shape."},"wideLogoURL":{"type":"string","description":"An image: the reference from [Upload an image](/docs/reference/images/upload) with type=wideLogo. Google Wallet only: a wide logo, shown top left in place of the square one. Upload 1280 × 400 pixels, or that shape."},"thumbnailURL":{"type":"string","description":"An image: the reference from [Upload an image](/docs/reference/images/upload) with type=thumbnail. Beside the fields, on event tickets and generic passes. Upload 270 × 270 pixels, or that shape."},"stripURL":{"type":"string","description":"An image: the reference from [Upload an image](/docs/reference/images/upload) with type=strip. Behind the main value (it makes a store card), and Google Wallet's hero image when there's no googleHeroURL. Upload 1125 × 369 pixels, or that shape."},"backgroundURL":{"type":"string","description":"An image: the reference from [Upload an image](/docs/reference/images/upload) with type=background. Apple Wallet only: the poster layout's artwork. Upload 1074 × 1344 pixels, or that shape."},"iconURL":{"type":"string","description":"An image: the reference from [Upload an image](/docs/reference/images/upload) with type=icon. Shown in notifications and on the lock screen. Upload 87 × 87 pixels, or that shape."},"googleHeroURL":{"type":"string","description":"An image: the reference from [Upload an image](/docs/reference/images/upload) with type=googleHero. Google Wallet only: the hero image, across the card under its fields. Google recommends a nearly square one; without it, Google Wallet shows the strip. Upload 1032 × 812 pixels, or that shape."},"metadata":{"type":"object","additionalProperties":{},"description":"Your own data, kept with the pass and searchable. Never shown on it."},"externalId":{"type":"string","maxLength":256,"description":"Your own ID for the pass, such as a member number. Unique in the workspace; find the pass by it."},"latestMessage":{"type":"object","properties":{"label":{"type":"string","maxLength":64},"value":{"type":"string","minLength":1,"maxLength":257}},"required":["value"],"additionalProperties":false,"description":"The Latest message field on the back. Every pass has one; it's normally set by sending a notification. Leave it out to keep it."}},"required":["organizationName"],"additionalProperties":false},"CreatePass":{"type":"object","properties":{"style":{"type":"string","enum":["generic","loyalty","coupon","event"],"description":"The kind of pass. It sets the layout and how large the main field is. Left out, it follows from the images: a strip image makes a store card."},"barcodeValue":{"type":"string","maxLength":1024,"nullable":true,"description":"What the barcode holds. Null or empty means no barcode."},"barcodeFormat":{"type":"string","enum":["QR","PDF417","Aztec","Code128"],"description":"The barcode's kind. Needed when there's a barcodeValue."},"barcodeAltText":{"type":"string","maxLength":128,"description":"Text under the barcode. Left out, it's the value; empty hides it."},"logoText":{"type":"string","maxLength":64,"description":"The name beside the logo, top left."},"description":{"type":"string","maxLength":128,"description":"The title of the pass's details page in Apple Wallet, read aloud by VoiceOver, and the line under the pass name on its install page. Left out, the logo text."},"organizationName":{"type":"string","minLength":1,"maxLength":64,"description":"Your business's name: on the lock screen, the share sheet and the pass's details."},"headerFields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64},"label":{"type":"string","maxLength":64},"value":{"type":"string","maxLength":1024},"changeMessage":{"type":"string","maxLength":128}},"required":["key","value"],"additionalProperties":false},"maxItems":10,"default":[],"description":"Top right, visible while the pass is stacked in Wallet. Keep it to one short value."},"primaryFields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64},"label":{"type":"string","maxLength":64},"value":{"type":"string","maxLength":1024},"changeMessage":{"type":"string","maxLength":128}},"required":["key","value"],"additionalProperties":false},"maxItems":10,"default":[],"description":"The main value, shown large: points, a balance, an event's name."},"secondaryFields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64},"label":{"type":"string","maxLength":64},"value":{"type":"string","maxLength":1024},"changeMessage":{"type":"string","maxLength":128}},"required":["key","value"],"additionalProperties":false},"maxItems":10,"default":[],"description":"The row under the main value."},"backFields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64},"label":{"type":"string","maxLength":64},"value":{"type":"string","maxLength":1024},"changeMessage":{"type":"string","maxLength":128}},"required":["key","value"],"additionalProperties":false},"maxItems":10,"default":[],"description":"On the back of the Apple pass and in the Google pass's details: terms, contact details, links."},"footerFields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64},"label":{"type":"string","maxLength":64},"value":{"type":"string","maxLength":1024},"changeMessage":{"type":"string","maxLength":128}},"required":["key","value"],"additionalProperties":false},"maxItems":2,"default":[],"description":"The bottom row: the poster layout's footer, and the auxiliary row elsewhere."},"auxiliaryFields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64},"label":{"type":"string","maxLength":64},"value":{"type":"string","maxLength":1024},"changeMessage":{"type":"string","maxLength":128}},"required":["key","value"],"additionalProperties":false},"maxItems":4,"description":"The row under that, on the classic layouts."},"locations":{"type":"array","items":{"type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"altitude":{"type":"number"},"relevantText":{"type":"string","maxLength":128}},"required":["latitude","longitude"],"additionalProperties":false},"maxItems":10,"default":[],"description":"Places where the pass appears on the lock screen when the holder is near."},"featuredActions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"type":{"type":"string","enum":["viewSchedule","watchTrailer","listenToMusic","call","place","addToBalance","order","shop","membershipBenefits","bookAppointment","bookCar","bookFlight","bookStay","viewOffersRewards"]},"url":{"type":"string"},"placeIdentifier":{"type":"string","pattern":"^[A-Za-z0-9]{4,64}$"}},"required":["id","type"],"additionalProperties":false},"maxItems":2,"default":[],"description":"Buttons on the pass, such as call or book: up to 2."},"sharingProhibited":{"type":"boolean","default":true,"description":"Hides Apple Wallet's share button."},"colorPreset":{"type":"string","enum":["dark","blue","green","red","purple","orange"],"description":"A ready-made background colour."},"color":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$","description":"Your own background colour. Text colours are chosen to stay readable on it."},"expirationDays":{"type":"integer","minimum":1,"maximum":3650,"description":"Expires this many days after it's issued."},"expiresAt":{"type":"string","format":"date-time","description":"Expires at this moment, at most 10 years ahead. It wins over expirationDays."},"logoURL":{"type":"string","description":"An image: the reference from [Upload an image](/docs/reference/images/upload) with type=logo. Top left, beside the logo text. Upload 660 × 660 pixels, or that shape."},"wideLogoURL":{"type":"string","description":"An image: the reference from [Upload an image](/docs/reference/images/upload) with type=wideLogo. Google Wallet only: a wide logo, shown top left in place of the square one. Upload 1280 × 400 pixels, or that shape."},"thumbnailURL":{"type":"string","description":"An image: the reference from [Upload an image](/docs/reference/images/upload) with type=thumbnail. Beside the fields, on event tickets and generic passes. Upload 270 × 270 pixels, or that shape."},"stripURL":{"type":"string","description":"An image: the reference from [Upload an image](/docs/reference/images/upload) with type=strip. Behind the main value (it makes a store card), and Google Wallet's hero image when there's no googleHeroURL. Upload 1125 × 369 pixels, or that shape."},"backgroundURL":{"type":"string","description":"An image: the reference from [Upload an image](/docs/reference/images/upload) with type=background. Apple Wallet only: the poster layout's artwork. Upload 1074 × 1344 pixels, or that shape."},"iconURL":{"type":"string","description":"An image: the reference from [Upload an image](/docs/reference/images/upload) with type=icon. Shown in notifications and on the lock screen. Upload 87 × 87 pixels, or that shape."},"googleHeroURL":{"type":"string","description":"An image: the reference from [Upload an image](/docs/reference/images/upload) with type=googleHero. Google Wallet only: the hero image, across the card under its fields. Google recommends a nearly square one; without it, Google Wallet shows the strip. Upload 1032 × 812 pixels, or that shape."},"metadata":{"type":"object","additionalProperties":{},"description":"Your own data, kept with the pass and searchable. Never shown on it."},"externalId":{"type":"string","maxLength":256,"description":"Your own ID for the pass, such as a member number. Unique in the workspace; find the pass by it."},"latestMessage":{"type":"object","properties":{"label":{"type":"string","maxLength":64},"value":{"type":"string","minLength":1,"maxLength":257}},"required":["value"],"additionalProperties":false,"description":"The Latest message field on the back. Every pass has one; it's normally set by sending a notification. Leave it out to keep it."},"issuer":{"type":"string","description":"Which of your issuers signs it, by slug (org:<slug> for your organization's). Left out, your default."},"data":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":1024},{"type":"number"}]},"description":"Values for the placeholders in the pass's text."},"holder":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"email":{"type":"string","maxLength":254}},"additionalProperties":false,"description":"The holder's name and email."}},"required":["organizationName"],"additionalProperties":false},"CreatePassFromTemplate":{"type":"object","required":["template"],"additionalProperties":false,"properties":{"template":{"type":"string","description":"The template's slug (org:<slug> for your organization's)."},"data":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":1024},{"type":"number"}]},"description":"Values for the placeholders in the pass's text."},"holder":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"email":{"type":"string","maxLength":254}},"additionalProperties":false,"description":"The holder's name and email."},"externalId":{"type":"string","maxLength":256,"description":"Your own ID for the pass, such as a member number. Unique in the workspace; find the pass by it."},"issuer":{"type":"string","description":"Which of your issuers signs it, by slug (org:<slug> for your organization's). Left out, your default."}}},"UpdatePass":{"type":"object","properties":{"style":{"type":"string","enum":["generic","loyalty","coupon","event"],"description":"The kind of pass. It sets the layout and how large the main field is. Left out, it follows from the images: a strip image makes a store card."},"barcodeValue":{"type":"string","maxLength":1024,"nullable":true,"description":"What the barcode holds. Null or empty means no barcode."},"barcodeFormat":{"type":"string","enum":["QR","PDF417","Aztec","Code128"],"description":"The barcode's kind. Needed when there's a barcodeValue."},"barcodeAltText":{"type":"string","maxLength":128,"description":"Text under the barcode. Left out, it's the value; empty hides it."},"logoText":{"type":"string","maxLength":64,"description":"The name beside the logo, top left."},"description":{"type":"string","maxLength":128,"description":"The title of the pass's details page in Apple Wallet, read aloud by VoiceOver, and the line under the pass name on its install page. Left out, the logo text."},"organizationName":{"type":"string","minLength":1,"maxLength":64,"description":"Your business's name: on the lock screen, the share sheet and the pass's details."},"headerFields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64},"label":{"type":"string","maxLength":64},"value":{"type":"string","maxLength":1024},"changeMessage":{"type":"string","maxLength":128}},"required":["key","value"],"additionalProperties":false},"maxItems":10,"default":[],"description":"Top right, visible while the pass is stacked in Wallet. Keep it to one short value."},"primaryFields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64},"label":{"type":"string","maxLength":64},"value":{"type":"string","maxLength":1024},"changeMessage":{"type":"string","maxLength":128}},"required":["key","value"],"additionalProperties":false},"maxItems":10,"default":[],"description":"The main value, shown large: points, a balance, an event's name."},"secondaryFields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64},"label":{"type":"string","maxLength":64},"value":{"type":"string","maxLength":1024},"changeMessage":{"type":"string","maxLength":128}},"required":["key","value"],"additionalProperties":false},"maxItems":10,"default":[],"description":"The row under the main value."},"backFields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64},"label":{"type":"string","maxLength":64},"value":{"type":"string","maxLength":1024},"changeMessage":{"type":"string","maxLength":128}},"required":["key","value"],"additionalProperties":false},"maxItems":10,"default":[],"description":"On the back of the Apple pass and in the Google pass's details: terms, contact details, links."},"footerFields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64},"label":{"type":"string","maxLength":64},"value":{"type":"string","maxLength":1024},"changeMessage":{"type":"string","maxLength":128}},"required":["key","value"],"additionalProperties":false},"maxItems":2,"default":[],"description":"The bottom row: the poster layout's footer, and the auxiliary row elsewhere."},"auxiliaryFields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64},"label":{"type":"string","maxLength":64},"value":{"type":"string","maxLength":1024},"changeMessage":{"type":"string","maxLength":128}},"required":["key","value"],"additionalProperties":false},"maxItems":4,"description":"The row under that, on the classic layouts."},"locations":{"type":"array","items":{"type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"altitude":{"type":"number"},"relevantText":{"type":"string","maxLength":128}},"required":["latitude","longitude"],"additionalProperties":false},"maxItems":10,"default":[],"description":"Places where the pass appears on the lock screen when the holder is near."},"featuredActions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"type":{"type":"string","enum":["viewSchedule","watchTrailer","listenToMusic","call","place","addToBalance","order","shop","membershipBenefits","bookAppointment","bookCar","bookFlight","bookStay","viewOffersRewards"]},"url":{"type":"string"},"placeIdentifier":{"type":"string","pattern":"^[A-Za-z0-9]{4,64}$"}},"required":["id","type"],"additionalProperties":false},"maxItems":2,"default":[],"description":"Buttons on the pass, such as call or book: up to 2."},"sharingProhibited":{"type":"boolean","default":true,"description":"Hides Apple Wallet's share button."},"colorPreset":{"type":"string","enum":["dark","blue","green","red","purple","orange"],"description":"A ready-made background colour."},"color":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$","description":"Your own background colour. Text colours are chosen to stay readable on it."},"expirationDays":{"type":"integer","minimum":1,"maximum":3650,"description":"Expires this many days after it's issued."},"expiresAt":{"type":"string","format":"date-time","description":"Expires at this moment, at most 10 years ahead. It wins over expirationDays."},"logoURL":{"type":"string","description":"An image: the reference from [Upload an image](/docs/reference/images/upload) with type=logo. Top left, beside the logo text. Upload 660 × 660 pixels, or that shape."},"wideLogoURL":{"type":"string","description":"An image: the reference from [Upload an image](/docs/reference/images/upload) with type=wideLogo. Google Wallet only: a wide logo, shown top left in place of the square one. Upload 1280 × 400 pixels, or that shape."},"thumbnailURL":{"type":"string","description":"An image: the reference from [Upload an image](/docs/reference/images/upload) with type=thumbnail. Beside the fields, on event tickets and generic passes. Upload 270 × 270 pixels, or that shape."},"stripURL":{"type":"string","description":"An image: the reference from [Upload an image](/docs/reference/images/upload) with type=strip. Behind the main value (it makes a store card), and Google Wallet's hero image when there's no googleHeroURL. Upload 1125 × 369 pixels, or that shape."},"backgroundURL":{"type":"string","description":"An image: the reference from [Upload an image](/docs/reference/images/upload) with type=background. Apple Wallet only: the poster layout's artwork. Upload 1074 × 1344 pixels, or that shape."},"iconURL":{"type":"string","description":"An image: the reference from [Upload an image](/docs/reference/images/upload) with type=icon. Shown in notifications and on the lock screen. Upload 87 × 87 pixels, or that shape."},"googleHeroURL":{"type":"string","description":"An image: the reference from [Upload an image](/docs/reference/images/upload) with type=googleHero. Google Wallet only: the hero image, across the card under its fields. Google recommends a nearly square one; without it, Google Wallet shows the strip. Upload 1032 × 812 pixels, or that shape."},"metadata":{"type":"object","additionalProperties":{},"description":"Your own data, kept with the pass and searchable. Never shown on it."},"externalId":{"type":"string","maxLength":256,"description":"Your own ID for the pass, such as a member number. Unique in the workspace; find the pass by it."},"latestMessage":{"type":"object","properties":{"label":{"type":"string","maxLength":64},"value":{"type":"string","minLength":1,"maxLength":257}},"required":["value"],"additionalProperties":false,"description":"The Latest message field on the back. Every pass has one; it's normally set by sending a notification. Leave it out to keep it."},"issuer":{"type":"string","description":"Which of your issuers signs it, by slug (org:<slug> for your organization's). Left out, your default."},"data":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":1024},{"type":"number"}]},"description":"Values for the placeholders in the pass's text."},"holder":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"email":{"type":"string","maxLength":254}},"additionalProperties":false,"description":"The holder's name and email."},"unlinkTemplate":{"type":"boolean","description":"Replace the design of a pass made from a template (it's no longer updated by it)."}},"required":[],"additionalProperties":false,"description":"The pass's new fields, or only data and/or holder to fill its stored design again."},"CreatedPass":{"type":"object","required":["serialNumber","status","issuer","shareUrl","createdAt","platforms"],"properties":{"serialNumber":{"type":"string"},"status":{"type":"string","enum":["active"]},"issuer":{"type":"string","description":"The set that signed it (platform: the test credentials)."},"shareUrl":{"type":"string","description":"The install page."},"createdAt":{"type":"string","format":"date-time"},"platforms":{"type":"object","description":"Whether each wallet's pass was built: built, or no_credential.","properties":{"apple":{"type":"string"},"google":{"type":"string"}}},"applePass":{"type":"string","description":"The signed .pkpass, base64, when it was built."},"googleSaveUrl":{"type":"string","description":"When it was built."}}},"UpdatedPass":{"type":"object","properties":{"serialNumber":{"type":"string"},"version":{"type":"integer"},"lastUpdated":{"type":"string","format":"date-time"},"unchanged":{"type":"boolean","description":"Nothing changed: no new version, no push, no usage."},"notified":{"type":"boolean"},"notifiedDevices":{"type":"integer"},"platforms":{"type":"object","properties":{"apple":{"type":"string"},"google":{"type":"string"}}}}},"PassList":{"type":"object","properties":{"passes":{"type":"array","items":{"type":"object","additionalProperties":true}},"nextCursor":{"type":"string","nullable":true}}},"Template":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"slug":{"type":"string"},"design":{"type":"object","additionalProperties":{}},"placeholders":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"label":{"type":"string","minLength":1,"maxLength":60},"type":{"type":"string","enum":["text","number","date"],"default":"text"},"required":{"type":"boolean","default":true},"default":{"type":"string","maxLength":1024}},"required":["key"],"additionalProperties":false},"maxItems":50,"default":[]},"holderRequired":{"type":"object","properties":{"name":{"type":"boolean","default":false},"email":{"type":"boolean","default":false}},"additionalProperties":false,"default":{}},"issuer":{"type":"string","minLength":1,"nullable":true,"default":null},"installHeadline":{"type":"string","maxLength":120,"nullable":true,"default":null},"updatePasses":{"type":"string","enum":["none","all"]},"fill":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":1024},{"type":"number"}]}},"sharedWith":{"type":"string","enum":["all","selected"]},"workspaceIds":{"type":"array","items":{"type":"string","minLength":1},"maxItems":500}},"required":["name","design"],"additionalProperties":false,"description":"A pass design with {{placeholders}}, and their rules."},"TemplatePatch":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"installHeadline":{"type":"string","maxLength":120,"nullable":true},"sharedWith":{"type":"string","enum":["all","selected"]},"workspaceIds":{"type":"array","items":{"type":"string","minLength":1},"maxItems":500}},"additionalProperties":false},"TemplateAnswer":{"type":"object","properties":{"template":{"type":"object","additionalProperties":true},"update":{"type":"object","nullable":true,"additionalProperties":true,"description":"The latest update of its passes."},"preview":{"type":"object","nullable":true,"additionalProperties":true,"description":"What updating its passes would cost now."},"changed":{"type":"boolean","description":"PUT: whether the design or rules changed (a new version)."}}},"BroadcastFilters":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"status":{"type":"string","enum":["active","revoked"]},"issuer":{"type":"string","minLength":1,"maxLength":40},"createdFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}(T[\\d:.]+(Z|[+-]\\d{2}:\\d{2})?)?$"},"createdTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}(T[\\d:.]+(Z|[+-]\\d{2}:\\d{2})?)?$"},"appleInstalled":{"type":"string","enum":["true","false"]},"googleSaved":{"type":"string","enum":["true","false"]},"template":{"type":"string","minLength":1,"maxLength":40},"templateOutdated":{"type":"string","enum":["true","false"]}},"additionalProperties":false,"description":"The same search and filters as List passes. Empty: every active pass."},"Broadcast":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"},"status":{"type":"string","enum":["sending","completed","stopped"]},"total":{"type":"integer"},"sent":{"type":"integer"},"skipped":{"type":"integer"},"failed":{"type":"integer"},"lastError":{"type":"string","nullable":true},"filters":{"$ref":"#/components/schemas/BroadcastFilters"},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time","nullable":true}}},"Asset":{"type":"object","properties":{"assetId":{"type":"string"},"type":{"type":"string","enum":["icon","logo","strip","background","thumbnail","wideLogo","googleHero"]},"reference":{"type":"string","description":"Put this in the pass's image field: asset:<assetId>."},"width":{"type":"integer"},"height":{"type":"integer"}}},"Error":{"type":"object","properties":{"error":{"type":"object","required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"field":{"type":"string"},"requestId":{"type":"string"}}}}}}},"paths":{"/v1/passes":{"post":{"summary":"Create a pass","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Retrying with the same key returns the first answer and changes nothing again."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CreatePass"},{"$ref":"#/components/schemas/CreatePassFromTemplate"}]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedPass"}}}},"400":{"description":"A field is wrong, unknown, or a placeholder unfilled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The Idempotency-Key was used for a different request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No such issuer or template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"This month's operations are used up","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List passes","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Text in the pass, its serial number or external ID, or its holder's name or email."},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"active or revoked."},{"name":"issuer","in":"query","required":false,"schema":{"type":"string"},"description":"An issuer's slug."},{"name":"createdFrom","in":"query","required":false,"schema":{"type":"string"},"description":"From this day (YYYY-MM-DD)."},{"name":"createdTo","in":"query","required":false,"schema":{"type":"string"},"description":"To the end of this day (YYYY-MM-DD)."},{"name":"appleInstalled","in":"query","required":false,"schema":{"type":"boolean"},"description":"On an Apple device, or not."},{"name":"googleSaved","in":"query","required":false,"schema":{"type":"boolean"},"description":"Saved to Google Wallet, or not."},{"name":"template","in":"query","required":false,"schema":{"type":"string"},"description":"Made from this template."},{"name":"templateOutdated","in":"query","required":false,"schema":{"type":"boolean"},"description":"On an older version of its template."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"nextCursor from the page before."},{"name":"page","in":"query","required":false,"schema":{"type":"integer"},"description":"A numbered page (1 to 10,000) instead of a cursor; the answer adds total and page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"Newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PassList"}}}}}}},"/v1/passes/{serial}":{"get":{"summary":"Get a pass","parameters":[{"name":"serial","in":"path","required":true,"schema":{"type":"string"},"description":"The pass's serialNumber."}],"responses":{"200":{"description":"Its status, install state and links"},"404":{"description":"No such pass","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"summary":"Update a pass","parameters":[{"name":"serial","in":"path","required":true,"schema":{"type":"string"},"description":"The pass's serialNumber."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Retrying with the same key returns the first answer and changes nothing again."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePass"}}}},"responses":{"200":{"description":"Updated; installed passes refresh","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatedPass"}}}},"400":{"description":"A field is wrong or unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such pass","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Made from a template: send unlinkTemplate to replace its design","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Revoke a pass","parameters":[{"name":"serial","in":"path","required":true,"schema":{"type":"string"},"description":"The pass's serialNumber."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Retrying with the same key returns the first answer and changes nothing again."}],"responses":{"200":{"description":"Revoked: it can't be used or updated again"},"404":{"description":"No such pass","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/passes/export":{"get":{"summary":"Export passes as CSV","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Text in the pass, its serial number or external ID, or its holder's name or email."},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"active or revoked."},{"name":"issuer","in":"query","required":false,"schema":{"type":"string"},"description":"An issuer's slug."},{"name":"createdFrom","in":"query","required":false,"schema":{"type":"string"},"description":"From this day (YYYY-MM-DD)."},{"name":"createdTo","in":"query","required":false,"schema":{"type":"string"},"description":"To the end of this day (YYYY-MM-DD)."},{"name":"appleInstalled","in":"query","required":false,"schema":{"type":"boolean"},"description":"On an Apple device, or not."},{"name":"googleSaved","in":"query","required":false,"schema":{"type":"boolean"},"description":"Saved to Google Wallet, or not."},{"name":"template","in":"query","required":false,"schema":{"type":"string"},"description":"Made from this template."},{"name":"templateOutdated","in":"query","required":false,"schema":{"type":"boolean"},"description":"On an older version of its template."},{"name":"page","in":"query","required":false,"schema":{"type":"integer"},"description":"A numbered page (1 to 10,000) instead of a cursor; the answer adds total and page."}],"responses":{"200":{"description":"One row per pass","content":{"text/csv":{"schema":{"type":"string"}}}},"422":{"description":"More than 100,000 passes match","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/passes/{serial}/body":{"get":{"summary":"Get a pass's fields","parameters":[{"name":"serial","in":"path","required":true,"schema":{"type":"string"},"description":"The pass's serialNumber."}],"responses":{"200":{"description":"Its current fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pass"}}}},"404":{"description":"No such pass","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/passes/{serial}/design":{"get":{"summary":"Get a pass's design and values","parameters":[{"name":"serial","in":"path","required":true,"schema":{"type":"string"},"description":"The pass's serialNumber."}],"responses":{"200":{"description":"Its design with placeholders, values, holder and template"},"404":{"description":"No such pass","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/passes/{serial}/erase":{"post":{"summary":"Delete a revoked pass","parameters":[{"name":"serial","in":"path","required":true,"schema":{"type":"string"},"description":"The pass's serialNumber."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Retrying with the same key returns the first answer and changes nothing again."}],"responses":{"200":{"description":"Deleted: only its serial number is kept"},"404":{"description":"No such pass","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not revoked, or revoked less than 24 hours ago","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/passes/{serial}/notifications":{"post":{"summary":"Send a notification","parameters":[{"name":"serial","in":"path","required":true,"schema":{"type":"string"},"description":"The pass's serialNumber."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Retrying with the same key returns the first answer and changes nothing again."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string","maxLength":256}}}}}},"responses":{"200":{"description":"Sent to the pass's devices"},"404":{"description":"No such pass","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/passes/{serial}/messages":{"get":{"summary":"List a pass's messages","parameters":[{"name":"serial","in":"path","required":true,"schema":{"type":"string"},"description":"The pass's serialNumber."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"default":20}},{"name":"cursor","in":"query","required":false,"description":"The previous page's nextCursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Also its fields' messages","schema":{"type":"string","enum":["true","false"],"default":"false"}}],"responses":{"200":{"description":"The notifications it has been sent, newest first"},"400":{"description":"A bad limit, cursor or fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such pass","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/templates":{"get":{"summary":"List templates","responses":{"200":{"description":"This workspace's, then those its organization shares (org:<slug>)"}}},"post":{"summary":"Create a template","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Retrying with the same key returns the first answer and changes nothing again."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateAnswer"}}}},"400":{"description":"A field is wrong or unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The slug is taken","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/templates/{slug}":{"get":{"summary":"Get a template","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"The template's slug (org:<slug> for your organization's, read-only)."}],"responses":{"200":{"description":"It, its latest update and a preview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateAnswer"}}}},"404":{"description":"No such template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"summary":"Save a template's changes","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"The template's slug (org:<slug> for your organization's, read-only)."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Retrying with the same key returns the first answer and changes nothing again."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}}},"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateAnswer"}}}},"400":{"description":"A field is wrong or unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"An organization's template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Its passes are being updated, or it was saved meanwhile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The slug differs, or the new placeholders need fill","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Updating its passes would go past this month's operations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Rename a template","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"The template's slug (org:<slug> for your organization's, read-only)."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Retrying with the same key returns the first answer and changes nothing again."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplatePatch"}}}},"responses":{"200":{"description":"Renamed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateAnswer"}}}},"403":{"description":"An organization's template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a template","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"The template's slug (org:<slug> for your organization's, read-only)."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Retrying with the same key returns the first answer and changes nothing again."}],"responses":{"200":{"description":"Deleted; its passes are unlinked"},"403":{"description":"An organization's template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/templates/{slug}/update-passes":{"post":{"summary":"Update a template's passes","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"The template's slug (org:<slug> for your organization's, read-only)."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Retrying with the same key returns the first answer and changes nothing again."}],"responses":{"202":{"description":"Started"},"404":{"description":"No such template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already updating","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Every pass is on its latest version","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"It would go past this month's operations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/broadcasts/preview":{"post":{"summary":"Preview a broadcast","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"filters":{"$ref":"#/components/schemas/BroadcastFilters"}}}}}},"responses":{"200":{"description":"Who it would reach and what it would cost"},"400":{"description":"A filter isn't valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/broadcasts":{"post":{"summary":"Send a broadcast","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Retrying with the same key returns the first answer and changes nothing again."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string","maxLength":256},"filters":{"$ref":"#/components/schemas/BroadcastFilters"}}}}}},"responses":{"202":{"description":"Started","content":{"application/json":{"schema":{"type":"object","properties":{"broadcast":{"$ref":"#/components/schemas/Broadcast"}}}}}},"400":{"description":"No message, or a filter isn't valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Another broadcast is sending, or the Idempotency-Key was used for a different request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No active pass matches","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"It would go past this month's operations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List broadcasts","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"default":10}}],"responses":{"200":{"description":"Newest first","content":{"application/json":{"schema":{"type":"object","properties":{"broadcasts":{"type":"array","items":{"$ref":"#/components/schemas/Broadcast"}}}}}}}}}},"/v1/broadcasts/{id}":{"get":{"summary":"Get a broadcast","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"How far it has got","content":{"application/json":{"schema":{"type":"object","properties":{"broadcast":{"$ref":"#/components/schemas/Broadcast"}}}}}},"404":{"description":"No such broadcast","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/assets":{"post":{"summary":"Upload an image","parameters":[{"name":"type","in":"query","required":true,"schema":{"type":"string","enum":["icon","logo","strip","background","thumbnail","wideLogo","googleHero"]}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Retrying with the same key returns the first answer and changes nothing again."}],"requestBody":{"required":true,"content":{"image/png":{"schema":{"type":"string","format":"binary"}},"image/jpeg":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"An HTTPS image to fetch."}}}}}},"responses":{"201":{"description":"Stored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Asset"}}}},"400":{"description":"No image, a bad type, or a URL we won't fetch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The Idempotency-Key was used for a different request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Over 2 MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not an image we can read","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/usage":{"get":{"summary":"This month's usage","responses":{"200":{"description":"Operations used, the allowance and when it resets","content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","description":"Your organization's plan (organization scope)."},"scope":{"type":"string","enum":["organization","workspace"]},"used":{"type":"integer"},"allowance":{"type":"integer","nullable":true},"resetAt":{"type":"string","format":"date-time"},"workspace":{"type":"object","properties":{"used":{"type":"integer"},"cap":{"type":"integer"}}}}}}}}}}}}}