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)
namestringNoThe name of the location
descriptionstringNo
addressobjectNo
address.address1stringNo
address.address2stringNo
address.citystringNo
address.regionstringNo
address.region_codestringNo
address.postal_codestringNo
address.countrystringNo
address.country_codestringNoISO 2-digit country code
parent_idstringNo
external_identifierstringNo
telephonesHrisTelephone[]No
telephones[].telephonestringYes
telephones[].typeenumNoValues: WORK, HOME, OTHER, FAX, MOBILE
timezonestringNo
currencystringNo
language_localestringNo
is_activebooleanNo
is_hqbooleanNoif this location is the headquarters of the company
company_idstringNo(reference to HrisCompany)
metadataHrisMetadata[]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.

TypeScript

TypeScript
export type HrisLocation = {
	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; // The name of the location
	description?: 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 
	};
	parent_id?: string;
	external_identifier?: string;
	telephones?: [];
	timezone?: string;
	currency?: string;
	language_locale?: string;
	is_active?: boolean;
	is_hq?: boolean; // if this location is the headquarters of the company
	company_id?: string; // (reference to HrisCompany)
	metadata?: [];
	raw?: any;
} 

Zod

Zod
import { z } from 'zod';

export const ZodHrisLocation = 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("The name of the location"),
	description: 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(),
	parent_id: z.string().optional(),
	external_identifier: z.string().optional(),
	telephones: z.array().optional(),
	timezone: z.string().optional(),
	currency: z.string().optional(),
	language_locale: z.string().optional(),
	is_active: z.boolean().optional(),
	is_hq: z.boolean().optional().describe("if this location is the headquarters of the company"),
	company_id: z.string().optional().describe("(reference to HrisCompany)"),
	metadata: z.array().optional(),

});

Python

Python
import dataclasses

@dataclasses.dataclass
class PropertyHrisLocationAddress:
	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 HrisLocation:
	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]
	"""The name of the location"""
	name: Optional[str]
	description: Optional[str]
	address: Optional[PropertyHrisLocationAddress]
	parent_id: Optional[str]
	external_identifier: Optional[str]
	telephones: Optional[PropertyHrisLocationTelephones]
	timezone: Optional[str]
	currency: Optional[str]
	language_locale: Optional[str]
	is_active: Optional[bool]
	"""if this location is the headquarters of the company"""
	is_hq: Optional[bool]
	"""(reference to HrisCompany)"""
	company_id: Optional[str]
	metadata: Optional[PropertyHrisLocationMetadata]
Are we missing anything? Let us know
Was this page helpful?