接口API

公开技术评估层:先判断能不能接、怎么接、复杂度多大Public technical evaluation layer for fast integration assessment

支持接口接入与表格批量上传下单。你可以在不获取完整受限文档前,先完成方案评估与实施预估。Supports API onboarding and Excel bulk order upload. Engineering teams can evaluate feasibility before requesting full restricted documentation.

快速开始概览Quick Start Overview

  • 先区分环境:生产环境 `https://api.easyshippingx.com/`,测试环境 `https://test-api.easyshippingx.com/`。Use environment-specific bases: production `https://api.easyshippingx.com/`, testing `https://test-api.easyshippingx.com/`.
  • 优先打通询价与创建订单接口(POST / JSON / UTF-8),确认计费与下单链路。Start with quotation and create order (POST / JSON / UTF-8) to validate rating and order creation.
  • 系统中持久化 `shipment_code`,用于后续查询、追踪、打印与退款流程。Persist `shipment_code` in your system for follow-up query, tracking, print, and refund operations.

认证方式说明Authentication method overview

  • 基于接口密钥与令牌的服务端鉴权模型(生产与测试分环境管理)。Server-to-server API Key/Token authentication with isolated prod/test environments.
  • 建议最小权限、密钥轮换与调用来源白名单。Use least-privilege scopes, key rotation, and trusted source controls.
  • 敏感凭证仅在受控渠道发放,不在公开页面展示。Sensitive credentials are issued only via controlled onboarding channels.

核心流程图Core workflow diagram

询价quotation 创建运单create shipment 生成面单label 轨迹查询tracking 退款(如适用)refund (if applicable)

建议先按低风险场景上线:从少量订单验证字段,再逐步扩大。For low-risk rollout, validate fields on a small batch before scaling volume.

API 接口清单Endpoint list

以下接口与当前公开文档保持一致,覆盖下单、查询、计价、打印、退款与轨迹链路。Aligned with current ShowDoc public docs, covering order creation, query, quotation, print, refund, and tracking workflows.

  • POST /v1/order 创建订单并返回运单编码等核心履约字段。Create shipment and return shipment_code with core fields.
  • POST /v1/order/quotation 下单前估算费用与计费重量。Estimate price and billable weight before order creation.
  • GET /v1/order/{shipment_code} 查询订单和面单状态(部分渠道需异步拉取面单)。Query order and label status (some channels require asynchronous label retrieval).
  • POST /v1/shipment/{shipment_code}/refund 提交取消/退款申请(下单 30 天内;退款审核由服务商流程驱动)。Submit cancellation/refund requests (within 30 days; final approval follows carrier workflow).
  • GET /v1/order/{shipment_code}/track 获取轨迹节点,用于异常跟进。Retrieve tracking events for monitoring and exception handling.

退款提醒:取消分两阶段处理,整体周期通常不超过 30 天;公开文档说明 USPS 取消会收取约 10% 运费。已取消运单不可继续发货。Refund note: cancellation follows a two-phase process and is generally completed within 30 days; public docs indicate USPS cancellations may incur about 10% freight. Do not ship with cancelled labels.

请求/响应示例Sample request / response

POST /v1/order/quotation
{
  "order_id": "SO-10001",
  "ship_from_zip": "91761",
  "ship_to_zip": "33101",
  "weight_lb": 1.2,
  "service": "ground"
}

200 OK
{
  "shipment_code": "QTE-6G72A",
  "carrier": "USPS",
  "estimated_total": 5.92,
  "currency": "USD"
}

示例用于评估字段结构,不代表完整业务字段与生产凭证。Example payloads are for evaluation only and do not include full production fields.

错误处理原则Error handling principles

  • 2xx 代表请求受理成功,4xx 处理参数/业务错误,5xx 处理系统级问题。Use 2xx for accepted requests, 4xx for validation/business errors, and 5xx for system-side failures.
  • 不要将所有异常统一归类为“接口调用失败”,请保留原始错误码与错误信息以便修正后重试。Do not collapse all errors into a generic “API call failed”; preserve raw error codes/messages for corrective retry.
  • 建议结合告警和重试上限,避免无限重试导致流量放大。Set retry caps and alerts to avoid runaway retry loops.

幂等与重试摘要Idempotency / retry summary

  • 关键写接口建议使用唯一业务单号 + 幂等键,避免重复出单。Use unique order references and idempotency keys on write endpoints.
  • 超时重试采用指数退避,并保留请求日志用于追踪。Apply exponential backoff retries with request logs for traceability.
  • 失败补偿优先走查询接口确认状态,再决定是否重放请求。Use status query before replaying failed writes.

支持的 ERP(公开文档)Supported ERP (public docs)

公开文档列出的已对接 ERP 包括:海豚云、领星、易境通、易抵达、华磊、极风 WMS。具体能力与字段映射请以对接评估为准。Public docs list Dolphin Cloud, Lingxing, Yijingtong, Yidida, Hualei, and Jifeng WMS as supported ERP systems. Confirm exact capability and field mapping during integration assessment.

账单/对账字段映射摘要Billing / reconciliation field mapping summary

字段Field 用途Purpose 对账建议Reconciliation guidance
shipment_code履约主键Shipment primary key关联订单、轨迹、退款Join orders, tracking, and refunds
order_id业务订单号Merchant order reference用于业务系统回溯Link back to OMS/ERP records
charge_items费用明细Charge line items核对标签费、附加费、调整项Validate label, surcharge, and adjustments
refund_status退款状态Refund lifecycle status匹配冲销与财务处理Map reversals to finance workflow

常见问题FAQ

可以。很多团队会先验证字段和流程,再进入更完整的接口对接。Yes. Many teams validate fields and workflows first, then expand into a fuller API rollout.
足够完成初步判断,包括接口覆盖范围、字段模型与上线顺序的评估。Yes. It is designed for initial evaluation of flow coverage, field model fit, and rollout sequence.
当你已经确认接入方向,并需要进入真实字段、认证凭证与联调阶段时,再申请完整文档最合适。Request full documentation once the integration path is confirmed and the team is ready for real fields, credentials, and testing.
Get Rate Comparison
Get Rate Comparison