Ir al contenido
Floweet
Acceso profesional

Prospects

Save your prospects' fleets with their fuel and carbon overspend recomputed on this week's prices: create, read, replace and delete them.

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 · Prospects

An organization's prospects: a name and a fleet, described as for the fleet cost. Every read recomputes the fuel and carbon overspend on this week's prices: a prospect saved in October reads, in November, with November's prices.

Good to know

  • Prospects belong to the key's organization: they are the same as in the application's Sales space, and the API acts for the API account's designated member.
  • An organization keeps 200 prospects at most: beyond that, 422 prospect_limit. Delete those you no longer need.
  • PUT replaces the whole prospect (name and fleet): always send the complete fleet. Deletion is final and answers { ok: true }.
  • Creation accepts Idempotency-Key: after a network failure, retry with the same key without creating a duplicate (see idempotency). The 201 response carries a Location header.
  • In the list, overspendPerYear and ets2PerYear are totals in cents; the breakdown by vehicle type is in the detail.

The Prospect object

FieldTypeDescription
idalways presentstring
namealways presentstring
vehiclesalways presentinteger
overspendPerYearalways presentintegerCents per year.
ets2PerYearalways presentinteger
updatedAtalways presentstring (date-time)
Prospect
{
  "id": "33e3daba-2998-438d-a05e-1c513009107a",
  "name": "Transports Martin",
  "vehicles": 15,
  "overspendPerYear": 1013800,
  "ets2PerYear": 642800,
  "updatedAt": "2026-10-26T11:46:19.310433+00:00"
}

The ProspectDetail object

FieldTypeDescription
idalways presentstring
namealways presentstring
updatedAtalways presentstring (date-time)
inputalways presentFleetInput
costalways presentFleetCost
ProspectDetail
{
  "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 FleetInput object

FieldTypeDescription
fueloptional"gazole" | "sp95-e10" | "sp98" | "e85" | "gpl"default "gazole"
currentBrandalways presentstring1 to 60 charactersBrand where the fleet fills up today (a brand name of /v1/barometer).
referenceoptional"cheapest" | "supermarkets"default "cheapest"Compare with the cheapest brand or with the supermarket average.
kmPerVehiclealways presentintegerfrom 0 to 500000
linesalways presentobject[]1 to 3 items
lines[].typealways present"car" | "lcv" | "hgv"car, lcv (light commercial vehicle), hgv (heavy goods vehicle).
lines[].vehiclesalways presentintegerfrom 0 to 100000
lines[].consumptionL100always presentnumberfrom 0 to 100Liters per 100 km.
FleetInput
{
  "fuel": "gazole",
  "currentBrand": "Esso",
  "reference": "cheapest",
  "kmPerVehicle": 30000,
  "lines": [
    {
      "type": "lcv",
      "vehicles": 12,
      "consumptionL100": 8.5
    },
    {
      "type": "hgv",
      "vehicles": 3,
      "consumptionL100": 30
    }
  ]
}

The FleetCost object

FieldTypeDescription
fuelalways present"gazole" | "sp95-e10" | "sp98" | "e85" | "gpl"
pricesFromalways presentstring (date-time)
pricesToalways presentstring (date-time)
vehiclesalways presentinteger
currentBrandalways presentstring
currentPricealways presentinteger | nullAverage price of the current brand; null if unknown (no overspend computed).
referenceBrandalways presentstring | null
referencePricealways presentinteger | nullPrice in thousandths of a euro per liter (2372 = 2.372 €/L).
linesalways presentobject[]
lines[].typealways present"car" | "lcv" | "hgv"
lines[].vehiclesalways presentinteger
lines[].consumptionL100always presentnumber
lines[].litersPerYearalways presentinteger
lines[].overspendPerYearalways presentintegerCents per year.
lines[].overspendPerVehiclealways presentintegerCents per vehicle per year.
lines[].co2Tonnesalways presentnumber
lines[].ets2PerYearalways presentintegerETS2 carbon cost, cents per year from 2028.
totalalways presentobject
total.litersPerYearalways presentinteger
total.overspendPerYearalways presentinteger
total.co2Tonnesalways presentnumber
total.ets2PerYearalways presentinteger
replaceFirstalways present"car" | "lcv" | "hgv" | nullVehicle type costing the most per vehicle (fuel + ETS2).
ets2always presentobject
ets2.startYearalways presentinteger
ets2.pricePerTonnealways presentintegerCents per tonne of CO2 (hypothesis).
ets2.costPerLiteralways presentintegerThousandths of a euro per liter.
FleetCost
{
  "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
  }
}

