1. Create A Ticket Template
Ticket template determines the design of the event ticket. Let's use our default template for this demo.
POST https://api.pub1.passkit.io/template
After you POST the sample template JSON to the https://api.pub1.passkit.io/template
, you will receive a Template ID which you will need it to issue a ticket.
Response would looks like this.
{
"id": "2zIk4vKa2ma0rVnsbxtmqs"
}
2. Issue A Ticket
Let's issue an event ticket. Template ID goes to ticketType.beforeRedeemPassTemplateId
. If you would like to send an Event Pass URL, please set a destination at person.emailAddress
.
POST https://api.pub1.passkit.io/eventTickets/ticket/id
{
"ticketNumber": "tt000002",
"event": {
"production": {
"uid": "WineFestival2020",
"name": "Wine&Dine",
"status": [
"PROJECT_ACTIVE_FOR_OBJECT_CREATION",
"PROJECT_DRAFT"
],
"distributionSettings": {
"distributionChannels": [
"CHANNEL_EMAIL"
]
}
},
"venue": {
"uid": "SUPERARENA",
"name": "Super Arena",
"address": "Peninsula Square, Greenwich Peninsula, London SE10 0DX, United Kingdom",
"timezone": "Europe/London"
},
"scheduledStartDate": "2020-12-15T16:00:00Z"
},
"ticketType": {
"uid": "ADULT",
"name": "Adult (Regular)",
"beforeRedeemPassTemplateId": "2zIk4vKa2ma0rVnsbxtmqs"
},
"orderNumber": "000001",
"seatInfo": {
"seat": "1",
"row": "B",
"section": "CENTER",
"gate": "SOUTH"
},
"faceValue": {
"amount": 120,
"currency": "USD"
},
"person": {
"surname": "Wills",
"forename": "Jean",
"salutation": "Ms",
"displayName": "J. Willis",
"gender": "FEMALE",
"emailAddress": "", <=== Please set email to send the ticket
"mobileNumber": "+4464596909"
},
"optOut": "OFF"
}
Response would look like this.
{
"ticketId": "0pokxJzEqc0yCEqfwZpuKu",
"productionId": "5xTF0MshxeeTizay08PseI",
"venueId": "44egWIf8272HQZzNXdZdjo",
"ticketTypeId": "5StEnK6MwrkU8PbMefxc10",
"eventId": "4OxgygHJJfZMUJwwb6T4Ej"
}
You can view or install a ticket at https://pass.midori.kube.pk/TICKET_ID
(i.e. https://pub1.pskt.io/0pokxJzEqc0yCEqfwZpuKu).
Need Further Customisation?
Template Designs
If you would like to have simple design with Venue and Date, the default designs is available here.
GET https://api.pub1.passkit.io/template/data/102/1
If you would like to have face value field, Paid Ticket default design is available here.
GET https://api.pub1.passkit.io/template/data/102/2
Available Dynamic Fields
The following dynamic fields can be used in your Pass template design and will dynamically render based on the object data.
Protocol fields:
These fields are populated based on the protocol objects that you specify.
eventTickets.production.name
eventTickets.production.finePrint
eventTickets.venue.name
eventTickets.venue.address
eventTickets.ticketType.name
eventTickets.ticketType.ticketTypeConditions
eventTickets.event.startDate
eventTickets.event.startTime
eventTickets.event.doorsOpen
eventTickets.event.endDate
eventTickets.event.endTime
eventTickets.ticket.ticketNumber
eventTickets.ticket.orderNumber
eventTickets.ticket.groupingId
eventTickets.ticket.seatInfo.seat
eventTickets.ticket.seatInfo.row
eventTickets.ticket.seatInfo.section
eventTickets.ticket.seatInfo.gate
eventTickets.ticket.faceValue.amount
eventTickets.ticket.faceValue.currency
PII fields:
PII fields contain Personal Identifiable Data. All PII data is stored encrypted. Because of this, search functionality on PII fields is limited and only supports exact matches.
person.surname
person.forename
person.otherNames
person.salutation
person.suffix
person.displayName
person.gender
person.dateOfBirth
person.emailAddress
person.mobileNumber
person.externalId
Universal fields:
Universal fields are generic fields that are used by all of the protocols.
universal.expiryDate
universal.optOut
Metadata Fields:
Metadata can contain any custom data that isn't covered in the predefined or PII fields. This is where any of your custom fields go.
meta.*
Documentation