POST api/Obd/SingleTravel

Individual travel details [car]

Request Information

Body Parameters

SingTravelModel
NameDescriptionTypeAdditional information
TravelId

journey ID

integer

None.

Start

One day starting time UTC

date

None.

End

One day ending time UTC

date

None.

DeviceId

device id

integer

None.

MapType

map style

string

None.

MaxCount

Maximum number

integer

None.

UserId

integer

None.

Token

Get it after logging in Token

string

None.

Language

Language Option

string

None.

AppId

APP Application Identifier

string

None.

Request Formats

application/json, text/json

Sample:
{
  "TravelId": 1,
  "Start": "2018-10-19T14:41:38.450296+08:00",
  "End": "2018-10-19T14:41:38.450296+08:00",
  "DeviceId": 4,
  "MapType": "sample string 5",
  "MaxCount": 6,
  "UserId": 7,
  "Token": "sample string 8",
  "Language": "sample string 9",
  "AppId": "sample string 10"
}

application/xml, text/xml

Sample:
<SingTravelModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ParModel">
  <AppId>sample string 10</AppId>
  <Language>sample string 9</Language>
  <Token>sample string 8</Token>
  <DeviceId>4</DeviceId>
  <End>2018-10-19T14:41:38.450296+08:00</End>
  <MapType>sample string 5</MapType>
  <MaxCount>6</MaxCount>
  <Start>2018-10-19T14:41:38.450296+08:00</Start>
  <TravelId>1</TravelId>
  <UserId>7</UserId>
</SingTravelModel>

Response Information

Resource Description

State status
0. Indicates success
100. indicates no data
1100. indicates device does not exist
4000. Says failure

SingleTravelResult
NameDescriptionTypeAdditional information
TravelOilData

Details of individual trip fuel consumption

OilData

None.

DabAction

misconduct data

BadDriveAction

None.

TravelInfo

Journey data

SingleTravelInfo

None.

ExceptionMessageItems

ExceptionMessageCount

None.

TravelTrack

Travel path

Track

None.

Star

integer

None.

Score

integer

None.

State

status code

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "TravelOilData": {
    "AvgOil": 1.0,
    "AvgSpeed": 2.0,
    "TotalOil": 3.0,
    "DetailItems": [
      {
        "Speed": 1.0,
        "Oil": 2.0,
        "Time": "sample string 3"
      },
      {
        "Speed": 1.0,
        "Oil": 2.0,
        "Time": "sample string 3"
      }
    ]
  },
  "DabAction": {
    "FastAccelerate": 1,
    "UrgentRefueling": 2,
    "FastLaneChanging": 3,
    "FastCornering": 4,
    "FastSpeedUp": 5,
    "TotalBadAction": 15
  },
  "TravelInfo": {
    "TotalDistance": 1.0,
    "TotalTime": 2.0,
    "LowDistance": 3.0,
    "LowTime": 4.0,
    "LowSpeedingOil": 5.0,
    "HighDistance": 6.0,
    "HighTime": 7.0,
    "HighSpeedingOil": 8.0,
    "MiddleDistance": 9.0,
    "MiddleTime": 10.0,
    "MediumSpeedingOil": 11.0,
    "SpeedingDistance": 12.0,
    "SpeedingTime": 13.0,
    "SpeedingOil": 14.0,
    "IdlingDistance": 15.0,
    "IdlingTime": 16.0,
    "IdlingOil": 17.0
  },
  "ExceptionMessageItems": {
    "shock": 1,
    "PullOut": 2,
    "trailer": 3,
    "FatigueDriving": 4,
    "Battery": 5,
    "GPS": 6,
    "Coolant": 7,
    "Rapid": 8,
    "Come": 9,
    "RapidLaneChange": 10,
    "SharpTurn": 11,
    "SlamTheBrakesOn": 12,
    "Speeding": 13,
    "idling": 14
  },
  "TravelTrack": {
    "Items": [
      {
        "Address": "sample string 1",
        "Lng": 2.0,
        "Lat": 3.0,
        "OLng": 4.0,
        "OLat": 5.0
      },
      {
        "Address": "sample string 1",
        "Lng": 2.0,
        "Lat": 3.0,
        "OLng": 4.0,
        "OLat": 5.0
      }
    ]
  },
  "Star": 1,
  "Score": 2,
  "State": 3
}

application/xml, text/xml

Sample:
<SingleTravelResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ResModel">
  <State>3</State>
  <DabAction xmlns:d2p1="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ViewModel">
    <d2p1:FastAccelerate>1</d2p1:FastAccelerate>
    <d2p1:FastCornering>4</d2p1:FastCornering>
    <d2p1:FastLaneChanging>3</d2p1:FastLaneChanging>
    <d2p1:FastSpeedUp>5</d2p1:FastSpeedUp>
    <d2p1:UrgentRefueling>2</d2p1:UrgentRefueling>
  </DabAction>
  <ExceptionMessageItems>
    <Battery>5</Battery>
    <Come>9</Come>
    <Coolant>7</Coolant>
    <FatigueDriving>4</FatigueDriving>
    <GPS>6</GPS>
    <PullOut>2</PullOut>
    <Rapid>8</Rapid>
    <RapidLaneChange>10</RapidLaneChange>
    <SharpTurn>11</SharpTurn>
    <SlamTheBrakesOn>12</SlamTheBrakesOn>
    <Speeding>13</Speeding>
    <idling>14</idling>
    <shock>1</shock>
    <trailer>3</trailer>
  </ExceptionMessageItems>
  <Score>2</Score>
  <Star>1</Star>
  <TravelInfo xmlns:d2p1="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ViewModel">
    <d2p1:HighDistance>6</d2p1:HighDistance>
    <d2p1:HighSpeedingOil>8</d2p1:HighSpeedingOil>
    <d2p1:HighTime>7</d2p1:HighTime>
    <d2p1:IdlingDistance>15</d2p1:IdlingDistance>
    <d2p1:IdlingOil>17</d2p1:IdlingOil>
    <d2p1:IdlingTime>16</d2p1:IdlingTime>
    <d2p1:LowDistance>3</d2p1:LowDistance>
    <d2p1:LowSpeedingOil>5</d2p1:LowSpeedingOil>
    <d2p1:LowTime>4</d2p1:LowTime>
    <d2p1:MediumSpeedingOil>11</d2p1:MediumSpeedingOil>
    <d2p1:MiddleDistance>9</d2p1:MiddleDistance>
    <d2p1:MiddleTime>10</d2p1:MiddleTime>
    <d2p1:SpeedingDistance>12</d2p1:SpeedingDistance>
    <d2p1:SpeedingOil>14</d2p1:SpeedingOil>
    <d2p1:SpeedingTime>13</d2p1:SpeedingTime>
    <d2p1:TotalDistance>1</d2p1:TotalDistance>
    <d2p1:TotalTime>2</d2p1:TotalTime>
  </TravelInfo>
  <TravelOilData xmlns:d2p1="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ViewModel">
    <d2p1:AvgOil>1</d2p1:AvgOil>
    <d2p1:AvgSpeed>2</d2p1:AvgSpeed>
    <d2p1:DetailItems>
      <d2p1:OilDetail>
        <d2p1:Oil>2</d2p1:Oil>
        <d2p1:Speed>1</d2p1:Speed>
        <d2p1:Time>sample string 3</d2p1:Time>
      </d2p1:OilDetail>
      <d2p1:OilDetail>
        <d2p1:Oil>2</d2p1:Oil>
        <d2p1:Speed>1</d2p1:Speed>
        <d2p1:Time>sample string 3</d2p1:Time>
      </d2p1:OilDetail>
    </d2p1:DetailItems>
    <d2p1:TotalOil>3</d2p1:TotalOil>
  </TravelOilData>
  <TravelTrack xmlns:d2p1="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ViewModel">
    <d2p1:Items>
      <d2p1:TrackPoint>
        <d2p1:Address>sample string 1</d2p1:Address>
        <d2p1:Lat>3</d2p1:Lat>
        <d2p1:Lng>2</d2p1:Lng>
        <d2p1:OLat>5</d2p1:OLat>
        <d2p1:OLng>4</d2p1:OLng>
      </d2p1:TrackPoint>
      <d2p1:TrackPoint>
        <d2p1:Address>sample string 1</d2p1:Address>
        <d2p1:Lat>3</d2p1:Lat>
        <d2p1:Lng>2</d2p1:Lng>
        <d2p1:OLat>5</d2p1:OLat>
        <d2p1:OLng>4</d2p1:OLng>
      </d2p1:TrackPoint>
    </d2p1:Items>
  </TravelTrack>
</SingleTravelResult>