Skip to main content
POST
/
api
/
v1
/
pass-templates
Create Pass Template
curl --request POST \
  --url https://api.passentry.com/api/v1/pass-templates \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "passTemplate": {
    "name": "PassEntry Supermarket",
    "templateType": "generic",
    "defaultLanguage": "en",
    "centralTitle": "PassEntry Supermarket",
    "notificationHeader": "PassEntry Supermarket",
    "description": "PassEntry Supermarket",
    "colors": {
      "background": "#dbdbdb",
      "label": "#000000",
      "text": "#000000"
    },
    "images": {
      "banner": "https://example.com/images/banner.jpg",
      "logo": "https://example.com/images/logo.jpg",
      "icon": "https://example.com/images/icon.jpg",
      "watermark": {
        "color": "light",
        "position": "bottomRight"
      }
    },
    "fields": {
      "header": {
        "one": {
          "id": "points",
          "label": "Points",
          "defaultValue": "0",
          "localisation": {
            "fr": {
              "label": "Points",
              "defaultValue": "0"
            },
            "is": {
              "label": "Stig",
              "defaultValue": "0"
            }
          }
        }
      },
      "central": {
        "one": {
          "id": "name",
          "label": "Central",
          "defaultValue": "Sample Name",
          "localisation": {
            "fr": {
              "label": "Central",
              "defaultValue": "Exemple de Nom"
            },
            "is": {
              "label": "Miðja",
              "defaultValue": "Sýnishorn Nafn"
            }
          }
        }
      },
      "details": {
        "one": {
          "id": "name",
          "label": "Name",
          "defaultValue": "Jane Doe",
          "localisation": {
            "fr": {
              "label": "Nom",
              "defaultValue": "Jeanne Dupont"
            },
            "is": {
              "label": "Nafn",
              "defaultValue": "Jóna Jónsdóttir"
            }
          }
        },
        "two": {
          "id": "discount",
          "label": "Discount",
          "defaultValue": "15%",
          "localisation": {
            "fr": {
              "label": "Réduction",
              "defaultValue": "15%"
            },
            "is": {
              "label": "Afsláttur",
              "defaultValue": "15%"
            }
          }
        },
        "three": {
          "id": "tier",
          "label": "Membership Tier",
          "defaultValue": "Silver",
          "localisation": {
            "fr": {
              "label": "Niveau de fidélité",
              "defaultValue": "Argent"
            },
            "is": {
              "label": "Aðildarstig",
              "defaultValue": "Silfur"
            }
          }
        }
      },
      "back": {
        "one": {
          "id": "email",
          "label": "Email",
          "defaultValue": "[email protected]",
          "localisation": {
            "fr": {
              "label": "E-mail",
              "defaultValue": "[email protected]"
            },
            "is": {
              "label": "Netfang",
              "defaultValue": "[email protected]"
            }
          }
        }
      }
    },
    "appLinking": {
      "apple": {
        "appStoreUrl": [
          "https://apps.apple.com/gb/app/whatsapp-messenger/id310633997"
        ]
      },
      "google": {
        "app": {
          "playStoreUrl": "https://play.google.com/store/apps/details?id=com.whatsapp"
        },
        "displayText": {
          "text": "Click here for more!"
        }
      }
    },
    "barcode": {
      "enabled": true,
      "type": "qr",
      "source": "custom",
      "value": "123abcd"
    },
    "locations": [
      {
        "name": "Venue",
        "latitude": 51.54321132456805,
        "longitude": -0.022901231803803924,
        "radius": 100,
        "message": "Welcome to the venue"
      }
    ],
    "beacons": [
      {
        "name": "Beacon",
        "proximityUuid": "123e4567-e89b-12d3-a456-426614174000",
        "major": 1,
        "minor": 1,
        "message": "Welcome to the venue"
      }
    ]
  }
}'
{
  "id": "19cb334f9696e64e10e7759f0",
  "type": "passTemplate",
  "attributes": {
    "name": "PassEntry Supermarket",
    "templateType": "eventTicket",
    "transitType": "airplane",
    "processingStatus": "processing"
  },
  "meta": {
    "message": "Your pass template is being processed, please check again in a few moments.",
    "links": {
      "self": "https://api.passentry.com/v1/pass-templates/19cb334f9696e64e10e7759f0"
    }
  }
}
This endpoint is currently in open beta and available to all users – let us know if you encounter any issues or have feedback.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Pass Template object

passTemplate
object
required

Response

Succesful

id
string

Unique identifier for the pass template

Example:

"19cb334f9696e64e10e7759f0"

type
string
Example:

"passTemplate"

attributes
object
meta
object