2.2 Update Unit
Updated at: 4/12/2023 2:58:56 AM
Url
/api/v2/{fleet_token}/contractors/{contractor_id}/units/update/{id}
Method
Post
Body
```json
{
"EffectiveDate": "<date:yyyy-MM-dd>",
"Unit":
{
"ID": "<id:int>"
"UnitNumber": "",
"Year": "",
"Make": "",
"Vin": "",
"StatedValue": 0,
"EquipmentType": "",
"Model": "",
"RegistrationState": "<state>",
"Ownership": "<ownership>",
"CustomFields":
{
"CustomField1": "",
"CustomField2": ""
}
}
}
```
Parameters
- `EffectiveDate` Required.
- `Unit` Required.
Response
```JSON
{
"Success": "<true|false>",
"Message": "<message>",
"Data":
{
"ID": "",
"UnitNumber": "",
"Year": "",
"Make": "",
"Vin": "",
"StatedValue": "",
"EquipmentType": "",
"Model": "",
"RegistrationState": "<state>",
"Ownership": "<ownership>"
}
}
```
Returns
- The updated unit is returned in the response.
Notes
- The request would fail if it fails to locate the fleet by `fleet_token`.
- Any unit field that is not listed in the request body will remain unchanged.
In this article