This document describes all available REST API endpoints for the Wallet Service.
Base URL: http(s)://{HOST}:{PORT} (default: http://localhost:3000)
Access the interactive Swagger UI at /docs to explore and test the API directly in your browser.
Triggers an update for a specific pass by serial number.
GET /passes/update/:serialNumber?type={apple|google}
| Parameter | Type | Location | Description |
|---|---|---|---|
serialNumber |
string | path | The unique pass serial number |
type |
string | query | Pass type: apple or google |
Response Codes:
200 - Pass updated successfully404 - Pass not found500 - Internal server errorExample:
curl "http://localhost:3000/passes/update/abc123?type=apple"
Sends digital membership passes to a member via email.
GET /passes/send?salesforceId={id}&type={apple|google}&key={apiKey}
| Parameter | Type | Location | Description |
|---|---|---|---|
salesforceId |
string | query | Salesforce account ID |
type |
string | query | Pass type: apple or google |
key |
string | query | API authentication key |
appartmentId |
string | query | (Optional) Filter by department ID |
Response Codes:
200 - Email sent successfully401 - Unauthorized (invalid key)404 - Member not found500 - Internal server errorExample:
curl "http://localhost:3000/passes/send?salesforceId=0011X00000wF1itQAC&key=YOUR_API_KEY&type=apple"
These endpoints implement the Apple PassKit Web Service specification.
Retrieves the latest version of a pass.
GET /apple/v1/passes/:passTypeIdentifier/:serialNumber
| Parameter | Type | Location | Description |
|---|---|---|---|
passTypeIdentifier |
string | path | Your Pass Type ID (e.g., pass.de.dotSource.DigitalMembershipCard) |
serialNumber |
string | path | Unique pass serial number |
Headers:
| Header | Required | Description |
|---|---|---|
Authorization |
Yes | ApplePass {authToken} or WalletPass {authToken} |
If-Modified-Since |
No | Timestamp to check for updates |
Response:
200 - Returns .pkpass file304 - Pass not modified401 - Unauthorized400 - Bad requestRegisters a device to receive push notifications for pass updates.
POST /apple/v1/devices/:deviceLibraryIdentifier/registrations/:passTypeIdentifier/:serialNumber
| Parameter | Type | Location | Description |
|---|---|---|---|
deviceLibraryIdentifier |
string | path | Unique device identifier |
passTypeIdentifier |
string | path | Your Pass Type ID |
serialNumber |
string | path | Pass serial number |
Headers:
| Header | Required | Description |
|---|---|---|
Authorization |
Yes | ApplePass {authToken} |
Body:
{
"pushToken": "device-push-token-string"
}
Response Codes:
200 - Already registered201 - Successfully registered401 - UnauthorizedRemoves a device registration when a pass is removed from the wallet.
DELETE /apple/v1/devices/:deviceLibraryIdentifier/registrations/:passTypeIdentifier/:serialNumber
Headers:
| Header | Required | Description |
|---|---|---|
Authorization |
Yes | ApplePass {authToken} |
Response Codes:
200 - Successfully unregistered401 - UnauthorizedReturns serial numbers of passes registered to a device.
GET /apple/v1/devices/:deviceLibraryIdentifier/registrations/:passTypeIdentifier
| Parameter | Type | Location | Description |
|---|---|---|---|
passesUpdatedSince |
number | query | (Optional) Unix timestamp filter |
Response:
{
"lastUpdated": "1706889600",
"serialNumbers": ["serial1", "serial2"]
}
Response Codes:
200 - Returns serial numbers204 - No passes registered401 - UnauthorizedReceives error logs from Apple Wallet.
POST /apple/v1/log
Body:
{
"logs": ["log message 1", "log message 2"]
}
Response Codes:
200 - Logs receivedReceives callback notifications from Google Wallet for pass lifecycle events.
POST /google/notify
This endpoint verifies signed messages from Google using ECDSA-SHA256 and handles:
Security: Messages are verified using Google's public keys to ensure authenticity.
Response Codes:
200 - Notification processed400 - Invalid message or signatureApple Wallet endpoints require an Authorization header:
Authorization: ApplePass {authToken}
or
Authorization: WalletPass {authToken}
The auth token must match the AUTH_TOKEN environment variable configured on the server.
The /passes/send endpoint requires a key query parameter for authentication.
All endpoints return JSON responses with the following structure:
Success:
{
"code": 200,
"message": "OK"
}
Error:
{
"code": 404,
"message": "Not Found"
}
In production mode, the API enforces rate limiting:
Cross-Origin Resource Sharing is enabled for all origins with the following methods:
GETPOSTDELETEHEADAllowed headers: Content-Type, Authorization, Accept