Raw schema
{
"type": "object",
"properties": {
"plan_id": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"stops": {
"minItems": 1,
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"address": {
"type": "object",
"properties": {
"address_name": {
"description": "Display name only (not used for geocoding), e.g. 'Rear entrance'.",
"type": "string",
"minLength": 1,
"maxLength": 255
},
"address_line_one": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"address_line_two": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"city": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"state": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"zip": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"country": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"latitude": {
"description": "Overrides the text fields; give both latitude and longitude or neither.",
"type": "number",
"minimum": -90,
"maximum": 90
},
"longitude": {
"type": "number",
"minimum": -180,
"maximum": 180
}
},
"description": "Stop address. Give at least one field; the more fields, the better the geocoding."
},
"recipient_name": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"recipient_phone": {
"description": "Recipient phone (E.164 preferred). Stored on the stop; Spoke may text it when the route runs.",
"type": "string",
"minLength": 3,
"maxLength": 40
},
"recipient_email": {
"description": "Recipient e-mail. Stored on the stop; Spoke may e-mail tracking updates when the route runs.",
"type": "string",
"maxLength": 254,
"format": "email",
"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"recipient_external_id": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"notes": {
"description": "Notes for the driver.",
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"package_count": {
"type": "integer",
"minimum": 1,
"maximum": 10000
},
"activity": {
"description": "Default delivery.",
"type": "string",
"enum": [
"delivery",
"pickup"
]
},
"optimization_order": {
"description": "Force the stop first or last in the optimized route.",
"type": "string",
"enum": [
"default",
"first",
"last"
]
},
"earliest_attempt_time": {
"description": "Time window start, HH:MM (local time of the stop).",
"type": "string",
"pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
},
"latest_attempt_time": {
"description": "Time window end, HH:MM.",
"type": "string",
"pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
},
"estimated_attempt_duration_seconds": {
"description": "Expected time at the stop, in seconds.",
"type": "integer",
"minimum": 1,
"maximum": 28800
},
"allowed_driver_ids": {
"description": "Only these drivers (ids or 'drivers/<id>'; they must be on the plan) may serve the stop.",
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 60
}
},
"seller_order_id": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"invoice_number": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"products": {
"description": "Product names for the stop.",
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 255
}
}
},
"required": [
"address"
]
}
}
},
"required": [
"plan_id",
"stops"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}