Authenticate with your ShipEngine API key via the 'API-Key' header on all requests to the ShipEngine API base URL.
POST to the rates endpoint (verify current path in docs) with a 'shipment' object containing 'ship_from', 'ship_to', and 'packages' (each with 'weight' and optionally 'dimensions'); include a 'rate_options' object specifying 'carrier_ids' (array of ShipEngine carrier IDs to rate) and any 'service_codes' to restrict results.
The response returns a 'rate_response.rates' array; each rate includes 'carrier_id', 'service_code', 'service_type', 'shipping_amount.amount', 'delivery_days', and 'estimated_delivery_date'.
Filter rates by 'delivery_days' or 'estimated_delivery_date' to exclude options that do not meet your SLA, then sort remaining rates by 'shipping_amount.amount' to identify the cheapest compliant option.
Note the 'rate_id' of the selected rate; this ID is used in the subsequent label purchase request.
Optionally inspect 'warning_messages' and 'error_messages' on each rate to surface carrier-specific issues (e.g., address not in service area, package too large) before attempting label purchase.
Known gotchas
ShipEngine rate IDs are short-lived (verify TTL in current docs); purchase the label promptly using the rate_id or the rates will expire and require a new rate request.
Carrier IDs in ShipEngine are account-specific identifiers returned when you connect a carrier account; you cannot use generic carrier names — you must have connected the carrier account and recorded its 'carrier_id' first.
Dimensional weight is factored into rates when package dimensions are provided; omitting dimensions may return rates based on actual weight only and result in unexpected carrier adjustments at billing time.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp