Recipient Overrides

Recipient Overrides

Phone numbers are considered unique identifiers for each recipient, so any changes to the recipient name or recipient notes will be reflected in other instances where that recipient (and associated phone number) is used.

To change the recipient name, notes, and/or SMS settings for a single task, without changing the recipient values themselves, use the optional recipient override parameters instead: recipientName, recipientNotes, and recipientSkipSMSNotifications.

curl -X POST "https://onfleet.com/api/v2/tasks" \
       -u "cd3b3de84cc1ee040bf06512d233719c:" \
       -d '{"destination":{"address":{"unparsed":"2829 Vallejo St, SF, CA, USA"}, "notes":"destinaion notes"},"recipients":[{"name":"Recipient Name","phone":"650-555-4481","notes":"A name added here will update the recipient entry associated with this phone number."}],"recipientName":"Override Name","notes":"Override Name will be displayed on the dashboard and in the app, but not update the recipient in the database."}'
onfleet.tasks.create(body={"destination":{"address":{"unparsed":"2829 Vallejo St, SF, CA, USA"}, "notes":"destinaion notes"},"recipients":[{"name":"Recipient Name","phone":"650-555-4481","notes":"A name added here will update the recipient entry associated with this phone number."}],"recipientName":"Override Name","notes":"Override Name will be displayed on the dashboard and in the app, but not update the recipient in the database."})
onfleet.tasks.create({"destination":{"address":{"unparsed":"2829 Vallejo St, SF, CA, USA"}, "notes":"destinaion notes"},"recipients":[{"name":"Recipient Name","phone":"650-555-4481","notes":"A name added here will update the recipient entry associated with this phone number."}],"recipientName":"Override Name","notes":"Override Name will be displayed on the dashboard and in the app, but not update the recipient in the database."});
$onfleet->tasks->create(["destination" => ["address" => ["unparsed" => "2829 Vallejo St, SF, CA, USA"], "notes" => "destinaion notes"],"recipients" => [["name" => "Recipient Name","phone" => "650-555-4481","notes" => "A name added here will update the recipient entry associated with this phone number."]],"recipientName" => "Override Name","notes" => "Override Name will be displayed on the dashboard and in the app, but not update the recipient in the database."]);
{
    "id": "5cywkiSnntKw0KqdTcqURvL3",
    // ...
    "notes": "Override Name will be displayed on the dashboard and in the app, but not update the recipient in the database.",
    // ...
    "overrides": { // note that this differs from the JSON in the request
        "recipientName": "Override Name",
        "recipientNotes": null,
        "recipientSkipSMSNotifications": null,
        "useMerchantForProxy": null
    },
    // ...
    "recipients": [
        {
            "id": "v7lVeNMHWsDwt*WuzcLmTAbg",
            "timeCreated": 1611068037000,
            "timeLastModified": 1615839055669,
            "name": "Recipient Name",
            "phone": "+16505554481",
            "notes": "A name added here will update the recipient entry associated with this phone number.",
            "organization": "id6a7XAWagLC7iMR0NvW1DFM",
            "skipSMSNotifications": false,
            "metadata": []
        }
    ],
    // ...
}