页面树结构
转至元数据结尾
转至元数据起始

正在查看旧版本。 查看 当前版本.

与当前比较 查看页面历史

版本 1 下一个 »

接口说明

以大包方式将包裹数据传送给操作站。

此接口有三种模式:

1) 同时创建大包与新订单,系统会接受订单信息并且创建客户指定的大包号的大包,新订单自动关联上该大包。

2) 创建大包,并将大包与系统中已有订单进行关联。

3) 创建大包的同时创建新订单,并与系统已有订单进行关联。创建大包成功后,新大包中部分订单为新创建订单,另一部分为系统已有订单。


接口校验:

    • Handover请求成功后,大包会即刻生成并且状态为“Closed”,同时大包中的小包状态也全部为“Closed”。
    • 每个大包中最多只能有2000个小包。

路径

HTTP Verb URL
Post/services/shipper/handover
1.  同时创建大包与新订单

请求报文

Request
{
    "batchNo": "20200810001",
    "handoverTime": "2020-08-10T11:45:22+08:00",
    "consignor": "test",
    "consignee": "test",
    "driver": "张三",
    "plateNbr": "沪A8888",
    "remark": "测试",
    "bags": [{
      "bagNo": "20201102001-001",
      "serviceCode": "UBI.CN2AU.AUPOST",
      "facility": "SZX",
      "destCountry": "AU",
      "sortCode": "",
      "battery": false,
      "parcels": [{
        "referenceNo": "TESTBDAU15303483645716",
        "serviceCode": "UBI.CN2AU.AUPOST",
        "recipientName": "WUBIN",
        "phone": "+49 3068838320",
        "addressLine1": "Stellingdamm9",
        "addressLine2": "",
        "city": "Cudgewa",
        "postcode": "3705",
        "state": "VIC",
        "country": "AU",
        "weight": 0.646,
        "invoiceCurrency": "USD",
        "batteryType": "NoBattery",
        "description": "Pants",
        "nativeDescription": "货物中文描述",
        "extendData": {
          "vendorid": "64652016681",
          "gstexemptioncode": "Paid"
        },
        "orderItems": [{
          "itemNo": 1,
          "sku": "159110805",
          "description": "Pants",
          "hsCode": "6104620050",
          "originCountry": "CHINA",
          "unitValue": "38.44",
          "itemCount": 2
        }],
        "invoiceValue": "76.88"
      }]
    }]
  }
  
2. 大包与已有订单关联

请求报文

Response
{
    "bags": [
      {
        "bagNo": "ZXHX1082270",
        "battery": false,
        "destCountry": "AU",
        "facility": "CAN",
        "parcels": [
          {
            "trackingNo": "JDQ002447301000931502"
          }
        ],
        "serviceCode": "UBI.ASP.CN2AU.AUPOST",
        "totalWeight": 0.064
      }
    ],
    "batchNo": "ZXYD1016617",
    "handoverTime": 1597039375903
  }

3. 大包与新订单及已有订单进行关联

请求报文

Response
{
    "batchNo": "20200810001",
    "handoverTime": "2020-08-11T22:08:08+0800",
    "consignor": "test",
    "consignee": "test",
    "driver": "张三",
    "plateNbr": "沪A8888",
    "remark": "测试",
    "bags": [{
        "bagNo": "20201102001-001",
        "serviceCode": "UBI.ASP.CN2AU.AUPOST",
        "facility": "SZX",
        "destCountry": "AU",
        "sortCode": "YYZ",
        "battery": false,
        "totalWeight": 0.3,
        "extendData": {
            "sortCode": "M1A1"
         },
        "parcels": [{
            "referenceNo": "TESTBDAU15303483645716"
        }]
    }, {
        "bagNo": "20171102001-002",
        "serviceCode": "UBI.ASP.CN2AU.AUPOST",
        "facility": "SZX",
        "destCountry": "AU",
        "sortCode": "YYZ",
        "battery": false,
        "totalWeight": 0.3,
        "parcels": [{
            "referenceNo": "TESTBDAU15303483645717",
            "serviceCode": "UBI.ASP.CN2AU.AUPOST",
            "recipientName": "WUBIN",
            "phone": "+49 3068838320",
            "addressLine1": "Stellingdamm 9",
            "addressLine2": "",
            "city": "Cudgewa",
            "postcode": "3705",
            "state": "VIC",
            "country": "AU",
            "weight": 0.646,
            "invoiceCurrency": "USD",
            "batteryType": "No Battery",
            "description": "Pants",
            "nativeDescription": "货物中文描述",
            "extendData": {
                "vendorid": "6465201 6681",
                "gstexemptioncode": "Paid"
            },
            "orderItems": [{
                "itemNo": 1,
                "sku": "159110805",
                "description": "Pants",
                "hsCode": "6104620050",
                "originCountry": "CHINA",
                "unitValue": "38.44",
                "itemCount": 2
            }],
            "invoiceValue": "76.88"
        }]
    }]
}

响应内容

服务端返回与请求相对应的大包号,包括

1)是否创建成功(status);

2)出错代码(errors);

3)参考号(referenceNo);

4)跟踪号(trackingNo);
5)大包号(bagNo);


响应报文

Response
{
    "status": "Success",
    "errors": null,
    "data": [
        {
            "status": "Success",
            "errors": [],
            "bagNo": "20171102001-001",
            "orderResults": [
                {
                    "status": "Success",
                    "errors": null,
                    "orderId": null,
                    "referenceNo": "TESTBDAU15303483645716",
                    "trackingNo": null,
                    "connoteId": null
                }
            ]
        },
        {
            "status": "Success",
            "errors": [],
            "bagNo": "20171102001-002",
            "orderResults": [
                {
                    "status": "Success",
                    "errors": null,
                    "orderId": null,
                    "referenceNo": "TESTBDAU15303483645717",
                    "trackingNo": null,
                    "connoteId": null
                }
            ]
        }
    ]
}


  • 无标签