Zakeke uses cookies to provide necessary site functionality and improve your experience. By using our website, you agree to our privacy policy and our cookie policy.   

WebHooks

WebHooks

What are webhooks?

Webhooks are an easy way to capture Zakeke events such as when an order is generated. It will be up to the seller to decide what to do with the event.

The uses of webhooks are endless, for example you can send an email to your customer or to the warehouse manager, automatically print the personalization or modify the output files and send them to someone automatically, etc ...

Beware, however: using webhooks requires a minimum knowledge of computer systems, HTTP protocol and programming languages.

Setting up endpoints

Enabling a Zakeke webhook is very simple: just visit the webhook settings page from the side menu:

Webhooks page

On the page that appears we will have the list of events that we can capture (currently only the "generated order" event is available). Just enter the URL of the endpoint of your website and press "Save Settings" at the top right of the page.

If you need it, you can press the "Test" button next to the text field: it will make an HTTP POST call to your endpoint with test data so you can develop the webhook.

IMPORTANT: The parameters of the POST call are passed as "application/json" so make sure that your webserver / framework supports this encoding for requests. IMPORTANT #2: We can't ensure that the request will be called only one time. So pay attention and manage the case where the request is made several times.

This is an example of what you will receive in your POST data:

	{
	   "eventType":"OrderGenerated",
	   "data":{
		  "orderCode":"000000283",
		  "orderAmount":7.9,
		  "orderDate":"2018-06-08T08:47:30.17",
		  "orderDetails":[
			 {
				"detailCode":"1912",
				"detailDesignDocId":"xxxxxx-xxxxxx-xxxxx-xxxxx",
				"detailCustomerId":0,
				"detailVisitorId":36542,
				"detailQuantity":1,
				"detailPrice":7.9,
				"detailModelName":"T-Shirt",
				"detailModelCode":"BCTM010",
				"detailFiles":[
				   {
					  "variantName": "Red",
					  "sideName":"Front",
					  "areaID":1,
					  "format":"svg",
					  "fileUrl":"....svg"
				   },
				   ...
				]
			 }
		  ]
	   }
	}

Status of webhooks and fails

In the same settings page it is possible to visualize in the table below the events all the webhooks executed or to be executed (excluding the test ones) and their status.

All events prior to saving the settings are considered as completed as no action has been performed for them.

If a webhook fails, Zakeke will try to re-run it up to a maximum of 5 times, extending the time more and more. After 5 attempts the webhook is considered "Aborted" and no action will be performed for it.

You can press the "Retry all failed" button to try these webhooks again.