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

Get booking

POST
/v1/getBooking
Retrieve a complete booking object by its unique 8-character booking ID. The endpoint validates ownership, ensuring the booking belongs to the authenticated user. Returns the full booking structure including trip information, items (activities, transfers), traveler details, contact information, pricing, payment data, and booking status. The UserID parameter identifies the end customer.

Request

Authorization
or
Body Params application/json

Examples

Responses

🟢200OK
application/json
Successfully retrieved booking
Bodyapplication/json

🟠400Bad Request
🟠401Unauthorized
🟠404Record Not Found
🔴500Server Error
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location 'https://api.ygo.ai/v1/v1/getBooking' \
--header 'Content-Type: application/json' \
--data '{
    "BookingID": "X9Y8Z7W6",
    "UserID": "user_def456uvw"
}'
Response Response Example
200 - Paid booking with activities and full details
{
    "Data": {
        "ID": "X9Y8Z7W6",
        "UserID": "user_def456uvw",
        "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",
                "Images": [
                    {
                        "URL": "https://cdn.ygo.ai/packages/67890/resort.jpg",
                        "Width": 2560,
                        "Height": 1440,
                        "Type": "main"
                    }
                ],
                "StartDate": "2025-12-10",
                "EndDate": "2025-12-15",
                "City": "Costa Adeje",
                "Country": "Spain",
                "CountryCode": "ES",
                "Latitude": 28.0916,
                "Longitude": -16.7352
            },
            "Items": [
                {
                    "ID": "item_activity_001",
                    "ProductID": 78901,
                    "Type": "activity",
                    "Provider": "Musement",
                    "ProviderID": "MUS-ACT-TF-001",
                    "Name": "Teide National Park Stargazing Tour",
                    "Description": "Evening tour to Mount Teide with professional astronomer guide and dinner",
                    "Quantity": 2,
                    "Status": "booked",
                    "TotalPrice": {
                        "Amount": 180,
                        "Currency": "EUR"
                    },
                    "Hash": "a3f8c9d2e1b4f7a6",
                    "Musement": {
                        "OrderID": "ORD-MUS-20251016-001",
                        "OrderStatus": "CONFIRMED",
                        "OrderUpdatedAt": "2025-10-16T16:05:00Z"
                    }
                },
                {
                    "ID": "item_activity_002",
                    "ProductID": 78902,
                    "Type": "activity",
                    "Provider": "Musement",
                    "ProviderID": "MUS-ACT-TF-002",
                    "Name": "Whale & Dolphin Watching Cruise",
                    "Description": "3-hour catamaran cruise with marine wildlife spotting and snorkeling",
                    "Quantity": 2,
                    "Status": "booked",
                    "TotalPrice": {
                        "Amount": 120,
                        "Currency": "EUR"
                    },
                    "Hash": "b4e9a3c7d2f8e1a5",
                    "Musement": {
                        "OrderID": "ORD-MUS-20251016-002",
                        "OrderStatus": "CONFIRMED",
                        "OrderUpdatedAt": "2025-10-16T16:05:30Z"
                    }
                },
                {
                    "ID": "item_transfer_001",
                    "ProductID": 78903,
                    "Type": "transfer",
                    "Provider": "Exfinity",
                    "ProviderID": "EXF-TRF-TFS-001",
                    "Name": "Airport Transfer - Tenerife South Airport to Hotel",
                    "Description": "Private transfer from TFS airport to Gran Hotel Bahía del Duque",
                    "Quantity": 1,
                    "Status": "booked",
                    "TotalPrice": {
                        "Amount": 45,
                        "Currency": "EUR"
                    },
                    "Hash": "c5d8b4a9e3c7f2b6",
                    "Exfinity": {
                        "BookingReference": "EXF-TFS-20251016-001",
                        "Status": "CONFIRMED"
                    }
                }
            ],
            "Travellers": [
                {
                    "FirstName": "John",
                    "LastName": "Smith",
                    "DateOfBirth": "1985-03-20",
                    "Age": 40,
                    "Type": "adult"
                },
                {
                    "FirstName": "Sarah",
                    "LastName": "Smith",
                    "DateOfBirth": "1988-07-15",
                    "Age": 37,
                    "Type": "adult"
                }
            ],
            "FirstName": "John",
            "LastName": "Smith",
            "Email": "john.smith@example.com",
            "Phone": "+44 7700 900123",
            "Street": "123 High Street",
            "ZipCode": "SW1A 1AA",
            "City": "London",
            "CountryCode": "GB",
            "Invoice": "INV-2025-001234",
            "PaymentMethod": "card",
            "PaymentID": "pi_3N1234567890",
            "PaymentIsSandbox": false,
            "TotalPrice": {
                "Amount": 2845,
                "Currency": "EUR"
            },
            "Locale": "en",
            "IsRobot": false,
            "Shop": "ygotrips",
            "Host": "ygo.ai",
            "UTMSource": "google",
            "UTMCampaign": "winter_sun_2025"
        },
        "CreatedAt": "2025-10-14T10:20:00Z",
        "UpdatedAt": "2025-10-16T16:00:00Z"
    },
    "Error": null
}
Modified at 2025-10-16 13:54:52
Previous
List bookings
Next
PackageSearchRequest
Built with