Traqo - Trip Based Tracking APIs

Endpoints


1. Fetch Trip Location History

Whole location updates against any particular trip can be fetched via this API

Endpoint:

Method: POST
Type: RAW
URL: https://dashboard.traqo.in/api/v4/trip/fetch_route_history/

Body:

{
    "id":"70221"
}

More example Requests/Responses:

I. Example Request: Fetch Trip Location History

Body:

{
    "id":"70221"
}

I. Example Response: Fetch Trip Location History

{
    "locations": {
        "0": {
            "latitude": 20.06542,
            "longitude": 74.124672,
            "place": "Niphad, Nashik, Maharashtra, 422230, India",
            "time_recorded": "22-10-2022 12:14:02"
        },
        "1": {
            "latitude": 20.100399,
            "longitude": 74.22408,
            "place": "SH 30, Vinchur, Niphad, Nashik, Maharashtra, 422305, India",
            "time_recorded": "22-10-2022 16:07:13"
        },
        "2": {
            "latitude": 20.054138,
            "longitude": 74.35424,
            "place": "State Highway 30, Yevla, Nashik, Maharashtra, 422305, India",
            "time_recorded": "22-10-2022 16:28:05"
        },
        "3": {
            "latitude": 20.0411015,
            "longitude": 74.48386500000001,
            "place": "State Highway 30, Yeola, Yevla, Nashik, Maharashtra, 423400, India",
            "time_recorded": "22-10-2022 16:43:16"
        },
        "4": {
            "latitude": 20.003473,
            "longitude": 74.5932,
            "place": "NH752H, Yevla, Nashik, Maharashtra, 423402, India",
            "time_recorded": "22-10-2022 17:19:04"
        }
    }
}

Status Code: 200


2. End Trip

This endpoint is used to end or close a trip .

Body Parameters

Parameter Mandatory Description
id Yes Trip id received in response of submit trip API

OUTPUT

Invalid user credentials

{
    "errors": "Invalid username/password."
}

Missing mandatory param (e.g. id)


{
    "status": "true",
    "error": "'id'"
}

Endpoint:

Method: POST
Type: RAW
URL: https://dashboard.traqo.in/api/v3/trip/end/

Body:

{
    "id":"dd6ddcc8-7f26-4f0f-a65f-3ac79d51732a"
}

More example Requests/Responses:

I. Example Request: Success End Trip

Body:

{
    "id":"dd6ddcc8-7f26-4f0f-a65f-3ac79d51732a"
}

I. Example Response: Success End Trip

{
    "status": "success"
}

Status Code: 200


3. Fetch a Trip

This endpoint is for fetching a trip

Body Parameters

Notes

  • Atleast one of the below three parameters should be passed
Parameter Mandatory Description
invoice No invoice received in response of submit trip API
trip_id No trip_id received in response of submit trip API
lr_number No lr_number received in response of submit trip API

OUTPUT

Invalid user credentials

{
    "errors": "Invalid username/password."
}

Endpoint:

Method: GET
Type: RAW
URL: https://dashboard.traqo.in/api/v4/trip/fetch/

Body:

{
    "id":"TN-46196"
}

More example Requests/Responses:

I. Example Request: Fetch a Trip

Body:

{
    "id":"TN-46196"
}

I. Example Response: Fetch a Trip

