Order data model

Updated:

A production order placed with the print vendor

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)
external_identifierstringNoOrder identifier from the ordering system
customer_identifierstringNoIdentifier of the end customer in the ordering system
statusenumNoValues: DRAFT, PENDING, ON_HOLD, IN_PRODUCTION, PARTIALLY_SHIPPED, SHIPPED, DELIVERED, CANCELLED, FAILED, OTHER
currencystringNoISO 4217 currency code
shipping_addressobjectNoRecipient and delivery address
shipping_address.namestringNoRecipient full name
shipping_address.company_namestringNo
shipping_address.emailstringNo
shipping_address.telephonestringNo
shipping_address.address1stringNofirst line of the street address
shipping_address.address2stringNosecond line of the street address
shipping_address.citystringNocity or locality
shipping_address.regionstringNostate, province or regional area
shipping_address.region_codestringNostate, province or regional area code
shipping_address.postal_codestringNopostal or ZIP code
shipping_address.countrystringNocountry name
shipping_address.country_codestringNoISO 3166-1 alpha-2 country code
shipping_methodstringNoShipping method code
lineitemsPrintingLineitem[]No
lineitems[].idstringNoLine item identifier
lineitems[].product_idstringNoThe PrintingProduct ID of the blank product
lineitems[].variant_identifierstringNoIdentifier of the product variant
lineitems[].namestringNoDisplay name
lineitems[].skustringNoProduct identifier (SKU) from the ordering system
lineitems[].quantitynumberNo
lineitems[].unit_price_amountnumberNoProduction price per unit charged by the print vendor
lineitems[].retail_price_amountnumberNoRetail price per unit paid by the end customer
lineitems[].filesPrintingLineitemFile[]NoPrint files, one per placement
lineitems[].files[].placementstringNoPlacement code the file is printed on (eg. front, back)
lineitems[].files[].file_idstringNoThe PrintingFile ID
lineitems[].files[].urlstringNoURL of the print file
subtotal_amountnumberNoTotal production cost of all line items
discount_amountnumberNo
shipping_amountnumberNoShipping cost
tax_amountnumberNoTaxes, including VAT
total_amountnumberNoGrand total charged by the print vendor
shipmentsPrintingShipment[]No
shipments[].idstringNoShipment identifier
shipments[].carrierstringNoCarrier name
shipments[].servicestringNoDelivery service name
shipments[].tracking_numberstringNo
shipments[].tracking_urlstringNo
shipments[].shipped_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
shipments[].delivered_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
metadataPrintingMetadata[]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.
metadata[].valueobjectNoThe field's value, typed by format.
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 PrintingOrder = {
	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)
	external_identifier?: string; // Order identifier from the ordering system
	customer_identifier?: string; // Identifier of the end customer in the ordering system
	status?: 'DRAFT' | 'PENDING' | 'ON_HOLD' | 'IN_PRODUCTION' | 'PARTIALLY_SHIPPED' | 'SHIPPED' | 'DELIVERED' | 'CANCELLED' | 'FAILED' | 'OTHER';
	currency?: string; // ISO 4217 currency code
	shipping_address?: {
		name?: string; // Recipient full name 
		company_name?: string; 
		email?: string; 
		telephone?: string; 
		address1?: string; // first line of the street address 
		address2?: string; // second line of the street address 
		city?: string; // city or locality 
		region?: string; // state, province or regional area 
		region_code?: string; // state, province or regional area code 
		postal_code?: string; // postal or ZIP code 
		country?: string; // country name 
		country_code?: string; // ISO 3166-1 alpha-2 country code 
	}; // Recipient and delivery address
	shipping_method?: string; // Shipping method code
	lineitems?: [];
	subtotal_amount?: number; // Total production cost of all line items
	discount_amount?: number;
	shipping_amount?: number; // Shipping cost
	tax_amount?: number; // Taxes, including VAT
	total_amount?: number; // Grand total charged by the print vendor
	shipments?: [];
	metadata?: [];
	raw?: any; // Raw data from integration
} 

Zod

Zod
import { z } from 'zod';

