Ir para o conteúdo
Floweet
Acesso pro

Quick start

Get a sandbox key, read the fuel barometer, price a fleet's overspend and save a prospect, with curl, JavaScript or Python examples.

api.floweet.com/v1 · Contract 1.0.0-beta.1 · Beta

This documentation is written in English and French; it is shown to you in English.

Sections · Quick start

In a few minutes: a sandbox key, this week's price barometer, a fleet's overspend priced, a prospect saved, then a company found in the SIRENE directory. Every example comes in curl, JavaScript and Python; the language you pick applies to the whole page.

1. Get a sandbox key

API access is opened on request, organization by organization. Write to contact@floweet.com with your Floweet organization, the ADMIN member the integration will act for, and what you want to build. Our team opens your organization's API account and sends you an fw_test_… key.

It is shown only once: store it straight away in an environment variable on your server.

export FLOWEET_API_KEY="fw_test_…"

2. Read the barometer

First call: brands ranked by average diesel price, in France and in each region, with or without motorway stations. Prices are integers in thousandths of a euro per liter: 2252 means 2.252 €/L.

GET/v1/barometerScope barometer:read
Request
curl "https://api.floweet.com/v1/barometer?fuel=gazole" \
  -H "Authorization: Bearer $FLOWEET_API_KEY"
Response 200
{
  "fuel": "gazole",
  "generatedAt": "2026-10-26T11:34:49.346Z",
  "pricesFrom": "2026-10-19T11:35:43.000Z",
  "pricesTo": "2026-10-26T11:00:00.000Z",
  "national": {
    "all": {
      "brands": [
        {
          "brand": "Total Access",
          "averagePrice": 2252,
          "stations": 231,
          "others": false
        },
        {
          "brand": "TotalEnergies",
          "averagePrice": 2253,
          "stations": 837,
          "others": false
        },
        {
          "brand": "Netto",
          "averagePrice": 2375,
          "stations": 60,
          "others": false
        }
      ],
      "stations": 6391,
      "terciles": [
        2359,
        2399
      ]
    },
    "excludingHighways": {
      "brands": [
        {
          "brand": "Total Access",
          "averagePrice": 2252,
          "stations": 219,
          "others": false
        },
        {
          "brand": "TotalEnergies",
          "averagePrice": 2252,
          "stations": 743,
          "others": false
        },
        {
          "brand": "Netto",
          "averagePrice": 2375,
          "stations": 60,
          "others": false
        }
      ],
      "stations": 6024,
      "terciles": [
        2359,
        2398
      ]
    }
  },
  "regions": [
    {
      "code": "11",
      "slug": "ile-de-france",
      "name": "Île-de-France",
      "all": {
        "brands": [
          {
            "brand": "Total Access",
            "averagePrice": 2250,
            "stations": 55,
            "others": false
          },
          {
            "brand": "TotalEnergies",
            "averagePrice": 2250,
            "stations": 174,
            "others": false
          }
        ],
        "stations": 644,
        "terciles": [
          2250,
          2410
        ]
      },
      "excludingHighways": {
        "brands": [
          {
            "brand": "Total Access",
            "averagePrice": 2250,
            "stations": 55,
            "others": false
          },
          {
            "brand": "TotalEnergies",
            "averagePrice": 2250,
            "stations": 156,
            "others": false
          }
        ],
        "stations": 610,
        "terciles": [
          2250,
          2409
        ]
      }
    }
  ]
}

3. Price a fleet's overspend

Describe the fleet (brand used today, mileage, vehicles by type and consumption): the API returns its yearly overspend at the pump compared with the cheapest brand, in cents, and its ETS2 carbon cost from 2028. Nothing is stored.

POST/v1/fleet-costsScope fleet-costs:read
Request
curl -X POST "https://api.floweet.com/v1/fleet-costs" \
  -H "Authorization: Bearer $FLOWEET_API_KEY" \
  -H "Idempotency-Key: 6f1c2b0e-8d4a-4f7e-9a51-3c2d1e0f9b87" \
  -H "Content-Type: application/json" \
  -d '{
  "fuel": "gazole",
  "currentBrand": "Esso",
  "reference": "cheapest",
  "kmPerVehicle": 30000,
  "lines": [
    {
      "type": "lcv",
      "vehicles": 12,
      "consumptionL100": 8.5
    },
    {
      "type": "hgv",
      "vehicles": 3,
      "consumptionL100": 30
    }
  ]
}'
Response 200
{
  "fuel": "gazole",
  "pricesFrom": "2026-10-19T11:35:43.000Z",
  "pricesTo": "2026-10-26T11:00:00.000Z",
  "vehicles": 15,
  "currentBrand": "Esso",
  "currentPrice": 2428,
  "referenceBrand": "Total Access",
  "referencePrice": 2252,
  "lines": [
    {
      "type": "lcv",
      "vehicles": 12,
      "consumptionL100": 8.5,
      "litersPerYear": 30600,
      "overspendPerYear": 538600,
      "overspendPerVehicle": 44900,
      "co2Tonnes": 75.9,
      "ets2PerYear": 341500
    },
    {
      "type": "hgv",
      "vehicles": 3,
      "consumptionL100": 30,
      "litersPerYear": 27000,
      "overspendPerYear": 475200,
      "overspendPerVehicle": 158400,
      "co2Tonnes": 67,
      "ets2PerYear": 301300
    }
  ],
  "total": {
    "litersPerYear": 57600,
    "overspendPerYear": 1013800,
    "co2Tonnes": 142.8,
    "ets2PerYear": 642800
  },
  "replaceFirst": "hgv",
  "ets2": {
    "startYear": 2028,
    "pricePerTonne": 4500,
    "costPerLiter": 112
  }
}

