Get a booking by project
The Fstop API allows you to retrieve bookings filtered by a specific project using a query parameter.
In this guide, you’ll make a GET request to the /api/bookings/ endpoint with a project_id query parameter to retrieve all bookings for a specific project.
Before you begin
Section titled “Before you begin”Before you make a GET request, ensure that you have an access token. For instructions on requesting an access token, see Getting started with the Fstop API.
You’ll also need the UUID of the project whose bookings you want to retrieve.
Make a GET request with a query parameter
Section titled “Make a GET request with a query parameter”-
Open a terminal and run the following command:
get_bookings_by_project.sh curl -X GET "http://localhost:8000/api/bookings/?project_id=660e8400-e29b-41d4-a716-446655440000" \-H "Authorization: Bearer YOUR_ACCESS_TOKEN"The API returns a
200 OKand a list of bookings for that project:get_bookings_by_project_response.json [{"id": "770e8400-e29b-41d4-a716-446655440000","project": {"id": "660e8400-e29b-41d4-a716-446655440000","project_name": "Wedding","project_type": "event","client": {"id": "550e8400-e29b-41d4-a716-446655440000","first_name": "John","last_name": "Doe","city": "Cleveland","state": "OH","zip_code": "44122","email": "john.doe@example.com","phone_number": "+12161231234","created_at": "2026-05-21T10:00:00Z"},"created_at": "2026-05-21T10:15:00Z"},"date": "2026-06-15","time": "14:00:00","duration": 480,"location": "Downtown Venue","created_at": "2026-05-21T10:30:00Z"},{"id": "770e8400-e29b-41d4-a716-446655440001","project": {"id": "660e8400-e29b-41d4-a716-446655440000","project_name": "Wedding","project_type": "event","client": {"id": "550e8400-e29b-41d4-a716-446655440000","first_name": "John","last_name": "Doe","city": "Cleveland","state": "OH","zip_code": "44122","email": "john.doe@example.com","phone_number": "+12161231234","created_at": "2026-05-21T10:00:00Z"},"created_at": "2026-05-21T10:15:00Z"},"date": "2026-06-16","time": "10:00:00","duration": 240,"location": "Downtown Venue","created_at": "2026-05-21T10:35:00Z"}] -
Using the Python SDK:
get_bookings_by_project.py from fstop import Fstopwith Fstop(jwt_auth="YOUR_ACCESS_TOKEN") as f_client:bookings = f_client.bookings.list_bookings()# Filter bookings by project_id client-sideproject_id = "660e8400-e29b-41d4-a716-446655440000"filtered = [b for b in bookings if b.project.id == project_id]for booking in filtered:print(f"{booking.date} at {booking.time} - {booking.location}")
You can use the filtered booking data in your application. For example, you could display a timeline of all bookings for a project or check availability before scheduling a new booking.
What to do next
Section titled “What to do next”See GET /api/bookings/ for a full list of request parameters and response schemas.