Skip to content

8.0 API Access

Fuellox API Access

Note for the purpose of this documentation the api search domain is:

ItemURL
API Domainfuellox.io
API_URLhttps://fuellox.io/api/

To start making API requests you will need:

  1. An API token (Bearer token)
  2. The tenant ID and org ID

If you don’t have the API token, tenant ID, and org ID please contact support.

Experimental API
The current release of this API is for experimental purposes only. This API may be updated before the final public release. Changes are to be expected

Fetching Transactions

Start by opening a HTTP Request tool. In this document, we will be using Postman

  1. You may wish to setup an environment. For brevity, we’ll create our requests from scratch
  2. Create a new Request Create a New Postman Request
  3. Create a GET request for the following URL: https://fuellox.io/api/equipments
  4. Under “Authorization” select “Bearer Token” and paste your API Token Add your Token
  5. Add Headers for your org ID and tenant ID Insert Request Headers If you have multiple Organisations, the Org-Id header can be omitted. You may do this to retrieve records across all of your organisations in a single request. Note however, when creating, updating or deleting records the Org-Id is required.
  6. Click “Send” to run the request

Pagination

When indexing or searching the response return meta with pagination details. For example (some links removed for brevity):

"meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 76,
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "<API_URL>equipments?page=1",
            "label": "1",
            "active": true
        },
        {
            "url": "<API_URL>equipments?page=2",
            "label": "2",
            "active": false
        },
        {
            "url": "<API_URL>equipments?page=3",
            "label": "3",
            "active": false
        }
    ],
    "path": "<API_URL>equipments",
    "per_page": 15,
    "to": 15,
    "total": 1127
}

As you may have noticed in the links urls, we can set the page to retrieve more records. By default the limit is 15 records. We can increase this number with the limit query string:

<API_URL>equipments?limit=50

Searching

Fuellox has an expressive API we can use to filter, and sort our results.

To search, we use a POST request and the /search endpoint on a resource:

POST: <API_URL>equipments/search

Using Postman:

  1. Change the request type to POST
  2. Enter the /search url (see image below, in this example we’ll use equipments)
  3. Select the “Body” tab
  4. Select “raw” in Postman and “JSON” as the language Pasted image 20250305200124.png

If you run this request without a body, it will be similar to a normal GET request to /equipments. Now, we can add filters to our request by adding JSON to the body. Let’s search for all equipment created after the 25th of January, where active is true

{
    "filters" : [
        { "field" : "created_at", "operator" : ">=", "value" : "2025-01-01" },
        { "field" : "active", "operator" : "=", "value" : true }
    ]
}

For reference, here are all available “operators”:

<
<=
>
>=
=
!=
like
not like
ilike
not ilike
in
not in
all in
any in

We can sort by fields. In the example below we sort by name

{
    "sort" : [
        {"field" : "name", "direction" : "asc"}
    ]
}

Search records (note that the searched fields are predetermined)

{
    "search": {
        "value": "3338"
    }
}

Includes (relationships)

NOTE! Take care when including relationships. They are not paginated. If the requests become too large, your token may be revoked and you’ll need to contact Fuellox Support to have it re-activated.

In the examples below, we will continue to use the /equipments/search endpoint.

When using /search, we can also fetch related data:

{
    "includes": [
        {
          "relation": "fluid"
        }
    ]
}

Of course, related data can also be filtered:

{
    "includes": [
        {
          "relation": "transactions",
          "filters": [
              { "field": "event_datetime", "operator": ">=", "value": "01-03-2025" }
          ]
        }
    ]
}

Resources

Below is a list of resources you may wish to explore, along with common relationships you may need:

  • transactions
    • client
    • equipment
    • compartment
    • fluid
    • project
    • site
    • device
    • user
    • transaction_type
    • tank
  • equipments
    • fluid
    • equipment_mode
    • qr_codes
  • devices
    • fluid
    • tank
  • tanks
    • device
  • compartments
    • qr_codes
  • qr_codes
    • equipment
    • compartment
    • fluid
  • fluids
  • users
  • transaction_type
  • clients
  • projects
  • sites

Extended Example

This example pulls down a complete data payload for each transaction.

We use a POST request and the /search endpoint on a resource:

 <API_URL>transactions/search?limit=100

