Expense data model

Updated:

View field support, webhooks, and list parameters for each integration on the Supported Integrations page.

FieldTypeRequiredDescription
idstringNounique identifier for the expense
created_atstring (date-time)Nowhen the expense was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
updated_atstring (date-time)Nowhen the expense was last updated (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)
descriptionstringNofree-text description of the expense
incurred_atstring (date-time)Nodate the expense was incurred (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
quantitynumberNonumber of units
price_amountnumberNounit price
total_amountnumberNototal amount of the expense
currencystringNoISO 4217 currency code
typeenumNohard cost, soft cost or other Values: HARD_COST, SOFT_COST, OTHER
categorystringNothe vendor's expense category name
is_billablebooleanNowhether the expense is billable
is_billedbooleanNowhether the expense has been billed
invoice_idstringNopointer to the Accounting Invoice this expense was billed on (reference to AccountingInvoice)
expense_codestringNoUTBMS/LEDES expense code
metadataLegalMetadata[]Nocustom field values
metadata[].idstringNothe custom field identifier
metadata[].slugstringNothe custom field key
metadata[].valueobjectNothe custom field value
metadata[].namespacestringNothe scope or origin of the custom field
metadata[].formatenumNothe data type of the value Values: TEXT, NUMBER, DATE, BOOLEAN, FILE, TEXTAREA, SINGLE_SELECT, MULTIPLE_SELECT, MEASUREMENT, PRICE, YES_NO, CURRENCY, URL
metadata[].extra_dataobjectNoadditional data about the custom field

TypeScript

TypeScript
export type LegalExpense = {
	id?: string; // unique identifier for the expense
	created_at?: string-time; // when the expense was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	updated_at?: string-time; // when the expense was last updated (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; // free-text description of the expense
	incurred_at?: string-time; // date the expense was incurred (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	quantity?: number; // number of units
	price_amount?: number; // unit price
	total_amount?: number; // total amount of the expense
	currency?: string; // ISO 4217 currency code
	type?: 'HARD_COST' | 'SOFT_COST' | 'OTHER'; // hard cost, soft cost or other
	category?: string; // the vendor's expense category name
	is_billable?: boolean; // whether the expense is billable
	is_billed?: boolean; // whether the expense has been billed
	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; // raw data from the integration
} 

Zod

Zod
import { z } from 'zod';

export const ZodLegalExpense = z.object({
	id: z.string().optional().describe("unique identifier for the expense"),
	created_at: z.string-time().optional().describe("when the expense was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	updated_at: z.string-time().optional().describe("when the expense was last updated (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().describe("free-text description of the expense"),
	incurred_at: z.string-time().optional().describe("date the expense was incurred (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	quantity: z.number().optional().describe("number of units"),
	price_amount: z.number().optional().describe("unit price"),
	total_amount: z.number().optional().describe("total amount of the expense"),
	currency: z.string().optional().describe("ISO 4217 currency code"),
	type: z.enum("HARD_COST", "SOFT_COST", "OTHER").optional().describe("hard cost, soft cost or other"),
	category: z.string().optional().describe("the vendor's expense category name"),
	is_billable: z.boolean().optional().describe("whether the expense is billable"),
	is_billed: z.boolean().optional().describe("whether the expense has been billed"),
	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:
	"""unique identifier for the expense"""
	id: Optional[str]
	"""when the expense was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	created_at: Optional[str]
	"""when the expense was last updated (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]
	"""free-text description of the expense"""
	description: Optional[str]
	"""date the expense was incurred (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	incurred_at: Optional[str]
	"""number of units"""
	quantity: Optional[int]
	"""unit price"""
	price_amount: Optional[int]
	"""total amount of the expense"""
	total_amount: Optional[int]
	"""ISO 4217 currency code"""
	currency: Optional[str]
	"""hard cost, soft cost or other"""
	type: Optional[LegalExpenseType]
	"""the vendor's expense category name"""
	category: Optional[str]
	"""whether the expense is billable"""
	is_billable: Optional[bool]
	"""whether the expense has been billed"""
	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?