Venue Creation
Learn to create, update and retrieve a venue using Eventbrite API.
We'll cover the following
An event can be online or has a venue where it will take place. If we’ve set the value of online_event
to true
, the event will not have any venue. On the other hand, if we want to conduct the event at a particular place, we need to create a venue object and associate it with the event.
Create venue
The following URL uses the POST
method to create a venue within an organization.
https://www.eventbriteapi.com/v3/organizations/{organization_id}/venues/
Request parameters
Some important request parameters are as follows:
Object | Type | Category | Description |
| string | required | This object indicates the name of the venue. |
| enum | optional | This object indicates the age bracket for the audience. |
| number | optional | This object indicates the capacity of venue for the audience. |
| string | optional | This object indicates the google place id for the venue. |
| string | optional | This object indicates the id of the organizer from the team associated with the venue. |
| string | optional | This object indicates part 1 of the address. |
| string | optional | This object indicates part 2 of the address. |
| string | optional | This object indicates the city of the venue. |
| string | optional | This object lists the ISO 3166-2 2- or 3-character region code for the state, province, region, or district. |
| string | optional | This object indicates the postal code of the venue. |
| string | optional | This object lists the ISO 3166-1 2-character international code for the country. |
| string | optional | This object indicates the latitude of the venue address. |
| string | optional | This object indicates the longitude of the venue address. |
Response parameters
The response object will have the same parameters except the following:
Object | Type | Description |
| string | This object indicates the unique ID of the venue. |
| string | This object indicates the resource uri of the venue. |
The response object has separated address attributes and a combined address as localized_multi_line_address_display
. If we haven’t specified the latitude
and longitude
, the API will find the possible values of latitude
and longitude
from the addresses and assign them.
Let’s try to create a venue using the API call. You can overwrite the values of your choice in the request object values
.
import requestsimport jsonurl = 'https://www.eventbriteapi.com/v3/organizations/{{ORGANIZATION_ID}}/venues/'headers = {'Authorization': 'Bearer {{PRIVATE_TOKEN}}','Content-Type': 'application/json'}values = json.dumps({"venue": {"name": "Venue Name","address": {"address_1": "Enter address_1 here","address_2": "Enter address_2 here","city": "city name","country": "US"}}})response = requests.request("POST", url, headers=headers, data=values).json()print(json.dumps(response, indent=4))
We can assign the venue id
to an event using the update call or create the venue object beforehand and provide it during the event creation.
Update venue
We can update the details of the venue. The following URL uses the POST
method to update the venue:
https://www.eventbriteapi.com/v3/venues/{venue_id}/
The venue_id
is required to update the venue. We can update every attribute except venue id
. This API call returns the updated object of the venue.
Let’s try an example to update venue.name
and venue.address.city
.
import requestsimport jsonurl = 'https://www.eventbriteapi.com/v3/venues/{{VENUE_ID}}/'headers = {'Authorization': 'Bearer {{PRIVATE_TOKEN}}','Content-Type': 'application/json'}values = json.dumps({"venue": {"name": "New venue name","address": {"city": "New city name"}}})response = requests.request("POST", url, headers=headers, data=values).json()print(json.dumps(response, indent=4))
List venues
We can list all the venues within an organization. The following URL uses the GET
method to list the venues:
https://www.eventbriteapi.com/v3/organizations/{organization_id}/venues/
The organization_id
is required for this API call. It returns a paginated object with a list of venues.
import requestsimport jsonurl = 'https://www.eventbriteapi.com/v3/organizations/{{ORGANIZATION_ID}}/venues/'headers = {'Authorization': 'Bearer {{PRIVATE_TOKEN}}','Content-Type': 'application/json'}response = requests.request("GET", url, headers=headers).json()print(json.dumps(response, indent=4))