v0.3.1 — 24 tools across shipping, tracking, pickups, billing, address validation, and analytics.
Shipping rates
get_rates
Use when the user asks about shipping costs, delivery times, courier options, or the cheapest/fastest way to ship.
Required inputs: origin country, destination country, parcel weight, dimensions (length/width/height).
Optional (improves accuracy): city, state, postal code, street address for origin and destination. Item category or HS code for duty estimates.
Presenting results:
- - Show a comparison table: courier name, price, currency, estimated delivery days.
- Sort by price (lowest first) unless the user asks for fastest.
- If you used assumed/estimated data (e.g. generic postal codes), tell the user the rates are estimates.
Shipments
create_shipment
The primary tool for creating shipments and buying labels.
For "ship this" / "buy a label": set buy_label: true and buy_label_synchronous: true with format: "url" in printing options. Extract the label URL from shipping_documents in the response and present it as a clickable link.
For a specific courier (e.g. "buy a label with UPS Ground"): call get_rates first to find the courier_id, then pass it in courier_settings.
Without a specific courier: omit courier_service_id — the API auto-selects best value. Do NOT call get_rates first.
Required inputs: complete origin and destination addresses (contact name, email, phone, street, city, country code, and company name for origin), parcel weight, item description and customs value.
updateshipment / getshipment / listshipments / deleteshipment / cancel_shipment
- -
get_shipment — retrieves full shipment details. Also use this to get label/document download URLs (pass format="URL"). - INLINECODE11 — filter by state, date range, country, etc. Supports labelstate, deliverystate, shipment_state filters.
- INLINECODE12 — removes a shipment that hasn't shipped yet.
- INLINECODE13 — cancels a shipped shipment (only if label failed or shipment not yet in transit).
getshipmentdocuments
Returns metadata only (content type, size). For actual document downloads, use get_shipment with format="URL" instead.
Tracking
track_shipment
Use when the user asks to track a package, check delivery status, or says "where's my shipment."
Required input: either easyship_shipment_id or platform_order_number — at least one must be provided.
Presenting results:
- - Current status, last known location, estimated delivery date.
- List recent tracking checkpoints.
Pickups
getpickupslots → create_pickup
Workflow for scheduling a pickup:
- 1. Get the
courier_service_id from the shipment via INLINECODE19 - Call
get_pickup_slots to find available dates and time windows - Present options to the user (or pick the earliest if they want the closest)
- Call
create_pickup with the chosen slot, date, and shipment IDs
All shipments in a pickup must use the same courier and have labels pending or generated.
listpickups / getpickup / cancelpickup / listpickup_shipments
Standard CRUD for managing existing pickups.
Address validation
validate_address
Validates both US domestic and international addresses in a single tool. Omit country_alpha2 or pass "US" for domestic; any other country code routes to international validation.
Requires an updated contract with Easyship.
Billing
listtransactions / listbilling_transactions
View transaction history filtered by type (shipment, pickup, claim, policy, payment), date range, or shipment ID.
Analytics
Six analytics tools, all defaulting to a 90-day lookback if the user doesn't specify a date range:
| Tool | Use for | Returns |
|---|
| INLINECODE23 | Shipment volume and trends | Total count + daily time series |
| INLINECODE24 |
Past shipping activity confirmation | Whether account has ever shipped |
|
analytics_shipment_status | Status distribution | Counts by status (in-progress breakdown) |
|
analytics_top_destinations | Where shipments go | Countries/zones ranked by volume |
|
analytics_top_couriers | Courier usage breakdown | Couriers ranked by shipment count |
|
analytics_sale_channels | Sales channel breakdown | Channels ranked by shipment count |
General
- - Easyship supports 550+ couriers across 200+ countries/territories.
- An API token is required. If not configured, direct the user to: https://app.easyship.com/connect
- All prices are returned in the user's Easyship account currency unless specified otherwise.
- Always confirm destructive actions (delete/cancel) with the user before executing.
v0.3.1 — 涵盖运输、追踪、取件、账单、地址验证和分析在内的24个工具。
运费查询
get_rates
当用户询问运费、配送时间、快递选项或最便宜/最快的运输方式时使用。
必填输入: 始发国、目的国、包裹重量、尺寸(长/宽/高)。
可选(提高准确性): 始发地和目的地的城市、州、邮政编码、街道地址。用于关税估算的商品类别或HS编码。
结果展示:
- - 显示对比表格:快递公司名称、价格、货币、预计配送天数。
- 按价格排序(从低到高),除非用户要求最快。
- 如果使用了假设/估算数据(如通用邮政编码),需告知用户费率为估算值。
运输管理
create_shipment
创建运输订单和购买标签的主要工具。
对于寄送此件/购买标签: 设置 buylabel: true 和 buylabelsynchronous: true,并在打印选项中设置 format: url。从响应中的 shippingdocuments 提取标签URL,并以可点击链接形式呈现。
指定快递公司(例如购买UPS Ground标签):先调用 getrates 查找 courierid,然后在 courier_settings 中传入。
未指定快递公司: 省略 courierserviceid — API会自动选择最优方案。无需先调用 get_rates。
必填输入: 完整的始发地和目的地地址(联系人姓名、邮箱、电话、街道、城市、国家代码,始发地还需公司名称)、包裹重量、物品描述和海关价值。
updateshipment / getshipment / listshipments / deleteshipment / cancel_shipment
- - getshipment — 获取完整运输详情。也可用于获取标签/文档下载链接(传入 format=URL)。
- listshipments — 按状态、日期范围、国家等筛选。支持 labelstate、deliverystate、shipmentstate 筛选条件。
- deleteshipment — 删除尚未发货的运输订单。
- cancel_shipment — 取消已发货的运输订单(仅当标签失败或货物尚未运输时)。
getshipmentdocuments
仅返回元数据(内容类型、大小)。如需实际文档下载,请改用带 format=URL 参数的 get_shipment。
追踪
track_shipment
当用户要求追踪包裹、查询配送状态或询问我的货到哪了时使用。
必填输入: easyshipshipmentid 或 platformordernumber — 至少提供其中一个。
结果展示:
- - 当前状态、最后已知位置、预计送达日期。
- 列出最近的追踪节点。
取件
getpickupslots → create_pickup
安排取件的工作流程:
- 1. 通过 getshipment 获取运输订单的 courierserviceid
- 调用 getpickupslots 查找可用日期和时间段
- 向用户展示选项(如果用户要求最近时间则选择最早的)
- 使用所选时间段、日期和运输订单ID调用 createpickup
同一取件中的所有运输订单必须使用相同的快递公司,且标签状态为待处理或已生成。
listpickups / getpickup / cancelpickup / listpickup_shipments
用于管理现有取件的标准增删改查操作。
地址验证
validate_address
通过单一工具验证美国国内和国际地址。省略 country_alpha2 或传入US表示国内地址;传入其他国家代码则进行国际地址验证。
需要与Easyship更新合同。
账单
listtransactions / listbilling_transactions
按类型(运输、取件、索赔、保单、付款)、日期范围或运输订单ID查看交易历史。
分析
六个分析工具,若用户未指定日期范围,默认回溯90天:
| 工具 | 用途 | 返回结果 |
|---|
| analyticsshipments | 运输量和趋势 | 总数量 + 每日时间序列 |
| analyticsshipped |
确认历史运输活动 | 账户是否曾有过运输记录 |
| analytics
shipmentstatus | 状态分布 | 按状态统计数量(进行中细分) |
| analytics
topdestinations | 运输目的地分布 | 按运输量排名的国家/地区 |
| analytics
topcouriers | 快递公司使用情况 | 按运输量排名的快递公司 |
| analytics
salechannels | 销售渠道分布 | 按运输量排名的渠道 |
通用说明
- - Easyship支持200多个国家/地区的550多家快递公司。
- 需要API令牌。如未配置,请引导用户访问:https://app.easyship.com/connect
- 除非另有说明,所有价格均以用户Easyship账户货币显示。
- 执行破坏性操作(删除/取消)前务必先与用户确认。