We include a body to extend the transaction data with the required relationships. We add a date filter to collect data for a particular period.

{
    "includes": [
        {
          "relation": "equipment"
        },
        {
          "relation": "compartment"
        },
        {
          "relation": "fluid"
        },
        {
          "relation": "device"
        },
        {
          "relation": "org"
        },
        {
          "relation": "user"
        },
        {
          "relation": "transaction_type"
        }
    ],
    "filters" : [
        { "field" : "created_at", "operator" : ">=", "value" : "2025-01-01" }
    ]
}

cURL

curl --location '<API_URL>transactions/search' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
    "includes": [
        {
          "relation": "equipment"
        },
        {
          "relation": "compartment"
        },
        {
          "relation": "fluid"
        },
        {
          "relation": "device"
        },
        {
          "relation": "org"
        },
        {
          "relation": "user"
        },
        {
          "relation": "transaction_type"
        }
    ],
    "filters" : [
        { "field" : "created_at", "operator" : ">=", "value" : "2025-01-01" }
    ]
}'

Response

{
    "data": [
        {
            "id": "01jmbmke0gw7ggwyk4afgbz1b6",
            "created_at": "2025-02-18T04:21:02.000000Z",
            "updated_at": "2025-02-18T04:21:02.000000Z",
            "transaction_number": null,
            "app_transaction_id": "AiPodFR1",
            "device_local_number": 351,
            "device_number": 264,
            "client_id": null,
            "user_number": null,
            "notes_a": null,
            "equipment_id": "01gsvc8ytxcq9n7fbdkqvkehyq",
            "compartment_id": "01gsvcdb35zjk9bfrcttg7re6t",
            "event_datetime": "2025-02-18T04:21:01.000000Z",
            "geolocation": null,
            "pulse_count": 201,
            "raw_volume": 30,
            "event_k_factor": 6.7,
            "volume_uom": "Litres",
            "termination_state": 4,
            "state_auth": null,
            "fluid_name": null,
            "fluid_id": "01gssyhtr2gd2x432sbn5rwy8j",
            "odo": null,
            "odo_uom": "Kilometers",
            "last_odo": null,
            "odo_delta": null,
            "notes_b": null,
            "compartment_name": "Service Truck",
            "timezone": null,
            "project_id": "01ja4h79qn3yn17b9vv4r1ygck",
            "site_id": null,
            "gps_address": null,
            "calculated_level_start": null,
            "calculated_level_end": null,
            "level_sensor_start": null,
            "level_sensor_end": 15,
            "level_time_start": null,
            "level_time_end": null,
            "level_delta": null,
            "device_id": "01h2s5fng5tct1kt0mz5wgd8da",
            "user_id": "01jkf10tser7kg5z19wz5nxssd",
            "transaction_type_id": "01gtgrehc84x8p0h1qqmhz66rc",
            "mode": "Off Road",
            "number_of_seconds_to_complete": 80,
            "flow_rate": 8.94,
            "app_version": "2.0.0",
            "termination_code": "App Stop",
            "validated": false,
            "gps_accuracy": null,
            "hardwares_firmware_version": "0.20",
            "meta_data": "{}",
            "multiplier": 1,
            "archive": false,
            "calendar_view": null,
            "cost_center": null,
            "total_cost": null,
            "cents_per_liter": null,
            "tank_id": null,
            "volume": 30,
            "purchase_site": null,
            "asset_number": "3703",
            "equipment_type": "Service Truck",
            "this_day_last_yr": null,
            "this_month_vol": null,
            "last_mtd_vol": null,
            "last_month_vol": null,
            "this_qtr_vol": null,
            "last_qtd_vol": null,
            "last_qtr_vol": null,
            "this_year_vol": null,
            "last_year_vol": null,
            "last_ytd_vol": null,
            "project_cost_center": null,
            "equipment_cost_center": "None",
            "deleted_at": null,
            "created_by_id": "01jkf10tser7kg5z19wz5nxssd",
            "updated_by_id": null,
            "deleted_by_id": null,
            "tenant_id": "01gssyfacx4hx8sf9ywzx6fq3h",
            "org_id": "01ja4h5yabn2vywk5xh14kcdzr",
            "knack_id": null,
            "int_id": 520564,
            "longitude": 151.15483878133,
            "latitude": -32.552760720966,
            "location_accuracy": 541,
            "user_device_user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",
            "user_device_platform_name": "webkit",
            "user_device_platform": "iphone",
            "level_nodes_raw": null,
            "compartment": {
                "id": "01gsvcdb35zjk9bfrcttg7re6t",
                "created_at": "2022-08-24T03:00:50.000000Z",
                "updated_at": "2025-02-13T23:26:50.000000Z",
                "name": "Service Truck",
                "equipment_id": "01gsvc8ytxcq9n7fbdkqvkehyq",
                "fluid_id": "01gssyhtr2gd2x432sbn5rwy8j",
                "volume": 2000,
                "fluid_uom": "Litres",
                "preset": false,
                "preset_volume": null,
                "active": true,
                "qr_code": "bNdTRHAXjwThuHJwTbI0iflTXU8tc92zFUfju8lrLzi",
                "source": "",
                "created_by": "",
                "qr_code_added_datetime": "2022-09-20T04:07:00.000000Z",
                "qr_author": "Nathan Manczal",
                "qr_in_use": true,
                "qr_only": false,
                "deleted_at": null,
                "created_by_id": "systemsystemsystemsystemsy",
                "updated_by_id": "systemsystemsystemsystemsy",
                "deleted_by_id": null,
                "tenant_id": "01gssyfacx4hx8sf9ywzx6fq3h",
                "org_id": "01ja4h5yabn2vywk5xh14kcdzr",
                "knack_id": "6305bdfe4bb1e30022ed8b23  ",
                "compartment_number": 2059,
                "int_id": 1890,
                "odo_required": false
            },
            "device": {
                "id": "01h2s5fng5tct1kt0mz5wgd8da",
                "created_at": "2023-06-13T01:21:20.000000Z",
                "updated_at": "2025-01-09T23:32:16.000000Z",
                "internal_name": "ST-3703 (new)",
                "device_number": 264,
                "broadcast_id": "2311295",
                "alias": "ST-3703",
                "device_model_id": "01h7cpnej2n8fd3ytt2jtt5g1x",
                "serial_number": "FL2000022",
                "firmware_version": "0.20",
                "fluid_name": "Diesel",
                "fluid_id": "01gssyhtr2gd2x432sbn5rwy8j",
                "is_active": true,
                "fluid_uom": "Liters",
                "pulse_make": "Unknown",
                "pulse_model": "Unknown",
                "hardware_pulse_k_factor": 6.7,
                "hardware_pulse_k_factor_unit": null,
                "notes": "94:e6:86:2c:79:ea",
                "precision": 1,
                "hardware_estop_open_circuit_installed": false,
                "level_installed": false,
                "hardware_over_ride_installed": false,
                "bt_type": "ESP32",
                "volume_strapping_table": "{}",
                "commission_date": null,
                "install": null,
                "event_sync_type": null,
                "hometown_time_zone": null,
                "description": "FL2000022",
                "defualt_latitude": null,
                "default_longitude": null,
                "hold_connect": false,
                "update_on_connection": false,
                "fuellox_ini_file_source": null,
                "secure_key": "008107",
                "reference": "BLE Mac Address: 94:e6:86:2c:79:ea",
                "calibration_org_id": null,
                "last_calibration_datetime": null,
                "last_level_volume": null,
                "last_level_recorded_datetime": null,
                "volume_capacity": 1000,
                "ullage": 1000,
                "app_connection_timeout_ms": 2500,
                "connection_range_warning": null,
                "connection_range_disconnect": null,
                "collect_meta": 0,
                "transaction_resume_timeout_ms": 3000,
                "config_updated": null,
                "iotiq_io_device_active": false,
                "io_device_id": null,
                "io_device_access_token": null,
                "tank_name": "ST-3703",
                "reseller_id": null,
                "allow_auto_connect": false,
                "level_percentage": 0,
                "org_group_id": null,
                "deleted_at": null,
                "created_by_id": "systemsystemsystemsystemsy",
                "updated_by_id": "01gsvqfeb3qzwcxkt26rvqaav5",
                "deleted_by_id": null,
                "tenant_id": "01gssyfacx4hx8sf9ywzx6fq3h",
                "org_id": "01ja4h5yabn2vywk5xh14kcdzr",
                "knack_id": null,
                "int_id": 351,
                "hardware_version": "2.0",
                "hardware_pre_flow_timeout_s": 60,
                "hardware_post_flow_timeout_s": 60,
                "hardware_residuals_timeout_ms": 3000,
                "hardware_bt_reconnect_timeout_ms": 3000,
                "hardware_bt_idle_timeout_ms": 3000,
                "hardware_nozzle_switch_installed": false,
                "hardware_estop_closed_circuit_installed": false,
                "hardware_level_installed": false,
                "hardware_pre_flow_timeout_ms": 45,
                "hardware_post_flow_timeout_ms": 90,
                "hardware_illegal_volume_ml": 2000,
                "hardware_max_level_mm": 5945,
                "hardware_analogue_level_max_ma": 21000,
                "hardware_has_bypass": false,
                "hardware_is_demo_mode": 0,
                "level_warning": false,
                "level_reorder": false,
                "hardware_max_pump_run_time_minutes": 0,
                "hardware_input_1": 0,
                "hardware_input_2": 0,
                "hardware_input_3": 0,
                "hardware_input_4": 0,
                "hardware_index_start": null,
                "hardware_get_histories_every_x_ms": 4000,
                "connect_no_start_timeout_ms": 60000
            },
            "equipment": {
                "id": "01gsvc8ytxcq9n7fbdkqvkehyq",
                "created_at": null,
                "updated_at": "2025-02-28T05:47:39.000000Z",
                "name": "Servicetruck compressor",
                "equipment_number": 1917,
                "make": "Isuzu",
                "model": "Service Truck",
                "serial": "Acciona",
                "rego": "NA",
                "asset": "3703",
                "is_tank": false,
                "client_id": "01gst4s5zy63h1kvgfvas9veht",
                "user_id": null,
                "equipment_type_id": "01gtzhffvc8re52hxq8hf60g44",
                "type_custom": "Service Truck",
                "last_mileage": null,
                "mileage_unit_of_measure_id": "01gsphqpgx05nft7pkb1g1y29k",
                "equipment_mode_id": "01gsvr1p87gb5y68g8h0at61kv",
                "active": true,
                "last_write": null,
                "manufacture_year": null,
                "vin": "",
                "cost_center": "<<confidential>>",
                "ein": "",
                "last_odo_update": null,
                "org_group_id": null,
                "deleted_at": null,
                "created_by_id": "systemsystemsystemsystemsy",
                "updated_by_id": "01jmxrwz69vrpe7a674cgx8jcr",
                "deleted_by_id": null,
                "tenant_id": "01gssyfacx4hx8sf9ywzx6fq3h",
                "org_id": "01ja4h5yabn2vywk5xh14kcdzr",
                "knack_id": "6305bdd244ecfb0022c6e4f9  ",
                "int_id": 1743
            },
            "fluid": {
                "id": "01gssyhtr2gd2x432sbn5rwy8j",
                "created_at": "2023-02-21T12:18:09.000000Z",
                "updated_at": "2023-03-14T11:00:05.000000Z",
                "name": "Diesel",
                "description": null,
                "color": "Orange",
                "is_global": false,
                "deleted_at": null,
                "created_by_id": "systemsystemsystemsystemsy",
                "updated_by_id": "systemsystemsystemsystemsy",
                "deleted_by_id": null,
                "tenant_id": "01gssyfacx4hx8sf9ywzx6fq3h",
                "knack_id": "5bb80adf22b0822fd87eab33  ",
                "fluid_number": 1,
                "int_id": 1
            },
            "org": {
                "id": "01ja4h5yabn2vywk5xh14kcdzr",
                "created_at": "2024-10-14T03:29:35.000000Z",
                "updated_at": "2025-03-05T10:08:06.000000Z",
                "name": "<<confidential>>",
                "org_number": "1",
                "org_id": null,
                "site": null,
                "address": null,
                "main_contact": "<<confidential>>",
                "contact_phone": "<<confidential>>",
                "contact_email": "<<confidential>>",
                "is_financial": false,
                "is_active": true,
                "status": null,
                "subscription_type": "Lite",
                "owns_equipment": false,
                "reseller_id": null,
                "require_subs": false,
                "enable_projects": true,
                "allow_sentry": false,
                "can_qr_scan": true,
                "can_add_equipment": true,
                "hide_manual_equipment_select": false,
                "manual_transactions": false,
                "paramaters": null,
                "custom_dispense_auth": null,
                "allow_hardware": true,
                "allow_shake": false,
                "user_save_password": false,
                "allow_offline_login": false,
                "is_trial": false,
                "trial_expires_on": null,
                "allow_search": true,
                "max_transactions_shown": null,
                "allow_levels": true,
                "transaction_sync_default_hours": null,
                "allow_batch_odo": false,
                "connection_drop": null,
                "query_size": null,
                "enable_transaction_notes": false,
                "transaction_notes_name": null,
                "transaction_notes_placeholder": null,
                "report_damage": false,
                "options": "{}",
                "allow_custom_qr": false,
                "number_of_seats": null,
                "max_transactions_per_day": null,
                "days_since_last_transaction": null,
                "can_scan_tanks": false,
                "enable_transaction_notes_2": false,
                "notes_2_field_name": null,
                "notes_2_field_placeholder": null,
                "deleted_at": null,
                "created_by_id": "01gsvqfeb3qzwcxkt26rvqaav5",
                "updated_by_id": "systemsystemsystemsystemsy",
                "deleted_by_id": null,
                "tenant_id": "01gssyfacx4hx8sf9ywzx6fq3h",
                "int_id": 158,
                "org_group_id": null,
                "auto_sync_interval_minutes": 720,
                "last_automated_audit_datetime": "2025-03-05T10:08:06.000000Z",
                "require_project_select": false,
                "timezone": "Australia/Melbourne",
                "reseller_org_id": "01gst05kt66seb0k0dhpmyyjjd",
                "is_reseller": false,
                "app_hide_inactive_equipment_default": false,
                "last_automated_debug_audit_datetime": "2025-02-12T14:12:04.000000Z",
                "persist_audits": true,
                "audit_start_datetime": "2025-01-01T00:00:00.000000Z"
            },
            "transaction_type": {
                "id": "01gtgrehc84x8p0h1qqmhz66rc",
                "created_at": "2023-03-02T08:54:02.000000Z",
                "updated_at": "2023-03-02T08:54:02.000000Z",
                "name": "Dispense",
                "multiplier": 1,
                "deleted_at": null,
                "created_by_id": "01gsphqpgks8b5w657665vmb41",
                "updated_by_id": null,
                "deleted_by_id": null,
                "knack_id": null,
                "int_id": 1
            },
            "user": {
                "id": "01jkf10tser7kg5z19wz5nxssd",
                "name": "<<confidential>>",
                "email": "<<confidential>>",
                "email_verified_at": null,
                "created_at": "2025-02-07T01:40:05.000000Z",
                "updated_at": "2025-02-07T01:40:07.000000Z",
                "two_factor_secret": null,
                "two_factor_recovery_codes": null,
                "config": {},
                "settings": {},
                "styles": {},
                "status": "active",
                "knack_roles": null,
                "knack_id": null,
                "user_status": null,
                "user_number": null,
                "title": null,
                "mobile": "<<confidential>>",
                "is_active": true,
                "phone_os": null,
                "manages_equipment": false,
                "allows_hold_connection": false,
                "can_view_levels": false,
                "allows_shake": false,
                "allows_save_password": false,
                "allows_offline_login": false,
                "users_x_reference": null,
                "date_created": "2025-02-07T01:39:11.000000Z",
                "maint_timeouts": false,
                "maint_hw_config": false,
                "maint_sync_short": false,
                "maint_sync_long": false,
                "allow_batch_odo": false,
                "transaction_types_allowed": null,
                "mkg_tgt": false,
                "maint_sync_input_box": false,
                "adv_logout": false,
                "access_expires": null,
                "level_calibration": false,
                "logbook_force_tank_sacn": false,
                "tenant_id": "acme-tenant-xxxxxxxxxxxxxx",
                "int_id": 1862,
                "access_level": 100,
                "can_create_logbook_transaction": false,
                "can_create_bulk_purchase_transaction": false,
                "can_create_fleet_purchase_transaction": false,
                "can_create_adjustment_transaction": false,
                "can_create_transfer_transaction": false,
                "can_create_delivery_transaction": false,
                "can_create_dispense_transaction": true,
                "primary_phone": null
            }
        },
        {
            "..."
        }
    ]
}