Get Shipping Rates
starshipit_get_ratesCompare available shipping rates by price for a shipment between sender and destination addresses using package dimensions, so you can choose a service before creating an order.
Instructions
Get available shipping rates (quotes) for a shipment between a sender and destination address with the given package dimensions.
When to use: Call this before creating an order when you need to compare services by price. It is read-only and safe to call multiple times.
Required parameters:
sender— pickup/origin address (street, suburb, post_code, country_code are required; city and state are optional but improve accuracy)destination— delivery address (same shape as sender)packages— array of package objects; each must haveweight(kg);height,width,length(all in metres) are optional but recommended for volumetric pricing
Returns: An array of rate objects, each with:
service_name/service_code— service description and machine-readable code (use service_code when setting a carrier on an order)total_price— quoted price in the account currency
Errors:
400 — invalid address or package data (check post_code format and country_code)
401/403 — authentication failure; verify API keys
No rates returned — the origin/destination combination may not be supported by any connected carrier
Example request body:
{
"sender": { "street": "184 Exhibition St", "suburb": "Melbourne", "post_code": "3000", "country_code": "AU", "state": "VIC" },
"destination": { "street": "20 Liverpool St", "suburb": "Paddington", "post_code": "2021", "country_code": "AU", "state": "NSW" },
"packages": [{ "weight": 0.5, "length": 0.3, "width": 0.2, "height": 0.1 }]
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sender | Yes | Origin/pickup address | |
| packages | Yes | One or more packages to ship; weight (kg) is required per package | |
| destination | Yes | Delivery address | |
| response_format | No | Output format: 'markdown' for human-readable or 'json' for machine-readable | markdown |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| errors | No | Validation or processing errors returned by StarShipIt | |
| object | No | The response payload when StarShipIt returns a non-object value | |
| success | No | StarShipIt success flag (a boolean on most endpoints) |