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.curl --location --request POST 'https://api.ygo.ai/v1/v1/saveOpenBooking?checkAvailability&checkBeforePayment' \
--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"
}
}
}'{
"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
}