Skip to content

Order Webhooks

The eComNow Management system offers a convenient feature that allows for automated vendor order cancellation and new order. By leveraging the registration of webhooks, this process becomes seamless and efficient.

Whenever an order cancellation or new order occurs, the system ensures that the respective vendor is promptly notified. This notification is conveniently sent through email, providing a reliable and immediate means of communication. By receiving these email notifications, vendors can stay informed about order cancellations and take necessary actions accordingly.

The integration of webhooks into the eComNow Management system streamlines the entire order cancellation and new order arrival process, saving vendors valuable time and effort. Through this automated mechanism, vendors can effectively manage their inventory and logistics, making adjustments as needed based on the received order cancellation notifications and new order notification.

Type of Webhooks

Currently, eComNow Management system support two type of webhooks registration:

  1. New Order : When a new order is place a notification is genrated on registed url with notfication type new_order
  2. Order Cancellation : When an order is cancelled a notification is genrated on registed url with notfication type order_cancellation

Webhook Body

To ensure compatibility with the eComNow Management system, your API should be configured to accept a POST method and expect specific data in the request body. The system will send the following data in the request

Notification Body:

{
    "orderNo": 1000-4612,
    "type": "new_order",
    "items": [
        {
            "skuNr": "NHCBDFSJ&P20027-1",
            "itemName": "NutraHemp CBD Full Spectrum Joint and Pain Balm",
            "itemQuantity": 1,
            "itemPrice": 60.0,
            "itemTotal": 60.0
        }
    ]
}

details of body params

orderNo: Platform id - Unique order number, in example 1000 is platform id and 4612 is the order No
type: Order notification type, either new_order, order_cancellation
items: List of cancelled items in an order
skuNr: Item sku nr
itemName: Item Name
itemQuantity:Quantity of cancellation item
itemPrice : Item Price
itemTotal : Item total price

Webhooks Registation API

The eComNow Management system provides a set of APIs to facilitate the registration, updating, deletion, and retrieval of webhooks.

NOTE: Bearer/JWT Token Authentication is not required for these API, You have to use user vendor credentials.

screenshot


Register Webhook:

Endpoint: /basic/webhooks
Method: POST
Parameters: Username: Vendor user name, Password: Vendor password are need to be passed in request header
Body: Webhook method, webhook API, authencation if applicable

{
  "authentication": "Basic XxxXxxXX",
  "webhookType": "new_order",
  "url": "Your API URL Here"
}


Description: This API allows vendors to register a new webhook by providing the webhook URL, specifying the authentication and associating it with their vendor ID. Once registered, the webhook will be triggered whenever an order cancellation occurs.

Update Webhook:

Endpoint: /basic/webhooks/{webhookId}
Method: PUT
Parameters: webhookId: Unique id of already registered url, Username: Vendor user name, Password: Vendor password are need to be passed in request header
Body: Webhook method, webhook API, authencation if applicable

{
  "authentication": "Basic XxxXxxXX",
  "webhookType": "order_cancellation",
  "url": "Your API URL Here"
}


Description: With this API, vendors can update an existing webhook by specifying the webhook ID and providing the updated webhook URL.

Delete Webhook:

Endpoint: /basic/webhooks/{webhookId}
Method: DELETE
Parameters: webhookId: Unique id of already registered url, Username: Vendor user name, Password: Vendor password are need to be passed in request header
Description: Vendors can use this API to delete a webhook based on its unique webhook ID.

Get Registered Webhook:

Endpoint: /basic/webhooks/{webhookId}
Method: GET
Parameters: webhookId: Unique id of already registered url, Username: Vendor user name, Password: Vendor password are need to be passed in request header
Description: By making a GET request to this API with the webhook ID, vendors can retrieve details about a specific registered webhook. This includes information such as the webhook URL, method, authentication and associated vendor ID.

Thanks.