CloseTrip API
API to close a trip
Clients call this API to close a previously created trip. Either trip_id or feed_unique_id needs to be passed to close a trip. close_date_time should be passed in the UTC timestamp only.
API Endpoint:
https://integration.freighttiger.com/saas/trip/close - Integration/Sandbox Environment
https://www.freighttiger.com/saas/trip/close - Production Environment
Request Parameters:
Name | Type | Location | Description | Example |
---|---|---|---|---|
Authorization | string | headers | JWT token required to authenticate API call. | Authorization: Bearer eyJhbGciOiJIUzI1Ni |
Request Body:
Example value:
{
"trip_id": 512342,
"feed_unique_id": "632642-1564386538-584104",
"close_date_time": "2019-08-12 13:00:00",
"comment": "Trip close comment"
}
Schema:
Either trip_id
or feed_unique_id
is mandatory for closing a trip
{
"trip_id":{
"description":"Trip id of the trip to be closed",
"datatype":"integer",
"example":512342,
"mandatory":true
},
"feed_unique_id":{
"description":"Feed Unique id of the trip to be closed",
"datatype":"string",
"example":"632642-1564386538-584104",
"mandatory":false
},
"close_date_time":{
"description":"date and time on trip closure",
"datatype":"string",
"example":"2019-08-12 13:00:00",
"mandatory":true
},
"comment":{
"description":"trip closure comment",
"datatype":"string",
"example":"Closing trip after speaking to driver",
"mandatory":true
},
Responses:
Status code 200 Trip closed successfully
{
"status": "true",
"response": "Trip having trip_id - 9178849 is now closed."
}
Post your questions in the comment box to get answers from the experts who watch this page.
For engineering support: visit FT Support