WebHook

Operational Process

Step 1: Definition

Develop an interface accessed via a URL to receive logistics information pushed by the API (Sample code in JAVA):

@RestController
class WebhookController {

WebhookController() {
}

@PostMapping("/notify")
void notify(@RequestBody String body) {
  // Body is the received push content.
}
}
1
2
3
4
5
6
7
8
9
10
11

Step 2: Configuration

Please contact us to configure your webhook url, and let us know if you need to enable the message body experience signature. If enabled, we will issue a key to you for subsequent signature verification processes. Webhook config example

Step 3: Testing

Verify online if the connection is smooth. (Available for free testing at webhook.site (opens new window))

Push Strategy

  • Pushes are controlled by a queue, and it is recommended to use a queue to process received information.
  • Each push notification contains comprehensive information for a logistics order.
  • The Webhook URL receiving the push should return an HTTP status code of 200, indicating successful processing.
  • Any HTTP status code other than 200 is considered a push failure.
  • After a push failure, there will be 5 retry attempts. If still unsuccessful, the system will abandon pushing for this order, waiting for the next retry during automatic tracking.

Retry specifics are as follows:

Attempt Times Retry Times Retry Interval (Minutes) Description
1 0 0 none。
2 1 10 Initiate at the 10th minute.
3 2 30 Initiate at the 30th minute.
4 3 60 Initiate after the 1st hour.
5 4 120 Initiate after the 2st hour.
6 5 180 Initiate after the 3st hour.

Push notification type

Update Tracking Notification:

After automatic tracking, if there are any changes in the logistics information, it will trigger an immediate push notification; otherwise, no notification will be sent.

Push header information example

"content-type",
"x-giga-sign": "nMbdxzqqSODEJj0JxG8WSZLfaVdxKdOHamMM2mNoMgQ%3D",
"x-giga-timestamp": "1744252198189"
1
2
3

Push Message Example:

{
  "data": {
    "carrierKey": "carrier_001",
    "trackingNumber": "284619212712",
    "sourceCode": "ONSITE",
    "gigaTrackingNumber": "GCL6610231207397",
    "param": "154874",
    "tag": "11222",
    "exceptionFlag": "S",
    "shipFrom": "Lithia Springs,GA,US",
    "shipTo": "Palm Coast,FL,US",
    "actualPickUpDate": 1737590400000,
    "actualDeliveryDate": 1738340894000,
    "actualPickUpDateUTC": "2025-01-23T00:00:00Z",
    "actualDeliveryDateUTC": "2025-01-31T16:28:14Z",
    "lastNodeStatusCode": 5,
    "lastNodeStatusDescription": "DELIVERED",
    "eventInfoVos": [
      {
        "postalCode": "32164",
        "city": "Palm Coast",
        "stateCode": "FL",
        "countryCode": "US",
        "location": "DELIVERY_LOCATION",
        "eventCode": "DL",
        "eventTime": 1738340894000,
        "eventTimeUTC": "2025-01-31T16:28:14Z",
        "eventDescription": "Delivered,Left at front door. Signature Service not requested.",
        "logisticsStatusCode": 5,
        "logisticsStatusDescription": "DELIVERED",
        "exceptionFlag": "S"
      },
      {
        "postalCode": "32221",
        "city": "JACKSONVILLE",
        "stateCode": "FL",
        "countryCode": "US",
        "location": "VEHICLE",
        "eventCode": "OD",
        "eventTime": 1738316040000,
        "eventTimeUTC": "2025-01-31T09:34:00Z",
        "eventDescription": "On FedEx vehicle for delivery",
        "logisticsStatusCode": 4,
        "logisticsStatusDescription": "IN TRANSIT",
        "exceptionFlag": "S"
      },
      {
        "postalCode": "32221",
        "city": "JACKSONVILLE",
        "stateCode": "FL",
        "countryCode": "US",
        "location": "DESTINATION_FEDEX_FACILITY",
        "eventCode": "AR",
        "eventTime": 1738314540000,
        "eventTimeUTC": "2025-01-31T09:09:00Z",
        "eventDescription": "At local FedEx facility",
        "logisticsStatusCode": 4,
        "logisticsStatusDescription": "IN TRANSIT",
        "exceptionFlag": "S"
      },
      {
        "postalCode": "31322",
        "city": "POOLER",
        "stateCode": "GA",
        "countryCode": "US",
        "location": "FEDEX_FACILITY",
        "eventCode": "DP",
        "eventTime": 1738279040000,
        "eventTimeUTC": "2025-01-30T23:17:20Z",
        "eventDescription": "Departed FedEx location",
        "logisticsStatusCode": 4,
        "logisticsStatusDescription": "IN TRANSIT",
        "exceptionFlag": "S"
      },
      {
        "postalCode": "31322",
        "city": "POOLER",
        "stateCode": "GA",
        "countryCode": "US",
        "location": "DESTINATION_FEDEX_FACILITY",
        "eventCode": "DY",
        "eventTime": 1738265880000,
        "eventTimeUTC": "2025-01-30T19:38:00Z",
        "eventDescription": "Delivery updated,Delivery updated",
        "logisticsStatusCode": 4,
        "logisticsStatusDescription": "IN TRANSIT",
        "exceptionFlag": "S"
      },
      {
        "postalCode": "31322",
        "city": "POOLER",
        "stateCode": "GA",
        "countryCode": "US",
        "location": "FEDEX_FACILITY",
        "eventCode": "AR",
        "eventTime": 1738265760000,
        "eventTimeUTC": "2025-01-30T19:36:00Z",
        "eventDescription": "Arrived at FedEx location",
        "logisticsStatusCode": 4,
        "logisticsStatusDescription": "IN TRANSIT",
        "exceptionFlag": "S"
      },
      {
        "postalCode": "31322",
        "city": "POOLER",
        "stateCode": "GA",
        "countryCode": "US",
        "location": "DESTINATION_FEDEX_FACILITY",
        "eventCode": "DY",
        "eventTime": 1738152425000,
        "eventTimeUTC": "2025-01-29T12:07:05Z",
        "eventDescription": "Delivery updated,Delivery updated",
        "logisticsStatusCode": 4,
        "logisticsStatusDescription": "IN TRANSIT",
        "exceptionFlag": "S"
      },
      {
        "postalCode": "31322",
        "city": "POOLER",
        "stateCode": "GA",
        "countryCode": "US",
        "location": "DESTINATION_FEDEX_FACILITY",
        "eventCode": "AR",
        "eventTime": 1738152300000,
        "eventTimeUTC": "2025-01-29T12:05:00Z",
        "eventDescription": "At local FedEx facility",
        "logisticsStatusCode": 4,
        "logisticsStatusDescription": "IN TRANSIT",
        "exceptionFlag": "S"
      },
      {
        "postalCode": "31322",
        "city": "POOLER",
        "stateCode": "GA",
        "countryCode": "US",
        "location": "VEHICLE",
        "eventCode": "IT",
        "eventTime": 1737954267000,
        "eventTimeUTC": "2025-01-27T05:04:27Z",
        "eventDescription": "On the way",
        "logisticsStatusCode": 4,
        "logisticsStatusDescription": "IN TRANSIT",
        "exceptionFlag": "S"
      },
      {
        "postalCode": "31408",
        "city": "GARDEN CITY",
        "stateCode": "GA",
        "countryCode": "US",
        "location": "VEHICLE",
        "eventCode": "IT",
        "eventTime": 1737903222000,
        "eventTimeUTC": "2025-01-26T14:53:42Z",
        "eventDescription": "On the way",
        "logisticsStatusCode": 4,
        "logisticsStatusDescription": "IN TRANSIT",
        "exceptionFlag": "S"
      },
      {
        "postalCode": "35210",
        "city": "IRONDALE",
        "stateCode": "AL",
        "countryCode": "US",
        "location": "VEHICLE",
        "eventCode": "IT",
        "eventTime": 1737855844000,
        "eventTimeUTC": "2025-01-26T01:44:04Z",
        "eventDescription": "On the way",
        "logisticsStatusCode": 4,
        "logisticsStatusDescription": "IN TRANSIT",
        "exceptionFlag": "S"
      },
      {
        "postalCode": "76008",
        "city": "ALEDO",
        "stateCode": "TX",
        "countryCode": "US",
        "location": "VEHICLE",
        "eventCode": "IT",
        "eventTime": 1737812203000,
        "eventTimeUTC": "2025-01-25T13:36:43Z",
        "eventDescription": "On the way",
        "logisticsStatusCode": 4,
        "logisticsStatusDescription": "IN TRANSIT",
        "exceptionFlag": "S"
      },
      {
        "postalCode": "88030",
        "city": "DEMING",
        "stateCode": "NM",
        "countryCode": "US",
        "location": "VEHICLE",
        "eventCode": "IT",
        "eventTime": 1737768920000,
        "eventTimeUTC": "2025-01-25T01:35:20Z",
        "eventDescription": "On the way",
        "logisticsStatusCode": 4,
        "logisticsStatusDescription": "IN TRANSIT",
        "exceptionFlag": "S"
      },
      {
        "postalCode": "92316",
        "city": "BLOOMINGTON",
        "stateCode": "CA",
        "countryCode": "US",
        "location": "ORIGIN_FEDEX_FACILITY",
        "eventCode": "DP",
        "eventTime": 1737725334000,
        "eventTimeUTC": "2025-01-24T13:28:54Z",
        "eventDescription": "Left FedEx origin facility",
        "logisticsStatusCode": 4,
        "logisticsStatusDescription": "IN TRANSIT",
        "exceptionFlag": "S"
      },
      {
        "postalCode": "92316",
        "city": "BLOOMINGTON",
        "stateCode": "CA",
        "countryCode": "US",
        "location": "FEDEX_FACILITY",
        "eventCode": "AR",
        "eventTime": 1737668880000,
        "eventTimeUTC": "2025-01-23T21:48:00Z",
        "eventDescription": "Arrived at FedEx location",
        "logisticsStatusCode": 4,
        "logisticsStatusDescription": "IN TRANSIT",
        "exceptionFlag": "S"
      },
      {
        "postalCode": "92316",
        "city": "BLOOMINGTON",
        "stateCode": "CA",
        "countryCode": "US",
        "location": "PICKUP_LOCATION",
        "eventCode": "PU",
        "eventTime": 1737608400000,
        "eventTimeUTC": "2025-01-23T05:00:00Z",
        "eventDescription": "Picked up",
        "logisticsStatusCode": 3,
        "logisticsStatusDescription": "PICKED UP",
        "exceptionFlag": "S"
      },
      {
        "postalCode": "30122",
        "countryCode": "US",
        "location": "CUSTOMER",
        "eventCode": "OC",
        "eventTime": 1737518640000,
        "eventTimeUTC": "2025-01-22T04:04:00Z",
        "eventDescription": "Shipment information sent to FedEx",
        "logisticsStatusCode": 2,
        "logisticsStatusDescription": "INFO RECEIVED",
        "exceptionFlag": "S"
      }
    ],
    "daysAfterTransit": 9,
    "daysAfterLastUpdate": 68,
    "serviceType": "GROUND_HOME_DELIVERY",
    "lastSyncTime": "2025-04-10T10:14:35+08:00",
    "lastSyncSuccessfulTime": "2025-04-10T10:14:35+08:00",
    "weight": "73.8LB",
    "dimensions": "85*13*7 IN",
    "pieces": 2,
    "isDuplicate": false,
    "trackingStatus": "Y"
  },
  "notifyEvent": "TRACKING_UPDATED"
}
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268

