Ticketbud APIbeta

* At this moment the Ticketbud Api is in BETA state, and is read-only. We will be adding the ability to create events, and purchase tickets through the API.

Example Client Application

Step 1: Create Your Application

  1. Go to "My Account"
  2. Go to "My Applications"
  3. Click on "New Application"
  4. Give your Application a unique name, and setup the callback URL to your application.

Step 2: Authorize

  1. Go to "My Account"
  2. Go to "My Applications"
  3. Click on the Name of your application
  4. Click on the "Authorize" button

This will prompt you to "Authorize" your Ticketbud application with your client application. When you are finished you will be redirected to your callback url.

Step 3: Save your Token

  1. Now that you have authorized your application and have been redirected to your client application, you should have captured your access_token. You are free to now use the Ticketbud API.
  2. all API calls will need to include this access token as a parameter.

Manual Authentication

Authorization:

To request an authorization, you need to have an application setup on ticketbud. Then its as simple as directing a user to authorize at the url below:

https://api.ticketbud.com/oauth/authorize?response_type=code&client_id=your_app_id&redirect_url=your_callback_url

Requesting an Access Token:

When you authorize above and accept the authorization, the response will contain a "code" parameter. To request an access token in your callback you would:

curl https://api.ticketbud.com/oauth/token \
-X POST \
-H Content-Type:application/json
-d "client_id=your_app_id" \
-d "client_secret=your_secret" \
-d "code=CODE_FROM_ABOVE" \
-d "grant_type=authorization_code" \
-d "redirect_uri=your_callback_url"

Will result in the response:

{
"access_token": "some_long_unique_token_much_longer_than_this",
"token_type": "bearer",
"expires_in": 7200,
"refresh_token": "some_long_unique_refresh_token_much_longer_than_this"
}

You should then persist this access_token as it will be required to make api requests.

Accessing User Current User Credentials

Often times you want to know more about the ticketbud user that you are integrating into your system.

curl https://api.ticketbud.com/me.json

If the user is logged in to Ticketbud and authorized for your application you will receive the following response:

{
user: {
id: xxxxxx,
full_name: "Ticketbud Terry",
first_name: "Ticketbud",
last_name: "Terry",
email: "ticketbud.terry@somedomain.com",
default_subdomain: "greatevents",
event_ids: [
xxxxxxxx,
xxxxxxxx,
...
]
}
}

Your Events

curl https://api.ticketbud.com/events.json?access_token=your_access_token

This is json response of all of your events.

{
events: [
{
id: 1749846778,
title: "My Great Get Together Support a Good Cause",
event_start: "2012-06-14T21:00:00-05:00",
event_end: "2012-06-29T21:00:00-05:00",
time_zone: "Central Time (US & Canada)",
image: "/path/to/event_image",
tickets_available: 500,
sold_out: false,
over: true,
organizer_id: 10437567843,
event_location: {
address: null,
address2: null,
city: null,
state: null,
zip: null,
country: null,
latitude: "1.000000",
longitude: "0.00000",
name: null,
location: "123 Street Name, Anywhere in the world"
}
},
...]
}

A Single Event

curl https://api.ticketbud.com/events/:id.json?access_token=your_access_token

This is a json reponse for a single event.

{
event: {
id: 1749846778,
title: "My Great Get Together Support a Good Cause",
event_start: "2012-06-14T21:00:00-05:00",
event_end: "2012-06-29T21:00:00-05:00",
time_zone: "Central Time (US & Canada)",
image: "/path/to/event_image",
tickets_available: 500,
sold_out: false,
over: true,
organizer_id: 10437567843,
event_location: {
address: null,
address2: null,
city: null,
state: null,
zip: null,
country: null,
latitude: "1.000000",
longitude: "0.00000",
name: null,
location: "123 Street Name, Anywhere in the world"
}
}

Event Fields

id:  Unique id used to retrieve your event.
title:  Title of your event.
event_start:  UTC start time of the event.
event_end:  UTC end time of the event.
time_zone:  The time zone where the event occurs.
image:  The event image
tickets_available:  The number of tickets available across all your tickets in your event.
sold_out:  A boolean designating whether your event is sold out.
over:  A boolean indicating if your event is over.
organizer_id:  The unique id for the organizer.
event_location:  A container for the events location data.
event_location.address:  The first address line set for the event.
event_location.address2:  The second address line set for the event.
event_location.city:  The city where the event is ocurring.
event_location.state:  The state/province where the event is ocurring.
event_location.zip:  The zip/postal code where the event is ocurring.
event_location.country:  The country where the event is ocurring.
event_location.latitude:  The latitude where the event is ocurring.
event_location.longitude:  The longitude where the event is ocurring.
event_location.name:  A name for the venue where this event is occuring.
event_location.location:  A single string containing the pertainent location data for the event.

Tickets for an Event

curl https://api.ticketbud.com/events/:event_id/tickets.json?access_token=your_access_token

This is a json reponse for all tickets to an event.

{
tickets: [
{
id: 58363856478,
event_id: 132643,
name_on_ticket: "Sam I Am",
email: "samiam@drseuss.com",
checked_in: false,
barcode: "4011c03c56ea1c1707a8769a3dade0b52ce9f3b8",
barcode_url: "https://chart.googleapis.com/chart?cht=qr&chs=200x200&chl=4013c03c34eb1c17000a7a69a3dade0b52cef93b8&chld=H|0",
ticket_type: "General Admission",
purchaser: {
status: "free",
full_name: "Cat In The Hat",
email: "catinthehat@drseuss.com"
price_paid: 0,
total_quantity: 3
},
custom_fields: [
{
label: "Do you like Green Eggs and Ham?",
response: "I'd eat them anywhere"
}
]
},
},
...]}

A Single Ticket

curl https://api.ticketbud.com/events/:event_id/tickets/:id.json?access_token=your_access_token

This is a json reponse for a single ticket.

{
ticket: {
id: 58363856478,
event_id: 132643,
name_on_ticket: "Sam I Am",
checked_in: false,
barcode: "4011c03c56ea1c1707a8769a3dade0b52ce9f3b8",
barcode_url: "https://chart.googleapis.com/chart?cht=qr&chs=200x200&chl=4013c03c34eb1c17000a7a69a3dade0b52cef93b8&chld=H|0",
ticket_type: "General Admission",
purchaser: {
status: "free",
full_name: "Cat In The Hat",
price_paid: 0,
total_quantity: 3
},
custom_fields: [
{
label: "Do you like Green Eggs and Ham?",
response: "I'd eat them anywhere"
}
]
}
}

Ticket Fields

id:  Unique id used to retrieve your ticket.
event_id:  The id of the event that this ticket belongs to.
name_on_ticket:  The name of the ticket holder.
checked_in:  A boolean indicating whether the ticket has been checked in.
barcode:  The unique barcode given to the ticket.
barcode_url:  A url to view the scannable QR code for the ticket.
ticket_type:  The name of the ticket that was sold.
purchaser:  A container holding information about the purchaser of the ticket
purchaser.status:  The status of this ticket sale, one of incomplete,attempted,pending,paid,comp,free
purchaser.full_name:  The full name of the purchaser.
purchaser.price_paid:  The price paid for all tickets in this purchase.
purchaser.total_quantity:  The number of tickets in this purchase made by this purchaser.
custom_fields:  A container for all custom fields included in the purchase (if any)
custom_fields[index].label:  The label for the custom form field.
custom_fields[index].response:  The response this ticket holder made to the above label.