Closed randomprogramming closed 7 months ago
I think something might be wrong with the stays api on test? I tried it like this and I get a 404:
const resp = await axios.post(
"https://api.duffel.com/stays/search",
{
rooms: 1,
adults: 2,
location: {
radius: 99,
geographic_coordinates: {
longitude: 2.4468358606916354,
latitude: 48.86873001352504,
},
},
check_out_date: "2024-05-01",
check_in_date: "2024-05-10",
},
{
headers: {
"Duffel-Version": "v1",
"Accept-Encoding": "gzip",
Accept: "application/json",
"Content-Type": "application/json",
Authorization: "Bearer " + "my_token",
},
}
);
Hmh. After further reading it seems like Stays is only available for "enterprise" clients? Would love to be able to still access the test data for testing out an MVP without actually having to open a business..
Hi @randomprogramming, to be able to use the Stays API, even in development, you need to contact us so we can enable it for you. Sorry about the trouble but that's important for us to maintain good relationships with our content suppliers and do our best to understand your use case.
I've been trying out duffel API for some time now, everything seems to be working okay, but today I tried using the Stays API as so:
And this simply prints out:
I tried debugging and looking at the error closely, but there's no helpful information. Not sure what's going on?