Webhooks
There are two types of webhook available, one which maps status information from the carrier to the standard Shippit statuses, and one which returns the raw data without mapping. Both webhooks return data in in JSON format using snake_case. Only the mapped data webhook has endpoints available for you to query directly.
For more information about declaring the URL to use for your webhook, and other webhook settings, see the Webhooks section in the Developer guide.
Mapped data webhook
Shippit sends status updates on orders to a URL you have configured in your Shippit account. You can also add headers to this webhook, and choose which information to send across the webhook. Navigate to Settings
→ Integrations
→ Webhook URL
to adjust your webhook settings.
POST /webhook
Body
{
"tracking_number": "PPYvZCTod5bkD",
"expected_delivery_date": "2016-04-26T20:46:01+10:00",
"tracking_url": "http://www.shippit.com/track/ppyvzctod5bkd",
"current_state": "completed",
"retailer_order_number": "WEYFEW232",
"retailer_reference": "#OD12345",
"courier_name": "Couriers Please",
"courier_job_id": "CPAVZUZ0001749",
"delivery_address": "123 Fake Drive",
"delivery_suburb": "Sydney",
"delivery_postcode": "2000",
"delivery_state": "NSW",
"delivery_country_code": "AU",
"delivery_latitude": -33.77,
"delivery_longitude": 150.91,
"merchant_url": "myshopify.storename.com",
"status_history": [
{
"status": "completed",
"time": "2016-04-26T19:36:32.000Z"
},
{
"status": "with_driver",
"time": "2016-04-26T18:36:32.000Z"
},
{
"status": "in_transit",
"time": "2016-04-26T17:36:32.000Z"
},
{
"status": "ready_for_pickup",
"time": "2016-04-26T16:36:11.000Z"
},
{
"status": "despatch_in_progress",
"time": "2016-04-26T16:27:35.000Z"
},
{
"status": "order_placed",
"time": "2016-04-26T16:25:04.000Z"
}
],
"products": [
{
"quantity": 1,
"sku": "EWPE123123",
"title": "Super awesome red tshirt",
"product_line_id": "1234"
},
{
"quantity": 7,
"sku": "EWPE123123",
"title": "Super awesome blue tshirt",
"product_line_id": "1235"
}
]
}