Prospects of the organization, with their yearly overspend (200 at most)

GET/v1/prospectsScope prospects:read

Parameters

FieldInTypeDescription
limitoptionalqueryintegerfrom 1 to 100 · default 20Number of items per page (1 to 100, 20 by default).
cursoroptionalquerystringat most 400 charactersOpaque cursor: the nextCursor value of the previous page.

Response 200

OK — A page of Prospect { data, nextCursor, hasMore }

Errors

HTTPMeaning
400Invalid request
401Missing, invalid or revoked API key
403Forbidden (scope, plan or account status)
404Resource not found
429Too many requests
500Internal error
Request
curl "https://api.floweet.com/v1/prospects" \
  -H "Authorization: Bearer $FLOWEET_API_KEY"
Response 200
{
  "data": [
    {
      "id": "33e3daba-2998-438d-a05e-1c513009107a",
      "name": "Transports Martin",
      "vehicles": 15,
      "overspendPerYear": 1013800,
      "ets2PerYear": 642800,
      "updatedAt": "2026-10-26T11:46:19.310433+00:00"
    }
  ],
  "nextCursor": null,
  "hasMore": false
}

Add a prospect and its fleet

POST/v1/prospectsScope prospects:write

Parameters

FieldInTypeDescription
Idempotency-Keyoptionalheaderstringat most 255 charactersUnique key for this request (a new UUID v4, kept for its retries): the first response is replayed for 24 hours.

Request body ProspectInput

FieldTypeDescription
namerequiredstring1 to 200 characters
fleetrequiredFleetInput

Response 201

Prospect created — A ProspectDetail object

Errors

HTTPMeaning
400Invalid request
401Missing, invalid or revoked API key
403Forbidden (scope, plan or account status)
404Resource not found
409Conflict
422Unprocessable request
429Too many requests
500Internal error
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
    }
  }
}

A prospect: fleet input and cost by vehicle type

GET/v1/prospects/{id}Scope prospects:read

Parameters

FieldInTypeDescription
idrequiredpathstring (uuid)

Response 200

OK — A ProspectDetail object

Errors

HTTPMeaning
400Invalid request
401Missing, invalid or revoked API key
403Forbidden (scope, plan or account status)
404Resource not found
429Too many requests
500Internal error
Request
curl "https://api.floweet.com/v1/prospects/7d0c1f8e-2a4b-4c6d-9e8f-0a1b2c3d4e5f" \
  -H "Authorization: Bearer $FLOWEET_API_KEY"
Response 200
{
  "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
    }
  }
}

Replace a prospect (name and fleet)

PUT/v1/prospects/{id}Scope prospects:write

Parameters

FieldInTypeDescription
idrequiredpathstring (uuid)

Request body ProspectInput

FieldTypeDescription
namerequiredstring1 to 200 characters
fleetrequiredFleetInput

Response 200

OK — A ProspectDetail object

Errors

HTTPMeaning
400Invalid request
401Missing, invalid or revoked API key
403Forbidden (scope, plan or account status)
404Resource not found
429Too many requests
500Internal error
Request
curl -X PUT "https://api.floweet.com/v1/prospects/7d0c1f8e-2a4b-4c6d-9e8f-0a1b2c3d4e5f" \
  -H "Authorization: Bearer $FLOWEET_API_KEY" \
  -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 200
{
  "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
    }
  }
}

Delete a prospect

DELETE/v1/prospects/{id}Scope prospects:write

Parameters

FieldInTypeDescription
idrequiredpathstring (uuid)

Response 200

OK — { ok: true }

Errors

HTTPMeaning
400Invalid request
401Missing, invalid or revoked API key
403Forbidden (scope, plan or account status)
404Resource not found
429Too many requests
500Internal error
Request
curl -X DELETE "https://api.floweet.com/v1/prospects/7d0c1f8e-2a4b-4c6d-9e8f-0a1b2c3d4e5f" \
  -H "Authorization: Bearer $FLOWEET_API_KEY"
Response 200
{
  "ok": true
}