Ratefox API - v2
The Ratefox API searches for the hotel room at a better price than the one specified in the request. If the search is successful, the Ratefox API automatically proceeds with the room booking. Otherwise, it indicates that no better offer is available.
Ratefox API URL
Authorization and authentication
Ratefox API uses HTTP Basic Authentication. The username and password must be encoded in Base64 and sent in the HTTP header with each request.
Authentication format:
- Username and password should be combined with a colon (:)
- This string must be Base64 encoded
- The encoded string is included in the Authorization header with the “Basic” prefix.
Example:
- If your Username is “api_user” and Password is “secret123”
- Combined string: “api_user:secret123”
- Base64 encoded: "YXBpX3VzZXI6c2VjcmV0MTIz”
- Authorization header: Basic YXBpX3VzZXI6c2VjcmV0MTIz
Code examples
curl -X GET 'https://api.example.com/endpoint' \
-H 'Authorization: Basic YXBpX3VzZXI6c2VjcmV0MTIz'
import requests
import base64
# Encode credentials
credentials = base64.b64encode(b'api_user:secret123').decode('utf-8')
# Make request
headers = {'Authorization': f'Basic {credentials}'}
response = requests.get('https://api.example.com/endpoint', headers=headers)
// Encode credentials
const credentials = btoa('api_user:secret123');
// Make request
fetch('https://api.example.com/endpoint', {
headers: {
'Authorization': `Basic ${credentials}`
}
})
.then(response => response.json())
.then(data => console.log(data));
Ratefox API Endpoints
Ratefox API endpoints are:
POST /hotels/ratefox - to ask Ratefox to find for better price and make booking if succeded
POST /hotel/prefetch - optimization for Ratefox flow times. Only for Prefetch mode.
Also there are several postbooking endpoints:
POST /hotels/cancel/{segmentId} - cancel the Ratefox segment reservation with specified ID
POST /hotels/checkstatus/{segmentId} - check status of the Ratefox segment reservation with specified ID
GET /hotels/orderdata/{orderId} - provide description of the Ratefox segment reservation with specified ID
Implementing Ratefox
Depending on your choice of the implementation mode Standard or Prefetch you will need to implement one or two methods in your booking flow.
POST /hotels/ratefox
Standard Mode Ratefox API request for booking the specified hotel room at a better price
Request body example:
{
"SupplierHotel": {
"SupplierId": 0,
"SupplierHotelId": "string"
},
"CheckIn": "2025-01-21T12:23:55.641Z",
"CheckOut": "2025-01-21T12:23:55.641Z",
"Residency": "string",
"Price": {
"BookingPrice": 0,
"Currency": "string",
"TotalTax": {
"Amount": 0,
"IsIncluded": true,
"Currency": "string"
},
"TotalFee": {
"Amount": 0,
"IsIncluded": true,
"Currency": "string"
},
"Commission": {
"Amount": 0,
"Currency": "string"
}
},
"RefundableUntil": "2025-01-21T12:23:55.641Z",
"Rooms": [
{
"Id": "string",
"RoomName": "string",
"RoomBasis": "string",
"AdultsCount": 0,
"KidsAges": [
0
]
}
],
"WorkMode": "string",
"LeadPassenger": {
"Id": "string",
"Allocation": "string",
"Name": {
"GivenName": "string",
"NamePrefix": "string",
"Surname": "string"
},
"Type": "string",
"Age": 0,
"PhoneNumber": "string",
"CustomerEmail": "string",
"Address": {
"CountryCode": "string",
"AddressLine": "string",
"StateProv": "string",
"PostalCode": "string"
}
},
"AdditionalPassengers": [
{
"Id": "string",
"Allocation": "string",
"Name": {
"GivenName": "string",
"NamePrefix": "string",
"Surname": "string"
},
"Type": "string",
"Age": 0
}
],
"LeadPaxRoomId": "string",
"Language": "string",
"RoomsRemarks": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"InternalAgentRef1": "string",
"CustomBookingReference": "string",
"PointOfSale": "string"
}
Response example:
{
"Result": {
"GimmonixHotelId": 0,
"OrderId": 0,
"SupplierName": "string",
"ContractId": 0,
"SupplierId": 0,
"RequestPrice": 0,
"RequestedCurrency": "string",
"FinalPrice": 0,
"Profit": 0,
"Segments": [
{
"SegmentId": 0,
"Status": "string",
"RoomName": "string",
"MealPlan": "string",
"TotalPrice": {
"Commission": 0,
"CommissionInSupplierCurrency": 0,
"Currency": "string",
"FinalPrice": 0,
"FinalPriceInSupplierCurrency": 0,
"PayOnArrivalFinal": 0,
"SupplierCurrency": "string",
"AdditionalTaxesMayApply": true,
"FinalTax": 0,
"TaxesAndFees": [
{
"FeeTitle": "string",
"IsIncludedInPrice": true,
"IsMandatory": true,
"Currency": "string",
"UnitType": "string",
"FrequencyType": "string",
"Value": "string",
"IsValuePercentage": true,
"Remarks": "string"
}
],
"VccTax": 0
},
"SupplierReservationDetails": {
"BookingID": "string",
"BookingReference": "string",
"BookingRemarks": [
"string"
],
"SupplierVoucherId": "string"
},
}
],
"CancellationPolicies": [
{
"CancellationFee": {
"Commission": 0,
"CommissionInSupplierCurrency": 0,
"Currency": "string",
"FinalPrice": 0,
"FinalPriceInSupplierCurrency": 0,
"PayOnArrivalFinal": 0,
"SupplierCurrency": "string",
"AdditionalTaxesMayApply": true,
"FinalTax": 0,
"TaxesAndFees": [
{
"FeeTitle": "string",
"IsIncludedInPrice": true,
"IsMandatory": true,
"Currency": "string",
"UnitType": "string",
"FrequencyType": "string",
"Value": "string",
"IsValuePercentage": true,
"Remarks": "string"
}
],
"VccTax": 0
},
"DateFrom": "2025-01-21T12:27:32.954Z",
"DateTo": "2025-01-21T12:27:32.954Z",
"Description": "string"
}
]
},
"Errors": [
{
"Message": "string",
"ErrorCode": "string",
"ErrorText": "string"
}
]
}
Response codes:
Code | Value |
---|---|
200 | OK |
403 | Forbidden |
500 | Internal server error |
Request parameters
Field | Description | Format | Mandatory |
---|---|---|---|
SupplierHotel | object | Yes | |
SupplierId | Supplier’s ID in Ratefox. Integrated suppliers list <https://documentation.hsp.gimmonix.com/docs/roomworks-setup#1-rooms-content-supported-suppliers> | Integer | Yes |
SupplierHotelId | Supplier’s HotelID | String | Yes |
CheckIn | Check-in date | String Unix Epoch time | Yes |
CheckOut | Check-out date | String Unix Epoch time | Yes |
Residency | The lead passenger residency | String(2) ISO Country Code (Ex: US, CZ, IL) | Yes |
Price | object | Yes | |
BookingPrice | The price from client’s booking flow. Taxes, fees and commission from the request will be applied to the BookingPrice to obtain “clear” price for comparison with alternative packages’ prices. See examples below the table (*). | Double | Yes |
Currency | The currency of the BookingPrice. Rates in response will be in this currency | String(3) ISO Currency Code (Ex: USD, EUR) | Yes |
TotalTax | object | ||
Amount | Amount of taxes | Double | Yes |
IsIncluded | Are taxes included in the BookingPrice. If excluded, BookingPrice will be increased by Tax Amount before comparing with alternative packages’ prices. Otherwise does not affect. | Boolean | Yes |
Currency | If not provided (NULL), then Price Currency is used | String(3) ISO Currency Code | |
TotalFee | object | ||
Amount | Amount of fees | Double | Yes |
IsIncluded | Are fees included in the BookingPrice. If included, BookingPrice will be reduced by Fee Amount before comparing with alternative packages’ prices. Otherwise does not affect. | Boolean | Yes |
Currency | If not provided (NULL), then Price Currency is used | String(3) ISO Currency Code | |
Commission | object | ||
Amount | Amount of client’s commission. BookingPrice will be reduced by Commission Amount before comparing with alternative packages’ prices. | Double | Yes |
Currency | ISO Currency Codes. If not provided (NULL), then Price Currency is used | String(3) ISO Currency Codes | |
RefundableUntil | Refundability deadline | String Unix Epoch time | Yes |
Rooms | Array of objects. Possible room quantity is between 1 and 4 | Array | Yes |
Id | Room Id inside the request. Is generated by client GUID. Should be a unique per each room in the array | GUID | Yes |
RoomName | The name of the requested room (as it used by supplier from SupplierID) | String | Yes |
RoomBasis | The meal-plan, ”Board” (as it used by supplier from SupplierID) | String | Yes |
AdultsCount | Number of adults in the room. The value must be between 1 and 8 | Integer | Yes |
KidsAges | Array of kids ages. Each value must be between 0 and 17. If empty, there are no kids in the room | Array of integer | |
WorkMode | Defines the WorkMode for the request. Possible values: “live”. Can be used only by the client which is set “live” in Gimmonix. The request in this mode produces the real booking; “evaluation”. The mode for testing and evaluation. The request in this mode doesn’t produce the real booking but full description of Ratefox found alternative is steal returned. This mode can be used by both clients connected to Ratefox as "evaluation" (new clients before the certification stage is completed) and those who are set "live". | String | Yes |
LeadPassenger | Array of objects. The main passenger from the booking | Yes | |
Id | Lead passenger’s Id inside the request. Is generated by client GUID. Should be a unique per each passenger in the request | GUID | Yes |
Allocation | Id from Rooms array. Identifies the room for the LeadPassenger | GUID | Yes |
Name | object | Yes | |
GivenName | First name. Use English characters only, otherwise the booking might fail on the supplier side. For internal use only: there is some “cleaning” process in the flow of non English characters | String(50) | Yes |
NamePrefix | Mr, Mrs, Ms etc. If not provided, “Mr” is used. | String | |
Surname | Last name. Use English characters only, otherwise the booking might fail on the supplier side. | String(50) | |
Type | Must be “adult” for the LeadPassenger | String | Yes |
Age | Lead passenger age | Integer | |
PhoneNumber | Passenger’s phone number to specify in the booking | String(50) | |
CustomerEmail | Passenger’s email to specify in the booking | String(254) | |
Address | object. Address details to specify in the booking | ||
CountryCode | String(2) ISO Country Code (Ex: US, CZ, IL) | ||
AddressLine | String(254) | ||
StateProv | String(20) | ||
PostalCode | String(20) | ||
AdditionalPassengers | Array of objects. All passengers (adults and kids) except LeadPassenger must be described in this array. | Array | |
Id | Passenger’s Id inside the request. Is generated by client GUID. Should be a unique per each passenger in the request | GUID | Yes |
Allocation | Id from Rooms array. Identifies the room for the Passenger | GUID | Yes |
Name | object | Yes | |
GivenName | First name. Use English characters only, otherwise the booking might fail on the supplier side. | String(50) | |
NamePrefix | Mr, Mrs, Ms etc. If not provided, “Mr” is used. | String | |
Surname | Last name. Use English characters only, otherwise the booking might fail on the supplier side. | String(50) | |
Type | “adult” or “child” | String | Yes |
Age | Mandatory in case the passenger’s type is ”child”. The value must be between 0 and 17 and match one of the KigsAges array’s values. | Integer | |
LeadPaxRoomId | Id from Rooms array. Identifies the room of the LeadPassenger | GUID | Yes |
Language | Only “en” is currently supported | String | Yes |
RoomsRemarks | Free text remarks to be sent to the supplier within booking. Collection of "Key" : "Value” pairs, where Key is room Id from the Rooms array. Only suppliers that support this feature will receive the remarks. | ||
InternalAgentRef1 | Agent reference of the booking | String | |
CustomBookingReference | Client reference | String | |
PointOfSale | Defines the sales environment. Possible values: - “web” - rates that are available to be sold through desktop websites, - ”mobileapp” - rates that are available to be sold through mobile apps/websites, - ”cug” - Closed User Group. Discounted rates which are sold to ‘members-only’ groups, - ”b2b” - rates which are intended to be sold by travel agents, operating under a B2B booking engine. Suppliers forbid selling B2B rates in B2C channels. | String | Ye |
(*) Examples of price (P) calculations for comparison with alternative packages’ prices.
Ex.1 | Ex.2 | Ex.3 | Ex.3 | |
---|---|---|---|---|
BookingPrice | 500 | 500 | 500 | 500 |
TotalTax | ||||
Amount | 100 | 100 | 100 | 100 |
IsIncluded | true | false | true | false |
TotalFee | ||||
Amount | 50 | 50 | 50 | 50 |
IsIncluded | true | false | false | true |
Commission | ||||
Amount | 25 | 25 | 25 | 25 |
General formula:
P = BookingPrice - Commission.Amount + If(TotalTax.Included == True; 0; TotalTax.Amount) - If(TotalFee.Included == True; TotalFee.Amount; 0)
Ex.1: P = 500 - 50 - 25 = 425
Ex.2: P = 500 + 100 - 25 = 575
Ex.3: P = 500 - 25 = 475
Ex.4: P = 500 + 100 - 50 - 25 = 525
Response parameters
Field | Description | Format | Mandatory |
---|---|---|---|
Result | object. Filled in if Ratefox has made the booking | Yes | |
GimmonixHotelId | Ratefox internal Hotel Id | Integer | Yes |
OrderId | Ratefox internal Id of made booking | Integer | Yes |
SupplierName | Ratefox internal Supplier Name (supplier from the booking made by Ratefox) | String | |
ContractId | Id of the contract between Client and Supplier in Ratefox | Integer | Yes |
SupplierId | Supplier’s ID in Ratefox | Integer | Yes |
RequestPrice | BookingPrice from the Request after applying Taxes, Fees and Commission (see request description above) | Double | Yes |
RequestedCurrency | Price.Currency from the request | String ISO Currency Code | |
FinalPrice | Price from the booking made by Ratefox | Double | Yes |
Profit | RequestPrice - FinalPrice | Double | Yes |
Segments | Array of objects. Depending on the supplier multi-room booking may have one or several segments | Array | |
SegmentId | Ratefox Segment Id | Integer | Yes |
Status | Segment status. Possible statuses list: https://documentation.hsp.gimmonix.com/docs/orders-and-segments-statuses#segment-statuses. Note: in Evaluation mode Segment status is “EV” (successful Ratefox request doesn’t result real booking) | String | |
RoomName | The name of the booked room in supplier terms | String | |
MealPlan | The meal-plan name of the booked room in supplier terms | String | |
TotalPrice | object | ||
Commission | Commission amount | Double | Yes |
CommissionInSupplierCurrency | Commission amount in SupplierCurrency | Double | Yes |
Currency | Currency specified in the request in Price.Currency | String ISO Currency Code | Yes |
FinalPrice | the price of the booking in Currency | Double | Yes |
FinalPriceInSupplierCurrency | the price of the booking in SupplierCurrency | Double | Yes |
PayOnArrivalFinal | Amount to be paid upon arrival in Currency | Double | Yes |
SupplierCurrency | The currency in which the price were originally received from the supplier | String ISO Currency Code | |
AdditionalTaxesMayApply | the value is assigned by supplier | Boolean | Yes |
FinalTax | Tax assigned from supplier response in Currency | Double | Yes |
TaxesAndFees | Array of objects | array | |
FeeTitle | the tax or fee title as returned by the supplier | String | |
IsIncludedInPrice | is this tax or fee included in the FinalPrice | Boolean | |
IsMandatory | is the tax or fee mandatory to be paid. For instance, 'resort fees' are typically mandatory, while 'wifi fee' might be not. | Boolean | |
Currency | Currency specified in the request in Price.Currency | String ISO Currency Code | |
UnitType | represents the category of the tax or fee: “Other” (not specified), “NotApplicable” (the supplier specified that this tax/fee is not applicable for the selected room), “NotSpecified”, “PerOccurrence” (of the fee title), “PerItem” (eg.: number of speedboats), “PerReservation” (the tax/fee will be applied per the entire reservation), “PerChild”, “PerAdult”, “PerNight”, “PerRoom”, “PerStay”, “PerPerson”. | String | |
FrequencyType | represents the repetitive type of tax or fee: “Other”, ”NotApplicable”, “NotSpecified”, “PerMinute”, “PerHour”, ”PerHalfDay”, “PerNight”, “PerWeek”, “PerStay”. | String | |
Value | the decimal value of the taxes and fees | String | |
IsValuePercentage | is the tax or fee a percentage value or an absolute value | Boolean | |
Remarks | the tax or fee description as the supplier returned | String | |
VccTax | Double | ||
SupplierReservationDetails | object | ||
BookingID | Supplier’s booking confirmation Id | String | |
BookingReference | Supplier’s booking reference | String | |
BookingRemarks | Supplier’s booking remarks | Array of strings | |
SupplierVoucherId | Supplier’s voucher Id | String | |
CancellationPolicies | Array of objects | Array | |
CancellationFee | Same approach to detail CancellationFee as for the TotalPrice object above | Yes | |
Commission | Double | Yes | |
CommissionInSupplierCurrency | Double | Yes | |
Currency | String ISO Currency Code | ||
FinalPrice | Double | Yes | |
FinalPriceInSupplierCurrency | Double | Yes | |
PayOnArrivalFinal | Double | Yes | |
SupplierCurrency | String ISO Currency Code | ||
AdditionalTaxesMayApply | Boolean | Yes | |
FinalTax | Double | Yes | |
TaxesAndFees | array of objects | ||
FeeTitle | String | ||
IsIncludedInPrice | Boolean | ||
IsMandatory | Boolean | ||
Currency | String ISO Currency Code | ||
UnitType | String | ||
FrequencyType | String | ||
Value | String | ||
IsValuePercentage | String | ||
Remarks | String | ||
VccTax | Double | ||
DateFrom | first date and time of the cancellation policy. Time is GMT. Please be aware that we won't be able to service complaints on a cancellation fee that was charged by the supplier because of time-zone differences between the supplier cancellation policy time to your time | String Unix Epoch time | Yes |
DateTo | end date and time for the policy. Time is GMT. | String Unix Epoch time | Yes |
Description | policy description as returned from the supplier. | String | |
Errors | Array of error codes and messages. | Array | |
Message | error description | String | |
ErrorCode | List of possible error codes with description https://documentation.hsp.gimmonix.com/docs/error-code-handling | String | |
ErrorText | short error message | String |
POST /hotels/prefetch
Prefetch Mode Ratefox API request (pre-loading data, no booking is made). To proceed with the booking, a subsequent Ratefox API call is required.
NOTES:
- The Prefetch Request will store room information for period of time specified in “Prefetch results expiration (seconds)” Smartbook Settings section of the user parameters in HSP.
- For the Ratefox API request to recognize the prefetch results, the information must be identical to the previous Prefetch request (including Room Name, Basis, Cancellation Policy, Check-in/out dates, number of Adults and Kids, Booking price, Hotel, etc.). Otherwise the Ratefox API request will proceed detached
Request body example:
{
"SupplierHotel": {
"SupplierId": 0,
"SupplierHotelId": "string"
},
"CheckIn": "2025-01-21T12:30:03.205Z",
"CheckOut": "2025-01-21T12:30:03.205Z",
"Residency": "string",
"Price": {
"BookingPrice": 0,
"Currency": "string",
"TotalTax": {
"Amount": 0,
"IsIncluded": true,
"Currency": "string"
},
"TotalFee": {
"Amount": 0,
"IsIncluded": true,
"Currency": "string"
},
"Commission": {
"Amount": 0,
"Currency": "string"
}
},
"RefundableUntil": "2025-01-21T12:30:03.205Z",
"Rooms": [
{
"Id": "string",
"RoomName": "string",
"RoomBasis": "string",
"AdultsCount": 0,
"KidsAges": [
0
]
}
],
"Language": "string",
"WorkMode": "string"
}
Response example:
{
"Result": {
"Success": true
},
"Errors": [
{
"Message": "string",
"ErrorCode": "string",
"ErrorText": "string"
}
]
}
Response codes:
Code | Value |
---|---|
200 | OK |
403 | Forbidden |
500 | Internal server error |
Request parameters
Field | Description | Format | Mandatory |
---|---|---|---|
SupplierHotel | object | Yes | |
SupplierId | Supplier’s ID in Ratefox. Integrated suppliers list: https://documentation.hsp.gimmonix.com/docs/roomworks-setup#1-rooms-content-supported-suppliers | Integer | Yes |
SupplierHotelId | Supplier’s HotelID | String | Yes |
CheckIn | Check-in date | String Unix Epoch time | Yes |
CheckOut | Check-out date | String Unix Epoch time | Yes |
Residency | The lead passenger residency | String(2) ISO Country Code (Ex: US, CZ, IL) | Yes |
Price | object | Yes | |
BookingPrice | The price from client’s booking flow. Taxes, fees and commission from the request will be applied to the BookingPrice to obtain “clear” price for comparison with alternative packages’ prices. See examples below the /hotels/ratefox endpoint request parameters table (*). | Double | Yes |
Currency | The currency of the BookingPrice. Rates in response will be in this currency | String(3) ISO Currency Code (Ex: USD, EUR) | Yes |
TotalTax | object | ||
Amount | Amount of taxes | Double | Yes |
IsIncluded | Are taxes included in the BookingPrice. If excluded, BookingPrice will be increased by Tax Amount before comparing with alternative packages’ prices. Otherwise does not affect. | Boolean | Yes |
Currency | If not provided (NULL), then Price Currency is used | String(3) ISO Currency Code | |
TotalFee | object | ||
Amount | Amount of fees | Double | Yes |
IsIncluded | Are fees included in the BookingPrice. If included, BookingPrice will be reduced by Fee Amount before comparing with alternative packages’ prices. Otherwise does not affect. | Boolean | Yes |
Currency | If not provided (NULL), then Price Currency is used | String(3) ISO Currency Code | |
Commission | object | ||
Amount | Amount of client’s commission. BookingPrice will be reduced by Commission Amount before comparing with alternative packages’ prices. | Double | Yes |
Currency | ISO Currency Codes. If not provided (NULL), then Price Currency is used | String(3) ISO Currency Codes | |
RefundableUntil | Refundability deadline | String Unix Epoch time | Yes |
Rooms | Array of objects. Possible room quantity is between 1 and 4 | Array | Yes |
Id | Room Id inside the request. Is generated by client GUID. Should be a unique per each room in the array | GUID | Yes |
RoomName | The name of the requested room (as it used by supplier from SupplierID) | String | Yes |
RoomBasis | The meal-plan, ”Board” (as it used by supplier from SupplierID) | String | Yes |
AdultsCount | Number of adults in the room. The value must be between 1 and 8 | Integer | Yes |
KidsAges | Array of kids ages. Each value must be between 0 and 17. If empty, there are no kids in the room | Array of integer | |
WorkMode | Defines the WorkMode for the request. Possible values: “live”. Can be used only by the client which is set “live” in Gimmonix. The request in this mode produces the real booking; “evaluation”. The mode for testing and evaluation. The request in this mode doesn’t produce the real booking but full description of Ratefox found alternative is steal returned. This mode can be used by both clients connected to Ratefox as "evaluation" (new clients before the certification stage is completed) and those who are set "live". | String | Yes |
Language | Only “en” is currently supported | String | Yes |
Postbooking endpoints
POST /hotels/cancel/{segmentId}
Cancel the Ratefox segment reservation with specified ID.
Parameters: segmentId (integer)
Response example:
{
"Result": {
"BookCancelID": "string",
"CancellationComment": "string",
"CancellationFee": 0,
"Currency": "string",
"Status": "string"
},
"Errors": [
{
"Message": "string",
"ErrorCode": "string",
"ErrorText": "string"
}
]
}
Possible Statuses list: https://documentation.hsp.gimmonix.com/docs/orders-and-segments-statuses
Response parameters:
Field | Description | Format | Mandatory |
---|---|---|---|
BookCancelID | Cancellation ID | String | |
CancellationComment | Cancellation Comment | String | |
CancellationFee | Cancellation Fee | Double | |
Currency | Currency of the cancellation fee | String ISO Currency Code | |
Status | Cancellation Status. Possible statuses list: https://documentation.hsp.gimmonix.com/docs/orders-and-segments-statuses#segment-cancellation-statuses | String | |
Errors | Array of error codes and messages. | Array | |
Message | error description | String | |
ErrorCode | List of possible error codes with description https://documentation.hsp.gimmonix.com/docs/error-code-handling | String | |
ErrorText | short error message | String |
POST /hotels/checkstatus/{segmentId}
Check status of the Ratefox segment reservation with specified ID.
Parameters: segmentId (integer)
Response example:
{
"Result": {
"Status": "string"
},
"Errors": [
{
"Message": "string",
"ErrorCode": "string",
"ErrorText": "string"
}
]
}
Response parameters:
Field | Description | Format | Mandatory |
---|---|---|---|
Status | Segment Status. Possible statuses list: https://documentation.hsp.gimmonix.com/docs/orders-and-segments-statuses#segment-statuses | String | |
Errors | Array of error codes and messages. | Array | |
Message | error description | String | |
ErrorCode | List of possible error codes with description https://documentation.hsp.gimmonix.com/docs/error-code-handling | String | |
ErrorText | short error message | String |
GET /hotels/orderdata/{orderId}
Provide description of the Ratefox order (booking) reservation with specified ID
Parameters: orderId (integer)
Response example:
{
"Result": {
"HotelId": 0,
"OrderId": 0,
"SupplierName": "string",
"ContractId": 0,
"SupplierId": 0,
"RequestPrice": 0,
"RequestedCurrency": "string",
"FinalPrice": 0,
"Profit": 0,
"CheckIn": "2025-01-21T12:43:38.569Z",
"CheckOut": "2025-01-21T12:43:38.569Z",
"Segments": [
{
"SegmentId": 0,
"Status": "string",
"Rooms": [
{
"RoomName": "string",
"MealPlan": "string"
}
],
"TotalPrice": {
"Commission": 0,
"CommissionInSupplierCurrency": 0,
"Currency": "string",
"FinalPrice": 0,
"FinalPriceInSupplierCurrency": 0,
"PayOnArrivalFinal": 0,
"SupplierCurrency": "string",
"AdditionalTaxesMayApply": true,
"FinalTax": 0,
"TaxesAndFees": [
{
"FeeTitle": "string",
"IsIncludedInPrice": true,
"IsMandatory": true,
"Currency": "string",
"UnitType": "string",
"FrequencyType": "string",
"Value": "string",
"IsValuePercentage": true,
"Remarks": "string"
}
],
"VccTax": 0
},
"SupplierReservationDetails": {
"BookingID": "string",
"BookingReference": "string",
"BookingRemarks": [
"string"
],
"SupplierVoucherId": "string"
},
"CancellationPolicies": [
{
"CancellationFee": {
"Commission": 0,
"CommissionInSupplierCurrency": 0,
"Currency": "string",
"FinalPrice": 0,
"FinalPriceInSupplierCurrency": 0,
"PayOnArrivalFinal": 0,
"SupplierCurrency": "string",
"AdditionalTaxesMayApply": true,
"FinalTax": 0,
"TaxesAndFees": [
{
"FeeTitle": "string",
"IsIncludedInPrice": true,
"IsMandatory": true,
"Currency": "string",
"UnitType": "string",
"FrequencyType": "string",
"Value": "string",
"IsValuePercentage": true,
"Remarks": "string"
}
],
"VccTax": 0
},
"DateFrom": "2025-01-21T12:43:38.569Z",
"DateTo": "2025-01-21T12:43:38.569Z",
"Description": "string"
}
]
}
],
"Errors": [
{
"Message": "string",
"ErrorCode": "string",
"ErrorText": "string"
}
]
}
}
Response parameters:
Field | Description | Format | Mandatory |
---|---|---|---|
Result | object | ||
OrderId | Ratefox internal Id of the booking | Integer | Yes |
SupplierId | Supplier’s ID in Ratefox | Integer | Yes |
SupplierName | Ratefox internal Supplier Name (supplier from the booking made by Ratefox) | String | Yes |
HotelId | Ratefox Hotel Id | String | Yes |
ContractId | Id of the contract between Client and Supplier in Ratefox | Integer | Yes |
RequestPrice | BookingPrice from the Request after applying Taxes, Fees and Commission (see Ratefox API request description above) | Double | Yes |
RequestCurrency | Price.Currency from the request | String ISO Currency Code | Yes |
FinalPrice | Price from the booking made by Ratefox | Double | Yes |
Profit | RequestPrice - FinalPrice | Double | Yes |
CheckIn | String Unix Epoch time | Yes | |
CheckOut | String Unix Epoch time | Yes | |
Segments | Array of objects | ||
SegmentId | Ratefox Segment Id | Integer | Yes |
Status | Segment status. Possible statuses list: https://documentation.hsp.gimmonix.com/docs/orders-and-segments-statuses#segment-statuses. Note: in Evaluation mode Segment status is “EV” (successful Ratefox request doesn’t result real booking) | String | Yes |
Rooms | Array of objects | ||
RoomName | The name of the booked room in supplier terms | String | Yes |
MealPlan | The meal-plan name of the booked room in supplier terms | String | Yes |
TotalPrice | object | ||
Commission | Commission amount | Double | Yes |
CommissionInSupplierCurrency | Commission amount in SupplierCurrency | Double | Yes |
Currency | Currency specified in the request in Price.Currency | String ISO Currency Code | Yes |
FinalPrice | the price of the booking in Currency | Double | Yes |
FinalPriceInSupplierCurrency | the price of the booking in SupplierCurrency | Double | Yes |
PayOnArrivalFinal | Amount to be paid upon arrival in Currency | Double | Yes |
SupplierCurrency | The currency in which the price were originally received from the supplier | String ISO Currency Code | |
AdditionalTaxesMayApply | the value is assigned by supplier | Boolean | Yes |
FinalTax | Tax assigned from supplier response in Currency | Double | Yes |
TaxesAndFees | Array of objects | array | |
FeeTitle | the tax or fee title as returned by the supplier | String | |
IsIncludedInPrice | is this tax or fee included in the FinalPrice | Boolean | |
IsMandatory | is the tax or fee mandatory to be paid. | Boolean | |
Currency | Currency specified in the request in Price.Currency | String ISO Currency Code | |
UnitType | represents the category of the tax or fee: “Other” (not specified), “NotApplicable” (the supplier specified that this tax/fee is not applicable for the selected room), “NotSpecified”, “PerOccurrence” (of the fee title), “PerItem” (eg.: number of speedboats), “PerReservation” (the tax/fee will be applied per the entire reservation), “PerChild”, “PerAdult”, “PerNight”, “PerRoom”, “PerStay”, “PerPerson”. | String | |
FrequencyType | represents the repetitive type of tax or fee: “Other”, ”NotApplicable”, “NotSpecified”, “PerMinute”, “PerHour”, ”PerHalfDay”, “PerNight”, “PerWeek”, “PerStay”. | String | |
Value | the decimal value of the taxes and fees | String | |
IsValuePercentage | is the tax or fee a percentage value or an absolute value | Boolean | |
Remarks | the tax or fee description as the supplier returned | String | |
VccTax | Double | ||
SupplierReservationDetails | object | ||
BookingID | Supplier’s booking confirmation Id | String | |
BookingReference | Supplier’s booking reference | String | |
BookingRemarks | Supplier’s booking remarks | Array of strings | |
SupplierVoucherId | Supplier’s voucher Id | String | |
CancellationPolicies | Array of objects | Array | |
CancellationFee | Same approach to detail CancellationFee as for the TotalPrice object above | Yes | |
Commission | Double | Yes | |
CommissionInSupplierCurrency | Double | Yes | |
Currency | String ISO Currency Code | ||
FinalPrice | Double | Yes | |
FinalPriceInSupplierCurrency | Double | Yes | |
PayOnArrivalFinal | Double | Yes | |
SupplierCurrency | String ISO Currency Code | ||
AdditionalTaxesMayApply | Boolean | Yes | |
FinalTax | Double | Yes | |
TaxesAndFees | array of objects | ||
FeeTitle | String | ||
IsIncludedInPrice | Boolean | ||
IsMandatory | Boolean | ||
Currency | String ISO Currency Code | ||
UnitType | String | ||
FrequencyType | String | ||
Value | String | ||
IsValuePercentage | String | ||
Remarks | String | ||
VccTax | Double | ||
DateFrom | first date and time of the cancellation policy. Time is GMT. Please be aware that we won't be able to service complaints on a cancellation fee that was charged by the supplier because of time-zone differences between the supplier cancellation policy time to your time | String Unix Epoch time | Yes |
DateTo | end date and time for the policy. Time is GMT. | String Unix Epoch time | Yes |
Description | policy description as returned from the supplier. | String | |
Errors | Array of error codes and messages | ||
Message | error description | String | |
ErrorCode | List of possible error codes with description https://documentation.hsp.gimmonix.com/docs/error-code-handling | String | |
ErrorText | short error message | String |
Updated about 15 hours ago