Booking

The room, board type and rate the guest selected are pushed to HMS in a BookingPushRQ structure. The same endpoint handles cancellations and modifications by sending type as Cancel or Modify. See the Booking flow guide for the end-to-end process.

Push a booking (BookingPushRQ)#

POST/external/online/channel/booking

Authentication: Authorization: Bearer · Body: application/json

Records one or more bookings in HMS. ID is the unique booking code generated on your side; sending Modify with the same ID updates the record, Cancel cancels it. When several rooms of the same room type and board type are sold, each room is a separate RoomStays item with NumberOfUnits 1, 2, 3…

For payment type credit card (9) card details go under PaymentCard; omit the field for other payment types. Handling card data puts you in PCI DSS scope.

Request body

BookingPushRQ.Bookings[]object[]required
Booking list. Usually one item.
hotelIDstringrequired
Hotel ID.
IDstringrequired
Unique booking code in your system. Also stored as the voucher number.
typestringrequired
Operation type.
BookModifyCancel
createDateTimedatetime
When the booking was created (ISO 8601).
checkinDate / checkoutDatedaterequired
Check-in and check-out dates, YYYY-MM-DD.
RoomStays[]object[]required
Rooms sold.
roomTypeIDstringrequired
items[].id from the room list.
roomNamestring
Room type name (informational).
ratePlanIDstringrequired
accommodationTypes[].id from the room list.
ratePlanNamestring
Board type name (informational).
typestring
Operation type for the room.
BookModifyCancel
NumberOfUnitsstringrequired
Sequence of rooms with the same room/board type: 1, 2, 3…
checkinDate / checkoutDatedaterequired
Check-in and check-out dates for the room.
GuestCountobjectrequired
adult and child counts.
PerDayRatesobject
currency and PerDayRate[]: stayDate, baseRate, hotelServiceFees.
Totalobjectrequired
Room total: amountAfterTaxes, amountOfTaxes, currency.
PaymentCardobject
Payment type 9 (credit card) only. CardHolder{fullname, address, country, city}, cardNumber, expireDate (MMYY), cardCode, seriesCode (CVV).
PrimaryGuests[]object[]required
Lead guest(s): name, surname, PhoneNumber, email, CountryCode.
ChildGuests[]object[]
Children. age is required; name, surname, year, date, detail optional.
SpecialRequest[]object[]
Guest notes and cancellation terms: text. Concatenated into the booking remarks.
extras[]object[]
Extras/packages sold: name, note, person, piece, price, priceMode, priceTotal, stockID (id from the package list).
Totalobjectrequired
Grand total: amountAfterTaxes, amountOfTaxes, extraTotal, currency.

Response

200 BookingPushRS object. On success Success: true and the HMS booking ID (HMS_ID); on failure an Error message and BookingConfirmNumbers[].Error[].

Error responses

  • 200 Error: No available data could be found. (01, empty/unparseable body) · Hotel registration not found on HMS. (02, hotel not linked to the online channel) · Could not register. · Failed to parse information.
Request
curl -X POST "https://test.hms.gen.tr/external/online/channel/booking" \
  -H "Authorization: Bearer $HMS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "BookingPushRQ": {
        "Bookings": [
            {
                "hotelID": "1000",
                "ID": "4811174883",
                "type": "Book",
                "createDateTime": "2026-08-01T08:32:11:293Z",
                "checkinDate": "2026-08-18",
                "checkoutDate": "2026-08-20",
                "RoomStays": [
                    {
                        "roomTypeID": "2",
                        "roomName": "Standard Room",
                        "ratePlanID": "2",
                        "ratePlanName": "Bed & Breakfast",
                        "type": "Book",
                        "NumberOfUnits": "1",
                        "checkinDate": "2026-08-18",
                        "checkoutDate": "2026-08-20",
                        "GuestCount": {
                            "adult": 2,
                            "child": 1
                        },
                        "PerDayRates": {
                            "currency": "TRY",
                            "PerDayRate": [
                                {
                                    "stayDate": "2026-08-18",
                                    "baseRate": "965.00",
                                    "hotelServiceFees": "0"
                                },
                                {
                                    "stayDate": "2026-08-19",
                                    "baseRate": "965.00",
                                    "hotelServiceFees": "0"
                                }
                            ]
                        },
                        "Total": {
                            "amountAfterTaxes": "1930.00",
                            "amountOfTaxes": "175.45",
                            "currency": "TRY"
                        }
                    }
                ],
                "PrimaryGuests": [
                    {
                        "name": "Ayşe",
                        "surname": "Demir",
                        "PhoneNumber": "+905551112233",
                        "email": "[email protected]",
                        "CountryCode": "TR"
                    }
                ],
                "ChildGuests": [
                    {
                        "age": 7
                    }
                ],
                "SpecialRequest": [
                    {
                        "text": "Late check-in, around 23:00."
                    }
                ],
                "extras": [
                    {
                        "name": "Dinner",
                        "note": "",
                        "person": 2,
                        "piece": 1,
                        "price": "400.00",
                        "priceMode": null,
                        "priceTotal": "400.00",
                        "stockID": 12
                    }
                ],
                "Total": {
                    "amountAfterTaxes": "2330.00",
                    "amountOfTaxes": "211.82",
                    "extraTotal": "400.00",
                    "currency": "TRY"
                }
            }
        ]
    }
}'
Response · 200
{
    "BookingPushRS": {
        "Success": true,
        "BookingConfirmNumbers": [
            {
                "confirmTime": 1755500000,
                "bookingID": 48213,
                "bookingType": "Book",
                "HMS_ID": 48213
            }
        ]
    }
}
Response · 200 (error)
{
    "BookingPushRS": {
        "Error": "Hotel registration not found on HMS.",
        "BookingConfirmNumbers": [
            {
                "bookingID": null,
                "bookingType": null,
                "confirmTime": 1755500000,
                "Error": [
                    {
                        "code": "02",
                        "text": "Hotel registration not found on HMS."
                    }
                ]
            }
        ]
    }
}
Last updated: 8 September 2026Found a mistake? Let us know