Skip to main content
This walkthrough lists venues, checks availability, and creates a booking.

1) List venues

curl -H "Authorization: Bearer $ACCESS_TOKEN" \
  "https://api.boseat.com/v1/venues?limit=5"
Look for a venue and spaceId you want to book.

2) Get available slots for a space

curl -H "Authorization: Bearer $ACCESS_TOKEN" \
  "https://api.boseat.com/v1/spaces/$SPACE_ID/availability?productId=$PRODUCT_ID&from=2024-07-15T00:00:00Z&to=31"
Choose a slot from the response payload.

3) Create a temporary booking

Create a booking with just the product, seat, and slot. This reserves the slot for 15 minutes:
curl -X POST "https://api.boseat.com/v1/bookings" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "productId": "$PRODUCT_ID",
    "spaceId": "$SPACE_ID",
    "slot": {
      "from": "2024-07-15T09:00:00Z",
      "to": "2024-07-15T10:00:00Z"
    }
  }'
A 201 response returns the booking ID:
{
  "id": "booking-uuid-here"
}

4) Confirm the booking

Update the booking with customer information to confirm it:
curl -X PATCH "https://api.boseat.com/v1/bookings/$BOOKING_ID" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "name": "Ada Lovelace",
    "phone": "+33123456789",
    "status": "CONFIRMED"
  }'

5) Keep in sync

Subscribe to webhooks to track booking updates, cancellations, or payment events. Notes for production:
  • Keep booking creation idempotent by reusing a client-generated idempotency key if you retry.
  • Always send Content-Type: application/json and Authorization: Bearer <token>.
  • Use UTC timestamps (Z) for slot from and to.
  • Confirm bookings within 15 minutes or they expire.