文档中心 > Developing documentation(已废弃)

Normal Product posting

更新时间:2021/03/16 访问次数:8706

Please refer to the API Post product.

The following subsections will introduce the important fields which the developers need to pay attention to. At the end of the document, a simple request will be given for the developers to refer.


1. aliexpress_category_id

Please refer to below document for obtaining the whole category tree and do the mapping between categories from sellers and categories from Aliexpress: https://developers.aliexpress.com/en/doc.htm?docId=117929&docType=1


2.  attribute_list && sku_attributes_list

The attributes under a specific category in Aliexpress could be classified into two types: sku attribute and general attribute.

SKU attribute and general attribute appears in different parameters  when posting a product. General attributes appears in  attribute_list and sku attribute appears in sku_attribute_list

2.1 sku_attributes_list

The following picture shows how sku_attributes_list affects the front-end effect of a product. In the picture, "Bundle" and "Color"   corresponds to the field "sku_attribute_name" of an element in "sku_attributes_list" ,  while  "Bundle1", "Bundle2", "White", "Black"  corresponds to the field "sku_attribute_value" of an element in "sku_attributes_list".

image

The value of "sku_attribute_name"  and "sku_attribute_value" under a specific category could be obtained through  Query attribute info. In the response of this API:

  • sku = true means the specific attribute was a sku attribute, which could be set in the sku_attribute_list
  • customized_name = true means the seller could use his own value for the field sku_attribute_value in product posting
  • customized_pic = true means the seller could input a url representing the image for a specific sku in the field sku_image_url.

2.2 attribute_list

The following picture shows how attribute_list is displayed in the front-end of a product.

image


As shown from the structure of attribute_list, there are four fields: attribute_name_id, attribute_value_id, attribute_name, attribute_value.

attribute_name_id and attribute_value_id could be also obtained through the API Query attribute info.

In the response of the API Query attribute info:

  • sku = false means the specific attribute was a genral attribute, which could be set in the fields : aliexpress_attribute_name_id and aliexpress_attribute_value_id in attribute_list

attribute_name and attribute_value corresponds to merchant's customized attributes' names and values.


2.3 Sample request for sku_info_list

2.3.1 One product with one sku

Some merchants would like to upload a product with just one sku, then the size of  sku_info_list is 1.

Under this scenario, if the merchant has no willing to define sku_attributes_list, just leave it empty.

The following two examples both show how to post a product with just one sku:


{
       ....
    "sku_info_list": [{
    "price": "12.21",
    "inventory": 99,
    "sku_code": "789abc",
    "sku_attributes_list": [{
    "sku_attribute_name": "Color",
    "sku_attribute_value": "red",
    "sku_image_url": "https://upload.wikimedia.org/wikipedia/commons/b/b5/Winnersh_Meadows_Trees.jpg"
    }]
  }
    ]
        ...
}


Or leave sku_attributes_list empty


{
       ....
    "sku_info_list": [{
    "price": "12.21",
    "inventory": 99,
    "sku_code": "789abc"
  }
    ]
        ...
}


2.3.2 One product with multiple skus

Some merchants would like to upload a product with multiple skus. For example, a T-shirt with multiple colors.

The following example shows how to post a product with multiple skus, based on the picture in section 2.1. (The size of sku_info_list is 4, corresponds to 2 dimensions of sku, which are Bundle and Color, each of which contains a set of 2 values.)


{
         ...
    "sku_info_list": [{
    "price": "174.42",
    "inventory": 999,
    "sku_code": "789abc",
    "sku_attributes_list": [{
    "sku_attribute_name": "Bundle",
    "sku_attribute_value": "Bundle1"
    },{
    "sku_attribute_name": "Color",
    "sku_attribute_value": "White"
    }]
  },
  {
    "price": "182.27",
    "inventory": 999,
    "skuCode": "123xyz",
    "sku_attributes_list": [{
    "sku_attribute_name": "Bundle",
    "sku_attribute_value": "Bundle1"
    },{
    "sku_attribute_name": "Color",
    "sku_attribute_value": "Black"
    }]
  },
  {
    "price": "190.99",
    "inventory": 999,
    "skuCode": "456abc",
    "sku_attributes_list": [{
    "sku_attribute_name": "Bundle",
    "sku_attribute_value": "Bundle2"
    },{
    "sku_attribute_name": "Color",
    "sku_attribute_value": "White"
    }]
  },
  {
    "price": "199.72",
    "inventory": 999,
    "skuCode": "456xyz",
    "sku_attributes_list": [{
    "sku_attribute_name": "Bundle",
    "sku_attribute_value": "Bundle2"
    },{
    "sku_attribute_name": "Color",
    "sku_attribute_value": "Black"
    }]
  }
    ] 
        ...
}


3. main_image_urls_list  sku_image_url

The url in main_image_urls_list and sku_image_url should be an accessible link in the merchant's server, or could be obtained by uploading your images to your Aliexpress photobank by using Upload image to photobank before uploading products.

4. subject  description  language

4.1 uploading using one language:

If the developer would like to upload the product using one language, please fill in: subject, description, language. After the product has been uploaded successfully, Aliexpress system will automatically translate subject and description to other languages. Then if the merchant would like to modify the subject and description of this product in other languages, please refer to Edit subject or description

Sample:


