API reference · Passes
Create a pass
POST/v1/passes1 operationSafe to retry with Idempotency-KeyBuilds the Apple Wallet pass and the Google Wallet pass from one description, and gives you an install page for both.
Body
The pass's fields: organizationName, and logoText or primaryFields, at least. Or a template's slug with its values instead of the fields. Beside them:
issuerstringWhich of your issuers signs it: its slug, or org:<slug> for your organization's. Left out, your workspace's default. A pass keeps its set for life.
dataobjectValues for the placeholders in its text, such as { "points": 120 }.
holderobjectThe holder's name and email. Kept with the pass, so you can find one person's passes.
templatestringMake it from this template instead of sending fields: its slug, or org:<slug> for your organization's. Send data, holder and an externalId with it.
Answer
201Created
shareUrl is the install page to send the holder. platforms says whether each wallet's pass was built: built, or no_credential when the issuer has none for that wallet. applePass (the signed .pkpass, base64) and googleSaveUrl come with a built one.
Errors
Every error has the same shape: see Errors.
| Status | Code | When |
|---|---|---|
| 400 | invalid_json | The body isn't JSON. |
| 400 | validation_error | A field is missing, too long or unknown. field names it; a near miss suggests the field you meant. |
| 400 | placeholder_missing | A required placeholder has no value. missing lists every one. |
| 409 | idempotency_conflict | The Idempotency-Key was already used for a different request. |
| 409 | external_id_conflict | Another pass in this workspace has that externalId. |
| 422 | unknown_issuer | No issuer with that slug here. |
| 422 | unknown_template | No template with that slug here (or shared with this workspace). |
| 429 | usage_limit_exceeded | This month's operations on your plan are used up. |
| 429 | workspace_limit_reached | This workspace's monthly limit, set by its organization, is used up. |
| 429 | platform_usage_limit | A test pass, and the 1,000 test operations a month are used up. |
- Keep the
serialNumber: it's how you update, notify and revoke the pass. - Until you add your own credentials, passes are signed with ours and marked as test passes.