Profitloss 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)
category_idsstring[]No(reference to AccountingCategory)
start_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
end_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
namestringNo
currencystringNo
income_total_amountnumberNo
net_income_amountnumberNo
expenses_total_amountnumberNo
cost_of_goods_sold_total_amountnumberNo
income_sectionsAccountingProfitlossSection[]No
income_sections[].section_typestringNo
income_sections[].section_namestringNo
income_sections[].total_amountnumberNo
income_sections[].accountsAccountingProfitlossAccount[]No
income_sections[].accounts[].account_idstringNo(reference to AccountingAccount)
income_sections[].accounts[].account_namestringNo
income_sections[].accounts[].total_amountnumberNo
income_sections[].accounts[].transaction_idsstring[]No
expenses_sectionsAccountingProfitlossSection[]No
expenses_sections[].section_typestringNo
expenses_sections[].section_namestringNo
expenses_sections[].total_amountnumberNo
expenses_sections[].accountsAccountingProfitlossAccount[]No
expenses_sections[].accounts[].account_idstringNo(reference to AccountingAccount)
expenses_sections[].accounts[].account_namestringNo
expenses_sections[].accounts[].total_amountnumberNo
expenses_sections[].accounts[].transaction_idsstring[]No
cost_of_goods_sold_sectionsAccountingProfitlossSection[]No
cost_of_goods_sold_sections[].section_typestringNo
cost_of_goods_sold_sections[].section_namestringNo
cost_of_goods_sold_sections[].total_amountnumberNo
cost_of_goods_sold_sections[].accountsAccountingProfitlossAccount[]No
cost_of_goods_sold_sections[].accounts[].account_idstringNo(reference to AccountingAccount)
cost_of_goods_sold_sections[].accounts[].account_namestringNo
cost_of_goods_sold_sections[].accounts[].total_amountnumberNo
cost_of_goods_sold_sections[].accounts[].transaction_idsstring[]No
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 AccountingProfitloss = {
	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)
	category_ids?: string[]; // (reference to AccountingCategory)
	start_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	end_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	name?: string;
	currency?: string;
	income_total_amount?: number;
	net_income_amount?: number;
	expenses_total_amount?: number;
	cost_of_goods_sold_total_amount?: number;
	income_sections?: [];
	expenses_sections?: [];
	cost_of_goods_sold_sections?: [];
	metadata?: [];
	raw?: any;
} 

Zod

Zod
import { z } from 'zod';

export const ZodAccountingProfitloss = 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)"),
	category_ids: z.array().optional().describe("(reference to AccountingCategory)"),
	start_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	end_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	name: z.string().optional(),
	currency: z.string().optional(),
	income_total_amount: z.number().optional(),
	net_income_amount: z.number().optional(),
	expenses_total_amount: z.number().optional(),
	cost_of_goods_sold_total_amount: z.number().optional(),
	income_sections: z.array().optional(),
	expenses_sections: z.array().optional(),
	cost_of_goods_sold_sections: z.array().optional(),
	metadata: z.array().optional(),

});

Python

Python
import dataclasses

@dataclasses.dataclass
class AccountingProfitloss:
	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]
	"""(reference to AccountingCategory)"""
	category_ids: Optional[List[List[str]]]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	start_at: Optional[str]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	end_at: Optional[str]
	name: Optional[str]
	currency: Optional[str]
	income_total_amount: Optional[int]
	net_income_amount: Optional[int]
	expenses_total_amount: Optional[int]
	cost_of_goods_sold_total_amount: Optional[int]
	income_sections: Optional[PropertyAccountingProfitlossIncome_sections]
	expenses_sections: Optional[PropertyAccountingProfitlossExpenses_sections]
	cost_of_goods_sold_sections: Optional[PropertyAccountingProfitlossCost_of_goods_sold_sections]
	metadata: Optional[PropertyAccountingProfitlossMetadata]
Are we missing anything? Let us know
Was this page helpful?