v2.logistics.ship_booking
POST /api/v2/logistics/ship_booking
Use this api to initiate logistics including arrange pickup, dropoff. Should call v2.logistics.get_booking_shipping_parameter to fetch all required param first.
Đường dẫn Endpoint
URL: https://partner.shopeemobile.com/api/v2/logistics/ship_booking
Tham số chung
| Name | Type | Sample | Description |
|---|---|---|---|
| partner_id | int | 1 | Partner ID được gán 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 để chỉ định thời điểm gửi 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. 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 cửa hàng. Tham số bắt buộc cho hầu hết các API. |
| sign | string | e318d3e932719916a9f9ebb57e2011961bd47abfa54a36e040d050d8931596e2 | Chữ ký được tạo từ partner_id, đường dẫn api, timestamp, access_token, shop_id và partner_key qua thuật toán HMAC-SHA256. Chi tiết: https://open.shopee.com/documents?module=87&type=2&id=58&version=2 |
Tham số Request
| Name | Type | Required | Sample | Description |
|---|---|---|---|---|
| booking_sn | string | True | 201214JASXYXY6 | Mã định danh duy nhất của Shopee cho một booking. |
| pickup | object | False | Required parameter ONLY if get_shipping_parameter returns "pickup" under "info_needed". Developer should still include "pickup" field in the call even if "pickup" has empty value. | |
| address_id | int64 | True | Mã định danh của địa chỉ. Lấy từ v2.logistics.get_booking_shipping_parameter. | |
| pickup_time_id | string | False | ID khung giờ lấy hàng. Lấy từ v2.logistics.get_shipping_booking_parameter, chỉ có thể chọn một từ time_slot_list. Một số kênh logistics có thể không trả về ngày/giờ cho khung giờ lấy hàng. Trong trường hợp đó, người bán có thể xếp lịch giao hàng mà không cần chọn khung giờ và Shopee sẽ sắp xếp thời gian phù hợp. | |
| dropoff | object | False | Required parameter ONLY if get_shipping_parameter returns "dropoff" under "info_needed". Developer should still include "dropoff" field in the call even if "dropoff" has empty value. If you choose Regular shipping method, please use "tracking_no" to call Init API. If you choose JOB shipping method, please use "sender_real_name" to call Init API. Note that only one of "tracking_no" and "sender_real_name" can be selected. |
Tham số Response
| Name | Type | Sample | Description |
|---|---|---|---|
| request_id | string | 2880a5a28510424eaa3288fd941fae2c | Mã định danh của yêu cầu API dùng để theo dõi lỗi. |
| error | string | error_auth | Cho biết loại lỗi nếu xảy ra. Trống nếu không có lỗi. |
| message | string | Invalid access_token. | Cho biết chi tiết lỗi nếu xảy ra. Trống nếu không có lỗi. |