将运营商发布到Bigcommerce Shipments API

时间:2015-08-14 19:18:09

标签: bigcommerce

当物品通过FedEx运送时,我希望最终客户查看FedEx跟踪号码。我如何指明承运人?我会把#34; FedEx"在shipping_method字段?

2 个答案:

答案 0 :(得分:1)

运输公司只能在初始POST期间设置,而不能与后续的PUT请求一起设置。在创建货件并且您想要表示运输承运人时,您应该发送一个带有json正文的POST请求,例如:

[
  {
    "id": 1,
    "order_id": 115,
    "customer_id": 0,
    "order_address_id": 16,
    "date_created": "Wed, 19 Dec 2012 17:17:10 +0000",
    "tracking_number": "111222333444",
    "shipping_method": "None",
    "shipping_provider": "fedex",
    "tracking_carrier": "fedex",
    "comments": "A sample shipment for order 115",
    "billing_address": {
      "first_name": "Louise",
      "last_name": "Dean",
      "company": "Skiptube",
      "street_1": "147 Meadow Vale Way",
      "street_2": "",
      "city": "Fullerton",
      "state": "Rhode Island",
      "zip": "74674",
      "country": "United States",
      "country_iso2": "US",
      "phone": "7-(086)085-9448",
      "email": ""
    },
    "shipping_address": {
      "first_name": "Louise",
      "last_name": "Dean",
      "company": "Skiptube",
      "street_1": "147 Meadow Vale Way",
      "street_2": "",
      "city": "Fullerton",
      "state": "Rhode Island",
      "zip": "74674",
      "country": "United States",
      "country_iso2": "US",
      "phone": "7-(086)085-9448",
      "email": ""
    },
    "items": [
      {
        "order_product_id": 16,
        "product_id": 0,
        "quantity": 1
      }
    ]
  }
]

答案 1 :(得分:0)

是的,“shipping_method”是用于运营商名称的正确属性。