CommitReservation

The CommitReservation API is the final step in the hotel booking flow. After a successful CommitReservation, this API is used to finalize and commit the reservation to the supplier's system and generate a booking confirmation with reference numbers.


Endpoint

POST [SD-Domain]//api/SmartDistribution/CommitReservation

Headers

Header Name

Value

Required

Description

ApiKey

RGKEY3CF9HQU

Yes

API key provided by RateGain

ApiSecret

SECRETLCYJ9CU

Yes

API secret provided by RateGain

Content-Type

application/json

Yes

Specifies the media type of request


📤 Request Payload (JSON)

{
  "BookReservation": {
    "ResStatus": 1,
    "InDate": "2025-07-24",
    "OutDate": "2025-07-25",
    "EchoToken": "Ech011113",
    "PropertyId": "ChIJle4pnY-RNIQRtRJd8z5dUPM",
    "BookingRate": 98.548,
    "RoomSelection": [
      {
        "RoomTypeCode": "TWN.DX",
        "NumberOfRooms": 1,
        "RoomSelectionKey": "20250724|20250725|W|71|6855|TWN.DX|ID_B2B_88|RO|B2BUSXX|121|8|N@0723a59~-407433045~N~~~NORB1D4F201F3414D9175326262227905AADE0001000100010523a59",
        "NumberOfAdults": 2,
        "Guest": [
          {
            "FirstName": "John",
            "LastName": "Doe",
            "Primary": true,
            "Remarks": "Late check-in",
            "ServiceRequest": "Extra pillows",
            "Email": "[email protected]",
            "Phone": "1234567890",
            "Line1": "123 Street",
            "City": "New York",
            "StateCode": "NY",
            "CountryCode": "US",
            "PostalCode": "10001"
          },
          {
            "FirstName": "james",
            "LastName": "nik",
            "Primary": false,
            "Remarks": "Late check-in",
            "ServiceRequest": "Extra pillows",
            "Email": "[email protected]",
            "Phone": "1234567890",
            "Line1": "123 Street",
            "City": "New York",
            "StateCode": "NY",
            "CountryCode": "US",
            "PostalCode": "10001"
          }
        ],
        "Children": [
          {
            "type": "Child",
            "age": 2
          }
        ]
      }
    ],
    "CreditCard": {
      "ExpirationDate": "2026-12",
      "IssuedName": "John Doe",
      "Number": "4111111111111111",
      "TypeIdentifier": "VISA"
    }
  }
}

BookReservation – Request Fields

Field
Type
Description

ResStatus

int

Reservation status (1 = Confirmed, 9 = Pending).

InDate

string

Check-in date in YYYY-MM-DD format.

OutDate

string

Check-out date in YYYY-MM-DD format.

EchoToken

string

Unique identifier for request tracking.

PropertyId

string

Unique property identifier.

BookingRate

decimal

Final rate confirmed for booking (totalNet in get preCheckResponse).

RoomSelection

array

List of selected room objects.


Room Selection Information

Field
Type
Description

RoomTypeCode

string

Room type identifier.

NumberOfRooms

int

Number of rooms to book.

RoomSelectionKey

string

Unique selection key used in availability.

NumberOfAdults

int

Number of adults in this room.

Guest

array

Guest details. First guest with Primary=true is the lead guest.

Children

array

Children info with age.


Guest Details – Guest

Field
Type
Description

FirstName

string

Guest's first name.

LastName

string

Guest's last name.

Primary

bool

Indicates if this guest is the primary contact.

Remarks

string

Remarks or special instructions.

ServiceRequest

string

Guest preferences or services requested.

Email

string

Contact email.

Phone

string

Contact number.

Line1

string

Address line.

City

string

City name.

StateCode

string

State code (e.g., NY).

CountryCode

string

Country code (e.g., US).

PostalCode

string

Postal/ZIP code.


Children (Nested Array)

Field
Type
Description

type

string

Usually "Child".

age

int

Age of the child.


Payment Details – CreditCard

Field
Type
Required
Description

ExpirationDate

string

Yes

Format: YYYY-MM (e.g., 2026-12).

IssuedName

string

Yes

Name on the card.

Number

string

Yes

Credit card number (test card numbers may be allowed in test environments).

TypeIdentifier

string

Yes

Card type (e.g., VISA, MASTERCARD).

Sample Response (Success)