{
    "trips": {
        "0": {
            "trip_id": "TN-46196",
            "truck_number": "AP21TXXX",
            "start_time": "2022-06-15 06:57:21.308402",
            "tel": 62814XXXXX,
            "consent_status":"Pending",
            "invoice": "78",
            "lr_number": "",
            "origin": {
                "loc": [
                    13.2592509,
                    80.3374064
                ]
            },
            "destination": {
                "loc": [
                    20.9270333,
                    78.9507517
                ]
            },
            "last_loc": {
                "loc": [
                    21.019066666666667,
                    79.0315675
                ],
                "time": "2022-06-17 01:58:40",
                "address": "Nagpur Ankit Ashokrao Bhurane, Plot No. 4 Maharashtra 441108, India",
                "distance_remained": null
            },
            "eta": "0",
            "trip_status": "completed",
            "origin_in": "15-Jun 07:40:08",
            "origin_out": "15-Jun 11:45:48",
            "destination_in": "",
            "destination_out": "",
            "total_halt_time": "22 Hr",
            "halts": [
                {
                    "place_name": "Unnamed Road, Puzhuthivakkam, Tamil Nadu 600120, India",
                    "start_time": "15-Jun 07:25:05",
                    "leaving_time": "15-Jun 11:38:09",
                    "latitude": 13.269241944444445,
                    "longitude": 80.33140888888889,
                    "km": 1.3
                },
                {
                    "place_name": "Near Sholavaram P.S. Bus Stop, Chozhavaram Nagar, Alinjivakkam, Ponneri, Tamil Nadu",
                    "start_time": "15-Jun 12:10:10",
                    "leaving_time": "15-Jun 13:14:06",
                    "latitude": 13.22643388888889,
                    "longitude": 80.16386750000001,
                    "km": 18.8
                },
                {
                    "place_name": "in Nancharamma Colony, Vedayapalem, Nellore, Andhra Pradesh",
                    "start_time": "15-Jun 17:16:38",
                    "leaving_time": "15-Jun 18:24:37",
                    "latitude": 14.3951475,
                    "longitude": 79.94175916666667,
                    "km": 132.2
                },
                {
                    "place_name": "RXFV+49 Sambasivapuram, Andhra Pradesh, India",
                    "start_time": "15-Jun 19:42:51",
                    "leaving_time": "15-Jun 22:14:37",
                    "latitude": 14.826811666666666,
                    "longitude": 79.99166972222223,
                    "km": 48.3
                },
                {
                    "place_name": "Ramnagar 10th lane ( 2nd cross H.no- 6-62, Ongole, Andhra Pradesh 523001, India",
                    "start_time": "16-Jun 00:07:34",
                    "leaving_time": "16-Jun 10:36:36",
                    "latitude": 15.484135277777776,
                    "longitude": 80.06082777777777,
                    "km": 73.5
                },
                {
                    "place_name": "NH 44, Telangana 503164, India",
                    "start_time": "16-Jun 14:13:32",
                    "leaving_time": "16-Jun 16:35:36",
                    "latitude": 18.582290277777776,
                    "longitude": 78.22441583333334,
                    "km": 396.1
                }
            ]
        }
    },
    "status": "success"
}

Status Code: 200


4. Fetch all trips

This endpoint is for fetching all trips between specific start and end dates ( passed in json body ).

The response of it also contains total halt time and halt locations, please check example for more information.

Json Body Parameters

Notes

  • By default last 30 days of trips are visible if below params not passed.

ParameterMandatoryDescription
sdateNostarting date for trip creation timestamp in dd-mm-yyyy format
edateNoending date for trip creation timestamp in dd-mm-yyyy format
usernameNoPhone number of subuser (if using organization in dashboard)
Passing this parameter will restrict trips list corresponding to that user only
***Endpoint:***
Method: GET
Type: RAW
URL: https://dashboard.traqo.in/api/v4/trips/fetch/
***Body:***
{
    "sdate":"07-06-2022",
    "edate":"08-06-2022"
}
***More example Requests/Responses:*** #### I. Example Request: Fetch all trips ***Body:***
{
    "sdate":"07-06-2022",
    "edate":"08-06-2022"
}
#### I. Example Response: Fetch all trips
{
    "status": "success",
    "tot_trips": 2,
    "tot_consent_pending": 1,
    "trips": [
        {
            "trip_id":"5c68608a-6575-4b03-bf57-9a050a7ca",
            "truck_number": "CG04MCXXXX",
            "start_time": "2022-06-07 22:09:56.783138",
            "tel": 881745XXX,
            "consent_status":"Pending",
            "invoice": "72",
            "lr_number": "",
            "is_completed": false,
            "distance_travel": "35 KM",
            "total_idstance": "39 KM",
            "origin": {
                "loc": [
                    17.621462,
                    83.229793
                ]
            },
            "destination": {
                "loc": [
                    21.6287621,
                    82.1143269
                ]
            },
            "last_loc": {
                "loc": [
                    19.63997138888889,
                    83.48257527777778
                ],
                "time": "2022-06-09 06:03:06",
                "address": "JFPH+9M Jumuruguda, Odisha, India",
                "distance_remained": null
            },
            "eta": "0",
            "trip_status": "running",
            "origin_in": "08-Jun 18:56:24",
            "origin_out": "08-Jun 20:35:59",
            "destination_in": "",
            "destination_out": "",
            "total_halt_time": "18 Hr",
            "halts": [
                 {
                    "place_name": "Unnamed Road, Visakhapatnam Airport, Visakhapatnam, Andhra Pradesh 530012, India",
                    "start_time": "07-Jun 00:11:36",
                    "leaving_time": "08-Jun 12:54:29",
                    "latitude": 17.665039166666666,
                    "longitude": 83.19888361111111,
                    "km": 1.3
                },
                {
                    "place_name": "Vizag - Srikakulam Hwy, Kambalakonda Eco Tourism Park, Visakhapatnam, Andhra Pradesh 530045, India",
                    "start_time": "08-Jun 14:36:09",
                    "leaving_time": "08-Jun 15:46:32",
                    "latitude": 17.77135138888889,
                    "longitude": 83.34707027777777,
                    "km": 12
                },
                {
                    "place_name": "Unnamed Road, Vindhyavasi, Andhra Pradesh 535580, India",
                    "start_time": "08-Jun 18:01:34",
                    "leaving_time": "08-Jun 20:30:36",
                    "latitude": 18.364698888888892,
                    "longitude": 83.35799222222222,
                    "km": 23.8
                },
                {
                    "place_name": "in BahinipatiKerada, Seskhal, Rayagada, Odisha",
                    "start_time": "08-Jun 22:04:33",
                    "leaving_time": "09-Jun 00:14:22",
                    "latitude": 18.965030833333334,
                    "longitude": 83.43783611111111,
                    "km":15.2
                }
            ]
        },
        {
            "trip_id":"11139682-aa30-4152-9388-7af5db1a8",
            "truck_number": "CG04MXXXXX",
            "start_time": "2022-06-07 21:48:48.358026",
            "tel": 78282XXXXX,
            "invoice": "71",
            "consent_status":"Allowed",
            "lr_number": "",
            "is_completed": false,
            "distance_travel": "15 KM",
            "total_idstance": "29 KM",
            "origin": {
                "loc": [
                    17.621462,
                    83.229793
                ]
            },
            "destination": {
                "loc": [
                    21.6287621,
                    82.1143269
                ]
            },
            "last_loc": {
                "loc": [
                    null,
                    null
                ],
                "time": "2022-06-07 21:48:47.707258",
                "address": "None",
                "distance_remained": null
            },
            "eta": "0",
            "trip_status": "running",
            "origin_in": "",
            "origin_out": "",
            "destination_in": "",
            "destination_out": "",
            "total_halt_time": "",
            "halts": []
        }
    ]
}
***Status Code:*** 200
### 5. Trip's Current Status

