Availability data model

Updated:

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

FieldTypeRequiredDescription
location_idstringNo(reference to CommerceLocation)
start_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
end_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
sizenumberNo
item_idstringNo(reference to CommerceItem)
staff_user_idstringNo(reference to HrisEmployee)
metadataCommerceMetadata[]No
metadata[].idstringNoThe ID of the custom field definition (from the metadata/metadata endpoint).
metadata[].valueobjectNoThe field's value, typed by format: DATE as ISO-8601 (YYYY-MM-DD, or YYYY-MM-DDTHH:MM:SSZ for date-times); NUMBER, PRICE and CURRENCY as a number; BOOLEAN and YES_NO as true/false; MULTIPLE_SELECT as an array of option values; otherwise a string.
metadata[].namespacestringNo
metadata[].formatenumNoThe data type of the custom field, which determines how value is formatted. Values: TEXT, NUMBER, DATE, BOOLEAN, FILE, TEXTAREA, SINGLE_SELECT, MULTIPLE_SELECT, MEASUREMENT, PRICE, YES_NO, CURRENCY, URL
metadata[].extra_dataobjectNo
metadata[].slugstringNoThe integration's API name (key) of an existing custom field. List valid slugs for this object with the metadata/metadata endpoint; unknown slugs are rejected by the integration.
metadata[].descriptionstringNo
metadata[].is_requiredbooleanNo

TypeScript

TypeScript
export type CommerceAvailability = {
	location_id?: string; // (reference to CommerceLocation)
	start_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	end_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	size?: number;
	item_id?: string; // (reference to CommerceItem)
	staff_user_id?: string; // (reference to HrisEmployee)
	metadata?: [];
	raw?: any;
} 

Zod

Zod
import { z } from 'zod';

export const ZodCommerceAvailability = z.object({
	location_id: z.string().optional().describe("(reference to CommerceLocation)"),
	start_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	end_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	size: z.number().optional(),
	item_id: z.string().optional().describe("(reference to CommerceItem)"),
	staff_user_id: z.string().optional().describe("(reference to HrisEmployee)"),
	metadata: z.array().optional(),

});

Python

Python
import dataclasses

@dataclasses.dataclass
class CommerceAvailability:
	"""(reference to CommerceLocation)"""
	location_id: Optional[str]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	start_at: Optional[str]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	end_at: Optional[str]
	size: Optional[int]
	"""(reference to CommerceItem)"""
	item_id: Optional[str]
	"""(reference to HrisEmployee)"""
	staff_user_id: Optional[str]
	metadata: Optional[PropertyCommerceAvailabilityMetadata]
Are we missing anything? Let us know
Was this page helpful?