Skip to main content
GET
/
trips
/
{id}
Get a trip by id
curl --request GET \
  --url https://app.unitedlogistics.com.do/api/v1/trips/{id} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://app.unitedlogistics.com.do/api/v1/trips/{id}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://app.unitedlogistics.com.do/api/v1/trips/{id}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.unitedlogistics.com.do/api/v1/trips/{id}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://app.unitedlogistics.com.do/api/v1/trips/{id}"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://app.unitedlogistics.com.do/api/v1/trips/{id}")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://app.unitedlogistics.com.do/api/v1/trips/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "data": {
    "id": 482219,
    "external_id": 9876543,
    "provider": "karma",
    "org_id": "d87f7281-ea19-45cd-b6fd-d8eb9e310da1",
    "vehicle_external_id": 12345,
    "driver_external_id": 4421,
    "device_id": "GPS-DEV-001",
    "vehicle_number": "UL-021",
    "trip_active": 0,
    "start_message_id": 91827361,
    "start_date": "2026-05-26T08:32:00.000Z",
    "start_latitude": 18.4861,
    "start_longitude": -69.9312,
    "start_odometer_km": 124530.4,
    "stop_message_id": 91827881,
    "stop_date": "2026-05-26T10:14:00.000Z",
    "stop_latitude": 18.6792,
    "stop_longitude": -68.4014,
    "stop_odometer_km": 124612.8,
    "duration_s": 6120,
    "distance_km": 82.4,
    "duration_night_s": 0,
    "distance_night_km": 0,
    "max_speed_kph": 104.2,
    "driving_score": 87,
    "eco_score": 72.4,
    "fetch_timestamp": "2026-05-26T10:14:31.221Z",
    "created_at": "2026-05-26T10:14:31.221Z",
    "updated_at": "2026-05-26T10:14:31.221Z"
  }
}
{
  "error": {
    "code": "bad_request",
    "message": "Invalid trip payload.",
    "details": {
      "fieldErrors": {
        "start_date": [
          "start_date must be ISO 8601 datetime"
        ]
      }
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "API key missing or invalid."
  }
}
{
  "error": {
    "code": "not_found",
    "message": "Viaje no encontrado."
  }
}
{
  "error": {
    "code": "too_many_requests",
    "message": "Rate limit exceeded."
  }
}

Authorizations

Authorization
string
header
required

Authorization: Bearer ulk__. Cree la clave en Configuración → API.

Path Parameters

id
string
required

Numeric trip id.

Pattern: ^\d+$

Response

OK

data
object
required