DOCS

Last updated: 3:11 PM - December 8, 2024

Wallet Pass Templates

This object represents a wallet pass template. Use it to create wallet passes and define the structure, appearance, and behavior of passes in the user's digital wallet.

NOTE:

In order to create a wallet pass initally, you must create one directly inside of your app dashboard at app.gowithpush.com

ENDPOINTS
  • GET /v1/wallet_pass_templates/:id
  • GET /v1/wallet_pass_templates
  • PATCH /v1/wallet_pass_templates/:id
  • DELETE /v1/wallet_pass_templates/:id

The Wallet Pass Template object

Attributes

id string

Unique identifier for the wallet pass (MongoDB ObjectID).

pass_json object

The pass data structure, containing details such as description, format version, and more.

pass_type string

Type of the pass (e.g., membership, event).

name string

Name or label given to the wallet pass.

userID string

The user ID associated with the pass owner.

status string

The current status of the pass (e.g., active, expired).

metadata map

Additional metadata associated with the wallet pass, including the download link.

created int64

Unix timestamp when the wallet pass was created.

updated_at int64

Unix timestamp of the last update to the wallet pass.

v integer

Version number of the wallet pass, used for concurrency control.

The Wallet Pass Template object
                    {
  "_id": "12345678abcdef1234567890",
  "pass_json": {
    "description": "Get exclusive access",
    "formatVersion": 1,
    "organizationName": "ExclusiveClub",
    "passTypeIdentifier": "pass.example.studio.exclusive",
    "webServiceURL": "https://wallet.example.com",
    "authenticationToken": "randomtoken1234567890abcdefghijklmnopqrstuv",
    "serialNumber": "12345678abcdef1234567890",
    "groupingIdentifier": "9876543210fedcba09876543",
    "teamIdentifier": "TEAMID12345",
    "foregroundColor": "rgb(150, 150, 150)",
    "backgroundColor": "rgb(50, 50, 150)",
    "logoText": "ExclusiveClub",
    "barcodes": [
      {
        "message": "12345678abcdef1234567890",
        "format": "PKBarcodeFormatQR",
        "messageEncoding": "iso-8859-1",
      }
    ],
    "strip": "strip.png",
    "logo": "logo.png",
    "storeCard": {
      "primaryFields": [
        {
          "key": "membership_id",
          "label": "",
          "value": " ",
          "changeMessage": "%@",
        }
      ],
      "backFields": [
        {
          "key": "field_1",
          "label": "Check status",
          "value": "View Offer",
          "changeMessage": "%@",
        },
        {
          "key": "lastMessage",
          "label": "Last Message",
          "value": "Powered by Example",
          "changeMessage": "%@",
        }
      ],
      "auxiliaryFields": [
        {
          "key": "last_updated",
          "label": "Last Updated",
          "value": "12/01/2024",
          "changeMessage": "%@",
        }
      ],
      "secondaryFields": [
        {
          "key": "membership_id",
          "label": "Membership ID",
          "value": "1234567",
          "changeMessage": "%@",
        }
      ],
      "headerFields": [
        {
          "key": "points",
          "label": "Points",
          "value": "100",
          "changeMessage": "%@",
        }
      ],
    },
  },
  "pass_type": "membership",
  "name": "Exclusive Membership",
  "userID": "9876543210fedcba09876543",
  "status": "generated",
  "metadata": {
    "download_link": "https://example.com/wallet-passes/12345678abcdef1234567890.pkpass",
  },
  "created": 1728658193,
  "updated_at": 1728658335,
  "v": 1,
}
                


Retrieve a Wallet Pass Template

This endpoint retrieves a paginated list of wallet pass template objects.

Required Parameters

userID string

The ID of the user requesting the wallet pass templates.

X-API-Key string

API Key for authenticating the request.

Optional Parameters

page integer

The page number of the paginated results. Default is 1.

per_page integer

The number of results per page. Default is 25.

GET /v1/wallet_pass_templates/:id
curl --location 'https://api.gowithpush.com/v1/wallet_pass_templates/:id'   
-H 'userID: 66abe34930ac8b1edfd40a96'   
-H 'X-API-Key: <YOUR-API-KEY>'

RESPONSE

