Salesreceipt 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)
organization_idstringNo
metadataAccountingMetadata[]No
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
receipt_numberstringNo
referencestringNo
contact_idstringNocustomer (reference to AccountingContact)
account_idstringNodeposit-to GL account (reference to AccountingAccount)
posted_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
currencystringNo
exchange_ratenumberNo
sub_total_amountnumberNo
tax_amountnumberNo
discount_amountnumberNo
total_amountnumberNo
is_inclusive_of_taxbooleanNo
payment_methodstringNo
notesstringNo
lineitemsAccountingLineitem[]No
lineitems[].idstringNo
lineitems[].created_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
lineitems[].updated_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
lineitems[].refunded_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
lineitems[].total_amountnumberNounit_quantity * unit_amount + tax_amount
lineitems[].refund_amountnumberNo
lineitems[].discount_amountnumberNo
lineitems[].tax_amountnumberNo
lineitems[].item_idstringNo(reference to CommerceItem)
lineitems[].unit_amountnumberNo
lineitems[].unit_quantitynumberNo
lineitems[].item_skustringNo
lineitems[].item_namestringNo
lineitems[].item_descriptionstringNo
lineitems[].notesstringNo
lineitems[].taxrate_idstringNo
lineitems[].account_idstringNo(reference to AccountingAccount)
lineitems[].category_idsstring[]No(reference to AccountingCategory)
lineitems[].locationsAccountingReference[]No
lineitems[].locations[].idstringNo
lineitems[].locations[].namestringNo
lineitems[].item_variantsAccountingReference[]No
lineitems[].item_variants[].idstringNo
lineitems[].item_variants[].namestringNo
lineitems[].feesAccountingFee[]No
lineitems[].fees[].typeenumYesUnified fee category Values: TAX, DISCOUNT, PROMOTION, SHIPPING, GIFT_WRAP, COD, SURCHARGE, TIP, SERVICE_CHARGE, OTHER
lineitems[].fees[].original_typestringNoThe provider's original fee label, e.g. "VAT" or a shipping carrier name
lineitems[].fees[].amountnumberYes
lineitems[].fees[].currencystringNoISO 4217 currency code, e.g. USD
lineitems[].contact_idstringNo(reference to AccountingContact)
lineitems[].project_idstringNoref -> AccountingProject; the project this line is coded to (reference to TaskProject)
lineitems[].exchange_ratenumberNoThe exchange rate applied to this line, for multi-currency documents
lineitems[].is_billablebooleanNoTrue when the line is rebillable to a customer
billing_addressobjectNo
billing_address.address1stringNo
billing_address.address2stringNo
billing_address.citystringNo
billing_address.regionstringNoRegional area of the employee's address. For example, in the U.S., the region is the employee's state; in Canada, the region is the employee’s province.
billing_address.region_codestringNoShort form for the regional area of the employee's address. For example, in the U.S., the region code is the two-letter abbreviation for the employee’s state; in Canada, the region is the two-letter abbreviation for the employee's province.
billing_address.postal_codestringNo
billing_address.countrystringNo
billing_address.country_codestringNoCountry code for the country, in ISO 3166 A-2 format
shipping_addressobjectNo
shipping_address.address1stringNo
shipping_address.address2stringNo
shipping_address.citystringNo
shipping_address.regionstringNoRegional area of the employee's address. For example, in the U.S., the region is the employee's state; in Canada, the region is the employee’s province.
shipping_address.region_codestringNoShort form for the regional area of the employee's address. For example, in the U.S., the region code is the two-letter abbreviation for the employee’s state; in Canada, the region is the two-letter abbreviation for the employee's province.
shipping_address.postal_codestringNo
shipping_address.countrystringNo
shipping_address.country_codestringNoCountry code for the country, in ISO 3166 A-2 format
category_idsstring[]No(reference to AccountingCategory)
project_idstringNo(reference to TaskProject)
attachmentsAccountingAttachment[]No
attachments[].idstringNo
attachments[].download_urlstringNo
attachments[].namestringNo
attachments[].mime_typestringNo
statusenumNoValues: DRAFT, POSTED, VOID, OTHER

TypeScript

TypeScript
export type AccountingSalesreceipt = {
	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)
	organization_id?: string;
	metadata?: [];
	raw?: any;
	receipt_number?: string;
	reference?: string;
	contact_id?: string; // customer (reference to AccountingContact)
	account_id?: string; // deposit-to GL account (reference to AccountingAccount)
	posted_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	currency?: string;
	exchange_rate?: number;
	sub_total_amount?: number;
	tax_amount?: number;
	discount_amount?: number;
	total_amount?: number;
	is_inclusive_of_tax?: boolean;
	payment_method?: string;
	notes?: string;
	lineitems?: [];
	billing_address?: {
		address1?: string; 
		address2?: string; 
		city?: string; 
		region?: string; // Regional area of the employee's address.  For example, in the U.S., the region is the employee's state; in Canada, the region is the employee’s province. 
		region_code?: string; // Short form for the regional area of the employee's address.   For example, in the U.S., the region code is the two-letter abbreviation for the employee’s state; in Canada, the region is the two-letter abbreviation for the employee's province. 
		postal_code?: string; 
		country?: string; 
		country_code?: string; // Country code for the country, in ISO 3166 A-2 format 
	};
	shipping_address?: {
		address1?: string; 
		address2?: string; 
		city?: string; 
		region?: string; // Regional area of the employee's address.  For example, in the U.S., the region is the employee's state; in Canada, the region is the employee’s province. 
		region_code?: string; // Short form for the regional area of the employee's address.   For example, in the U.S., the region code is the two-letter abbreviation for the employee’s state; in Canada, the region is the two-letter abbreviation for the employee's province. 
		postal_code?: string; 
		country?: string; 
		country_code?: string; // Country code for the country, in ISO 3166 A-2 format 
	};
	category_ids?: string[]; // (reference to AccountingCategory)
	project_id?: string; // (reference to TaskProject)
	attachments?: [];
	status?: 'DRAFT' | 'POSTED' | 'VOID' | 'OTHER';
} 

