v2.logistics.get_shipping_document_data_info
POST /api/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.
Endpoint URL
URL: https://partner.shopeemobile.com/api/v2/logistics/get_shipping_document_data_info
Common Request Parameters
| Name | Type | 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 |
Request Parameters
| Name | Type | Required | Sample | Description |
|---|---|---|---|---|
| order_sn | string | True | 201224EM1FMFG1 | Shopee's unique identifier for an order. |
| package_number | string | False | 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[] | False | recipient address to query as image | |
| key | string | True | name | fields to query in the recipient address, should be name, phone, **full_address,**town, district, city, state, region, zipcode. |
| style | object | False | image style | |
| text_style | string[] | False | ["bold", "italic"] | supports bold and italic |
| font_size | int32 | False | 12 | supports 1 - 108 |
| text_color | string | False | #39c5bb | color string like "#AbCd12" |
| image_width | float | False | 3.0 | supports 0.1-30, in centimeters |
| h_align | string | False | center | text horizontal align, supports left, center and right. |
Response Parameters
| Name | Type | 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 | |
| recipient_address_info | object | ||
| key | string | name | queried field in recipient address |
| image | string | data:image/png;base64,/9j/4AAQSkZJRgABAgEASABIAAD/…… | base64 encoded png data string |
| shipping_document_info | object | ||
| cod | boolean | true | This value indicates whether the order was a COD (cash on delivery) order. |
| cod_amount | string | 185 | Use this field to indicate cod amount. |
| order_weight | int32 | 500 | Use this field to indicate order weight when calculate the shipping fee. The unit of weigh is gram. |
| logistics_channel_id | int32 | 28016 | The identity of logistic channel. |
| shipping_carrier | string | Standard Delivery | The logistics service provider that the buyer selected for the order to deliver items. |
| 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. |
| first_mile_name | string | MYF3 | Only work for cross-border order.The name of the carrier ships cross country or region. |
| last_mile_name | string | MYL1 | Only work for cross-border order.The name of the carrier delivers the parcels in local country or region. |
| 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. |
| 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 |
| 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. |
| warehouse_id | string | TWS01 | Only work for cross-border order in some special shop. The ID of the warehouse. |
| recipient_sort_code | object | The sort_code of recipient. | |
| first_recipient_sort_code | string | B-151-ATP-ATP-010 | The first-level sort_code of recipient. |
| second_recipient_sort_code | string | The second-level sort_code of recipient. | |
| third_recipient_sort_code | string | SAN ROQUE 009 | The third-level sort_code of recipient. |
| sender_sort_code | object | The sort_code of sender. | |
| first_sender_sort_code | string | The first-level sort_code of sender. | |
| second_sender_sort_code | string | The second-level sort_code of sender. | |
| third_sender_sort_code | string | The third-level sort_code of sender. | |
| return_sort_code | object | The sort code for 3PL doing RTS. | |
| return_first_sort_code | string | RTS-FM-MAN | The first-level sort code for 3PL doing RTS. |
| third_party_logistic_info | object | Only used for TW sellers. | |
| service_description | string | Use this field to indicate the order category. | |
| barcode | string | The manufacturer barcode. | |
| purchase_time | string | The purchase_time of the store. | |
| return_time | string | The return_time of the store. | |
| manufacturers_name | string | The name of manufacturers. | |
| manufacturers_website | string | The website of manufacturers. | |
| recipient_area | string | The identification of recipient area. | |
| route_step | string | The route code of the waybill. | |
| suda5_code | string | The tally code of the waybill. | |
| large_logistics_id | string | The code of large logistics. | |
| parent_id | string | The parent code of the waybill. | |
| return_cycle | string | Use this field to indicate the return cycle. | |
| return_mode | string | Use this field to indicate the return mode. | |
| prompt | string | The reminder of stork work. | |
| order_sn | string | Shopee's unique identifier for an order. | |
| qrcode | string | The QR code of the waybill. | |
| ec_supplier_name | string | The supplier name of channel. | |
| ec_bar_code16 | string | Use this field to indicate the first barcode. | |
| equipment_id | string | The device code. | |
| eshop_id | string | The child code for B2C Family-mart. | |
| ec_bar_code9 | string | Use this field to indicate the pick barcode. | |
| pelican_tracking_no | string | The tracking number of Shopee Delivery. | |
| print_date | string | The date of printing the wayBill. | |
| pzip | string | The sort code of the order. | |
| pzip_c | string | The barcode of the sort code. | |
| deliver_area_txt | string | The code of the delivery area. | |
| deliver_date_ymd | string | Expected delivery date of the order. | |
| sd_driver_code | string | Lorry driver code of the order. | |
| md_driver_code | string | Motorcycle driver code of the order. | |
| putorder_stackzone_code | string | Stacking area of the order. | |
| customer_code | string | The customer code of Shopee. | |
| deliver_router | string | Use this field to indicate the delivery router. | |
| store_type | string | Use this field to indicate the store type. | |
| pick_router | string | Use this field to indicate the pick router. | |
| barcode_dc | string | The main logistic barcode of the waybill. | |
| ec_order_number | string | Use this field to indicate the logistics order number. | |
| barcode_pr | string | The sorting barcode of the waybill. | |
| first_pick_barcode | string | The first pick barcode of the waybill. | |
| second_pick_barcode | string | The second pick barcode of the waybill. | |
| is_cod_bool | string | Use this field to indicate the service type. | |
| receiver_name | string | Use this field to indicate the receiver name. | |
| rcv_store_name | string | Use this field to indicate the receiver store name. | |
| branch_code | string | Use this field indicates destination service point code. | |
| branch_name | string | Use this field indicates destination service point name. | |
| last_third_digits_recipient_phone | string | Use this field indicates buyer phone number (last 3 digits). | |
| last_third_digits_sender_phone | string | Use this field indicates seller phone number (last 3 digits). | |
| barcode_no1 | string | First barcode no. sacnned when seller drop off | |
| barcode_no2 | string | Second barcode no. sacnned when seller drop off | |
| print_datetime | string | AWB Print date and time | |
| ok_mid_type | string | Middle type used in OK Mart SOC | |
| ok_aisle_no | string | Aisle no. used in OK Mart SOC | |
| ok_grid_no | string | Grid no used in OK Mart SOC | |
| ok_tracking_number | string | The tracking number of OK Mart. | |
| barcode_no3 | string | OK SOC received no. | |
| ship_type | string | Ship type used by OK Mart | |
| area | string | The area of the collect OK branch used for OK sorting | |
| barcode_no4 | string | First barcode no. sacnned when buyer collect | |
| barcode_no5 | string | Second barcode no. sacnned when buyer collect | |
| 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 |
| tw_store_name | string | 聯合門市 | [Only for TW channel_id:30005 ] Store name for 7-ELEVEN orders. |
| tw_store_number | string | 214559 | [Only for TW channel_id:30005 ]Store number for 7-ELEVEN orders. |
| buyer_prefer_delivery_time | object | [Only for TW channel:30017] The time buyer prefers to receive the packages. | |
| slot_id | string | 4 | The slot which buyer choose |
| start_time | string | 10:00 | The start time of a day buyer prefer to receive the packages |
| end_time | string | 17:00 | The end time of a day buyer prefer to receive the packages. |
| description | string | 住家:本人收货 | The detailed instructions of the package delivering. |
| tracking_number | string | MY200448706479IT | The tracking number assigned by the shipping carrier for item shipment. |
| shopee_tracking_number | string | MY200448706479IT | First mile tracking NO. for CrossBoard BR seller can be used to self-design CB Brazil AWB. |
| last_mile_tracking_number | string | The last-mile tracking number. Only for Cross Board BR seller. | |
| pickup_hub | string | The name of pickup hub. | |
| delivery_hub | string | The name of delivery hub. | |
| deliver_area | string | SAN ROQUE 009 | Zone name. |
| ec_order_no | string | The name of ec order. | |
| create_date_ymd_sl | string | 2022/12/05 | The date of create shipment order. |
| manufacturers_name | string | The name of manufacturer. | |
| manufacturers_website | string | The website of manufacturer. | |
| is_lm_dg_bool | int32 | 0 | Use this field to indicate order contains dangerous goods or not. dg:1 non-dg:0 |
| 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 |
| spx_sub_district | string | The sub-district of recipient's address. | |
| spx_receive_station | object | The spx receive station. | |
| spx_first_receive_station | string | The first pickup station. | |
| zone | string | The zone of this order. | |
| zone_code | string | Delivery Sub Zone. | |
| destination_base_code | string | Distribution Center Code. | |
| last_third_digits_buyer_phone | string | Use this field indicates buyer phone number (last 3 digits). For non-TW local sellers | |
| parcel_size | string | corresponding locker sizing for self-collection locker channels [only available for specific logistic channels: 148003 and 140006] | |
| sod | boolean | false | this value indicates whether the buyer select "scan on delivery" payment channel at checkout. |
| buyer_cpf_id | string | Buyer's CPF number for taxation and invoice purposes. Only for Brazil order. | |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. | |
| sorting_group | string | [Only for TW 30029 channel] This field indicate the sorting group value of the package. Available values: - North - South | |
| 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. | |
| 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. |