Booking

फ्रीमियम
द्वारा Api Dojo | अपडेट किया गया hace 13 días | Travel
लोकप्रियता

9.9 / 10

लेटेंसी

2,586ms

सेवा का स्तर

100%

Health Check

N/A

सभी चर्चाओं पर वापस जाएं

When I use the API I always receive : search_id:""

Rapid account: Beebap 75
beebap75
hace 3 meses

How can I receive the right search_id to use it with the offset then?
thanks!

Rapid account: Apidojo
apidojo Commented hace 3 meses

Hello,

The search_id parameter has already deprecated. You can simply ignore it and use only the “offset” parameter to load the next page. The items per response is fixed at 20 records.

Regards.

Rapid account: Apidojo
apidojo Commented hace 3 meses

Hello,

It seems like the official developer of Booking did change something to the official system. I will forward your issue to the IT team for review.

Regards.

Rapid account: Beebap 75
beebap75 Commented hace 3 meses

Sure! Thanks.
This is the entire request:

  string baseURL = $"https://apidojo-booking-v1.p.rapidapi.com/";
  var client = new RestClient(baseURL);
  client.AddDefaultQueryParameter("offset","0");
  client.AddDefaultQueryParameter("arrival_date", "2024-03-06");
  client.AddDefaultQueryParameter("departure_date", "2024-03-09");
  client.AddDefaultQueryParameter("guest_qty", "2");
  client.AddDefaultQueryParameter("dest_ids", "900040973"); 
  client.AddDefaultQueryParameter("room_qty", "1");
  client.AddDefaultQueryParameter("search_type", "city");
  client.AddDefaultQueryParameter("price_filter_currencycode", "EUR");
  client.AddDefaultQueryParameter("order_by", "popularity");
  client.AddDefaultQueryParameter("languagecode", "it");
  client.AddDefaultQueryParameter("search_id",  "none");


  var request = new RestRequest("properties/list", Method.Get);
  request.AddHeader("X-RapidAPI-Key", XRapidAPIKey);
  request.AddHeader("X-RapidAPI-Host", XRapidAPIHost);

  RestResponse response = client.Execute(request);


  if (response.IsSuccessful)
  {
		 
		 // response here is successful, I got the forst 20 results. However Search_ID  is "" ( null ) in response.content !
		
		}
Rapid account: Apidojo
apidojo Commented hace 3 meses

Please send along with your request so I can reproduce it. Otherwise, I can’t help. In addition, you should recheck required parameters, you may miss it.

Regards.

Rapid account: Beebap 75
beebap75 Commented hace 3 meses

Thanks!
I’m using RestSharp, I tested the endpont : “properties/list”

i.e.:
var request = new RestRequest(“properties/list”, Method.Get);
request.AddHeader(“X-RapidAPI-Key”, XRapidAPIKey);
request.AddHeader(“X-RapidAPI-Host”, XRapidAPIHost);
RestResponse response = client.Execute(request);

I receive successfully the first 20 results , but the property search_id  is aways null (search_id=""). 

what I miss here? 
Thanks!! 
Rapid account: Apidojo
apidojo Commented hace 3 meses

The first init call always returns the right search_id to use with next queries with offset.

चर्चा में शामिल हों - नीचे टिप्पणी जोड़ें:

नई टिप्पणियाँ पोस्ट करने के लिए लॉग इन / साइनअप करें