{
    "subject":"Versión Global Xiaomi Redmi Note 5 4 GB 64 GB Snapdragon 636 Octa Core Doble Cámara 12MP 4000 mAh Smartphone",
    "description":"Versión Global Xiaomi Redmi Note 5 4 GB 64 GB Snapdragon 636 Octa Core Doble Cámara 12MP 4000 mAh Smartphone",
    "language":"es"
}


4.2 uploading using multiple languages:

If the developer would like to upload the product with multiple languages, please ignore  subject and language and use fields: multi_language_subject_list and multi_language_description_list. The "language" field in the first level of the request parameters is still needed, which is used to indicate the "original" language used by the developer.

Sample:


{
  "language": "es",
  "multi_language_description_list": [
    {
      "language": "es",
      "web_detail": {
        "version": "2.0.0",
        "moduleList": [
          {
            "type": "html",
            "html": {
              "content": "<h1><font color=\"#b9b6cc\">test description web</font></h1>"
            }
          }
        ]
      }
    }
  ],
  "multi_language_subject_list": [
    {
      "language": "es",
      "subject": "Versión Global Xiaomi Redmi Note 5"
    },
    {
      "language": "en",
      "subject": "Global Version Xiaomi Note Redmi 5"
    }
  ]
}


Please see https://developers.aliexpress.com/en/doc.htm?docId=109534&docType=1 for more details about how to set the field of multi_language_description_list

5. Get Shipping Template id

aliexpress.freight.redefining.listfreighttemplate

The API doesn't need  request, and returns the list of shipping template.

Response Sample


{
  "aliexpress_freight_redefining_listfreighttemplate_response": {
    "aeop_freight_template_d_t_o_list": {
      "aeopfreighttemplatedtolist": [
        {
          "is_default": false,
          "template_id": 1000,
          "template_name": "Shipping Cost Template for New Sellers"
        },
        {
          "is_default": false,
          "template_id": 716381834,
          "template_name": "TRlocal"
        },
        {
          "is_default": true,
          "template_id": 716259613,
          "template_name": "freeshipping"
        }
      ]
    },
    "result_success": true,
    "request_id": "148n940kwijqn"
  }
}


6. Get Service Template ID

aliexpress.postproduct.redefining.querypromisetemplatebyid

The API requires template id (always set template_id=-1), and returns the list of shipping template.


Sample Request:


template_id:-1


Sample Respond:


{
  "aliexpress_postproduct_redefining_querypromisetemplatebyid_response": {
    "result": {
      "template_list": {
        "templatelist": [
          {
            "id": 0,
            "name": "Service Template for New Sellers"
          }
        ]
      }
    },
    "request_id": "6nw1cf67hvf7"
  }
}
//service_template_id = 1


7. Get Group ID (Optional but recommanded)

aliexpress.postproduct.redefining.getproductgrouplist

The API needs no request, and returns all group ids.


Sample Response:


{
  "aliexpress_postproduct_redefining_getproductgrouplist_response": {
    "result": {
      "success": true,
      "target_list": {
        "aeop_ae_product_tree_group": [
          {
            "group_id": 515718164,
            "group_name": "shoes"
          },
          {
            "group_id": 515797686,
            "group_name": "shirts"
          }
        ]
      },
      "time_stamp": "2019-07-12 20:51:08"
    },
    "request_id": "u23jrigfk1io"
  }
}


Sample request for post_product_request


{
    "subject": "Headscarf Women", 
    "brand_name": "Esnone",
    "service_policy_id": 0,
        "aliexpress_category_id": 32005,
    "sku_info_list": [{
  "price": "12.21",
                 "discount_price":"9.99",
  "inventory": 0,
  "sku_attributes_list": [{
    "sku_attribute_name": "Color",
    "sku_attribute_value": "red",
    "sku_image": "https://upload.wikimedia.org/wikipedia/commons/b/b5/Winnersh_Meadows_Trees.jpg"
  },{
    "sku_attribute_name": "US Size",
    "sku_attribute_value": "2"
  }],
  "sku_code": "123abc"
    }, {
  "price": "12.21",
  "inventory": 100,
  "sku_attributes_list": [{
    "sku_attribute_name": "Color",
    "sku_attribute_value": "green",
    "sku_image": "https://upload.wikimedia.org/wikipedia/commons/b/b5/Winnersh_Meadows_Trees.jpg"
  },{
    "sku_attribute_name": "US Size",
    "sku_attribute_value": "2"
  }],
  "sku_code": "989abc"
    }],
    "inventory_deduction_strategy": "place_order_success",
    "shipping_lead_time": 3,    
    "description": "Headscarf Women",
    "freight_template_id": 1001857013,  --> replace by the seller's freight template id
    "package_width": 30,
    "package_height": 20,  
    "package_length": 10,
    "attribute_list": [{
  "attribute_value": "Knee Length,  --> seller customized attribute name 
  "attribute_name": "Dresses Length"   --> seller customized attribute value
    },{
  "attribute_value_id": "349906",  --> aliexpress attribute value id
  "attribute_name_id": "200008911"   --> aliexpress attribute name id
    }],
    "language": "es",  
    "main_image_urls_list": ["https://upload.wikimedia.org/wikipedia/commons/b/b5/Winnersh_Meadows_Trees.jpg"]
}

FAQ

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