DEVELOPER

开发者中心

集成平台所需的一切 — REST、GraphQL 和 MCP。

REST /api/v1/orders JSON
GQL query { orders { id } } GraphQL
MCP track_package(number) Tool
开发者中心

REST API 文档

探索、测试并集成我们的 RESTful 接口。完整的 Swagger UI,支持交互式请求构建和身份验证。

GraphQL API 文档

通过 GraphQL API 精确查询所需数据。交互式 Playground,支持 Schema 浏览和操作测试。

MCP 专栏

AI 智能体与 MCP 客户端:配置、安全 profile、审批以及 User + Developer 服务的实时工具。

对接专题

四条各自闭环的路径。打开哪一条就只做哪一条:鉴权、询价、下单、打标或支付、追踪,以及测试清单。

发运对接

自有车队取件与配送

创建取件或配送订单、打印本地面单、追踪并接收事件——自有车队,从头做到尾。询价为可选步骤。

取件或配送 → 本地面单 → 追踪 → 事件

承运商打单

获取运输方式、询价、购买承运商面单、下载 PDF,并追踪该票。

运输方式 → 询价 → 打单 → PDF → 追踪

Uniorder:所有货件统一一个接口

无论由商户自行配送还是购买承运商面单,都通过同一组接口完成询价、下单、打印面单、追踪与取消。

询价 → rate_id → 下单 → 面单 → 追踪 → 取消

一次询价与下单

一次询价同时列出自有配送和所有承运商面单服务,再用所选报价的 rate_id 下单。

询价 → rate_id → 下单 → 购买面单 → 取消

运输服务

列出物流公司自有运输服务、估价、下单、支付并追踪——从头做到尾。

服务列表 → 估价 → 下单 → 支付 → 追踪

仓储与出库

先把货物入库存储并支付,再在本路径上把在库件出库发走。

入库 → 支付 → 选货 → 出库 → 追踪
仓库作业

仓库作业

通过 REST、GraphQL 和 MCP 读取库存、预报入库、下发出库单、安排现场作业并查看账单。

库存 → 入库 → 出库 → 现场作业 → 账单 → AI 助手

MCP 专栏

MCP 291 tools

面向 AI 智能体与 MCP 客户端的专项指南:User / Developer 服务、最小权限 profile、dry-run、人工审批与实时工具目录。

Profile 与 scopes 人工审批 写操作 dry-run Developer MCP

网络钩子 — Webhook 集成指南

实时接收 Superroute 事件 — 订单、状态变更、跟踪更新。带签名校验、自动重试和内置调试工具。

WEBHOOKS

OTEP — 开放跟踪事件协议

一次事件,无限旅程。 — 自配送、第三方配送和承运商运单合并为每个跟踪号一条有序的事件时间线。

OTEP

集成更新指南

API 与 Webhook 的全部新能力——幂等取消、对账拉取、v2 签名、新事件——附可直接复制的示例,全部向前兼容。

NEW

Postman Collection

从 API 文档实时生成的最新集合——导入 Postman 即可开始调用 API。

JSON

订单状态字典与流转图

完整的订单状态字典与流转图,由部署代码实时生成。

MARKDOWN

运单事件代码

取件侧与配送侧运单事件代码、OTEP 映射、常见流转,以及用公开 API 自建跟踪页的说明。

TRACKING

快速入门

1
获取 API Token

登录后进入 设置 → API 密钥,生成您的个人访问令牌。

2
选择 API 类型

标准增删改查操作使用 REST,灵活数据查询使用 GraphQL,将 AI 助手直接接入物流数据使用 MCP。

3
开始开发

打开交互式文档,直接在浏览器中测试接口,然后将代码示例复制到您的应用中。

身份认证

三种API使用相同的Bearer令牌(通过登录端点获取)。部分端点无需认证即可使用——包括登录、公开追踪和司机自助注册。

通过登录接口获取 Token:

# POST /api/v1/user/login
{ "email": "you@example.com", "password": "••••••••" }

请求头

Authorization: Bearer YOUR_ACCESS_TOKEN
REST 大多数端点需要认证。登录、公开追踪和司机自助注册为公开端点(无需令牌)。
GQL 已认证的操作需要 Token;登录、追踪等公开操作无需 Token。
MCP 可选。公开工具无需 Token;携带有效 Token 后可访问个人数据。
接口基础地址

 

  • REST API https://api.superroute.ca/api
  • GraphQL https://api.superroute.ca/api/graphql
  • MCP https://api.superroute.ca/api/mcp

应该选哪种 API?

REST API

标准增删改查、Webhook、订单/路线管理

GraphQL

灵活取数、自定义报表、嵌套查询

MCP

AI 助手集成(Claude、Cursor、Copilot 等)

AI 集成

赋予您的 AI 助手物流超能力。通过 MCP 实现零代码配置,从您的 AI 代理直接调用我们的 API,或下载技能文件获取完整的语义指导。

可用能力
公开追踪

通过追踪号码查询任何包裹的配送状态、事件时间线和签收证明(签名/照片)。

公开
操作事件

获取订单的完整审计记录——谁更改了什么状态、何时、何地,包含 GPS 坐标和附件照片。

需要认证
标签服务

从承运商获取运费报价、创建运输标签、下载标签 PDF、取消运输和提交日终清单。

需要认证
本地配送

创建配送/取件订单、构建优化的多司机路线,并管理完整的最后一公里配送流程。

需要认证
END USER 用户 MCP 服务器

适用于您客户使用的 AI 助手。粘贴配置后,您的 AI 即可即时追踪包裹——无需编码。

