Skip to main content
PUT
/
settings
/
shipping
/
rates
Update Shipping Rates
curl --request PUT \
  --url https://staging-api.puppetvendors.com/settings/shipping/rates \
  --header 'Content-Type: application/json' \
  --header 'x-access-token: <api-key>' \
  --data '
{
  "method": "<string>",
  "amount": 123,
  "ranges": [
    {}
  ],
  "warehouseId": 123,
  "realtimeOption": "<string>"
}
'

Documentation Index

Fetch the complete documentation index at: https://dev.puppetvendors.com/llms.txt

Use this file to discover all available pages before exploring further.

V2 Preview — This endpoint is part of the V2 API preview. Breaking changes may occur.

Overview

Set or update the vendor’s shipping rate configuration. Choose a calculation method and provide the relevant details. Vendor scope required.

Request Body

method
string
required
One of order, lineItem, orderRange, orderWeight, realtime.
amount
number
Fixed amount — required when method is order or lineItem.
ranges
array
Array of { from, to, rate } — required when method is orderRange or orderWeight (grams for weight).
warehouseId
integer
Warehouse index to ship from — used when method is realtime.
realtimeOption
string
fastest or cheapest — used when method is realtime.

Response

200
{ "success": true }

Examples

Fixed per order
curl -X PUT "https://staging-api.puppetvendors.com/settings/shipping/rates" \
  -H "x-access-token: YOUR_VENDOR_JWT" \
  -H "Content-Type: application/json" \
  -d '{ "method": "order", "amount": 7.99 }'
Weight ranges (grams)
curl -X PUT "https://staging-api.puppetvendors.com/settings/shipping/rates" \
  -H "x-access-token: YOUR_VENDOR_JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "method": "orderWeight",
    "ranges": [
      { "from": 0, "to": 500, "rate": 3.5 },
      { "from": 500, "to": 2000, "rate": 7 }
    ]
  }'
Realtime carrier rates
curl -X PUT "https://staging-api.puppetvendors.com/settings/shipping/rates" \
  -H "x-access-token: YOUR_VENDOR_JWT" \
  -H "Content-Type: application/json" \
  -d '{ "method": "realtime", "warehouseId": 0, "realtimeOption": "cheapest" }'

More Examples

Flat rate per order
curl -X PUT "https://staging-api.puppetvendors.com/settings/shipping/rates" \
  -H "Content-Type: application/json" \
  -H "x-access-token: YOUR_TOKEN" \
  -d '{"method": "order", "amount": 5.99}'
Weight-based ranges
curl -X PUT "https://staging-api.puppetvendors.com/settings/shipping/rates" \
  -H "Content-Type: application/json" \
  -H "x-access-token: YOUR_TOKEN" \
  -d '{
    "method": "orderWeight",
    "ranges": [
      {"from": 0, "to": 1, "rate": 4.99},
      {"from": 1, "to": 5, "rate": 9.99},
      {"from": 5, "to": 50, "rate": 14.99}
    ]
  }'
Real-time rates from warehouse
curl -X PUT "https://staging-api.puppetvendors.com/settings/shipping/rates" \
  -H "Content-Type: application/json" \
  -H "x-access-token: YOUR_TOKEN" \
  -d '{"method": "realtime", "warehouseId": "507f1f77bcf86cd799439012", "realtimeOption": "cheapest"}'