This endpoint allows the users to update information related to an existing hub. The hub ID must be appended to the URL to indicate which Hub will be updated.
curl -X PUT "https://onfleet.com/api/v2/hubs/i4FoP*dTVrdnGqvIVvvA69aB" \
-u "cd3b3de84cc1ee040bf06512d233719c:" \
-d '{"name": "VIP customer Hub","address": {"apartment": "","state": "California","postalCode": "90015","number": "1111","street": "South Figueroa Street","city": "Los Angeles","country": "United States","name": "VIP customer"},"teams": ["kq5MFBzYNWhp1rumJEfGUTqS"]}'
onfleet.hubs.update("id": "i4FoP*dTVrdnGqvIVvvA69aB",body={"name": "VIP customer Hub","address": {"apartment": "","state": "California","postalCode": "90015","number": "1111","street": "South Figueroa Street","city": "Los Angeles","country": "United States","name": "VIP customer"},"teams": ["kq5MFBzYNWhp1rumJEfGUTqS"]})
onfleet.hubs.update("i4FoP*dTVrdnGqvIVvvA69aB",{"name": "VIP customer Hub","address": {"apartment": "","state": "California","postalCode": "90015","number": "1111","street": "South Figueroa Street","city": "Los Angeles","country": "United States","name": "VIP customer"},"teams": ["kq5MFBzYNWhp1rumJEfGUTqS"]});
$onfleet->hubs->update("i4FoP*dTVrdnGqvIVvvA69aB",["name" => "VIP customer Hub","address" => ["apartment" => "","state" => "California","postalCode" => "90015","number" => "1111","street" => "South Figueroa Street","city" => "Los Angeles","country" => "United States","name" => "VIP customer"],"teams" => ["kq5MFBzYNWhp1rumJEfGUTqS"]])
{
"id": "i4FoP*dTVrdnGqvIVvvA69aB",
"name": "VIP customer Hub",
"location": [
-118.2673597,
34.0430058
],
"address": {
"number": "1111",
"street": "South Figueroa Street",
"city": "Los Angeles",
"county": "Los Angeles County",
"state": "California",
"country": "United States",
"postalCode": "90015",
"name": "VIP customer",
"apartment": ""
},
"teams": [
"kq5MFBzYNWhp1rumJEfGUTqS"
]
}