export const ZodPrintingOrder = 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)"),
	external_identifier: z.string().optional().describe("Order identifier from the ordering system"),
	customer_identifier: z.string().optional().describe("Identifier of the end customer in the ordering system"),
	status: z.enum("DRAFT", "PENDING", "ON_HOLD", "IN_PRODUCTION", "PARTIALLY_SHIPPED", "SHIPPED", "DELIVERED", "CANCELLED", "FAILED", "OTHER").optional(),
	currency: z.string().optional().describe("ISO 4217 currency code"),
	shipping_address: z.object({
			name: z.string().optional().describe("Recipient full name"),
			company_name: z.string().optional(),
			email: z.string().optional(),
			telephone: z.string().optional(),
			address1: z.string().optional().describe("first line of the street address"),
			address2: z.string().optional().describe("second line of the street address"),
			city: z.string().optional().describe("city or locality"),
			region: z.string().optional().describe("state, province or regional area"),
			region_code: z.string().optional().describe("state, province or regional area code"),
			postal_code: z.string().optional().describe("postal or ZIP code"),
			country: z.string().optional().describe("country name"),
			country_code: z.string().optional().describe("ISO 3166-1 alpha-2 country code")
}).optional().describe("Recipient and delivery address"),
	shipping_method: z.string().optional().describe("Shipping method code"),
	lineitems: z.array().optional(),
	subtotal_amount: z.number().optional().describe("Total production cost of all line items"),
	discount_amount: z.number().optional(),
	shipping_amount: z.number().optional().describe("Shipping cost"),
	tax_amount: z.number().optional().describe("Taxes, including VAT"),
	total_amount: z.number().optional().describe("Grand total charged by the print vendor"),
	shipments: z.array().optional(),
	metadata: z.array().optional(),

});

Python

Python
import dataclasses

@dataclasses.dataclass
class PrintingOrderStatus(str, Enum):
	DRAFT = 'DRAFT'
	PENDING = 'PENDING'
	ON_HOLD = 'ON_HOLD'
	IN_PRODUCTION = 'IN_PRODUCTION'
	PARTIALLY_SHIPPED = 'PARTIALLY_SHIPPED'
	SHIPPED = 'SHIPPED'
	DELIVERED = 'DELIVERED'
	CANCELLED = 'CANCELLED'
	FAILED = 'FAILED'
	OTHER = 'OTHER'

@dataclasses.dataclass
class PropertyPrintingOrderShipping_address:
	"""Recipient full name"""
	name: Optional[str]
	company_name: Optional[str]
	email: Optional[str]
	telephone: Optional[str]
	"""first line of the street address"""
	address1: Optional[str]
	"""second line of the street address"""
	address2: Optional[str]
	"""city or locality"""
	city: Optional[str]
	"""state, province or regional area"""
	region: Optional[str]
	"""state, province or regional area code"""
	region_code: Optional[str]
	"""postal or ZIP code"""
	postal_code: Optional[str]
	"""country name"""
	country: Optional[str]
	"""ISO 3166-1 alpha-2 country code"""
	country_code: Optional[str]

@dataclasses.dataclass
class PrintingOrder:
	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]
	"""Order identifier from the ordering system"""
	external_identifier: Optional[str]
	"""Identifier of the end customer in the ordering system"""
	customer_identifier: Optional[str]
	status: Optional[PrintingOrderStatus]
	"""ISO 4217 currency code"""
	currency: Optional[str]
	"""Recipient and delivery address"""
	shipping_address: Optional[PropertyPrintingOrderShipping_address]
	"""Shipping method code"""
	shipping_method: Optional[str]
	lineitems: Optional[PropertyPrintingOrderLineitems]
	"""Total production cost of all line items"""
	subtotal_amount: Optional[int]
	discount_amount: Optional[int]
	"""Shipping cost"""
	shipping_amount: Optional[int]
	"""Taxes, including VAT"""
	tax_amount: Optional[int]
	"""Grand total charged by the print vendor"""
	total_amount: Optional[int]
	shipments: Optional[PropertyPrintingOrderShipments]
	metadata: Optional[PropertyPrintingOrderMetadata]
Are we missing anything? Let us know
Was this page helpful?