List Orders and Attendees
Learn how to list the orders of different categories and attendees using the API call.
Eventbrite provides the ability to retrieve orders and attendees of an event within an organization. The order details are considered confidential and are kept private. Only the organization owner or its member can retrieve this information, and the order owner can see all details.
Retrieve all orders of a specific event
The following URL utilizes the GET
request method to retrieve the list of all orders in an event.
https://www.eventbriteapi.com/v3/events/{event_id}/orders
We provide the {event_id}
of the targeted event in the URL. It returns a paginated response with a list of all orders of the targeted event.
const endpointUrl = new URL('https://www.eventbriteapi.com/v3/events/{{EVENT_ID}}/orders/');const headerParameters = {'Authorization': 'Bearer {{PRIVATE_TOKEN}}','Content-Type': 'application/json'};const options = {method: 'GET',headers: headerParameters,};async function listOrders() {try {const response = await fetch(endpointUrl, options);printResponse(response);} catch (error) {printError(error);}}// Calling function to make API calllistOrders();
- Line 1: We define the endpoint URL; it has
EVENT_ID
as the URL parameter. - Line 3–6: We define the header, which includes the authorization token and content type.
- Line 8–11: We set the API call options by specifying the header and by setting the request method as
GET
. - Line 13–20: We create a function
listOrders
to make an API call using fetch and to handle any exception if it occurs. The custom functionsprintResponse
andprintError
print the respective objects. - Line 23: We invoke the
listOrders
function.
Some important fields of the order
object are given in the table below:
Order Fields
Parameters | Type | Description |
| Object | Contains all details of base price, Eventbrite fee, gross amount, payment fee, and tax |
| String | ID of the order |
| String | Name of the purchaser |
| Strings | Email address of the purchaser |
| String | Status of the ticket; for example, |
| String | ID of the event to which the ticket belongs |
Filter orders
The specific parameters can be appended with the above URL if we want to retrieve the filtered orders. For example, if we want to retrieve orders by a specific email address, we can use the following URL:
https://www.eventbriteapi.com/v3/events/{event_id}/orders/?only_emails={email_address}
A list of some important parameters that can be used to filter the orders is provided below.
Filter Parameters
Field | Type | Description |
| String | Filter event orders by status; possible values are
|
| Datetime | Orders changed on or after this time |
| String [ ] | Orders placed by the email address |
| String [ ] | Exclude orders by the email address in the return object |
| String [ ] | Orders related to specific order status are returned; possible values are |
Below is an example of retrieving the order information for a specific email address. Specify the <email_address>
in the URL in line 1 and run the code.
const endpointUrl = new URL('https://www.eventbriteapi.com/v3/events/{{EVENT_ID}}/orders/?only_emails=<email_address>');const headerParameters = {'Authorization': 'Bearer {{PRIVATE_TOKEN}}','Content-Type': 'application/json'};const options = {method: 'GET',headers: headerParameters,};async function filterOrders() {try {const response = await fetch(endpointUrl, options);printResponse(response);} catch (error) {printError(error);}}// Calling function to make API callfilterOrders();
- Line 1: We define the endpoint URL with
EVENT_ID
and<email_address>
as the URL parameters to retrieve the orders. - Line 8–11: We set the API call options by specifying the header and by setting the request method as
GET
. - Line 13–20: We create a function
filterOrders
to make an API call using fetch and to handle any exception if it occurs. TheprintResponse
andprintError
are the custom functions to print the respective objects. - Line 23: We invoke the
filterOrders
function.
List a specific order
We’ve retrieved all the orders in the above widget. Now, to retrieve the details of a specific order, we will provide a specific order_id
in the URL. The following URL utilizes the GET
request method to fetch the details of a specific order:
https://www.eventbriteapi.com/v3/orders/{order_id}/
It will return the JSON object of the order. Copy any {order_id}
from the output of the above widget and paste it into the widget below to retrieve the specific order.
const endpointUrl = new URL('https://www.eventbriteapi.com/v3/orders/{{ORDER_ID}}/');const headerParameters = {'Authorization': 'Bearer {{PRIVATE_TOKEN}}','Content-Type': 'application/json'};const options = {method: 'GET',headers: headerParameters,};async function listOrder() {try {const response = await fetch(endpointUrl, options);printResponse(response);} catch (error) {printError(error);}}// Calling function to make API calllistOrder();
- Line 1: We define the endpoint URL with
ORDER_ID
as the URL parameter to list the order. - Line 8–11: We set the API call options by specifying the header and by setting the request method as
GET
. - Line 13–20: We create a function
listOrder
to make an API call using fetch and to handle any exception if it occurs. The custom functionsprintResponse
andprintError
print the respective objects. - Line 23: We invoke the
listOrder
function.
Retrieve attendees by event
The attendees of an event can be retrieved using the event ID. The following URL utilizes the GET
request method to retrieve the attendees:
https://www.eventbriteapi.com/v3/events/{event_id}/attendees/
const endpointUrl = new URL('https://www.eventbriteapi.com/v3/events/{{EVENT_ID}}/attendees');const headerParameters = {'Authorization': 'Bearer {{PRIVATE_TOKEN}}','Content-Type': 'application/json'};const options = {method: 'GET',headers: headerParameters,};async function retrieveAttendees() {try {const response = await fetch(endpointUrl, options);printResponse(response);} catch (error) {printError(error);}}// Calling function to make API callretrieveAttendees();
- Line 1: We define the endpoint URL; it has
EVENT_ID
as the URL parameter to retrieve the attendees list. - Line 8–11: We set the API call options by specifying the header and by setting the request method as
GET
. - Line 13–20: We create a function
retrieveAttendees
to make an API call using fetch and handling any exception if it occurs. The custom functionsprintResponse
andprintError
print the respective objects. - Line 23: We invoke the
retrieveAttendees
function.