Transaction 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)
memostringNo
total_amountnumberNonegative for CREDIT, positive for DEBIT
tax_amountnumberNonegative for CREDIT, positive for DEBIT
account_idstringNo(reference to AccountingAccount)
referencestringNo
sub_total_amountnumberNo
split_account_idstringNo
payment_methodstringNo
payment_termsstringNo
customer_messagestringNo
typestringNoeg. CreditCardCharge, Check, Invoice, ReceivePayment, JournalEntry, Bill, CreditCardCredit, VendorCredit, Credit, BillPaymentCheck, BillPaymentCreditCard, Charge, Transfer, Deposit, BANK_DEPOSIT, BANK_TRANSFER, Statement, BillableCharge, TimeActivity, CashPurchase, SalesReceipt, CreditMemo, CreditRefund, Estimate, InventoryQuantityAdjustment, PurchaseOrder, GlobalTaxPayment, GlobalTaxAdjustment, Service Tax Refund, Service Tax Gross Adjustment, Service Tax Reversal, Service Tax Defer, Service Tax Partial Utilisation
lineitemsAccountingTransactionLineItem[]No
lineitems[].idstringNo
lineitems[].unit_quantitynumberNo
lineitems[].unit_amountnumberNo
lineitems[].total_amountnumberNowill be a positive value for a debit and negative for a credit
lineitems[].account_idstringNo(reference to AccountingAccount)
lineitems[].object_typestringNo
lineitems[].namestringNo
lineitems[].descriptionstringNo
lineitems[].category_idsstring[]No(reference to AccountingCategory)
lineitems[].taxrate_idstringNoref -> AccountingTaxrate applied to the line
currencystringNo
contactsAccountingTransactionContact[]No
contacts[].idstringYes
contacts[].is_customerbooleanNo
contacts[].is_supplierbooleanNo
organization_idstringNo
category_idsstring[]No(reference to AccountingCategory)
project_idstringNo(reference to TaskProject)
transaction_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
exchange_ratenumberNoExchange rate to the base/home currency at the transaction date
statusenumNoPosting state of the transaction Values: PENDING, POSTED, VOID, OTHER

TypeScript

TypeScript
export type AccountingTransaction = {
	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)
	memo?: string;
	total_amount?: number; // negative for CREDIT, positive for DEBIT
	tax_amount?: number; // negative for CREDIT, positive for DEBIT
	account_id?: string; // (reference to AccountingAccount)
	reference?: string;
	sub_total_amount?: number;
	split_account_id?: string;
	payment_method?: string;
	payment_terms?: string;
	customer_message?: string;
	type?: string; // eg. CreditCardCharge, Check, Invoice, ReceivePayment, JournalEntry, Bill, CreditCardCredit, VendorCredit, Credit, BillPaymentCheck, BillPaymentCreditCard, Charge, Transfer, Deposit, BANK_DEPOSIT, BANK_TRANSFER, Statement, BillableCharge, TimeActivity, CashPurchase, SalesReceipt, CreditMemo, CreditRefund, Estimate, InventoryQuantityAdjustment, PurchaseOrder, GlobalTaxPayment, GlobalTaxAdjustment, Service Tax Refund, Service Tax Gross Adjustment, Service Tax Reversal, Service Tax Defer, Service Tax Partial Utilisation
	lineitems?: [];
	currency?: string;
	contacts?: [];
	organization_id?: string;
	category_ids?: string[]; // (reference to AccountingCategory)
	project_id?: string; // (reference to TaskProject)
	transaction_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	exchange_rate?: number; // Exchange rate to the base/home currency at the transaction date
	status?: 'PENDING' | 'POSTED' | 'VOID' | 'OTHER'; // Posting state of the transaction
	raw?: any;
} 

Zod

Zod
import { z } from 'zod';