You can use this endpoint to fetch the details of a trip which also includes the last known location.

Body Parameters

Notes

  • Atleast one of the below three parameters should be passed
Parameter Mandatory Description
invoice No invoice received in response of submit trip API
id No trip_id received in response of submit trip API
lr_number No lr_number received in response of submit trip API

OUTPUT

Invalid user credentials

{
    "errors": "Invalid username/password."
}

Endpoint:

Method: GET
Type: RAW
URL: https://dashboard.traqo.in/api/v3/trip/info/

Body:

{
    "invoice":"ABC2323F"
}

More example Requests/Responses:

I. Example Request: Trip's Current Status

Body:

{
    "invoice":"ABC2323F"
}

I. Example Response: Trip's Current Status

{
    "status": "success",
    "tel": "79056XXXXX",
    "invoice": "ABC2323F",
    "lr_number": "",
    "truck_number": "PB 22 U 0662",
    "origin": {
        "loc": [
            25.3176,
            82.9739
        ]
    },
    "destination": {
        "loc": [
            25.4358,
            81.8463
        ]
    },
    "last_loc": {
        "loc": [
            null,
            null
        ],
        "time": "2021-01-25 00:02:18.041000",
        "address": "None",
        "distance_remained": null
    },
    "eta": null
}

Status Code: 200


6. Fetch Location

This endpoint is for fetching location of a trip

Required Body Parameters

Notes

  • Atleast one of the below three parameters should be passed
Parameter Mandatory Description
invoice No invoice received in response of submit trip API
id No trip_id received in response of submit trip API
lr_number No lr_number received in response of submit trip API

OUTPUT

Invalid user credentials

{
    "errors": "Invalid username/password."
}

Endpoint:

Method: GET
Type: RAW
URL: https://dashboard.traqo.in/api/v3/trip/location/

Body:

{
    "id":"dd6ddcc8-7f26-4f0f-a65f-3ac79d51732a"
}

More example Requests/Responses:

I. Example Request: Fetch Location

Body:

{
    "id":"dd6ddcc8-7f26-4f0f-a65f-3ac79d51732a"
}

I. Example Response: Fetch Location

