文档中心 > AliExpress开放平台

Order fulfillment by Aliexpress

更新时间:2022/01/29 访问次数:355

note:API name and link will be replaced when the relative module get online

Logistics

AE - Logistics Tutorial

Overall Flow

Here are some important logistics parameters you should know before starting to manage your logistics:

IDs

Demo

trade_order_id (order_id)

Order id

104221207803998

logistics_order_id (warehouse_order_id)

Aliexpress logistics order id. The id will be generated once the AE warehouse order is created.

5043788595

out_order_code

CaiNiao logistics order id. Once warehouse order is created, seller could query logistics info with CN id at global.cainiao.com

LP00143017183663

international_logistics_num (intl_tracking_no)

PPT (Posta ve Telgraf Teskilati) logistics tracking number

RA200014005TR

1. Get Available Online Logistics Service List by order id

aliexpress.logistics.redefining.getonlinelogisticsservicelistbyorderid
The API requires order id and responds with available logistics services including warehouse name, logistics service name, timelineness, service id, etc.
Before using the service, make sure the order id belongs to the account that developer is currently logged in.

Request parameter:

Request Parameter

Optional/Required

goods_width

optional

Width, height and length must be less than 60cm.The sum of all three must be less than 90 cm.

goods_height

optional

goods_length

optional

goods_weight

optional

Maximum weight is 2kg.

order_id

required

Order id must belong to the account that developer is currently logged in.

Sample Code:

  • Request Sample 1:
goods_width: 30            
goods_height: 10          
goods_length: 10
goods_weight: 1
order_id:103482801093998
  • Request Sample 2:
order_id:103482801093998

Response Sample:

{
 "aliexpress_logistics_redefining_getonlinelogisticsservicelistbyorderid_response": {
   "result_list": {
 "result": [
   {
     "delivery_address": "Trendyol Akasya TOM Depo Logipark Tesisleri Orta Mh. 1. Sanayi Cd. Oztas Sok. No: 7 B1 Blok Tuzla Istanbul",
     "logistics_service_id": "CAINIAO_G2G_DIRECTSHIP_30111284",
     "logistics_service_name": "CAINIAO G2G DIRECTSHIP Standard",
     "logistics_timeliness": "6-60days",
     "trial_result": "CN?0.00",
     "warehouse_name": "Turkey Warehouse"
   }
 ]
   },
   "request_id": "48vm8frocugu"
 }
}

2. Query Seller Address IDs(Currently not available. Only support addresses in China. Ignore this step and go to step 3. )

aliexpress.logistics.redefining.getlogisticsselleraddresses
The API returns seller addresses (sender, pickup, refund) based on the request.

Request Parameter

Optional / Required

seller_address_query

Required

Choose one from sender,pickup and refund

Sample Code

  • Request Sample 1
seller_address_query: sender
  • Request Sample 2
seller_address_query: pickup
  • Response Sample
{
 "aliexpress_logistics_redefining_getlogisticsselleraddresses_response": {
   "result_error_code": 0,
   "result_success": true,
   "sender_seller_address_list": {
 "senderselleraddresslist": [
   {
     "address_id": 109164806,
     "city": "chong qing shi",
     "country": "China",
     "county": "bi shan qu",
     "email": "TEST@TEST.COM",
     "is_default": 0,
     "language": "en_US",
     "member_type": "sender",
     "name": "XIAO OU",
     "phone": "186888888",
     "postcode": "300000",
     "province": "chong qing",
     "street": "da lu jie dao",
     "street_address": "test Chinese address 2",
     "trademanage_id": "tr1524496074zjff"
   },
   {
     "address_id": 109143742,
     "city": "bei jing shi",
     "country": "China",
     "county": "chang ping qu",
     "email": "test@test.com",
     "is_default": 0,
     "language": "en_US",
     "member_type": "sender",
     "name": "Leon Fan",
     "phone": "18688888888",
     "postcode": "100000",
     "province": "bei jing",
     "street": "bei qi jia zhen",
     "street_address": "test Chinese address 1",
     "trademanage_id": "tr1524496074zjff"
   }
 ]
   },
   "request_id": "6iosacxu2vth"
 }
}

3. Create Warehouse Order

(Asynchronously, may take 30 mins to 2 hours to generate print info. Contact us if you waits beyond 2 hours )
aliexpress.logistics.createwarehouseorder
The API creates online warehouse order based on the parameter below:

