AmendBookingRoomsSimulate
Overviewโ
The AmendBookingRoomsSimulate operation allows clients to modify the room configuration and composition of an existing booking. This operation uses the client and supplier locators to identify the reservation and processes changes to room types, room quantities, and the associated occupancy details for each room.
This operation simulates what would happen if you execute the AmendBookingRooms operation, without actually committing the changes.
The AmendBookingRoomsSimulate operation ensures:
- Room Type Modification: Enables clients to change room types (upgrades, downgrades, or different room categories).
- Room Quantity Changes: Supports adding or removing rooms from a multi-room booking.
- Occupancy Management: Links each room to its corresponding passengers, ensuring proper guest assignment.
- Price Recalculation: Returns updated pricing based on the new room configuration and occupancy.
- Availability Validation: Confirms that the requested room types are available for the booking dates.
- Status Confirmation: Confirms the success or failure of the rooms amendment request.
When to Use:
- Room Upgrades/Downgrades: When guests want to change to a better or more economical room category.
- Multi-Room Adjustments: To add or remove rooms when the traveling party size changes.
- Room Type Changes: When guests need different room configurations (e.g., changing from double to twin beds).
- Party Reorganization: To redistribute guests across different rooms (e.g., separating couples into individual rooms).
Common Scenarios:
- Room Upgrade: Changing from a standard double room to a suite or superior room category.
- Adding Rooms: Adding an additional room when more guests join the reservation.
- Room Type Correction: Changing from double to twin beds or vice versa based on guest preferences.
- Room Consolidation: Reducing the number of rooms when party size decreases.
- Occupancy Redistribution: Moving guests between rooms (e.g., family reorganization).
- Error Handling: Common errors include:
BookingNotFound: Indicates the booking cannot be located with the provided locators.SupplierError: Indicates the amendment could not be processed by the supplier.
Requestโ
Overviewโ
The request operation includes the new room configuration with occupancies, booking references, and any additional data required by the supplier.
Sampleโ
var amendBookingRoomsSimulateRq = new AmendBookingRoomsSimulateRq
{
Input = new AmendRoomsSimulateInput
{
Reference = new Reference
{
ClientReference = "CLIENT123456",
SupplierReference = "SUPPLIER789"
},
Rooms = new List<AmendRoom>
{
new AmendRoom
{
OccupancyRefId = 1,
Code = "DBL"
},
new AmendRoom
{
OccupancyRefId = 2,
Code = "SGL"
}
},
Occupancies = new List<AmendOccupancy>
{
new AmendOccupancy
{
OccupancyId = 1,
Paxes = new List<BookPaxInput>
{
new BookPaxInput
{
Age = 30,
Name = "John",
SurName = "Doe",
PersonalTitleType = PersonalTitleType.MR,
DateOfBirth = "1994-05-15"
},
new BookPaxInput
{
Age = 28,
Name = "Jane",
SurName = "Doe",
PersonalTitleType = PersonalTitleType.MRS,
DateOfBirth = "1996-08-22"
}
}
},
new AmendOccupancy
{
OccupancyId = 2,
Paxes = new List<BookPaxInput>
{
new BookPaxInput
{
Age = 45,
Name = "Robert",
SurName = "Smith",
PersonalTitleType = PersonalTitleType.MR,
DateOfBirth = "1979-03-10"
}
}
}
},
PaymentType = PaymentType.Merchant,
PaymentCardInput = null
},
Settings = new Settings
{
Supplier = "HOTELTEST",
Platform = "HOTELTEST",
Client = "TravelAgency123",
Access = new Access
{
Code = 1001,
User = "agency_user",
Password = "secure_password",
ApiKey = "API_KEY_123456789",
Urls = new Urls
{
Book = "https://api.hotelsupplier.com/book",
Search = "https://api.hotelsupplier.com/search",
Quote = "https://api.hotelsupplier.com/quote",
Cancel = "https://api.hotelsupplier.com/cancel",
CheckBookings = "https://api.hotelsupplier.com/check",
AmendBookingBoard = "https://api.hotelsupplier.com/amend/board",
AmendBookingDates = "https://api.hotelsupplier.com/amend/dates",
AmendBookingPaxes = "https://api.hotelsupplier.com/amend/paxes",
AmendBookingRemarks = "https://api.hotelsupplier.com/amend/remarks",
AmendBookingRooms = "https://api.hotelsupplier.com/amend/rooms"
},
Parameters = new Dictionary<string, string>
{
{ "someParameter1", "50" },
{ "someParameter2", "true" },
{ "someParameter3", "5000" },
{ "someParameter4", "SupplierX" }
}
},
BusinessRules = new BusinessRules
{
OptionsQuota = 170,
BusinessRuleType = "CheaperAmount"
},
Timeout = "00:00:10",
TimeoutAsTimeSpan = TimeSpan.Parse("00:00:10"),
IncludeProviderTransactions = false
}
};
Detailsโ
| Name | Relation | Type | Description |
|---|---|---|---|
| Input | 1 | AmendRoomsSimulateInput | Gets or initializes the input details for simulating the rooms amendment, including specific information about the booking and the new room configuration. |
| Input/Reference | 1 | Reference | Booking references for the amendment. Reference information containing client, supplier, or hotel locators for the booking associated with the amendment request. Validation of these locators is performed based on the metadata restriction information. |
| Input/Reference/ ClientReference | 1 | String | The client's internal reference for the booking. The booking locator provided by the client. This is typically used to match the booking in the client's internal systems. |
| Input/Reference/ SupplierReference | 1 | String | The supplier's reference for the booking. The booking locator provided by the supplier. This identifier is used to reference the booking in the supplier's system. |
| Input/Rooms | 1 . . N | Array<AmendRoom> | Gets the new room configuration for the booking. |
| Input/Rooms/ OccupancyRefId | 1 | Integer | Reference to the occupancy that will be assigned to this room. Links the room to its corresponding occupancy in the Occupancies list. |
| Input/Rooms/Code | 1 | String | The room type code (e.g., "DBL" for Double, "SGL" for Single). |
| Input/Occupancies | 1 . . N | Array<AmendOccupancy> | Gets the updated occupancy information with passenger details for each room. |
| Input/Occupancies/ OccupancyId | 1 | Integer | The unique identifier for the occupancy. Must match the OccupancyRefId in Rooms. |
| Input/Occupancies/Paxes | 1 . . N | Array<BookPaxInput> | The list of passengers in this occupancy. |
| Input/Occupancies/ Paxes/Age | 1 | Integer | The age of the passenger. |
| Input/Occupancies/ Paxes/Name | 1 | String | The first name of the passenger. |
| Input/Occupancies/ Paxes/SurName | 1 | String | The surname (last name) of the passenger. |
| Input/Occupancies/Paxes/ PersonalTitleType | 0 . . 1 | PersonalTitleType | The personal title of the passenger (e.g., MR, MRS, MS, MISS, NOT_SPECIFIED). |
| Input/Occupancies/Paxes/ DateOfBirth | 0 . . 1 | String | Date of birth of the passenger, represented as a string in ISO 8601 format (YYYY-MM-DD). |
| Input/Occupancies/Paxes/ IdentificationDocuments | 0 . . N | Array<IdentificationDocument> | Identification documents for the passenger (e.g., passport, ID card). |
| Input/PaymentType | 0 . . 1 | PaymentType | Gets or initializes the payment type for the amendment request. |
| Input/PaymentCardInput | 0 . . 1 | CreditCardInput | Gets or initializes the credit card input for the amendment request. |
| Input/PaymentCardInput/Type | 1 | CreditCardType | The type of the credit card. |
| Input/PaymentCardInput/Number | 1 | String | The credit card number. |
| Input/PaymentCardInput/Cvc | 1 | String | The Card Verification Code (CVC) of the credit card. |
| Input/PaymentCardInput/ Expiration | 1 | CreditCardExpiration | The expiration date of the credit card. |
| Input/PaymentCardInput/ Expiration/Month | 1 | Integer | The expiration month of the credit card. |
| Input/PaymentCardInput/ Expiration/Year | 1 | Integer | The expiration year of the credit card (last two digits). |
| Input/PaymentCardInput/ Expiration/YearFull | 1 | Integer | Gets the full four-digit year of the credit card expiration. |
| Input/PaymentCardInput/IsVcc | 1 | Boolean | Indicates whether the credit card is a Virtual Credit Card (VCC). |
| Input/PaymentCardInput/Holder | 1 | Holder | The holder information of the credit card. |
| Input/PaymentCardInput/Holder/ Name | 1 | String | The name of the holder. |
| Input/PaymentCardInput/Holder/ SurName | 1 | String | The surname of the holder. |
| Input/PaymentCardInput/Holder/ PersonalTitleType | 1 | PersonalTitleType | The personal title type of the holder. |
| Settings | 1 | Settings | Gets or initializes the platform-specific settings required for processing the amendment request. These settings include credentials, API endpoints, parameters, and details about the client, supplier, and platform involved in the request. |
| Settings/Supplier | 1 | String | Identifies the supplier associated with the hotel operation. This is a unique code generated by Travelgate within its system to represent the supplier. |
| Settings/Platform | 1 | String | Represents the platform on which the hotel operation is performed. Platforms are collections of suppliers, and the platform code is generated by Travelgate to define the operational context. |
| Settings/Client | 1 | String | Represents the client performing the hotel operation. This is a unique client code assigned by Travelgate to identify the client within its system. |
| Settings/Access | 1 | Access | Contains access information required for the operation, including API credentials, endpoints, and other connection details specific to the supplier's integration. |
| Settings/Access/Code | 1 | Integer | The unique code identifying the access configuration. |
| Settings/Access/User | 0 . . 1 | String | The username used for authentication with the supplier. |
| Settings/Access/Password | 0 . . 1 | String | The password used for authentication with the supplier. |
| Settings/Access/ApiKey | 0 . . 1 | String | The API key used for authentication or authorization. |
| Settings/Access/Urls | 1 | Urls | The URLs associated with the access configuration. |
| Settings/Access/Urls/Book | 0 . . 1 | String | The URL used for booking operations. |
| Settings/Access/Urls/Search | 0 . . 1 | String | The URL used for Search operations. |
| Settings/Access/Urls/Quote | 0 . . 1 | String | The URL used for Quote operations. |
| Settings/Access/Urls/Generic | 0 . . 1 | String | A generic URL for additional operations. |
| Settings/Access/Parameters | 0 . . 1 | AccessParameters | Additional parameters related to the connection. |
| Settings/BusinessRules | 0 . . 1 | BusinessRules | Specifies the business rules to be applied during the operation. These rules define operational constraints and behavior, such as quota limits or prioritization criteria. |
| Settings/BusinessRules/ OptionsQuota | 0 . . 1 | Integer | The maximum number of options returned for each board in the Search query. |
| Settings/BusinessRules/ BusinessRuleType | 1 | BusinessRulesType | The business rule type that determines how Search results are prioritized or filtered. |
| Settings/Timeout | 1 | String | Defines the timeout period for the operation as a string value. This indicates the maximum amount of time to wait for a supplier's response before timing out. The value must be provided in timestamp format (e.g., "00:00:10" for 10 seconds). |
| Settings/TimeoutAsTimeSpan | 0 . . 1 | String | Converts the timeout value from the string representation (Timeout) into a TimeSpan for use in time-based operations. |
| Settings/ IncludeProviderTransactions | 1 | Boolean | Indicates whether detailed traces of provider transactions should be included in the operation's response. If enabled, the ProviderAudit field in responses will contain the transaction logs (e.g., requests and responses exchanged with the supplier). |
Responseโ
Provides the amendment status, updated booking details with the new room configuration, pricing information, and any warnings or remarks.
Overviewโ
The AmendBookingRoomsSimulate operation provides:
- Amendment Status:
Ok: The room amendment has been successfully processed.OnRequest: The amendment request is pending supplier confirmation.Unknown: The amendment status is unknown and requires verification with the supplier.
- Updated Booking Details: Returns the booking information with the new room configuration and updated pricing.
- Warnings or Remarks: Additional details from the supplier about the amendment process.
Sampleโ
var amendRs = new AmendRs
{
AuditData = new AuditData
{
Request = new List<RequestItem>
{
new RequestItem
{
Data = "<x>SupplierRequest</x>",
Headers = new Dictionary<string, string>
{
{ "Accept", "application/x-protobuf" },
{ "Accept-Encoding", "gzip,deflate," }
},
HttpMethod = new HttpMethodType
{
Method = "POST"
},
SendAt = DateTime.Parse("2024-07-10T08:21:49Z"),
Url = "http://travelgate.com"
}
},
Response = new List<ResponseItem>
{
new ResponseItem
{
Data = "<x>SupplierResponse</x>",
Headers = new Dictionary<string, string>
{
{ "Content-Encoding", "gzip," }
},
HttpMethod = new HttpMethodType
{
Method = "POST"
},
ReceivedAt = DateTime.Parse("2024-07-10T08:21:49Z"),
StatusCode = 200
}
}
},
BookDetails = new List<BookDetails>
{
new BookDetails
{
Status = BookStatus.Ok,
Reference = new Reference
{
ClientLocator = "CLIENT123456",
SupplierLocator = "SUPPLIER789",
HotelLocator = null
},
Price = Price.BuildNetPrice(Currency.EUR, 320.00, 380.00),
Hotel = new HotelDetail
{
Code = "12345",
Name = "Sample Hotel",
CheckIn = DateTime.Parse("2024-07-10"),
CheckOut = DateTime.Parse("2024-07-15"),
Rooms = new List<Room>
{
new Room
{
OccupancyRefId = 1,
Code = "DBL",
Description = "Double Room",
RoomPrice = new RoomPrice
{
Price = Price.BuildNetPrice(Currency.EUR, 200.00, 240.00)
},
Boards = new List<Board>
{
new Board
{
Code = "BB",
Description = "Bed and Breakfast"
}
}
},
new Room
{
OccupancyRefId = 2,
Code = "SGL",
Description = "Single Room",
RoomPrice = new RoomPrice
{
Price = Price.BuildNetPrice(Currency.EUR, 120.00, 140.00)
},
Boards = new List<Board>
{
new Board
{
Code = "BB",
Description = "Bed and Breakfast"
}
}
}
}
},
CancelPolicy = new OptionCancelPolicy
{
Refundable = true,
CancelPenalties = new List<CancelPenalty>
{
new CancelPenalty
{
HoursBefore = 72,
Type = PenaltyType.Amount,
Currency = Currency.EUR,
Value = 80.00
}
}
}
}
}
};
Detailsโ
| Name | Relation | Type | Description |
|---|---|---|---|
| AuditData | 1 | ProviderAudit | Gets or sets the audit data provided by the supplier or system for the operation. |
| AuditData/Request | 0 . . N | Array<ProviderAuditRq> | Collection of audit entries for provider requests.Each entry contains details about a specific request made to the provider. |
| AuditData/Request/SendAt | 1 | String | The timestamp indicating when the request was sent. Date on UTC Standard (ISO 8601 UTC 2025-05-21T08:48:53.9744052+00:00) |
| AuditData/Request/Data | 1 | String | The payload data included in the request. |
| AuditData/Request/Url | 1 | String | The URL of the provider endpoint to which the request is sent. |
| AuditData/Request/Headers | 1 | Object | A collection of headers included in the request. |
| AuditData/Request/HttpMethod | 1 | HttpMethod | The HTTP method used to send the request. |
| AuditData/Request/HttpMethod/ Method | 1 | String | No description available. |
| AuditData/Response | 0 . . N | Array<ProviderAuditRs> | Collection of audit entries for provider responses.Each entry contains details about a specific response received from the provider. |
| AuditData/Response/ReceivedAt | 1 | String | The timestamp indicating when the response was received. Date on UTC Standard (ISO 8601 UTC 2025-05-21T08:48:53.9744052+00:00) |
| AuditData/Response/Data | 1 | String | The payload data contained in the provider's response. |
| AuditData/Response/Headers | 1 | Object | A collection of headers included in the provider's response. |
| AuditData/Response/StatusCode | 1 | Integer | The HTTP status code returned by the provider. |
| AdviseMessages | 0 . . N | Array<AdviseMessage> | Gets the collection of advise messages related to the amendment operation. |
| AdviseMessages/Code | 1 | AdviseMessageCode | Gets the code that represents the message type. |
| AdviseMessages/Level | 1 | AdviseMessageLevel | Gets the severity level of the message (e.g., Error, Warning, or Info). |
| AdviseMessages/Description | 1 | String | Gets the message description providing additional context. |
| AdviseMessages/CorrelationId | 0 . . 1 | String | Gets a unique identifier for correlating the message with specific operations. |
| AdviseMessages/External | 0 . . 1 | External | Gets additional external details associated with the message. |
| AdviseMessages/External/Code | 1 | String | The supplier's internal code for identifying the nature of the response or error. |
| AdviseMessages/External/ Message | 1 | String | A descriptive message returned by the supplier. |
| AdviseMessages/External/ HttpStatusCode | 1 | Integer | The HTTP status code of the supplier's response. |
| BookingDetails | 0 . . N | Array<BookDetails> | Gets the collection of booking details after the amendment. |
| BookingDetails/Status | 1 | BookStatus | Gets the status of the booking. Possible values: Unknown, Ko, Ok, OnRequest, Cancelled or PendingCommit. |
| BookingDetails/Reference | 1 | Reference | Gets the reference information for the booking. |
| BookingDetails/Reference/ ClientLocator | 0 . . 1 | String | The booking locator provided by the client.This is typically used to match the booking in the client's internal systems. |
| BookingDetails/Reference/ SupplierLocator | 0 . . 1 | String | The booking locator provided by the supplier.This identifier is used to reference the booking in the supplier's system. |
| BookingDetails/Reference/ HotelLocator | 0 . . 1 | String | The booking locator specific to the hotel, provided by the supplier. (Optional)This may be required in cases where the hotel system uses its own unique identifiers. |
| BookingDetails/Price | 1 | Price | Gets the price of the booking. |
| BookingDetails/Price/Currency | 1 | Currency | The currency of the price, represented in ISO 4217 format (e.g., USD, EUR). |
| BookingDetails/Price/Binding | 1 | Boolean | Indicates whether the price is binding. |
| BookingDetails/Price/Net | 1 | Double | The net price paid by the Buyer to the Seller. |
| BookingDetails/Price/Gross | 1 | Double | The gross price, which includes the net price and the Buyer's commission. |
| BookingDetails/Price/NetSpecified | 1 | Boolean | Indicates whether the net price is explicitly specified. |
| BookingDetails/Price/ MinimumSellingPrice | 1 | Double | The minimum selling price. |
| BookingDetails/Hotel | 1 | HotelDetail | Gets or sets the hotel information for the booking. |
| BookingDetails/Hotel/Code | 1 | String | Gets or sets the hotel code. |
| BookingDetails/Hotel/Name | 0 . . 1 | String | Gets or sets the hotel name. |
| BookingDetails/Hotel/CheckIn | 1 | String | Gets or sets the check-in date. |
| BookingDetails/Hotel/CheckOut | 1 | String | Gets or sets the check-out date. |
| BookingDetails/Hotel/Rooms | 1 . . N | Array<Room> | Gets the collection of rooms in the booking. |
| BookingDetails/Hotel/Rooms/ OccupancyRefId | 1 | Integer | Gets the occupancy reference ID. |
| BookingDetails/Hotel/Rooms/Code | 1 | String | Gets the room code. |
| BookingDetails/Hotel/Rooms/ Description | 0 . . 1 | String | Gets or sets the room description. |
| BookingDetails/Hotel/Rooms/ RoomPrice | 1 | RoomPrice | Gets the room price information. |
| BookingDetails/Hotel/Rooms/ Boards | 0 . . N | Array<Board> | Gets the collection of boards (meal plans) for the room. |
| BookingDetails/Hotel/Rooms/ Boards/Code | 1 | String | Gets the board code. |
| BookingDetails/Hotel/Rooms/ Boards/Description | 0 . . 1 | String | Gets or sets the board description. |
| BookingDetails/CancelPolicy | 0 . . 1 | OptionCancelPolicy | Gets or sets the cancellation policy for the booking. |
| BookingDetails/CancelPolicy/ Refundable | 1 | Boolean | Gets a value indicating whether the booking is refundable. |
| BookingDetails/CancelPolicy/ CancelPenalties | 0 . . N | Array<CancelPenalty> | Gets the collection of cancellation penalties. |
| BookingDetails/Remarks | 0 . . N | Array<String> | Gets or sets additional remarks related to the booking. |
| BookingDetails/PaymentType | 0 . . 1 | PaymentType | Gets or sets the payment type for the booking. |
| BookingDetails/AddOns | 0 . . 1 | Object | Gets or sets additional supplier information as key-value pairs. |