Webhooks

You can use webhooks to receive notifications about events happening in Colorlab.

A webhook subscription allows to react to these events in your own software or service, instead of having to make API calls periodically to check for updates.

Example: a webhook triggers when an order is created in an online store that uses one of our Integrations. This trigger allows your software start any kind of steps that need to be performed when an order is created.

Advantages

Subscribing to a webhook

Webhooks are available in the Colorlab Advanced package and require to be actived.
Please contact support@colorlab.io to enable access to webhooks.

Order webhook

After entering the endpoint for the Order webhook in the Console, it will be triggered for following updates:

Response

The webhook will send following JSON payload:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{
"orderId": "ORD789",
"status": "Created",
"email": "john.doe@gmail.com",
"firstName": "John",
"lastName": "Doe",
"billingDetails": {
"firstName": "John",
"lastName": "Doe",
"address1": "123 Amoebobacterieae St",
"address2": "",
"zip": "40202",
"city": "Ottowa",
"province": "KY",
"country": "Canada",
"countryCode": "CA",
"phone": "555-625-1199"
},
"shippingDetails": {
"companyName": "John Doe's Cookie Factory",
"firstName": "John",
"lastName": "Doe",
"address1": "123 Amoebobacterieae St",
"address2": "bus 2",
"zip": "40202",
"city": "Ottowa",
"province": "KY",
"country": "Canada",
"countryCode": "CA",
"phone": "555-625-1199"
},
"created": "2018-04-20T13:45:08.672Z",
"updated": "2018-04-20T13:45:08.672Z",
"lineItems": [
{
"id": "123",
"token": "a462a062-7987-4a44-b35f-7009b141fb33",
"quantity": 2,
"price": "12.50"
}
]
}