Skip to main content

AmendBookingBoardSimulate

Overview​

The AmendBookingBoardSimulate operation allows clients to modify the board type (meal plan) of an existing booking. This operation uses the client and supplier locators to identify the reservation and processes the board change request.

note

This operation simulates what would happen if you execute the AmendBookingBoard operation, without actually committing the changes.

The AmendBookingBoardSimulate operation ensures:

  • Board Type Modification: Enables clients to change the meal plan of their booking through the supplier's API.
  • Price Recalculation: Returns updated pricing based on the new board type.
  • Status Confirmation: Confirms the success or failure of the board amendment request.

When to Use:

  • Client-Requested Changes: When the end-user requests to upgrade or change their meal plan.

Common Scenarios:

  • Board Upgrade: Changing from room-only to breakfast included, or from breakfast to half board.
  • 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 board code, booking references, and any additional data required by the supplier.

Sample​

var amendBookingBoardSimulateRq = new AmendBookingBoardSimulateRq
{
Input = new AmendBoardSimulateInput
{
Language = "99",
AccommodationRq = new Accommodation
{
Type = "Hotel",
Code = "12345"
},
Reference = new BookingReference
{
ClientLocator = "ClientReference12345",
SupplierLocator = "SupplierLocator389b10ca-893b-4e7b-adf6-b067a1b1d9b3",
HotelLocator = "HotelLocator208c2b6f-1cdf-4204-9ebe-f147808218d9"
},
BoardCode = "HB",
BoardName = "Half Board",
PaymentType = PaymentType.MerchantPay,
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",
Generic = "https://api.hotelsupplier.com/generic"
},
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 = true
}
};

Details​

NameRelationTypeDescription
Input1AmendBoardSimulateInputGets or initializes the input details for simulating the board type amendment, including specific information about the booking and the new board type.
Input/Language1StringGets or sets the language code for the amendment request.
Input/AccommodationRq1AccommodationRQDetails of the accommodation associated with the amendment request, such as the accommodation type and code.
Input/AccommodationRq/Type1AccommodationTypeSpecifies the type of accommodation being requested, such as Hotel or Rental.
Input/AccommodationRq/Code1StringRepresents a unique code identifying the accommodation in the request.
Input/Reference1ReferenceReference 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/ClientLocator0 . . 1StringThe booking locator provided by the client.This is typically used to match the booking in the client's internal systems.
Input/Reference/
SupplierLocator
0 . . 1StringThe booking locator provided by the supplier.This identifier is used to reference the booking in the supplier's system.
Input/Reference/HotelLocator0 . . 1StringThe 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.
Input/BoardCode1StringGets the code of the new board type.
Input/BoardName0 . . 1StringGets or sets the name of the new board type.
Input/PaymentType0 . . 1PaymentTypeGets or initializes the payment type for the amendment request.
Input/PaymentCardInput0 . . 1CreditCardInputGets or initializes the credit card input for the amendment request.
Input/PaymentCardInput/Type1CreditCardTypeThe type of the credit card.
Input/PaymentCardInput/Number1StringThe credit card number.
Input/PaymentCardInput/Cvc1StringThe Card Verification Code (CVC) of the credit card.
Input/PaymentCardInput/
Expiration
1CreditCardExpirationThe expiration date of the credit card.
Input/PaymentCardInput/
Expiration/Month
1IntegerThe expiration month of the credit card.
Input/PaymentCardInput/
Expiration/Year
1IntegerThe expiration year of the credit card (last two digits).
Input/PaymentCardInput/
Expiration/YearFull
1IntegerGets the full four-digit year of the credit card expiration.
Input/PaymentCardInput/IsVcc1BooleanIndicates whether the credit card is a Virtual Credit Card (VCC).
Input/PaymentCardInput/Holder1HolderThe holder information of the credit card.
Input/PaymentCardInput/Holder/
Name
1StringThe name of the holder.
Input/PaymentCardInput/Holder/
SurName
1StringThe surname of the holder.
Input/PaymentCardInput/Holder/
PersonalTitleType
1PersonalTitleTypeThe personal title type of the holder.
Settings1SettingsGets 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/Supplier1StringIdentifies the supplier associated with the hotel operation. This is a unique code generated by Travelgate within its system to represent the supplier.
Settings/Platform1StringRepresents 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/Client1StringRepresents the client performing the hotel operation.This is a unique client code assigned by Travelgate to identify the client within its system.
Settings/Access1AccessContains access information required for the operation, including API credentials, endpoints, and other connection details specific to the supplier's integration.
Settings/Access/Code1IntegerThe unique code identifying the access configuration.
Settings/Access/User0 . . 1StringThe username used for authentication with the supplier.
Settings/Access/Password0 . . 1StringThe password used for authentication with the supplier.
Settings/Access/ApiKey0 . . 1StringThe API key used for authentication or authorization.
Settings/Access/Urls1UrlsThe URLs associated with the access configuration.
Settings/Access/Urls/Book0 . . 1StringThe URL used for booking operations.
Settings/Access/Urls/Search0 . . 1StringThe URL used for Search operations.
Settings/Access/Urls/Quote0 . . 1StringThe URL used for Quote operations.
Settings/Access/Urls/Generic0 . . 1StringA generic URL for additional operations.
Settings/Access/Parameters0 . . 1AccessParametersAdditional parameters related to the connection.
Settings/BusinessRules0 . . 1BusinessRulesSpecifies 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 . . 1IntegerThe maximum number of options returned for each board in the Search query.
Settings/BusinessRules/
BusinessRuleType
1BusinessRulesTypeThe business rule type that determines how Search results are prioritized or filtered.
Settings/Timeout1StringDefines 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/TimeoutAsTimeSpan0 . . 1StringConverts the timeout value from the string representation (Timeout) into a TimeSpan for use in time-based operations.
Settings/
IncludeProviderTransactions
1BooleanIndicates 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 board type, pricing information, and any warnings or remarks.

