Location 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)
namestringNo
addressobjectNo
address.address1stringNo
address.address2stringNo
address.citystringNo
address.regionstringNo
address.region_codestringNo
address.postal_codestringNo
address.countrystringNo
address.country_codestringNoISO 2-digit country code
descriptionstringNo
is_activebooleanNo
language_localestringNo
parent_idstringNo
currencystringNo
location_typeenumNoValues: RESTAURANT, SALON, WAREHOUSE, STORE, OTHER
telephonesCommerceTelephone[]No
telephones[].telephonestringYes
telephones[].typeenumNoValues: WORK, HOME, FAX, MOBILE, OTHER
ratingnumberNo
review_countnumberNo
price_levelstringNo
latitudenumberNo
longitudenumberNo
image_urlstringNo
web_urlstringNo
mediaCommerceItemMedia[]No
media[].idstringNo
media[].urlstringYes
media[].altstringNo
media[].typeenumNoValues: image, video
media[].heightnumberNo
media[].widthnumberNo
media[].positionnumberNo1 is the first
media[].metadataCommerceMetadata[]No
media[].metadata[].idstringNoThe ID of the custom field definition (from the metadata/metadata endpoint).
media[].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.
media[].metadata[].namespacestringNo
media[].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
media[].metadata[].extra_dataobjectNo
media[].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.
media[].metadata[].descriptionstringNo
media[].metadata[].is_requiredbooleanNo
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
categoriesstring[]No

TypeScript

TypeScript
export type CommerceLocation = {
	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;
	address?: {
		address1?: string; 
		address2?: string; 
		city?: string; 
		region?: string; 
		region_code?: string; 
		postal_code?: string; 
		country?: string; 
		country_code?: string; // ISO 2-digit country code 
	};
	description?: string;
	is_active?: boolean;
	language_locale?: string;
	parent_id?: string;
	currency?: string;
	location_type?: 'RESTAURANT' | 'SALON' | 'WAREHOUSE' | 'STORE' | 'OTHER';
	telephones?: [];
	rating?: number;
	review_count?: number;
	price_level?: string;
	latitude?: number;
	longitude?: number;
	image_url?: string;
	web_url?: string;
	media?: [];
	metadata?: [];
	raw?: any;
	categories?: string[];
} 

Zod

Zod
import { z } from 'zod';

export const ZodCommerceLocation = 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(),
	address: z.object({
			address1: z.string().optional(),
			address2: z.string().optional(),
			city: z.string().optional(),
			region: z.string().optional(),
			region_code: z.string().optional(),
			postal_code: z.string().optional(),
			country: z.string().optional(),
			country_code: z.string().optional().describe("ISO 2-digit country code")
}).optional(),
	description: z.string().optional(),
	is_active: z.boolean().optional(),
	language_locale: z.string().optional(),
	parent_id: z.string().optional(),
	currency: z.string().optional(),
	location_type: z.enum("RESTAURANT", "SALON", "WAREHOUSE", "STORE", "OTHER").optional(),
	telephones: z.array().optional(),
	rating: z.number().optional(),
	review_count: z.number().optional(),
	price_level: z.string().optional(),
	latitude: z.number().optional(),
	longitude: z.number().optional(),
	image_url: z.string().optional(),
	web_url: z.string().optional(),
	media: z.array().optional(),
	metadata: z.array().optional(),
,
	categories: z.array().optional()
});

Python

Python
import dataclasses

@dataclasses.dataclass
class CommerceLocationLocation_type(str, Enum):
	RESTAURANT = 'RESTAURANT'
	SALON = 'SALON'
	WAREHOUSE = 'WAREHOUSE'
	STORE = 'STORE'
	OTHER = 'OTHER'

@dataclasses.dataclass
class PropertyCommerceLocationAddress:
	address1: Optional[str]
	address2: Optional[str]
	city: Optional[str]
	region: Optional[str]
	region_code: Optional[str]
	postal_code: Optional[str]
	country: Optional[str]
	"""ISO 2-digit country code"""
	country_code: Optional[str]

@dataclasses.dataclass
class CommerceLocation:
	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]
	name: Optional[str]
	address: Optional[PropertyCommerceLocationAddress]
	description: Optional[str]
	is_active: Optional[bool]
	language_locale: Optional[str]
	parent_id: Optional[str]
	currency: Optional[str]
	location_type: Optional[CommerceLocationLocation_type]
	telephones: Optional[PropertyCommerceLocationTelephones]
	rating: Optional[int]
	review_count: Optional[int]
	price_level: Optional[str]
	latitude: Optional[int]
	longitude: Optional[int]
	image_url: Optional[str]
	web_url: Optional[str]
	media: Optional[PropertyCommerceLocationMedia]
	metadata: Optional[PropertyCommerceLocationMetadata]

	categories: Optional[List[List[str]]]
Are we missing anything? Let us know
Was this page helpful?