Product update webhook

Update product stock and price immediately using webhooks

Nir avatar
Written by Nir
Updated over a week ago

Using webhook to update product information

The Barilliance platform has two main ways to get product information and build the catalog internally.

  1. product feed

  2. Scraping of data from web pages

The disadvantage of these methods is that data is not updated immediatly, usually it updates during scheduled cron run, which is a few times a day.

Using webhook to update product information allows external systems to update the product information as soon as the changes occur.

Supported functionality

Barilliance web hooks for product update currently support updating:

  • In/out of stock

  • Price

How to generate the webhook endpoint URL

To generate the webhook end point - go to the settings page on your site. find the section Incoming Webhooks, select product webhook tab and click Get API Access URL button.
The URL given includes a key which limits access only to you. so keep this URL confidential.

Setting the webhook call information

The web hooks are designed for maximum flexibility and compatibility. You can add the required data (product information) as POST data, as GET data (as url parameters) or as XML data.

Valid data for the product update webhook:

product_id - the product id string. contact Barilliance if youre not sure what Barilliance uses as the product id.

platform_id- an alternative product id which helps to use the website SKUs in case Barilliance uses another product id. This is usually not required. Barilliance's support team will tell you in case this is needed.

in_stock - 1 or 0

price - URL encoded price in displayable form for example $11.99


A valid call requires product id or platform id and valid information for stock, price or both.


Example of a valid call

Here is an example of a valid call. Note the price and product id are added to the original endpoint fetched from the interface.
โ€‹

How to debug the webhooks interface

Once your system has started calling Barilliance with webhook data, you can see the last value found in the interface. It looks like this:

Getting notified if webhooks stop being received.

You can add your email address to get a notification if wehooks are not received for a set period of time:

Throttling

In order to avoid excessive product updates, you are expected to send the product updates serially. Therefore calls are blocked if there are parallel calls. You should check the return status (see below) and send the update again if the status indicates throttling.

Return values

The system responds with an HTTP code representing the status of the call. Valid values are:

  • 200 - call successful

  • 202 - partial request - the data is not correct (see valid call above)

  • 401 - forbidden - the API key is wrong

  • 405 - the operation is not allowed

  • 429 - See throttling


โ€‹

Did this answer your question?