Sent when a new shipping event is retrieved for a tracker
Whenever a new event is created on Shipup, you will receive a notification via the activated webhook. If multiple events are created simultaneously, a separate notification will be sent for each event. This can occur if a tracker is received late in its lifecycle, if the carrier doesn't release information in real time, or if multiple events occur between data fetches. The time between fetches can range from 15 minutes to 2 hours, depending on the carrier. Below is an example of the payload.
{
"id": 3124444,
"created_at": 1530213415,
"livemode": true,
"object": "webhook_event",
"type": "tracker.events.new",
"retry_count": 0,
"webhook_setting_id": 335777,
"data": {
"object": {
"id": 345666,
"object": "tracker",
"carrier": {
"name": "Colissimo",
"code": "colissimo"
},
"carrier_service": {
"code": "base",
"name": "Base"
},
"carrier_code": "colissimo",
"carrier_tracking_url": "http://www.laposte.fr/outils/suivre-vos-envois?code=AZ123456789BE",
"created_at": 1530213415,
"custom_variables": {
},
"delivered_at": 1530213415,
"delivery_status_code": "delivered",
"shipped_at": 1530040615,
"first_delivery_attempted_at": 1530127015,
"displayable_expected_delivery_date": "2018-06-28",
"displayable_expected_delivery_datetime": null,
"displayable_expected_delivery_kind": "carrier",
"tracking_number": "AZ123456789BE",
"uuid": "00000000-0000-0000-0000-000000000000",
"fulfillment": {
"id": 36789,
"object": "fulfillment",
"merchant_id": "internal_id_1234",
"fulfillment_number": "XYZABCD_1",
"custom_variables": {
},
"order": {
"id": 311111,
"object": "order",
"order_number": "ABCD123",
"merchant_id": "internal_id_9876",
"email": "[email protected]",
"phone": null,
"uuid": "00000000-0000-0000-0000-000000000000",
"ordered_at": 1529867815,
"custom_variables": {
}
},
"shipping_address": {
"id": 322222,
"object": "address",
"comment": null,
"city": "Paris",
"country": "France",
"country_code": "FR",
"state": null,
"address1": "1, rue de Rivoli",
"address2": null,
"zip": "75001",
"company_title": "ACME Corp",
"first_name": "John",
"last_name": "Doe",
"name": "John Doe"
}
},
"pickup_point": {
"opening_hours": {
"tue": "06:30-19:00"
},
"closed_dates": {
"01/05/2021": true,
"25/12/2021": true
},
"special_openings": {
},
"phone": "+33612345678",
"address": {
"id": 77333,
"object": "address",
"comment": null,
"city": "Paris",
"country": "France",
"country_code": "FR",
"state": null,
"address1": "1 place du 11 novembre 1918",
"address2": null,
"zip": "75010",
"company_title": null,
"first_name": null,
"last_name": null,
"name": null
},
"map": {
"banner_url": "https://shipup-assets-prod.s3.eu-west-1.amazonaws.com/pickup_point_banners/colissimo/CONSIGNE PICKUP GARE DE L EST/097095.jpg",
"google_maps_link": "https://www.google.com/maps/search/?api=1&query=48.876932%2C2.359989"
}
},
"events": [
{
"id": 312589,
"object": "event",
"happened_at": 1530040615,
"event_type_code": "origin_scan",
"message": "Your package has been scanned",
"raw": "JSON STRING OR HTML",
"address": {
"id": 324666,
"object": "address",
"comment": null,
"city": null,
"country": "France",
"country_code": "FR",
"state": null,
"address1": null,
"address2": null,
"zip": null,
"company_title": null,
"first_name": null,
"last_name": null,
"name": null
},
"standard_event": {
"name": "Origin scan",
"slug": "origin_scan"
}
},
{
"id": 313345,
"object": "event",
"happened_at": 1530127015,
"event_type_code": "out_for_delivery",
"message": "Your package has been sent",
"raw": "JSON STRING OR HTML",
"address": {
"id": 324666,
"object": "address",
"comment": null,
"city": null,
"country": "France",
"country_code": "FR",
"state": null,
"address1": null,
"address2": null,
"zip": null,
"company_title": null,
"first_name": null,
"last_name": null,
"name": null
}
},
{
"id": 31357,
"object": "event",
"happened_at": 1530213415,
"event_type_code": null,
"message": "raw event message",
"raw": "JSON STRING OR HTML",
"address": {
"id": 324666,
"object": "address",
"comment": null,
"city": null,
"country": "France",
"country_code": "FR",
"state": null,
"address1": null,
"address2": null,
"zip": null,
"company_title": null,
"first_name": null,
"last_name": null,
"name": null
}
}
]
},
"reason": {
"kind": "new",
"event_id": 31357
}
}
}
At the first level, you'll find general technical information about the webhook.
Within the data
field, you'll find detailed information about the tracker. If you need further details about any tracker fields, refer to the documentation here. Additionally, you'll find objects related to the carrier, such as the order object and fulfillment, based on the information available at the time the tracker is created.
The data field also includes information about every event that has occurred in the tracker's lifecycle up to that point. For further clarification on the meaning of the fields, refer to the event documentation.