Stop tracking notifications:

Receiving this notification means the current tracking number has stopped updating. You can restore automatic tracking by using the Restart Tracking API.

Push header information example

"content-type",
"x-giga-sign": "WjOjoJhE6eivyz8cLdfxyDDtuurMflbxugk7tpNWdNk%3D",
"x-giga-timestamp": "1744261817744"
1
2
3

Push Message Example:

{
  "data": {
    "gigaTrackingNumber": "GCL4637113861710",
    "trackingStatus": "N"
  },
  "notifyEvent": "TRACKING_STOPPED"
}
1
2
3
4
5
6
7

Restart tracking notifications:

Receiving this notification means the current tracking number has restarted tracking. If there are any changes in the logistics information, it will trigger an immediate push update notification.

Push header information example

"content-type",
"x-giga-sign": "MW7e2U1Z6JCzbjr2wJ12UIRpXQQgPNYXqFNP2d6Jp7A%3D",
"x-giga-timestamp": "1744257658282"
1
2
3

Push Message Example:

{
  "data": {
    "gigaTrackingNumber": "GCL4637113861710",
    "trackingStatus": "Y"
  },
  "notifyEvent": "TRACKING_RESTARTED"
}
1
2
3
4
5
6
7

Verify signature process

  • After opening the message experience sign, Each push notification will carry a signature for verification, ensuring that the source is GIGALOGISTICS. It is recommended to first validate the signature before processing.
  • The x-giga-timestamp attribute in the response header indicates the current timestamp, measured in milliseconds. Please note that the x-giga-timestamp attribute is not involved in the signature verification process; it merely indicates the timestamp of the message push.
  • The signature information is included in the x-giga-sign attribute of the response headers.
  • To generate the signature, use the original update tracking notification message without making any modifications to it. Ensure that the basic information for generating the signature is taken from the original message.

Step 1: Concatenate the content to be signed

  • Concatenate the original Update Tracking Notification message with the '/' character and the secret key, for example:
{"data":{"gigaTrackingNumber":"GCL4139885107317","param":"test","tag":"dpd_de","exceptionFlag":"S"...},"notifyEvent":"TRACKING_UPDATED"}
1
  • Signature key
Your signature key
1
  • The content to be signed is
{"data":{"gigaTrackingNumber":"GCL4139885107317","param":"test","tag":"dpd_de","exceptionFlag":"S"...},"notifyEvent":"TRACKING_UPDATED"}/Your signature key
1

Generate message body signature

  1. Concatenate the timestamp and the message body as the signature string. Use the HmacSHA256 algorithm to calculate the signature with the signing key as the key.
  2. Base64 encode the signature parameters.
  3. URL encode the signature parameters to obtain the final signature (using UTF-8 character set).

Example code for signature calculation (Java version):

    /**
     * @param body original notification message
     * @param secret signature key
     * @return generate signature content
     * @throws NoSuchAlgorithmException
     * @throws UnsupportedEncodingException
     * @throws InvalidKeyException
     */
    private String getGeneratedSignature(String body, String secret) throws NoSuchAlgorithmException, UnsupportedEncodingException, InvalidKeyException {

        String stringToSign = body + "/" + secret;
        Mac mac = Mac.getInstance("HmacSHA256");
        mac.init(new SecretKeySpec(secret.getBytes("UTF-8"), "HmacSHA256"));
        byte[] signData = mac.doFinal(stringToSign.getBytes("UTF-8"));
        return URLEncoder.encode(new String(Base64.encodeBase64(signData)),"UTF-8");
    }
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

Comparing results

If the generated signature result is consistent with x-giga-sign, the verification is passed, that is, the source of the push notification is GIGALOGISTICS;