Raw schema
{
"type": "object",
"properties": {
"order_type": {
"description": "\"draft\" (default; review first) or \"order\" (produced and charged immediately).",
"type": "string",
"enum": [
"draft",
"order"
]
},
"order_reference_id": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Your internal order id."
},
"customer_reference_id": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Your internal customer id."
},
"currency": {
"description": "3-letter ISO 4217 currency code, e.g. USD or EUR.",
"type": "string",
"pattern": "^[A-Za-z]{3}$"
},
"items": {
"minItems": 1,
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"item_reference_id": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Your id for this line, unique within the order."
},
"product_uid": {
"type": "string",
"minLength": 1,
"maxLength": 400,
"pattern": "^[A-Za-z0-9_.+-]+$",
"description": "Gelato product UID (from gelato_search_products or a store product variant)."
},
"quantity": {
"type": "integer",
"minimum": 1,
"maximum": 100000,
"description": "Quantity, at least 1."
},
"files": {
"description": "Print files (required for printable products only).",
"minItems": 1,
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"description": "Print area: \"default\" (the primary area, e.g. the front of apparel), \"front\", \"back\", or an embroidery position. Default \"default\".",
"type": "string",
"minLength": 1,
"maxLength": 50,
"pattern": "^[a-z0-9_-]+$"
},
"url": {
"type": "string",
"maxLength": 2048,
"format": "uri",
"description": "Public URL Gelato downloads the file from (PDF, PNG, TIFF, SVG or JPEG)."
}
},
"required": [
"url"
],
"additionalProperties": false
}
},
"page_count": {
"description": "Page count, multi-page products only (covers included).",
"type": "integer",
"minimum": 1,
"maximum": 10000
}
},
"required": [
"item_reference_id",
"product_uid",
"quantity"
],
"additionalProperties": false
},
"description": "Line items."
},
"shipping_address": {
"type": "object",
"properties": {
"first_name": {
"type": "string",
"minLength": 1,
"maxLength": 25,
"description": "Recipient first name (Gelato allows 25 characters)."
},
"last_name": {
"type": "string",
"minLength": 1,
"maxLength": 25,
"description": "Recipient last name (Gelato allows 25 characters)."
},
"company_name": {
"description": "Company name (max 60 characters).",
"type": "string",
"minLength": 1,
"maxLength": 60
},
"address_line1": {
"type": "string",
"minLength": 1,
"maxLength": 35,
"description": "Street and number (Gelato allows 35 characters)."
},
"address_line2": {
"description": "Second address line (Gelato allows 35 characters).",
"type": "string",
"minLength": 1,
"maxLength": 35
},
"city": {
"type": "string",
"minLength": 1,
"maxLength": 30,
"description": "City (Gelato allows 30 characters)."
},
"post_code": {
"description": "Postal code (required where the country uses them).",
"type": "string",
"minLength": 1,
"maxLength": 15
},
"state": {
"description": "State/province code, required for US, CA and AU (e.g. NY).",
"type": "string",
"minLength": 1,
"maxLength": 35
},
"country": {
"description": "2-letter ISO 3166-1 country code (the United Kingdom is GB, not UK).",
"type": "string",
"pattern": "^[A-Za-z]{2}$"
},
"phone": {
"description": "Recipient phone number.",
"type": "string",
"minLength": 1,
"maxLength": 25
},
"email": {
"type": "string",
"maxLength": 254,
"format": "email",
"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Recipient email (required by Gelato; used for delivery notifications)."
},
"is_business": {
"description": "Brazil only: true if the recipient is a company (then state_tax_id and registration_state_code apply).",
"type": "boolean"
},
"federal_tax_id": {
"description": "Brazil only, required there: CPF (person) or CNPJ (company).",
"type": "string",
"minLength": 1,
"maxLength": 30
},
"state_tax_id": {
"description": "Brazil only: the company's state tax id (Inscrição Estadual).",
"type": "string",
"minLength": 1,
"maxLength": 30
},
"registration_state_code": {
"description": "Brazil only: the state code where the company is registered.",
"type": "string",
"minLength": 1,
"maxLength": 10
}
},
"required": [
"first_name",
"last_name",
"address_line1",
"city",
"country",
"email"
],
"additionalProperties": false,
"description": "Delivery address."
},
"shipment_method_uid": {
"description": "A shipmentMethodUid from gelato_quote_order, or \"normal\", \"standard\", \"express\". Several values may be given separated by commas (no spaces). Omitted = cheapest.",
"type": "string",
"minLength": 1,
"maxLength": 200,
"pattern": "^[A-Za-z0-9_.:-]+(,[A-Za-z0-9_.:-]+)*$"
},
"metadata": {
"description": "Up to 20 key/value pairs stored on the order.",
"minItems": 1,
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"value": {
"type": "string",
"maxLength": 100
}
},
"required": [
"key",
"value"
],
"additionalProperties": false
}
}
},
"required": [
"order_reference_id",
"customer_reference_id",
"currency",
"items",
"shipping_address"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}