Allows the partner to make amendments to order items. The endpoint accepts amendments for multiple items in a single call.
Site would like to make Deliveroo systems and the customer aware of substitutions to the order.
Once order is amended it can be accepted.
After an new order is received it might turn out that site is unable to fulfill all order items and it would like to
substitute some of them. Let's assume the item ID to substitute is
get allowed item substitutions with
YYY item ID to get list of allowed
substitutions for this item. In case of a successful search a response similar to the one below will be provided:
"name": "Large Oranges 4 per pack",
"operational_name": "Large Oranges 4 per pack",
substitution_id attribute from the
get allowed item substitutions
response as the input to
make amendments request.
In our case we're substituting
YYY item with
ZZZ with the same quantity, so the payload will be like:
and in case of successful amendment the response will contain substituted item under a new ID.
Amended items will be moved to
archived_items. New ID will be generated for each amendment even if it's just reducing the quantity of an order item. To make
another amendment newly generated ID must be used. Reference to amended item will be kept under
amends. Reference to original order item item will be kept under
original. This will cut short all intermediate
amendment operations. It will differ from amends in case of item will be amended multiple times. Reference to refactored order item will be kept under
Order has to be in the
For amended order items menu item attribute
allowed_actions_if_items_are_unavailable has to contain:
ITEM_REMOVAL: for removing an item, or:
PARTNER_CHOSEN_SUBSTITUTION: for substituting an item.
There's a rate limit of 1 request per order per minute. If you get over the limit, you'll get "Too many requests" error.
It is recommended that the integrating partner batches all the amendments for an order in a single call to this endpoint in order to avoid receiving a rate limit exceeded error.