Webhooks
Webhooks allow for immediate notifications and updates when events occur. Instead of polling for changes, which can be resource-intensive and less efficient, webhooks push data to a designated endpoint as soon as an event happens. We will send a webhook for every status change for every job shift handles.
URL
We require the provided endpoint to be a public endpoint. This means that any verification of the webhook must be done on the webhook receiver's side.
Example: shift.online/webhook
Payload Example
Method: POST
{
"event": "update",
"eventData": {
"consignmentNumber": "14A110994",
"consignmentPhase": "main",
"date": "2024-01-11 13:37:53pm",
"isParent": true,
"shiftReference": "A1B2C3D4",
"status": "pending"
},
"type": "ticket"
}
Properties Explained
- Type: Ticket - Alias of 'Booking'.
- ShiftReference: Shift's unique identifier for this booking.
- ConsignmentNumber: Consignment's unique identifier.
- ConsignmentPhase: The type of booking (Collection, Delivery, or Main).
- isParent: Indicates if this is the parent booking of the consignment. The parent booking contains child bookings with consignmentPhase 'collection' or 'delivery'.
List of Possible Statuses
- accepted
- arrived_dropoff
- arrived_pickup
- at_collection_depot
- at_final_depot
- attempted_delivery
- available_for_collection
- broken_data
- cancelled
- collected_pickup
- collection_customer_not_home
- collection_summary_received
- completed
- completed_left_safe
- completed_left_with_neighbour
- customer_no_show
- customer_not_home
- customer_viewed_codes
- damaged_goods
- declined
- delivery_expired
- dispute
- extended_window
- failed_delivery
- failed_delivery_customer_not_home
- failed_delivery_damaged_goods
- items_not_loaded
- left_depo
- missing_goods
- nothing_to_collect
- on route
- on_route_to_collection_depot
- on_route_to_dropoff
- on_route_to_pickup
- pending
- ready_for_collection
- redelivery_pending
- refused_missing_goods
- route_started
- scheduled
- unserviceable
- upgraded_to_delivery