{
    "wallet_pass_template": [
      {
        "id": "60e8c20f5cc66995a0114d7",
        "pass_json": {
          "description": "Event Ticket",
          "formatVersion": 1,
          "organizationName": "Example Org",
          "passTypeIdentifier": "pass.com.example.eventticket",
          "serialNumber": "550e8400-e29b-41d4-a716-446655440000",
          "teamIdentifier": "ABCDE12345",
          "foregroundColor": "#000000",
          "backgroundColor": "#FFFFFF",
          "logoText": "Example Event",
          "barcodes": [
            {
              "message": "550e8400-e29b-41d4-a716-446655440000",
              "format": "PKBarcodeFormatQR",
              "messageEncoding": "iso-8859-1"
            }
          ],
          "eventTicket": {
            "primaryFields": [
              {
                "key": "event",
                "label": "EVENT",
                "value": "Example Concert"
              }
            ],
            "backFields": [
              {
                "key": "terms",
                "label": "TERMS AND CONDITIONS",
                "value": "Valid for one entry."
              }
            ]
          }
        },
        "pass_type": "event",
        "name": "Example Event Pass",
        "userID": "66abe34930ac8b1edfd40a96",
        "status": "active",
        "metadata": {},
        "created": 1729006624,
        "updated_at": 1729006624,
        "v": 1
      },
      {
        "id": "60e8c20f5cc66995a0114d8",
        "pass_json": {
          "description": "Store Card",
          "formatVersion": 1,
          "organizationName": "Example Store",
          "passTypeIdentifier": "pass.com.example.storecard",
          "serialNumber": "550e8400-e29b-41d4-a716-446655440001",
          "teamIdentifier": "ABCDE12345",
          "foregroundColor": "#FFFFFF",
          "backgroundColor": "#000000",
          "logoText": "Example Store",
          "barcodes": [
            {
              "message": "550e8400-e29b-41d4-a716-446655440001",
              "format": "PKBarcodeFormatCode128",
              "messageEncoding": "iso-8859-1"
            }
          ],
          "storeCard": {
            "primaryFields": [
              {
                "key": "balance",
                "label": "BALANCE",
                "value": "$100.00"
              }
            ],
            "backFields": [
              {
                "key": "terms",
                "label": "TERMS AND CONDITIONS",
                "value": "No cash value."
              }
            ]
          }
        },
        "pass_type": "storeCard",
        "name": "Example Store Card",
        "userID": "66abe34930ac8b1edfd40a96",
        "status": "active",
        "metadata": {},
        "created": 1729006625,
        "updated_at": 1729006625,
        "v": 1
      }
    ]
  }

Retrieve Wallet Pass Templates

This endpoint retrieves a paginated list of wallet pass template objects.

Required Parameters

userID string

The ID of the user requesting the wallet pass templates.

X-API-Key string

API Key for authenticating the request.

Optional Parameters

page integer

The page number of the paginated results. Default is 1.

per_page integer

The number of results per page. Default is 25.

GET /v1/wallet-pass-templates
curl --location 'https://api.gowithpush.com/v1/wallet-pass-templates?page=1&per_page=2'   
-H 'userID: 66abe34930ac8b1edfd40a96'   
-H 'X-API-Key: <YOUR-API-KEY>'

RESPONSE

{
    "wallet_pass_templates": [
      {
        "id": "60e8c20f5cc66995a0114d7",
        "pass_json": {
          "description": "Event Ticket",
          "formatVersion": 1,
          "organizationName": "Example Org",
          "passTypeIdentifier": "pass.com.example.eventticket",
          "serialNumber": "550e8400-e29b-41d4-a716-446655440000",
          "teamIdentifier": "ABCDE12345",
          "foregroundColor": "#000000",
          "backgroundColor": "#FFFFFF",
          "logoText": "Example Event",
          "barcodes": [
            {
              "message": "550e8400-e29b-41d4-a716-446655440000",
              "format": "PKBarcodeFormatQR",
              "messageEncoding": "iso-8859-1"
            }
          ],
          "eventTicket": {
            "primaryFields": [
              {
                "key": "event",
                "label": "EVENT",
                "value": "Example Concert"
              }
            ],
            "backFields": [
              {
                "key": "terms",
                "label": "TERMS AND CONDITIONS",
                "value": "Valid for one entry."
              }
            ]
          }
        },
        "pass_type": "event",
        "name": "Example Event Pass",
        "userID": "66abe34930ac8b1edfd40a96",
        "status": "active",
        "metadata": {},
        "created": 1729006624,
        "updated_at": 1729006624,
        "v": 1
      },
      {
        "id": "60e8c20f5cc66995a0114d8",
        "pass_json": {
          "description": "Store Card",
          "formatVersion": 1,
          "organizationName": "Example Store",
          "passTypeIdentifier": "pass.com.example.storecard",
          "serialNumber": "550e8400-e29b-41d4-a716-446655440001",
          "teamIdentifier": "ABCDE12345",
          "foregroundColor": "#FFFFFF",
          "backgroundColor": "#000000",
          "logoText": "Example Store",
          "barcodes": [
            {
              "message": "550e8400-e29b-41d4-a716-446655440001",
              "format": "PKBarcodeFormatCode128",
              "messageEncoding": "iso-8859-1"
            }
          ],
          "storeCard": {
            "primaryFields": [
              {
                "key": "balance",
                "label": "BALANCE",
                "value": "$100.00"
              }
            ],
            "backFields": [
              {
                "key": "terms",
                "label": "TERMS AND CONDITIONS",
                "value": "No cash value."
              }
            ]
          }
        },
        "pass_type": "storeCard",
        "name": "Example Store Card",
        "userID": "66abe34930ac8b1edfd40a96",
        "status": "active",
        "metadata": {},
        "created": 1729006625,
        "updated_at": 1729006625,
        "v": 1
      }
    ],
    "page": 1,
    "per_page": 2,
    "total": 2
  }