Overview​

The AmendBookingBoardSimulate operation provides:

  • Amendment Status:
    • Ok: The board 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 board type 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("2025-03-16T08: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("2025-03-16T08:21:49Z"),
StatusCode = 200
}
}
},
BookDetails = new List<BookDetails>
{
new BookDetails
{
Status = BookStatus.Ok,
Reference = new Reference
{
ClientLocator = "ClientReference12345",
SupplierLocator = "SupplierLocator389b10ca-893b-4e7b-adf6-b067a1b1d9b3",
HotelLocator = "HotelLocator208c2b6f-1cdf-4204-9ebe-f147808218d9"
},
Price = Price.BuildNetPrice(Currency.EUR, 85.51, 100.3),
Hotel = new HotelDetail
{
Code = "12345",
Name = "Sample Hotel",
CheckIn = DateTime.Parse("2025-12-20"),
CheckOut = DateTime.Parse("2025-12-22"),
Rooms = new List<Room>
{
new Room
{
OccupancyRefId = 1,
Code = "DBL",
Description = "Double Room",
RoomPrice = new RoomPrice
{
Price = Price.BuildNetPrice(Currency.EUR, 85.51, 100.3)
},
Boards = new List<Board>
{
new Board
{
Code = "HB",
Description = "Half Board"
}
}
}
}
},
CancelPolicy = new OptionCancelPolicy
{
Refundable = true,
CancelPenalties = new List<CancelPenalty>
{
new CancelPenalty
{
HoursBefore = 72,
Type = PenaltyType.Amount,
Currency = Currency.EUR,
Value = 20.50
}
}
}
}
}
};

Details​

