{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Order",
    "description": "Order billing and shipping information",
    "type": "object",
    "properties": {
        "orders": {
            "type": "array",
            "items": {
                "properties": {
                    "order": {
                        "type": "string"
                    },
                    "billTo": {
                        "type": "string"
                    },
                    "billAddress": {
                        "type": "string"
                    },
                    "shipTo": {
                        "type": "string"
                    },
                    "shipAddress": {
                        "type": "string"
                    },
                    "loyaltyId": {
                        "type": "string"
                    },
                    "loyaltyBonus": {
                        "type": "string"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "order",
                    "billTo",
                    "billAddress"
                ],
                "dependencies": {
                    "shipTo": [
                        "shipAddress"
                    ],
                    "loyaltyId": [
                        "loyaltyBonus"
                    ]
                }
            }
        }
    }
}