YGO API
  1. Bookings
YGO API
  • Overview
  • Core Concepts
  • Authentication
  • Quickstart Guide
  • AI Search & Trip Planning
  • Booking Flow
  • Environments
  • General
    • Check API health status
      GET
    • Get current API key context
      GET
  • AI Search & Trip Planning
    • Send message to YGO AI
      POST
  • Product Search (Classic)
    • Search for hotel & package offers
      POST
    • Get transfers for booking
      POST
    • Get package price calendar
      POST
  • Bookings
    • Get or create open booking
      POST
    • Update open booking
      POST
    • Update booking status and trigger workflows
      POST
    • List bookings
      POST
    • Get booking
      POST
  • Schemas
    • Schemas
      • PackageSearchRequest
      • GetTransfersRequest
      • GetOpenBookingRequest
      • SaveOpenBookingRequest
      • SaveBookingStatusRequest
      • ListBookingsRequest
      • GetBookingRequest
      • GetPackageCalendarRequest
      • Product
      • TransferOptionsResponse
      • Booking
      • ProductTexts
      • TransferOption
      • BookingDetails
      • TripReference
      • PackageCalendarResponse
      • LocaleContent
      • Trip
      • BookingItemInput
      • PackageCalendarDate
      • ProductImage
      • TransferImage
      • BookingItem
      • ProductDetails
      • PickupInformation
      • Traveller
      • PackageOffer
      • PickupLocation
      • TourOperator
      • Pickup
      • Image
      • Accommodation
      • CheckPickup
      • Room
      • TransferRemark
      • Transport
      • CancellationPolicy
      • Flight
      • Airport
      • Price
      • PriceByPax
      • SuccessResponse
      • ErrorResponse
      • Hotel
      • HotelFeatures
      • FeatureState
      • RoomFeatures
      • RoomContent
      • Facility
    • Response
      • Unauthorized
  1. Bookings

List bookings

POST
/v1/listBookings
Retrieve a filtered and paginated list of bookings. Supports filtering by user, status (e.g., only paid bookings), product ID (all bookings for a specific trip), date ranges (bookings created within a time period), and host (bookings from specific whitelabel domains). Results can be sorted by creation date in ascending or descending order, and paginated using limit/offset parameters.

Request

Authorization
or
Body Params application/json

Examples

Responses

🟢200OK
application/json
Successfully retrieved filtered list of bookings
Body

🟠400Bad Request
🟠401Unauthorized
🔴500Server Error
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location --request POST 'https://api.ygo.ai/v1/v1/listBookings' \
--header 'Content-Type: application/json' \
--data-raw '{
    "UserID": "user_abc123xyz",
    "FilterByUserID": true
}'
Response Response Example
200 - List of multiple bookings
{
    "Data": [
        {
            "ID": "X9Y8Z7W6",
            "UserID": "user_abc123xyz",
            "ProductID": 67890,
            "Status": "paid",
            "Details": {
                "Trip": {
                    "ProductID": 67890,
                    "Name": "Gran Hotel Bahía del Duque - 5 Nights + Flights",
                    "Description": "Exclusive 5-star resort in Tenerife with direct flights from London",
                    "StartDate": "2025-12-10",
                    "EndDate": "2025-12-15",
                    "City": "Costa Adeje",
                    "Country": "Spain",
                    "CountryCode": "ES"
                },
                "Items": [
                    {
                        "ID": "item_activity_001",
                        "ProductID": 78901,
                        "Type": "activity",
                        "Name": "Teide National Park Stargazing Tour",
                        "Quantity": 2,
                        "Status": "booked"
                    }
                ],
                "Travellers": [
                    {
                        "FirstName": "John",
                        "LastName": "Smith",
                        "Type": "adult"
                    },
                    {
                        "FirstName": "Sarah",
                        "LastName": "Smith",
                        "Type": "adult"
                    }
                ],
                "FirstName": "John",
                "LastName": "Smith",
                "Email": "john.smith@example.com",
                "TotalPrice": {
                    "Amount": 2845,
                    "Currency": "EUR"
                },
                "Locale": "en",
                "Shop": "ygotrips",
                "Host": "ygo.ai"
            },
            "CreatedAt": "2025-10-14T10:20:00Z",
            "UpdatedAt": "2025-10-16T16:00:00Z"
        },
        {
            "ID": "A1B2C3D4",
            "UserID": "user_abc123xyz",
            "ProductID": 12345,
            "Status": "booked",
            "Details": {
                "Trip": {
                    "ProductID": 12345,
                    "Name": "Hotel Arts Barcelona - 7 Nights",
                    "Description": "Luxurious 5-star beachfront hotel in Barcelona",
                    "StartDate": "2025-11-15",
                    "EndDate": "2025-11-22",
                    "City": "Barcelona",
                    "Country": "Spain",
                    "CountryCode": "ES"
                },
                "Items": [],
                "Travellers": [
                    {
                        "FirstName": "John",
                        "LastName": "Smith",
                        "Type": "adult"
                    }
                ],
                "FirstName": "John",
                "LastName": "Smith",
                "Email": "john.smith@example.com",
                "TotalPrice": {
                    "Amount": 1850,
                    "Currency": "EUR"
                },
                "Locale": "en",
                "Shop": "ygotrips",
                "Host": "ygo.ai"
            },
            "CreatedAt": "2025-10-15T14:30:00Z",
            "UpdatedAt": "2025-10-17T09:15:00Z"
        },
        {
            "ID": "P5Q6R7S8",
            "UserID": "user_abc123xyz",
            "ProductID": 45678,
            "Status": "open",
            "Details": {
                "Trip": {
                    "ProductID": 45678,
                    "Name": "Hilton Garden Inn Rome - 4 Nights",
                    "StartDate": "2026-01-20",
                    "EndDate": "2026-01-24",
                    "City": "Rome",
                    "Country": "Italy",
                    "CountryCode": "IT"
                },
                "Items": [],
                "Travellers": [],
                "FirstName": "",
                "LastName": "",
                "Email": "",
                "TotalPrice": {
                    "Amount": 0,
                    "Currency": "EUR"
                },
                "Locale": "en"
            },
            "CreatedAt": "2025-10-16T16:30:00Z",
            "UpdatedAt": "2025-10-16T16:30:00Z"
        }
    ],
    "Error": null
}
Modified at 2025-10-16 13:54:41
Previous
Update booking status and trigger workflows
Next
Get booking
Built with