PUT api/Vehicle
Update a specific vehicle
Request Information
URI Parameters
None.
Body Parameters
Request object
VehiclePutRequest| Name | Description | Type | Additional information |
|---|---|---|---|
| Id |
Vehicle Id to update |
globally unique identifier |
Required |
| LicensePlate |
License plate |
string |
Required Max length: 15 |
| CustomPlate |
Custom plate |
string |
Max length: 15 |
| Make |
Make of the vehicle e.g. Porsce |
string |
Max length: 100 |
| Model |
Model of the vehicle e.g. Boxster |
string |
Max length: 100 |
| YearModel |
Model year e.g. 1996 |
string |
Max length: 20 |
| Odometer |
Odometer on the vehicle, optional if not sent the old value will remain. |
integer |
None. |
| Dimensions |
List of dimensions for the vehicle |
Collection of VehicleDimensionPutRequest |
None. |
Remarks
None.
Example
None.
Request Formats
application/json, text/json
Sample:
{
"Id": "2adb57e0-2e58-413d-bbc7-0d6bf6653f2c",
"LicensePlate": "sample string 2",
"CustomPlate": "sample string 3",
"Make": "sample string 4",
"Model": "sample string 5",
"YearModel": "sample string 6",
"Odometer": 1,
"Dimensions": [
{
"SectionWidth": 1.0,
"AspectRatio": 1.0,
"Diameter": 1.0,
"StandardDimension": true
},
{
"SectionWidth": 1.0,
"AspectRatio": 1.0,
"Diameter": 1.0,
"StandardDimension": true
}
]
}
application/xml, text/xml
Sample:
<VehiclePutRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Vehicle">
<CustomPlate>sample string 3</CustomPlate>
<Dimensions>
<VehicleDimensionPutRequest>
<AspectRatio>1</AspectRatio>
<Diameter>1</Diameter>
<SectionWidth>1</SectionWidth>
<StandardDimension>true</StandardDimension>
</VehicleDimensionPutRequest>
<VehicleDimensionPutRequest>
<AspectRatio>1</AspectRatio>
<Diameter>1</Diameter>
<SectionWidth>1</SectionWidth>
<StandardDimension>true</StandardDimension>
</VehicleDimensionPutRequest>
</Dimensions>
<Id>2adb57e0-2e58-413d-bbc7-0d6bf6653f2c</Id>
<LicensePlate>sample string 2</LicensePlate>
<Make>sample string 4</Make>
<Model>sample string 5</Model>
<Odometer>1</Odometer>
<YearModel>sample string 6</YearModel>
</VehiclePutRequest>
application/x-www-form-urlencoded
Sample:
Response Information
Resource Description
VehiclePutErrorResponse| Name | Description | Type | Additional information |
|---|---|---|---|
| ErrorMessage |
Message |
string |
None. |
| ErrorCode |
Code of the error |
VehiclePutErrorResponseCode |
None. |
Response Formats
application/json, text/json
Sample:
{
"ErrorMessage": "sample string 1",
"ErrorCode": 0
}
application/xml, text/xml
Sample:
<VehiclePutErrorResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Vehicle"> <ErrorCode>VehicleNotFound</ErrorCode> <ErrorMessage>sample string 1</ErrorMessage> </VehiclePutErrorResponse>