{

"body": {

"preCheakResponse": null,

"booking": {

"confirmationNumber": "O1HJB58MTUMJLV",

"echotoken": "Ech011113",

"creationDate": "2025-07-23",

"status": "CONFIRMED",

"modificationPolicies": {

"cancellation": true,

"modification": false

},

"holder": {

"name": "JOHN",

"surname": "DOE"

},

"hotel": {

"checkIn": "2025-07-24",

"checkOut": "2025-07-25",

"code": 6855,

"name": "Las Brisas Ixtapa",

"categoryCode": "5EST",

"categoryName": "5 STARS",

"destinationCode": "IXT",

"destinationName": "Ixtapa - Zihuatanejo",

"zoneCode": 10,

"zoneName": "Ixtapa",

"latitude": "17.64815200000000000000",

"longitude": "-101.59624500000000000000",

"rooms": [

{

"RoomCode": "TWN.DX",

"name": "TWIN DELUXE",

"status": "CONFIRMED",

"paxes": [

{

"roomId": 1,

"type": "AD",

"name": "james",

"surname": "nik",

"age": 0

},

{

"roomId": 1,

"type": "AD",

"name": null,

"surname": null,

"age": 0

},

{

"roomId": 1,

"type": "CH",

"name": null,

"surname": null,

"age": 8

}

],

"rates": [

{

"rateKey": null,

"RateCode": "NOR",

"rateType": null,

"allotment": 0,

"rateCommentsId": null,

"rateComments": "Car park YES (with additional debit notes). Check-in hour 16:00 - 09:00.",

"paymentType": "AT_WEB",

"packaging": false,

"boardCode": "RO",

"boardName": "ROOM ONLY",

"cancellationPolicies": [

{

"amount": "98.54",

"from": "2025-07-22T23:59:00-06:00"

}

],

"taxes": null,

"rooms": 1,

"adults": 2,

"children": 1,

"offers": null

}

]

}

],

"paymentDataRequired": false,

"modificationPolicies": null

},

"remark": null,

"totalNet": 98.54,

"currency": "EUR",

"reservationId": "02afb037-6f3b-4ce3-aebd-c2cc3d3dba14"

}

},

"status": true,

"description": null,

"statusCode": 200

}

Response Field Explanation

status

Boolean

Indicates if booking was successful (true)

description

String

Any additional information or error message (nullable)

statusCode

Int

HTTP status code, e.g., 200 for success

body

Object

Contains booking and/or pre-check result

Boody.Booking Field Explanation

confirmationNumber

String

Unique booking reference number

echotoken

String

Request echo token for traceability

creationDate

String

Date of booking creation (yyyy-MM-dd)

status

String

Booking status, e.g., CONFIRMED

modificationPolicies

Object

Policies regarding booking changes

holder

Object

Lead guest / booking holder

hotel

Object

Hotel and room booking details

remark

String

Any additional notes or comments

totalNet

Decimal

Total price for the booking

currency

String

ISO currency code (EUR, USD, etc.)

reservationId

String

Internal reservation ID for backend tracking

Hotel Field Explanation

checkIn

String

Check-in date

checkOut

String

Check-out date

code

Int

Hotel code

name

String

Hotel name

categoryCode

String

Category code (e.g., 5EST)

categoryName

String

Full description (5 STARS)

destinationCode

String

Location/destination code

destinationName

String

Destination full name

zoneCode

Int

Zone ID

zoneName

String

Zone Name

latitude

String

Hotel latitude

longitude

String

Hotel longitude

rooms

Array

List of booked rooms

paymentDataRequired

Bool

Indicates if payment info is required

modificationPolicies

Object/Null

Duplicate of top-level policy if needed

Rooms Field Explanation

Field

Type

Description

RoomCode

String

Room code

name

String

Room name

status

String

Booking status (CONFIRMED)

paxes

Array

List of guests

rates

Array

Price details for room

Paxes Field

roomId

Int

Room ID

type

String

Guest type: AD = Adult, CH = Child

name

String/Null

Guest's first name

surname

String/Null

Guest's last name

age

Int

Age (0 if not provided)

Rates Field

rateKey

String

Rate identifier

RateCode

String

Rate code (e.g., NOR)

rateType

String

Type of rate (BOOKABLE, etc.)

allotment

Int

Number of rooms allotted

rateCommentsId

String/Null

Internal comment ID

rateComments

String

Human-readable comment (check-in info, parking, etc.)

paymentType

String

Payment mode (AT_WEB)

packaging

Bool

If room is part of a package

boardCode

String

Meal plan code (e.g., RO)

boardName

String

Meal plan name (e.g., ROOM ONLY)

cancellationPolicies

Array

List of cancellation rules

taxes

Object

Tax breakdown if applicable()

rooms

Int

Total rooms booked

adults

Int

Total adult guests

children

Int

Total child guests

offers

Object

Offer/discount details

CancellationPolicies Field

amount

String

Amount to be charged on cancellation

from

String

Date/time from when cancellation fee applies (ISO 8601 with timezone)

Notes

· Always call PreCheckReservation before CreateReservation to avoid issues like rate mismatch or unavailability.

· Ensure RoomRate value matches exactly what was confirmed in pre-check.

· Real credit card values should not be used in test environments.

Last updated