Discussions
Gets availability for a property
I am trying to run this request
const settings = {
async: true,
crossDomain: true,
url: 'https://api.lodgify.com/v1/availability/444668?periodStart=2023-10-12T00%3A00%3A00.000Z&periodEnd=2023-10-23T03%3A55%3A43.348Z',
method: 'GET',
headers: {
accept: 'application/json',
'X-ApiKey': '--REDACTED--'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
but getting CORS error in my browser.
Getting this error please help:
blissfulescapes.au/:1 Access to XMLHttpRequest at 'https://api.lodgify.com/v1/availability/444668?periodStart=2023-10-12T00%3A00%3A00.000Z&periodEnd=2023-10-23T00%3A00%3A00.000Z' from origin 'https://blissfulescapes.au' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.