API - https://api-ordering-docs.urbanpiper.com/#mark-order-items-stock-out
- What is the purpose of this API?
- This API is introduced to take care of a new Swiggy Order Modification Workflow. This API is used for making a request to Swiggy via UrbanPiper to allow order modification for an order due to the item stock-out for one or 2 items in an order. The partner has to send which all items are OOS from the given order in this API.
- Is this API limited to only Swiggy orders?
- Yes.
- Can we pass either "order_upipr_id" or "order_ref_id"?
- Yes, you can pass either of the one order ID. It is recommended to pass "order_upipr_id" which is the UrbanPiper order ID.
- What is "allow_edit"?
- This is to inform Swiggy that you are accepting the modification of the items in an order.
- Can "upipr_id" be ignored in the request?
- You can ignore "upipr_id" and pass only "ref_id" which is the POS item ID.
- Explain in detail how this order modification flow happens?
- The customer places an order using Swiggy APP and it reaches the POS through UrbanPiper.
- The merchant sees one or 2 items are not available from the order and make this API request to UrbanPiper with "allow_edit": true and send the items that are OOS.
- The end customer receives a push notification on their Swiggy APP to modify the order with other items/cancel the order/proceed with the suggested item.
- This way Swiggy modifies the order and send it to the UP system and we generate a new UP order ID with the same old Swiggy order ID.
- We push the modified order to the POS system. In the order relay payload, you can see the attribute "modified_from" which is the old order ID of our system.
- Merchant will also get the callback response from Swiggy for the API request he/she made with the customer masked phone number with the PIN. This can be used by the merchant to get in touch with the end customer which is optional.
- If the customer cancelled the order, you will get the status callback in the Order Status Change webhook.
- If you pass "allow_edit": false, Swiggy cancels the order.
- When is this API request to be made to the UrbanPiper system?
- This request has to be made before the order has reached Food Ready state.
- What is the throttle limit for this API?
- A throttle limit is applicable on this endpoint limiting the maximum number of requests/min to 20. If you breach this threshold, the platform will respond with a 429 error response code and you will not be able to make new requests for a duration of 5 mins.
- Is there any callback for this API?
- Yes. More.