4. Save a prospect

The same fleet, saved as one of your organization's prospects: its cost is recomputed on this week's prices every time you read it. The Idempotency-Key header lets you retry without creating the same prospect twice (see idempotency).

POST/v1/prospectsScope prospects:write
Request
curl -X POST "https://api.floweet.com/v1/prospects" \
  -H "Authorization: Bearer $FLOWEET_API_KEY" \
  -H "Idempotency-Key: 6f1c2b0e-8d4a-4f7e-9a51-3c2d1e0f9b87" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Transports Martin",
  "fleet": {
    "fuel": "gazole",
    "currentBrand": "Esso",
    "reference": "cheapest",
    "kmPerVehicle": 30000,
    "lines": [
      {
        "type": "lcv",
        "vehicles": 12,
        "consumptionL100": 8.5
      },
      {
        "type": "hgv",
        "vehicles": 3,
        "consumptionL100": 30
      }
    ]
  }
}'
Response 201
{
  "id": "33e3daba-2998-438d-a05e-1c513009107a",
  "name": "Transports Martin",
  "updatedAt": "2026-10-26T11:46:19.310433+00:00",
  "input": {
    "fuel": "gazole",
    "currentBrand": "Esso",
    "reference": "cheapest",
    "kmPerVehicle": 30000,
    "lines": [
      {
        "type": "lcv",
        "vehicles": 12,
        "consumptionL100": 8.5
      },
      {
        "type": "hgv",
        "vehicles": 3,
        "consumptionL100": 30
      }
    ]
  },
  "cost": {
    "fuel": "gazole",
    "pricesFrom": "2026-10-19T11:35:43.000Z",
    "pricesTo": "2026-10-26T11:00:00.000Z",
    "vehicles": 15,
    "currentBrand": "Esso",
    "currentPrice": 2428,
    "referenceBrand": "Total Access",
    "referencePrice": 2252,
    "lines": [
      {
        "type": "lcv",
        "vehicles": 12,
        "consumptionL100": 8.5,
        "litersPerYear": 30600,
        "overspendPerYear": 538600,
        "overspendPerVehicle": 44900,
        "co2Tonnes": 75.9,
        "ets2PerYear": 341500
      },
      {
        "type": "hgv",
        "vehicles": 3,
        "consumptionL100": 30,
        "litersPerYear": 27000,
        "overspendPerYear": 475200,
        "overspendPerVehicle": 158400,
        "co2Tonnes": 67,
        "ets2PerYear": 301300
      }
    ],
    "total": {
      "litersPerYear": 57600,
      "overspendPerYear": 1013800,
      "co2Tonnes": 142.8,
      "ets2PerYear": 642800
    },
    "replaceFirst": "hgv",
    "ets2": {
      "startYear": 2028,
      "pricePerTonne": 4500,
      "costPerLiter": 112
    }
  }
}

The 201 response carries a Location header (/v1/prospects/{id}). Keep the id to read or replace it.

5. Find a company

Search the SIRENE directory by name, SIREN or SIRET, filtered by department or activity (NAF code). An establishment's record also gives an estimate of its fleet (see companies).

GET/v1/companiesScope companies:read
Request
curl "https://api.floweet.com/v1/companies?q=transports%20martin" \
  -H "Authorization: Bearer $FLOWEET_API_KEY"
Response 200
{
  "results": [
    {
      "siret": "84983050000013",
      "siren": "849830500",
      "name": "TS TRANSPORTS",
      "legalName": "TS TRANSPORTS",
      "naf": "49.41A",
      "address": "111 AVENUE ALEXANDER FLEMING",
      "postalCode": "69300",
      "city": "CALUIRE-ET-CUIRE",
      "department": "69",
      "location": {
        "lat": 45.7936248779297,
        "lng": 4.84831619262695
      },
      "headOffice": true,
      "active": true
    },
    {
      "siret": "85183625400017",
      "siren": "851836254",
      "name": "TRANSPORTS TR",
      "legalName": "TRANSPORTS TR",
      "naf": "49.32Z",
      "address": "227 RUE DU GENERAL DE GAULLE",
      "postalCode": "69530",
      "city": "BRIGNAIS",
      "department": "69",
      "location": {
        "lat": 45.6660766601562,
        "lng": 4.75257873535156
      },
      "headOffice": true,
      "active": true
    }
  ]
}

6. Go live

When your integration is ready, ask for production at the same address. Once our team has reviewed it, you receive an fw_live_… key: the same code, with no other change, then runs in production, without a daily quota, and a simulation's pitch is written by AI when the service is available (see sandbox and production).