{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Add products to poll status request body schema",
    "type": "object",
    "properties": {
        "products": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "upc": {"type": "string"},
                    "orchard_product_id": {"type": "number"},
                    "product_id": {"type": "number"},
                    "store_id": {
                        "oneOf": [
                            {
                                "type": "number",
                                "minimum": 1,
                                "maximum": 1
                            },
                            {
                                "type": "number",
                                "minimum": 187,
                                "maximum": 187
                            },
                            {
                                "type": "number",
                                "minimum": 286,
                                "maximum": 286
                            },
                            {
                                "type": "number",
                                "minimum": 348,
                                "maximum": 348
                            }
                        ]
                    },
                    "provider": {
                        "type": "string",
                        "oneOf": [
                            {
                                "type": "string",
                                "pattern": "orchard"
                            },
                            {
                                "type": "string",
                                "pattern": "ioda"
                            }
                        ]
                    },
                    "itunes_vendor_id": {
                        "type": "string",
                        "pattern": "^[0-9]{0,25}$"
                    },
                    "delivery_date": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "sales_start_date": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "force_polling": {"type": "boolean"}

                },
                "required": [
                    "upc", "store_id", "product_id", "orchard_product_id"
                ]
            }
        }
    },
    "required": ["products"],
    "additionalProperties": false
}
