Skip to content

Delivery Surcharge

The delivery surcharge resource.

Base/deliverySurcharge
GET/deliverySurcharge

List delivery surcharges

Retrieve a paginated list of delivery surcharges. 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/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/deliverySurcharge

Retrieve a delivery surcharge

Fetch a single delivery surcharge by filtering on `id`.

Query parameters

idstring

Match 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/deliverySurcharge

Create a delivery surcharge

Create a new delivery surcharge.

Body parameters

readableIdstringrequired
kindstringrequired
namestringrequired
amountnumberrequired
chargeBasisstringrequired
activebooleanrequired
effectiveFromdate
effectiveTodate
POST/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/deliverySurcharge

Update a delivery surcharge

Update an existing delivery surcharge, matched on `id`.

Body parameters

readableIdstringrequired
kindstringrequired
namestringrequired
amountnumberrequired
chargeBasisstringrequired
activebooleanrequired
effectiveFromdate
effectiveTodate
PATCH/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/deliverySurcharge

Delete a delivery surcharge

Delete a delivery surcharge, matched on `id`. Returns 204 No Content.

Query parameters

idstring

The `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