Purchasereceipt 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
contact_idstringNosupplier (reference to AccountingContact)
purchaseorder_idstringNoheader when single-PO
posted_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
statusenumNoValues: POSTED, CANCELLED, OTHER
currencystringNo
total_amountnumberNo
notesstringNosupplier delivery note / packing slip / memo — NOT a separate reference field
lineitemsAccountingPurchasereceiptLineitem[]No
lineitems[].idstringNo
lineitems[].item_idstringNo(reference to CommerceItem)
lineitems[].item_skustringNo
lineitems[].item_namestringNo
lineitems[].item_descriptionstringNo
lineitems[].unit_quantity_receivednumberNo
lineitems[].unit_quantity_orderednumberNo
lineitems[].unit_amountnumberNo
lineitems[].total_amountnumberNo
lineitems[].purchaseorder_idstringNo
lineitems[].purchaseorder_line_identifierstringNovendor PO line number for three-way match
lineitems[].account_idstringNo(reference to AccountingAccount)
lineitems[].locationsAccountingReference[]Noplant/warehouse/bin — same shape as IAccountingLineitem.locations
lineitems[].locations[].idstringNo
lineitems[].locations[].namestringNo
attachmentsAccountingAttachment[]No
attachments[].idstringNo
attachments[].download_urlstringNo
attachments[].namestringNo
attachments[].mime_typestringNo

TypeScript

TypeScript
export type AccountingPurchasereceipt = {
	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;
	contact_id?: string; // supplier (reference to AccountingContact)
	purchaseorder_id?: string; // header when single-PO
	posted_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	status?: 'POSTED' | 'CANCELLED' | 'OTHER';
	currency?: string;
	total_amount?: number;
	notes?: string; // supplier delivery note / packing slip / memo — NOT a separate reference field
	lineitems?: [];
	attachments?: [];
} 

Zod

Zod
import { z } from 'zod';

export const ZodAccountingPurchasereceipt = 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(),
	contact_id: z.string().optional().describe("supplier (reference to AccountingContact)"),
	purchaseorder_id: z.string().optional().describe("header when single-PO"),
	posted_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	status: z.enum("POSTED", "CANCELLED", "OTHER").optional(),
	currency: z.string().optional(),
	total_amount: z.number().optional(),
	notes: z.string().optional().describe("supplier delivery note / packing slip / memo — NOT a separate reference field"),
	lineitems: z.array().optional(),
	attachments: z.array().optional()
});

Python

Python
import dataclasses

@dataclasses.dataclass
class AccountingPurchasereceiptStatus(str, Enum):
	POSTED = 'POSTED'
	CANCELLED = 'CANCELLED'
	OTHER = 'OTHER'

@dataclasses.dataclass
class AccountingPurchasereceipt:
	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[PropertyAccountingPurchasereceiptMetadata]

	receipt_number: Optional[str]
	"""supplier (reference to AccountingContact)"""
	contact_id: Optional[str]
	"""header when single-PO"""
	purchaseorder_id: Optional[str]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	posted_at: Optional[str]
	status: Optional[AccountingPurchasereceiptStatus]
	currency: Optional[str]
	total_amount: Optional[int]
	"""supplier delivery note / packing slip / memo — NOT a separate reference field"""
	notes: Optional[str]
	lineitems: Optional[PropertyAccountingPurchasereceiptLineitems]
	attachments: Optional[PropertyAccountingPurchasereceiptAttachments]
Are we missing anything? Let us know
Was this page helpful?