Create order
Create a new order. Order items cannot be changed - if they need to be updated, the order should be canceled and a new one placed.
/ordersSecurity
This operation accepts the following authorization requirements.
Request
idstring:ulidOrder ID. Unique identifier prefixed with ord_.
objectstringAllowed values:"order"
Entity name.
customerNamestringrequiredName of the customer who placed the order. Must start and end with a letter, and can contain letters, spaces, hyphens, and apostrophes (e.g., “John Doe”, “Mary-Jane”, “O’Brien”).
statusstringAllowed values:"placed""preparing""completed""canceled"
totalPriceintegerTotal order price in cents.
createdAtstring:date-timeCreated date.
updatedAtstring:date-timeUpdated date.
orderItemsobject[]requiredList of items to include in the order.
Item properties (4)
menuItemIdstring:ulidrequiredID of the menu item to add to the order.
quantityintegerrequiredQuantity of the menu item.
discountintegerDiscount amount in cents (absolute value).
commentstringOptional comment for the order item (e.g., “No sugar”).
Response
Order placed successfully.
idstring:ulidOrder ID. Unique identifier prefixed with ord_.
objectstringAllowed values:"order"
Entity name.
customerNamestringrequiredName of the customer who placed the order. Must start and end with a letter, and can contain letters, spaces, hyphens, and apostrophes (e.g., “John Doe”, “Mary-Jane”, “O’Brien”).
statusstringAllowed values:"placed""preparing""completed""canceled"
totalPriceintegerTotal order price in cents.
createdAtstring:date-timeCreated date.
updatedAtstring:date-timeUpdated date.
orderItemsobject[]requiredList of items to include in the order.
Item properties (4)
menuItemIdstring:ulidrequiredID of the menu item to add to the order.
quantityintegerrequiredQuantity of the menu item.
discountintegerDiscount amount in cents (absolute value).
commentstringOptional comment for the order item (e.g., “No sugar”).
Bad request - invalid input parameters.
typestring:uri-referencerequiredURI reference that identifies the problem type.
titlestringrequiredShort summary of the problem type.
statusinteger:int32requiredHTTP status code generated by the origin server for this occurrence of the problem.
instancestring:uri-referenceURI reference that identifies the specific occurrence of the problem, e.g. by adding a fragment identifier or sub-path to the problem type. May be used to locate the root of this problem in the source code.
detailsobjectAdditional error details.
Unauthorized - authorization required.
typestring:uri-referencerequiredURI reference that identifies the problem type.
titlestringrequiredShort summary of the problem type.
statusinteger:int32requiredHTTP status code generated by the origin server for this occurrence of the problem.
instancestring:uri-referenceURI reference that identifies the specific occurrence of the problem, e.g. by adding a fragment identifier or sub-path to the problem type. May be used to locate the root of this problem in the source code.
detailsobjectAdditional error details.
Forbidden - insufficient permissions.
typestring:uri-referencerequiredURI reference that identifies the problem type.
titlestringrequiredShort summary of the problem type.
statusinteger:int32requiredHTTP status code generated by the origin server for this occurrence of the problem.
instancestring:uri-referenceURI reference that identifies the specific occurrence of the problem, e.g. by adding a fragment identifier or sub-path to the problem type. May be used to locate the root of this problem in the source code.
detailsobjectAdditional error details.
Internal server error.
typestring:uri-referencerequiredURI reference that identifies the problem type.
titlestringrequiredShort summary of the problem type.
statusinteger:int32requiredHTTP status code generated by the origin server for this occurrence of the problem.
instancestring:uri-referenceURI reference that identifies the specific occurrence of the problem, e.g. by adding a fragment identifier or sub-path to the problem type. May be used to locate the root of this problem in the source code.
detailsobjectAdditional error details.