Prebook rate from search step

Prebook rate from search step

#b2b

This call is available to only certified partners who don’t use the Retrieve hotelpage call in their flow.
https://api.worldota.net/api/b2b/v3/serp/prebook/
ℹ️

The call checks if the requested rate is still available before it can be booked and improves the booking success rate:

  • If the original rate is unavailable, the call will try to find the same or similar rate with the new book_hash and match_hash field values.

  • If:

    • The same rate isn’t found.
    • The request specifies a permissible price increase in the price_increase_percent field.

    The call will try to find the same room but with an increased price. The value in the payment_options field may change.

ℹ️

The limitations:

  • The recommended call timeout is 60 seconds.
  • The minimum call timeout is 30 seconds.

Request example

curl --user '<KEY_ID>:<API_KEY>' 'https://api.worldota.net/api/b2b/v3/serp/prebook/' \
--header 'Content-Type: application/json' \
--data '{
  "hash": "sr-b9164354-5bef-5e30-850d-09ed638272f4",
  "price_increase_percent": 20
}'

Request body

Response

Response example

{
  "data": {
    "hotels": [
      {
        "id": "ambassador_hotel_2",
        "hid": 7597119,
        "rates": [
          {
            "book_hash": "p-4ee7f78d-af14-453f-b3fd-e8b1a80102ae",
            "match_hash": "m-b743e28f-060e-54a8-8e61-70931704806d",
            "daily_prices": [
              "12.60"
            ],
            "meal": "breakfast",
            "meal_data": {
              "value": "breakfast",
              "has_breakfast": true,
              "no_child_meal": false
            },
            "payment_options": {
              "payment_types": [
                {
                  "amount": "12.50",
                  "show_amount": "12.60",
                  "currency_code": "EUR",
                  "show_currency_code": "EUR",
                  "by": null,
                  "is_need_credit_card_data": false,
                  "is_need_cvc": false,
                  "type": "deposit",
                  "vat_data": {
                    "included": false,
                    "applied": false,
                    "amount": "0.00",
                    "currency_code": "EUR",
                    "value": "0.00"
                  },
                  "tax_data": {
                    "taxes": [
                      {
                        "name": "city_tax",
                        "included_by_supplier": false,
                        "amount": "2.00",
                        "currency_code": "EUR"
                      }
                    ]
                  },
                  "commission_info": {
                    "show": {
                      "amount_gross": "14.00",
                      "amount_net": "12.60",
                      "amount_commission": "1.40"
                    },
                    "charge": {
                      "amount_gross": "14.00",
                      "amount_net": "12.50",
                      "amount_commission": "1.50"
                    }
                  },
                  "cancellation_penalties": {
                    "policies": [
                      {
                        "start_at": null,
                        "end_at": null,
                        "amount_charge": "12.50",
                        "amount_show": "12.60",
                        "commission_info": {
                          "show": {
                            "amount_gross": "14.00",
                            "amount_net": "12.60",
                            "amount_commission": "1.40"
                          },
                          "charge": {
                            "amount_gross": "14.00",
                            "amount_net": "12.50",
                            "amount_commission": "1.50"
                          }
                        }
                      }
                    ],
                    "free_cancellation_before": null
                  },
                  "recommended_price": {
                    "amount": "12.50",
                    "currency_code": "EUR",
                    "show_amount": "12.60",
                    "show_currency_code": "EUR"
                  }
                }
              ]
            },
            "bar_rate_price_data": {
              "amount": "84.92",
              "currency_code": "EUR"
            },
            "rg_ext": {
              "class": 4,
              "quality": 0,
              "sex": 0,
              "bathroom": 2,
              "bedding": 3,
              "family": 0,
              "capacity": 2,
              "club": 0,
              "bedrooms": 0,
              "balcony": 0,
              "view": 0,
              "floor": 0
            },
            "legal_info": {
              "hotel": {
                "name": "",
                "address": "",
                "taxpayer_number": "0000000000",
                "state_registration_number": "0000000000000",
                "work_time": "from 9-18 local time"
              },
              "provider": {
                "name": "",
                "address": "",
                "taxpayer_number": "0000000000",
                "state_registration_number": "0000000000000"
              }
            },
            "room_name": "Standard Double room (full double bed)",
            "room_name_info": {
              "original_rate_name": "Basic Room, 1 Double Bed, Non Smoking"
            },
            "serp_filters": [
              "has_bathroom",
              "has_breakfast",
              "has_internet"
            ],
            "sell_price_limits": null,
            "allotment": 10,
            "amenities_data": [
              "non-smoking"
            ],
            "any_residency": true,
            "deposit": null,
            "no_show": {
              "amount": "25.00",
              "currency_code": "EUR",
              "from_time": "12:00:00"
            },
            "room_data_trans": {
              "main_room_type": "Standard Double room",
              "main_name": "Standard Double room",
              "bathroom": null,
              "bedding_type": "full double bed",
              "misc_room_type": null
            }
          }
        ],
        "bar_price_data": null
      }
    ],
    "changes": {
      "price_changed": false
    }
  },
  "debug": {
    "request": {
      "hash": "sr-b9164354-5bef-5e30-850d-09ed638272f4",
      "price_increase_percent": 10
    },
    "key_id": 7705,
    "validation_error": null
  },
  "status": "ok",
  "error": null
}

Errors

The error field has the value specified in the headers below.

no_available_rates

The rate with the price_increase_percent field value isn’t found. Try to change the value.

rate_not_found

  • The rate with the hash field value isn’t found.
  • The hash field value has expired.

Send another search request and change the hash field value.

invalid_params

  • The hash field is required.
  • The hash field value is incorrect.
  • The price_increase_percent field value is less than 0.

unknown

The internal ETG services’ timeout.

prebook_from_serp_disabled

There is no permission to use this call for this contract. Contact the API support team.

contract_mismatch

The pre-book contract differs from the rate contract. They should be the same.