Update administrator
curl -X PUT "https://onfleet.com/api/v2/admins/8AxaiKwMd~np7I*YP2NfukBE" \
-u "cd3b3de84cc1ee040bf06512d233719c:" \
-d '{"name":"C Manning"}'
onfleet.administrators.update(id="8AxaiKwMd~np7I*YP2NfukBE", body={"name":"C Manning"})
onfleet.administrators.update("8AxaiKwMd~np7I*YP2NfukBE", {"name":"C Manning"});
$onfleet->administrators->update("8AxaiKwMd~np7I*YP2NfukBE", ["name"=>"C Manning"]);
{
"id": "8AxaiKwMd~np7I*YP2NfukBE",
"timeCreated": 1455156651000,
"timeLastModified": 1455156652494,
"organization": "yAM*fDkztrT3gUcz9mNDgNOL",
"email": "[email protected]",
"type": "standard",
"name": "C Manning",
"isActive": false,
"metadata": []
}
{
"code": "InvalidContent",
"message": {
"error": 1005,
"message": "The data types of one or more parameters are invalid.",
"cause": "PuLjIsI8nF1xGU3vRWn2XA~Ta must be of type ObjectId",
"request": "aa7d0676-5f2d-4baa-aa38-4285c2bdb438"
}
}
{
"code": "ResourceNotFound",
"message": {
"error": 1402,
"message": "The requested resource does not exist.",
"request": "a9212a19-73f9-461a-ae76-cfa1da474d4e"
}
}
The adminID
has to be formatted correctly and exist in your organization, otherwise, errors will be thrown.