API Booking Create
Endpoint: bookings/create
Create a booking awaiting payment.
Request
bookingToken
string
✔
From price-check
partnerReference
string ≤ 64
✔
Partner order id, unique; re-sending returns the existing booking
contact.firstName, contact.lastName
string
✔
contact.email
✔
contact.phone
string
✔
Domestic number (0901234567) or with country code (+84901234567)
contact.phoneCode
string
Country code, with or without +; default 84. Required for foreign numbers
rooms[].guests[]
array
✔
{ firstName, lastName, type: ADULT|CHILD, age }
specialRequest
string
{
"bookingToken": "bt_Qw9x...",
"partnerReference": "ORDER-20261115-0001",
"contact": {
"firstName": "An", "lastName": "Nguyen",
"email": "an.nguyen@example.com",
"phone": "0901234567", "phoneCode": "84"
},
"rooms": [{
"guests": [
{ "firstName": "An", "lastName": "Nguyen", "type": "ADULT" },
{ "firstName": "Binh", "lastName": "Tran", "type": "ADULT" },
{ "firstName": "Minh", "lastName": "Nguyen", "type": "CHILD", "age": 6 }
]
}],
"specialRequest": "High floor"
}Response
bookingNumber
string
Gotadi-side booking id
partnerReference
string
status
enum
PENDING_PAYMENT
totalAmount, currency
Amount to collect from the guest
paymentDeadline
date-time
Room-hold deadline, typically ~10 minutes
Collect payment from the guest, then call bookings/commit before paymentDeadline. Past the deadline the booking moves to EXPIRED.
Cập nhật lần cuối