Delivery Surcharge
The delivery surcharge resource.
Base/deliverySurcharge
GET
/deliverySurchargeList delivery surcharges
Retrieve a paginated list of delivery surcharges. 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/deliverySurcharge
curl --request GET \
--url '<your-host>/deliverySurcharge?select=*&limit=10' \
--header 'Authorization: Bearer <api-key>'Response
[
{
"id": "abc123def456",
"companyId": "xyz789",
"readableId": "xyz789",
"kind": "string",
"name": "Example",
"amount": 0,
"chargeBasis": "string",
"active": true
}
]GET
/deliverySurchargeRetrieve a delivery surcharge
Fetch a single delivery surcharge by filtering on `id`.
Query parameters
idstringMatch on the delivery surcharge's `id`, e.g. `eq.{id}`.
GET/deliverySurcharge
curl --request GET \
--url '<your-host>/deliverySurcharge?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>'Response
{
"id": "abc123def456",
"companyId": "xyz789",
"readableId": "xyz789",
"kind": "string",
"name": "Example",
"amount": 0,
"chargeBasis": "string",
"active": true
}POST
/deliverySurchargeCreate a delivery surcharge
Create a new delivery surcharge.
Body parameters
readableIdstringrequiredkindstringrequirednamestringrequiredamountnumberrequiredchargeBasisstringrequiredactivebooleanrequiredeffectiveFromdateeffectiveTodatePOST/deliverySurcharge
curl --request POST \
--url <your-host>/deliverySurcharge \
--header 'Authorization: Bearer <api-key>' \
--header 'Content-Type: application/json' \
--header 'Prefer: return=representation' \
--data '{"readableId":"xyz789","kind":"string","name":"Example","amount":0,"chargeBasis":"string","active":true}'Response
{
"id": "abc123def456",
"companyId": "xyz789",
"readableId": "xyz789",
"kind": "string",
"name": "Example",
"amount": 0,
"chargeBasis": "string",
"active": true
}PATCH
/deliverySurchargeUpdate a delivery surcharge
Update an existing delivery surcharge, matched on `id`.
Body parameters
readableIdstringrequiredkindstringrequirednamestringrequiredamountnumberrequiredchargeBasisstringrequiredactivebooleanrequiredeffectiveFromdateeffectiveTodatePATCH/deliverySurcharge
curl --request PATCH \
--url '<your-host>/deliverySurcharge?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",
"kind": "string",
"name": "Example",
"amount": 0,
"chargeBasis": "string",
"active": true
}DELETE
/deliverySurchargeDelete a delivery surcharge
Delete a delivery surcharge, matched on `id`. Returns 204 No Content.
Query parameters
idstringThe `id` of the delivery surcharge to delete, e.g. `eq.{id}`.
DELETE/deliverySurcharge
curl --request DELETE \
--url '<your-host>/deliverySurcharge?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>'204 No Content