For the complete documentation index, see llms.txt. This page is also available as Markdown.

API Booking Create

Endpoint: bookings/create

Tạo booking chờ thanh toán.

Request

Field
Kiểu
Bắt buộc
Mô tả

bookingToken

string

✔

Từ price-check

partnerReference

string ≤ 64

✔

Mã đơn của đối tác, duy nhất; gửi lại trả booking cũ

contact.firstName, contact.lastName

string

✔

contact.email

email

✔

contact.phone

string

✔

Số trong nước (0901234567) hoặc kèm mã nước (+84901234567)

contact.phoneCode

string

Mã nước, có hoặc không dấu +; mặc định 84. **Bắt buộc khi phone là số nước ngoài**

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": "Tầng cao"
}

Response

Field
Kiểu
Mô tả

bookingNumber

string

Mã booking phía Gotadi

partnerReference

string

status

enum

PENDING_PAYMENT

totalAmount, currency

Số tiền phải thu của khách

paymentDeadline

date-time

Hạn giữ phòng, thường ~10 phút

Đối tác thu tiền của khách rồi gọi bookings/commit trước paymentDeadline. Quá hạn, booking chuyển EXPIRED.

Cập nhật lần cuối