Skip to main content
POST
/
api
/
bookings
Book a seat for an event
curl --request POST \
  --url https://tandem.hlofiys.xyz/api/bookings \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "event_id": 123,
  "seat_ids": [
    101,
    102,
    103
  ]
}
'
{
  "booking_id": 123,
  "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "event_id": 123,
  "seat_id": 123,
  "is_paid": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
event_id
integer<int64>
required

The unique identifier for the event

seat_ids
integer<int64>[]
required

An array of unique identifiers for the seats to be booked.

Example:
[101, 102, 103]

Response

Booking created successfully

booking_id
integer<int64>
required
user_id
string<uuid>
required
event_id
integer<int64>
required
seat_id
integer<int64>
required
is_paid
boolean
required

Indicates whether the booking has been paid for. false for initial reservation

created_at
string<date-time>
required
updated_at
string<date-time>
required