Get Shipping Rates for Order
teapplix_get_rates_for_orderRead-only
Get shipping rates for an existing Teapplix order. Requires TxnId, From (ship-from address or profile), and a Packages array (each package must include Method; Weight and Dimensions default to the order's stored values if omitted). [DEMO]
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| From | Yes | Ship-from address OR a saved shipping profile — supply exactly one shape. | |
| TxnId | Yes | Teapplix order ID. | |
| Options | No | Advanced, rarely used. Omit unless the user explicitly requests features such as signature confirmation, insurance type, COD, etc. | |
| Packages | Yes | One or more packages to rate. Each package must include Method; Weight and Dimensions default to the order's stored values if omitted. All packages must use the same carrier. To compare carriers, prefer a RATESHOP method; otherwise make separate calls per carrier. | |
| Provider | No | Force the rate source. MARKETPLACE = rate through the marketplace's carrier accounts at marketplace-negotiated rates (e.g. Amazon Buy Shipping, Walmart shipping programs — same carriers like UPS/FedEx/USPS but at the marketplace's rates); NATIVE = rate through the seller's own carrier account from the shipping profile. When omitted on a RATESHOP method, the API automatically compares both marketplace and native rates and returns the cheapest — check Rate.Provider in the response to see which source won (marketplace name like "amazon" if marketplace, absent if native). When omitted on a direct method, uses whichever provider is configured on the profile. | |
| ShipDate | No | Ship date (YYYY-MM-DD). Defaults to today. Interpreted as Pacific timezone. | |
| CustomsDeclaration | No | International shipments only. Omit unless shipping outside the domestic country. Fields: ReasonForExport, IOssNumber, Items: [{Description, Quantity, Value, Weight, HSTariffNumber, CountryOfOrigin}]. |
Output Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Rate | No | Rate for the requested method. If present with Error set, the method is unavailable on this route (Transportation=0) — treat as a failure. If absent, the requested method failed — inspect AltRates for carrier suggestions. For RATESHOP, this is the winning (lowest-cost) candidate. | |
| Zone | No | Carrier zone for the selected rate (e.g. "3"). | |
| AltRates | No | Carrier-provided alternate quotes. May appear alongside a successful Rate (carrier suggestions) or without Rate (requested method failed). Items with Error set are methods the carrier could not quote. For RATESHOP, all non-winning evaluated candidates — valid higher-cost quotes and failed methods. | |
| Warnings | No | Warnings about the rate response. When the main Rate has Error set (service unavailable), Warnings contains the specific reason the carrier cannot service this route. |