{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://github.com/api-evangelist/easyship/blob/main/json-schema/easyship-shipment-schema.json", "title": "Easyship Shipment", "description": "An Easyship shipment object: origin and destination addresses, parcels, items, and rates.", "type": "object", "properties": { "id": { "type": "string", "description": "Easyship shipment identifier" }, "easyship_shipment_id": { "type": "string", "description": "Human-readable Easyship shipment reference" }, "platform_order_number": { "type": "string", "description": "External platform order reference (e.g. Shopify order id)" }, "status": { "type": "string", "description": "Lifecycle status of the shipment" }, "origin_address": { "$ref": "#/$defs/Address" }, "destination_address": { "$ref": "#/$defs/Address" }, "parcels": { "type": "array", "items": { "$ref": "#/$defs/Parcel" }, "minItems": 1 }, "items": { "type": "array", "items": { "$ref": "#/$defs/Item" } } }, "required": ["origin_address", "destination_address", "parcels"], "$defs": { "Address": { "type": "object", "title": "Easyship Address", "properties": { "id": { "type": "string" }, "line_1": { "type": "string" }, "line_2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "country_alpha2": { "type": "string", "minLength": 2, "maxLength": 2, "description": "ISO 3166-1 alpha-2 country code" }, "postal_code": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string", "format": "email" }, "company_name": { "type": "string" } }, "required": ["line_1", "city", "country_alpha2", "postal_code"] }, "Parcel": { "type": "object", "title": "Easyship Parcel", "properties": { "box": { "type": "object", "properties": { "length": { "type": "number" }, "width": { "type": "number" }, "height": { "type": "number" }, "slug": { "type": "string" } } }, "total_actual_weight": { "type": "number" } }, "required": ["box", "total_actual_weight"] }, "Item": { "type": "object", "title": "Easyship Item", "properties": { "description": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "actual_weight": { "type": "number" }, "declared_currency": { "type": "string", "minLength": 3, "maxLength": 3 }, "declared_customs_value": { "type": "number" }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "origin_country_alpha2": { "type": "string", "minLength": 2, "maxLength": 2 } }, "required": ["description", "quantity", "actual_weight", "declared_currency", "declared_customs_value"] } } }