Label data model

View field support, webhooks, and list parameters for each integration on the Supported Integrations page.

FieldTypeRequiredDescription
idstringNoUnique identifier for this label object
created_atstring (date-time)NoThe date that this label object was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
updated_atstring (date-time)NoThe last date that this label object was updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
shipment_idstringNoReference to the shipment
tracking_numberstringNoTracking number for the shipment
label_urlstringNoURL to download the label
label_formatenumNoFormat of the label (PDF, PNG, ZPL, EPL2) Values: PDF, PNG, ZPL, EPL2, PDF_4X6, PDF_4X8, PNG_4X6, PNG_4X8
statusenumNoStatus of the label Values: PENDING, PROCESSING, IN_TRANSIT, DELIVERED, EXCEPTION, CANCELLED, LABEL_CREATED, PICKED_UP, OUT_FOR_DELIVERY, DELIVERY_ATTEMPTED, RETURNED_TO_SENDER, HELD_AT_LOCATION, CUSTOMS_CLEARANCE, EXCEPTION_RESOLVED
is_voidedbooleanNoWhether label has been voided
label_costnumberNoCost to purchase label
label_cost_currencystringNo
rate_idstringNoRate used for this label; points to ShippingRate
service_codestringNoService code used

TypeScript

TypeScript
export type ShippingLabel = {
	id?: string; // Unique identifier for this label object
	created_at?: string-time; // The date that this label object was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	updated_at?: string-time; // The last date that this label object was updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	shipment_id?: string; // Reference to the shipment
	tracking_number?: string; // Tracking number for the shipment
	label_url?: string; // URL to download the label
	label_format?: 'PDF' | 'PNG' | 'ZPL' | 'EPL2' | 'PDF_4X6' | 'PDF_4X8' | 'PNG_4X6' | 'PNG_4X8'; // Format of the label (PDF, PNG, ZPL, EPL2)
	status?: 'PENDING' | 'PROCESSING' | 'IN_TRANSIT' | 'DELIVERED' | 'EXCEPTION' | 'CANCELLED' | 'LABEL_CREATED' | 'PICKED_UP' | 'OUT_FOR_DELIVERY' | 'DELIVERY_ATTEMPTED' | 'RETURNED_TO_SENDER' | 'HELD_AT_LOCATION' | 'CUSTOMS_CLEARANCE' | 'EXCEPTION_RESOLVED'; // Status of the label
	is_voided?: boolean; // Whether label has been voided
	label_cost?: number; // Cost to purchase label
	label_cost_currency?: string;
	rate_id?: string; // Rate used for this label; points to ShippingRate
	service_code?: string; // Service code used
	raw?: any; // The raw data returned by the integration for this label
} 

Zod

Zod
import { z } from 'zod';

export const ZodShippingLabel = z.object({
	id: z.string().optional().describe("Unique identifier for this label object"),
	created_at: z.string-time().optional().describe("The date that this label object was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	updated_at: z.string-time().optional().describe("The last date that this label object was updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	shipment_id: z.string().optional().describe("Reference to the shipment"),
	tracking_number: z.string().optional().describe("Tracking number for the shipment"),
	label_url: z.string().optional().describe("URL to download the label"),
	label_format: z.enum("PDF", "PNG", "ZPL", "EPL2", "PDF_4X6", "PDF_4X8", "PNG_4X6", "PNG_4X8").optional().describe("Format of the label (PDF, PNG, ZPL, EPL2)"),
	status: z.enum("PENDING", "PROCESSING", "IN_TRANSIT", "DELIVERED", "EXCEPTION", "CANCELLED", "LABEL_CREATED", "PICKED_UP", "OUT_FOR_DELIVERY", "DELIVERY_ATTEMPTED", "RETURNED_TO_SENDER", "HELD_AT_LOCATION", "CUSTOMS_CLEARANCE", "EXCEPTION_RESOLVED").optional().describe("Status of the label"),
	is_voided: z.boolean().optional().describe("Whether label has been voided"),
	label_cost: z.number().optional().describe("Cost to purchase label"),
	label_cost_currency: z.string().optional(),
	rate_id: z.string().optional().describe("Rate used for this label; points to ShippingRate"),
	service_code: z.string().optional().describe("Service code used"),

});

Python

Python
import dataclasses

@dataclasses.dataclass
class ShippingLabelLabel_format(str, Enum):
	PDF = 'PDF'
	PNG = 'PNG'
	ZPL = 'ZPL'
	EPL2 = 'EPL2'
	PDF_4X6 = 'PDF_4X6'
	PDF_4X8 = 'PDF_4X8'
	PNG_4X6 = 'PNG_4X6'
	PNG_4X8 = 'PNG_4X8'

@dataclasses.dataclass
class ShippingLabelStatus(str, Enum):
	PENDING = 'PENDING'
	PROCESSING = 'PROCESSING'
	IN_TRANSIT = 'IN_TRANSIT'
	DELIVERED = 'DELIVERED'
	EXCEPTION = 'EXCEPTION'
	CANCELLED = 'CANCELLED'
	LABEL_CREATED = 'LABEL_CREATED'
	PICKED_UP = 'PICKED_UP'
	OUT_FOR_DELIVERY = 'OUT_FOR_DELIVERY'
	DELIVERY_ATTEMPTED = 'DELIVERY_ATTEMPTED'
	RETURNED_TO_SENDER = 'RETURNED_TO_SENDER'
	HELD_AT_LOCATION = 'HELD_AT_LOCATION'
	CUSTOMS_CLEARANCE = 'CUSTOMS_CLEARANCE'
	EXCEPTION_RESOLVED = 'EXCEPTION_RESOLVED'

@dataclasses.dataclass
class ShippingLabel:
	"""Unique identifier for this label object"""
	id: Optional[str]
	"""The date that this label object was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	created_at: Optional[str]
	"""The last date that this label object was updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	updated_at: Optional[str]
	"""Reference to the shipment"""
	shipment_id: Optional[str]
	"""Tracking number for the shipment"""
	tracking_number: Optional[str]
	"""URL to download the label"""
	label_url: Optional[str]
	"""Format of the label (PDF, PNG, ZPL, EPL2)"""
	label_format: Optional[ShippingLabelLabel_format]
	"""Status of the label"""
	status: Optional[ShippingLabelStatus]
	"""Whether label has been voided"""
	is_voided: Optional[bool]
	"""Cost to purchase label"""
	label_cost: Optional[int]
	label_cost_currency: Optional[str]
	"""Rate used for this label; points to ShippingRate"""
	rate_id: Optional[str]
	"""Service code used"""
	service_code: Optional[str]
Are we missing anything? Let us know
Was this page helpful?