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ên | Kiểu | Mẫu | Mô tả |
|---|---|---|---|
| partner_id | int | 1 | ID đố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. |
| timestamp | timestamp | 1610000000 | Dù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_token | string | c09222e3fc40ffb25fc947f738b1abf1 | Token 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_id | int | 600000 | Mã đị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. |
| sign | string | e318d3e932719916a9f9ebb57e2011961bd47abfa54a36e040d050d8931596e2 | Signature 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ên | Kiểu | Bắt buộc | Mẫu | Mô tả |
|---|---|---|---|---|
| first_mile_tracking_number | string | True | CNF731738838434210105 | If 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_method | string | True | pickup | The shipment method for bound orders, should be pickup, dropoff or self_deliver. |
| region | string | True | cn | Use 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_id | int32 | True | 813 | The 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". |
| volume | float | False | 1.0 | The volume of the parcel. |
| weight | float | False | 2.0 | The weight of the parcel. |
| width | float | False | 3.0 | The width of the parcel. |
| length | float | False | 4.0 | The length of the parcel. |
| height | float | False | 5.0 | The height of the parcel. |
| order_list | object[] | True | The 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_sn | string | True | 201229TVRKVB8W | Shopee's unique identifier for an order. |
| package_number | string | False | Shopee'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_id | string | False | ECP03 | The 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_type | int32 | False | 0 | Warehouse 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ên | Kiểu | Mẫu | Mô tả |
|---|---|---|---|
| request_id | string | uyavvIOqyJUSgWCNaXkCSHigqrFgHpuJ | Mã định danh cho yêu cầu API, dùng để theo dõi lỗi. |
| error | string | firstmile.batch_api_all_failed | Cho biết loại lỗi nếu xảy ra lỗi. Rỗng nếu không có lỗi. |
| message | string | All failed, please check result_list for detail | Cho biết chi tiết lỗi nếu xảy ra lỗi. Rỗng nếu không có lỗi. |
| warning | object[] | Thông báo cảnh báo bạn cần lưu ý. | |
| order_sn | string | 201229TVRKVB8W | Shopee's unique identifier for an order. |
| response | object | Thông tin chi tiết bạn đang truy vấn. | |
| first_mile_tracking_number | string | CNF731738838434210105 | The first mile tracking number |
| order_list | object[] | The list of orders. | |
| order_sn | string | 201229TVRKVB80 | Shopee's unique identifier for an order. |
| package_number | string | Shopee's unique identifier for the package under an order. | |
| fail_error | string | firstmile.order_not_exist | Cho biết loại lỗi nếu một phần tử gặp lỗi. |
| fail_message | string | Order 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 }