{
"type": "object",
"properties": {
"customer": {
"type": "object",
"properties": {
"name": { "type": "string", "minLength": 1, "maxLength": 100 },
"email": { "type": "string", "format": "email" },
"phone": { "type": ["string", "null"], "pattern": "^\\+?[1-9][0-9]{7,14}$" }
},
"required": ["name", "email", "phone"],
"additionalProperties": false
},
"shipping": {
"type": "object",
"properties": {
"method": { "type": "string", "enum": ["standard", "express"] },
"address_line1": { "type": "string", "minLength": 1, "maxLength": 120 },
"city": { "type": "string", "minLength": 1, "maxLength": 80 },
"postal_code": { "type": "string", "minLength": 3, "maxLength": 20 },
"country": { "type": "string", "pattern": "^[A-Z]{2}$" }
},
"required": ["method", "address_line1", "city", "postal_code", "country"],
"additionalProperties": false
},
"notes": { "type": ["string", "null"], "maxLength": 300 }
},
"required": ["customer", "shipping"],
"additionalProperties": false
}