const url = new URL( "https://partners.blueskyluxury.com/api/availability/calendar-raw-data" ); const headers = { "Authorization": "Bearer JyxOyLUIQk4znlbRQ4QIe4fZ43CVq7u9e6gC5koVOiPGiGlWVYkw7DwNtNHs", "Content-Type": "application/json", "Accept": "application/json", }; let body = { "startdate": "04/28/2023", // Start date in MM/DD/YYYY format "enddate": "04/28/2028", // End date in MM/DD/YYYY format "unit_id": 472842 // Correct unit ID }; fetch(url, { method: "POST", headers, body: JSON.stringify(body), }) .then(response => response.json()) .then(data => { console.log('API Response:', data); // Log the API response }) .catch(error => { console.error('Error:', error); // Log any errors });