Chuyển tới nội dung chính

v2.first_mile.bind_first_mile_tracking_number

POST /api/v2/first_mile/bind_first_mile_tracking_number

Dùng API này để liên kết số theo dõi chặng đầu.

Đường dẫn Endpoint

URL: https://partner.shopeemobile.com/api/v2/first_mile/bind_first_mile_tracking_number

Tham số chung

TênKiểuMẫuMô tả
partner_idint1ID đối tác được cấp sau khi đăng ký thành công. Bắt buộc cho tất cả các yêu cầu.
timestamptimestamp1610000000Dùng để xác định thời điểm của yêu cầu. Bắt buộc cho tất cả các yêu cầu. Hết hạn sau 5 phút.
access_tokenstringc09222e3fc40ffb25fc947f738b1abf1Token dùng để truy cập API, xác định quyền của bạn đối với API. Có thể dùng nhiều lần và hết hạn sau 4 giờ.
shop_idint600000Mã định danh duy nhất của Shopee cho một gian hàng. Tham số bắt buộc cho hầu hết các API.
signstringe318d3e932719916a9f9ebb57e2011961bd47abfa54a36e040d050d8931596e2Signature generated by partner_id, api path, timestamp, access_token, shop_id and partner_key via HMAC-SHA256 hashing algorithm. More details: https://open.shopee.com/documents?module=87&type=2&id=58&version=2

Tham số Request

TênKiểuBắt buộcMẫuMô tả
first_mile_tracking_numberstringTrueCNF731738838434210105If using "pickup" or "self_deliver" as the shipment method the "first_mile_tracking_number" field should pass the value generated from v2.first_mile.generate_first_mile_tracking_number. If using "dropoff" as the shipment method the "first_mile_tracking_number" field should pass the tracking number provide by the supplier.
shipment_methodstringTruepickupThe shipment method for bound orders, should be pickup, dropoff or self_deliver.
regionstringTruecnUse this field to specify the region you want to ship parcel. Available value: cn,kr. Please fill in the field according to the region of the Merchant to which the shop belongs.
logistics_channel_idint32True813The identity of first-mile logistic channel. If you using "dropoff" or "pickup" as shipment method, please call v2.first_mile.get_channel_list to get the logsitc_channel_id then fill it. If you using "self_deliver"as shipment method then the logistics_channel_id should be "null".
volumefloatFalse1.0The volume of the parcel.
weightfloatFalse2.0The weight of the parcel.
widthfloatFalse3.0The width of the parcel.
lengthfloatFalse4.0The length of the parcel.
heightfloatFalse5.0The height of the parcel.
order_listobject[]TrueThe set of ordersn. You can specify up to 50 ordersns in this call.one fm_tn maximum number of total bind orders is 10000.
order_snstringTrue201229TVRKVB8WShopee's unique identifier for an order.
package_numberstringFalseShopee's unique identifier for the package under an order. You should't fill the field with empty string when there is't a package number.
warehouse_idstringFalseECP03The identity of transit warehouse address. Retrieved from v2.first_mile.get_transit_warehouse_list. Note: When the first-mile delivery mode is "Drop Off", this field is expected to be a required field. However, to avoid affecting your existing services, this field will be temporarily optional until April 30, 2026. Please complete the integration before then to avoid any impact on your services if it is changed to a required field later.
warehouse_typeint32False0Warehouse type. Retrieved from v2.first_mile.get_transit_warehouse_list. 0 = normal warehouse 1 = vendor warehouse Note: When the first-mile delivery mode is "Drop Off", this field is expected to be a required field. However, to avoid affecting your existing services, this field will be temporarily optional until April 30, 2026. Please complete the integration before then to avoid any impact on your services if it is changed to a required field later.

Tham số Response

TênKiểuMẫuMô tả
request_idstringuyavvIOqyJUSgWCNaXkCSHigqrFgHpuJMã định danh cho yêu cầu API, dùng để theo dõi lỗi.
errorstringfirstmile.batch_api_all_failedCho biết loại lỗi nếu xảy ra lỗi. Rỗng nếu không có lỗi.
messagestringAll failed, please check result_list for detailCho biết chi tiết lỗi nếu xảy ra lỗi. Rỗng nếu không có lỗi.
warningobject[]Thông báo cảnh báo bạn cần lưu ý.
order_snstring201229TVRKVB8WShopee's unique identifier for an order.
responseobjectThông tin chi tiết bạn đang truy vấn.
first_mile_tracking_numberstringCNF731738838434210105The first mile tracking number
order_listobject[]The list of orders.
order_snstring201229TVRKVB80Shopee's unique identifier for an order.
package_numberstringShopee's unique identifier for the package under an order.
fail_errorstringfirstmile.order_not_existCho biết loại lỗi nếu một phần tử gặp lỗi.
fail_messagestringOrder is not exist.Cho biết chi tiết lỗi nếu một phần tử gặp lỗi.

, { "order_sn":"221119GF37711Y", "package_number":"" }, { "order_sn":"221120GWUAE4GF", "package_number":"" }, { "order_sn":"221120H7XD3PMA", "package_number":"" }, { "order_sn":"221120HRKXVTEB", "package_number":"" }, { "order_sn":"221120J5UN7JMX", "package_number":"" }, { "order_sn":"221120J9QAVWFH", "package_number":"" }, { "order_sn":"221120JHJ7WC58", "package_number":"" }, { "order_sn":"221120JG2K19J2", "package_number":"" }, { "order_sn":"221120JPUNFCXP", "package_number":"" }, { "order_sn":"221120JT3XGS1J", "package_number":"" }, { "order_sn":"221120K01C37DU", "package_number":"" }, { "order_sn":"221120JXSE2F4X", "package_number":"" }, { "order_sn":"221121K68M6GV2", "package_number":"" } ], "shipment_method":"pickup", "logistics_channel_id":813, "region":"CN", "weight":0, "volume":0, "length":0, "width":0, "height":0 }