Webhook

Booking Dispatch State Changed

​

Fired when a booking's dispatch state changes (crew progress updates). Webhooks are delivered with signature headers for verification.

Headers

  • Unique webhook delivery ID

  • Unix timestamp of when the webhook was sent

  • Base64 encoded list of HMAC signatures for verification

Body

required
application/json
  • Properties: 1
  • Unique event ID (hashed)

  • When the event was triggered

  • Type of event

Responses

  • Webhook processed successfully

  • Bad request

  • Internal server error

Request Example for postbooking.dispatch_state_changed
{
  "id": "e9f1a2b3c4d5e6f7",
  "type": "booking.dispatch_state_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",
      "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