export const ZodAccountingTransaction = 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)"),
	memo: z.string().optional(),
	total_amount: z.number().optional().describe("negative for CREDIT, positive for DEBIT"),
	tax_amount: z.number().optional().describe("negative for CREDIT, positive for DEBIT"),
	account_id: z.string().optional().describe("(reference to AccountingAccount)"),
	reference: z.string().optional(),
	sub_total_amount: z.number().optional(),
	split_account_id: z.string().optional(),
	payment_method: z.string().optional(),
	payment_terms: z.string().optional(),
	customer_message: z.string().optional(),
	type: z.string().optional().describe("eg. CreditCardCharge, Check, Invoice, ReceivePayment, JournalEntry, Bill, CreditCardCredit, VendorCredit, Credit, BillPaymentCheck, BillPaymentCreditCard, Charge, Transfer, Deposit, BANK_DEPOSIT, BANK_TRANSFER, Statement, BillableCharge, TimeActivity, CashPurchase, SalesReceipt, CreditMemo, CreditRefund, Estimate, InventoryQuantityAdjustment, PurchaseOrder, GlobalTaxPayment, GlobalTaxAdjustment, Service Tax Refund, Service Tax Gross Adjustment, Service Tax Reversal, Service Tax Defer, Service Tax Partial Utilisation"),
	lineitems: z.array().optional(),
	currency: z.string().optional(),
	contacts: z.array().optional(),
	organization_id: z.string().optional(),
	category_ids: z.array().optional().describe("(reference to AccountingCategory)"),
	project_id: z.string().optional().describe("(reference to TaskProject)"),
	transaction_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	exchange_rate: z.number().optional().describe("Exchange rate to the base/home currency at the transaction date"),
	status: z.enum("PENDING", "POSTED", "VOID", "OTHER").optional().describe("Posting state of the transaction"),

});

Python

Python
import dataclasses

@dataclasses.dataclass
class AccountingTransactionStatus(str, Enum):
	PENDING = 'PENDING'
	POSTED = 'POSTED'
	VOID = 'VOID'
	OTHER = 'OTHER'

@dataclasses.dataclass
class AccountingTransaction:
	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]
	memo: Optional[str]
	"""negative for CREDIT, positive for DEBIT"""
	total_amount: Optional[int]
	"""negative for CREDIT, positive for DEBIT"""
	tax_amount: Optional[int]
	"""(reference to AccountingAccount)"""
	account_id: Optional[str]
	reference: Optional[str]
	sub_total_amount: Optional[int]
	split_account_id: Optional[str]
	payment_method: Optional[str]
	payment_terms: Optional[str]
	customer_message: Optional[str]
	"""eg. CreditCardCharge, Check, Invoice, ReceivePayment, JournalEntry, Bill, CreditCardCredit, VendorCredit, Credit, BillPaymentCheck, BillPaymentCreditCard, Charge, Transfer, Deposit, BANK_DEPOSIT, BANK_TRANSFER, Statement, BillableCharge, TimeActivity, CashPurchase, SalesReceipt, CreditMemo, CreditRefund, Estimate, InventoryQuantityAdjustment, PurchaseOrder, GlobalTaxPayment, GlobalTaxAdjustment, Service Tax Refund, Service Tax Gross Adjustment, Service Tax Reversal, Service Tax Defer, Service Tax Partial Utilisation"""
	type: Optional[str]
	lineitems: Optional[PropertyAccountingTransactionLineitems]
	currency: Optional[str]
	contacts: Optional[PropertyAccountingTransactionContacts]
	organization_id: Optional[str]
	"""(reference to AccountingCategory)"""
	category_ids: Optional[List[List[str]]]
	"""(reference to TaskProject)"""
	project_id: Optional[str]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	transaction_at: Optional[str]
	"""Exchange rate to the base/home currency at the transaction date"""
	exchange_rate: Optional[int]
	"""Posting state of the transaction"""
	status: Optional[AccountingTransactionStatus]
Are we missing anything? Let us know
Was this page helpful?