Update task

Update task

Note that, for active tasks, only notes can be updated, while completed tasks cannot be updated in any way. Further, embedded updates are not currently supported, meaning that if you wish to update an existing task's recipient or destination, you need to handle that before updating the task with the changed entity's ID, if needed.

curl -X PUT "https://onfleet.com/api/v2/tasks/kc8SS1tzuZ~jqjlebKGrUmpe" \
       -u "cd3b3de84cc1ee040bf06512d233719c:" \
       -d '{"notes":"Patxi\'s deep dish meat lover special, 2 bottles of Basque cider","container":{"type":"TEAM","team":"fwflFNVvrK~4t0m5hKFIxBUl"}}'
onfleet.tasks.update(id="kc8SS1tzuZ~jqjlebKGrUmpe", body={"notes":"Patxi\'s deep dish meat lover special, 2 bottles of Basque cider","container":{"type":"TEAM","team":"fwflFNVvrK~4t0m5hKFIxBUl"}})
onfleet.tasks.update("kc8SS1tzuZ~jqjlebKGrUmpe", {"notes":"Patxi\'s deep dish meat lover special, 2 bottles of Basque cider","container":{"type":"TEAM","team":"fwflFNVvrK~4t0m5hKFIxBUl"}});
$onfleet->tasks->update("kc8SS1tzuZ~jqjlebKGrUmpe", ["notes" => "Patxi\'s deep dish meat lover special, 2 bottles of Basque cider","container" => ["type" => "TEAM","team" => "fwflFNVvrK~4t0m5hKFIxBUl"]])
{
  "id": "kc8SS1tzuZ~jqjlebKGrUmpe",
  "timeCreated": 1455156667000,
  "timeLastModified": 1455156668922,
  "organization": "yAM*fDkztrT3gUcz9mNDgNOL",
  "shortId": "8f983639",
  "trackingURL": "https://onf.lt/8f98363993",
  "worker": null,
  "merchant": "yAM*fDkztrT3gUcz9mNDgNOL",
  "executor": "yAM*fDkztrT3gUcz9mNDgNOL",
  "creator": "EJmsbJgHiRLPjNVE7GEIPs7*",
  "dependencies": [],
  "state": 0,
  "completeAfter": 1455151071727,
  "completeBefore": null,
  "pickupTask": false,
  "notes": "Patxi's deep dish meat lover special, 2 bottles of Basque cider",
  "completionDetails": {
    "events": [],
    "time": null
  },
  "feedback": [],
  "metadata": [],
  "overrides": {
    "recipientSkipSMSNotifications": null,
    "recipientNotes": null,
    "recipientName": null
  },
  "container": {
    "type": "TEAM",
    "team": "fwflFNVvrK~4t0m5hKFIxBUl"
  },
  "recipients": [
    {
      "id": "G7rcM2nqblmh8vj2do1FpaOQ",
      "organization": "yAM*fDkztrT3gUcz9mNDgNOL",
      "timeCreated": 1455156667000,
      "timeLastModified": 1455156667229,
      "name": "Blas Silkovich",
      "phone": "+16505554481",
      "notes": "Knows Neiman, VIP status.",
      "skipSMSNotifications": false,
      "metadata": []
    }
  ],
  "destination": {
    "id": "zrVXZi5aDzOZlAghZaLfGAfA",
    "timeCreated": 1455156667000,
    "timeLastModified": 1455156667220,
    "location": [
      -122.4438337,
      37.7940329
    ],
    "address": {
      "apartment": "",
      "state": "California",
      "postalCode": "94123",
      "country": "United States",
      "city": "San Francisco",
      "street": "Vallejo Street",
      "number": "2829"
    },
    "notes": "Small green door by garage door has pin pad, enter *4821*",
    "metadata": []
  }
}