aliexpress.local.logistics.shipping.method.query (query shipping method)

query shipping method

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param1 QueryShippingMethodRequestTopDTO 可选 method query object
  • └ trade_order_id
  • Number
  • 必须
  • 3014820453131992
  • It's sales order id and a 16-digit number To confirm logistics service provider in the order such as Cainiao, Pegaki, Frenet, Delivery Hub, etc.
  • sender_address
  • AddressTopDTO
  • 必须
  • 12345678
  • origin address
  • └ first_name
  • String
  • 可选
  • Jack
  • first name of sender
  • └ last_name
  • String
  • 可选
  • Bryant
  • last name of sender
  • └ country
  • String
  • 可选
  • Brazil
  • sender's country
  • └ state
  • String
  • 可选
  • Sao Paulo or SP
  • sender's state
  • └ city
  • String
  • 可选
  • Sao Paulo
  • sender's city
  • └ address
  • String
  • 可选
  • Vila Mariana, R. Azevedo Macedo
  • sender's district and street
  • └ address_number
  • String
  • 可选
  • 113
  • sender's street number
  • └ zip_code
  • String
  • 必须
  • 04013060 OR 04013-060
  • zip code of ship from place
  • └ cellphone
  • String
  • 可选
  • 1234567890
  • cell phone of sender
  • └ federal_tax_id
  • String
  • 可选
  • null
  • cnpj of the seller and it will be filled by the platform automatcially
  • └ email
  • String
  • 可选
  • testmail@gmail.com
  • email of sender
  • extension
  • ExtensionTopDTO
  • 必须
  • true
  • extension
  • └ invoice_added
  • Boolean
  • 必须
  • true
  • Whether a seller has added invoice to transaction order. If a seller doesn't provide invoice, Correios will be the only available shipment option. This is mainly to remind sellers of adding invoice before shipment
  • receipt_address
  • AddressTopDTO
  • 必须
  • 12345678
  • destination address
  • └ first_name
  • String
  • 可选
  • Jack
  • first name of receiver
  • └ last_name
  • String
  • 可选
  • Bryant
  • last name of receiver
  • └ country
  • String
  • 可选
  • Brazil
  • receiver's country
  • └ state
  • String
  • 可选
  • Sao Paulo or SP
  • receiver's state
  • └ city
  • String
  • 可选
  • Sao Paulo
  • receiver's city
  • └ address
  • String
  • 可选
  • Vila Mariana, R. Azevedo Macedo
  • receiver's district and street
  • └ address_number
  • String
  • 可选
  • 113
  • receiver's street number
  • └ zip_code
  • String
  • 必须
  • 04013060 OR 04013-060
  • zip code of ship to place
  • └ cellphone
  • String
  • 可选
  • 1234567890
  • cell phone of receiver
  • └ federal_tax_id
  • String
  • 可选
  • 098.084.769-96
  • CPF of the buyer. Senders can find it on sales order
  • └ email
  • String
  • 可选
  • testmail@gmail.com
  • email of receiver
  • products
  • ProductTopDTO []
  • 必须
  • product list
  • └ quantity
  • Number
  • 必须
  • 1
  • Quantity of a sku in the order. It's used to calculate the total number of products in a parcel
  • └ length
  • String
  • 必须
  • 10
  • Actual dimension of a sku in its original packaging. Default unit: centimeters
  • └ width
  • String
  • 必须
  • 10
  • Actual dimension of a sku in its original packaging. Default unit: centimeters
  • └ weight
  • String
  • 必须
  • 1
  • Total weight of a SKU in its original packaging. Default unit: kilograms
  • └ sku_id
  • String
  • 可选
  • 123
  • AE sku_id to identify a unit of sku
  • └ height
  • String
  • 必须
  • 10
  • Actual dimension of a sku in its original packaging. Default unit: centimeters
  • └ price
  • String
  • 必须
  • 12
  • Price of a sku. It's used to compose total product value of the parcel

响应参数

名称 类型 示例值 描述
data QueryShippingMethodResponseDTO method data
  • parcel
  • ParcelDTO
  • parcel
  • └ weight
  • Number
  • 10
  • Weight of the parcel in the shipment order Default unit: kilograms
  • └ width
  • String
  • 10
  • Width of the parcel in the shipment order Default unit: centimeters
  • └ height
  • String
  • 10
  • Height of the parcel in the shipment order Default unit: centimeters
  • └ length
  • String
  • 10
  • Length of the parcel in the shipment order Default unit: centimeters
  • └ product_total_price
  • String
  • 50
  • price of all SKUs in the parcel
  • └ parcel_type
  • String
  • BOX
  • Parcel type including ENVELOPE, BOX, BAG, TUBE, PALLET and you should input it when creating a shipment order
  • delivery_options
  • AELogisticsShippingMethodDTO []
  • delivery option list
  • └ logistics_channel_id
  • String
  • 1
  • Logistics provider Id of the shipping order such as 1-Cainiao, 2-Pegaki, 3-Frenet, 4-Delivery Hub, etc.
  • └ logistics_channel_name
  • String
  • Pegaki
  • Logistics provider of the shipping order such as Cainiao, Pegaki, Frenet, Delivery Hub, etc.
  • └ delivery_method_id
  • String
  • 1
  • shipping method id of Logistics service such as Loggi Express, Correios Sedex, etc.
  • └ delivery_method_name
  • String
  • Pac
  • Devlivery provider type such as express/standard, pac/sedex.
  • └ delivery_provider_name
  • String
  • Correios
  • Delivery provider name
  • └ delivery_cost
  • Number
  • 12
  • estimated shipping cost based on dimension and weight of a parcel
  • └ delivery_estimate_days
  • Number
  • 5
  • delivery time on working days
  • └ query_id
  • String
  • 809129783610401
  • query id, if the value is not empty, please fill it in create order api
