v1

latestOpenAPI 3.1.02026-07-2617501.1 MB

Update a dispatch (v3)

put/v3/dispatches

Request body

idinteger required

Specify the ID of the dispatch that you want to update. NOTE: You must provide either the dispatch ID or the vendor_id in order to update the dispatch.

vendor_idinteger required

Specify the ID of the vendor for which you want to update the dispatch info. NOTE: You must provide either the dispatch ID or the vendor ID in order to update the dispatch.

statusstring required

Specify the status of the dispatch that you want to update. Allowed values are: active, completed, cancelled.

Response

200

Example response

{
  "dispatch": {
    "id": 16533,
    "status": "planned",
    "status_updated_at": "2023-03-24T10:47:25Z",
    "auto_complete_forms": true,
    "vendor_id": "VV-1",
    "dispatch_stops": [
      {
        "dispatch_stop": {
          "id": 27600,
          "dispatch_location_id": 8197,
          "early_date": "2023-03-13T19:13:00+00:00",
          "form_ids": [
            "1ee148ac-6083-4b5a-af7b-75b875bb233f"
          ],
          "late_date": "2023-03-15T19:13:00+00:00",
          "number": 1,
          "status": "available",
          "type": "pickup",
          "dispatch_trip_id": 10235,
          "vendor_id": "VDS-1",
          "vendor_dispatch_location_id": "VDSL-1"
        }
      }
    ],
    "dispatch_trips": [
      {
        "dispatch_trip": {
          "id": 10235,
          "status": "not_started",
          "vendor_id": "VT-1",
          "driver_id": 1088505,
          "vehicle_id": 64734
        }
      }
    ]
  }
}