开放平台接口文档
  • 基础

    • 调用方法
    • 关于鉴权
    • 业务建议
    • 文字符号
    • 返回信息代码含义
  • 物流接口

    • 预报订单
    • 获取面单
    • 费用查询
    • 取消订单
    • 批量取消订单
    • 订单轨迹
    • 预上网推送
      • 请求参数
      • 返回信息
    • 获取订单列表
    • 获取用户信息
    • 获取物流服务列表
  • 仓库接口

    • 出库业务流程
    • 创建出库订单
    • 获取出库订单
    • 获取仓库列表
    • 拦截出库订单
    • 获取入库订单
    • 获取库存信息
目录

预上网推送

POST /order/forecast

预上网推送时,请务必确保所有提交的参数准确无误,一单提交成功,推送信息无法修改和取消,可同时推送多条,请合理设置预报时间间隔。

只支持USPS的运单号/追踪号(tracking_number)

# 请求参数

请求参数列表:

参数名称 类型(限制) 必须 描述 示例
tracking_number String(限50位字符) 是 运单号 / 追踪号
93001109230002********
sender.country String(限16位字符) 是 发件人国家 US
sender.name String(限32位字符) 是 发件人全名 Tom
sender.company String(限16位字符) 否 发件人公司名 AAA Inc.
sender.address Array[String]
(地址1限48位字符,地址2限40位字符)
是 发件人地址 ['5660 Lindbergh Ln', '']
sender.city String(限32位字符) 是 发件人城市 Bell
sender.state String(限20位字符) 是 发件人州/省 CA
sender.zipcode String(限5位或10位) 是 发件人邮编 12201
sender.phone String(限16位字符) 否 发件人电话 1234567890
recipient.country String(限16位字符) 是 收件人国家 US
recipient.name String(限32位字符) 是 收件人全名 Jack
recipient.company String(限16位字符) 否 收件人公司名 BBB Inc.
recipient.address Array[String]
(地址1限48位字符,地址2限40位字符)
是 收件人地址 ['31793 Sierra Del Sol','']
recipient.city String(限32位字符) 是 收件人城市 Thousand Palms
recipient.state String(限20位字符) 是 收件人州/省 CA
recipient.zipcode String(限5位或10位) 是 收件人邮编 94501-12345
recipient.phone String(限16位字符) 否 收件人电话 1234567890

请求示例:

[
    {
        "tracking_number": "93001109230001********",
        "sender": {
            "country": "US",
            "name": "Kevin",
            "company": "AAA Inc.",
            "address": [
                "5660 Lindbergh Ln",
                ""
            ],
            "city": "Bell",
            "state": "CA",
            "zipcode": "90201",
            "phone": "109****313"
        },
        "recipient": {
            "country": "US",
            "name": "John Newman",
            "company": "BBB Inc.",
            "address": [
                "31793 Sierra Del Sol",
                ""
            ],
            "city": "Thousand Palms",
            "state": "CA",
            "zipcode": "92276-12345",
            "phone": "765****391"
        }
    },
    {
        "tracking_number": "93001109230002********",
        "sender": {
            "country": "US",
            "name": "Kevin",
            "address": [
                "5660 Lindbergh Ln",
                ""
            ],
            "city": "Bell",
            "state": "CA",
            "zipcode": "12201"
        },
        "recipient": {
            "country": "US",
            "name": "John Newman",
            "address": [
                "31793 Sierra Del Sol",
                ""
            ],
            "city": "Thousand Palms",
            "state": "CA",
            "zipcode": "92276-12345"
        }
    },
    {
        "tracking_number": "93001109230003********",
        "sender": {
            "country": "US",
            "name": "Jack",
            "company": "XPO Logistics Inc.",
            "address": [
                "31** Sierra Del Sol",
                ""
            ],
            "city": "Thousand Palms",
            "state": "CA",
            "zipcode": "92276-3195",
            "phone": "765****391"
        },
        "recipient": {
            "country": "US",
            "name": "Tom",
            "company": "A Lineage Logistics",
            "address": [
                "56** Lindbergh Ln",
                ""
            ],
            "city": "Bell",
            "state": "CA",
            "zipcode": "90201",
            "phone": "765****392"
        }
    }
]

# 返回信息

接口返回预上网推送结果的json数据。

完整响应数据示例:

  1. 至少有一个成功时就会返回 code=200,data中的fail是失败的数组

示例:

{
    "code": 200,
    "msg": "success",
    "data": {
        "fail": [
            {
                "tracking_number": "93001109230001********",
                "sender": {
                    "country": "US",
                    "name": "Kevin",
                    "company": "AAA Inc.",
                    "address": [
                        "5660 Lindbergh Ln",
                        ""
                    ],
                    "city": "Bell",
                    "state": "CA",
                    "zipcode": "90201",
                    "phone": "109****313"
                },
                "recipient": {
                    "country": "US",
                    "name": "John Newman",
                    "company": "BBB Inc.",
                    "address": [
                        "31793 Sierra Del Sol",
                        ""
                    ],
                    "city": "Thousand Palms",
                    "state": "CA",
                    "zipcode": "92276-12345",
                    "phone": "765****391"
                }
            },
            {
                "tracking_number": "93001109230003********",
                "sender": {
                    "country": "US",
                    "name": "Jack",
                    "company": "XPO Logistics Inc.",
                    "address": [
                        "31** Sierra Del Sol",
                        ""
                    ],
                    "city": "Thousand Palms",
                    "state": "CA",
                    "zipcode": "92276-3195",
                    "phone": "765****391"
                },
                "recipient": {
                    "country": "US",
                    "name": "Tom",
                    "company": "A Lineage Logistics",
                    "address": [
                        "56** Lindbergh Ln",
                        ""
                    ],
                    "city": "Bell",
                    "state": "CA",
                    "zipcode": "90201",
                    "phone": "765****392"
                }
            }
        ]
    }
}
  1. 请求全部失败时返回 code=100

示例:

{
    "code": 100,
    "msg": "当前提交数据全部失败, 请检查数据格式是否正确!",
    "data": []
}
订单轨迹
获取订单列表

← 订单轨迹 获取订单列表→

  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式