POST api/travel/day/vehicletype

Creates a new vehicle type or updates an existing one. If the vehicle type ID exists, it will be updated; otherwise, a new vehicle type will be created.

Request Information

URI Parameters

None.

Body Parameters

The VehicleType object containing the vehicle type information to create or update. Sent in the request body as JSON.

VehicleType
NameDescriptionTypeAdditional information
DefinitionEntityID

integer

None.

DefinitionID

integer

None.

ID

integer

None.

TypeID

integer

None.

Name

string

None.

Code

string

None.

Capacity

integer

None.

Description

string

None.

Active

boolean

None.

SortOrder

integer

None.

UpdatedBy

string

None.

UpdatedDateAsString

string

None.

Request Formats

application/json, text/json

Sample:
{
  "DefinitionEntityID": 1,
  "DefinitionID": 4,
  "ID": 4,
  "TypeID": 4,
  "Name": "sample string 5",
  "Code": "sample string 6",
  "Capacity": 7,
  "Description": "sample string 8",
  "Active": true,
  "SortOrder": 10,
  "UpdatedBy": "sample string 11",
  "UpdatedDateAsString": "2026-09-08T15:27:57"
}

application/javascript

Sample:
{"DefinitionEntityID":1,"DefinitionID":4,"ID":4,"TypeID":4,"Name":"sample string 5","Code":"sample string 6","Capacity":7,"Description":"sample string 8","Active":true,"SortOrder":10,"UpdatedBy":"sample string 11","UpdatedDateAsString":"2026-09-08T15:27:57"}

application/xml, text/xml

Sample:
<VehicleType xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <DefinitionEntityID>1</DefinitionEntityID>
  <DefinitionID>4</DefinitionID>
  <ID>4</ID>
  <TypeID>4</TypeID>
  <Name>sample string 5</Name>
  <Code>sample string 6</Code>
  <Capacity>7</Capacity>
  <Description>sample string 8</Description>
  <Active>true</Active>
  <SortOrder>10</SortOrder>
  <UpdatedBy>sample string 11</UpdatedBy>
  <UpdatedDateAsString>2026-09-08T15:27:57</UpdatedDateAsString>
  <Updated>2026-09-08T15:27:57</Updated>
</VehicleType>

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

Response Information

Resource Description

Returns HTTP 200 (OK) with the created or updated VehicleType object

VehicleType
NameDescriptionTypeAdditional information
DefinitionEntityID

integer

None.

DefinitionID

integer

None.

ID

integer

None.

TypeID

integer

None.

Name

string

None.

Code

string

None.

Capacity

integer

None.

Description

string

None.

Active

boolean

None.

SortOrder

integer

None.

UpdatedBy

string

None.

UpdatedDateAsString

string

None.

Response Formats

application/json, text/json

Sample:
{
  "DefinitionEntityID": 1,
  "DefinitionID": 4,
  "ID": 4,
  "TypeID": 4,
  "Name": "sample string 5",
  "Code": "sample string 6",
  "Capacity": 7,
  "Description": "sample string 8",
  "Active": true,
  "SortOrder": 10,
  "UpdatedBy": "sample string 11",
  "UpdatedDateAsString": "2026-09-08T15:27:57"
}

application/javascript

Sample:
{"DefinitionEntityID":1,"DefinitionID":4,"ID":4,"TypeID":4,"Name":"sample string 5","Code":"sample string 6","Capacity":7,"Description":"sample string 8","Active":true,"SortOrder":10,"UpdatedBy":"sample string 11","UpdatedDateAsString":"2026-09-08T15:27:57"}

application/xml, text/xml

Sample:
<VehicleType xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <DefinitionEntityID>1</DefinitionEntityID>
  <DefinitionID>4</DefinitionID>
  <ID>4</ID>
  <TypeID>4</TypeID>
  <Name>sample string 5</Name>
  <Code>sample string 6</Code>
  <Capacity>7</Capacity>
  <Description>sample string 8</Description>
  <Active>true</Active>
  <SortOrder>10</SortOrder>
  <UpdatedBy>sample string 11</UpdatedBy>
  <UpdatedDateAsString>2026-09-08T15:27:57</UpdatedDateAsString>
  <Updated>2026-09-08T15:27:57</Updated>
</VehicleType>