Request Parameter

Optional / Required

address_d_t_os

required

Option 1: Set“address_id”:-1
Supports customized addresses for sender, receiver and refund with “address_id”:-1
(Check sample code for Option 1 below)For request parameter “province”, check this list for province we currently supports: Province List



Option 2: Currently not available
Only fill out “address_id” for sender/pickup/refund with data retrieved in step 2.
(Check sample code for Option 2 below)

declare_product_d_t_os

required

Following fields are required to create the order successfully:
“category_cn_desc”,
“product_weight”,
“product_num”,
“product_declare_amount”,
“sku_value”,
“category_en_desc”,
“product_id”,
“breakable”,
“sku_code”,
“contains_battery” ,
Check the sample code “declare_product_d_t_os” below for more info

domestic_logistics_company

optional

domestic_logistics_company_id

required

Set domestic_logistics_company_id to “505”

domestic_tracking_no

required

Set domestic_tracking_no to “none”

package_num

optional

trade_order_from

required

Set trade_order_from to “ESCROW”

trade_order_id

required

Order id. demo:103374365963998

undeliverable_decision

optional

0: Destroy 1:Return

warehouse_carrier_service

required

Can be retrieved in Step 1: returned as logistics_service_id with aliexpress.logistics.redefining.getonlinelogisticsservicelistbyorderid

Sample Code

  • Request Sample for Option 1

address_d_t_os:

{
  "receiver": {
    "member_type": "receiver",                         //optional
    "country": "RU",                                    
    "street_address": "Пл олд оддж",      
    "city": "Amurskoe",                              
    "mobile": "98745632108",                 
    "trademanage_id": "us1181510866cdiv",             //optional
    "province": "Amurskaya oblast",        
    "phone": "95510912522",                  
    "post_code": "518000",                     
    "name": "По ол ол",                           
    "email": "aetestsg@gmail.com"  },                   //optional 
  "sender": {
    "member_type": "sender",                            //optional
    "country": "TR",                                      
    "street_address": "street address",       
    "city": "huai bei shi",                              
    "county": "CN",                               
    "address_id": -1,
    "mobile": "18766234324",
    "trademanage_id": "aliqatest01",                   //optional
    "province": "an hui sheng",                    
    "phone": "123321",
    "street": "test street",
    "post_code": "518000",
    "name": "Linda123",
    "fax": "234234234",                                  //optional
    "email": "rhh01@sina.cn"  },
  "pickup": {
    "member_type": "pickup",                           //optional
    "country": "TR",
    "street_address": "street address",
    "city": "sdfsdf",
    "county": "sdfsdf",                            
    "address_id": -1,
    "mobile": "18766234324",
    "trademanage_id": "cn234234234",                 //optional
    "province": "asdasd",                        
    "phone": "95510912522",
    "street": "asdasfa",
    "post_code": "518000",
    "name": "Linda",
    "fax": "234234234",                             //optional
    "email": "rhh01@sina.cn"  },
  "refund": {
    "member_type": "refund",                       //optional
    "country": "TR",
    "street_address": "street address",
    "city": "Moscow",
    "county": "sdfsd",                             
    "address_id": -1,
    "mobile": "18766234324",
    "trademanage_id": "aliqatest01",               //optional
    "province": "Moscow",
    "phone": "12312312312",
    "street": "street",
    "post_code": "518000",
    "name": "Linda",                              
    "fax": "234234234",                           //optional
    "email": "rhh01@sina.cn"  }
}


  • Currently Not Available: Request Sample for Option 2
    address_d_t_os:
{
  "receiver": {
    "member_type": "receiver",
    "country": "RU",
    "street_address": "Пл олд оддж",
    "city": "Amurskoe",
    "mobile": "98745632108",
    "trademanage_id": "us1181510866cdiv",
    "province": "Amurskaya oblast",
    "phone": "95510912522",
    "post_code": "518000",
    "name": "По ол ол",
    "email": "aetestsg@gmail.com"  },
  
  "sender": { "address_id": 109123806 },
  "pickup": { "address_id": 109162345 },
  "refund": { "address_id": 109161234 }
}

declare_product_d_t_os:

