Setting up — Webhooks

This article helps you understand the API behaviour in configuring the third-party POS webhooks in Urbanpiper system.

Written By Ops UrbanPiper (Collaborator)

Updated at June 16th, 2020

API Document Reference - https://api-ordering-docs.urbanpiper.com/#setting-up-webhooks


  1. What is the purpose of these APIs?
    - These APIs are used to create, list, view, and update webhooks for a certain set of events.

  2. What is the importance of each one of the Webhook API?
    • GET - /external/api/v1/webhooks/
      -
      This API returns the list of all the webhooks configured in the Quint Dashboard for the business.
    • POST - /external/api/v1/webhooks/
      -
      This API is used to create/configure the webhook endpoint in Quint Dashboard for a given event type.
    • GET - /external/api/v1/webhooks/{webhook_id}
      -
      This API returns the details of the particular webhook endpoint created in our system based on the webhook_id is passed.
    • PUT - /external/api/v1/webhooks/{webhook_id}
      - This API request will update the webhook endpoint which already created using the POST API - /external/api/v1/webhooks/.
    • Note: webhook_id is something returned by calling the below API,
      GET - /external/api/v1/webhooks/ —OR— this can be stored from the response received while configuring the webhook endpoint using POST - /external/api/v1/webhooks/ API.

  3. What is the throttle limit for each of these APIs?
    - A throttle limit is applicable to this endpoint limiting the maximum number of requests/min to 5. 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 1 min.

  4. Which event types I can use?
    • order_placed - To capture the order relay event.
    • order_status_update - To capture the order status update happens from aggregators to POS.
    • rider_status_update - To capture the delivery rider status information.
    • inventory_update - To capture the managing catalog API/Menu sync API callback response.
    • store_creation - To capture the Adding/updating the stores API callback response.
    • store_actions - To capture the Store Actions API callback response.
    • item_state_toggle - an event for callback URL for Items Actions API call.

  5. Is there any callback available for Webhooks POST and PUT APIs?
    - No.

  6. Can the headers of the webhook endpoint is configurable through POST API?
    - Yes. The key-value pair of the webhook endpoint can be configured using the header array.
    "headers": { 
        "content-type": "application/json",
        "key": "value"
        }

Was this article helpful?