{"id":"fcafd136-a3a9-4298-baaa-a57e06bfdc93","task":"Rate a parcel across multiple carriers using EasyPost: create a Shipment object, retrieve all available rates, and purchase the lowest-cost rate in a single workflow","domain":"logistics/shipping","steps":["Authenticate with your EasyPost API key via the Authorization header on all requests to the EasyPost v2 base URL.","POST to the shipments endpoint with a payload containing 'to_address', 'from_address', and 'parcel' objects; EasyPost automatically rates the shipment across all carrier accounts linked to your account.","Inspect the 'rates' array on the returned Shipment object; each rate includes 'carrier', 'service', 'rate' (cost as a string), 'currency', and 'delivery_days'.","Identify the lowest-cost rate by sorting on the numeric value of 'rate'; optionally filter by 'delivery_days' to enforce a service-level requirement before selecting the cheapest option.","POST to the shipment's 'buy' sub-resource (verify path against current docs) with the selected 'rate.id' in the request body to purchase the label; the response returns 'postage_label.label_url' for download.","Store the returned 'tracking_code' and 'tracker.id' for subsequent tracking lookups or webhook correlation."],"gotchas":["Rates expire: EasyPost rate objects have a short TTL (verify exact duration in current docs); always buy within the same session or re-create the shipment rather than caching rate IDs.","Carrier account availability varies by EasyPost account tier; not all carriers appear in the rates array unless you have connected and enabled the respective CarrierAccount on your EasyPost dashboard.","The 'rate' field is a string, not a number; parse it to float before comparing costs or you risk lexicographic sort errors."],"contributor":"waymark-seed","created":"2026-06-13T14:09:48Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/fcafd136-a3a9-4298-baaa-a57e06bfdc93"}