{
  "category_cn_desc": "连衣裙",
  "product_weight": "1.5",
  "product_num": 2,
  "product_declare_amount": "1.3",                         //declare amount should between 0.01 and 10000.00
  "sku_value": "white",                                    //sku attribute value name. Demo: "XL white"
  "category_en_desc": "dress",
  "product_id": 1000,
  "breakable": false,                                         
  "sku_code": "A123321",                                   //self-defined code for each variant under a same product id
  "contains_battery": false,                              
  "sc_item_code": "scitem code",                          //optional
   "aneroid_markup": false,               //optional
  "sc_item_id": 1000,                     //optional
  "hs_code": "12345",                     //optional
  "sc_item_name": "scitem name",                      //optional
  "only_battery": false                   //optional
}
domestic_logistics_company_id: 505      // please fill in the blank with 505  (default value)
domestic_tracking_no:none              // please fill in the blank with none      
trade_order_from:ESCROW                // please fill in the blank with ESCROW  
trade_order_id:103374365963998
warehouse_carrier_service:CPAM_WLB_FPXSZ
  • Response Sample:
{
   "aliexpress_logistics_createwarehouseorder_response": {
  "result": {
     "error_code": 1,
     "intl_tracking_no": RA200007551TR, 
     "out_order_id": 14907636011,
     "success": true,
     "trade_order_from": "ESCROW",
     "trade_order_id": 103374365963998,
     "warehouse_order_id":5044581876,
  },
  "result_success": true,
  "request_id": "69abbhqfcqj0"
   }
}

4. Get International Logistics Number(Prerequesite to get print info)

aliexpress.logistics.querylogisticsorderdetail
The API requires order id and returns international logistics details including international logistics number.
Before using the service, make sure the order id belongs to the account that developer is currently logged in.

Request Parameter

Optional / Required

trade_order_id

Required

Demo:103838754733998

Respond Parameters

Demo

trade_order_id

Order id

104221207803998

logistics_order_id

Aliexpress logistics order id. The id will be generated once the AE warehouse order is created.

5043788595

out_order_code

CaiNiao logistics order id. Once warehouse order is created, seller could query logistics info with CN id at global.cainiao.com

LP00143017183663

international_logistics_num

PPT (Posta ve Telgraf Teskilati) logistics tracking number

RA200014005TR

Sample Code

  • Request Sample
trade_order_id:103838754733998
  • Response Sample
{
  "aliexpress_logistics_querylogisticsorderdetail_response": {
"result": {
  "current_page": 1,
  "result_list": {
    "aeop_logistics_order_detail_dto": [
      {
        "channel_code": "",
        "gmt_create": "2019-07-05 18:26:41",
        "international_logistics_num": "RA200007565TR",
        "international_logistics_type": "CAINIAO_G2G_DIRECTSHIP_30111284",
        "logistics_order_id": 5002416858,
        "logistics_status": "out_stock_success",
        "out_order_code": "LP00137282156429",
        "trade_order_id": 103838754733998
      },
      {
        "channel_code": "",
        "gmt_create": "2019-07-05 18:26:30",
        "international_logistics_num": "RA200006635TR",
        "international_logistics_type": "CAINIAO_G2G_DIRECTSHIP_30111284",
        "logistics_order_id": 5046851519,
        "logistics_status": "wait_warehouse_receive_goods",
        "out_order_code": "LP00137282450174",
        "trade_order_id": 103838754733998
      }
       ]
  },
  "success": true,
  "total_page": 1
},
"request_id": "10st0do11k5dw"
  }
}

5. Get Print Info

aliexpress.logistics.redefining.getprintinfo
The API returns print info based on logistic_id. The service is only available for order created by aliexpress.logistics.createwarehouseorder

Request Parameter

Optional / Required

international_logistics_id

Required

International_ logistics_id can be retrieved from Step 4.
Example:
“international_logistics_num”: “RA200007565TR”

Sample Code

  • Request Sample
international_logistics_id:RA200007551TR
  • Response Sample
{
  "aliexpress_logistics_redefining_getprintinfo_response":{
    "result":"{"Content-Disposition":"attachment;filename=RA200013000TR", "body":"JVBERi0xLjQKJeLjz9MKMiAwIG9iago8PC9GaWx0ZXIvRmxhdGVEZWNvZGUvTGVuZ3RoIDc0OT4+c3RyZWF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-Type\":\"application\/x-zip-compressed\"}",
    "request_id": "10st0do11k5dw"
  }
}

6. Finish

FAQ

关于此文档暂时还没有FAQ
返回
顶部