Updating a pass after it is issued.
The five endpoints Wallet calls on your server, the push that starts it, and what each one sends and expects back.
A pass updates itself when its webServiceURL answers five endpoints Wallet calls, and your server sends an empty push when something changes. The pass carries the URL and a token; Wallet does the rest.
- Register
- Wallet posts the device and its push token when the pass is added.
- Push
- An empty APNs notification to that token says “ask me what changed”.
- Fetch
- Wallet lists changed serial numbers, then downloads each new signed pass.
Five endpoints.
| Method and path | What it is for | Auth | Request | Responses |
|---|---|---|---|---|
POST /v1/devices/{deviceLibraryIdentifier}/registrations/{passTypeIdentifier}/{serialNumber} |
Register a device to receive updates for a pass. | Authorization: ApplePass <authenticationToken> |
{ "pushToken": "<APNs token>" } |
201 registered · 200 already registered · 401 wrong token |
DELETE /v1/devices/{deviceLibraryIdentifier}/registrations/{passTypeIdentifier}/{serialNumber} |
Stop sending updates for a pass to a device. | Authorization: ApplePass <authenticationToken> |
none |
200 unregistered · 401 wrong token |
GET /v1/devices/{deviceLibraryIdentifier}/registrations/{passTypeIdentifier} |
Which of a device’s passes changed since a tag. | none |
query: passesUpdatedSince=<tag> |
200 { "serialNumbers": [...], "lastUpdated": "<tag>" } · 204 nothing changed |
GET /v1/passes/{passTypeIdentifier}/{serialNumber} |
The latest signed .pkpass. | Authorization: ApplePass <authenticationToken> |
If-Modified-Since optional |
200 the pass · 304 not modified · 401 wrong token |
POST /v1/log |
Wallet reports errors it met talking to your service. | none |
{ "logs": ["…"] } |
200 |
Generated from the list kept beside the handlers that serve every Cardr pass; a test fails if a listed route is not registered.
Update questions.
How does Wallet learn a pass changed?
Your server sends an empty push notification through APNs to the push token the device registered, using the pass type certificate. Wallet then asks which serial numbers changed and downloads each new pass.
Do I need webServiceURL and authenticationToken?
Only if the pass will ever change. Both go in pass.json; the token must be at least 16 characters and comes back as “ApplePass <token>”.
Why does my update service never get called?
The usual causes: webServiceURL is not HTTPS, the token in pass.json does not match what your server checks, or the pass was added before those keys existed. Check the pass in the .pkpass viewer.