NameRelationTypeDescription
AuditData1ProviderAuditGets or sets the audit data provided by the supplier or system for the operation.
AuditData/Request0 . . NArray<ProviderAuditRq>Collection of audit entries for provider requests.Each entry contains details about a specific request made to the provider.
AuditData/Request/SendAt1StringThe timestamp indicating when the request was sent. Date on UTC Standard (ISO 8601 UTC 2025-05-21T08:48:53.9744052+00:00)
AuditData/Request/Data1StringThe payload data included in the request.
AuditData/Request/Url1StringThe URL of the provider endpoint to which the request is sent.
AuditData/Request/Headers1ObjectA collection of headers included in the request.
AuditData/Request/HttpMethod1HttpMethodThe HTTP method used to send the request.
AuditData/Request/HttpMethod/
Method
1StringNo description available.
AuditData/Response0 . . NArray<ProviderAuditRs>Collection of audit entries for provider responses.Each entry contains details about a specific response received from the provider.
AuditData/Response/ReceivedAt1StringThe timestamp indicating when the response was received. Date on UTC Standard (ISO 8601 UTC 2025-05-21T08:48:53.9744052+00:00)
AuditData/Response/Data1StringThe payload data contained in the provider's response.
AuditData/Response/Headers1ObjectA collection of headers included in the provider's response.
AuditData/Response/StatusCode1IntegerThe HTTP status code returned by the provider.
AdviseMessages0 . . NArray<AdviseMessage>Gets the collection of advise messages related to the amendment operation.
AdviseMessages/Code1AdviseMessageCodeGets the code that represents the message type.
AdviseMessages/Level1AdviseMessageLevelGets the severity level of the message (e.g., Error, Warning, or Info).
AdviseMessages/Description1StringGets the message description providing additional context.
AdviseMessages/CorrelationId0 . . 1StringGets a unique identifier for correlating the message with specific operations.
AdviseMessages/External0 . . 1ExternalGets additional external details associated with the message.
AdviseMessages/External/Code1StringThe supplier's internal code for identifying the nature of the response or error.
AdviseMessages/External/
Message
1StringA descriptive message returned by the supplier.
AdviseMessages/External/
HttpStatusCode
1IntegerThe HTTP status code of the supplier's response.
BookingDetails0 . . NArray<BookDetails>Gets the collection of booking details after the amendment.
BookingDetails/Status1BookStatusGets the status of the booking. Possible values: Unknown, Ko, Ok, OnRequest, Cancelled or PendingCommit.
BookingDetails/Reference1ReferenceGets the reference information for the booking.
BookingDetails/Reference/
ClientLocator
0 . . 1StringThe booking locator provided by the client.This is typically used to match the booking in the client's internal systems.
BookingDetails/Reference/
SupplierLocator
0 . . 1StringThe booking locator provided by the supplier.This identifier is used to reference the booking in the supplier's system.
BookingDetails/Reference/
HotelLocator
0 . . 1StringThe 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/Price1PriceGets the price of the booking.
BookingDetails/Price/Currency1CurrencyThe currency of the price, represented in ISO 4217 format (e.g., USD, EUR).
BookingDetails/Price/Binding1BooleanIndicates whether the price is binding.
BookingDetails/Price/Net1DoubleThe net price paid by the Buyer to the Seller.
BookingDetails/Price/Gross1DoubleThe gross price, which includes the net price and the Buyer's commission.
BookingDetails/Price/NetSpecified1BooleanIndicates whether the net price is explicitly specified.
BookingDetails/Price/
MinimumSellingPrice
1DoubleThe minimum selling price.
BookingDetails/Hotel1HotelDetailGets or sets the hotel information for the booking.
BookingDetails/Hotel/Code1StringGets or sets the hotel code.
BookingDetails/Hotel/Name0 . . 1StringGets or sets the hotel name.
BookingDetails/Hotel/CheckIn1StringGets or sets the check-in date.
BookingDetails/Hotel/CheckOut1StringGets or sets the check-out date.
BookingDetails/Hotel/Rooms1 . . NArray<Room>Gets the collection of rooms in the booking.
BookingDetails/Hotel/Rooms/
OccupancyRefId
1IntegerGets the occupancy reference ID.
BookingDetails/Hotel/Rooms/Code1StringGets the room code.
BookingDetails/Hotel/Rooms/
Description
0 . . 1StringGets or sets the room description.
BookingDetails/Hotel/Rooms/
RoomPrice
1RoomPriceGets the room price information.
BookingDetails/Hotel/Rooms/
Boards
0 . . NArray<Board>Gets the collection of boards (meal plans) for the room.
BookingDetails/Hotel/Rooms/
Boards/Code
1StringGets the board code.
BookingDetails/Hotel/Rooms/
Boards/Description
0 . . 1StringGets or sets the board description.
BookingDetails/CancelPolicy0 . . 1OptionCancelPolicyGets or sets the cancellation policy for the booking.
BookingDetails/CancelPolicy/
Refundable
1BooleanGets a value indicating whether the booking is refundable.
BookingDetails/CancelPolicy/
CancelPenalties
0 . . NArray<CancelPenalty>Gets the collection of cancellation penalties.
BookingDetails/Remarks0 . . NArray<String>Gets or sets additional remarks related to the booking.
BookingDetails/PaymentType0 . . 1PaymentTypeGets or sets the payment type for the booking.
BookingDetails/AddOns0 . . 1ObjectGets or sets additional supplier information as key-value pairs.