Tank Price Contract
The tank price contract resource.
Base/tankPriceContract
GET
/tankPriceContractList tank price contracts
Retrieve a paginated list of tank price contracts. 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/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
/tankPriceContractRetrieve a tank price contract
Fetch a single tank price contract by filtering on `id`.
Query parameters
idstringMatch 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
/tankPriceContractCreate a tank price contract
Create a new tank price contract.
Body parameters
readableIdstringrequiredtankIdstringrequiredcustomerIdstringrequiredReferences customer.id
priceCodestringpricingTypestringpricingPlanstringplanPricePerGallonnumberpriceCodePricePerGallonnumbercompanyCostPerGallonnumberdiscountPerGallonnumberpriceAdjustmentPerGallonnumberpriceCapPerGallonnumberfixedPricebooleanrequiredprebuybooleanrequiredtieredProgrambooleanrequiredtieredProgramNamestringeffectivebooleanrequiredeffectiveDatedateendDatedategallonsLimitnumbergallonsToDatenumberdollarsLimitnumberdollarsToDatenumberdeliveriesLimitnumberdeliveriesToDatenumberpromptPayDaysnumberPOST/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
/tankPriceContractUpdate a tank price contract
Update an existing tank price contract, matched on `id`.
Body parameters
readableIdstringrequiredtankIdstringrequiredcustomerIdstringrequiredReferences customer.id
priceCodestringpricingTypestringpricingPlanstringplanPricePerGallonnumberpriceCodePricePerGallonnumbercompanyCostPerGallonnumberdiscountPerGallonnumberpriceAdjustmentPerGallonnumberpriceCapPerGallonnumberfixedPricebooleanrequiredprebuybooleanrequiredtieredProgrambooleanrequiredtieredProgramNamestringeffectivebooleanrequiredeffectiveDatedateendDatedategallonsLimitnumbergallonsToDatenumberdollarsLimitnumberdollarsToDatenumberdeliveriesLimitnumberdeliveriesToDatenumberpromptPayDaysnumberPATCH/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
/tankPriceContractDelete a tank price contract
Delete a tank price contract, matched on `id`. Returns 204 No Content.
Query parameters
idstringThe `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