POST api/Vehicles/Insert

Request Information

URI Parameters

None.

Body Parameters

VehicleDtoIn
NameDescriptionTypeAdditional information
VehicleId

integer

None.

Registration

string

Max length: 20

Name

string

Max length: 30

DriverId

integer

None.

CurrentRouteId

integer

None.

CellPhone

string

Max length: 10

VehicleType

integer

None.

StockingPointId

integer

None.

Status

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "vehicleId": 1,
  "registration": "sample string 2",
  "name": "sample string 3",
  "driverId": 1,
  "currentRouteId": 1,
  "cellPhone": "sample string 4",
  "vehicleType": 5,
  "stockingPointId": 6,
  "status": 7
}

text/html

Sample:
{"vehicleId":1,"registration":"sample string 2","name":"sample string 3","driverId":1,"currentRouteId":1,"cellPhone":"sample string 4","vehicleType":5,"stockingPointId":6,"status":7}

application/xml, text/xml

Sample:
<VehicleDtoIn xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DeliveryTrackingSystem.Common.Dtos.Dto.Vehicles">
  <CellPhone>sample string 4</CellPhone>
  <CurrentRouteId>1</CurrentRouteId>
  <DriverId>1</DriverId>
  <Name>sample string 3</Name>
  <Registration>sample string 2</Registration>
  <Status>7</Status>
  <StockingPointId>6</StockingPointId>
  <VehicleId>1</VehicleId>
  <VehicleType>5</VehicleType>
</VehicleDtoIn>

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

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, text/html, application/xml, text/xml

Sample:

Sample not available.