CommitReservation

CommitReservation

The CommitReservation API is the final step in the hotel booking flow. After a successful pre-check, 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 / Example
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 the request


Request Payload

{

"BookReservation": {

"ResStatus": 1,

"CurrencyCode": "EUR",

"ReservationId": "423824c7-c69d-493c-9ad6-e2b0110a1e51",

"RoomSelectionKey": "20250712|20250713|W|148|9234|SUI.EJ|ID_B2B_88|RO|B2BNRFAEXX|1~2~0||N@07~~2151a~282040361~N~~~NRF~~BDB2061EE70D480175221511751805AADE000100010002052151a",

"InDate": "2025-07-12",

"OutDate": "2025-07-13",

"PropertyId": "ChIJn7D4RFNqXz4RuLE7TlSgPlA",

"RatePlanCode": "HBR",

"RoomRate": "26.21",

"RoomTypeCode": "SUI.EJ",

"CreditCard": {

"ExpirationDate": "2026-12",

"IssuedName": "John Doe",

"Number": "4111111111111111",

"TypeIdentifier": "VISA"

},

"EchoToken": "ECHO123452342hh2",

"Guest": {

"FirstName": "John",

"LastName": "Doe",

"NumberOfAdults": 2,

"NumberOfChildren": 1,

"NumberOfBeds": 1,

"NumberOfRooms": 1,

"Primary": true,

"Remarks": "Late check-in",

"ServiceRequest": "Extra pillows",

"Email": "[email protected]",

"Phone": "1234567890",

"Line1": "123 Main St",

"City": "New York",

"StateCode": "NY",

"CountryCode": "US",

"PostalCode": "10001",

"GuestCount": [

{ "Type": "Adult", "Count": 1 },

{ "Type": "Child", "Count": 1, "Age": 5 }

]

}

}

}


Request Fields Description

General Reservation Fields

Field
Type
Required
Description

CurrencyCode

string

Yes

Currency used for booking (e.g., EUR)

ResStatus

int

Yes

Booking status (1 = new reservation)

ReservationId

string

Optional

Use preBookReservationId if available

EchoToken

string

Yes

Unique token for tracking/logging

Stay Information

Field
Type
Required
Description

InDate

string

Yes

Check-in date (YYYY-MM-DD)

OutDate

string

Yes

Check-out date

PropertyId

string

Yes

Unique hotel/property identifier

RoomSelectionKey

string

Yes

Key from availability/pre-check response

RatePlanCode

string

Yes

Rate plan code (e.g., HBR)

RoomRate

string

Yes

Final room rate (must match pre-check)

RoomTypeCode

string

Yes

Room type code (e.g., SUI.EJ)

Payment Details – CreditCard

Field
Type
Required
Description

ExpirationDate

string

Yes

Format: YYYY-MM

IssuedName

string

Yes

Name on the card

Number

string

Yes

Credit card number

TypeIdentifier

string

Yes

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

Guest Details – Guest

Field
Type
Required
Description

FirstName

string

Yes

Guest's first name

LastName

string

Yes

Guest's last name

NumberOfAdults

int

Yes

Number of adult guests

NumberOfChildren

int

Yes

Number of child guests

NumberOfBeds

int

No

Number of beds requested

NumberOfRooms

int

Yes

Number of rooms to reserve

Primary

bool

Yes

Indicates if this is the primary guest

Remarks

string

No

Special notes (e.g., "Late check-in")

ServiceRequest

string

No

Specific service requests (e.g., "Extra pillows")

Email

string

Yes

Guest email address

Phone

string

Yes

Guest contact number

Line1, City, StateCode, CountryCode, PostalCode

string

Yes

Guest address details

GuestCount (Nested Array)

Field
Type
Required
Description

Type

string

Yes

Guest type (Adult, Child)

Count

int

Yes

Number of guests of this type

Age

int

Only for children

Age of child guest


Success Response Sample

{

"status": true,

"body": {

"sdPreBookResponse": {

"property": {

"propertyid": "adfadfadsfasdfasdfasdf",

"code": "59159",

"rate": {

"ratePlan": {

"code": "HBR",

"roomType": {

"bookableRate": "54.9329",

"roomDescription": "STANDARD WITH 2 DOUBLE BEDS",

"totalRate": "45.39",

"cancelPolicy": {

"intervalOffsetType": "BeforeArrival",

"penaltyAmount": "54.9329"

}

}

}

}

}

},

"sdReservationResponse": null,

"preBookReservationId": "d57f29ea-d9fb-4159-be8c-364a9c7a3305",

"reservationId": null

},

"description": null,

"hasNextValue": false

}


Response Fields Description

Field
Type
Description

status

boolean

Indicates if the reservation was successfully initiated

sdPreBookResponse

object

Final confirmation data (rate, policy, etc.)

preBookReservationId

string

ID linking to the pre-check stage

reservationId

string

Final confirmed reservation ID (may be null initially)

description

string

Optional message or error description

hasNextValue

boolean

Pagination indicator (usually false)


Notes

  • Always call PreCheckReservation before CommitReservation to avoid issues like rate mismatch or unavailability.

  • Ensure RoomRate matches exactly with the value confirmed in the pre-check.

  • Use test card numbers in sandbox environments; avoid real credit card data.

Last updated