Order Status Update - https://api-ordering-docs.urbanpiper.com/#order-status-update
What is the purpose of this Order Status Update API?
- When the orders landed at POS, you need to inform our system whether you are going to accept/reject, mark food ready the order. So you have to call this API to send the request for the same.
In the API's URL, do we need to put the order_id of your UrbanPiper system or aggregators system?
- In the URL, you have to put the order id of the UrbanPiper system which you will find in the order relay payload under order.details.id.
Can I make a call to this endpoint passing the values as Query params instead of request body?
- You need to make the PUT request and you need to follow the same method that we defined in the API documentation. That means you should pass the values as the Request body and not as the query param/path variable.
What all the possible status for an order we can expect?
- Below is the list of order status which we expect from you,
Acknowledged, Food Ready, Dispatched, Completed, Cancelled.
Why I get 400 HTTP error while I cancel the orders of Swiggy?
- For Swiggy orders, cancellation is not allowed through API, instead request for a callback is made from UrbanPiper to Swiggy when you send a cancel request to us. When you make a Cancel Request to our system(you will get 400 error), we do make a Request to call back to Swiggy.
Swiggy will contact the store to know the reason for canceling the order.
If the store operator says one or the other items are not available and Swiggy collects the information from the store operator and calls the customer to inform about this.
1. If the customer has agreed to modify the order then Swiggy sends the new modified order to our system and we push the same to your system having the same Swiggy Order ID and different UrbanPiper Order ID.
2. If the customer has asked to cancel the order then Swiggy will cancel the order at their system and send that information to us. Once we get the cancelled status from Swiggy, we will relay it through Order Status Change Webhook.
Note: As you already know Cancelled status is not yet successfully updated in our system as we are waiting for Swiggy to approve the cancellation request, our system will through the 400 HTTP error when you made the request.
What happens if I have 3 items available out of 4 in a single order?
- You need to send the cancelled status to our system.
Is there any time window to accept the orders?
- You need to accept the order within 60 seconds from the time of Order is Placed.
What happens if I don’t accept the orders within 2 minutes?
- The aggregators will call the store operator asking why the order is not accepted and every phone call they make to store, they will charge money to the customer for it. If no one at the store is responding to the aggregator's call, then they cancel the orders. If the orders got Cancelled back to back, aggregator's will shut down the store.
Are there any consequences if the multiple orders are cancelled?
- Yes, if the orders are cancelled back to back then aggregators shut down the store for ordering. The merchant needs to request aggregators to enable the store back for online ordering.
Can I cancel the order once it is accepted?
- You can cancel the order.
What is the best flow I need to practice for order status change in my POS?
- A] Acknowledged: The order has reached your POS and you are accepting the order.
Cancelled: The order has reached your POS and you want to decline the order because of some of the other reasons.
B] Food Ready: When the Food is prepared.
Note: Dispatched and Completed status will be updated from our system to your system through Order Status Update Webhook Endpoint you share with us. When we capture the Rider Status as out-for-delivery, we automatically set the status as Dispatched in our system and we will call your webhook endpoint to update the status as Dispatched. Similarly, when we get the rider status as delivered, we automatically set the status Completed in our system and we do send the information Completed to your system.
This is only for Swiggy and Zomato as of now. Because only these 2 aggregators send us the Rider Status information with us.
How many retry attempts we need to make if the expected response is not returned from your system?
- The maximum you can make 3 retry attempts to our system. Never put it on infinite retry mode! If you are keeping the manual retry mode, keep it a max of 3 attempts only. Don't allow the user to hammer our system by making repeated calls.
Do I need to send the cancellation messages?
- Yes, you need to send the cancellation message every time you send the cancellation request for an order to our system. Below are the lists of cancellation messages,
1. item_out_of_stock - The item stock is not available.
2. store_closed - The store is closed for delivery.
3. store_busy - Too many orders to process
4. rider_not_available - The rider has not reached/internal rider is not available.
5. out_of_delivery_radius - The order received address is out of the delivery area
6. connectivity_issue - Can't process the order due to some connectivity issue at POS
7. total_missmatch - There is an order total mismatch causing billing issues.
8. invalid_item - The item is not available to deliver.
9. option_out_of_stock - The one or other option is not available for an item.
10. invalid_option - The option is not available for an item.
11. unspecified - None of the above reasons.
What are the Constraints and Expectations for this API?
- A throttle limit is applicable to this endpoint limiting the maximum number of requests/min to 100. If you breach this threshold, the platform will respond with a
429error response code and you will not be able to make new requests for a duration of 1 min.