Skip to content

Fuel Price Code

The fuel price code resource.

Base/fuelPriceCode
GET/fuelPriceCode

List fuel price codes

Retrieve a paginated list of fuel price codes. Filter, order, and select columns with PostgREST query parameters.

Query parameters

selectstring

Comma-separated columns to return. Defaults to all.

orderstring

Column to sort by, e.g. `createdAt.desc`.

limitinteger

Maximum rows to return.

offsetinteger

Rows to skip, for pagination.

GET/fuelPriceCode
curl --request GET \
  --url '<your-host>/fuelPriceCode?select=*&limit=10' \
  --header 'Authorization: Bearer <api-key>'
Response
[
  {
    "id": "abc123def456",
    "companyId": "xyz789",
    "name": "Example",
    "pricePerGallon": 0,
    "active": true,
    "createdBy": "string",
    "createdAt": "2026-01-01T00:00:00Z",
    "updatedAt": "2026-01-01T00:00:00Z"
  }
]
GET/fuelPriceCode

Retrieve a fuel price code

Fetch a single fuel price code by filtering on `id`.

Query parameters

idstring

Match on the fuel price code's `id`, e.g. `eq.{id}`.

GET/fuelPriceCode
curl --request GET \
  --url '<your-host>/fuelPriceCode?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
Response
{
  "id": "abc123def456",
  "companyId": "xyz789",
  "name": "Example",
  "pricePerGallon": 0,
  "active": true,
  "createdBy": "string",
  "createdAt": "2026-01-01T00:00:00Z",
  "updatedAt": "2026-01-01T00:00:00Z"
}
POST/fuelPriceCode

Create a fuel price code

Create a new fuel price code.

Body parameters

namestringrequired
pricePerGallonnumberrequired
effectiveFromdate
effectiveTodate
activebooleanrequired
POST/fuelPriceCode
curl --request POST \
  --url <your-host>/fuelPriceCode \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"name":"Example","pricePerGallon":0,"active":true}'
Response
{
  "id": "abc123def456",
  "companyId": "xyz789",
  "name": "Example",
  "pricePerGallon": 0,
  "active": true,
  "createdBy": "string",
  "createdAt": "2026-01-01T00:00:00Z",
  "updatedAt": "2026-01-01T00:00:00Z"
}
PATCH/fuelPriceCode

Update a fuel price code

Update an existing fuel price code, matched on `id`.

Body parameters

namestringrequired
pricePerGallonnumberrequired
effectiveFromdate
effectiveTodate
activebooleanrequired
PATCH/fuelPriceCode
curl --request PATCH \
  --url '<your-host>/fuelPriceCode?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"name":"Example"}'
Response
{
  "id": "abc123def456",
  "companyId": "xyz789",
  "name": "Example",
  "pricePerGallon": 0,
  "active": true,
  "createdBy": "string",
  "createdAt": "2026-01-01T00:00:00Z",
  "updatedAt": "2026-01-01T00:00:00Z"
}
DELETE/fuelPriceCode

Delete a fuel price code

Delete a fuel price code, matched on `id`. Returns 204 No Content.

Query parameters

idstring

The `id` of the fuel price code to delete, e.g. `eq.{id}`.

DELETE/fuelPriceCode
curl --request DELETE \
  --url '<your-host>/fuelPriceCode?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
204 No Content