Sales and Attendees Reports
Learn how to generate sales and attendees reports using the Eventbrite API.
We'll cover the following
The Eventbrite API provides the ability to generate reports. It allows the generation of two types of reports: sales activity and attendees for an event.
Sales report
We can generate the report of our sales for an event. The following URL utilizes the GET
request method to generate the sales report:
https://www.eventbriteapi.com/v3/organizations/{organization_id}/reports/sales/?event_ids={event_id}
Request parameters
The request parameters required for this API call are as follows:
Object | Type | Category | Description |
| String [ ] | Required | IDs of the events we are generating the sales reports of |
| String | Optional | Status of the event; possible values are |
| String | Optional | Start date of the event |
| String | Optional | End date of the event |
| String | Required | It's a filter, and we can include more than one filter |
| String | Optional | Group the return data by specified variable; possible values are |
| Integer | Optional | Time period in units of the selected |
| String | Optional | Date period; possible values are |
| String | Optional | Timezone of the event. If unspecified, by default, the value is the timezone of the first event. |
Let’s run an example to retrieve the sale report of an event. Click “Run” to execute the code.
const endpointUrl = new URL('https://www.eventbriteapi.com/v3/organizations/{{ORGANIZATION_ID}}/reports/sales/?event_ids={{EVENT_ID}}');const headerParameters = {'Authorization': 'Bearer {{PRIVATE_TOKEN}}'};const options = {method: 'GET',headers: headerParameters,};async function retrieveSalesReport() {try {const response = await fetch(endpointUrl, options);printResponse(response);} catch (error) {printError(error);}}// Calling function to make API callretrieveSalesReport();
- Line 1: We define the endpoint URL with
{ORGANIZATION_ID}
as the URL parameter and the filter parameter asevent_ids
. - Line 12–19: We create a function,
retrieveSalesReport
, to make an API call using fetch and to handle any exception if it occurs. The custom functionsprintResponse
andprintError
print the respective objects. - Line 22: We invoke the
retrieveSalesReport
function.
Response fields
The object array in the output JSON response has the following important fields:
Object | Type | Description |
| String | Timezone of the event |
| String [ ] | List of public events IDs |
| String | Date of the event when it happens |
| String [ ] | Topic related to the event |
| String | Local start time of the event |
| String | ISO 4217 3-letter currency |
| Integer | Gross sale of the tickets |
| Integer | Price of the ticket with any other charges |
| Integer | Total quantity of the tickets sold |
| Integer | Total fees of Eventbrite's platform |
| Integer | Total amount collected from the ticket sales as royalty |
Attendees report
We can generate the report of our attendees for an event. The following URL utilizes the GET
request method to generate the attendees report:
https://www.eventbriteapi.com/v3/organizations/{ORGANIZATION_ID}/reports/attendees/?event_ids={EVENT_ID}
Request parameters
The request parameters are the same as for the sales report. Let’s see an example of how to retrieve an attendees report.
const endpointUrl = new URL('https://www.eventbriteapi.com/v3/organizations/{{ORGANIZATION_ID}}/reports/attendees/?event_ids={{EVENT_ID}}');const headerParameters = {'Authorization': 'Bearer {{PRIVATE_TOKEN}}'};const options = {method: 'GET',headers: headerParameters,};async function retrieveAttendeesReport() {try {const response = await fetch(endpointUrl, options);printResponse(response);} catch (error) {printError(error);}}// Calling function to make API callretrieveAttendeesReport();
- Line 1: We define the endpoint URL with
{ORGANIZATION_ID}
as the URL parameter and the filter parameter asevent_ids
. - Line 12–19: We create a function,
retrieveAttendeesReport
, to make an API call using fetch and to handle any exception if it occurs. The custom functionsprintResponse
andprintError
print the respective objects. - Line 22: We invoke the
retrieveAttendeesReport
function.
Response fields
The object array in the output JSON response has the following important fields:
Object | Type | Description |
| String | Timezone of the event |
| String [ ] | List of public events IDs |
| String | Date of the event |
| String [ ] | Topic(s) related to the event |
| String | Local start time of the event |
| Integer | Total number of attendees |
| Integer | Total number of orders |