Webhook
Booking Crew Location Changed
Fired while a crew that accepted the booking works it, when the crew's device records a newer location: at most every 20 seconds while the crew moves, and about every 2 minutes while it is parked. The location is in data.object.crew. Apply it only when data.object.crew.location_recorded_at is newer than the last one you applied. Endpoints get this event when they subscribe to it by name, or when they have no event filter. Webhooks are delivered with signature headers for verification.
Headers
- Type: stringsvix
-id requiredUnique webhook delivery ID
- Type: stringsvix
-timestamp requiredUnix timestamp of when the webhook was sent
- Type: stringsvix
-signature requiredBase64 encoded list of HMAC signatures for verification
Body
required
application/json
- Properties: 1Type: objectdata
- Type: stringid
Unique event ID (hashed)
- Type: stringFormat: date-timetriggered
_at When the event was triggered
- Type: stringtype
Type of event
Responses
- 200
Webhook processed successfully
- 400
Bad request
- 500
Internal server error
Request Example for postbooking.crew_location_changed
{
"id": "b7c8d9e0f1a2b3c4",
"type": "booking.crew_location_changed",
"triggered_at": "",
"data": {
"object": {
"id": "",
"hid": "67GH8J",
"created_at": "",
"updated_at": "",
"product": "pickup",
"origin": {
"id": "",
"name": "IKEA Emeryville",
"address2": "APT C",
"coordinates": [
125.6,
10.1
],
"address": {
"number": "78",
"street": "1st St.",
"street2": "APT C",
"locality": "San Francisco",
"region": "CA",
"postal_code": "94131"
},
"location_type": "street_address"
},
"destination": {
"id": "",
"name": "IKEA Emeryville",
"address2": "APT C",
"coordinates": [
125.6,
10.1
],
"address": {
"number": "78",
"street": "1st St.",
"street2": "APT C",
"locality": "San Francisco",
"region": "CA",
"postal_code": "94131"
},
"location_type": "street_address"
},
"route": [
{
"id": "",
"position": 0,
"location": {
"id": "",
"name": "IKEA Emeryville",
"address2": "APT C",
"coordinates": [
125.6,
10.1
],
"address": {
"number": "78",
"street": "1st St.",
"street2": "APT C",
"locality": "San Francisco",
"region": "CA",
"postal_code": "94131"
},
"location_type": "street_address"
},
"instructions": null,
"address2": null,
"floor": null,
"elevator": null
}
],
"arrival_window": {
"id": "",
"available": true,
"ondemand": true,
"start_at": null,
"end_at": null,
"label": "2:00 PM - 4:00 PM"
},
"arrival_window_ref": "origin",
"description": null,
"order_number": "ORD-12345",
"tip": 0,
"customer_notifications_enabled": true,
"photo_urls": [
""
],
"state": "created",
"cancellation_type": "cancelled",
"dispatch_state": "origin_pending",
"share_url": "",
"customer": {
"name": "John Doe",
"email": "john@example.com",
"phone_number": "+14155551234"
},
"contacts": [
{
"id": "",
"name": "Store Team",
"phone_number": "+14155550100",
"email": "store@example.com",
"notification_scope": "all",
"stop_positions": [
0
],
"stops": [
{
"id": "",
"position": 0
}
]
}
],
"crew": null,
"dispatch": {
"state": "stop_pending",
"route_position": 0,
"route_stop_id": null,
"events": [
{
"state": "stop_pending",
"route_position": 0,
"route_stop_id": null,
"triggered_at": "",
"photo_urls": [
""
]
}
]
},
"quote": {
"id": "",
"origin": {
"id": "",
"name": "IKEA Emeryville",
"address2": "APT C",
"coordinates": [
125.6,
10.1
],
"address": {
"number": "78",
"street": "1st St.",
"street2": "APT C",
"locality": "San Francisco",
"region": "CA",
"postal_code": "94131"
},
"location_type": "street_address"
},
"destination": {
"id": "",
"name": "IKEA Emeryville",
"address2": "APT C",
"coordinates": [
125.6,
10.1
],
"address": {
"number": "78",
"street": "1st St.",
"street2": "APT C",
"locality": "San Francisco",
"region": "CA",
"postal_code": "94131"
},
"location_type": "street_address"
},
"route": [
{
"id": "",
"position": 0,
"location": {
"id": "",
"name": "IKEA Emeryville",
"address2": "APT C",
"coordinates": [
125.6,
10.1
],
"address": {
"number": "78",
"street": "1st St.",
"street2": "APT C",
"locality": "San Francisco",
"region": "CA",
"postal_code": "94131"
},
"location_type": "street_address"
},
"instructions": null,
"address2": null,
"floor": null,
"elevator": null
}
],
"travel_duration": 1,
"travel_distance": 1,
"product": "pickup",
"fare_structure": {
"base": 1,
"per_mile": 1,
"included_miles": 0,
"per_minute_labor": 1,
"per_minute_travel": 1,
"per_stop": 1
},
"fare_estimate": [
{
"total": 1,
"base": 1,
"labor": 1,
"travel_distance": 1,
"billed_miles": 0,
"travel_duration": 1,
"stops": 1,
"adjustments": [
{
"kind": "refund",
"name": "",
"amount": 1,
"created_at": ""
}
]
}
],
"addons": [
{
"slug": "assembly",
"name": "Assembly",
"description": "Our crew will assemble your furniture at the destination.",
"amount": 1500
}
],
"created_at": "",
"updated_at": ""
},
"fare": {
"total": 1,
"base": 1,
"labor": 1,
"travel_distance": 1,
"billed_miles": 0,
"travel_duration": 1,
"stops": 1,
"adjustments": [
{
"kind": "refund",
"name": "",
"amount": 1,
"created_at": ""
}
]
},
"metadata": null
}
}
}
No Body