POST api/Trip/CreateTrips

Request Information

URI Parameters

None.

Body Parameters

Collection of TripModel
NameDescriptionTypeAdditional information
tripId

integer

None.

createdBy

integer

None.

creationDate

date

None.

startDateTime

date

None.

endDateTime

date

None.

startKilometers

decimal number

None.

endKilometers

decimal number

None.

totalFuelInLiters

decimal number

None.

totalFuelInAmount

decimal number

None.

driver

string

None.

tripRoute

string

None.

Request Formats

application/json, text/json

Sample:
[
  {
    "tripId": 1,
    "createdBy": 1,
    "creationDate": "2026-05-20T11:45:13.6242006+05:30",
    "startDateTime": "2026-05-20T11:45:13.6251902+05:30",
    "endDateTime": "2026-05-20T11:45:13.6251902+05:30",
    "startKilometers": 1.1,
    "endKilometers": 1.1,
    "totalFuelInLiters": 1.1,
    "totalFuelInAmount": 1.1,
    "driver": "sample string 2",
    "tripRoute": "sample string 3"
  },
  {
    "tripId": 1,
    "createdBy": 1,
    "creationDate": "2026-05-20T11:45:13.6242006+05:30",
    "startDateTime": "2026-05-20T11:45:13.6251902+05:30",
    "endDateTime": "2026-05-20T11:45:13.6251902+05:30",
    "startKilometers": 1.1,
    "endKilometers": 1.1,
    "totalFuelInLiters": 1.1,
    "totalFuelInAmount": 1.1,
    "driver": "sample string 2",
    "tripRoute": "sample string 3"
  }
]

application/xml, text/xml

Sample:
<ArrayOfTripModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SGWebApi.Models">
  <TripModel>
    <createdBy>1</createdBy>
    <creationDate>2026-05-20T11:45:13.6242006+05:30</creationDate>
    <driver>sample string 2</driver>
    <endDateTime>2026-05-20T11:45:13.6251902+05:30</endDateTime>
    <endKilometers>1.1</endKilometers>
    <startDateTime>2026-05-20T11:45:13.6251902+05:30</startDateTime>
    <startKilometers>1.1</startKilometers>
    <totalFuelInAmount>1.1</totalFuelInAmount>
    <totalFuelInLiters>1.1</totalFuelInLiters>
    <tripId>1</tripId>
    <tripRoute>sample string 3</tripRoute>
  </TripModel>
  <TripModel>
    <createdBy>1</createdBy>
    <creationDate>2026-05-20T11:45:13.6242006+05:30</creationDate>
    <driver>sample string 2</driver>
    <endDateTime>2026-05-20T11:45:13.6251902+05:30</endDateTime>
    <endKilometers>1.1</endKilometers>
    <startDateTime>2026-05-20T11:45:13.6251902+05:30</startDateTime>
    <startKilometers>1.1</startKilometers>
    <totalFuelInAmount>1.1</totalFuelInAmount>
    <totalFuelInLiters>1.1</totalFuelInLiters>
    <tripId>1</tripId>
    <tripRoute>sample string 3</tripRoute>
  </TripModel>
</ArrayOfTripModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

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

Sample:

Sample not available.