edit

Check Rate

Introduction

Check for single rate availability for a given rate key. This method is intended to provide the most recent availability data for any selected rate. You'd better check for a rate at least once just before proceeding to booking step.

If rate has gone at the time of query, client receives not available error.

Definition

1
POST https://api.ratemarkt.com/v1/checkrate

Query Object

Argument Type Required Description
rateKey string yes Unique rate identifier

Example Query Object

1
2
3
{
  "rateKey": "[Q9k|3|USD|US|[[2|[]]]]_[AJ62Fw|ANMdEg|NET|0|Prabrg|[jVOYrg|2|0]]"
}

Result Object

Result Object Hint

While Check Hotel resource returns a Hotel object, this resource also returns exactly the same Hotel object except it holds only a single rate object in rates field.

So you may want to reuse the same json parser logic in your client application.

Argument Type Nullable Description
Hotel.hotelCode string no Unique hotel identifier
Hotel.hotelName string no Hotel name
Hotel.destinationCode string no Unique destination identifier
Hotel.destinationName string no Destination name
Hotel.countryCode string no Two letter country code (ISO 3166-1 alpha-2)
Hotel.rates list[Rate] no List of Rate objects. Each rate corresponds to a hotel room combined with a service level which means a bookable product with a price for each hotel.
Rate.rateType string no Type of the rate. There are three types:
  • NET: This type of rate can be selled by applying any margin on top of it.
  • SALE: Commissionable rate which should be selled exactly at the given rate.
  • DIRECT: Commissionable rate which the amount is payed directly to the hotelier by the occupants at the time of arrival.
For commissionable rates, the amount of commission for the merchant is denoted at Rate.commission field.
Rate.rateKey string no Unique identifier for each rate.
Rate.nonrefundable boolean yes Flag denoting whether the rate is refundable or not. It means that if any nonrefundable rate is booked, cancellation of that booking won't be refunded in any cases.

Value can be null in some cases so please refer to the corresponding Rate.cancellation_policies field for that rate for money refunding policy at the time of cancellation.
Rate.boardType string no Board type code of the rate. Possible value are
  • RO: Room Only
  • BB: Bed And Breakfast
  • HB: Half Board
  • FB: Full Board
  • AI: All Inclusive
Rate.boardName string no Board type name of the rate. See Rate.boardType field for possible values.
Rate.rate decimal no Total amount of the rate at given currency specified in Rate.currency field.
Rate.currency string no Three letter currency code (ISO-4217) of the total amount for the rate specified in Rate.rate field
Rate.rooms list[Room] no List of Room objects.
Room.numberOfAdults integer no Maximum number of adults can fit into this room
Room.childrenAges list[integer] no Children with specified ages can be accepted for this room.
Room.roomDescription string no Any arbitrary description for this room which the hotelier specified.
Room.sequence integer no Room sequence identifier which is useful at the time of booking in order to specify which occupant set will be matched with which room.
Rate.cancellationPolicies list[CancellationPolicy] yes List of CancellationPolicy objects.

Cancellation policies indicates the amount of penalty charged and deducted from the total refund amount of the booking at the time of cancellation performed after the specified date and time.

Please note that, the value can be null since not all the suppliers provide this data on Check Hotels step. In these cases, you should use Check Rate end point accordingly to able to retrieve cancellation policies.
CancellationPolicy.amount decimal no Penalty amount in rate's currency specified in Rate.currency field
CancellationPolicy.fromDate string no Offset date time string in YYYY-MM-DDThh:mmTZD (ISO 8601) format indicating from when the polciy applied.
Rate.remarks string yes Any comments, warnings or policies applied by the hotel displayed here if available.
Rate.commission decimal yes Amount of comission specified for commissionable rates.
Rate.hotelRate decimal yes Total amount of rate in hotelier's currency specified in hotelCurrency field which will be payed to the hotelier by the occupants at the time of arrival. This field should not be null when the Rate.rateType is DIRECT
Rate.hotelCurrency string yes Three letter currency code (ISO-4217) of the total amount for the hotel rate specified in Rate.hotelRate field

Example Result Object

Holding Single Rate

Note that the hotel object contains only a single rate object which is queried by the given rate key.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
  "hotel": {
    "hotelCode": "d31d12",
    "hotelName": "The Marmara Taksim",
    "destinationCode": "c36ca9",
    "destinationName": "istanbul",
    "countryCode": "TR",
    "rates": [
      {
        "rateType": "NET",
        "rateKey": "[Q9k|3|USD|US|[[2|[]]]]_[AJ62Fw|ANMdEg|NET|0|5pyO3Q|[VaYabg|2|0]]",
        "nonrefundable": false,
        "boardType": "RO",
        "boardName": "Room Only",
        "rate": 928.17,
        "currency": "EUR",
        "rooms": [
          {
            "numberOfAdults": 2,
            "childrenAges": [],
            "roomDescription": "DOUBLE CLUB SEA VIEW",
            "sequence": 1
          }
        ],
        "cancellationPolicies": [
          {
            "amount": 276.24,
            "fromDate": "2017-07-19T23:59:00+03:00"
          }
        ],
        "remarks": "CONTRACT VALID FOR JUNIOR ROOM TYPES .  Check-in hour 15:00 - .",
        "commission": null,
        "hotelCurrency": null,
        "hotelRate": null
      }
    ]
  }
}