Skip to main content
POST
/
fuel
/
entries
/
bulk
Bulk create fuel entries
curl --request POST \
  --url https://app.unitedlogistics.com.do/api/v1/fuel/entries/bulk \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
[
  {
    "vehicle_number": "L18N / L534991",
    "product_name": "Diesel Regular",
    "product_type": "Regular",
    "gallons": 60.008,
    "price_per_gallon": 224.8,
    "transaction_date": "2026-02-26T03:15:47.000Z",
    "source": "API",
    "reference_id": "300030586"
  },
  {
    "vehicle_number": "T-114",
    "product_name": "Diesel Regular",
    "product_type": "Regular",
    "gallons": 41.2,
    "price_per_gallon": 224.8,
    "transaction_date": "2026-02-26T05:02:11.000Z",
    "source": "API",
    "reference_id": "300030587"
  }
]
'
import requests

url = "https://app.unitedlogistics.com.do/api/v1/fuel/entries/bulk"

payload = [
    {
        "vehicle_number": "L18N / L534991",
        "product_name": "Diesel Regular",
        "product_type": "Regular",
        "gallons": 60.008,
        "price_per_gallon": 224.8,
        "transaction_date": "2026-02-26T03:15:47.000Z",
        "source": "API",
        "reference_id": "300030586"
    },
    {
        "vehicle_number": "T-114",
        "product_name": "Diesel Regular",
        "product_type": "Regular",
        "gallons": 41.2,
        "price_per_gallon": 224.8,
        "transaction_date": "2026-02-26T05:02:11.000Z",
        "source": "API",
        "reference_id": "300030587"
    }
]
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.text)
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify([
    {
      vehicle_number: 'L18N / L534991',
      product_name: 'Diesel Regular',
      product_type: 'Regular',
      gallons: 60.008,
      price_per_gallon: 224.8,
      transaction_date: '2026-02-26T03:15:47.000Z',
      source: 'API',
      reference_id: '300030586'
    },
    {
      vehicle_number: 'T-114',
      product_name: 'Diesel Regular',
      product_type: 'Regular',
      gallons: 41.2,
      price_per_gallon: 224.8,
      transaction_date: '2026-02-26T05:02:11.000Z',
      source: 'API',
      reference_id: '300030587'
    }
  ])
};

fetch('https://app.unitedlogistics.com.do/api/v1/fuel/entries/bulk', 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/bulk",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    [
        'vehicle_number' => 'L18N / L534991',
        'product_name' => 'Diesel Regular',
        'product_type' => 'Regular',
        'gallons' => 60.008,
        'price_per_gallon' => 224.8,
        'transaction_date' => '2026-02-26T03:15:47.000Z',
        'source' => 'API',
        'reference_id' => '300030586'
    ],
    [
        'vehicle_number' => 'T-114',
        'product_name' => 'Diesel Regular',
        'product_type' => 'Regular',
        'gallons' => 41.2,
        'price_per_gallon' => 224.8,
        'transaction_date' => '2026-02-26T05:02:11.000Z',
        'source' => 'API',
        'reference_id' => '300030587'
    ]
  ]),
  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/bulk"

	payload := strings.NewReader("[\n  {\n    \"vehicle_number\": \"L18N / L534991\",\n    \"product_name\": \"Diesel Regular\",\n    \"product_type\": \"Regular\",\n    \"gallons\": 60.008,\n    \"price_per_gallon\": 224.8,\n    \"transaction_date\": \"2026-02-26T03:15:47.000Z\",\n    \"source\": \"API\",\n    \"reference_id\": \"300030586\"\n  },\n  {\n    \"vehicle_number\": \"T-114\",\n    \"product_name\": \"Diesel Regular\",\n    \"product_type\": \"Regular\",\n    \"gallons\": 41.2,\n    \"price_per_gallon\": 224.8,\n    \"transaction_date\": \"2026-02-26T05:02:11.000Z\",\n    \"source\": \"API\",\n    \"reference_id\": \"300030587\"\n  }\n]")

	req, _ := http.NewRequest("POST", 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.post("https://app.unitedlogistics.com.do/api/v1/fuel/entries/bulk")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("[\n  {\n    \"vehicle_number\": \"L18N / L534991\",\n    \"product_name\": \"Diesel Regular\",\n    \"product_type\": \"Regular\",\n    \"gallons\": 60.008,\n    \"price_per_gallon\": 224.8,\n    \"transaction_date\": \"2026-02-26T03:15:47.000Z\",\n    \"source\": \"API\",\n    \"reference_id\": \"300030586\"\n  },\n  {\n    \"vehicle_number\": \"T-114\",\n    \"product_name\": \"Diesel Regular\",\n    \"product_type\": \"Regular\",\n    \"gallons\": 41.2,\n    \"price_per_gallon\": 224.8,\n    \"transaction_date\": \"2026-02-26T05:02:11.000Z\",\n    \"source\": \"API\",\n    \"reference_id\": \"300030587\"\n  }\n]")
  .asString();
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n  {\n    \"vehicle_number\": \"L18N / L534991\",\n    \"product_name\": \"Diesel Regular\",\n    \"product_type\": \"Regular\",\n    \"gallons\": 60.008,\n    \"price_per_gallon\": 224.8,\n    \"transaction_date\": \"2026-02-26T03:15:47.000Z\",\n    \"source\": \"API\",\n    \"reference_id\": \"300030586\"\n  },\n  {\n    \"vehicle_number\": \"T-114\",\n    \"product_name\": \"Diesel Regular\",\n    \"product_type\": \"Regular\",\n    \"gallons\": 41.2,\n    \"price_per_gallon\": 224.8,\n    \"transaction_date\": \"2026-02-26T05:02:11.000Z\",\n    \"source\": \"API\",\n    \"reference_id\": \"300030587\"\n  }\n]"

response = http.request(request)
puts response.read_body
{
  "inserted": 2,
  "ids": [
    "589c258d-4736-4b6f-876f-87835992191e",
    "7b2a3d2c-6e88-4a4d-8e7b-2c7a1f5d83b9"
  ]
}
{
  "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": "El vehículo especificado no existe en esta organización."
  }
}
{
  "error": {
    "code": "too_many_requests",
    "message": "Rate limit exceeded."
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json
vehicle_number
string
required

Denormalized vehicle number/plate at the time of the refuel.

Required string length: 1 - 255
Example:

"L18N / L534991"

product_name
string
required
Required string length: 1 - 255
Example:

"Diesel Regular"

product_type
string
required
Required string length: 1 - 255
Example:

"Regular"

gallons
number
required
Example:

60.008

vehicle_external_id
integer | null

Provider vehicle id (legacy vehicle_id). Enables trip/GPS matching.

Example:

16056

vehicle_name
string | null
Maximum string length: 255
driver_external_id
integer | null
driver_key
string | null
Maximum string length: 255
name
string | null

Driver name (denormalized). Defaults to Desconocido.

Maximum string length: 255
Example:

"Juan Pérez"

product_id
string<uuid> | null
vendor_id
string<uuid> | null
vendor_name
string | null
Maximum string length: 255
vendor_address
string | null
Maximum string length: 500
total_cost
number

Transaction total; price_per_gallon is inferred when provided.

Required range: x >= 0
Example:

13489.8

price_per_gallon
number
Required range: x >= 0
Example:

224.8

odometer_reading
number
Required range: x >= 0
Example:

10997

transaction_date
string<date-time> | null
Example:

"2026-02-26T03:15:47.000Z"

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

Imported

inserted
integer
required

Number of entries created.

Example:

42

ids
string<uuid>[]
required

Ids of every created entry.