Get Delivery Services
starshipit_get_delivery_servicesFetches available carrier delivery services and service codes for an existing order or a new route, enabling selection and population of shipping options during order creation or updates.
Instructions
Get available delivery services (carrier + service options) for a specific order or a general route. Returns service codes that are directly usable when creating or updating orders.
When to use: Prefer this over starshipit_get_rates when:
You have an existing order (
order_id) and need the services available for itYou want to populate a dropdown or list of services that a user can select (the returned
service_codevalues map directly to the StarShipIt order field)You need a fresh rate lookup — pass
refresh_rate: trueto bypass any cached result
Parameters:
order_id(optional) — existing order ID to fetch services for; if omitted, sender/destination/packages are usedrefresh_rate(optional, default false) — settrueto force a live carrier rate lookup instead of returning cached datasender,destination,packages— same shape asstarshipit_get_rates; required whenorder_idis not provided
Returns: An array of service objects, each with:
carrier/carrier_name— carrier identifier and display nameservice_name/service_code— description and the code to pass to order create/updatetotal_price— quoted pricepricing_breakdown— price ex GST, GST, and estimated delivery days (JSON format)
Errors:
400 — missing required fields or invalid address/package data
404 — order_id not found
401/403 — authentication failure
Example — get services for an existing order:
{ "order_id": 100000, "refresh_rate": true }Example — get services for a new route:
{
"sender": { "street": "10 Geonic Street", "suburb": "Woodridge", "state": "QLD", "post_code": "4114", "country_code": "AU" },
"destination": { "street": "10 Geoffrey Place", "suburb": "Mangere East", "city": "Auckland", "post_code": "2024", "country_code": "NZ" },
"packages": [{ "weight": 1.2 }]
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sender | No | Origin/pickup address — required when order_id is not provided | |
| order_id | No | Existing StarShipIt order ID to fetch delivery services for | |
| packages | No | Packages to ship — required when order_id is not provided; weight (kg) is required per package | |
| destination | No | Delivery address — required when order_id is not provided | |
| refresh_rate | No | Set true to force a fresh rate lookup (bypass cache) | |
| 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) |