Skip to main content
POST
Create Logistics Recharges (Bulk)

Create Logistics Recharges (Bulk)

Create multiple fuel consumption records in a single API call. Optimized for batch processing of up to 5,000 records per request.

Request

Headers

string
required
Your API key for authenticationExample: sk_live_1234567890abcdef
string
required
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa

Body Parameters

array
required
Array of recharge records to create (1 to 5,000). Each record uses the same format as the single POST /recharges endpoint.Each record contains:
  • fuel_id (string, required): UUID of the fuel type
  • country (string, required): ISO 3166-1 alpha-2 country code
  • date (string, required): Date in YYYY-MM-DD format
  • quantity (number): Amount of fuel consumed
  • vehicle_license_plate (string): Vehicle license plate
  • toc_id (string): UUID of the vehicle type
  • project_id (string): UUID of a project to associate with
object
Processing options for the bulk operation.
  • continue_on_error (boolean, default: true): If true, continues processing remaining records even if some fail. If false, stops at the first error.

Response

Returns a summary of the bulk operation with HTTP 201.
integer
Number of successfully created recharges
integer
Number of recharges that matched an existing record and were updated (upsert)
array
Array of error objects for records that failed to process

Example

Successful Response

Upsert Behavior

Records with the same combination of country, date, quantity, and vehicle_license_plate within the organization are updated instead of duplicated. This matches the deduplication behavior of CSV file uploads.

Daily Batch Upload from CSV

Common Errors

401 Unauthorized

Cause: Missing or invalid API key

403 Forbidden

Cause: The authenticated user is not a member of the organization

422 Validation Error

Cause: Empty records array or exceeding 5,000 records.

Partial Failures

When continue_on_error is true (default), individual record failures are reported in the errors array while successfully processed records are included in results. Common per-record errors:
  • Invalid fuel_id: Fuel not found or inactive
  • Invalid country: Not Valid Country Code, must be ISO 3166-1 alpha-2

Create Recharge

Create a single recharge

List Recharges

Retrieve fuel consumption records

Batch Delete Recharges

Delete multiple recharges at once

Create Requests (Bulk)

Bulk create shipment requests