Expense data model

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)
matter_idstringNopointer to the Legal Matter this expense is recorded against
user_idstringNoHR Employee who incurred or recorded the expense (reference to HrisEmployee)
descriptionstringNo
incurred_atstring (date-time)Nodate the expense was incurred (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
quantitynumberNo
price_amountnumberNounit price
total_amountnumberNo
currencystringNo
typeenumNoValues: HARD_COST, SOFT_COST, OTHER
categorystringNothe vendor's expense category name
is_billablebooleanNo
is_billedbooleanNo
invoice_idstringNopointer to the Accounting Invoice this expense was billed on (reference to AccountingInvoice)
expense_codestringNoUTBMS/LEDES expense code
metadataLegalMetadata[]Nocustom field values
metadata[].idstringNo
metadata[].slugstringNo
metadata[].valueobjectNo
metadata[].namespacestringNo
metadata[].formatenumNoValues: TEXT, NUMBER, DATE, BOOLEAN, FILE, TEXTAREA, SINGLE_SELECT, MULTIPLE_SELECT, MEASUREMENT, PRICE, YES_NO, CURRENCY, URL
metadata[].extra_dataobjectNo

TypeScript

TypeScript
export type LegalExpense = {
	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)
	matter_id?: string; // pointer to the Legal Matter this expense is recorded against
	user_id?: string; // HR Employee who incurred or recorded the expense (reference to HrisEmployee)
	description?: string;
	incurred_at?: string-time; // date the expense was incurred (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	quantity?: number;
	price_amount?: number; // unit price
	total_amount?: number;
	currency?: string;
	type?: 'HARD_COST' | 'SOFT_COST' | 'OTHER';
	category?: string; // the vendor's expense category name
	is_billable?: boolean;
	is_billed?: boolean;
	invoice_id?: string; // pointer to the Accounting Invoice this expense was billed on (reference to AccountingInvoice)
	expense_code?: string; // UTBMS/LEDES expense code
	metadata?: []; // custom field values
	raw?: any;
} 

Zod

Zod
import { z } from 'zod';

export const ZodLegalExpense = 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)"),
	matter_id: z.string().optional().describe("pointer to the Legal Matter this expense is recorded against"),
	user_id: z.string().optional().describe("HR Employee who incurred or recorded the expense (reference to HrisEmployee)"),
	description: z.string().optional(),
	incurred_at: z.string-time().optional().describe("date the expense was incurred (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	quantity: z.number().optional(),
	price_amount: z.number().optional().describe("unit price"),
	total_amount: z.number().optional(),
	currency: z.string().optional(),
	type: z.enum("HARD_COST", "SOFT_COST", "OTHER").optional(),
	category: z.string().optional().describe("the vendor's expense category name"),
	is_billable: z.boolean().optional(),
	is_billed: z.boolean().optional(),
	invoice_id: z.string().optional().describe("pointer to the Accounting Invoice this expense was billed on (reference to AccountingInvoice)"),
	expense_code: z.string().optional().describe("UTBMS/LEDES expense code"),
	metadata: z.array().optional().describe("custom field values"),

});

Python

Python
import dataclasses

@dataclasses.dataclass
class LegalExpenseType(str, Enum):
	HARD_COST = 'HARD_COST'
	SOFT_COST = 'SOFT_COST'
	OTHER = 'OTHER'

@dataclasses.dataclass
class LegalExpense:
	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]
	"""pointer to the Legal Matter this expense is recorded against"""
	matter_id: Optional[str]
	"""HR Employee who incurred or recorded the expense (reference to HrisEmployee)"""
	user_id: Optional[str]
	description: Optional[str]
	"""date the expense was incurred (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	incurred_at: Optional[str]
	quantity: Optional[int]
	"""unit price"""
	price_amount: Optional[int]
	total_amount: Optional[int]
	currency: Optional[str]
	type: Optional[LegalExpenseType]
	"""the vendor's expense category name"""
	category: Optional[str]
	is_billable: Optional[bool]
	is_billed: Optional[bool]
	"""pointer to the Accounting Invoice this expense was billed on (reference to AccountingInvoice)"""
	invoice_id: Optional[str]
	"""UTBMS/LEDES expense code"""
	expense_code: Optional[str]
	"""custom field values"""
	metadata: Optional[PropertyLegalExpenseMetadata]
Are we missing anything? Let us know
Was this page helpful?