(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.data-privacy-src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-P2BC6Q6N');

Help Center

Generic APIs

GetPassTemplates #

The GetPassTemplates API will fetch the list of the Pass Templates present under the account identified by the api-key. This API fetches the data in a paginated way. Users can provide the page number and data needed per page required and API will send the required data.

Params/Variables Format Description
action Mandatory, Alphabetic (a-zA-Z) This is the name of the function you want to execute with the API.
x-api-key Mandatory, Alphanumeric (a-zA-Z0-9), Case-Sensitive.
This is set in the request header param.
This is a random key that is assigned to an account and can be used for authorization. You can find and regenerate this key on the ‘API Settings’ page.
page-number Optional, Numeric Users can provide the page number using this parameter and the user will receive data from this page number.
items-per-page Optional, Numeric (Default is 100) Users can provide the count of data required per page and the API will send that amount of data in response.

Request:

Header: 
X-Api-Key : XXXXXXXXXXXXXXXXXXXXXX

Request:
{
"action": "getPassTemplates",
“page-number”: “PAGE NUMBER”,
“items-per-page”: “Number of Items to send” 
}

Request Example:

Header: 
X-Api-Key : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Request:
{
    "action": "getPassTemplates",
    "items-per-page": 2,
    "page-number": 1
}

Response Success Example:

{
    "status":"success",
    "pass-templates": [
    	{
        	"pass-template-id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        	"pass-template-name": "GiftCard-Pass-1",
        	"pass-template-type": "Gift Card",
        	"created-timestamp": "10/07/2019 11:57:32",
        	"last-updated-timestamp": "10/07/2019 11:57:32"
    	},
    	{
        	"pass-template-id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        	"pass-template-name": "BoardingPass-1",
"pass-template-type": "Boarding Pass",
"created-timestamp": "10/07/2019 11:57:28",
        	"last-updated-timestamp": "10/07/2019 11:57:28"
    	}
	]
}

Response Failure Example:

{
	"status": "failure",
	"error-code": "E104",
	"error-info": "Authentication failed. Invalid api-key."
}

GeneratePassById #

The generate pass by id API will generate a unique installation link based on the unique ‘pass-id’. If you try to call this API with an invalid ‘pass-id’ or a ‘pass-id’ that is not associated with the pass that you are trying to generate, you will receive an error message. To call this API again successfully, you will need to use a valid ‘pass-id’. The required parameters are action, api-key, pass-id, and pass-template-id.

Request:

Header: 
X-Api-Key : XXXXXXXXXXXXXXXXXXXXXX

Request:
{
    "action":"generatepassbyid",
    "pass-id":"CUSTOM PASS ID",
    "pass-template-id": "PASS TEMPLATE ID",
}

Request Example:

Header: 
X-Api-Key : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Request:
{  
   "action":"generatepassbyid",
   "pass-id":"rockonrock2020",
   "pass-template-id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

Response Success Example:

{  
   "status":"Success",
   "pass-id":"rockonrock2020",
   "pass-install-url":"https://fake-d2c-url.com/wallet/gc/223979as8c23420701f7b9aedbf0c55e?iid=q08e5af653af95a7",
   "tracking-id":"xxxxxxxxxx"
}

Response Failure Example:

{
    "status":"Failure",
    "error-code":"E810",
    "error-message":"The pass-id value is required."
    "pass-id": "Boarding 123"
}

DeletePassData #

The delete pass data API is used to remove data for a Pass that has already been installed on a device. Using this API will only delete the pass data associated with the ‘pass-id’ from our system. This does not remove or uninstall the Pass from the device. If you receive a failure message, the Pass data has not been deleted. The required params are action, api-key, pass-id, and pass-template-id .

Request:

Header: 
X-Api-Key : XXXXXXXXXXXXXXXXXXXXXX

Request:
{
    "action":"deletepassdata",
    "pass-id":"CUSTOM PASS ID",
    “pass-template-id” :"PASS TEMPLATE ID"
}

Request Example:

Header: 
X-Api-Key : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Request:
{
    "action":"deletepassdata",
    "pass-id":"rockonrock2020",
    "pass-template-id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

Response Success Example:

{
    "status":"Success",
    "pass-id":"rockonrock2020"
}

Response Failure Example:

{
    "status" : "Failure",
    "error-code" : "E821",
    "error-message" : "Internal Error. The pass was not deleted.",
    "pass-id":"rockonrock2020"
}

GetPassIds #

The GetPassIds API will fetch a list of passes, generated for a given Pass Template under the user account identified by the api-key. This API fetches the data in a paginated way. Users can provide the page number and data needed per page required and API will send the required data.

Params/Variables Format Description
action Mandatory, Alphabetic (a-zA-Z) This is the name of the function you want to execute with the API.
x-api-key Mandatory, Alphanumeric (a-zA-Z0-9), Case-Sensitive.
This is set in the request header param.
This is a random key that is assigned to an account and can be used for authorization. You can find and regenerate this key on the ‘API Settings’ page.
pass-template-id Mandatory, Alphanumeric (a-zA-Z0-9), Case-Sensitive This is the unique Pass Template ID used to reference a particular Pass Template.
page-number Optional, Numeric Users can provide the page number using this parameter and the user will receive data from this page number.
items-per-page Optional, Numeric (Default is 100) Users can provide the count of data required per page and the API will send that amount of data in response.

Request:

Header: 
X-Api-Key : XXXXXXXXXXXXXXXXXXXXXX

Request:
{
"action": "getPassIds",
“pass-template-id” : “PASS TEMPLATE ID”,
“page-number”: “PAGE NUMBER”,
“items-per-page”: “Number of Items to send” 
}

Request Example:

Header: 
X-Api-Key : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Request:
{
    "action":"getpassids",
    "pass-template-id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "page-number":"1",
    "items-per-page":"2"
}

Response Success Example:

{
    "status":"success",
    "pass-template-id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "pass-ids":[
        {
            "pass-id":"GC-feb-17.3we",
            "created-timestamp":"03/09/2020 18:22:36",
            "last-updated-timestamp":"03/09/2020 18:22:36"
        },
        {
            "pass-id":"GC-feb-17.Gpay",
            "created-timestamp":"02/26/2020 14:36:12",
            "last-updated-timestamp":"03/11/2020 14:27:20"
        }
    ]
}

Response Failure Example:

{
    "status":"Failure",
    "error-code":"E827",
    "error-message":"items-per-page is invalid. Only numeric values are allowed.",
    "pass-template-id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

GetPassRelevanceInfo #

The GetPassRelevanceInfo API will fetch the list of nearest relevance locations based on the zip code and search radius from the list user already uploaded for a pass template. It will fetch a maximum of 10 locations in ascending order based on the distance from the zip code.

Params/Variables Format Description
action Mandatory, Alphabetic (a-zA-Z) This is the name of the function you want to execute with the API.
x-api-key Mandatory, Alphanumeric (a-zA-Z0-9), Case-Sensitive.
This is set in the request header param.
This is a random key that is assigned to an account and can be used for authorization. You can find and regenerate this key on the ‘API Settings’ page.
pass-template-id Mandatory, Alphanumeric (a-zA-Z0-9), Case-Sensitive This is the unique Pass Template ID used to reference a particular Pass Template.
zip-code Mandatory, Alphanumeric (a-zA-Z0-9) This is the zip code for the relevant location.
search-radius Optional, Numeric (0-9)
(in miles)
This is the distance of the relevant data search from the zip code.

Request:

Header: 
X-Api-Key : XXXXXXXXXXXXXXXXXXXXXX

Request:
{
	"action": "GetPassRelevanceInfo",
	"pass-template-id": "PASS TEMPLATE ID",
	"zip-code": "ZIP CODE FOR WHICH RELEVANT LOCATION NEEDED",
	"search-radius": "SEARCH RADIUS FROM THE ZIP CODE ( IN MILES )"
}

Request Example:

Header: 
X-Api-Key : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Request:
{
   	"action": "GetPassRelevanceInfo",
	"pass-template-id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
	"zip-code": "10001"
}

Response Success Example:

{
    "status":"success",
    "relevance-data": [
        {
        	"relevance-address": "New York ",
        	"relevance-latitude": "40.7536854",
        	"relevance-longitude": "-73.9991637",
        	"relevance-text": "Test 1",
        	"relevance-address-description": "",
        	"zip-code": "10001",
        	"state": "NY",
        	"city": "New York",
        	"country": "US"
        },
        {
        	"relevance-address": "New York, Canal Street, Chinatown ",
        	"relevance-latitude": "40.7217861",
        	"relevance-longitude": "-74.0094471",
        	"relevance-text": "Test 9",
        	"relevance-address-description": "",
        	"zip-code": "10013",
        	"state": "NY",
        	"city": "New York",
        	"country": "US"
        },
        {
        	"relevance-address": "New York, Roosevelt Isl, Roosevelt Island ",
        	"relevance-latitude": "40.7573053",
        	"relevance-longitude": "-73.9550857",
        	"relevance-text": "Test 11",
        	"relevance-address-description": "",
        	"zip-code": "10044",
        	"state": "NY",
        	"city": "New York",
        	"country": "US"
        },
    	…
    ]
}

Response Failure Example:

{
	"status": "failure",
	"error-code": "E832",
	"error-message": "The zip-code is required."
}

Required Parameters:

action, x-api-key, pass-template-id, zip code

 

Go to Top