Table data model

Updated:

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

FieldTypeRequiredDescription
idstringNo
created_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
updated_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
namestringNodisplay label of the table eg Table 1 or Patio 4
numberstringNohuman-facing table number shown on the POS string as some systems use alphanumeric labels
descriptionstringNo
is_activebooleanNo
capacitynumberNonumber of seatsguests the table is set up for
location_idstringNoreference to a commerce_location the restaurantsite (reference to CommerceLocation)
floorplan_namestringNofloorplan section or dining area the table belongs to
floorplan_identifierstringNothe providers identifier of that floorplansection
layoutobjectNoposition and shape of the table on its floorplan
layout.xnumberNohorizontal position on the floorplan in the providers floorplan units
layout.ynumberNovertical position on the floorplan in the providers floorplan units
layout.widthnumberNo
layout.heightnumberNo
layout.rotationnumberNodegrees
layout.shapeenumNoValues: ROUND, SQUARE, RECTANGLE, OVAL, OTHER
statusenumNocurrent occupancy Values: AVAILABLE, OCCUPIED, RESERVED, INACTIVE, OTHER
guest_countnumberNonumber of guests currently seated
occupied_atstring (date-time)Nowhen the current party was seated earliest open order (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
salesorder_idsstring[]Noopen orderschecks currently on the table references accounting_salesorder
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 CommerceTable = {
	id?: string;
	created_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	updated_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	name?: string; // display label of the table eg Table 1 or Patio 4
	number?: string; // human-facing table number shown on the POS string as some systems use alphanumeric labels
	description?: string;
	is_active?: boolean;
	capacity?: number; // number of seatsguests the table is set up for
	location_id?: string; // reference to a commerce_location the restaurantsite (reference to CommerceLocation)
	floorplan_name?: string; // floorplan section or dining area the table belongs to
	floorplan_identifier?: string; // the providers identifier of that floorplansection
	layout?: {
		x?: number; // horizontal position on the floorplan in the providers floorplan units 
		y?: number; // vertical position on the floorplan in the providers floorplan units 
		width?: number; 
		height?: number; 
		rotation?: number; // degrees 
		shape?: 'ROUND' | 'SQUARE' | 'RECTANGLE' | 'OVAL' | 'OTHER'; 
	}; // position and shape of the table on its floorplan
	status?: 'AVAILABLE' | 'OCCUPIED' | 'RESERVED' | 'INACTIVE' | 'OTHER'; // current occupancy
	guest_count?: number; // number of guests currently seated
	occupied_at?: string-time; // when the current party was seated earliest open order (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	salesorder_ids?: string[]; // open orderschecks currently on the table references accounting_salesorder
	metadata?: [];
	raw?: any;
} 

Zod

Zod
import { z } from 'zod';

export const ZodCommerceTable = z.object({
	id: z.string().optional(),
	created_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	updated_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	name: z.string().optional().describe("display label of the table eg Table 1 or Patio 4"),
	number: z.string().optional().describe("human-facing table number shown on the POS string as some systems use alphanumeric labels"),
	description: z.string().optional(),
	is_active: z.boolean().optional(),
	capacity: z.number().optional().describe("number of seatsguests the table is set up for"),
	location_id: z.string().optional().describe("reference to a commerce_location the restaurantsite (reference to CommerceLocation)"),
	floorplan_name: z.string().optional().describe("floorplan section or dining area the table belongs to"),
	floorplan_identifier: z.string().optional().describe("the providers identifier of that floorplansection"),
	layout: z.object({
			x: z.number().optional().describe("horizontal position on the floorplan in the providers floorplan units"),
			y: z.number().optional().describe("vertical position on the floorplan in the providers floorplan units"),
			width: z.number().optional(),
			height: z.number().optional(),
			rotation: z.number().optional().describe("degrees"),
			shape: z.enum("ROUND", "SQUARE", "RECTANGLE", "OVAL", "OTHER").optional()
}).optional().describe("position and shape of the table on its floorplan"),
	status: z.enum("AVAILABLE", "OCCUPIED", "RESERVED", "INACTIVE", "OTHER").optional().describe("current occupancy"),
	guest_count: z.number().optional().describe("number of guests currently seated"),
	occupied_at: z.string-time().optional().describe("when the current party was seated earliest open order (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	salesorder_ids: z.array().optional().describe("open orderschecks currently on the table references accounting_salesorder"),
	metadata: z.array().optional(),

});

Python

Python
import dataclasses

@dataclasses.dataclass
class CommerceTableStatus(str, Enum):
	AVAILABLE = 'AVAILABLE'
	OCCUPIED = 'OCCUPIED'
	RESERVED = 'RESERVED'
	INACTIVE = 'INACTIVE'
	OTHER = 'OTHER'

@dataclasses.dataclass
class CommerceTableLayoutShape(str, Enum):
	ROUND = 'ROUND'
	SQUARE = 'SQUARE'
	RECTANGLE = 'RECTANGLE'
	OVAL = 'OVAL'
	OTHER = 'OTHER'

@dataclasses.dataclass
class PropertyCommerceTableLayout:
	"""horizontal position on the floorplan in the providers floorplan units"""
	x: Optional[int]
	"""vertical position on the floorplan in the providers floorplan units"""
	y: Optional[int]
	width: Optional[int]
	height: Optional[int]
	"""degrees"""
	rotation: Optional[int]
	shape: Optional[CommerceTableLayoutShape]

@dataclasses.dataclass
class CommerceTable:
	id: Optional[str]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	created_at: Optional[str]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	updated_at: Optional[str]
	"""display label of the table eg Table 1 or Patio 4"""
	name: Optional[str]
	"""human-facing table number shown on the POS string as some systems use alphanumeric labels"""
	number: Optional[str]
	description: Optional[str]
	is_active: Optional[bool]
	"""number of seatsguests the table is set up for"""
	capacity: Optional[int]
	"""reference to a commerce_location the restaurantsite (reference to CommerceLocation)"""
	location_id: Optional[str]
	"""floorplan section or dining area the table belongs to"""
	floorplan_name: Optional[str]
	"""the providers identifier of that floorplansection"""
	floorplan_identifier: Optional[str]
	"""position and shape of the table on its floorplan"""
	layout: Optional[PropertyCommerceTableLayout]
	"""current occupancy"""
	status: Optional[CommerceTableStatus]
	"""number of guests currently seated"""
	guest_count: Optional[int]
	"""when the current party was seated earliest open order (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	occupied_at: Optional[str]
	"""open orderschecks currently on the table references accounting_salesorder"""
	salesorder_ids: Optional[List[List[str]]]
	metadata: Optional[PropertyCommerceTableMetadata]
Are we missing anything? Let us know
Was this page helpful?