Update fields on a wallet pass using an external ID. Use when updating pass information like values, labels, locations, or beacons for Apple Wallet or Google Pay passes.
This skill enables agents to update fields on a wallet pass using an external ID. You can update field values, labels, headers, locations, beacons, and other pass properties. Only include the fields you want to update in the request.
Method: PUT
Path: /pass/template/{templateId}/id/{passExternalId}
Base URL:
https://wallet-api.urbanairship.com/v1https://wallet-api.asnapieu.com/v1Path: /pass/template/{templateId}/id/{passExternalId}
Preferred: OAuth 2.0 Bearer token
Fallback: Basic Auth (app_key:master_secret) for environments not using OAuth
Authorization: Bearer <access_token>.wpas scope for pass operations.OAuth token endpoints:
https://oauth2.asnapius.com/tokenhttps://oauth2.asnapieu.com/tokenURL-encode credentials: When building the Basic auth header for the token request, URL-encode the client ID and secret before base64-encoding (base64(url_encode(id) + ":" + url_encode(secret))); raw values will fail if either contains special characters. Include scope=wpas and Accept: application/json in the token request.
If OAuth is not configured, use:
Authorization: Basic <base64(app_key:master_secret)>
Api-Revision: 1.2
Accept: application/json
Content-Type: application/json
Authorization: Bearer <access_token>
If using fallback auth:
Authorization: Basic <base64(app_key:master_secret)>
Provide only the fields you want to update. The request body supports partial updates.
{
"fields": {
"fieldName": {
"value": "New Value",
"label": "Field Label",
"changeMessage": "Your pass has been updated"
}
},
"headers": {
"headerName": {
"value": "Header Value",
"label": "Header Label",
"changeMessage": "Header updated"
}
},
"locations": [
{
"latitude": 37.7749,
"longitude": -122.4194,
"relevantText": "Near San Francisco"
}
],
"beacons": [
{
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"relevantText": "Near beacon"
}
]
}
templateId: The ID of the template the pass was created from (string)passExternalId: The external ID assigned to the pass (string)Fields Object (fields):
value (required): string - The new field valuelabel (optional): string - The field label/titlechangeMessage (optional): string - Message shown when field updates (use %@ for variables)Headers Object (headers):
Locations Array (locations):
latitude: numberlongitude: numberrelevantText: string (optional) - Text shown when near locationBeacons Array (beacons):
uuid: string - UUID of the iBeaconmajor: integer - Major identifier of the beaconminor: integer - Minor identifier of the beaconrelevantText: string - Text shown when near beaconSemantics Object (semantics):
Universal Links Object (universalLinks):
See example files in the examples/ directory:
update-pass-fields.json - Update field values and labelsupdate-pass-locations.json - Update pass locationsPUT /pass/template/123/id/pass-abc-123
{
"fields": {
"balance": {
"value": "$150.00",
"changeMessage": "Your balance has been updated to %@"
},
"memberName": {
"value": "John Doe",
"label": "Member"
}
}
}
PUT /pass/template/123/id/pass-abc-123
{
"locations": [
{
"latitude": 37.7749,
"longitude": -122.4194,
"relevantText": "Near Store Location"
}
]
}
{
"ticketId": 12345
}
The ticketId can be used to track the update operation status via the tickets API.
Occurs when:
Occurs when:
changeMessage to notify pass holders when important fields updatelabel if you want to override the template's default labelNone currently. This is the first wallet skill.