3. Book (Confirm a booking)
The Booking Mutation is the final step in the reservation process, where a confirmed booking is created using the Prebook ID.
This ensures that the previously validated rate and availability are honored. During this step, the system processes the booking by registering the guest details, payment method, and any required metadata. If successful, the response will include a Booking ID, which serves as the unique reference for the reservation.
Request body
mutation Liteapi {
liteapi {
book(
input: {
optionRefId: "hU8ccug2o"
clientReference: "JD123"
holder: { name: "John", surname: "Doe" }
remarks: "quiet room please"
rooms: [
{
occupancyRefId: 1
paxes: [
{ name: "John", surname: "Doe", age: 30 }
{ name: "Jane", surname: "Smith", age: 30 }
]
}
]
}
settings: { client: "Sample customer", context: "1", timeout: 60000 }
) {
booking {
status
billingSupplierCode
supplierCode
accessCode
remarks
reference {
client
supplier
hotel
bookingID
hotelConfirmationNumberStatus
amendmentID
}
price {
currency
binding
net
gross
minimumSellingPrice
exchange {
currency
rate
}
markups {
type
value
}
}
holder {
name
surname
}
hotel {
bookingDate
start
end
hotelCode
hotelName
boardCode
occupancies {
id
paxes {
age
}
}
rooms {
occupancyRefId
code
description
refundable
beds
ratePlans {
start
end
code
name
}
}
}
cancelPolicy {
refundable
cancelPenalties {
deadline
isCalculatedDeadline
penaltyType
currency
value
}
}
}
}
}
}
Sample response body
{
"data": {
"hotelX": {
"book": {
"booking": {
"status": "OK",
"billingSupplierCode": null,
"supplierCode": "NUI2",
"accessCode": null,
"remarks": "good room",
"reference": {
"client": "Zak123",
"supplier": "JZFm9tMZ5",
"hotel": null,
"bookingID": "JZFm9tMZ5",
"hotelConfirmationNumberStatus": null,
"amendmentID": null
},
"price": {
"currency": "USD",
"binding": false,
"net": 55.97,
"gross": null,
"minimumSellingPrice": null,
"exchange": {
"currency": "USD",
"rate": 1
},
"markups": null
},
"holder": {
"name": "Zak",
"surname": "Ben"
},
"hotel": {
"bookingDate": "2025-02-24",
"start": "2025-07-01",
"end": "2025-07-02",
"hotelCode": "lp8DE72",
"hotelName": "",
"boardCode": "BB",
"occupancies": null,
"rooms": null
},
"cancelPolicy": {
"refundable": true,
"cancelPenalties": [
{
"deadline": "2025-06-29 22:59:00",
"isCalculatedDeadline": true,
"penaltyType": "IMPORTE",
"currency": "USD",
"value": 52.81
}
]
}
}
}
}
}
}
Updated 4 days ago