Availability data model

Updated:

View field support, webhooks, and list parameters for each integration on the Supported Integrations page.

FieldTypeRequiredDescription
listing_idstringNopointer to the Property Listing
unittype_idstringNopointer to the Property Unittype (room type)
start_atstring (date-time)Nothe start of the availability period (inclusive) (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
end_atstring (date-time)Nothe end of the availability period (exclusive) (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
statusenumNowhether the period is available, booked or blocked Values: AVAILABLE, UNAVAILABLE, BLOCKED
units_availablenumberNonumber of units available
currencystringNoISO 4217 currency code
price_amountnumberNothe nightly price
min_nightsnumberNominimum length of stay, in nights, for arrivals in this period
max_nightsnumberNomaximum length of stay, in nights, for arrivals in this period
reservation_idsstring[]NoProperty Reservations that occupy this period

TypeScript

TypeScript
export type PropertyAvailability = {
	listing_id?: string; // pointer to the Property Listing
	unittype_id?: string; // pointer to the Property Unittype (room type)
	start_at?: string-time; // the start of the availability period (inclusive) (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	end_at?: string-time; // the end of the availability period (exclusive) (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	status?: 'AVAILABLE' | 'UNAVAILABLE' | 'BLOCKED'; // whether the period is available, booked or blocked
	units_available?: number; // number of units available
	currency?: string; // ISO 4217 currency code
	price_amount?: number; // the nightly price
	min_nights?: number; // minimum length of stay, in nights, for arrivals in this period
	max_nights?: number; // maximum length of stay, in nights, for arrivals in this period
	reservation_ids?: string[]; // Property Reservations that occupy this period
	raw?: any; // raw data from the integration
} 

Zod

Zod
import { z } from 'zod';

export const ZodPropertyAvailability = z.object({
	listing_id: z.string().optional().describe("pointer to the Property Listing"),
	unittype_id: z.string().optional().describe("pointer to the Property Unittype (room type)"),
	start_at: z.string-time().optional().describe("the start of the availability period (inclusive) (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	end_at: z.string-time().optional().describe("the end of the availability period (exclusive) (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	status: z.enum("AVAILABLE", "UNAVAILABLE", "BLOCKED").optional().describe("whether the period is available, booked or blocked"),
	units_available: z.number().optional().describe("number of units available"),
	currency: z.string().optional().describe("ISO 4217 currency code"),
	price_amount: z.number().optional().describe("the nightly price"),
	min_nights: z.number().optional().describe("minimum length of stay, in nights, for arrivals in this period"),
	max_nights: z.number().optional().describe("maximum length of stay, in nights, for arrivals in this period"),
	reservation_ids: z.array().optional().describe("Property Reservations that occupy this period"),

});

Python

Python
import dataclasses

@dataclasses.dataclass
class PropertyAvailabilityStatus(str, Enum):
	AVAILABLE = 'AVAILABLE'
	UNAVAILABLE = 'UNAVAILABLE'
	BLOCKED = 'BLOCKED'

@dataclasses.dataclass
class PropertyAvailability:
	"""pointer to the Property Listing"""
	listing_id: Optional[str]
	"""pointer to the Property Unittype (room type)"""
	unittype_id: Optional[str]
	"""the start of the availability period (inclusive) (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	start_at: Optional[str]
	"""the end of the availability period (exclusive) (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	end_at: Optional[str]
	"""whether the period is available, booked or blocked"""
	status: Optional[PropertyAvailabilityStatus]
	"""number of units available"""
	units_available: Optional[int]
	"""ISO 4217 currency code"""
	currency: Optional[str]
	"""the nightly price"""
	price_amount: Optional[int]
	"""minimum length of stay, in nights, for arrivals in this period"""
	min_nights: Optional[int]
	"""maximum length of stay, in nights, for arrivals in this period"""
	max_nights: Optional[int]
	"""Property Reservations that occupy this period"""
	reservation_ids: Optional[List[List[str]]]
Are we missing anything? Let us know
Was this page helpful?