Webhooks
Webhooks allow you to subscribe to events that Shippify generates every time a delivery or route is changed. When one of those events is triggered, we'll send a HTTP POST request to the webhook's configured URL.

Webhook Setup

Declaring a Webhook

In your Shippify account, go to the left menu, choose the Automations section, look for `Push Webhook` in the left side menu and press the `+` button.
In this section you can manage the URL's you declare for each of the events you want to subscribe to. You can also test your webhooks in this section and you'l receive a sample payload.

Available Webhook Events

Specification of events available for webhooks:
Name
Description
Delivery is created
Fires whenever a new delivery is created.
Delivery is in transit
Fires when a delivery has been collected and is in transit.
Delivery completed
Fires when a delivery has been delivered.
Delivery returned
Fires when a delivery has been returned to the warehouse.
Delivery canceled
Fires when a delivery was canceled by an operator.

Event's Payload

When one of the events listed previously is done, the webhook is executed and sends the following payload:
Payload received in URL:
1
{
2
"id":"t-xyz-123",
3
"routeId": null,
4
"networkId": 225,
5
"networkName": "Default-company test",
6
"jobId": null,
7
"blocked": false,
8
"cityId": 2,
9
"cityName": "Guayaquil",
10
"cityLang": "es",
11
"companyId": 1,
12
"companyName": "Shippify Inc.",
13
"companyPlanType": "postpaid",
14
"companyParentId": 1,
15
"companyMode": 0,
16
"shipperId": null,
17
"type": "flex",
18
"vehicleCapacity": 2,
19
"price": 2.75,
20
"scheduledStartPickingDate": "2021-06-23T18:00:00.000Z",
21
"scheduledEndPickingDate": "2021-06-23T19:00:00.000Z",
22
"arrivalPickupDate": null,
23
"scheduledStartDeliveryDate": "2021-06-23T19:00:00.000Z",
24
"scheduledEndDeliveryDate": "2021-06-24T00:00:00.000Z",
25
"arrivalDeliveryDate": null,
26
"creationDate": "2021-06-22T20:51:27.000Z",
27
"pickupDueDate": null,
28
"deliveryDueDate": null,
29
"pickingPlace":{
30
"lat": -2.1594806,
31
"lng": -79.895742599,
32
"originalAddress": "torres del norte, av. 9, guayaquil 090512, ecuador",
33
"address": "torres del norte, av. 9, guayaquil 090512, ecuador"
34
},
35
"droppingPlace":{
36
"lat": -2.1693477,
37
"lng": -79.8985397,
38
"originalAddress": "san marino shopping, av. francisco de orellana, guayaquil 090512, ecuador",
39
"address": "san marino shopping, av. francisco de orellana, guayaquil 090512, ecuador"
40
},
41
"recipientInfo":{
42
"name": "Test recipient",
43
"email": "[email protected]"
44
},
45
"senderInfo":{
46
"name": "Test sender",
47
"email": "[email protected]"
48
},
49
"state": 1,
50
"tags": null,
51
"items":[
52
{
53
"name": "1",
54
"qty": 1,
55
"size": "S",
56
"price": 0,
57
"weight": 0,
58
"fragile": false,
59
"pickedUp": false,
60
"delivered": false
61
}
62
],
63
"referenceId": "referenceId",
64
"notes": null,
65
"attempts": 0,
66
"countryCode": "EC",
67
"countryName": "ECUADOR",
68
"currencyCode": "USD",
69
"formulaId": "815",
70
"cash": 0,
71
"distance": 1.7999999523162842,
72
"distanceRoute": 1.7999999523162842,
73
"eventEntity": "delivery",
74
"eventDate": "2021-06-22T20:51:27+00:00",
75
"itemsNumber": 1,
76
"itemsWeight": 0,
77
"itemsPrice": 0,
78
"dbId": 214280954,
79
"eventType": "DELIVERY_CREATED_SUCCESSFULLY",
80
"eventCreatedAt": "2021-06-22 20:51:27",
81
"eventDescription": "Delivery was created successfully",
82
"status": "processing",
83
"eventId": 1624395087667
84
}
Copied!

Last modified 4mo ago