Delivery Stop Cost
What one delivery cost to make: product cost and additional cost from the books, and our allocation of labor, fuel, truck and overhead. Never a charge billed to the customer; those are invoice lines.
/deliveryStopCostList delivery stop costs
Retrieve a paginated list of delivery stop costs. 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.
curl --request GET \
--url '<your-host>/deliveryStopCost?select=*&limit=10' \
--header 'Authorization: Bearer <api-key>'[
{
"id": "abc123def456",
"companyId": "xyz789",
"deliveryFillOrderId": "xyz789",
"productCost": 0,
"additionalCost": 0,
"laborCost": 0,
"fuelCost": 0,
"truckCost": 0
}
]/deliveryStopCostRetrieve a delivery stop cost
Fetch a single delivery stop cost by filtering on `id`.
Query parameters
idstringMatch on the delivery stop cost's `id`, e.g. `eq.{id}`.
curl --request GET \
--url '<your-host>/deliveryStopCost?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>'{
"id": "abc123def456",
"companyId": "xyz789",
"deliveryFillOrderId": "xyz789",
"productCost": 0,
"additionalCost": 0,
"laborCost": 0,
"fuelCost": 0,
"truckCost": 0
}/deliveryStopCostCreate a delivery stop cost
Create a new delivery stop cost.
Body parameters
deliveryFillOrderIdstringrequiredproductCostnumberrequiredadditionalCostnumberrequiredlaborCostnumberrequiredfuelCostnumberrequiredtruckCostnumberrequiredoverheadAllocationnumberrequiredroundTripMilesnumbertotalCostnumberGenerated: productCost + additionalCost + laborCost + fuelCost + truckCost + overheadAllocation. May be negative on a pickup.
curl --request POST \
--url <your-host>/deliveryStopCost \
--header 'Authorization: Bearer <api-key>' \
--header 'Content-Type: application/json' \
--header 'Prefer: return=representation' \
--data '{"deliveryFillOrderId":"xyz789","productCost":0,"additionalCost":0,"laborCost":0,"fuelCost":0,"truckCost":0,"overheadAllocation":0}'{
"id": "abc123def456",
"companyId": "xyz789",
"deliveryFillOrderId": "xyz789",
"productCost": 0,
"additionalCost": 0,
"laborCost": 0,
"fuelCost": 0,
"truckCost": 0
}/deliveryStopCostUpdate a delivery stop cost
Update an existing delivery stop cost, matched on `id`.
Body parameters
deliveryFillOrderIdstringrequiredproductCostnumberrequiredadditionalCostnumberrequiredlaborCostnumberrequiredfuelCostnumberrequiredtruckCostnumberrequiredoverheadAllocationnumberrequiredroundTripMilesnumbertotalCostnumberGenerated: productCost + additionalCost + laborCost + fuelCost + truckCost + overheadAllocation. May be negative on a pickup.
curl --request PATCH \
--url '<your-host>/deliveryStopCost?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>' \
--header 'Content-Type: application/json' \
--header 'Prefer: return=representation' \
--data '{"deliveryFillOrderId":"xyz789"}'{
"id": "abc123def456",
"companyId": "xyz789",
"deliveryFillOrderId": "xyz789",
"productCost": 0,
"additionalCost": 0,
"laborCost": 0,
"fuelCost": 0,
"truckCost": 0
}/deliveryStopCostDelete a delivery stop cost
Delete a delivery stop cost, matched on `id`. Returns 204 No Content.
Query parameters
idstringThe `id` of the delivery stop cost to delete, e.g. `eq.{id}`.
curl --request DELETE \
--url '<your-host>/deliveryStopCost?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>'