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",
"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"
}
},
"central": {
"one": {
"id": "name",
"label": "Central",
"defaultValue": "Sample Name"
}
},
"details": {
"one": {
"id": "name",
"label": "Name",
"defaultValue": "Jane Doe"
},
"two": {
"id": "discount",
"label": "Discount",
"defaultValue": "15%"
},
"three": {
"id": "tier",
"label": "Membership Tier",
"defaultValue": "Silver"
}
},
"back": {
"one": {
"id": "email",
"label": "Email",
"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",
"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"
}
}
}
Pass Templates are created asynchronously and the response will return a 202 status code. Use the URL returned in the response to check the status of the 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",
"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"
}
},
"central": {
"one": {
"id": "name",
"label": "Central",
"defaultValue": "Sample Name"
}
},
"details": {
"one": {
"id": "name",
"label": "Name",
"defaultValue": "Jane Doe"
},
"two": {
"id": "discount",
"label": "Discount",
"defaultValue": "15%"
},
"three": {
"id": "tier",
"label": "Membership Tier",
"defaultValue": "Silver"
}
},
"back": {
"one": {
"id": "email",
"label": "Email",
"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",
"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"
}
}
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Pass Template object
Succesful
The response is of type object
.
Was this page helpful?