Skip to main content

Get Tickets By Event ID

Introduction

The Get Tickets By Event ID API allows you to retrieve ticket details for a specific event based on the event ID. This API provides information about ticket types, ticket prices, ticket availability, and more.

Retrieve Tickets

To retrieve a ticket, you need to send an HTTP POST request to the following endpoint:

Endpoint

https://api.paydexp.com/v1/event/{event_id}/tickets

Authorization

Users need to include basic authentication credentials in the request headers.

AUTHORIZATION: Basic Auth

Username <username>
Password <password>

Code Examples

Below are code examples in different programming languages demonstrating how to retrieve event details using HTTP POST requests.

curl --location --request POST 'https://api.paydexp.com/api/v1/event/79/tickets' \
--header 'Authorization: ••••••'

Example of a successful response

{
"success": true,
"data": [
{
"id": 118,
"name": "Regular Tickets",
"price": "KES 100.00",
"description": "These tickets are for all regular attendees. It is limited to just a gate pass only.",
"quantity": 250,
"is_sold_out": 0,
"per_person_limit": 0,
"people_per_ticket": null,
"status": "active",
"pay_later": 0,
"is_private": 0,
"private_token": null,
"sale_start_date": " 10:00:00",
"sale_end_date": " 10:00:00"
},
{
"id": 119,
"name": "VIP",
"price": "KES 15.00",
"description": "These tickets include a gate pass and a reserved lounge for all guests.",
"quantity": 50,
"is_sold_out": 0,
"per_person_limit": 0,
"people_per_ticket": null,
"status": "active",
"pay_later": 0,
"is_private": 0,
"private_token": null,
"sale_start_date": " 10:00:00",
"sale_end_date": " 10:00:00"
},
{
"id": 120,
"name": "Couple Ticket",
"price": "KES 18.00",
"description": "These tickets are gate passes for two people.",
"quantity": 100,
"is_sold_out": 0,
"per_person_limit": 0,
"people_per_ticket": 2,
"status": "active",
"pay_later": 0,
"is_private": 0,
"private_token": null,
"sale_start_date": " 10:00:00",
"sale_end_date": " 10:00:00"
},
{
"id": 121,
"name": "Will",
"price": "KES 100.00",
"description": "Yessie",
"quantity": 0,
"is_sold_out": 1,
"per_person_limit": 0,
"people_per_ticket": null,
"status": "active",
"pay_later": 0,
"is_private": 0,
"private_token": null,
"sale_start_date": "2024-03-28 10:00:00",
"sale_end_date": "2024-11-30 10:00:00"
}
],
"message": "Tickets retrieved successfully."
}

Conclusion

The Get Tickets By Event ID API provides detailed information about tickets available for a specific event. By using this API, you can retrieve ticket details such as ticket names, prices, descriptions, quantities, and more. This information can help you manage ticket sales effectively and provide a seamless experience for event attendees.