stable本次发布有变化全部展示
来自 Shopee 官方资料快照 ·
- 当前资料结构化阅读页
- 固定快照已留存,可追溯
- 官方原文可核对
资料正文
§1 v2.logistics.get_shipping_document_data_info
Use this api to fetch the logistics information of an order, these info can be used for self-design AWB printing. Besides, this api supports returning personal info as images.
§2 Overview
Overview
| Field | Value |
|---|---|
| Module | Logistics |
| API type | Shop |
| HTTP method | POST |
| Path | /api/v2/logistics/get_shipping_document_data_info |
| Production URL | https://partner.shopeemobile.com/api/v2/logistics/get_shipping_document_data_info |
| Sandbox URL | https://partner.test-stable.shopeemobile.com/api/v2/logistics/get_shipping_document_data_info |
| Permission | ERP System; Seller In House System; Order Management; Swam ERP |
§3 Request parameters
Request parameters
| Name | Type | Required | Sample | Description |
|---|---|---|---|---|
| order_sn | string | Yes | 201224EM1FMFG1 | Shopee's unique identifier for an order. |
| package_number | string | No | 9087129345 | Shopee's unique identifier for the package under an order. You shouldn't fill the field with empty string when there isn't a package number. |
| recipient_address_info | object[] | No | recipient address to query as image | |
| recipient_address_info.key | string | Yes | name | fields to query in the recipient address, should be name, phone, full_address, town, district, city, state, region, zipcode. |
| recipient_address_info.style | object | No | image style | |
| recipient_address_info.style.text_style | string[] | No | ["bold", "italic"] | supports bold and italic |
| recipient_address_info.style.font_size | int32 | No | 12 | supports 1 - 108 |
| recipient_address_info.style.text_color | string | No | #39c5bb | color string like "#AbCd12" |
| recipient_address_info.style.image_width | float | No | 3.0 | supports 0.1-30, in centimeters |
| recipient_address_info.style.h_align | string | No | center | text horizontal align, supports left, center and right. |
§4 Response parameters
Response parameters
| Name | Type | Required | Sample | Description |
|---|---|---|---|---|
| request_id | string | 862fc4d77de74edf9bf045c7650f1988 | The identifier for an API request for error tracking. | |
| error | string | error_auth | Indicate error type if hit error. Empty if no error happened. | |
| message | string | Invalid access_token. | Indicate error details if hit error. Empty if no error happened. | |
| response | object | Detail informations you are querying.; Note: For parcels that support pre-shipment printing, calling this API before shipment will only return the following fields: response; recipient_address_info; key; image; shipping_document_info; cod; cod_amount; order_weight; logistics_channel_id; shipping_carrier; pickup_code | ||
| response.recipient_address_info | object | |||
| response.recipient_address_info.key | string | name | queried field in recipient address | |
| response.recipient_address_info.image | string | data:image/png;base64,/9j/4AAQSkZJRgABAgEASABIAAD/…… | base64 encoded png data string | |
| response.shipping_document_info | object | |||
| response.shipping_document_info.cod | boolean | true | This value indicates whether the order was a COD (cash on delivery) order. | |
| response.shipping_document_info.cod_amount | string | 185 | Use this field to indicate cod amount. | |
| response.shipping_document_info.order_weight | int32 | 500 | Use this field to indicate order weight when calculate the shipping fee. The unit of weigh is gram. | |
| response.shipping_document_info.logistics_channel_id | int32 | 28016 | The identity of logistic channel. | |
| response.shipping_document_info.shipping_carrier | string | Standard Delivery | The logistics service provider that the buyer selected for the order to deliver items. | |
| response.shipping_document_info.service_code | string | SHP | Only work for cross-border order. This code is required at some sorting hub. Please ensure the service_code is INCLUDED on your shipping label, otherwise the parcel cannot be processed by the warehouse. If you didn't retrieve service_code after you first called this API, please try few more times within 30 minutes. | |
| response.shipping_document_info.first_mile_name | string | MYF3 | Only work for cross-border order.The name of the carrier ships cross country or region. | |
| response.shipping_document_info.last_mile_name | string | MYL1 | Only work for cross-border order.The name of the carrier delivers the parcels in local country or region. | |
| response.shipping_document_info.goods_to_declare | boolean | true | Only work for cross-border order.This value indicates whether the order contains goods that are required to declare at customs. "T" means true and it will mark as "T" on the shipping label; "F" means false and it will mark as "P" on the shipping label. This value is accurate ONLY AFTER the order trackingNo is generated, please capture this value AFTER your retrieve the trackingNo. | |
| response.shipping_document_info.lane_code | string | S-MY03 | Only work for cross-border order. The string use for waybill printing. The format is "S - region_code and lane_number". For example, S-TH01, S-TH02 | |
| response.shipping_document_info.warehouse_address | string | China Guangdong Shenzhen 1/F, Building 8,Tangtou industrial District ,Shiyan street ,baoan district | Only work for cross-border order in some special shop. The address info of the warehouse. | |
| response.shipping_document_info.warehouse_id | string | TWS01 | Only work for cross-border order in some special shop. The ID of the warehouse. | |
| response.shipping_document_info.recipient_sort_code | object | The sort_code of recipient. | ||
| response.shipping_document_info.recipient_sort_code.first_recipient_sort_code | string | B-151-ATP-ATP-010 | The first-level sort_code of recipient. | |
| response.shipping_document_info.recipient_sort_code.second_recipient_sort_code | string | The second-level sort_code of recipient. | ||
| response.shipping_document_info.recipient_sort_code.third_recipient_sort_code | string | SAN ROQUE 009 | The third-level sort_code of recipient. | |
| response.shipping_document_info.sender_sort_code | object | The sort_code of sender. | ||
| response.shipping_document_info.sender_sort_code.first_sender_sort_code | string | The first-level sort_code of sender. | ||
| response.shipping_document_info.sender_sort_code.second_sender_sort_code | string | The second-level sort_code of sender. | ||
| response.shipping_document_info.sender_sort_code.third_sender_sort_code | string | The third-level sort_code of sender. | ||
| response.shipping_document_info.return_sort_code | object | The sort code for 3PL doing RTS. | ||
| response.shipping_document_info.return_sort_code.return_first_sort_code | string | RTS-FM-MAN | The first-level sort code for 3PL doing RTS. | |
| response.shipping_document_info.third_party_logistic_info | object | Only used for TW sellers. | ||
| response.shipping_document_info.third_party_logistic_info.service_description | string | Use this field to indicate the order category. | ||
| response.shipping_document_info.third_party_logistic_info.barcode | string | The manufacturer barcode. | ||
| response.shipping_document_info.third_party_logistic_info.purchase_time | string | The purchase_time of the store. | ||
| response.shipping_document_info.third_party_logistic_info.return_time | string | The return_time of the store. | ||
| response.shipping_document_info.third_party_logistic_info.manufacturers_name | string | The name of manufacturers. | ||
| response.shipping_document_info.third_party_logistic_info.manufacturers_website | string | The website of manufacturers. | ||
| response.shipping_document_info.third_party_logistic_info.recipient_area | string | The identification of recipient area. | ||
| response.shipping_document_info.third_party_logistic_info.route_step | string | The route code of the waybill. | ||
| response.shipping_document_info.third_party_logistic_info.suda5_code | string | The tally code of the waybill. | ||
| response.shipping_document_info.third_party_logistic_info.large_logistics_id | string | The code of large logistics. | ||
| response.shipping_document_info.third_party_logistic_info.parent_id | string | The parent code of the waybill. | ||
| response.shipping_document_info.third_party_logistic_info.return_cycle | string | Use this field to indicate the return cycle. | ||
| response.shipping_document_info.third_party_logistic_info.return_mode | string | Use this field to indicate the return mode. | ||
| response.shipping_document_info.third_party_logistic_info.prompt | string | The reminder of stork work. | ||
| response.shipping_document_info.third_party_logistic_info.order_sn | string | Shopee's unique identifier for an order. | ||
| response.shipping_document_info.third_party_logistic_info.qrcode | string | The QR code of the waybill. | ||
| response.shipping_document_info.third_party_logistic_info.ec_supplier_name | string | The supplier name of channel. | ||
| response.shipping_document_info.third_party_logistic_info.ec_bar_code16 | string | Use this field to indicate the first barcode. | ||
| response.shipping_document_info.third_party_logistic_info.equipment_id | string | The device code. | ||
| response.shipping_document_info.third_party_logistic_info.eshop_id | string | The child code for B2C Family-mart. | ||
| response.shipping_document_info.third_party_logistic_info.ec_bar_code9 | string | Use this field to indicate the pick barcode. | ||
| response.shipping_document_info.third_party_logistic_info.pelican_tracking_no | string | The tracking number of Shopee Delivery. | ||
| response.shipping_document_info.third_party_logistic_info.print_date | string | The date of printing the wayBill. | ||
| response.shipping_document_info.third_party_logistic_info.pzip | string | The sort code of the order. | ||
| response.shipping_document_info.third_party_logistic_info.pzip_c | string | The barcode of the sort code. | ||
| response.shipping_document_info.third_party_logistic_info.deliver_area_txt | string | The code of the delivery area. | ||
| response.shipping_document_info.third_party_logistic_info.deliver_date_ymd | string | Expected delivery date of the order. | ||
| response.shipping_document_info.third_party_logistic_info.sd_driver_code | string | Lorry driver code of the order. | ||
| response.shipping_document_info.third_party_logistic_info.md_driver_code | string | Motorcycle driver code of the order. | ||
| response.shipping_document_info.third_party_logistic_info.putorder_stackzone_code | string | Stacking area of the order. | ||
| response.shipping_document_info.third_party_logistic_info.customer_code | string | The customer code of Shopee. | ||
| response.shipping_document_info.third_party_logistic_info.deliver_router | string | Use this field to indicate the delivery router. | ||
| response.shipping_document_info.third_party_logistic_info.store_type | string | Use this field to indicate the store type. | ||
| response.shipping_document_info.third_party_logistic_info.pick_router | string | Use this field to indicate the pick router. | ||
| response.shipping_document_info.third_party_logistic_info.barcode_dc | string | The main logistic barcode of the waybill. | ||
| response.shipping_document_info.third_party_logistic_info.ec_order_number | string | Use this field to indicate the logistics order number. | ||
| response.shipping_document_info.third_party_logistic_info.barcode_pr | string | The sorting barcode of the waybill. | ||
| response.shipping_document_info.third_party_logistic_info.first_pick_barcode | string | The first pick barcode of the waybill. | ||
| response.shipping_document_info.third_party_logistic_info.second_pick_barcode | string | The second pick barcode of the waybill. | ||
| response.shipping_document_info.third_party_logistic_info.is_cod_bool | string | Use this field to indicate the service type. | ||
| response.shipping_document_info.third_party_logistic_info.receiver_name | string | Use this field to indicate the receiver name. | ||
| response.shipping_document_info.third_party_logistic_info.rcv_store_name | string | Use this field to indicate the receiver store name. | ||
| response.shipping_document_info.third_party_logistic_info.branch_code | string | Use this field indicates destination service point code. | ||
| response.shipping_document_info.third_party_logistic_info.branch_name | string | Use this field indicates destination service point name. | ||
| response.shipping_document_info.third_party_logistic_info.last_third_digits_recipient_phone | string | Use this field indicates buyer phone number (last 3 digits). | ||
| response.shipping_document_info.third_party_logistic_info.last_third_digits_sender_phone | string | Use this field indicates seller phone number (last 3 digits). | ||
| response.shipping_document_info.third_party_logistic_info.barcode_no1 | string | First barcode no. sacnned when seller drop off | ||
| response.shipping_document_info.third_party_logistic_info.barcode_no2 | string | Second barcode no. sacnned when seller drop off | ||
| response.shipping_document_info.third_party_logistic_info.print_datetime | string | AWB Print date and time | ||
| response.shipping_document_info.third_party_logistic_info.ok_mid_type | string | Middle type used in OK Mart SOC | ||
| response.shipping_document_info.third_party_logistic_info.ok_aisle_no | string | Aisle no. used in OK Mart SOC | ||
| response.shipping_document_info.third_party_logistic_info.ok_grid_no | string | Grid no used in OK Mart SOC | ||
| response.shipping_document_info.third_party_logistic_info.ok_tracking_number | string | The tracking number of OK Mart. | ||
| response.shipping_document_info.third_party_logistic_info.barcode_no3 | string | OK SOC received no. | ||
| response.shipping_document_info.third_party_logistic_info.ship_type | string | Ship type used by OK Mart | ||
| response.shipping_document_info.third_party_logistic_info.area | string | The area of the collect OK branch used for OK sorting | ||
| response.shipping_document_info.third_party_logistic_info.barcode_no4 | string | First barcode no. sacnned when buyer collect | ||
| response.shipping_document_info.third_party_logistic_info.barcode_no5 | string | Second barcode no. sacnned when buyer collect | ||
| response.shipping_document_info.third_party_logistic_info.tw_last_three_digits_buyer_phone | string | 678 | [Only for local TW orders] Last 3 digits of buyer's phone number, apply for channel_id: 30005, 30006, 30007,30014,30015 | |
| response.shipping_document_info.third_party_logistic_info.tw_store_name | string | 聯合門市 | [Only for TW channel_id:30005 ] Store name for 7-ELEVEN orders. | |
| response.shipping_document_info.third_party_logistic_info.tw_store_number | string | 214559 | [Only for TW channel_id:30005 ]Store number for 7-ELEVEN orders. | |
| response.shipping_document_info.third_party_logistic_info.buyer_prefer_delivery_time | object | [Only for TW channel:30017] The time buyer prefers to receive the packages. | ||
| response.shipping_document_info.third_party_logistic_info.buyer_prefer_delivery_time.slot_id | string | 4 | The slot which buyer choose | |
| response.shipping_document_info.third_party_logistic_info.buyer_prefer_delivery_time.start_time | string | 10:00 | The start time of a day buyer prefer to receive the packages | |
| response.shipping_document_info.third_party_logistic_info.buyer_prefer_delivery_time.end_time | string | 17:00 | The end time of a day buyer prefer to receive the packages. | |
| response.shipping_document_info.third_party_logistic_info.buyer_prefer_delivery_time.description | string | 住家:本人收货 | The detailed instructions of the package delivering. | |
| response.shipping_document_info.tracking_number | string | MY200448706479IT | The tracking number assigned by the shipping carrier for item shipment. | |
| response.shipping_document_info.shopee_tracking_number | string | MY200448706479IT | First mile tracking NO. for CrossBoard BR seller can be used to self-design CB Brazil AWB. | |
| response.shipping_document_info.last_mile_tracking_number | string | The last-mile tracking number. Only for Cross Board BR seller. | ||
| response.shipping_document_info.pickup_hub | string | The name of pickup hub. | ||
| response.shipping_document_info.delivery_hub | string | The name of delivery hub. | ||
| response.shipping_document_info.deliver_area | string | SAN ROQUE 009 | Zone name. | |
| response.shipping_document_info.ec_order_no | string | The name of ec order. | ||
| response.shipping_document_info.create_date_ymd_sl | string | 2022/12/05 | The date of create shipment order. | |
| response.shipping_document_info.manufacturers_name | string | The name of manufacturer. | ||
| response.shipping_document_info.manufacturers_website | string | The website of manufacturer. | ||
| response.shipping_document_info.is_lm_dg_bool | int32 | 0 | Use this field to indicate order contains dangerous goods or not.; 0: Non-dangerous good; 1: Dangerous good; 2: Prohibited | |
| response.shipping_document_info.preferred_delivery_option | int32 | 1 | Use this field to indicate delivery address is residential or office address.; 0: not configured; 1: office address; 2: residential address | |
| response.shipping_document_info.spx_sub_district | string | The sub-district of recipient's address. | ||
| response.shipping_document_info.spx_receive_station | object | The spx receive station. | ||
| response.shipping_document_info.spx_receive_station.spx_first_receive_station | string | The first pickup station. | ||
| response.shipping_document_info.zone | string | The zone of this order. | ||
| response.shipping_document_info.zone_code | string | Delivery Sub Zone. | ||
| response.shipping_document_info.destination_base_code | string | Distribution Center Code. | ||
| response.shipping_document_info.last_third_digits_buyer_phone | string | Use this field indicates buyer phone number (last 3 digits). For non-TW local sellers | ||
| response.shipping_document_info.parcel_size | string | corresponding locker sizing for self-collection locker channels [only available for specific logistic channels: 148003 and 140006] | ||
| response.shipping_document_info.sod | boolean | false | this value indicates whether the buyer select "scan on delivery" payment channel at checkout. | |
| response.shipping_document_info.buyer_cpf_id | string | Buyer's CPF number for taxation and invoice purposes. Only for Brazil order. | ||
| response.shipping_document_info.mutual_check | int32 | 1 | only apply for ID/VN shops.; mutual_check indicates whether the parcel is eligible for Return-on-the-Spot (RoS) co-check.; If mutual_check=1, then the parcel is RoS eligible, where drivers and buyers can co-check the parcel. Buyer can then choose to accept or reject the parcel on the spot.; If mutual_check=0, then the parcel is ineligible for RoS. | |
| response.shipping_document_info.dely_fri_label | string | L | Probability of Successful Friday Delivery.; The value of L(low), M(medium), H(high) represent the chances of successful delivery attempts on Friday. | |
| response.shipping_document_info.dely_sat_label | string | M | Probability of Successful Saturday Delivery; The value of L(low), M(medium), H(high) represent the chances of successful delivery attempts on Saturday. | |
| response.shipping_document_info.dely_sun_label | string | H | Probability of Successful Sunday Delivery.; The value of L(low), M(medium), H(high) represent the chances of successful delivery attempts on Sunday. | |
| response.shipping_document_info.pickup_code | string | For drivers to quickly identify parcel to be picked up. Only returned for ID and TH local orders which use instant+sameday for delivery. | ||
| response.shipping_document_info.sorting_group | string | [Only for TW 30029 channel] This field indicate the sorting group value of the package. Available values: - North - South | ||
| response.shipping_document_info.unpackaged_sku_id | string | [Only for TW 30029 channel] Please refer to this number instead of tracking number for this this channel. This field will be empty for other channels. | ||
| response.shipping_document_info.unpackaged_sku_id_qrcode | string | [Only for TW 30029 channel] Please refer to this field to generate the QR code for the shipping document for this channel. This field will be empty for other channels. | ||
| response.shipping_document_info.high_value | boolean | true | This value indicates whether the order is considered a “high value” item and requires special handling by the logistics provider. The threshold to be considered "high value" item differs by region, and is only applicable to SPX channels. For regions other than Malaysia and Thailand, this field will always return empty. | |
| response.shipping_document_info.dg_specific_type | int32 | 1 | Currently only applicable for Brazil, Indonesia, Vietnam, Philippines.; For orders with Dangerous Goods, this value indicates the severity of the danger and requires special handling by the logistics provider.; 0 = Not classified / no DG sub-type; 1 = DG_A; 2 = DG_B; 3 = DG_C; 4 = DG_D | |
| response.shipping_document_info.hotspot_id | string | HS-BSC-01 | This ID is used by 3PL to determine parcel routing. For regions other than Malaysia and Thailand, this field will always return empty. | |
| response.shipping_document_info.weekend1_delivery_success_label | string | H | This value indicates whether an order has a high / medium / low delivery success rate on each weekend (e.g. sat and sun respectively). For regions other than Malaysia, this field will always return empty.; High = H; Medium = M; Low = L | |
| response.shipping_document_info.weekend2_delivery_success_label | string | M | This value indicates whether an order has a high / medium / low delivery success rate on each weekend (e.g. sat and sun respectively). For regions other than Malaysia, this field will always return empty.; High = H; Medium = M; Low = L |
§5 Common parameters
Common parameters
| Name | Type | Required | Sample | Description |
|---|---|---|---|---|
| partner_id | int | 1 | Partner ID is assigned upon registration is successful. Required for all requests. | |
| timestamp | timestamp | 1610000000 | This is to indicate the timestamp of the request. Required for all requests. Expires in 5 minutes. | |
| access_token | string | c09222e3fc40ffb25fc947f738b1abf1 | The token for API access, using to identify your permission to the api. Valid for multiple use and expires in 4 hours. | |
| shop_id | int | 600000 | Shopee's unique identifier for a shop. Required param for most APIs. | |
| 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 |
§6 Request samples
Request samples
§7 Payload
Payload
{
"order_sn":"231112E8YGWPXJ",
"package_number":"OFG153490685206408",
"recipient_address_info":[
{
"key":"name",
"style":{
"h_align":"left",
"text_style":[
"bold",
"italic"
],
"font_size":12,
"text_color":"#000000",
"image_width":6
}
},
{
"key":"phone",
"style":{
"h_align":"left",
"text_style":[
"bold",
"italic"
],
"font_size":12,
"text_color":"#000000",
"image_width":6
}
},
{
"key":"full_address",
"style":{
"h_align":"left",
"text_style":[
"bold",
"italic"
],
"font_size":12,
"text_color":"#000000",
"image_width":6
}
},
{
"key":"town",
"style":{
"h_align":"left",
"text_style":[
"bold",
"italic"
],
"font_size":12,
"text_color":"#000000",
"image_width":6
}
},
{
"key":"district",
"style":{
"h_align":"left",
"text_style":[
"bold",
"italic"
],
"font_size":12,
"text_color":"#000000",
"image_width":6
}
},
{
"key":"city",
"style":{
"h_align":"left",
"text_style":[
"bold",
"italic"
],
"font_size":12,
"text_color":"#000000",
"image_width":6
}
},
{
"key":"state",
"style":{
"h_align":"left",
"text_style":[
"bold",
"italic"
],
"font_size":12,
"text_color":"#000000",
"image_width":6
}
},
{
"key":"region",
"style":{
"h_align":"left",
"text_style":[
"bold",
"italic"
],
"font_size":12,
"text_color":"#000000",
"image_width":6
}
},
{
"key":"zipcode",
"style":{
"h_align":"left",
"text_style":[
"bold",
"italic"
],
"font_size":12,
"text_color":"#000000",
"image_width":6
}
}
]
}
§8 Java
Java
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://partner.shopeemobile.com/api/v2/logistics/get_shipping_document_data_info?access_token=access_token&partner_id=partner_id&shop_id=shop_id&sign=sign×tamp=timestamp")
.header("Content-Type","application/json")
.body("{
\"order_sn\": \"201224EM1FMFG1\",
\"package_number\": \"9087129345\",
\"recipient_address_info\": [
{
\"key\": \"name\",
\"style\": {
\"font_size\": 12,
\"h_align\": \"center\",
\"image_width\": 3,
\"text_color\": \"#39c5bb\",
\"text_style\": [
\"bold\",
\"italic\"
]
}
}
]
}")
.asString();
§9 PHP
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://partner.shopeemobile.com/api/v2/logistics/get_shipping_document_data_info?access_token=access_token&partner_id=partner_id&shop_id=shop_id&sign=sign×tamp=timestamp',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"order_sn": "201224EM1FMFG1",
"package_number": "9087129345",
"recipient_address_info": [
{
"key": "name",
"style": {
"font_size": 12,
"h_align": "center",
"image_width": 3,
"text_color": "#39c5bb",
"text_style": [
"bold",
"italic"
]
}
}
]
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
§10 cURL
cURL
curl --location --request POST 'https://partner.shopeemobile.com/api/v2/logistics/get_shipping_document_data_info?access_token=access_token&partner_id=partner_id&shop_id=shop_id&sign=sign×tamp=timestamp' \
--header 'Content-Type: application/json' \
--data-raw '{
"order_sn": "201224EM1FMFG1",
"package_number": "9087129345",
"recipient_address_info": [
{
"key": "name",
"style": {
"font_size": 12,
"h_align": "center",
"image_width": 3,
"text_color": "#39c5bb",
"text_style": [
"bold",
"italic"
]
}
}
]
}'
§11 Python
Python
import requests
import json
url = "https://partner.shopeemobile.com/api/v2/logistics/get_shipping_document_data_info?access_token=access_token&partner_id=partner_id&shop_id=shop_id&sign=sign×tamp=timestamp"
payload=json.dumps({
"order_sn": "201224EM1FMFG1",
"package_number": "9087129345",
"recipient_address_info": [
{
"key": "name",
"style": {
"font_size": 12,
"h_align": "center",
"image_width": 3,
"text_color": "#39c5bb",
"text_style": [
"bold",
"italic"
]
}
}
]
})
headers = {
'Content-Type': 'application/json'
}
response = requests.request("POST",url,headers=headers, data=payload, allow_redirects=False)
print(response.text)
§12 Response sample
Response sample
§13 JSON
JSON
{
"request_id": "862fc4d77de74edf9bf045c7650f1988",
"error": "error_auth",
"message": "Invalid access_token.",
"response": {
"recipient_address_info": {
"key": "name",
"image": "data:image/png;base64,/9j/4AAQSkZJRgABAgEASABIAAD/……"
},
"shipping_document_info": {
"cod": true,
"cod_amount": "185",
"order_weight": 500,
"logistics_channel_id": 28016,
"shipping_carrier": "Standard Delivery",
"service_code": "SHP",
"first_mile_name": "MYF3",
"last_mile_name": "MYL1",
"goods_to_declare": true,
"lane_code": "S-MY03",
"warehouse_address": "China Guangdong Shenzhen 1/F, Building 8,Tangtou industrial District ,Shiyan street ,baoan district",
"warehouse_id": "TWS01",
"recipient_sort_code": {
"first_recipient_sort_code": "B-151-ATP-ATP-010",
"second_recipient_sort_code": " ",
"third_recipient_sort_code": "SAN ROQUE 009"
},
"sender_sort_code": {
"first_sender_sort_code": "-",
"second_sender_sort_code": "-",
"third_sender_sort_code": "-"
},
"return_sort_code": {
"return_first_sort_code": "RTS-FM-MAN"
},
"third_party_logistic_info": {
"service_description": "-",
"barcode": "-",
"purchase_time": "-",
"return_time": "-",
"manufacturers_name": "-",
"manufacturers_website": "-",
"recipient_area": "-",
"route_step": "-",
"suda5_code": "-",
"large_logistics_id": "-",
"parent_id": "-",
"return_cycle": "-",
"return_mode": "-",
"prompt": "-",
"order_sn": "-",
"qrcode": "-",
"ec_supplier_name": "-",
"ec_bar_code16": "-",
"equipment_id": "-",
"eshop_id": "-",
"ec_bar_code9": "-",
"pelican_tracking_no": "-",
"print_date": "-",
"pzip": "-",
"pzip_c": "-",
"deliver_area_txt": "-",
"deliver_date_ymd": "-",
"sd_driver_code": "-",
"md_driver_code": "-",
"putorder_stackzone_code": "-",
"customer_code": "-",
"deliver_router": "-",
"store_type": "-",
"pick_router": "-",
"barcode_dc": "-",
"ec_order_number": "-",
"barcode_pr": "-",
"first_pick_barcode": "-",
"second_pick_barcode": "-",
"is_cod_bool": "-",
"receiver_name": "-",
"rcv_store_name": "-",
"branch_code": "-",
"branch_name": "-",
"last_third_digits_recipient_phone": "-",
"last_third_digits_sender_phone": "-",
"barcode_no1": "-",
"barcode_no2": "-",
"print_datetime": "-",
"ok_mid_type": "-",
"ok_aisle_no": "-",
"ok_grid_no": "-",
"ok_tracking_number": "-",
"barcode_no3": "-",
"ship_type": "-",
"area": "-",
"barcode_no4": "-",
"barcode_no5": "-",
"tw_last_three_digits_buyer_phone": "678",
"tw_store_name": "聯合門市",
"tw_store_number": "214559",
"buyer_prefer_delivery_time": {
"slot_id": "4",
"start_time": "10:00",
"end_time": "17:00",
"description": "住家:本人收货"
}
},
"tracking_number": "MY200448706479IT",
"shopee_tracking_number": "MY200448706479IT",
"last_mile_tracking_number": "-",
"pickup_hub": "-",
"delivery_hub": "-",
"deliver_area": "SAN ROQUE 009",
"ec_order_no": "-",
"create_date_ymd_sl": "2022/12/05",
"manufacturers_name": "-",
"manufacturers_website": "-",
"is_lm_dg_bool": 0,
"preferred_delivery_option": 1,
"spx_sub_district": "-",
"spx_receive_station": {
"spx_first_receive_station": "-"
},
"zone": "-",
"zone_code": "-",
"destination_base_code": "-",
"last_third_digits_buyer_phone": "-",
"parcel_size": "-",
"sod": false,
"buyer_cpf_id": "-",
"mutual_check": 1,
"dely_fri_label": "L",
"dely_sat_label": "M",
"dely_sun_label": "H",
"pickup_code": "-",
"sorting_group": "-",
"unpackaged_sku_id": "-",
"unpackaged_sku_id_qrcode": "-",
"high_value": true,
"dg_specific_type": 1,
"hotspot_id": "HS-BSC-01",
"weekend1_delivery_success_label": "H",
"weekend2_delivery_success_label": "M"
}
}
}
§14 Error example
Error example
§15 JSON
JSON
{
"error": "error_not_found",
"message": "Wrong parameters, detail: the order is not found.",
"request_id": "f93c90c2b6945787e974dc091a2c78c4"
}
§16 Errors
Errors
| Error | Description | Solution |
|---|---|---|
| error_status | Status verification failed, shipping documents of this package cannot be printed now. | |
| logistics.error_param | The order is being allocated, please wait until the allocate is completed. | |
| error_not_found | Wrong parameters, detail: {msg}. | |
| error_param | Wrong parameters, detail: {msg}. | |
| error_permission | Sorry you don't have the permission, detail: {msg}. | |
| error_server | Got an error when trying to generate image, please try again | |
| logistics.error_limit | You don’t ship order yet. | |
| logistics.error_booking_order | This order is matched order with booking, don't need arrange shipment through seller side. | |
| logistics.error_param | You can not get order logistics of warehouse order. | |
| logistics.error_status_limit | The order status is invalid. Please check the order status. | |
| logistics.package_not_exist | The package is not exist. | |
| error_channel_unsupport | This logistic channel/logistic type doesn’t support retrieving info from Open API. Please use v2.logistics.download_shipping_document API instead. | |
| error_param | Not allowed to self design AWB | |
| logistics.package_number_not_exist | Please request with package_number for this split order. | |
| logistics.invalid_address_version | Some addresses are no longer supported per new regulation, please update to avoid wrong fulfilment | |
| logistics.can_not_print_combine_order | This order is part of a combined parcel, please use Seller Center instead. | |
| logistics.can_not_print_jit_order | This shipping channel only supports document printing in Shopee seller center | |
| error_network | Inner http call failed | |
| error_data | parse data failed | |
| error_data | data not exist | |
| error_param | parameter invalid | |
| error_param | The information you queried is not found. | |
| error_param | Wrong parameters, detail: {msg}. | |
| error_server | Something wrong. Please try later. | |
| error_shop | shopid is invalid | |
| error_param | request not from gateway | |
| error_param | This order logistics is not allowed to get. |
§17 Common errors
Common errors
| Error | Description | Solution |
|---|---|---|
| error_auth | partner_id is invalid | |
| error_auth | The App is deleted, and you'll be unable to make any API call. | |
| error_auth | App developer’s permissions for authorizations have been restricted. If you’re a seller, contact the developer for more information. If you’re the developer, refer to the Open Platform Console for details. | |
| error_param | There is no partner_id in query. | |
| error_param | Invalid partner_id. | |
| error_param | no timestamp | |
| error_param | Invalid timestamp | |
| error_param | There is no sign in query. | |
| error_sign | Wrong sign. | |
| invalid_partner_id | Invalid partner_id, please have a check. | |
| error_auth | No permission to current api. | |
| error_api_call_restricted | The App permission for api call have been restricted. If you’re a seller, contact the developer for more information. If you’re the developer, refer to the Open Platform Console for details. | |
| api_suspended | The API is offline. Please call v2 API instead. | |
| error_limit | The total API call number made by your APP has reached the daily API call limit, please try again after 00: 00 (UTC+08:00) | |
| error_rate_limit | Too many requests. You have reached the rate limit. Please try again later. | |
| source_ip_undeclared | Request Source IP ({ip}) is undeclared. Please declare all your IP addresses in the Shopee Open Platform Console > App list > IP Address Whitelist | |
| error_param | Permission denied. This API is currently offline or the request path is incorrect. | |
| error_param | Partner_id is invalid, should be an integer between 0 and 4294967295. | |
| error_param | no timestamp. | |
| error_param | Timestamp is invalid, should be an integer between 0 and 4294967295. | |
| error_param | Timestamp is expired. | |
| error_partner_key_expired | Your API partner key has expired, please reset the Live API Partner Key in Console to get a new valid partner key to call open api. | |
| error_api_permission | This app type has no permission to this API. | |
| error_param | There is no access_token in query. | |
| error_auth | Invalid access_token. | |
| error_auth | Invalid partner_id or shopid. | |
| shop_no_linked | Partner and shop has no linked. | |
| shop_banned | The shop account has been banned. Permissions for shop authorization and API calls have been suspended until the shop account is restored. | |
| invalid_acceess_token | Invalid access_token, please have a check. | |
| partner_shop_no_link | Invalid partner_id or shop_id, please have a check. | |
| error_ashop_api_permission | The shop is Affiliate shop has no permission to call this API. | |
| error_kyc_auth | No permission. Please inform the seller to complete the Seller Registration on Shopee Seller Center first, then this shop can call for this API. | |
| error_auth | System error, please try again later. | |
| error_param | There is no shop_id in query. | |
| error_param | shop_id is invalid, should be an integer between 0 and 4294967295. |
§18 Update log
Update log
| Date | Change |
|---|---|
| 2026-07-15 | Add response fields " high_value", "dg_specific_type", "hotspot_id", "weekend1_delivery_success_label", "weekend2_delivery_success_label" |
| 2025-08-14 | Support for pre-shipment printing of self-designed AWBs for certain logistics channels |
| 2025-07-07 | Add new response fields "sorting_group", "unpackaged_sku_id", "unpackaged_sku_id_qrcode" |
| 2024-04-15 | add new response fields "dely_fri_label", "dely_sat_label", "dely_sun_label" |
| 2023-05-12 | add is_mutual_check field for VN/ID shops |
