POST api/Vehicle

Request Information

URI Parameters

None.

Body Parameters

Vehicle
NameDescriptionTypeAdditional information
VehicleId

integer

None.

Name

string

None.

PracticeId

integer

None.

Registration

string

None.

Type

string

None.

Request Formats

application/json, text/json

Sample:
{
  "VehicleId": 1,
  "Name": "sample string 2",
  "PracticeId": 1,
  "Registration": "sample string 3",
  "Type": "sample string 4"
}

text/html

Sample:
{"VehicleId":1,"Name":"sample string 2","PracticeId":1,"Registration":"sample string 3","Type":"sample string 4"}

application/xml, text/xml

Sample:
<Vehicle xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/FleetAPI.DataModel">
  <Name>sample string 2</Name>
  <PracticeId>1</PracticeId>
  <Registration>sample string 3</Registration>
  <Type>sample string 4</Type>
  <VehicleId>1</VehicleId>
</Vehicle>

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 'Vehicle'.

Response Information

Resource Description

Vehicle
NameDescriptionTypeAdditional information
VehicleId

integer

None.

Name

string

None.

PracticeId

integer

None.

Registration

string

None.

Type

string

None.

Response Formats

application/json, text/json

Sample:
{
  "VehicleId": 1,
  "Name": "sample string 2",
  "PracticeId": 1,
  "Registration": "sample string 3",
  "Type": "sample string 4"
}

text/html

Sample:
{"VehicleId":1,"Name":"sample string 2","PracticeId":1,"Registration":"sample string 3","Type":"sample string 4"}

application/xml, text/xml

Sample:
<Vehicle xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/FleetAPI.DataModel">
  <Name>sample string 2</Name>
  <PracticeId>1</PracticeId>
  <Registration>sample string 3</Registration>
  <Type>sample string 4</Type>
  <VehicleId>1</VehicleId>
</Vehicle>