English
Send Push to Pass2U Android Wallet

Push Notification to Pass2U Wallet for Android API is publicly available to serve Apple Wallet pass service providers to send push notifications to update passes stored in Pass2U Wallet Android app.
Apply Push API key
Download Java example code
Download C# example code
2.0
Version
Jul 14, 2017
Released
Register a Device to Receive Push Notifications for a Pass

Pass2U Wallet complies Apple's Wallet official API for registering a pass for receiving push notifications. Please refer to PassKit Web Service Reference for more information.

When the pass web server receives the pass registration request, the request header 'X-Pass-Client' describes which app the pass has being installed in. For Pass2U Wallet app, this value is 'Passes'.

The body of registration request is in form of JSON format and includes a 'pushToken' field. The value is the registrationId required for push.
Send Push to Pass2U Android Wallet

URL Structure
POST to https://api.passesalliance.com/v2/registrations/{passTypeIdentifier}/push
URL Parameters
Name Type Required Description
passTypeIdentifier String Yes Pass type identifier issued by Apple. The value must correspond with the signing certificate.
HTTP Request Headers
x-api-key {API_Key}
Accept application/json
Content-Type application/json
HTTP Request Body
{
		"registrationIds":[
			"APA91bHvUNfeYWuqSOo86P9EuJPX6IUN1b6KuRmZWeyWxrJj2mYVMDQ8CUhkt9niaWvCBbq8MG6JHYRY2mhi5PH1z32r1ger8rZNkjPv_gxNvyHZmYRF3kMqMs9OpS8VE8NzKc6GTKc4PuUwhwttZGQ1reNnHSWUqg",
			"APA91bHdOuddYpEP6R9rMyVH_b62OY2iqWa94Gzgh_9B4qggrjLby36styVSaU7sF62eH-F2LRovFxeFo7tEWoOEEIq0EoXCazJH2jR0ZzT9I3B0dq2-DGajitM4sMJSkr5sw7JHtheFlOQs7c6EMaXtvkfTiyXJMg"
		]
	}
Name Type Required Description
registrationIds Array of Strings Yes A Registration ID is an identifier assigned by Google Cloud Message (GCM) to a single instance of a single application installed on an Android device.
NOTE
  • The number of Registration IDs in registrationIds must not be larger than 1,000 per API call.
Example Response Body
Forwards GCM response to the API client directly with HTTP response code 200 if the API call is successful.
{
		"canonical_ids":0,
		"success":2,
		"failure":0,
		"results":[
			{
				"message_id":"0:1499140281879336%69b0ba84f9fd7ecd"
			},
			{
				"message_id":"0:1499140281879839%69b0ba84f9fd7ecd"
			}
		],
		"multicast_id":7067738296159344856
	}
Get the number of API calls in nearly a year by the specified passTypeIdentifier and duration

URL Structure
GET to https://api.passesalliance.com/v2/registrations/{passTypeIdentifier}/push?since=yyyy-MM-dd&until=yyyy-MM-dd
URL Parameters
Name Type Required Description
passTypeIdentifier String Yes Pass type identifier issued by Apple. The value must correspond with the signing certificate.
since String Yes The format of 'since' must be yyyy-MM-dd'.
until String Yes The format of 'until' must be yyyy-MM-dd'.
HTTP Request Headers
x-api-key {API_Key}
Accept application/json
Content-Type application/json
HTTP Request Body
none
Example Response Body
Returns HTTP response code 200 if the API call is successful.
{
		"count":1200,
		"passTypeIdentifier":"pass.tw.com.pass2u.stampcard",
		"since":"2017-06-01",
		"until":"2017-07-01"
	}
Get the number of API calls in nearly a year by the specified duration

URL Structure
GET to https://api.passesalliance.com/v2/registrations/push?since=yyyy-MM-dd&until=yyyy-MM-dd
URL Parameters
Name Type Required Description
since String Yes The format of 'since' must be yyyy-MM-dd'.
until String Yes The format of 'until' must be yyyy-MM-dd'.
HTTP Request Headers
x-api-key {API_Key}
Accept application/json
Content-Type application/json
HTTP Request Body
none
Example Response Body
Returns HTTP response code 200 if the API call is successful.
{
		"count":1300,
		"since":"2017-06-01",
		"until":"2017-06-30"
	}
Add to Pass2U Wallet Badges

Install Pass2U Wallet and add a new pass automatically

Use the following URL
Get to https://play.google.com/store/apps/details?id=com.passesalliance.wallet&referrer={referrer}
URL Parameters
Name Type Required Description
referrer String Yes The URL of the pass to be installed.
The URL is the link of Pass2U Wallet app download page of Google Play Store. Once the app is installed and launched for the first time, the pass will be automatically downloaded from referrer and added into Pass2U Wallet App.
Error Codes
HTTP Status Code Error Code Retry
400 Bad Request Exception No
403 Access Denied Exception No
404 Not Found Exception No
405 Bad Method No
405 HTTP Not Acceptable No
409 Conflict Exception No
415 HTTP Unsupport Type No
429 Too Many Requests Exception Yes
503 Service Unavailable Exception Yes
504 BEndpoint Request Timed-out Exception Yes