Zod

Zod
import { z } from 'zod';

export const ZodAccountingSalesreceipt = 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)"),
	organization_id: z.string().optional(),
	metadata: z.array().optional(),
,
	receipt_number: z.string().optional(),
	reference: z.string().optional(),
	contact_id: z.string().optional().describe("customer (reference to AccountingContact)"),
	account_id: z.string().optional().describe("deposit-to GL account (reference to AccountingAccount)"),
	posted_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	currency: z.string().optional(),
	exchange_rate: z.number().optional(),
	sub_total_amount: z.number().optional(),
	tax_amount: z.number().optional(),
	discount_amount: z.number().optional(),
	total_amount: z.number().optional(),
	is_inclusive_of_tax: z.boolean().optional(),
	payment_method: z.string().optional(),
	notes: z.string().optional(),
	lineitems: z.array().optional(),
	billing_address: z.object({
			address1: z.string().optional(),
			address2: z.string().optional(),
			city: z.string().optional(),
			region: z.string().optional().describe("Regional area of the employee's address.  For example, in the U.S., the region is the employee's state; in Canada, the region is the employee’s province."),
			region_code: z.string().optional().describe("Short form for the regional area of the employee's address.   For example, in the U.S., the region code is the two-letter abbreviation for the employee’s state; in Canada, the region is the two-letter abbreviation for the employee's province."),
			postal_code: z.string().optional(),
			country: z.string().optional(),
			country_code: z.string().optional().describe("Country code for the country, in ISO 3166 A-2 format")
}).optional(),
	shipping_address: z.object({
			address1: z.string().optional(),
			address2: z.string().optional(),
			city: z.string().optional(),
			region: z.string().optional().describe("Regional area of the employee's address.  For example, in the U.S., the region is the employee's state; in Canada, the region is the employee’s province."),
			region_code: z.string().optional().describe("Short form for the regional area of the employee's address.   For example, in the U.S., the region code is the two-letter abbreviation for the employee’s state; in Canada, the region is the two-letter abbreviation for the employee's province."),
			postal_code: z.string().optional(),
			country: z.string().optional(),
			country_code: z.string().optional().describe("Country code for the country, in ISO 3166 A-2 format")
}).optional(),
	category_ids: z.array().optional().describe("(reference to AccountingCategory)"),
	project_id: z.string().optional().describe("(reference to TaskProject)"),
	attachments: z.array().optional(),
	status: z.enum("DRAFT", "POSTED", "VOID", "OTHER").optional()
});

Python

Python
import dataclasses

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

@dataclasses.dataclass
class PropertyAccountingSalesreceiptBilling_address:
	address1: Optional[str]
	address2: Optional[str]
	city: Optional[str]
	"""Regional area of the employee's address.  For example, in the U.S., the region is the employee's state; in Canada, the region is the employee’s province."""
	region: Optional[str]
	"""Short form for the regional area of the employee's address.   For example, in the U.S., the region code is the two-letter abbreviation for the employee’s state; in Canada, the region is the two-letter abbreviation for the employee's province."""
	region_code: Optional[str]
	postal_code: Optional[str]
	country: Optional[str]
	"""Country code for the country, in ISO 3166 A-2 format"""
	country_code: Optional[str]

@dataclasses.dataclass
class PropertyAccountingSalesreceiptShipping_address:
	address1: Optional[str]
	address2: Optional[str]
	city: Optional[str]
	"""Regional area of the employee's address.  For example, in the U.S., the region is the employee's state; in Canada, the region is the employee’s province."""
	region: Optional[str]
	"""Short form for the regional area of the employee's address.   For example, in the U.S., the region code is the two-letter abbreviation for the employee’s state; in Canada, the region is the two-letter abbreviation for the employee's province."""
	region_code: Optional[str]
	postal_code: Optional[str]
	country: Optional[str]
	"""Country code for the country, in ISO 3166 A-2 format"""
	country_code: Optional[str]

@dataclasses.dataclass
class AccountingSalesreceipt:
	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]
	organization_id: Optional[str]
	metadata: Optional[PropertyAccountingSalesreceiptMetadata]

	receipt_number: Optional[str]
	reference: Optional[str]
	"""customer (reference to AccountingContact)"""
	contact_id: Optional[str]
	"""deposit-to GL account (reference to AccountingAccount)"""
	account_id: Optional[str]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	posted_at: Optional[str]
	currency: Optional[str]
	exchange_rate: Optional[int]
	sub_total_amount: Optional[int]
	tax_amount: Optional[int]
	discount_amount: Optional[int]
	total_amount: Optional[int]
	is_inclusive_of_tax: Optional[bool]
	payment_method: Optional[str]
	notes: Optional[str]
	lineitems: Optional[PropertyAccountingSalesreceiptLineitems]
	billing_address: Optional[PropertyAccountingSalesreceiptBilling_address]
	shipping_address: Optional[PropertyAccountingSalesreceiptShipping_address]
	"""(reference to AccountingCategory)"""
	category_ids: Optional[List[List[str]]]
	"""(reference to TaskProject)"""
	project_id: Optional[str]
	attachments: Optional[PropertyAccountingSalesreceiptAttachments]
	status: Optional[AccountingSalesreceiptStatus]
Are we missing anything? Let us know
Was this page helpful?