Order products. Prices are in minor units. A line naming a product (productId or sku) costs the business's price from list_products, and the total follows; a different price you send is only noted for the business. A line naming no product waits for the business to price it. A priced order binds your person only once they confirmed it: without terms_sha nothing is sent, and you get the summary to show them (confirm.summary, confirm.terms_sha); call again with that terms_sha on their clear yes.
View input schema
{
"type": "object",
"properties": {
"payload": {
"type": "object",
"properties": {
"orderedItem": {
"minItems": 1,
"maxItems": 200,
"type": "array",
"items": {
"type": "object",
"properties": {
"productId": {
"type": "string"
},
"sku": {
"type": "string",
"maxLength": 100
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"quantity": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"price": {
"type": "object",
"properties": {
"value": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3
}
},
"required": [
"value",
"currency"
]
},
"listPrice": {
"type": "object",
"properties": {
"value": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3
}
},
"required": [
"value",
"currency"
]
},
"options": {
"maxItems": 40,
"type": "array",
"items": {
"type": "object",
"properties": {
"groupId": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"choiceId": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"portion": {
"description": "On an item made in halves: whole, left or right.",
"type": "string",
"enum": [
"whole",
"left",
"right"
]
},
"name": {
"type": "string",
"maxLength": 120
},
"priceDelta": {
"type": "object",
"properties": {
"value": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Minor units of the currency's own ISO 4217 exponent (minorUnits): 4500 is CA$45.00 or ₹45.00, ¥4,500 in JPY, 4.500 in KWD."
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3
}
},
"required": [
"value",
"currency"
]
}
},
"required": [
"groupId",
"choiceId"
]
}
},
"note": {
"type": "string",
"maxLength": 140
},
"brief": {
"type": "object",
"properties": {
"servings": {
"type": "integer",
"minimum": 1,
"maximum": 500
},
"flavour": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"message": {
"description": "The writing on it, within the length the business allows.",
"type": "string",
"minLength": 1,
"maxLength": 200
}
}
}
},
"required": [
"name",
"quantity",
"price"
]
}
},
"totalPrice": {
"type": "object",
"properties": {
"value": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3
}
},
"required": [
"value",
"currency"
]
},
"personalised": {
"type": "object",
"properties": {
"listPrice": {
"type": "object",
"properties": {
"value": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3
}
},
"required": [
"value",
"currency"
]
},
"says": {
"type": "string",
"maxLength": 200
}
},
"required": [
"listPrice"
]
},
"billingAddress": {
"type": "object",
"properties": {
"streetAddress": {
"type": "string",
"maxLength": 200
},
"addressLocality": {
"type": "string",
"maxLength": 100
},
"addressRegion": {
"type": "string",
"maxLength": 100
},
"postalCode": {
"type": "string",
"maxLength": 20
},
"addressCountry": {
"type": "string",
"minLength": 2,
"maxLength": 2
}
}
},
"shippingAddress": {
"type": "object",
"properties": {
"streetAddress": {
"type": "string",
"maxLength": 200
},
"addressLocality": {
"type": "string",
"maxLength": 100
},
"addressRegion": {
"type": "string",
"maxLength": 100
},
"postalCode": {
"type": "string",
"maxLength": 20
},
"addressCountry": {
"type": "string",
"minLength": 2,
"maxLength": 2
}
}
},
"delivery": {
"type": "object",
"properties": {
"method": {
"type": "string",
"enum": [
"pickup",
"delivery",
"digital"
]
},
"when": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"method"
]
},
"paymentMethod": {
"type": "string",
"maxLength": 60
},
"notes": {
"type": "string",
"maxLength": 5000
},
"fulfil": {
"type": "object",
"properties": {
"method": {
"type": "string",
"enum": [
"pickup",
"delivery",
"dine_in"
]
},
"slot": {
"type": "object",
"properties": {
"start": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"end": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"start"
]
},
"geo": {
"description": "The delivery address's point, when you have it: a ring zone is checked against it.",
"type": "object",
"properties": {
"latitude": {
"type": "number",
"minimum": -90,
"maximum": 90
},
"longitude": {
"type": "number",
"minimum": -180,
"maximum": 180
}
},
"required": [
"latitude",
"longitude"
]
},
"zone": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 60
}
},
"required": [
"name"
]
},
"fee": {
"type": "object",
"properties": {
"value": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Minor units of the currency's own ISO 4217 exponent (minorUnits): 4500 is CA$45.00 or ₹45.00, ¥4,500 in JPY, 4.500 in KWD."
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3
}
},
"required": [
"value",
"currency"
]
},
"etaMin": {
"type": "integer",
"minimum": 0,
"maximum": 1440
}
},
"required": [
"method"
]
},
"tip": {
"type": "object",
"properties": {
"percent": {
"type": "integer",
"minimum": 0,
"maximum": 50
},
"amount": {
"type": "object",
"properties": {
"value": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Minor units of the currency's own ISO 4217 exponent (minorUnits): 4500 is CA$45.00 or ₹45.00, ¥4,500 in JPY, 4.500 in KWD."
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3
}
},
"required": [
"value",
"currency"
]
}
}
},
"progress": {
"type": "object",
"properties": {
"stage": {
"type": "string",
"enum": [
"preparing",
"ready",
"out_for_delivery"
]
},
"at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"etaAt": {
"description": "When it expects it ready, or at the door.",
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"stage",
"at"
]
},
"kitchen": {
"type": "object",
"properties": {
"instant": {
"type": "boolean"
},
"hold": {
"maxItems": 4,
"type": "array",
"items": {
"type": "string",
"enum": [
"allergens_unconfirmed",
"over_cap",
"made_to_order",
"owner_accepts"
]
}
}
},
"required": [
"instant",
"hold"
]
}
},
"required": [
"orderedItem",
"totalPrice"
]
},
"contact": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 200
},
"email": {
"type": "string",
"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,}$"
},
"phone": {
"type": "string",
"maxLength": 40
},
"locale": {
"type": "string",
"maxLength": 12
}
}
},
"message": {
"type": "string",
"maxLength": 20000
},
"attachments": {
"description": "Photos or plans of the job: JPEG, PNG, WebP or PDF, at most six of 10 MB each. Inline up to 4 MB each (8 MB a call), else by https address or upload_id. HEIC photos: send them as JPEG. Images are cleaned of where they were taken; a PDF is kept as sent.",
"maxItems": 6,
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"upload_id": {
"type": "string",
"pattern": "^upl_[A-Za-z0-9_-]{16,48}$",
"description": "What POST /v1/uploads answered, within its hour."
}
},
"required": [
"upload_id"
]
},
{
"type": "object",
"properties": {
"data_base64": {
"type": "string",
"minLength": 4,
"maxLength": 5592412,
"description": "The file's bytes in base64: JPEG, PNG, WebP or PDF, up to 4 MB (8 MB in one call)."
},
"name": {
"description": "The file's name, for the business to recognise it.",
"type": "string",
"maxLength": 200
}
},
"required": [
"data_base64"
]
},
{
"type": "object",
"properties": {
"url": {
"type": "string",
"maxLength": 2048,
"format": "uri",
"description": "An https address the file can be fetched from, up to 10 MB."
},
"name": {
"type": "string",
"maxLength": 200
}
},
"required": [
"url"
]
}
]
}
},
"terms_sha": {
"description": "The fingerprint of the terms your person confirmed (details.terms_sha of the 409 confirm_terms a priced request without it gets). Nothing is sent to the business without it when the request carries a price.",
"type": "string",
"pattern": "^[A-Za-z0-9_-]{43}$"
},
"idempotency_key": {
"description": "Same key + same request = same answer. Required for agents. Make it a fresh random UUID per request: a retry of a create with a random key gets its access token again.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"pass": {
"description": "The person's passes (sdpass1_…), space-separated, at most 8: presented to the network that issued each, so the business recognises the customer. Or send them in the Sdi-Pass header. Never stored.",
"type": "string",
"maxLength": 1608
},
"key": {
"description": "The person's key (sdkey1_…), if that is all you have: it is exchanged once for a pass, which comes back in identity.passes — keep the pass and send it next time instead. Never stored.",
"type": "string",
"maxLength": 200
}
},
"required": [
"payload"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}