{
    "status": "success",
    "tel": "79056XXXXX",
    "loc": [
        null,
        null
    ],
    "address": "None",
    "time_recorded": "2021-01-25 00:02:18.041000",
    "distance_remained": null,
    "time_remained": null,
    "curr_ETA": null,
    "src_ETA": null
}

Status Code: 200


7. Create Trip

This endpoint is used to Create a trip.

Body Parameters

Parameter Mandatory Description
tel Yes 10 digit comma seperated mobile numbers for tracking
src Yes Comma separated coordinates for source location i.e. 12.8445, 23.823
dest Yes Comma separated coordinates for destination location i.e. 12.7445, 23.223
srcname No Source location name
destname No Destination location name
invoice No Invoice id e.g. #invoice2323
truck_number No Vehicle number e.g. PB 22 U 0662
eta_days No A number representing no. of days it will take for the truck to reach destination from source
eta_time No Epoch value of the expected time to reach the destination e.g. 1594023550916 for Jul 06 2020 13:49:10 GMT+0530
eta_hrs No No. of hours it'll take to reach the destination

OUTPUT

Invalid user credentials

{
    "errors": "Invalid username/password."
}

Missing any mandatory param (e.g. src)


{
    "status": "true",
    "error": "'src'"
}

Endpoint:

Method: POST
Type: RAW
URL: https://dashboard.traqo.in/api/v3/trip/create/

Body:

{
    "tel": "79056XXXXXX",
    "src": "25.3176,82.9739",
    "dest": "25.4358,81.8463",
    "srcname": "Mumbai",
    "destname": "Delhi",
    "truck_number": "PB 22 U 0662",
    "invoice": "ABC2323F",
    "eta_hrs":"4"

}

More example Requests/Responses:

I. Example Request: Success Submit Trip

Body:

{
    "tel": "79056XXXXXX",
    "src": "25.3176,82.9739",
    "dest": "25.4358,81.8463",
    "srcname": "Mumbai",
    "destname": "Delhi",

    "truck_number": "PB 22 U 0662",
    "invoice": "ABC2323F",
    "eta_hrs":"4"

}

I. Example Response: Success Submit Trip

{
    "status": "success",
    "tripId": "dd6ddcc8-7f26-4f0f-a65f-3ac79d51732a"
}

Status Code: 200


8. Update Trip

This endpoint is used to update a trip .

Notes

New phone number can be passed in tel parameter to update current phone number of a running trip

Body Parameters

Parameter Mandatory Description
id Yes Trip id received in response of submit trip API
tel No 10 digit comma seperated mobile numbers for tracking
src No Comma separated coordinates for source location i.e. 12.8445, 23.823
dest No Comma separated coordinates for destination location i.e. 12.7445, 23.223
srcname No Source location name
destname No Destination location name
invoice No Invoice id e.g. #invoice2323
truck_number No Vehicle number e.g. PB 22 U 0662
eta_days No A number representing no. of days it will take for the truck to reach destination from source
eta_time No Epoch value of the expected time to reach the destination e.g. 1594023550916 for Jul 06 2020 13:49:10 GMT+0530
eta_hrs No No. of hours it'll take to reach the destination

OUTPUT

Invalid user credentials

{
    "errors": "Invalid username/password."
}

Missing mandatory param (e.g. id)


{
    "status": "true",
    "error": "'id'"
}

Endpoint:

Method: POST
Type: RAW
URL: https://dashboard.traqo.in/api/v3/trip/update/

Body:

{
    "id":"dd6ddcc8-7f26-4f0f-a65f-3ac79d51732a",
    "tel":"79056XXXXX"
}

More example Requests/Responses:

I. Example Request: Success Update Trip

Body:

{
    "id":"dd6ddcc8-7f26-4f0f-a65f-3ac79d51732a",
    "tel":"79056XXXXX"
}

I. Example Response: Success Update Trip

{
    "status": "success"
}

Status Code: 200


You can use this endpoint to check concent status of the passed mobile number.

Body Parameters

Parameter Mandatory Description
tel Yes 10 digit comma seperated mobile number used for creating trip

OUTPUT

Invalid user credentials

{
    "errors": "Invalid username/password."
}

Endpoint:

Method: GET
Type: RAW
URL: https://dashboard.traqo.in/api/v3/check_consent/

Body:

{
    "tel":"79056XXXXX"
}

More example Requests/Responses:

I. Example Request: Success response

Body:

{
    "tel":"790560XXXX"
}

I. Example Response: Success response

{
    "consent": "PENDING",
    "tel": "790560XXXX",
    "operator": "Jio"
}

Status Code: 200



Back to top