PUT api/Vehicle

Update a specific vehicle

Request Information

URI Parameters

None.

Body Parameters

Request object

VehiclePutRequest
NameDescriptionTypeAdditional 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

NB!
The current dimensions will be replaced with these dimensions.
To keep the current dimensions as is, don't send anything in this collection.

Collection of VehicleDimensionPutRequest

None.

Remarks

None.

Example

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": "1a2232fb-8963-405c-b2da-14a00be9cdac",
  "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>1a2232fb-8963-405c-b2da-14a00be9cdac</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:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'VehiclePutRequest'.

Response Information

Resource Description

VehiclePutErrorResponse
NameDescriptionTypeAdditional 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>