{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Place an order for a platform user.",
    "type": "object",
    "properties": {
        "customer": {
            "description": "The platform's customer.",
            "type": "string",
            "minLength": 3,
            "maxLength": 96
        },
        "account_identifier": {
            "description": "The identifier of the account for whom to place the order.",
            "type": "string",
            "minLength": 5,
            "maxLength": 96,
            "pattern": "^[\\+\\w-]{5,96}$"
        },
        "recipient": {
            "description": "The information for the person who is to receive this reward.",
            "type": "object",
            "properties": {
                "name": {
                    "description": "The name of the recipient.",
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 255
                },
                "email": {
                    "description": "The email address of the recipient.",
                    "type": "string",
                    "pattern": "^\\S+@\\S+$"
                }
            },
            "required": [
                "name",
                "email"
            ]
        },
        "sku": {
            "description": "The SKU identifying the reward to be purchased.",
            "type": "string"
        },
        "amount": {
            "description": "The desired amount (for variable-priced SKUs) of the reward. Must be present for variable-price SKUs, must not be present for static-price SKUs.",
            "type": "number",
            "minimum": 1,
            "maximum": 100000,
            "optional": true
        },
        "reward_subject": {
            "description": "An optional subject line for the reward email.",
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "optional": true
        },
        "reward_message": {
            "description": "An optional message to the recipient.",
            "type": "string",
            "minLength": 0,
            "maxLength": 255,
            "optional": true
        },
        "reward_from": {
            "description": "An optional 'from name' to display to the recipient.",
            "type": "string",
            "minLength": 0,
            "maxLength": 255,
            "optional": true
        },
        "send_reward": {
            "description": "Whether Tango Card should send the reward. If this is false the returned object will contain the order details. Defaults to true.",
            "type": "boolean",
            "optional": true
        }
    },
    "required": [
        "customer",
        "account_identifier",
        "recipient",
        "sku"
    ]
}