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/VariablesFormatDescription
actionMandatory, Alphabetic (a-zA-Z)This is the name of the function you want to execute with the API.
api-keyMandatory, Alphanumeric (a-zA-Z0-9), Case-SensitiveThis 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-numberOptional, NumericUsers can provide the page number using this parameter and the user will receive data from this page number.
items-per-pageOptional, 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:

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

Request Example:

{
    "action": "getPassTemplates",
    "api-key": "UX4G4ijIIkutK2exyAY1iwA3y8cdFmEj",
    "items-per-page": 2,
    "page-number": 1
}

Response Success Example:

{
    "status":"success",
    "pass-templates": [
    	{
        	"pass-template-id": "3b77c090b4cba2871e5ba7da82f6aaf6fcc2f0ce",
        	"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": "fbf423fb9586497f784304b431a1b3ce2eee5f57",
        	"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’. Please note that the ‘pass-id’ is unique per account, not per Pass Template.  The required parameters are action, api-key, and pass-id.

Request:

{
    "action":"generatepassbyid",
    "api-key":"API KEY",
    "pass-id":"CUSTOM PASS ID"
}

Request Example:

{  
   "action":"generatepassbyid",
   "api-key":"QX4G4ijIIkutK2exyAY1iwA3y8cdFmEj",
   "pass-id":"rockonrock2020"
}

Response Success Example:

{  
   "status":"Success",
   "pass-id":"rockonrock2020",
   "pass-install-url":"https://d2c.skycore.com/wallet/dc/eazt0sq3r4",
   "tracking-id":"EDRZLv-FCgBY-EKk"
}

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. Please note that the ‘pass-id’ is unique per account, not per Pass Template. The required params are action, api-key, and pass-id.

Request:

{
    "action":"deletepassdata",
    "api-key":"API KEY",
    "pass-id":"CUSTOM PASS ID"
}

Request Example:

{
    "action":"deletepassdata",
    "api-key":"QTFkykO9JTfahCOqJ0V2Wf5Cg1t8iWlZ",
    "pass-id":"rockonrock2020"
}

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/VariablesFormatDescription
actionMandatory, Alphabetic (a-zA-Z)This is the name of the function you want to execute with the API.
api-keyMandatory, Alphanumeric (a-zA-Z0-9), Case-SensitiveThis 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-idMandatory, Alphanumeric (a-zA-Z0-9), Case-SensitiveThis is the unique Pass Template ID used to reference a particular Pass Template.
page-numberOptional, NumericUsers can provide the page number using this parameter and the user will receive data from this page number.
items-per-pageOptional, 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:

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

Request Example:

{
    "action":"getpassids",
    "api-key":"UX4G4ijIIkutK2exyAYsiwA3y8cdFmEj",
    "pass-template-id":"b1f3802d0e0689619e9s59a86f528946439b542e",
    "page-number":"1",
    "items-per-page":"2"
}

Response Success Example:

{
    "status":"success",
    "pass-template-id":"b1f3802d0e06s9619e9c59a86f528946439b542e",
    "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":"b1f3802d0e0689619e9c59a86f528946439b542e"
}

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/VariablesFormatDescription
actionMandatory, Alphabetic (a-zA-Z)This is the name of the function you want to execute with the API.
api-keyMandatory, Alphanumeric (a-zA-Z0-9), Case-SensitiveThis 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-idMandatory, Alphanumeric (a-zA-Z0-9), Case-SensitiveThis is the unique Pass Template ID used to reference a particular Pass Template.
zip-codeMandatory, Alphanumeric (a-zA-Z0-9)This is the zip code for the relevant location.
search-radiusOptional, Numeric (0-9)
(in miles)
This is the distance of the relevant data search from the zip code.

Request:

{
	"action": "GetPassRelevanceInfo",
	"api-key": "YOUR API KEY",
	"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:

{
   	"action": "GetPassRelevanceInfo",
	"api-key": "lEVy7u8t7bR7HkG39nV44VTAn8hrBNyw",
	"pass-template-id": "dcae7a8219651350501ab6288b8e835894e3499a",
	"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, api-key, pass-template-id, zip code