This API function triggers a Wallet Card generation for a given ‘card-id’. On success, the API returns ‘card-id’, ‘card-generate-url’ and ‘card-download-url’. All these values need to be stored along with card-data on your side which will come in use for making card updates in the future. For more info see below for Mandatory/Optional fields and Error codes.

Request: JSON

    "action" : "generatecardbyid",
    "api-key" : "API KEY",
    "card-id" : "CUSTOM CARD ID"

Request Parameters:

action - The API Action,
api-key - The API Key assigned to your account. It's case sensitive,
card-id - The custom card id unique per card data. Case-Sensitive.

Response Parameters:

status, card-id, card-generate-url, card-download-url, error-code, error-message

Request Example: JSON

    "action" : "generatecardbyid",
    "api-key" : "qTFkykO9JTfahCOqJ0V2Wf5Cg1t8iWlZ",
    "card-id" : "CONT-ID-SKU:112324"

Response Example: Success

    "status" : "Success",
    "card-id" : "CONT-ID-SKU:112324",
    "card-generate-url" : "",
    "card-download-url" : ""

Response Example: Failure

    "status" : "Failure",
    "error-code" : "E810",
    "error-message" : "The card-id value is required."

General Error Codes:

Code Description
E100 Invalid request. Make a valid request via JSON POST with all the required variables.
E104 Account Authentication Failed.
E105 This account does not have API access.
E107 This account is not allowed to use this action.
E108 Corrupt JSON in the request. $error.
E109 This account does not have API activated.
E112 API call rejected. IP is not white-listed.
E113 API call rejected. Set throughput exceeded for this API action.
E114 API call rejected. Phone number is blacklisted.
E120 This account has reached the API request limit.
E503 Internal error.

Code Description
E808 The card-id value is invalid.
E810 The card-id value is required.
E830 Internal Error. The card was not generated.
E831 The download limit has been reached. The card was not generated.

Key Term Definitions:

Term Description
action This is the name of the function you want to execute with the API.
api-key Random key that is assigned to an account that can be used for authorization instead of USER/CARD. You can find and regenerate this key on the ‘API Settings’ page.
card-id The identifier from your system to identify the card or card data uniquely.
card-download-url The URL which can be used to download PKPass directly to your server.
card-generate-url The card installation link which allow users to install or download card to their phones based on User-Agent detection.