Skip to content

Tank Price Contract

The tank price contract resource.

Base/tankPriceContract
GET/tankPriceContract

List tank price contracts

Retrieve a paginated list of tank price contracts. 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/tankPriceContract
curl --request GET \
  --url '<your-host>/tankPriceContract?select=*&limit=10' \
  --header 'Authorization: Bearer <api-key>'
Response
[
  {
    "id": "abc123def456",
    "companyId": "xyz789",
    "readableId": "xyz789",
    "tankId": "xyz789",
    "customerId": "xyz789",
    "fixedPrice": true,
    "prebuy": true,
    "tieredProgram": true
  }
]
GET/tankPriceContract

Retrieve a tank price contract

Fetch a single tank price contract by filtering on `id`.

Query parameters

idstring

Match on the tank price contract's `id`, e.g. `eq.{id}`.

GET/tankPriceContract
curl --request GET \
  --url '<your-host>/tankPriceContract?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
Response
{
  "id": "abc123def456",
  "companyId": "xyz789",
  "readableId": "xyz789",
  "tankId": "xyz789",
  "customerId": "xyz789",
  "fixedPrice": true,
  "prebuy": true,
  "tieredProgram": true
}
POST/tankPriceContract

Create a tank price contract

Create a new tank price contract.

Body parameters

readableIdstringrequired
tankIdstringrequired
customerIdstringrequired

References customer.id

priceCodestring
pricingTypestring
pricingPlanstring
planPricePerGallonnumber
priceCodePricePerGallonnumber
companyCostPerGallonnumber
discountPerGallonnumber
priceAdjustmentPerGallonnumber
priceCapPerGallonnumber
fixedPricebooleanrequired
prebuybooleanrequired
tieredProgrambooleanrequired
tieredProgramNamestring
effectivebooleanrequired
effectiveDatedate
endDatedate
gallonsLimitnumber
gallonsToDatenumber
dollarsLimitnumber
dollarsToDatenumber
deliveriesLimitnumber
deliveriesToDatenumber
promptPayDaysnumber
POST/tankPriceContract
curl --request POST \
  --url <your-host>/tankPriceContract \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"readableId":"xyz789","tankId":"xyz789","customerId":"xyz789","fixedPrice":true,"prebuy":true,"tieredProgram":true,"effective":true}'
Response
{
  "id": "abc123def456",
  "companyId": "xyz789",
  "readableId": "xyz789",
  "tankId": "xyz789",
  "customerId": "xyz789",
  "fixedPrice": true,
  "prebuy": true,
  "tieredProgram": true
}
PATCH/tankPriceContract

Update a tank price contract

Update an existing tank price contract, matched on `id`.

Body parameters

readableIdstringrequired
tankIdstringrequired
customerIdstringrequired

References customer.id

priceCodestring
pricingTypestring
pricingPlanstring
planPricePerGallonnumber
priceCodePricePerGallonnumber
companyCostPerGallonnumber
discountPerGallonnumber
priceAdjustmentPerGallonnumber
priceCapPerGallonnumber
fixedPricebooleanrequired
prebuybooleanrequired
tieredProgrambooleanrequired
tieredProgramNamestring
effectivebooleanrequired
effectiveDatedate
endDatedate
gallonsLimitnumber
gallonsToDatenumber
dollarsLimitnumber
dollarsToDatenumber
deliveriesLimitnumber
deliveriesToDatenumber
promptPayDaysnumber
PATCH/tankPriceContract
curl --request PATCH \
  --url '<your-host>/tankPriceContract?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"readableId":"xyz789"}'
Response
{
  "id": "abc123def456",
  "companyId": "xyz789",
  "readableId": "xyz789",
  "tankId": "xyz789",
  "customerId": "xyz789",
  "fixedPrice": true,
  "prebuy": true,
  "tieredProgram": true
}
DELETE/tankPriceContract

Delete a tank price contract

Delete a tank price contract, matched on `id`. Returns 204 No Content.

Query parameters

idstring

The `id` of the tank price contract to delete, e.g. `eq.{id}`.

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