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

Update open booking

POST
/v1/saveOpenBooking
Update an existing open booking (shopping cart) with modified details including traveler information, contact data, added items (activities, transfers), and pricing. The endpoint validates booking ownership, ensures the ProductID hasn't changed, cleans invalid items, validates voucher codes, and optionally performs real-time availability checks. Query parameters control availability checking behavior: checkAvailability=true validates item availability, while checkBeforePayment=true performs comprehensive pre-payment validation including price verification with the package provider. The UserID parameter identifies the end customer.

Request

Authorization
or
Query Params

Body Params application/json

Examples

Responses

🟢200OK
application/json
Successfully updated the open 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/saveOpenBooking?checkAvailability=undefined&checkBeforePayment=undefined' \
--header 'Content-Type: application/json' \
--data-raw '{
    "ID": "A1B2C3D4",
    "UserID": "user_abc123xyz",
    "ProductID": 12345,
    "Status": "open",
    "Details": {
        "Trip": {
            "ProductID": 12345
        },
        "Items": [],
        "Travellers": [
            {
                "FirstName": "John",
                "LastName": "Doe",
                "DateOfBirth": "1985-03-20",
                "Age": 40,
                "Type": "adult"
            },
            {
                "FirstName": "Jane",
                "LastName": "Doe",
                "DateOfBirth": "1988-07-15",
                "Age": 37,
                "Type": "adult"
            }
        ],
        "FirstName": "John",
        "LastName": "Doe",
        "Email": "john.doe@example.com",
        "Phone": "+44 7700 900123",
        "TotalPrice": {
            "Amount": 1850,
            "Currency": "EUR"
        }
    }
}'
Response Response Example
200 - Successfully updated booking with travelers
{
    "Data": {
        "ID": "A1B2C3D4",
        "UserID": "user_abc123xyz",
        "ProductID": 12345,
        "Status": "open",
        "Details": {
            "Trip": {
                "ProductID": 12345,
                "Name": "Hotel Arts Barcelona - 7 Nights",
                "Description": "Luxurious 5-star beachfront hotel in Barcelona with stunning Mediterranean views",
                "Images": [
                    {
                        "URL": "https://cdn.ygo.ai/hotels/12345/main.jpg",
                        "Width": 1920,
                        "Height": 1080,
                        "Type": "main"
                    }
                ],
                "StartDate": "2025-11-15",
                "EndDate": "2025-11-22",
                "City": "Barcelona",
                "Country": "Spain",
                "CountryCode": "ES",
                "Latitude": 41.3851,
                "Longitude": 2.1734
            },
            "Items": [],
            "Travellers": [
                {
                    "FirstName": "John",
                    "LastName": "Doe",
                    "DateOfBirth": "1985-03-20",
                    "Age": 40,
                    "Type": "adult"
                },
                {
                    "FirstName": "Jane",
                    "LastName": "Doe",
                    "DateOfBirth": "1988-07-15",
                    "Age": 37,
                    "Type": "adult"
                }
            ],
            "FirstName": "John",
            "LastName": "Doe",
            "Email": "john.doe@example.com",
            "Phone": "+44 7700 900123",
            "Street": "",
            "ZipCode": "",
            "City": "",
            "CountryCode": "",
            "TotalPrice": {
                "Amount": 1850,
                "Currency": "EUR"
            },
            "Locale": "en",
            "IsRobot": false,
            "Shop": "ygotrips",
            "Host": "ygo.ai"
        },
        "CreatedAt": "2025-10-15T14:30:00Z",
        "UpdatedAt": "2025-10-16T10:15:00Z"
    },
    "Error": null
}
Modified at 2025-10-16 13:37:58
Previous
Check offer availability
Next
Update booking status and trigger workflows
Built with