is_success String true is success
error_result_message String error1 error message
error_result_code String 1 error code

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AliexpressLocalLogisticsShippingMethodQueryRequest req = new AliexpressLocalLogisticsShippingMethodQueryRequest();
AliexpressLocalLogisticsShippingMethodQueryRequest.QueryShippingMethodRequestTopDTO obj1 = new AliexpressLocalLogisticsShippingMethodQueryRequest.QueryShippingMethodRequestTopDTO();
obj1.setTradeOrderId(3014820453131992L);
AliexpressLocalLogisticsShippingMethodQueryRequest.AddressTopDTO obj2 = new AliexpressLocalLogisticsShippingMethodQueryRequest.AddressTopDTO();
obj2.setFirstName("Jack");
obj2.setLastName("Bryant");
obj2.setCountry("Brazil");
obj2.setState("Sao Paulo or SP");
obj2.setCity("Sao Paulo");
obj2.setAddress("Vila Mariana, R. Azevedo Macedo");
obj2.setAddressNumber("113");
obj2.setZipCode("04013060 OR 04013-060");
obj2.setCellphone("1234567890");
obj2.setFederalTaxId("null");
obj2.setEmail("testmail@gmail.com");
obj1.setSenderAddress(obj2);
AliexpressLocalLogisticsShippingMethodQueryRequest.ExtensionTopDTO obj3 = new AliexpressLocalLogisticsShippingMethodQueryRequest.ExtensionTopDTO();
obj3.setInvoiceAdded(true);
obj1.setExtension(obj3);
AliexpressLocalLogisticsShippingMethodQueryRequest.AddressTopDTO obj4 = new AliexpressLocalLogisticsShippingMethodQueryRequest.AddressTopDTO();
obj4.setFirstName("Jack");
obj4.setLastName("Bryant");
obj4.setCountry("Brazil");
obj4.setState("Sao Paulo or SP");
obj4.setCity("Sao Paulo");
obj4.setAddress("Vila Mariana, R. Azevedo Macedo");
obj4.setAddressNumber("113");
obj4.setZipCode("04013060 OR 04013-060");
obj4.setCellphone("1234567890");
obj4.setFederalTaxId("098.084.769-96");
obj4.setEmail("testmail@gmail.com");
obj1.setReceiptAddress(obj4);
List<AliexpressLocalLogisticsShippingMethodQueryRequest.ProductTopDTO> list6 = new ArrayList<AliexpressLocalLogisticsShippingMethodQueryRequest.ProductTopDTO>();
AliexpressLocalLogisticsShippingMethodQueryRequest.ProductTopDTO obj7 = new AliexpressLocalLogisticsShippingMethodQueryRequest.ProductTopDTO();
list6.add(obj7);
obj7.setQuantity(1L);
obj7.setLength("10");
obj7.setWidth("10");
obj7.setWeight("1");
obj7.setSkuId("123");
obj7.setHeight("10");
obj7.setPrice("12");
obj1.setProducts(list6);
req.setParam1(obj1);
AliexpressLocalLogisticsShippingMethodQueryResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<aliexpress_local_logistics_shipping_method_query_response>
    <data>
        <parcel>
            <weight>10</weight>
            <width>10</width>
            <height>10</height>
            <length>10</length>
            <product_total_price>50</product_total_price>
            <parcel_type>BOX</parcel_type>
        </parcel>
        <delivery_options>
            <a_e_logistics_shipping_method_d_t_o>
                <logistics_channel_id>1</logistics_channel_id>
                <logistics_channel_name>Pegaki</logistics_channel_name>
                <delivery_method_id>1</delivery_method_id>
                <delivery_method_name>Pac</delivery_method_name>
                <delivery_provider_name>Correios</delivery_provider_name>
                <delivery_cost>12</delivery_cost>
                <delivery_estimate_days>5</delivery_estimate_days>
            </a_e_logistics_shipping_method_d_t_o>
        </delivery_options>
        <query_id>809129783610401</query_id>
    </data>
    <is_success>true</is_success>
    <error_result_message>error1</error_result_message>
    <error_result_code>1</error_result_code>
</aliexpress_local_logistics_shipping_method_query_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部