Organization 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
legal_namestringNo
currencystringNoCurrency primarily used by the organization, in ISO 4217 format (e.g. U.S. dollars is USD).
addressobjectNo
address.address1stringNo
address.address2stringNo
address.citystringNo
address.regionstringNoRegional area of the employee's address. For example, in the U.S., the region is the employee's state; in Canada, the region is the employee’s province.
address.region_codestringNoShort form for the regional area of the employee's address. For example, in the U.S., the region code is the two-letter abbreviation for the employee’s state; in Canada, the region is the two-letter abbreviation for the employee's province.
address.postal_codestringNo
address.countrystringNo
address.country_codestringNoCountry code for the country, in ISO 3166 A-2 format
tax_numberstringNoOrganization's tax number. For example, in the U.S., this is an Employer Identification Number (EIN).
timezonestringNo
websitestringNo
parent_idstringNo
fiscal_year_end_monthnumberNoMonth of the year when the organization’s fiscal year ends (1 - 12, where January is 1)
organization_codestringNoIdentifier for tracking and categorizing organizations for reporting or analysis purposes that is defined by the end-customer
typeenumNoEntity type within a consolidation hierarchy Values: COMPANY, SUBSIDIARY, DIVISION, LOCATION
is_eliminationbooleanNoTrue for consolidation/elimination entities
books_close_atstring (date-time)NoCompany-wide books close / lock date; transactions on or before this date fall in a closed accounting period (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
metadataAccountingMetadata[]No
metadata[].idstringNoThe ID of the custom field definition (from the metadata/metadata endpoint).
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[].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

TypeScript

TypeScript
export type AccountingOrganization = {
	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;
	legal_name?: string;
	currency?: string; // Currency primarily used by the organization, in ISO 4217 format (e.g. U.S. dollars is USD).
	address?: {
		address1?: string; 
		address2?: string; 
		city?: string; 
		region?: string; // Regional area of the employee's address.  For example, in the U.S., the region is the employee's state; in Canada, the region is the employee’s province. 
		region_code?: string; // Short form for the regional area of the employee's address.   For example, in the U.S., the region code is the two-letter abbreviation for the employee’s state; in Canada, the region is the two-letter abbreviation for the employee's province. 
		postal_code?: string; 
		country?: string; 
		country_code?: string; // Country code for the country, in ISO 3166 A-2 format 
	};
	tax_number?: string; // Organization's tax number.  For example, in the U.S., this is an Employer Identification Number (EIN).
	timezone?: string;
	website?: string;
	parent_id?: string;
	fiscal_year_end_month?: number; // Month of the year when the organization’s fiscal year ends (1 - 12, where January is 1)
	organization_code?: string; // Identifier for tracking and categorizing organizations for reporting or analysis purposes that is defined by the end-customer
	type?: 'COMPANY' | 'SUBSIDIARY' | 'DIVISION' | 'LOCATION'; // Entity type within a consolidation hierarchy
	is_elimination?: boolean; // True for consolidation/elimination entities
	books_close_at?: string-time; // Company-wide books close / lock date; transactions on or before this date fall in a closed accounting period (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	metadata?: [];
	raw?: any;
} 

Zod

Zod
import { z } from 'zod';

export const ZodAccountingOrganization = 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(),
	legal_name: z.string().optional(),
	currency: z.string().optional().describe("Currency primarily used by the organization, in ISO 4217 format (e.g. U.S. dollars is USD)."),
	address: z.object({
			address1: z.string().optional(),
			address2: z.string().optional(),
			city: z.string().optional(),
			region: z.string().optional().describe("Regional area of the employee's address.  For example, in the U.S., the region is the employee's state; in Canada, the region is the employee’s province."),
			region_code: z.string().optional().describe("Short form for the regional area of the employee's address.   For example, in the U.S., the region code is the two-letter abbreviation for the employee’s state; in Canada, the region is the two-letter abbreviation for the employee's province."),
			postal_code: z.string().optional(),
			country: z.string().optional(),
			country_code: z.string().optional().describe("Country code for the country, in ISO 3166 A-2 format")
}).optional(),
	tax_number: z.string().optional().describe("Organization's tax number.  For example, in the U.S., this is an Employer Identification Number (EIN)."),
	timezone: z.string().optional(),
	website: z.string().optional(),
	parent_id: z.string().optional(),
	fiscal_year_end_month: z.number().optional().describe("Month of the year when the organization’s fiscal year ends (1 - 12, where January is 1)"),
	organization_code: z.string().optional().describe("Identifier for tracking and categorizing organizations for reporting or analysis purposes that is defined by the end-customer"),
	type: z.enum("COMPANY", "SUBSIDIARY", "DIVISION", "LOCATION").optional().describe("Entity type within a consolidation hierarchy"),
	is_elimination: z.boolean().optional().describe("True for consolidation/elimination entities"),
	books_close_at: z.string-time().optional().describe("Company-wide books close / lock date; transactions on or before this date fall in a closed accounting period (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	metadata: z.array().optional(),

});

Python

Python
import dataclasses

@dataclasses.dataclass
class AccountingOrganizationType(str, Enum):
	COMPANY = 'COMPANY'
	SUBSIDIARY = 'SUBSIDIARY'
	DIVISION = 'DIVISION'
	LOCATION = 'LOCATION'

@dataclasses.dataclass
class PropertyAccountingOrganizationAddress:
	address1: Optional[str]
	address2: Optional[str]
	city: Optional[str]
	"""Regional area of the employee's address.  For example, in the U.S., the region is the employee's state; in Canada, the region is the employee’s province."""
	region: Optional[str]
	"""Short form for the regional area of the employee's address.   For example, in the U.S., the region code is the two-letter abbreviation for the employee’s state; in Canada, the region is the two-letter abbreviation for the employee's province."""
	region_code: Optional[str]
	postal_code: Optional[str]
	country: Optional[str]
	"""Country code for the country, in ISO 3166 A-2 format"""
	country_code: Optional[str]

@dataclasses.dataclass
class AccountingOrganization:
	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]
	legal_name: Optional[str]
	"""Currency primarily used by the organization, in ISO 4217 format (e.g. U.S. dollars is USD)."""
	currency: Optional[str]
	address: Optional[PropertyAccountingOrganizationAddress]
	"""Organization's tax number.  For example, in the U.S., this is an Employer Identification Number (EIN)."""
	tax_number: Optional[str]
	timezone: Optional[str]
	website: Optional[str]
	parent_id: Optional[str]
	"""Month of the year when the organization’s fiscal year ends (1 - 12, where January is 1)"""
	fiscal_year_end_month: Optional[int]
	"""Identifier for tracking and categorizing organizations for reporting or analysis purposes that is defined by the end-customer"""
	organization_code: Optional[str]
	"""Entity type within a consolidation hierarchy"""
	type: Optional[AccountingOrganizationType]
	"""True for consolidation/elimination entities"""
	is_elimination: Optional[bool]
	"""Company-wide books close / lock date; transactions on or before this date fall in a closed accounting period (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	books_close_at: Optional[str]
	metadata: Optional[PropertyAccountingOrganizationMetadata]
Are we missing anything? Let us know
Was this page helpful?