Get Event data with ticket available count

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

In order to get the information of tickets from the response object, you can use the following example:

// resp is the response object got from the API call
const data = resp['data']; // actual data
const tickets = data['normalDisplayTicketList']; // array of tickets which are set to allow for bookings

// loop through tickets
const ticketsLen = tickets.length;
for (var i = 0; i < ticketsLen; i++) {
  
  const ticketFullInfo = tickets[i]; // will hold the ticket info with available count
  
  const ticket = ticketFullInfo['ticket']; // Static info of ticket like - name, total count, sales start/end dates, price etc
  
  const ticketName = ticket['ticketName']; // Ticket name
  const ticketPrice = ticket['ticketPrice']; // Ticket price
  const totalTicketCount = ticket['totalTickets']; // Total tickets can be purchased 
  
  const availableTicketCount = ticketFullInfo['availableCount']; // Number of tickets which are currently available
}
Query Params
string
required

Event code is unique short name for an event. It is a required query parameter. If your event link is http://www.townscript.com/example then event code will be example.

Headers
string
required

You should be passing Token which was retrieved in above API.

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json