Mark Order Items Stock-out

This article will help you resolve any questions you have related to this API

Written By Ops UrbanPiper (Collaborator)

Updated at August 10th, 2021

API - https://api-ordering-docs.urbanpiper.com/#mark-order-items-stock-out


  1. 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.

  2. Is this API limited to only Swiggy orders?
    - Yes.

  3. 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.

  4. What is "allow_edit"?
    - This is to inform Swiggy that you are accepting the modification of the items in an order.

  5. Can "upipr_id" be ignored in the request?
    - You can ignore "upipr_id" and pass only "ref_id" which is the POS item ID.

  6. 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.

  7. 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.

  8. 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.

  9. Is there any callback for this API?
    - Yes. More.

Was this article helpful?