Skip to content

Fetch Events

This endpoint can be used to fetch a list of upcoming events. The response provides full details for the event including dates, times, description, terms, images, and pricing for all possible ticket variants.

Making the Request

Method
GET

Endpoint
/v2/consumer/event/

Request Parameters
None

Auth Required
Yes

Example Request

cURL

bash
curl -X GET \
  https://tbe.thuprai.com/v2/consumer/event/ \
  -H 'Authorization: Bearer <your-auth-token>'

Python

python
import requests

url = 'https://tbe.thuprai.com/v2/consumer/event/'
headers = {'Authorization': 'Bearer <your-auth-token>'}
response = requests.get(url, headers=headers)
print(response.text)

Success Response

Code : 200 OK

json
[
  {
    "id": 513,
    "slug": "concert-by-night",
    "title": "Event Title Goes Here",
    "nepali_title": null,
    "subtitle": "Studio Theatre",
    "start_date": "2023-08-20",
    "start_time": "05:50 PM",
    "start_time_24": "17:50:00",
    "date_info": "Sunday, August 20, 2023",
    "time_info": "Gate opens at 5:50 PM",
    "introduction": "<p>This is the introduction.</p>",
    "organizer_text": "Studio Theatre",
    "excerpt": "This is the full content, not the introduction. Concert by Night @ Studio Theatre\r\n\r\nStudio Theatre, Pinglasthan, Gaushala. This is the full content, not",
    "location": "27.69960204506183,85.34265518188477",
    "venue": "Studio Theatre, Pinglasthan, Gaushala",
    "content": "<p>This is the full content, not the introduction. Concert by Night @ Studio Theatre</p>\r\n\r\n<p>Studio Theatre, Pinglasthan, Gaushala.&nbsp;This is the full content, not the introduction. Concert by Night @ Studio Theatre.&nbsp;This is the full content, not the introduction. Concert by Night @ Studio Theatre.&nbsp;This is the full content, not the introduction. Concert by Night @ Studio Theatre.&nbsp;This is the full content, not the introduction. Concert by Night @ Studio Theatre.&nbsp;This is the full content, not the introduction. Concert by Night @ Studio Theatre.</p>\r\n\r\n<ul>\r\n\t<li>a</li>\r\n\t<li>b</li>\r\n</ul>\r\n\r\n<p>&nbsp;</p>",
    "terms": "<p>• One Event pass admits one.<br>• Reentry will...",
    "video_embed_link": null,
    "map_link": "http://maps.google.com/maps?&z=18&q=27.69960204506183+85.34265518188477&ll=27.69960204506183+85.34265518188477",
    "image": "http://127.0.0.1:8000/media/__sized__/event/WhatsApp_Image_2022-08-17_at_9.36.17_AM-thumbnail-960x480-70.jpeg",
    "featured_image": "http://127.0.0.1:8000/media/__sized__/event/featured_image/Hiunko_prithvi_yatra_-_drama-crop-c0-5__0-5-1200x630-70.jpg",
    "tickets_sold_out": false,
    "completed": false,
    "event_instances": [
      {
        "id": 1726,
        "start_date": "2026-08-28",
        "start_time": "17:50:00",
        "end_date": "2026-08-28",
        "end_time": "20:00:00"
      }
    ],
    "instance_variants": [
      {
        "id": 1521,
        "product_id": 103659,
        "title": "Early Bird",
        "mrp": 1695,
        "selling_price": 1130,
        "instance_id": 1726,
        "quantity_left": 12
      }
    ],
    "variants": [
      {
        "id": 101,
        "title": "Early Bird",
        "mrp": 1695,
        "selling_price": 1130
      }
    ]
  }
]

Notes

  • The instance_variants key in the response lists all possible ticket options with price. While title denotes the ticket type, tickets are to be made available for purchase at the value described by selling_price.

  • Displaying values in date_info and time_info should be preferred over values in start_date and end_date while showing details of the event. start_date, end_date are made available so that the consumer can synchronize it in its database and use the values for sorting/ordering the events.

  • Use instance_variants[].id as instance_variant_id when generating tickets.

  • instance_variants[].instance_id matches event_instances[].id.

  • completed - event start time has passed.

  • tickets_sold_out - event is marked sold out. Check quantity_left for stock.