File data model

Updated:

An artwork or print file in the print vendor file library

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)
namestringNoFile name
urlstringNoSource URL the file is downloaded from
preview_urlstringNoPreview image URL
mime_typestringNo
sizenumberNoSize in bytes
widthnumberNoWidth in pixels
heightnumberNoHeight in pixels
dpinumberNoResolution in DPI
statusenumNoProcessing status of the file Values: PENDING, READY, FAILED, OTHER
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 PrintingFile = {
	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)
	name?: string; // File name
	url?: string; // Source URL the file is downloaded from
	preview_url?: string; // Preview image URL
	mime_type?: string;
	size?: number; // Size in bytes
	width?: number; // Width in pixels
	height?: number; // Height in pixels
	dpi?: number; // Resolution in DPI
	status?: 'PENDING' | 'READY' | 'FAILED' | 'OTHER'; // Processing status of the file
	metadata?: [];
	raw?: any; // Raw data from integration
} 

Zod

Zod
import { z } from 'zod';

export const ZodPrintingFile = 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)"),
	name: z.string().optional().describe("File name"),
	url: z.string().optional().describe("Source URL the file is downloaded from"),
	preview_url: z.string().optional().describe("Preview image URL"),
	mime_type: z.string().optional(),
	size: z.number().optional().describe("Size in bytes"),
	width: z.number().optional().describe("Width in pixels"),
	height: z.number().optional().describe("Height in pixels"),
	dpi: z.number().optional().describe("Resolution in DPI"),
	status: z.enum("PENDING", "READY", "FAILED", "OTHER").optional().describe("Processing status of the file"),
	metadata: z.array().optional(),

});

Python

Python
import dataclasses

@dataclasses.dataclass
class PrintingFileStatus(str, Enum):
	PENDING = 'PENDING'
	READY = 'READY'
	FAILED = 'FAILED'
	OTHER = 'OTHER'

@dataclasses.dataclass
class PrintingFile:
	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]
	"""File name"""
	name: Optional[str]
	"""Source URL the file is downloaded from"""
	url: Optional[str]
	"""Preview image URL"""
	preview_url: Optional[str]
	mime_type: Optional[str]
	"""Size in bytes"""
	size: Optional[int]
	"""Width in pixels"""
	width: Optional[int]
	"""Height in pixels"""
	height: Optional[int]
	"""Resolution in DPI"""
	dpi: Optional[int]
	"""Processing status of the file"""
	status: Optional[PrintingFileStatus]
	metadata: Optional[PropertyPrintingFileMetadata]
Are we missing anything? Let us know
Was this page helpful?