Order Relay Webhook

This webhook will send the order information to POS received from aggregators.

2d99496b4b52d29fd1cc66db7dbaf182

Written By Ops UrbanPiper (Collaborator)

Updated at August 22nd, 2019


Order Relay - https://api-ordering-docs.urbanpiper.com/?shell#order-relay


  1. Can I set the headers for my endpoint?
    - Yes, you can set.

  2. How does Order Relay work?
    - When the orders from aggregators/white label apps or website reach UrbanPiper system, we do relay the orders to your system real-time through webhook endpoint you share with us.

  3. What happens if the webhook endpoint is down for some time?
    - When the webhook endpoint is down at the time of order push, we do have retry mechanism where our system tries to push the order at the rate of 2seconds/minutes for the next 3 attempts. If the endpoint is still down, then our system stops trying to push the order. But you can still re-deliver the order to your system from our Quint Dashboard.

  4. Are you going to make the POST request to our system?
    - Yes.

  5. Our system doesn't support JSON as a content-type, Can you push the data in another format like XML?
    - No. We do push the data in JSON format and you can parse the JSON data to another format.

  6. Do aggregators share the customer information with us?
    - Zomato, Swiggy, Ubereats doesn’t share the customer information. Foodpanda and Scootsy do share.

  7. Can I expect all the fields are mandatory in the payload?
    - A few aggregators share the extra information and other few don’t. It is ideal not to keep any fields mandatory.

  8. What all the channels I can expect from your end?
    - zomato, swiggy, ubereats, scootsy, foodpanda, web, satellite, app_android, app_ios.

  9. Under what circumstances, we do get the charges on order level?
    - When the charges like packaging charge and delivery charges are defined on the subtotal of the order, then the charges data will be seen under order.details array.
    When the charges are defined per item quantity then the details of the charges will be seen under item array.

  10. Is there a possibility of having the charges both at the order level and item level?
    - Yes.

  11.  What is the logic behind discount and total_external_discount?
    - Discount: This is the overall discount applied to the order.
    Total_external_discount: this is the total aggregators discount applied on the order.

  12. How do I get the Merchant Discount applied on the order?
    - If you do the below math, you will get the merchant discount applied on order.

    Merchant Discount = Discount - Total_external_discount

  13. Where do I get the aggregator's order id and UrbanPiper order id?
    - The attribute id inside the ext_platforms array will be the aggregator's order id. The attribute id outside the ext_platforms array will give you the UrbanPiper Order ID.

  14. What is the meaning of delivery_type inside ext_platforms array?
    - If the delivery_type = partner ----> aggregators will deliver the order.
    delivery_type = delivery ----> merchant needs to deliver the order.
    delivery_type = pickup ----> customer will pick up the order.

  15. Can you explain in detail about the discount array inside ext_platform?
    - is_merchant_discount = true ----> discount is given by the the merchant.
    Is_merchant_discount = false -----> discount is given by the aggregators.

    Rate - this will have the value of the percentage when there is a percentage discount.
    Example: for 40%, the rate = 40.

  16. What is merchant_ref_id in the order>detail array?
    - It is the same as aggregator order id. You can ignore this.

  17. What all the possible order_type values?
    - delivery and pickup

  18. Can we expect the GST tax information at the order level?
    - Only Foodpanda and Scootsy sends us the GST information of the order at the order level inside taxes array. They will send us the information in CGST and SGST. You can refer the sample payload we sent it to you. If not sent, you can ask your POC from UrbanPiper.

  19. Can you send the discounts data at the item level?
    - If the aggregators are sending the discounts on item level then we do send to you in the payload at the item level.

  20. Can we rely on the keys total_charges and total_taxes for an order?
    - Yes, you can rely on that information to get taxes and charges. Because total_charges is the summation of item level total charges and order level total charges. Similarly, total_taxes is the summation of item level total taxes and order level total taxes(if any).

  21. What is the key name discount inside the item array? Explain briefly.
    - The discount key contains the value when there is an item level discount is applied or the discount is split across all the items for an order(its depend on aggregators). The value of the discount key is just information to inform you that how much discount has been applied for that particular item. 

  22. What are id and merchant_id inside item array?
    - id is UrbanPiper item id.
    Merchant_id is POS item id.

  23. Explain briefly, what is options_to_add and options_to_remove?
    - options_to_add - when customer selects the options/variants/add-ons for an item then those options/variants/add-ons data passed under options_to_add array.

    options_to_remove - by default, there are some options/variants/add-ons are applied on the item and customer don’t want those options and remove them manually from the item. Then the removed options will be passed under the options_to_remove array.

  24. What is the logic behind quantity in items and options?
    - As you can see there is no attribute called quantity inside options_to_add array but you see it under only item array. Please use below logic to calculate the quantity on options price.

    [Item price + (option1 price+option2 price+ …. )] x quantity

  25. How the taxes are calculated for options inside item array?
    - [{Item price + (option1 price+option2 price+ …. )} x quantity] x 5% GST

    Or

    [total x 5% GST] which is the total_with_tax

  26. What is the next_states in the payload?
    - This array gives you the possible order status you need to pass in the Order Status Update API for an order.

  27. What are the different payment options available?
    - cash: when there is cash on delivery
    Payment_gateway: when there is online payment.
    Aggregator: when external platforms don’t share the payment information with us(swiggy).
    Wallet_credit: when there is a split payment is involved for a white-label order.
    Prepaid: when the prepaid wallet is used to place a white-label website or app order.
    Paytm: for paytm orders.
    Simpl: payment option is simpl payment gateway.

  28. What is Split payment?
    - It is the type of payment method for white-label website and app orders. The customer can select part of the money as cash/PG and part of the money from an existing prepaid wallet. Then 2 arrays of payment you will see inside the object Payment. (refer API documentation)

  29. What is id and merchant_ref_id under store array?
    - id: the value contains the UrbanPiper Store id.
    Merchant_ref_id: the value contains the POS store id.

Was this article helpful?