Category 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
descriptionstringNo
is_activebooleanNo
parent_idstringNo
typeenumNoThe kind of dimension Values: CLASS, DEPARTMENT, LOCATION, PROJECT, TASK, CUSTOM, EXPENSE, INCOME
codestringNoplatform-side tracking code
organization_idstringNo
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 AccountingCategory = {
	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;
	description?: string;
	is_active?: boolean;
	parent_id?: string;
	type?: 'CLASS' | 'DEPARTMENT' | 'LOCATION' | 'PROJECT' | 'TASK' | 'CUSTOM' | 'EXPENSE' | 'INCOME'; // The kind of dimension
	code?: string; // platform-side tracking code
	organization_id?: string;
	metadata?: [];
	raw?: any;
} 

Zod

Zod
import { z } from 'zod';

export const ZodAccountingCategory = 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(),
	description: z.string().optional(),
	is_active: z.boolean().optional(),
	parent_id: z.string().optional(),
	type: z.enum("CLASS", "DEPARTMENT", "LOCATION", "PROJECT", "TASK", "CUSTOM", "EXPENSE", "INCOME").optional().describe("The kind of dimension"),
	code: z.string().optional().describe("platform-side tracking code"),
	organization_id: z.string().optional(),
	metadata: z.array().optional(),

});

Python

Python
import dataclasses

@dataclasses.dataclass
class AccountingCategoryType(str, Enum):
	CLASS = 'CLASS'
	DEPARTMENT = 'DEPARTMENT'
	LOCATION = 'LOCATION'
	PROJECT = 'PROJECT'
	TASK = 'TASK'
	CUSTOM = 'CUSTOM'
	EXPENSE = 'EXPENSE'
	INCOME = 'INCOME'

@dataclasses.dataclass
class AccountingCategory:
	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]
	description: Optional[str]
	is_active: Optional[bool]
	parent_id: Optional[str]
	"""The kind of dimension"""
	type: Optional[AccountingCategoryType]
	"""platform-side tracking code"""
	code: Optional[str]
	organization_id: Optional[str]
	metadata: Optional[PropertyAccountingCategoryMetadata]
Are we missing anything? Let us know
Was this page helpful?