ENDPOINT
https://api.superroute.ca/api/mcp
可用工具 (291 个实时工具)
track_package Track a package by its tracking number. Returns delivery status, trackin... 公开
otep_tracking Get the unified OTEP (Open Tracking Event Protocol) timeline for a track... 公开
get_capabilities List MCP tools available to the current connection, with risk level, req... 公开
get_orders List orders with filtering and pagination. Returns order details includi... 认证
get_order_detail Get full details of a specific order by ID, including address, status, p... 认证
find_order Fuzzy-find orders across tracking number, external tracking, ref, recipi... 认证
get_operation_events Get the full audit trail for orders — every status change, who performed... 认证
create_order Create a delivery/pickup order. D=delivery (warehouse→customer), P=picku... 认证
cancel_order Cancel an existing order by order ID. Only works for orders not yet deli... confirm
bulk_create_orders Create up to 100 delivery orders in one call. Returns a per-order succes... confirm
reroute_to_address Change the delivery address of an order that has not been picked up yet:... confirm
update_delivery_instruction Update only the delivery_instruction field on an existing order (PATCH).... 认证
update_order_note Update only the internal note field on an existing order (PATCH). 认证
update_time_window_by_refs Bulk-update delivery time windows (and optional schedule_date) for order... 认证
hold_order Put an order on HOLD so it is not dispatched until release_order. HIGH-R... confirm
release_order Release an order from HOLD back to NEW_ORDER. HIGH-RISK: requires confir... confirm
propose_write Queue a write/high-risk tool for human approval instead of executing it.... 认证
list_pending_approvals List pending MCP write approvals for this business (or mine_only). 认证
approve_pending_write Approve and execute a pending write proposal. HIGH-RISK: requires confir... confirm
reject_pending_write Reject a pending write proposal without executing it. 认证
get_routes List delivery routes with their status, assigned driver, and order count... 认证
get_route_detail Get one route with its stop/order list. Prefer this over get_routes when... 认证
get_drivers List drivers for the authenticated business (ids, names, capacity defaul... 认证
get_driver_routes_today Orders assigned to a driver on a given date (defaults to today). Useful... 认证
get_build_route_options List routing engines, balance modes, capacity types, and defaults before... 认证
build_route Build/optimize a delivery route (POST /api/v3/client/build-route). HIGH-... confirm
order_snapshot One-call order context for support: order detail + operation events + pu... 认证
list_exceptions List failed/returned/exception-like orders for a schedule date (default... 认证
get_shipping_methods List available shipping carriers/methods. Returns IDs and names — use th... 认证
get_shipping_rate Get a shipping cost quote. Dry-run — no label created. Returns rate opti... 认证
create_shipping_label Book a shipment with a carrier and generate a shipping label with tracki... 认证
quote_and_ship One-shot: rate across all enabled carriers, pick the best one by strateg... 认证
compare_all_carriers Get rate quotes from every enabled carrier for the same shipment, in one... 认证
search_address Search and resolve addresses by postal code or free-text query. Returns... 认证
daily_digest One-call summary of today's logistics activity: total orders, by status,... 认证
datacenter_subjects Data Center: the subjects the user may report on (orders, stops, runs, p... 认证
datacenter_templates Data Center: ready-made report definitions (driver performance, delivery... 认证
datacenter_query Data Center: run a report through the semantic layer under the user's ow... 认证
datacenter_reports Data Center: the user's saved reports, each with its definition. 认证
datacenter_run_report Data Center: run one of the user's saved reports now; its date preset (l... 认证
datacenter_save_report Data Center: save a report for the user. definition = {request (as datac... 认证
get_orders_summary Aggregate order metrics over a time window: counts by status, top carrie... 认证
get_account_credits Get the authenticated customer's wallet balance, currency, and recent to... 认证
get_warehouses List WMS warehouses available to the authenticated business. 认证
get_inventory Query WMS inventory (POST /api/v1/wms/inventory). Pass filters supported... 认证
wms_list_warehouses List the warehouses this login works in (staff) or stores goods in (good... 认证
wms_list_locations List storage locations (shelf grids) of a warehouse with their zone, set... 认证
wms_get_warehouse_settings Get a warehouse's WMS settings (receiving, putaway, picking and task opt... 认证
wms_list_license_plates List license plates (pallets / totes) of a warehouse. (GET /api/v1/wms-c... 认证
wms_get_license_plate Get one license plate with its contents and location. (GET /api/v1/wms-c... 认证
wms_resolve_license_plate Find a license plate by its scanned code. (GET /api/v1/wms-core/license-... 认证
wms_query_inventory Query stock on hand grouped by SKU, location, lot or goods owner, with a... 认证
wms_list_movements List stock movements (the inventory ledger): every receipt, putaway, pic... 认证
wms_get_allocation Stock allocation overview of a warehouse: which SKUs are reserved for or... 认证
wms_get_sku_allocation Where one SKU's stock sits and which orders hold it. (GET /api/v1/wms-co... 认证
wms_stock_aging Stock aging of a warehouse: how long stock has been on hand, by age band... 认证
wms_expiry_report Lots that have expired or expire within the given days. (GET /api/v1/wms... 认证
wms_trace Trace a serial number, or a lot of a SKU, through receipts, moves and sh... 认证
wms_get_lot_tracking Lot / serial tracking settings and lots of one SKU. (GET /api/v1/wms-cor... 认证
wms_get_lot_hold_impact What holding a lot would affect: stock, open orders and reservations. (G... 认证
wms_list_stock_freezes List stock freezes (holds that stop stock from being picked or moved). (... 认证
wms_get_stock_freeze Get one stock freeze with what it holds. (GET /api/v1/wms-core/stock-fre... 认证
wms_list_stock_adjustments List stock adjustment requests and their review status. (GET /api/v1/wms... 认证
wms_list_channel_stock Stock shared to each sales channel (store / platform) and its rules. (GE... 认证
wms_get_channel_stock Stock and rules of one sales channel. (GET /api/v1/wms-core/channel-stoc... 认证
wms_stock_days Daily stock on hand (for storage billing and trends). (GET /api/v1/wms-c... 认证
wms_stock_months Monthly stock report: opening, in, out and closing per SKU. (GET /api/v1... 认证
wms_replenishment_suggestions Suggested pick-face min / max per location from recent demand. (GET /api... 认证
wms_list_replenishment_settings Pick-face min / max replenishment settings per location. (GET /api/v1/wm... 认证
wms_list_pack_levels Pack levels (each, inner, case, pallet) of a SKU with dimensions and ver... 认证
wms_dimension_repair_list SKUs whose weight or dimensions are missing or doubtful, to measure. (GE... 认证
wms_my_stock Goods owner: my stock per SKU and warehouse. (GET /api/v1/wms-core/my-st... 认证
wms_my_products Goods owner: my SKUs (item master). (GET /api/v1/wms-core/my-products) 认证
wms_get_my_product Goods owner: one of my SKUs with its pack levels and stock. (GET /api/v1... 认证
wms_my_movements Goods owner: stock movements of my goods. (GET /api/v1/wms-core/my-movem... 认证
wms_my_notifications Goods owner: warehouse notifications about my goods (arrivals, differenc... 认证
wms_list_inbound_orders List inbound orders (ASNs) with status and expected date. (GET /api/v1/w... 认证
wms_get_inbound_order Get one inbound order with lines, received quantities, differences and a... 认证
wms_list_inbound_cartons Cartons of an inbound order and which are received. (GET /api/v1/wms-cor... 认证
wms_inbound_schedule Inbound arrivals and dock appointments of a warehouse on a day. (GET /ap... 认证
wms_list_dock_parcels Parcels registered at the dock that are not yet matched to an inbound or... 认证
wms_get_dock_parcel Get one dock parcel. (GET /api/v1/wms-core/dock-parcels/{dock_parcel_id}... 认证
wms_list_inspections List quality inspections of received goods. (GET /api/v1/wms-core/inspec... 认证
wms_get_inspection Get one quality inspection with its results. (GET /api/v1/wms-core/inspe... 认证
wms_list_suppliers List suppliers, optionally with delivery scores. (GET /api/v1/wms-core/s... 认证
wms_list_returns List customer returns received or expected at a warehouse. (GET /api/v1/... 认证
wms_get_return Get one return with its lines and dispositions. (GET /api/v1/wms-core/re... 认证
wms_list_outbound_requests List outbound requests (orders sent to the warehouse to ship). (GET /api... 认证
wms_get_outbound_request Get one outbound request with its lines and status. (GET /api/v1/wms-cor... 认证
wms_list_outbound_orders List outbound orders (picking documents) of the warehouses this login wo... 认证
wms_get_outbound_order Get one outbound order with its lines (picked, remaining), packages, del... 认证
wms_get_outbound_delivery Shipping state of an outbound order: carrier, labels, ship and handover.... 认证
wms_get_outbound_parcels Parcels of an outbound order with tracking numbers. (GET /api/v1/wms-cor... 认证
wms_get_outbound_fulfilment Fulfilment mode of an outbound order (parcel, bulk, replenish) and why.... 认证
wms_get_outbound_handling_units Cartons and pallets of a bulk outbound order. (GET /api/v1/wms-core/outb... 认证
wms_get_outbound_handover Pickup handover of an outbound order: who collects, what is ready. (GET... 认证
wms_get_outbound_route Outbound queue, channel and split strategy chosen for an outbound order.... 认证
wms_get_outbound_packages Packages an outbound order is split into for picking. (GET /api/v1/picki... 认证
wms_list_problem_orders List outbound orders with problems (shortages, address, carrier, interce... 认证
wms_get_problem_order Get one problem order with its history. (GET /api/v1/wms-core/problem-or... 认证
wms_list_short_picks List short picks (lines picked less than ordered). (GET /api/v1/wms-core... 认证
wms_fill_rate Order and line fill rate of a warehouse over a period. (GET /api/v1/wms-... 认证
wms_list_cutoff_rules Carrier cutoff times of a warehouse. (GET /api/v1/wms-core/cutoff-rules) 认证
wms_list_outbound_containers List outbound containers (cages / sacks of parcels for a carrier). (GET... 认证
wms_get_outbound_container Get one outbound container with its parcels. (GET /api/v1/wms-core/outbo... 认证
wms_list_loads List dock loads (trucks loading or unloading). (GET /api/v1/wms-core/loa... 认证
wms_get_load Get one dock load with its units and progress. (GET /api/v1/wms-core/loa... 认证
wms_routes_waiting_for_load Delivery routes whose parcels wait to be loaded. (GET /api/v1/wms-core/l... 认证
wms_list_pack_sessions Open packing sessions of a warehouse. (GET /api/v1/wms-core/pack-session... 认证
wms_list_pick_candidates Outbound orders ready to be grouped into a pick wave. (GET /api/v1/picki... 认证
wms_list_pick_waves List pick waves of a warehouse. (GET /api/v1/picking/waves) 认证
wms_get_pick_wave Get one pick wave with its batches and orders. (GET /api/v1/picking/wave... 认证
wms_get_pick_wave_estimate Release estimate of a pick wave: pick time, walking and finish time. (GE... 认证
wms_list_pick_batches Pick batches waiting or in progress. (GET /api/v1/picking/batches) 认证
wms_get_pick_batch Get one pick batch with its pick lines. (GET /api/v1/picking/batches/{ba... 认证
wms_list_outbound_queues Outbound queues and their rules. (GET /api/v1/outbound-routing/queues) 认证
wms_list_tasks List warehouse tasks (putaway, replenishment, relocate, count). (GET /ap... 认证
wms_list_task_orders List task orders (receive, putaway, pick, move work orders). (GET /api/v... 认证
wms_get_task_order Get one task order with its lines and reservations. (GET /api/v1/wms-cor... 认证
wms_task_order_estimates Finish-time estimates of open task orders with the given number of worke... 认证
wms_list_task_reservations Stock reservations held by task orders. (GET /api/v1/wms-core/task-reser... 认证
wms_list_cycle_counts List cycle counts of a warehouse. (GET /api/v1/wms-core/cycle-counts) 认证
wms_get_cycle_count Get one cycle count with its lines and differences. (GET /api/v1/wms-cor... 认证
wms_cycle_count_accuracy Cycle count accuracy by month. (GET /api/v1/wms-core/cycle-count-accurac... 认证
wms_stock_accuracy Location accuracy summary of a warehouse (how often counts match the sys... 认证
wms_stock_accuracy_locations Location accuracy per location, least accurate first. (GET /api/v1/wms-c... 认证
wms_zone_load Zone load heatmap: expected work per zone and hour. (GET /api/v1/wms-cor... 认证
wms_list_transfers List stock transfers between warehouses. (GET /api/v1/wms-core/transfers... 认证
wms_get_transfer Get one transfer with its lines. (GET /api/v1/wms-core/transfers/{transf... 认证
wms_transfers_in_transit Transfers on their way to a warehouse. (GET /api/v1/wms-core/transfers/i... 认证
wms_list_assembly_orders List kitting / assembly orders. (GET /api/v1/wms-core/assembly-orders) 认证
wms_get_assembly_order Get one assembly order. (GET /api/v1/wms-core/assembly-orders/{assembly_... 认证
wms_assembly_suggestions Kits worth assembling ahead from demand and component stock. (GET /api/v... 认证
wms_list_vas_orders List value-added service orders (labelling, bundling, inspection work).... 认证
wms_get_vas_order Get one value-added service order. (GET /api/v1/wms-core/vas-orders/{vas... 认证
wms_list_fba_relabel_orders List FBA relabel orders. (GET /api/v1/wms-core/fba-relabel-orders) 认证
wms_get_fba_relabel_order Get one FBA relabel order. (GET /api/v1/wms-core/fba-relabel-orders/{fba... 认证
wms_list_recalls List product recalls. (GET /api/v1/wms-core/recalls) 认证
wms_get_recall Get one recall with the stock and shipments it covers. (GET /api/v1/wms-... 认证
wms_list_put_walls Put walls of a warehouse and their slots. (GET /api/v1/wms-core/put-wall... 认证
wms_list_slotting_runs Slotting runs of a warehouse, newest first: proposals to move SKUs to lo... 认证
wms_get_slotting_run Get one slotting run with its proposals, best first: SKU, from and to lo... 认证
wms_alerts Warehouse alerts: late tasks, stuck orders, stock problems. (GET /api/v1... 认证
wms_dashboard The warehouse dashboard: open and overdue inbound, outbound, tasks, exce... 认证
wms_labor_report Productivity report per worker and activity: lines, units, earned and ac... 认证
wms_get_labor_standards A warehouse's labor standards (seconds per line and per unit by activity... 认证
wms_get_release_estimate_coefficients Release-estimate coefficients for pick and task work (in use, defaults,... 认证
wms_get_schedule_suggestion Suggested work schedule now: who does which open pick batch, task order... 认证
wms_get_dock_slots The earliest free dock slots for a new inbound or outbound appointment,... 认证
wms_preview_task_trip The mixed trip claiming a warehouse task or task order would build now:... 认证
wms_get_task_trip One mixed trip: its tasks in walk order with their own status, the walk... 认证
wms_list_docks A warehouse's docks with the floor plan dock fixture each is linked to,... 认证
wms_get_dock Get one dock with its floor plan link, role, type and opening hours. (GE... 认证
wms_list_shifts A warehouse's shifts: name, start, end (crossing midnight when the end i... 认证
wms_get_shift Get one warehouse shift. (GET /api/v1/wms-core/shifts/{shift_id}) 认证
wms_get_shift_roster One week of a warehouse's shift roster: who is on which shift, whether t... 认证
wms_owner_health Per goods owner health: late inbound, shortages, problem orders. (GET /a... 认证
wms_sla_report Outbound SLA report: shipped on time by day, carrier and owner. (GET /ap... 认证
wms_callback_failures Failed callbacks to goods owners' systems. (GET /api/v1/wms-core/callbac... 认证
wms_list_tickets List warehouse tickets (questions and issues between the warehouse and g... 认证
wms_list_import_batches List the warehouse import batches (shelf, grid, SKU, replenishment, prod... 认证
wms_get_import_batch Get one warehouse import batch: status, counts, errors and the import's... 认证
wms_import_batch_errors The errors and warnings of one warehouse import batch. (GET /api/v1/wms-... 认证
wms_list_customers List the client's customers that use the warehouse system (goods owners)... 认证
wms_list_customer_candidates Customers of the client that do not use the warehouse system yet, to tur... 认证
wms_get_ticket Get one ticket with its messages. (GET /api/v1/wms-core/tickets/{ticket_... 认证
wms_list_billing_statements List warehouse billing statements (invoices to goods owners). (GET /api/... 认证
wms_get_billing_statement Get one billing statement with totals by charge item. (GET /api/v1/wms-c... 认证
wms_get_billing_statement_charges Every charge line of a billing statement. (GET /api/v1/wms-core/billing-... 认证
wms_list_charges Warehouse charges accrued (storage, handling, value-added) over a period... 认证
wms_list_charge_entries Manual charge entries (one-off fees and credits). (GET /api/v1/wms-core/... 认证
wms_list_rate_cards List warehouse rate cards (price lists). (GET /api/v1/wms-core/rate-card... 认证
wms_get_rate_card Get one rate card with its prices. (GET /api/v1/wms-core/rate-cards/{rat... 认证
wms_resolve_rate_card Which rate card and prices apply to a goods owner in a warehouse. (GET /... 认证
wms_internal_cost Internal cost of warehouse work over a period. (GET /api/v1/wms-core/int... 认证
wms_my_prices Goods owner: the warehouse prices that apply to me. (GET /api/v1/wms-cor... 认证
wms_create_inbound_order Create an inbound order (ASN): the goods a warehouse should expect. rele... 认证
wms_update_inbound_order Change an inbound order that is not yet received. (PUT /api/v1/wms-core/... 认证
wms_release_inbound_order Release a draft inbound order to the warehouse. (POST /api/v1/wms-core/i... 认证
wms_cancel_inbound_order Cancel an inbound order that has nothing received. (POST /api/v1/wms-cor... confirm
wms_book_inbound_appointment Book or move the dock appointment of an inbound order. (PUT /api/v1/wms-... 认证
wms_cancel_inbound_appointment Cancel the dock appointment of an inbound order. (DELETE /api/v1/wms-cor... 认证
wms_create_supplier Create a supplier. (POST /api/v1/wms-core/suppliers) 认证
wms_update_supplier Change a supplier. (PUT /api/v1/wms-core/suppliers/{supplier_id}) 认证
wms_create_return Announce a customer return the warehouse should expect. (POST /api/v1/wm... 认证
wms_quote_outbound_request Quote the shipping and warehouse charges of an outbound request before c... 认证
wms_create_outbound_request Create an outbound request: goods the warehouse should pick, pack and sh... 认证
wms_cancel_outbound_request Cancel an outbound request that has not shipped. (POST /api/v1/wms-core/... confirm
wms_change_outbound_route Change the outbound queue or shipping service of an outbound order, or r... 认证
wms_change_fulfilment_mode Change the fulfilment mode (parcel, bulk, replenish) of an outbound orde... 认证
wms_answer_problem_order Answer the question of a problem order (goods owner or staff) with one o... 认证
wms_approve_problem_order Approve the proposed solution of a problem order. (POST /api/v1/wms-core... 认证
wms_withdraw_problem_order Withdraw a problem order that is no longer a problem. (POST /api/v1/wms-... 认证
wms_resolve_short_pick Decide what happens to a short-picked line. (POST /api/v1/wms-core/short... 认证
wms_create_pick_wave Group outbound orders (or a day's route drivers) into a pick wave with a... 认证
wms_release_pick_wave Release a pick wave: its batches become pickable on the handhelds. (POST... 认证
wms_cancel_pick_wave Cancel a pick wave that has not been picked; its orders return to the ca... confirm
wms_plan_tasks Create the replenishment tasks a warehouse needs now (pick faces under t... 认证
wms_save_labor_standards Set a warehouse's labor standards per activity (seconds per line and per... 认证
wms_save_release_estimate_coefficients Adopt the last fit of the pick or task release-estimate coefficients, or... 认证
wms_apply_schedule_suggestion Assign jobs of the schedule suggestion (items of job and user_id from wm... 认证
wms_build_task_trip Claim a warehouse task or task order for the signed-in worker together w... 认证
wms_drop_task_trip_item Drop one task of the worker's mixed trip before any of it is done; it go... 认证
wms_save_dock Set a dock's floor plan dock fixture (its role), dock type and weekly op... 认证
wms_create_shift Create a warehouse shift: name, start, end (an end before the start cros... 认证
wms_update_shift Change a warehouse shift; only the fields sent change. (PUT /api/v1/wms-... 认证
wms_delete_shift Delete a warehouse shift and take it off every roster week. (DELETE /api... 认证
wms_save_shift_roster Set one week of a warehouse's shift roster (entries of shift_id and user... 认证
wms_create_task_order Create a task order (move, putaway, pick or other work order) for the ha... 认证
wms_assign_task_order Assign a task order to a worker. (POST /api/v1/wms-core/task-orders/{tas... 认证
wms_cancel_task_order Cancel a task order and release its reservations. (POST /api/v1/wms-core... confirm
wms_create_cycle_count Create a cycle count of locations or a shelf; counting is done on the ha... 认证
wms_plan_cycle_counts Create the cycle counts due by the warehouse's count plan (ABC frequency... 认证
wms_cancel_cycle_count Cancel a cycle count; nothing counted is applied. (POST /api/v1/wms-core... confirm
wms_generate_slotting Generate slotting proposals for a warehouse (nothing moves). Replaces th... 认证
wms_approve_slotting_recommendation Approve one slotting proposal: it is re-checked and creates relocate tas... 认证
wms_reject_slotting_recommendation Reject one slotting proposal. Managers only. (POST /api/v1/wms-core/slot... 认证
wms_approve_slotting_run Approve every still-proposed proposal of a slotting run; each creates re... confirm
wms_create_stock_freeze Freeze stock (a SKU, location, license plate, lot or serial) so it is no... confirm
wms_lift_stock_freeze Lift a stock freeze. (POST /api/v1/wms-core/stock-freezes/{freeze_id}/li... confirm
wms_hold_lot Hold a lot: it is not picked until released. Check wms_get_lot_hold_impa... confirm
wms_release_lot Release a held lot. (POST /api/v1/wms-core/lots/{lot_id}/release) confirm
wms_create_recall Open a recall of a lot: holds its stock and lists the shipments to notif... confirm
wms_create_transfer Create a stock transfer from one warehouse to another; picking and recei... 认证
wms_cancel_transfer Cancel a transfer that has not shipped. (POST /api/v1/wms-core/transfers... confirm
wms_create_assembly_order Create a kitting / assembly order. (POST /api/v1/wms-core/assembly-order... 认证
wms_release_assembly_order Release a draft assembly order to the floor. (POST /api/v1/wms-core/asse... 认证
wms_cancel_assembly_order Cancel an assembly order. (POST /api/v1/wms-core/assembly-orders/{assemb... confirm
wms_create_vas_order Create a value-added service order (labelling, bundling, inspection work... 认证
wms_create_ticket Open a ticket on a warehouse document (question or issue between the war... 认证
wms_comment_ticket Add a message to a ticket. (POST /api/v1/wms-core/tickets/{ticket_id}/co... 认证
wms_set_ticket_status Change the status of a ticket. (PUT /api/v1/wms-core/tickets/{ticket_id}... 认证
wms_rerun_import_batch Queue a warehouse import batch again from its saved copy (a batch that d... 认证
wms_delete_import_batch Roll a warehouse import batch back as a whole: records it created are de... confirm
wms_switch_customer Turn the warehouse system on or off for a customer (customer_id from wms... confirm
wms_create_my_product Goods owner: add a SKU to my item master. Weight and dimensions as figur... 认证
wms_update_my_product Goods owner: change one of my SKUs. (PUT /api/v1/wms-core/my-products/{p... 认证
list_datasets List custom datasets available to the business. 认证
get_dataset Get one dataset by id (metadata/columns). 认证
list_dataset_groups List groups inside a dataset. 认证
search_dataset_records Search records across groups in a dataset (POST .../search). 认证
list_alliances List alliances the authenticated business belongs to. 认证
get_alliance Get one alliance by id. 认证
list_alliance_members List members of an alliance. 认证
list_accessible_clients List clients accessible via alliance partnerships. 认证
quote_delivery Get the local delivery price for a shipment before creating the order (P... 认证
print_local_label Get the printable label of a local delivery order as a base64 PDF, with... 认证
bulk_create_orders_async Queue a large batch of delivery orders for creation (POST /api/v1/client... confirm
get_async_batch_result Read the status and per-order results of a batch queued with bulk_create... 认证
get_shipping_detail Get the carrier shipping detail of a label order: tracking numbers, pric... confirm
download_shipping_label Download the label PDF of an order as base64 (POST /api/v1/shipping/getS... confirm
cancel_shipping_label Cancel (void) a carrier label with the carrier (POST /api/v1/labelservic... confirm
submit_shipping_information Submit the shipping information of one or more label orders to their car... confirm
end_of_day Close the day with the carriers: submit the shipping information of ever... confirm
uniorder_rate Quote one shipment across self delivery and, with quote_labels=true, eve... 认证
uniorder_create Create an order at a rate_id from uniorder_rate (POST /api/v1/uniorder).... 认证
uniorder_get Read one uniorder order in the uniorder shape (GET /api/v1/uniorder/{ord... 认证
uniorder_label Get the label PDF of a uniorder order, base64 (GET /api/v1/uniorder/{ord... 认证
uniorder_tracking Get the tracking timeline of a uniorder order (GET /api/v1/uniorder/{ord... 认证
uniorder_cancel Cancel a uniorder order, self delivery or label (POST /api/v1/uniorder/{... confirm
uniorder_purchase_label Buy the carrier label of a uniorder label order that was kept without on... confirm
uniorder_rate_batch Quote up to 20 shipments in one call (POST /api/v1/uniorder/rate/batch).... 认证
uniorder_create_batch Create up to 20 orders in one call, each at its own rate_id (POST /api/v... confirm
uniorder_rate_batch_async Queue up to 500 shipments to quote (POST /api/v1/uniorder/rate/batch-asy... 认证
uniorder_create_batch_async Queue up to 500 orders to create, each at its own rate_id (POST /api/v1/... confirm
uniorder_job Read a queued uniorder batch and, once done, its results (GET /api/v1/un... 认证
list_shipping_services List the shipping services the customer may order (GET /api/v1/customer/... 认证
get_shipping_service_config Get one shipping service's order form: warehouses, surcharges, packaging... 认证
estimate_shipping_order Estimate the price of a shipping order on a service (POST /api/v1/custom... 认证
create_shipping_order Create a shipping order on a service (POST /api/v1/customer/shipping-ord... 认证
pay_shipping_order Pay the full remaining balance of a shipping order from the customer wal... confirm
get_shipping_order Get one shipping order of the customer (GET /api/v1/customer/shipping-or... 认证
list_shipping_orders List the customer's shipping orders on one service, paginated (GET /api/... 认证
cancel_shipping_order Cancel a pending or confirmed shipping order of the customer (POST /api/... confirm
get_storage_order_config Get what a storage order form needs: warehouses, packaging, supplies, pi... 认证
quote_storage_order Calculate the price of a storage order before creating it (POST /api/v1/... 认证
create_storage_order Create a storage order (POST /api/v1/customer/storage-orders). Storage o... 认证
pay_storage_order Pay a storage order from the customer wallet (POST /api/v1/customer/stor... confirm
get_storage_order Get one storage order of the customer, with can_edit, can_cancel and eac... 认证
list_storage_orders List the customer's storage orders, paginated (GET /api/v1/customer/stor... 认证
cancel_storage_order Cancel a storage order of the customer while its status allows it (POST... confirm
list_stored_packages List the customer's stored packages that can be shipped out: received, n... 认证
list_shipout_services List the shipping services that ship out from a warehouse (GET /api/v1/c... 认证
estimate_shipout Estimate the price of a ship-out (POST /api/v1/customer/shipout-orders/s... 认证
create_shipout Create a ship-out of stored packages from one warehouse (POST /api/v1/cu... 认证
pay_shipout Pay a priced ship-out from the customer wallet (POST /api/v1/customer/sh... confirm
get_shipout Get one ship-out of the customer with paid amount, remaining balance, ca... 认证
list_shipouts List the customer's ship-outs, paginated (GET /api/v1/customer/shipout-o... 认证
cancel_shipout Cancel a pending or confirmed ship-out and release its stored packages (... confirm
otep_client_tracking Get the OTEP timeline and details (addresses, dates, proof of delivery,... 认证
otep_client_locker_storage Get the OTEP timeline (storage profile) and details of one of your locke... 认证
// .mcp.json — 窄权限运营智能体配置 { "mcpServers": { "superroute": { "type": "url", "url": "https://api.superroute.ca/api/mcp", "headers": { "Authorization": "Bearer <token>", "X-MCP-Profile": "ops-readonly" } } } }
DEVELOPER 开发者 MCP 服务器

适用于帮助您构建 Superroute 集成的 AI 编码助手(Claude Code、Cursor 等)。您的 AI 可以直接调用 API、测试端点并生成集成代码。

ENDPOINT
https://api.superroute.ca/api/mcp/developer
可用工具 (25 个实时工具)
track_package 通过追踪号追踪包裹 公开
get_operation_events 获取订单审计记录 认证
get_shipping_methods 列出可用承运商 认证
get_shipping_rate 获取运费报价 认证
create_shipping_label 创建运输标签 认证
get_shipping_label 获取面单详情及下载信息 认证
create_order 创建配送/取件订单 认证
build_route 构建优化配送路线 认证
get_build_route_options Get available options for building routes: routing engines with their balance modes, capacity ty... 认证
get_api_endpoints Search the complete Superroute REST API catalog (the same OpenAPI spec that powers /api/document... 公开
get_graphql_operations Search the Superroute GraphQL catalog — every query and mutation, grouped by category, each with... 公开
run_graphql_query Execute a query or mutation against the Superroute GraphQL endpoint (POST /api/graphql) and retu... 认证
get_otep_tracking Get a package's tracking history as an OTEP (Open Tracking Event Protocol) document — the normal... 公开
validate_otep_payload Run an OTEP document or event through the live conformance validator (POST /api/v1/otep/validate... 公开
check_skill_update Check if a newer version of the Superroute AI integration skill file is available. Returns curre... 公开
get_integration_guide 获取集成指南 公开
get_otep_guide Get the OTEP (Open Tracking Event Protocol) development guide — the What/When/Where/Why event mo... 公开
get_webhook_guide Webhook 集成指南 公开
verify_webhook_signature Verify whether an incoming webhook signature is valid. Pass the raw payload (string or JSON obje... 公开
test_webhook_delivery Fire a real, properly-signed test webhook from Superroute servers to a URL the developer provide... 认证
get_webhook_settings Read the caller's own webhook configuration — every per-event callback URL, the behaviour flags,... 认证
update_webhook_settings Self-serve update of the caller's webhook configuration (PUT /api/v1/webhook-settings). Partial:... 认证
get_order_audit_timeline Chronological audit timeline of ONE order across every source: web actions, driver app scans, wa... 认证
get_webhook_delivery_logs List recorded webhook delivery attempts for the caller — event type, target URL, HTTP status, at... 认证
replay_webhook_delivery Re-send a webhook that was already logged, by delivery-log id (get the id from get_webhook_deliv... 认证
// .mcp.json — 优先连接级 Bearer { "mcpServers": { "superroute-dev": { "type": "url", "url": "https://api.superroute.ca/api/mcp/developer", "headers": { "Authorization": "Bearer <token>" } } } }

2026-12-31 之后请勿在工具参数中传 api_token,请使用 MCP 连接的 Authorization。

通过 OAuth 连接

在 Claude 或其他 MCP 客户端中将服务器 URL 添加为连接器,登录并批准权限,无需粘贴令牌。可在 API 令牌 → 已连接的 AI 应用中撤销应用的访问。

现有连接保持不变、继续可用:API 令牌、配置档和权限范围请求头,以及上方的服务器 URL。

连接器

只包含某一业务领域工具的较小服务器,支持 API 令牌和 OAuth 登录。

配送 · 工具数:33
https://api.superroute.ca/api/mcp/connectors/delivery
寄件 · 工具数:28
https://api.superroute.ca/api/mcp/connectors/shipping
仓库 · 工具数:37
https://api.superroute.ca/api/mcp/connectors/warehouse
User MCP 用于智能体管理 Superroute;Developer MCP 用于构建集成。完整安全模型、profile 与实时工具列表见 MCP 专栏。 打开 MCP 专栏 → 隐私政策 服务条款
AI 工具发现端点

为 AI 代理、LLM 工具调用系统和 MCP 客户端提供的结构化能力描述。所有端点均公开,无需认证。

PRIMARY AI 工具清单

完整清单,包含工具定义、Schema、认证信息和工作流。

GET https://api.superroute.ca/api/.well-known/ai-tools.json
还可用: /llms.txt
FORMAT 多格式导出

获取适配您 AI 平台原生格式的工具定义。

# OpenAI function calling GET https://api.superroute.ca/api/ai/tools?format=openai # Anthropic Claude tool_use GET https://api.superroute.ca/api/ai/tools?format=anthropic # MCP tools/list GET https://api.superroute.ca/api/ai/tools?format=mcp # LangChain StructuredTool GET https://api.superroute.ca/api/ai/tools?format=langchain
REST OpenAPI + AI 扩展

OpenAPI 规范,增加了 x-ai-* 扩展(工具名称、使用场景、分类)。

GET https://api.superroute.ca/api/ai/tools/openapi
GQL GraphQL + AI 提示

GraphQL 文档,每个操作增加了 aiHints(使用场景、关联工作流)。

GET https://api.superroute.ca/api/ai/tools/graphql
快速集成
Python(OpenAI SDK )
import requests, json tools = requests.get( "https://api.superroute.ca/api/ai/tools?format=openai" ).json()["tools"] # Pass to OpenAI response = client.chat.completions.create( model="gpt-4", messages=messages, tools=tools )
Python(克劳德 SDK )
import requests, anthropic tools = requests.get( "https://api.superroute.ca/api/ai/tools?format=anthropic" ).json()["tools"] # Pass to Claude response = client.messages.create( model="claude-sonnet-4-20250514", messages=messages, tools=tools )
Node.js(获取)
const res = await fetch( "https://api.superroute.ca/api/ai/tools?format=openai" ); const { tools } = await res.json(); // Use with any LLM SDK console.log(`Loaded ${tools.length} tools`);
能力概览: 获取轻量级概览(仅类别和工具名称),请使用 GET https://api.superroute.ca/api/ai/capabilities
AI 工具 Playground

直接在浏览器中测试 Superroute AI 工具。选择一个工具,填写参数,查看实时 API 响应。

选择工具
track_package
响应
点击"运行"执行工具...
使用 REST 或 GraphQL 构建

适用于构建自定义 AI 代理、聊天机器人或程序化集成的开发者。从您的代码中直接调用我们的 API,全面访问所有物流功能。

REST REST API 端点
# 追踪包裹(公开) GET https://api.superroute.ca/api/v1/tracking/{number} # 操作事件 POST https://api.superroute.ca/api/v1/tracking/operationevents # 获取运费报价 POST https://api.superroute.ca/api/v1/labelservice/rate # 创建运输标签 POST https://api.superroute.ca/api/v1/labelservice/submitOrder # 创建配送订单 POST https://api.superroute.ca/api/v1/client/orderCreate # 构建优化路线 POST https://api.superroute.ca/api/v3/client/build-route # 配置 Webhook PUT https://api.superroute.ca/api/v1/webhook-settings # 开放追踪时间线(OTEP) GET https://api.superroute.ca/api/v1/otep/trackings/{number}
完整文档
GQL GraphQL 操作
# 单一端点 POST https://api.superroute.ca/api/graphql # 可用操作 trackingPublic ← 追踪包裹(公开) trackingOperationevents ← 操作事件 labelserviceRate ← 获取运费报价 labelserviceSubmitOrder ← 创建运输标签 clientOrderCreate ← 创建配送订单 clientBuildRoute ← 构建优化路线 webhookSettingsUpdate ← 配置 Webhook otepTracking ← 开放追踪时间线(OTEP)
完整文档
我们推荐大多数 AI 集成使用 REST API——它更易于调试,每个端点都是独立的。当您需要灵活查询或想在单次请求中获取嵌套数据时,请使用 GraphQL。
Superroute AI 集成技能

一个全面的技能文件,包含深度物流领域知识——每个 API 的功能、使用时机、参数在实际业务场景中的含义、如何解读结果,以及各功能如何组合使用。

下载技能文件 (.md)
如何使用技能文件
Claude Code
  • 1 下载上述文件
  • 2 将其放置在项目的 .claude/skills/ 目录中
  • 3 在 Claude Code 中输入 /integrate 启动交互式向导
mkdir -p .claude/skills cp superroute-ai-integration.md .claude/skills/
Cursor
  • 1 下载上述文件
  • 2 将其放置在项目的 .cursor/rules/ 目录中
  • 3 Cursor 将在您询问 Superroute 集成时自动将其用作上下文
mkdir -p .cursor/rules cp superroute-ai-integration.md .cursor/rules/
其他 AI 工具
  • 1 下载上述文件
  • 2 将内容粘贴到您 AI 工具的系统提示或知识库中
  • 3 AI 将使用语义描述来指导集成
# 或粘贴到系统提示中 cat superroute-ai-integration.md
保持技能文件为最新版本
快速 一键升级

直接从服务器下载最新的技能文件,覆盖本地副本。

# Claude Code curl -sS https://api.superroute.ca/api/ai-skill -o .claude/skills/superroute-ai-integration.md # Cursor curl -sS https://api.superroute.ca/api/ai-skill -o .cursor/rules/superroute-ai-integration.md
API 版本检查 API

下载前先检查服务器上的最新版本。将哈希值与本地文件对比,判断是否需要更新。

GET https://api.superroute.ca/api/ai-skill/version 响应: { "version": "1.0.0", "hash": "abc123...", "download_url": "..." }
MCP 通过 MCP 自动更新

如果您已连接开发者 MCP 服务器,AI 助手可以使用 check_skill_update 工具检查更新。传入本地文件的 MD5 哈希值即可获取 update_available 布尔值。

// 通过开发者 MCP 服务器调用 { "method": "tools/call", "params": { "name": "check_skill_update", "arguments": { "current_hash": "your_local_file_md5_hash" } } }
CRON 自动更新脚本 (Cron / CI)

将此脚本添加到 CI 流水线或 cron 任务中,自动保持技能文件始终为最新版本。

#!/bin/bash # auto-update-skill.sh SKILL_FILE=".claude/skills/superroute-ai-integration.md" BASE_URL="https://api.superroute.ca" mkdir -p "$(dirname "$SKILL_FILE")" LOCAL_HASH=$(md5sum "$SKILL_FILE" 2>/dev/null | cut -d' ' -f1) SERVER_HASH=$(curl -s "$BASE_URL/api/ai-skill/version" | python3 -c "import sys,json; print(json.load(sys.stdin)['hash'])") if [ "$LOCAL_HASH" != "$SERVER_HASH" ]; then curl -sS "$BASE_URL/api/ai-skill" -o "$SKILL_FILE" echo "Updated!" fi
技能文件不仅仅是 API 文档——它教会您的 AI 助手每个参数的业务含义、如何解读响应,以及如何组合功能以处理复杂的物流工作流。

代码示例

REST REST API — 追踪包裹
追踪包裹(无需令牌)
curl https://api.superroute.ca/api/v1/tracking/SR123456
追踪包裹(无需令牌)
<?php $res = (new \GuzzleHttp\Client())->get('https://api.superroute.ca/api/v1/tracking/SR123456'); print_r(json_decode($res->getBody(), true));
追踪包裹(无需令牌)
import requests res = requests.get('https://api.superroute.ca/api/v1/tracking/SR123456') print(res.json())
追踪包裹(无需令牌)
resp, _ := http.Get("https://api.superroute.ca/api/v1/tracking/SR123456") var result map[string]interface{} json.NewDecoder(resp.Body).Decode(&result)
追踪包裹(无需令牌)
const res = await fetch('https://api.superroute.ca/api/v1/tracking/SR123456'); const data = await res.json();
追踪包裹(无需令牌)
HttpClient client = HttpClient.newHttpClient(); HttpRequest req = HttpRequest.newBuilder() .uri(URI.create("https://api.superroute.ca/api/v1/tracking/SR123456")) .build(); HttpResponse<String> res = client.send(req, HttpResponse.BodyHandlers.ofString()); System.out.println(res.body());
追踪包裹(无需令牌)
require 'net/http' puts Net::HTTP.get(URI('https://api.superroute.ca/api/v1/tracking/SR123456'))
GQL GraphQL — 查询订单
查询订单
curl -X POST https://api.superroute.ca/api/graphql \ -H "Content-Type: application/json" \ -d '{"query":"query { trackingPublic(trackingNumber: \"SR123456\") { trackingNumber status events { timestamp description } } }"}'
查询订单
$query = 'query { trackingPublic(trackingNumber: "SR123456") { trackingNumber status } }'; $res = (new \GuzzleHttp\Client())->post('https://api.superroute.ca/api/graphql', [ 'json' => ['query' => $query, 'variables' => []], ]); print_r(json_decode($res->getBody(), true));
查询订单
import requests query = 'query { trackingPublic(trackingNumber: "SR123456") { trackingNumber status } }' res = requests.post('https://api.superroute.ca/api/graphql', json={'query': query, 'variables': {}}) print(res.json())
查询订单
payload, _ := json.Marshal(map[string]interface{}{ "query": `query { trackingPublic(trackingNumber: "SR123456") { trackingNumber status } }`, "variables": map[string]interface{}{}, }) req, _ := http.NewRequest("POST", "https://api.superroute.ca/api/graphql", bytes.NewBuffer(payload)) req.Header.Set("Content-Type", "application/json") resp, _ := http.DefaultClient.Do(req)
查询订单
const res = await fetch('https://api.superroute.ca/api/graphql', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ query: `query { trackingPublic(trackingNumber: "SR123456") { trackingNumber status } }` }), }); const data = await res.json();
查询订单
String body = "{\"query\":\"query { trackingPublic(trackingNumber: \\\"SR123456\\\") { trackingNumber status } }\"}"; HttpRequest req = HttpRequest.newBuilder() .uri(URI.create("https://api.superroute.ca/api/graphql")) .header("Content-Type", "application/json") .POST(HttpRequest.BodyPublishers.ofString(body)).build(); HttpResponse<String> res = HttpClient.newHttpClient().send(req, HttpResponse.BodyHandlers.ofString());
查询订单
require 'net/http'; require 'json' uri = URI('https://api.superroute.ca/api/graphql') req = Net::HTTP::Post.new(uri, 'Content-Type' => 'application/json') req.body = JSON.dump({ query: 'query { trackingPublic(trackingNumber: "SR123456") { trackingNumber status } }' }) puts Net::HTTP.start(uri.hostname, uri.port) { |h| h.request(req) }.body
MCP MCP — 追踪包裹
追踪包裹(无需 Token)
curl -X POST https://api.superroute.ca/api/mcp \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"track_package","arguments":{"tracking_number":"SR123456"}}}'
追踪包裹(无需 Token)
$payload = [ 'jsonrpc' => '2.0', 'id' => 1, 'method' => 'tools/call', 'params' => ['name' => 'track_package', 'arguments' => ['tracking_number' => 'SR123456']], ]; $res = (new \GuzzleHttp\Client())->post('https://api.superroute.ca/api/mcp', ['json' => $payload]); print_r(json_decode($res->getBody(), true));
追踪包裹(无需 Token)
import requests payload = { 'jsonrpc': '2.0', 'id': 1, 'method': 'tools/call', 'params': {'name': 'track_package', 'arguments': {'tracking_number': 'SR123456'}}, } res = requests.post('https://api.superroute.ca/api/mcp', json=payload) print(res.json())
追踪包裹(无需 Token)
payload, _ := json.Marshal(map[string]interface{}{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": map[string]interface{}{ "name": "track_package", "arguments": map[string]interface{}{"tracking_number": "SR123456"}, }, }) req, _ := http.NewRequest("POST", "https://api.superroute.ca/api/mcp", bytes.NewBuffer(payload)) req.Header.Set("Content-Type", "application/json") resp, _ := http.DefaultClient.Do(req)
追踪包裹(无需 Token)
const res = await fetch('https://api.superroute.ca/api/mcp', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'tools/call', params: { name: 'track_package', arguments: { tracking_number: 'SR123456' } }, }), }); const data = await res.json();
追踪包裹(无需 Token)
String body = "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/call\",\"params\":{\"name\":\"track_package\",\"arguments\":{\"tracking_number\":\"SR123456\"}}}"; HttpRequest req = HttpRequest.newBuilder() .uri(URI.create("https://api.superroute.ca/api/mcp")) .header("Content-Type", "application/json") .POST(HttpRequest.BodyPublishers.ofString(body)).build(); HttpResponse<String> res = HttpClient.newHttpClient().send(req, HttpResponse.BodyHandlers.ofString());
追踪包裹(无需 Token)
require 'net/http'; require 'json' uri = URI('https://api.superroute.ca/api/mcp') req = Net::HTTP::Post.new(uri, 'Content-Type' => 'application/json') req.body = JSON.dump({ jsonrpc: '2.0', id: 1, method: 'tools/call', params: { name: 'track_package', arguments: { tracking_number: 'SR123456' } } }) puts Net::HTTP.start(uri.hostname, uri.port) { |h| h.request(req) }.body