POST api/Vehicles

Request Information

URI Parameters

None.

Body Parameters

VehicleDTO
NameDescriptionTypeAdditional information
VehicleRid

integer

None.

CrewTypeRid

integer

None.

FleetNo

string

None.

RegNo

string

None.

Callsign

string

None.

Hired

boolean

None.

PurchaseDate

date

None.

RetireDate

date

None.

CurrentLocationId

integer

None.

ExternalId

string

None.

Request Formats

application/json, text/json

Sample:
{
  "VehicleRid": 1,
  "CrewTypeRid": 2,
  "FleetNo": "sample string 3",
  "RegNo": "sample string 4",
  "Callsign": "sample string 5",
  "Hired": true,
  "PurchaseDate": "2026-09-28T18:26:28.0515326+01:00",
  "RetireDate": "2026-09-28T18:26:28.0515326+01:00",
  "CurrentLocationId": 9,
  "ExternalId": "sample string 10"
}

application/xml, text/xml

Sample:
<VehicleDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LegacyApi">
  <Callsign>sample string 5</Callsign>
  <CrewTypeRid>2</CrewTypeRid>
  <CurrentLocationId>9</CurrentLocationId>
  <ExternalId>sample string 10</ExternalId>
  <FleetNo>sample string 3</FleetNo>
  <Hired>true</Hired>
  <PurchaseDate>2026-09-28T18:26:28.0515326+01:00</PurchaseDate>
  <RegNo>sample string 4</RegNo>
  <RetireDate>2026-09-28T18:26:28.0515326+01:00</RetireDate>
  <VehicleRid>1</VehicleRid>
</VehicleDTO>

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

Response Information

Resource Description

Object

None.

Response Formats

application/json, text/json

Sample:
{}

application/xml, text/xml

Sample:
<z:anyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />