Approval Process Integration

Prerequisites

API key - To accesses the API the customer needs an API key. See here for details on how to create an API user.

Getting Locked trips

https://app.ecofleet.com/seeme/Api/Logbook/Trips/search?key=<api_key>=locked&begTime=2018-07-01&endTime=2018-09-01

Getting Approved trips

https://app.ecofleet.com/seeme/Api/Logbook/Trips/search?key=<api_key>=approved&begTime=2018-07-01&endTime=2018-09-01

Response

<nodes>
<status>0</status>
<response>
<node key="0">
<id>81546515</id>
<beginTime>2018-11-21 06:39:19+0100</beginTime>
<endTime>2018-11-21 07:03:13+0100</endTime>
<driverName>Rami Tayih</driverName>
<driverKey/>
<driverEmployeeId>1585</driverEmployeeId>
<vehicleId>106822</vehicleId>
<vehiclePlate>862462039668594</vehiclePlate>
<distance>29.69</distance>
<route>
Gammel Køge Landevej 236, 2650 Hvidovre, Danmark - Universitetsparken, 2100 København
</route>
<note/>
<type>temp</type>
<startLocation>Gammel Køge Landevej 236, 2650 Hvidovre, Danmark</startLocation>
<endLocation>Universitetsparken, 2100 København, Danmark</endLocation>
<approvalStatus>approved</approvalStatus>
<approvalTime>2018-11-21 19:47:13+0100</approvalTime>
<projects>
<node key="0">
<number>1140-797350</number>
<billingType>cost</billingType>
<distance>29.69</distance>
</node>
</projects>
<controllerEmployeeId>7724</controllerEmployeeId>
<d60RuleHit>1</d60RuleHit/>
<lockTime/>
</node>
</response>
</nodes>

d60RuleHit
1. <d60RuleHit>1</d60RuleHit/>: 60 day rule is hit, this trip is not eliagble for tex-free reimbursement
2. </d60RuleHit/>:  60 day rule is not hit 

Locking trips

https://app.ecofleet.com/seeme/Api/Logbook/Trips/lock?key=<api_key>&tripIds=<trip_id>,<trip_id>,<trip_id>

Example:
https://app.ecofleet.com/seeme/Api/Logbook/Trips/lock?key=abc123&tripIds=100,200,300

Rejecting trips

https://app.ecofleet.com/seeme/Api/Logbook/Trips/reject?key=<api_key>&tripid=1&comment=bad project