Tool reference
Rates, labels, and addresses
These tools price shipments, buy labels and check addresses. A typical flow: estimate a cost with quote_shipping (no order needed), rate a specific order with get_rates, then preview and confirm the purchase with buy_label. validate_address checks a US address on its own, and register_ups connects UPS so you can buy UPS labels. buy_label is available on access-token connections; the other four work on every connection and every plan.
Weights are always in ounces and dimensions in inches. Money is in US dollars as plain JSON numbers. rate_id and package_id are long opaque tokens (often 1 to 2 KB): pass them back exactly as received, and take both from the same get_rates response. They capture the price, service, package and ship-to address at the moment you rate. If you change the order's address, weight or dimensions, call get_rates again and use the new values. Rates from quote_shipping can't be bought. Some rating problems are returned as errors even when carriers priced options: a missing or invalid ship-from address ("Rating failed: the account's ship-from address is missing or invalid. Fix it in Settings before rating or buying labels.") and, for get_rates, a destination that failed address validation or needs a customs declaration. Any other problem that still leaves priced options comes back as a warning next to the rates. A warning always starts with "Rating failed: ", even when it's only an informational carrier notice such as a UPS surcharge, so read it before you buy.
quote_shipping
Gets shipping rates for a destination without an order, for example to estimate what a package will cost. Every call gets live carrier quotes and skips the short-lived rate cache; Flat Rate prices follow a USPS price list that is refreshed daily. Nothing is saved and no money moves. To buy a label you need an order: use get_rates and buy_label.
| Parameter | Type | Required | Description |
|---|---|---|---|
zip | string | Yes | Destination postal code. For US destinations send a 5-digit ZIP or ZIP+4 as a string, keeping leading zeros. Any other format is rated as an international destination, even when country is US. |
country | string | No | Two-letter destination country code. Default US. Any other country gets international USPS services and UPS Worldwide services. |
weight_oz | number | Yes | Package weight in ounces. Must be greater than 0. |
length | number | No | Length in inches, used for dimensional and cubic pricing. Default: unknown. |
width | number | No | Width in inches. Default: unknown. |
height | number | No | Height in inches. Default: unknown. |
from_zip | string | No | Origin ZIP code. Default: your account's ship-from address. When set, the quote uses a US origin with just this ZIP. |
Returns: destination (zip and country, after the US default), weight_oz, rates and, when present, warning. Each rate row has method (display name, such as "USPS Ground Advantage"), rate_id, service_level (usps_ground_advantage, usps_priority, usps_priority_express, usps_intl_express, usps_intl_priority, usps_intl_first_class_package, or a UPS service code such as "03" Ground, "01" Next Day Air, "02" 2nd Day Air, "93" Ground Saver or "11" Standard), rate (what your account pays, including any per-label charge your plan adds), retail_rate (retail price for comparison, or null), delivery_date (the carrier's estimate as an ISO date-time without a time zone; always null on UPS rows), is_cubic, and variant and max_weight_oz (set on Ground Advantage weight-band rows, such as "up to 12 oz" and 12; otherwise null).
Good to know: Rows come in a fixed order: Priority Mail Flat Rate products, then Priority Mail, Priority Mail Express (shown as "USPS Express Mail") and Ground Advantage, then the Ground Advantage weight bands, then international USPS services, then UPS. Options that didn't price are left out, and similar rows aren't merged: Ground Advantage can appear twice, once as a cubic row ("(Cubic)" or "(Cubic Soft Pack)" in method) and once plain. Weight-band rows whose limit is below your weight are dropped, and so are all band rows when a side is over 22 inches or the volume is over 1,728 cubic inches. UPS rows can appear before your account is registered with UPS, but buying a UPS label requires register_ups. A weight without dimensions can quote lower than the carrier later bills, because dimensional charges come back as postage adjustments, so give real dimensions when you have them. One package per call, shipping today, with no signature, Saturday delivery or package-type options. Errors: "zip is required.", "weight_oz must be greater than 0.", the ship-from error, or "Rating failed: " with the carrier's message when nothing priced.
{"zip": "30309", "weight_oz": 12, "length": 10, "width": 8, "height": 4}get_rates
Gets shipping rates for one of your orders, using the order's ship-to address and your ship-from address. It returns a package_id and a list of priced options. To buy one, pass that option's rate_id, method and service_level, plus the package_id, into buy_label exactly as returned. You can override the package weight and dimensions.
| Parameter | Type | Required | Description |
|---|---|---|---|
order_id | integer | Yes | The order to rate. It must belong to your account. |
weight_oz | number | No | Package weight in ounces. The weight saved on the order is not used for pricing, so pass it here (get_order returns it as totals.weight_oz). Omit it or send 0 for a weightless quote (fixed-price options only). A positive value gets a full quote and is saved as the order's package weight. Negative values aren't rejected, so send only positive weights. Default 0. |
length | number | No | Length in inches. Omit it, or send 0 or less, to use the length saved on the order, if any. |
width | number | No | Width in inches. Same fallback as length. |
height | number | No | Height in inches. Same fallback as length. |
ship_date | string | No | Ship date as YYYY-MM-DD. Default today. A value that can't be read quietly becomes the current time. buy_label uses its own ship_date when you purchase. |
Returns: order_id, package_id (an opaque token for buy_label), ship_date (ISO date-time in UTC), rates (the same row fields as quote_shipping), a note reminding you to pass the chosen values into buy_label verbatim, and warning when present.
Good to know: Without a weight you get only the fixed-price options: the six Priority Mail Flat Rate products and the four Ground Advantage weight bands, minus any band below the order's saved weight (an order saved above 15.9 oz may get only Flat Rate rows). To see Priority Mail, Priority Mail Express, Ground Advantage at the real weight, UPS and international services, pass a positive weight_oz. Flat Rate box and weight-band prices may be served from a rate cache for up to 3 hours, and Flat Rate prices follow a USPS price list that is refreshed daily.
It never buys anything or moves money, but like rating in the Ship.com web app it saves to the order: a positive weight_oz becomes the order's package weight, and for US destinations the ship-to address is checked with carrier address validation and the result is stored on the order. A valid address can have its city and state corrected. Nothing is saved when the validation service is unavailable. It's annotated read-only in tools/list because it never purchases.
Choose a Ground Advantage weight-band row only if the package weighs no more than its max_weight_oz. The label is bought at the band's weight and a standard box size, so a heavier or larger package is billed the difference later as a postage adjustment. Bands that can't fit are dropped when the weight or dimensions are known; with neither known, all four come back. UPS rows can appear before your account is registered with UPS (buying one needs register_ups), and a PO Box destination gets only UPS Ground Saver from UPS.
An order that doesn't exist or isn't yours returns "Order <id> was not found in this account." A destination that fails address validation returns "Rating failed: the destination address failed validation. Correct it with update_order_address before buying a label." (see update_order_address). Shipments that need a customs declaration can't be rated or bought through MCP yet: destinations outside the US; APO, FPO and DPO addresses; US territories and freely associated states (Guam, the U.S. Virgin Islands, American Samoa, the Northern Mariana Islands, Micronesia, the Marshall Islands and Palau); and any order when your own ship-from address is APO, FPO or DPO. Ship those from the Ship.com web app. One package per order per call, with no signature, Saturday delivery, return label or custom package options.
{"order_id": 48213, "weight_oz": 14, "length": 10, "width": 8, "height": 4}Response (tokens shortened). package_id is shared by every row; rate_id, method and service_level come from the row you choose. Weight-band rows set variant and max_weight_oz:
{
"order_id": 48213,
"package_id": "eyJhbGciOi...",
"ship_date": "2026-10-05T14:02:11Z",
"rates": [
{"method": "USPS Ground Advantage", "rate_id": "eyJhbGciOi...", "service_level": "usps_ground_advantage", "rate": 7.42, "retail_rate": 9.35, "delivery_date": "2026-10-08T00:00:00", "is_cubic": false, "variant": null, "max_weight_oz": null},
{"method": "USPS Priority", "rate_id": "eyJhbGciOi...", "service_level": "usps_priority", "rate": 10.15, ...}
],
"note": "Pass a chosen rate's rate_id + this package_id + its method + service_level verbatim into buy_label."
}buy_label
Buys a real USPS or UPS shipping label for an order, paid from your postage balance. Pass the values from get_rates exactly as returned. Without confirm it returns a preview of the price, your balance and whether an auto-recharge would run, and buys nothing. Call again with confirm: true to purchase.
| Parameter | Type | Required | Description |
|---|---|---|---|
order_id | integer | Yes | The order to buy a label for. It must belong to your account. |
rate_id | string | Yes | The chosen option's rate_id. It decides what is bought: carrier, service, price and package. |
package_id | string | Yes | The package_id from the same get_rates response. |
method | string | Yes | The option's method, saved on the order as the shipping method name. It doesn't change what is bought. |
service_level | string | Yes | The option's service_level. It doesn't change what is bought. |
ship_date | string | No | YYYY-MM-DD. Default today; unreadable values become today. A date more than 24 hours in the past is refused. For USPS, the mailing date is kept between today and 7 days ahead (US Eastern time). |
confirm | boolean | No | true to buy. Omit or false for a preview. Default false. |
max_cost | number | No | Ceiling in dollars for the postage price (insurance and fees not counted). A higher rate is refused, on preview and confirm, before anything is charged. An equal rate passes. |
insurance | boolean | No | Overrides your account's insure-all-shipments setting for this label. Default: that setting. |
insured_value | number | No | Dollar value to insure when insurance is on. Default: the order's merchandise subtotal, else its total. With no positive value to insure, the label ships uninsured. |
Returns: A preview returns preview: true, order_id, method, service_level, price (postage), pay_as_you_go_fee, insurance, insured_value, insurance_cost, total_charge, current_balance, balance_after, balance_would_go_negative, auto_recharge_amount, auto_recharge_would_fire and a message. A purchase returns purchased: true, order_id, cost (postage), insurance, insured_value, insurance_cost, label_url (Full Size: a 4x6 label on a US Letter page), tracking_number, tracking_url (https://app.ship.com/tracker/ plus the tracking number), form_url (a customs form when one applies, otherwise null), balance_after, a message, status (the order's status, normally "Label purchased") and next_step. While the label is unprinted, next_step says to mark it printed once it's printed, then book a pickup if your plan includes carrier pickup or drop it off; for a UPS label it points to the paid UPS pickup in the Ship.com web app. Otherwise it's null.
Good to know: Available on access-token connections. It is not offered on connections authorized through Ship.com sign-in (OAuth), such as the Claude directory connector and claude.ai custom connectors; there it is absent from tools/list, and a call returns JSON-RPC error -32602 saying the tool is not available. Confirm doesn't need an earlier preview, and the preview doesn't check package_id, plan limits, billing, ship date, address or account standing, so a clean preview can still fail on confirm.
Postage comes out of your postage balance, plus a $0.30 pay-as-you-go fee when your auto-recharge amount is $0.01 or less. Insurance is a separate charge: $0.99 for each $100, or part of $100, of insured value on orders to the US ($40 costs $0.99, $120 costs $1.98), and $1.25 per $100 otherwise. If your balance can't cover postage and insurance, your payment method on file is charged before the label is created, for the larger of your auto-recharge amount and the shortfall. With an auto-recharge amount of $0.01 (pay as you go), the charge is the shortfall plus $0.30, at least $1, and the preview's auto_recharge_would_fire still reads false. With an amount of $0, the purchase fails instead. A recharge stays on your balance even if the purchase then fails, for example at your plan's monthly shipment limit.
On success the order moves to Label purchased with its tracking number and label saved. It moves to Label printed when it's printed from the Orders page or a batch's purchase page in the Ship.com web app. Labels printed straight from label_url, or with Ship Mode's print-all, need a call to mark_labels_printed once they're printed. Carrier pickups collect printed labels only (see Pickups). An order still awaiting payment is marked as paid outside Ship.com. The tracking number is sent to the order's sales platform, such as Shopify, Etsy, eBay, WooCommerce, Square, Squarespace, Wix or PayPal. Customer emails and tracking webhooks go out later, when the label is marked printed. Your saved label format is set to Full Size. If the order already has a label, that label is returned and nothing is charged; the response still shows purchased: true, with cost from the rate you passed. Simultaneous purchases for one order return the first label.
Errors: A token that can't be read returns "rate_id is invalid or has expired. Call get_rates again and use a fresh rate_id." A rate over max_cost returns "Refusing to buy: rate is $<price> which exceeds max_cost $<max>. Nothing was purchased." Purchase failures read Label purchase failed — <Code>, sometimes followed by : <detail>. The common codes:
| Code | Meaning | What to do |
|---|---|---|
NeedsFromAddress | Your account has no ship-from address. | Add one in Settings in the Ship.com web app. |
MissingBilling | Your balance is too low and no payment method is on file. | Add a payment method in the web app. |
AutoRechargeOff | Your balance is too low and your auto-recharge amount is $0. | Add funds or set an auto-recharge amount in the web app. |
NeedPayment, ChargeFailed | A card charge was declined, or a subscription payment is due. | Update your payment method in the web app. |
CooldownNeeded | Repeated card declines. | Wait 60 seconds, then fix the card before retrying. |
Limit reached | Your plan's monthly shipment limit; the detail is the limit. | Upgrade, or wait for next month. |
Unauthorized | The package_id is from a different get_rates response than the rate_id. | Rate again and use both values from one response. |
UPSError | UPS couldn't create the label, including when your account isn't registered with UPS. | Read the detail; run register_ups if you haven't registered. |
Suspended | Your account is on hold for review. | Contact help@ship.com. |
The preview checks none of these. If balance_would_go_negative is true and auto_recharge_amount is 0, the confirm will fail with AutoRechargeOff (or MissingBilling when no payment method is on file). Other codes, such as DateError, RateError or ShippingError, come with a detail that describes the problem, often the carrier's own message. A label that can't be stored is voided automatically. If a failure says it's not certain whether a label was bought, or you get an unexpected error, check get_label and get_balance before retrying.
{"order_id": 48213, "rate_id": "<rate_id from get_rates>", "package_id": "<package_id from get_rates>", "method": "USPS Ground Advantage", "service_level": "usps_ground_advantage", "max_cost": 8.00}{"order_id": 48213, "rate_id": "<same rate_id>", "package_id": "<same package_id>", "method": "USPS Ground Advantage", "service_level": "usps_ground_advantage", "max_cost": 8.00, "confirm": true}validate_address
Checks a US address with carrier address validation, the same check Ship.com runs on orders, and returns a standardized version. It saves nothing, so use it to check an address before you create or update an order. US addresses only.
| Parameter | Type | Required | Description |
|---|---|---|---|
street | string | Yes | Street address line 1, such as "1600 Pennsylvania Ave NW". Returned unchanged. |
street2 | string | No | Second line: apartment, suite or unit. Returned unchanged, or null if omitted. |
city | string | Yes | City. |
state | string | Yes | Two-letter state code, such as DC. |
zip | string | Yes | 5- or 9-digit US ZIP code. Only the first 5 digits are used for matching. |
Returns: is_valid (boolean), standardized (street, street2, city, state, zip) and, only when is_valid is false, a note. When the address is valid, city, state and zip are the validator's standard values: the city is usually uppercase, and the ZIP can come back as ZIP+4 and can differ from the one you sent. When it isn't valid, they echo your input.
Good to know: An address is valid only when there's a single, unambiguous match. Street lines are never corrected. is_valid: false means either that no match exists or that the validation service was briefly unavailable; the result doesn't say which, so retry an address you know is good later. Missing fields are reported together, for example "street is required." or "city, zip are required." To correct an order's saved address, use update_order_address.
{"street": "742 Evergreen Ter", "street2": "Apt 2", "city": "Springfield", "state": "IL", "zip": "62704"}register_ups
Registers your Ship.com account with UPS, which is required before you can buy UPS labels. It can open a new UPS account or link one you already have. Registering accepts the UPS Technology Agreement, a legally binding contract with UPS Market Driver, Inc. Call it without confirm to get the agreement and a token, show the agreement to the account holder, and confirm with the token only after they explicitly accept it. An AI assistant or integration must never accept on their behalf.
| Parameter | Type | Required | Description |
|---|---|---|---|
confirm | boolean | No | Omit or false to preview; nothing is registered. true to register. Default false. |
accepted_agreement_token | string | With confirm | The agreement_token from the preview. Send it only after the account holder has seen the agreement and accepted it. |
company | string | No | Business name. Default: your account's business name, else the contact name. |
name | string | No | Contact's first and last name (at least two words; the last word is the last name). Default: the account holder's name. |
email | string | No | Contact email. Default: your account email. |
phone | string | No | Contact phone. Default: your account phone. |
street1 | string | No | Pickup address line 1 (only line 1 is used). Default: your account address. |
city | string | No | City. Default: your account address. |
state | string | No | Two-letter state code. Default: your account address. |
zip | string | No | ZIP code. Default: your account address. |
existing_ups_account | string | No | An existing UPS account number (exactly 6 letters or digits) to link instead of opening a new account. UPS checks it first at no cost: a number UPS rejects is refused, and if UPS can't give an answer, it's linked anyway. |
existing_ups_postal_code | string | No | The postal code UPS has on file for that account. Default: zip. |
Returns: A preview returns preview: true, registered (whether the account is already registered), note, agreement_version (such as UTA10072022), agreement_token (64 hex characters), prefill (the details that would be sent: company, name, email, phone, street1, city, state, zip, country "US"), missing_fields and, last, agreement_text (the full agreement as plain text, about 71 KB). A confirm returns registered: true, ups_account_last3 (a masked account number such as ***2C3), agreement_version and a note.
Good to know: The token is specific to your account and comes only from a preview. It can change, for example when the agreement is updated, so if a confirm refuses the token, preview again. Contact and address fields are required whether you open or link an account; missing ones are listed in missing_fields, and a confirm without them is refused. Opening a new account sends UPS your company, contact name, email, phone, address and the IP address of the request. There is no charge. Registration can't be undone through MCP, and an account that's already registered is refused (the preview shows registered: true). UPS rows can show up in quote_shipping and get_rates before you register, but buying them fails until you do. US addresses only. UPS-side problems come back as "UPS registration failed: " followed by the reason.
{"confirm": true, "accepted_agreement_token": "<agreement_token from the preview>", "existing_ups_account": "A1B2C3", "existing_ups_postal_code": "30309"}