Back

Version 4

6/1/2023
interface VenueCalendar {
last_calendar_day: string;
scheduled: {
date: string;
inventory: {
reservation: "sold-out" | "available" | "closed";
};
}[];
}
const Resy_getVenueCalendar = async (params: {
venue_id: number;
}): Promise<VenueCalendar> => {
const url = "https://api.resy.com";
const response = await fetch(
`${url}/4/venue/calendar?venue_id=${params.venue_id}`,
{
headers: {
accept: "application/json, text/plain, */*",
"accept-encoding": "gzip, deflate, br",
"accept-language": "en-US,en;q=0.9",
authorization: 'ResyAPI api_key="VbWk7s3L4KiK5fzlO7JD3Q5EYolJI7n5"',
"x-origin": "https://resy.com",
origin: "https://resy.com/",
dnt: "1",
referer: "https://resy.com/",
"content-type": "application/json",
"content-type": "application/x-www-form-urlencoded",
},
},
);
const data = await response.json();
return data;
};
Updated: October 23, 2023