Fuel Price Code
The fuel price code resource.
Base/fuelPriceCode
GET
/fuelPriceCodeList fuel price codes
Retrieve a paginated list of fuel price codes. Filter, order, and select columns with PostgREST query parameters.
Query parameters
selectstringComma-separated columns to return. Defaults to all.
orderstringColumn to sort by, e.g. `createdAt.desc`.
limitintegerMaximum rows to return.
offsetintegerRows 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
/fuelPriceCodeRetrieve a fuel price code
Fetch a single fuel price code by filtering on `id`.
Query parameters
idstringMatch 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
/fuelPriceCodeCreate a fuel price code
Create a new fuel price code.
Body parameters
namestringrequiredpricePerGallonnumberrequiredeffectiveFromdateeffectiveTodateactivebooleanrequiredPOST/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
/fuelPriceCodeUpdate a fuel price code
Update an existing fuel price code, matched on `id`.
Body parameters
namestringrequiredpricePerGallonnumberrequiredeffectiveFromdateeffectiveTodateactivebooleanrequiredPATCH/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
/fuelPriceCodeDelete a fuel price code
Delete a fuel price code, matched on `id`. Returns 204 No Content.
Query parameters
idstringThe `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