Endpoint
Authorization: Bearer <token> on every request. This endpoint requires the billing:manage or courier:manage permission and is accessible to admin and manager roles only.
GET — Retrieve Rates
Send aGET request to fetch rate tables. Without a query parameter the response includes global default rates and a list of all couriers with their specific rate overrides. Append ?courier_id=<uuid> to scope the response to a single courier.
Query Parameters
string
UUID of the courier whose specific rates you want to retrieve. When omitted, the response includes rate data for all couriers.
Response Fields
string
required
"success" on a successful retrieval.object
required
If
uses_global_rates is true for a courier, it means no courier-specific rates are defined and the global defaults apply to all their packages.Example Response (Single Courier)
POST Actions
All POST requests must be sent asapplication/json. Every successful action returns the same envelope:
action field in the request body to specify the operation.
save_rates — Create or Update Rate Tiers
Upserts the complete rate table for a courier or for the global defaults. The submitted rates array is treated as the full intended state: rows with an id are updated, rows without an id are inserted, and any existing rows for that courier not present in the array are deleted.
- Request Fields
- Example
copy_default — Copy Global Defaults to a Courier
Clears all existing specific rate rows for the specified courier and replaces them with an exact copy of the current global default tiers. After this action, uses_global_rates will be false and the courier will have its own mirrored copy of the defaults.
- Request Fields
- Example
delete_rate — Remove a Single Rate Tier
Deletes one rate tier row by its ID. Use this for surgical removals rather than a full save_rates replacement when only a single row needs to be dropped.
- Request Fields
- Example