Skip to main content
PATCH
/
fuel
/
entries
/
{id}
Update a fuel entry
curl --request PATCH \
  --url https://app.unitedlogistics.com.do/api/v1/fuel/entries/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "gallons": 58.4,
  "price_per_gallon": 222
}
'
import requests

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

payload = {
"gallons": 58.4,
"price_per_gallon": 222
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({gallons: 58.4, price_per_gallon: 222})
};

fetch('https://app.unitedlogistics.com.do/api/v1/fuel/entries/{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/fuel/entries/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'gallons' => 58.4,
'price_per_gallon' => 222
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

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

curl_close($curl);

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

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

func main() {

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

payload := strings.NewReader("{\n \"gallons\": 58.4,\n \"price_per_gallon\": 222\n}")

req, _ := http.NewRequest("PATCH", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.patch("https://app.unitedlogistics.com.do/api/v1/fuel/entries/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"gallons\": 58.4,\n \"price_per_gallon\": 222\n}")
.asString();
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"gallons\": 58.4,\n \"price_per_gallon\": 222\n}"

response = http.request(request)
puts response.read_body
{
  "data": {
    "id": "589c258d-4736-4b6f-876f-87835992191e",
    "org_id": "d87f7281-ea19-45cd-b6fd-d8eb9e310da1",
    "transaction_date": "2026-02-26T03:15:47.000Z",
    "transaction_id": "TXN-9921",
    "notes": null,
    "vehicle_external_id": 16056,
    "vehicle_number": "L18N / L534991",
    "vehicle_name": "L18N",
    "driver_external_id": null,
    "driver_key": null,
    "name": "Juan Pérez",
    "product_id": "f788c39d-02c8-4bd6-aa1a-fa2af011b5a3",
    "product_name": "Diesel Regular",
    "product_type": "Regular",
    "vendor_id": "2f81f423-db0c-46d8-923e-c177fa78a54c",
    "vendor_name": "Estación El Higuero - United Petroleum",
    "vendor_address": "Santo Domingo Norte, DO",
    "gallons": 60.008,
    "price_per_gallon": 224.8,
    "total_cost": 13489.8,
    "odometer_reading": 10997,
    "previous_odometer_reading": 10120,
    "distance_traveled": 877,
    "fuel_efficiency": 14.61,
    "trip_external_id": null,
    "matched_message_id": 6213486243,
    "gps_odometer_reading": 10997.05,
    "karma_driver_id": null,
    "source": "API",
    "reference_id": "300030586",
    "created_by": null,
    "created_at": "2026-02-26T15:30:03.048Z",
    "updated_at": "2026-02-26T15:30:03.048Z"
  }
}
{
"error": {
"code": "bad_request",
"message": "Invalid fuel entry payload.",
"details": {
"fieldErrors": {
"gallons": [
"gallons must be greater than 0"
]
}
}
}
}
{
"error": {
"code": "unauthorized",
"message": "API key missing or invalid."
}
}
{
"error": {
"code": "forbidden",
"message": "API key is missing required scope: fuel_entries:write."
}
}
{
"error": {
"code": "not_found",
"message": "Entrada de combustible no encontrada."
}
}
{
"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<uuid>
required

Fuel entry UUID.

Body

application/json
vehicle_external_id
integer | null

Assign or clear the linked vehicle (legacy vehicle_id).

vehicle_number
string
Required string length: 1 - 255
vehicle_name
string | null
Maximum string length: 255
driver_external_id
integer | null
driver_key
string | null
Maximum string length: 255
name
string | null
Maximum string length: 255
product_id
string<uuid> | null
product_name
string
Required string length: 1 - 255
product_type
string
Required string length: 1 - 255
vendor_id
string<uuid> | null
vendor_name
string | null
Maximum string length: 255
vendor_address
string | null
Maximum string length: 500
gallons
number
total_cost
number
Required range: x >= 0
price_per_gallon
number
Required range: x >= 0
odometer_reading
number
Required range: x >= 0
transaction_date
string<date-time> | null
transaction_id
string | null
Maximum string length: 255
notes
string | null
Maximum string length: 2000
source
enum<string> | null

Origin of the entry. manual for UI capture, import for bulk CSV/Excel, API for integrations. Legacy ERM is accepted and stored as manual.

Available options:
API,
manual,
import
Example:

"API"

reference_id
string | null
Maximum string length: 255
trip_external_id
integer | null
matched_message_id
integer | null
gps_odometer_reading
number | null
Required range: x >= 0
karma_driver_id
integer | null

Response

OK

data
object
required