For posting a product, please first make sure below prerequisites are ready
Apply for the category and brand admissions
Set up promise templates (also called service templates) if needed
Set up freight templates (also called shipping templates) if needed
Set up size chart templates (also called size templates) if needed
You can posting your products use aliexpress.offer.product.post.
use_aut_trans | multilanguage_subject | subject | multilanguage_detail | detail | locale_name | |
---|---|---|---|---|---|---|
Seller has the ability to provide proper English subject & details | false | Spanish/Russian subject | English subject | Spanish/Russian details | English details | “es_ES” for Espanol and “ru_Ru” for Russian |
Seller doesn’t have the ability to provide proper English subject & details | true | Spanish/Russian subject | leave blank | Spanish/Russian details | leave blank | “es_ES” for Espanol and “ru_Ru” for Russian |
You can posting your products use aliexpress.offer.product.post, and the subject/detail will be translated to other languages automatically. You can edit the title and description later using aliexpress.offer.product.edit, but note:
Most of the parameters of above APIs have description in the API document and you can also refer to the sample request in appendix. In this document, we will introduce the complex attributes which cannot be described clearly enough in API document.
First of all you need to choose the suitable category for the product. The SKUs, product general attributes and size template are related to the chose category.
AliExpress category has multiple levels, here only leaf category can be used. You can obtain the entire category tree by calling aliexpress.category.redefining.getchildrenpostcategorybyid recursively. To obtain the 1st level categories, use 0 as the parent category id. You can also ask for a spreadsheet of the complete category tree from AliExpress point-of-contact.
You can refer to the example request/response in Get Child Categories.
You can forecast the category according to the title of the products by using aliexpress.postproduct.redefining.categoryforecast
After the category is decided, you can call aliexpress.category.redefining.getchildattributesresultbypostcateidandpath to obtain the attributes of the category, which are useful information for posting products. Here you can find general attributes and SKU attributes for a category, and you will know which attributes are required and which values are available for an attribute. You can take a look at the example request/request in Get Category Attributes.
{ ... "spec": 2, ? <-- Important for SKU attribute! "required": false, <-- Important! "keyAttribute": false, <-- Important! "sku": false, <-- Important! "id": 196, <-- Important! "values": [ { "id": 134, "names": { "zh": "交流", "en": "AC" } }, ... ], "names": { "zh": "输出类型", "en": "Output Type" }, "inputType": "STRING", "attributeShowTypeValue": "list_box" }
SKU attributes and general attributes are in different request parameters when posting a product.
NOTE: For all Spainish local sellers, to let you post products more easily and quickly, we have done special logic adjustment: all SKU required properties can be ignored. Also, the SKU property “Ships From” (id: 200007763) is not needed for global sellers, so please do not include this SKU property in your product feeds to avoid errors
One product can have multiple SKUs, each SKU is the combination of multiple SKU properties. The number of SKUs depends on how many values of each SKU properties. It’s the product of the number of values for each SKU properties.
For example, one shirt can have two dimensions of SKU properites: color (3: blue, black and green) and size (4: M, L, XL, XXL), then there will be 3*4=12 SKUs available.
As mentioned above, we can use aliexpress.category.redefining.getchildattributesresultbypostcateidandpath to obtain all SKU attributes of a category.
For SKU attributes, the order is important when posting products. If one product SKU has multiple SKU attributes, they should be sorted by the asending order of “spec”. For example, for shirt (Apparel & Accessories -> Men’s Clothing -> Shirts, category id is 348) there are 3 SKU attributes, the order should be 14, 5 and 200007763.
{ "id":5, "names": "{\"zh\":\"尺寸\",\"en\":\"Size\"}", "sku": true, "spec":2 }, { "id": 14, "names": "{\"zh\":\"颜色\",\"en\":\"Color\"}", "sku": true, "spec": 1 }, { "id": 200007763, "names": "{\"zh\":\"发货地\",\"en\":\"Ships From\"}", "sku": true, "spec": 3 }
For each SKU property, there are four fields. Besides the property id and property value id, you can define your own name and image for it, for example
skuProperty.setSkuPropertyId(200009209); <--- property id obtained from category attribute API skuProperty.setPropertyValueId(200660849); <--- each sku needs to have a different value ID, pick from attribute list skuProperty.setPropertyValueDefinitionName("pink"); <--- set your own color name skuProperty.setSkuImage("http://***.jpg"); <--- upload an SKU image and use that here
There are some generic attributes which help to describe the products, for example, brand, material, etc.
There are two kinds of attributes.
Below table will describe which fields need to be filled when posting products.
Type | Case | attr_name_id | attr_value_id | attr_name | attr_value |
---|---|---|---|---|---|
System attributes | Values are defined and no “Other” value in them | required | required | invalid | invalid |
System attributes | No values available | required | invalid | invalid | required |
System attributes | There is “Other” in values | required | required | invalid | required |
Customized attributes | invalid | invalid | required | required |
Here are some examples for system attributes.
System attributes with all values defined
System attributes without any value
System attributes with “Other”" value
We support setting discount price directly on product instead of creating promotions. Please refer to this document: https://developers.aliexpress.com/en/doc.htm#?docType=1&docId=108375.
You can upload images for product images and images in product details by using aliexpress.photobank.redefining.uploadimageforsdk. You can also list the images in AliExpress photo bank by using aliexpress.photobank.redefining.listimagepagination. You can create groups for images (currently it can only be done on AliExpress website), and you can list all the groups by using aliexpress.photobank.redefining.listgroup.
The photobank has a capacity limitation. To know the limitation and current usage, please use aliexpress.photobank.redefining.getphotobankinfo.
The seller needs to choose a shipping template to associate with the product. Use aliexpress.freight.redefining.listfreighttemplate to list all shipping templates.
The seller needs to choose a promise template to associate with the product. Use aliexpress.postproduct.redefining.querypromisetemplatebyid to list all promise
templates (set template ID to -1).
Size chart template is useful for showing the extract size information for fashion products. But it is definitely optional, if you want to post product ASAP, you can ignore this section directly. You can use aliexpress.postproduct.redefining.setsizechart to associate the product with size template later.
To get all the size templates available to a leaf category, you can use aliexpress.offer.redefining.getsizetemplatesbycategoryid.
If you have the same size templates for different categories, you can create one and then copy it to other categories, using aliexpress.offer.redefining.copysizetemplate.
If you want to know by which products a size template can be referenced, you can use aliexpress.offer.redefining.getcanusedproductbysizetemplateid.
The detail description can contain images. Just use the HTML image tag with a link to the photobank of AliExpress (refer to above section of how to upload images), for example
Product instruction image below:\n<img src="http://ae01.alicdn.com/kf/HTB14h.DRVXXXXa7XXXXq6xXFXXXm.jpg" alt="Smiley face" height="142" width="142">
Uploading videos is not supported via API. If you want to use videos in product details when using API to upload product, you have to copy videos from other products.
1. Post a product with the video using seller’s backend in AliExpress website
2. Get video information (aeop_a_e_multimedia) via aliexpress.postproduct.redefining.findaeproductbyid( Query product info by ID )
3. Post product via API, with above video information (aeop_a_e_multimedia) and video URL in product details
The Product Description Template is a new way to manage your product information. You can create a template for all the shared information in all of your products like After Sale or Shipping Policies. The template will then be inserted automatically into each product description. If you want to change the information at any time, you only need to change the template. You can insert Customized Template or Related Products Template into product details.
Product Description Template can only be created in seller’s backend in AliExpress website, but you can query the information via API, including
Below are examples to insert product description templates into product details.
Customized Template
<kse:widget data-widget-type="customText" id="3***9" title="title" type="custom"></kse:widget>
Related Products Template
<kse:widget data-widget-type="relatedProduct" id="2***1" title="title" type="relation"></kse:widget>
field | check |
---|---|
currency right | a. number:everyone only has one original post language right; b. interface:aliexpress.merchant.profile.get, fetch seller’s currency right through interface; c. link:https://developers.aliexpress.com/en/doc.htm?docId=43062&docType=2 d. value:return value of field: quotation_currency; |
mandatory attribute about category | a. interface: aliexpress.category.redefining.getchildattributesresultbypostcateidandpath; b. link:https://developers.aliexpress.com/api.htm?spm=a219a.7386797.0.0.6d2f669aBfE4so&source=search&docId=29988&docType=2 c. value:return value of field:aeop_attribute_dto.required, use this to check is mandatory |
check case | description | sample |
---|---|---|
sku attr can’t repeat | every sku’s aeop_s_k_u_property is unique, can’t repeat | “aeop_ae_product_s_k_us”:[ { “aeop_s_k_u_property”:[ { “property_value_id”:771, “sku_property_id”:14 } ] }, { “aeop_s_k_u_property”:[ { “property_value_id”:771, “sku_property_id”:14 } ] } ] |
sku’s dimension should be the same size | every element number in sku’s aeop_s_k_u_property should be the same | |
sku’s attribute can’t be empty | every element of aeop_s_k_u_property should not empry | “aeop_ae_product_s_k_us”: [ { “aeop_s_k_u_property”: [ { “property_value_id”: 771, “sku_property_id”: 14 } ] }, { “aeop_s_k_u_property”: [ { “property_value_id”: "“, ”sku_property_id“: ”" } ] } ] |
post a backpack, no sku attribute, no national price
{ //1. Product Information "subject_list": [ { "locale": "en_US", "value": "test new post api" } ], "category_id": 152401, "image_u_r_ls": "http://ae01.alicdn.com/kf/HLB1XxDQRNTpK1RjSZFKq6y2wXXam.jpg", "aeop_ae_product_propertys": [ { "attr_name_id": 200000137, "attr_value_id": 200001583 }, { "attr_name_id": 20205, "attr_value_id": 365212 }, { "attr_name_id": 2, "attr_value_id": 200659476 } ], //2. Price and Inventory "product_unit": 100000015, "is_pack_sell": false, "aeop_ae_product_s_k_us": [ { "aeop_s_k_u_property": [], "currency_code": "USD", "ipm_sku_stock": 12, "sku_price": "8888.0", "sku_stock": false } ], "product_price": "8888.00", "currency_code": "USD", //3. Detail Page "locale": "en_US", "detail_source_list": [ { "locale": "en_US", "mobile_detail": "{\"version\":\"2.0.0\",\"moduleList\":[{\"type\":\"text-image\",\"texts\":[{\"content\":\"Brand Story\",\"class\":\"title\"}],\"images\":[{\"url\":\"//ae01.alicdn.com/kf/HTB1QuVqacfrK1RkSmLy760GApXaG.png\",\"style\":{\"width\":700,\"height\":296}}]},{\"type\":\"text\",\"texts\":[{\"content\":\"Describe your brand story, including establishment and development timelines, milestones, etc.\",\"class\":\"body\"}]}]}" } ], //4.Packaging and Logistics "delivery_time": 7, "gross_weight": "0.500", "lot_num": 1, "add_weight": "null", "package_height": 10, "package_length": 50, "package_type": false, "package_width": 30, "freight_template_id": 1000, "promise_template_id": 0, //5. Other Settings "reduce_strategy": "payment_success_deduct", "ws_valid_num": 30 }
{ "aliexpress_offer_product_post_response": { "result": { "product_id": 33009515412 }, "request_id": "zg4wtq68m309" } }
{ AeopAEProduct aeopAEProduct = new AeopAEProduct(); //1. Product Information List<Subject> subjects = new ArrayList<Subject>(); Subject subject = new Subject(); subjects.add(subject); subject.setLocale("en_US"); subject.setValue("test new post api"); aeopAEProduct.setSubjectList(subjects); aeopAEProduct.setLocale("en_US"); //1.1 Category: Luggage & Bags -> Backpacks(152401L) Long categoryId = 152401L; aeopAEProduct.setCategoryId(categoryId); aeopAEProduct.setImageURLs("http://ae01.alicdn.com/kf/HLB1XxDQRNTpK1RjSZFKq6y2wXXam.jpg;http://g02.a.alicdn.com/kf/HTB1q1aLJXXXXXcfaXXXq6xXFXXXv.jpg"); //1.2. System property List<AeopAeProductProperty> aeopAeProductProperties = new ArrayList<AeopAeProductProperty>(); AeopAeProductProperty aeopAeProductProperty1 = new AeopAeProductProperty(); aeopAeProductProperties.add(aeopAeProductProperty1); aeopAeProductProperty1.setAttrNameId(200000137); aeopAeProductProperty1.setAttrValueIdLong(200001583L); AeopAeProductProperty aeopAeProductProperty2 = new AeopAeProductProperty(); aeopAeProductProperties.add(aeopAeProductProperty2); aeopAeProductProperty2.setAttrNameId(20205); aeopAeProductProperty2.setAttrValueIdLong(365212L); AeopAeProductProperty aeopAeProductProperty3 = new AeopAeProductProperty(); aeopAeProductProperties.add(aeopAeProductProperty3); aeopAeProductProperty3.setAttrNameId(2); aeopAeProductProperty3.setAttrValueIdLong(200659476L); aeopAEProduct.setAeopAeProductPropertys(aeopAeProductProperties); //2. Price and Inventory aeopAEProduct.setProductUnit(100000015L); aeopAEProduct.setIsPackSell(false); aeopAEProduct.setProductPrice("8888.00"); aeopAEProduct.setCurrencyCode("USD"); List<AeopAEProductSKU> aeopAEProductSKUS = new ArrayList<AeopAEProductSKU>(); AeopAEProductSKU aeopAEProductSKU1 = new AeopAEProductSKU(); aeopAEProductSKUS.add(aeopAEProductSKU1); List<AeopSKUProperty> aeopSKUProperties = new ArrayList<AeopSKUProperty>(); aeopAEProductSKU1.setAeopSKUProperty(aeopSKUProperties); //aeopAEProductSKU1.setBarcode("AEfgsdg334"); aeopAEProductSKU1.setCurrencyCode("USD"); aeopAEProductSKU1.setIpmSkuStock(12); aeopAEProductSKU1.setSkuPrice("8888.0"); aeopAEProduct.setAeopAeProductSKUs(aeopAEProductSKUS); //3. Detail Page List<DetailSource> detailSources = new ArrayList<DetailSource>(); DetailSource detailSource = new DetailSource(); detailSources.add(detailSource); detailSource.setLocale("en_US"); detailSource.setWebDetail("web detail info"); detailSource.setMobileDetail("{\\\"version\\\":\\\"2.0.0\\\",\\\"moduleList\\\":[{\\\"type\\\":\\\"text-image\\\",\\\"texts\\\":[{\\\"content\\\":\\\"Brand Story\\\",\\\"class\\\":\\\"title\\\"}],\\\"images\\\":[{\\\"url\\\":\\\"//ae01.alicdn.com/kf/HTB1QuVqacfrK1RkSmLy760GApXaG.png\\\",\\\"style\\\":{\\\"width\\\":700,\\\"height\\\":296}}]},{\\\"type\\\":\\\"text\\\",\\\"texts\\\":[{\\\"content\\\":\\\"Describe your brand story, including establishment and development timelines, milestones, etc.\\\",\\\"class\\\":\\\"body\\\"}]}]}\"\n"); aeopAEProduct.setDetailSourceList(detailSources); //4. Packaging and Logistics aeopAEProduct.setDeliveryTime(7L); aeopAEProduct.setGrossWeight("0.500"); aeopAEProduct.setLotNum(1L); aeopAEProduct.setPackageLength(50); aeopAEProduct.setPackageHeight(10); aeopAEProduct.setPackageType(false); aeopAEProduct.setPackageWidth(30); aeopAEProduct.setFreightTemplateId(1000); aeopAEProduct.setPromiseTemplateId(0L); //5. Other Settings aeopAEProduct.setReduceStrategy("place_order_withhold or payment_success_deduct"); aeopAEProduct.setWsValidNum(30L); String apiName = "aliexpress.offer.product.post"; Map<String, String> params = new HashMap<String, String>(); params.put("product", new JSONObject(aeopAEProduct).toString()); JSONObject jsonResponse = ApiInvoker.invokeApi(appKey, appSecret, accessToken, apiName, params); }
post a backpack,with two sku attributes, color(red,blue)、size(13、14):
{ //1. Product Information "subject_list": [ { "locale": "en_US", "value": "test new post api" } ], "category_id": 152401, "image_u_r_ls": "http://ae01.alicdn.com/kf/HLB1XxDQRNTpK1RjSZFKq6y2wXXam.jpg", "aeop_ae_product_propertys": [ { "attr_name_id": 200000137, "attr_value_id": 200001583 }, { "attr_name_id": 20205, "attr_value_id": 365212 }, { "attr_name_id": 2, "attr_value_id": 200659476 } ], //2. Price and Inventory "product_unit": 100000015, "is_pack_sell": false, "aeop_ae_product_s_k_us": [ { "aeop_s_k_u_property": [], "currency_code": "USD", "ipm_sku_stock": 12, "sku_price": "8888.0", "sku_stock": false } ], "product_price": "8888.00", "currency_code": "USD", "aeop_ae_product_s_k_us": [ { "aeop_s_k_u_property": [ { "property_value_id": 771, "sku_property_id": 14 }, { "property_value_id": 311, "sku_property_id": 5 } ], "currency_code": "USD", "id": "14:771;5:311", "ipm_sku_stock": 10, "sku_price": "8886.0", "sku_stock": false }, { "aeop_s_k_u_property": [ { "property_value_id": 771, "sku_property_id": 14 }, { "property_value_id": 312, "sku_property_id": 5 } ], "currency_code": "USD", "id": "14:771;5:312", "ipm_sku_stock": 10, "sku_price": "8886.0", "sku_stock": false }, { "aeop_s_k_u_property": [ { "property_value_id": 173, "sku_property_id": 14 }, { "property_value_id": 311, "sku_property_id": 5 } ], "currency_code": "USD", "id": "14:173;5:311", "ipm_sku_stock": 10, "sku_price": "8886.0", "sku_stock": false }, { "aeop_s_k_u_property": [ { "property_value_id": 173, "sku_property_id": 14 }, { "property_value_id": 312, "sku_property_id": 5 } ], "currency_code": "USD", "id": "14:173;5:312", "ipm_sku_stock": 10, "sku_price": "8886.0", "sku_stock": false } ], //3. Detail Page "locale": "en_US", "detail_source_list": [ { "locale": "en_US", "mobile_detail": "{\"version\":\"2.0.0\",\"moduleList\":[{\"type\":\"text-image\",\"texts\":[{\"content\":\"Brand Story\",\"class\":\"title\"}],\"images\":[{\"url\":\"//ae01.alicdn.com/kf/HTB1QuVqacfrK1RkSmLy760GApXaG.png\",\"style\":{\"width\":700,\"height\":296}}]},{\"type\":\"text\",\"texts\":[{\"content\":\"Describe your brand story, including establishment and development timelines, milestones, etc.\",\"class\":\"body\"}]}]}" } ], //4.Packaging and Logistics "delivery_time": 7, "gross_weight": "0.500", "lot_num": 1, "add_weight": "null", "package_height": 10, "package_length": 50, "package_type": false, "package_width": 30, "freight_template_id": 1000, "promise_template_id": 0, //5. Other Settings "reduce_strategy": "payment_success_deduct", "ws_valid_num": 30 }
{ "aliexpress_offer_product_post_response": { "result": { "product_id": 33009539054 }, "request_id": "sab6ywm0bn3x" } }
{ AeopAEProduct aeopAEProduct = new AeopAEProduct(); //1. Product Information List<Subject> subjects = new ArrayList<Subject>(); Subject subject = new Subject(); subjects.add(subject); subject.setLocale("en_US"); subject.setValue("test new post api"); aeopAEProduct.setSubjectList(subjects); aeopAEProduct.setLocale("en_US"); //1.1 Category: Luggage & Bags -> Backpacks(152401L) Long categoryId = 152401L; aeopAEProduct.setCategoryId(categoryId); aeopAEProduct.setImageURLs("http://ae01.alicdn.com/kf/HLB1XxDQRNTpK1RjSZFKq6y2wXXam.jpg;http://g02.a.alicdn.com/kf/HTB1q1aLJXXXXXcfaXXXq6xXFXXXv.jpg"); //1.2. System property List<AeopAeProductProperty> aeopAeProductProperties = new ArrayList<AeopAeProductProperty>(); AeopAeProductProperty aeopAeProductProperty1 = new AeopAeProductProperty(); aeopAeProductProperties.add(aeopAeProductProperty1); aeopAeProductProperty1.setAttrNameId(200000137); aeopAeProductProperty1.setAttrValueIdLong(200001583L); AeopAeProductProperty aeopAeProductProperty2 = new AeopAeProductProperty(); aeopAeProductProperties.add(aeopAeProductProperty2); aeopAeProductProperty2.setAttrNameId(20205); aeopAeProductProperty2.setAttrValueIdLong(365212L); AeopAeProductProperty aeopAeProductProperty3 = new AeopAeProductProperty(); aeopAeProductProperties.add(aeopAeProductProperty3); aeopAeProductProperty3.setAttrNameId(2); aeopAeProductProperty3.setAttrValueIdLong(200659476L); aeopAEProduct.setAeopAeProductPropertys(aeopAeProductProperties); //2. Price and Inventory aeopAEProduct.setProductUnit(100000015L); aeopAEProduct.setIsPackSell(false); aeopAEProduct.setProductPrice("8888.00"); aeopAEProduct.setCurrencyCode("USD"); //2.1 SKU price List<AeopSKUProperty> aeopSKUProperties = new ArrayList<AeopSKUProperty>(); AeopSKUProperty aeopSKUProperty11 = new AeopSKUProperty(); aeopSKUProperty11.setSkuPropertyId(14); aeopSKUProperty11.setPropertyValueIdLong(771L); AeopSKUProperty aeopSKUProperty12 = new AeopSKUProperty(); aeopSKUProperty12.setSkuPropertyId(14); aeopSKUProperty12.setPropertyValueIdLong(173L); AeopSKUProperty aeopSKUProperty21 = new AeopSKUProperty(); aeopSKUProperty21.setSkuPropertyId(5); aeopSKUProperty21.setPropertyValueIdLong(312L); AeopSKUProperty aeopSKUProperty22 = new AeopSKUProperty(); aeopSKUProperty22.setSkuPropertyId(5); aeopSKUProperty22.setPropertyValueIdLong(311L); List<AeopAEProductSKU> aeopAEProductSKUS = new ArrayList<AeopAEProductSKU>(); AeopAEProductSKU aeopAEProductSKU1 = new AeopAEProductSKU(); aeopAEProductSKUS.add(aeopAEProductSKU1); List<AeopSKUProperty> aeopSKUProperties1 = new ArrayList<AeopSKUProperty>(); aeopSKUProperties1.add(aeopSKUProperty11); aeopSKUProperties1.add(aeopSKUProperty21); aeopAEProductSKU1.setAeopSKUProperty(aeopSKUProperties1); //aeopAEProductSKU1.setBarcode("AEfgsdg334"); aeopAEProductSKU1.setCurrencyCode("USD"); aeopAEProductSKU1.setIpmSkuStock(12L); aeopAEProductSKU1.setSkuPrice("8886.0"); AeopAEProductSKU aeopAEProductSKU2 = new AeopAEProductSKU(); aeopAEProductSKUS.add(aeopAEProductSKU2); List<AeopSKUProperty> aeopSKUProperties2 = new ArrayList<AeopSKUProperty>(); aeopSKUProperties2.add(aeopSKUProperty11); aeopSKUProperties2.add(aeopSKUProperty22); aeopAEProductSKU2.setAeopSKUProperty(aeopSKUProperties2); //aeopAEProductSKU2.setBarcode("AEfgsdg334"); aeopAEProductSKU2.setCurrencyCode("USD"); aeopAEProductSKU2.setIpmSkuStock(12L); aeopAEProductSKU2.setSkuPrice("8886.0"); AeopAEProductSKU aeopAEProductSKU3 = new AeopAEProductSKU(); aeopAEProductSKUS.add(aeopAEProductSKU3); List<AeopSKUProperty> aeopSKUProperties3 = new ArrayList<AeopSKUProperty>(); aeopSKUProperties3.add(aeopSKUProperty12); aeopSKUProperties3.add(aeopSKUProperty21); aeopAEProductSKU3.setAeopSKUProperty(aeopSKUProperties3); //aeopAEProductSKU3.setBarcode("AEfgsdg334"); aeopAEProductSKU3.setCurrencyCode("USD"); aeopAEProductSKU3.setIpmSkuStock(12L); aeopAEProductSKU3.setSkuPrice("8886.0"); AeopAEProductSKU aeopAEProductSKU4 = new AeopAEProductSKU(); aeopAEProductSKUS.add(aeopAEProductSKU4); List<AeopSKUProperty> aeopSKUProperties4 = new ArrayList<AeopSKUProperty>(); aeopSKUProperties4.add(aeopSKUProperty12); aeopSKUProperties4.add(aeopSKUProperty22); aeopAEProductSKU4.setAeopSKUProperty(aeopSKUProperties4); //aeopAEProductSKU4.setBarcode("AEfgsdg334"); aeopAEProductSKU4.setCurrencyCode("USD"); aeopAEProductSKU4.setIpmSkuStock(12L); aeopAEProductSKU4.setSkuPrice("8886.0"); aeopAEProduct.setAeopAeProductSKUs(aeopAEProductSKUS); //3. Detail Page List<DetailSource> detailSources = new ArrayList<DetailSource>(); DetailSource detailSource = new DetailSource(); detailSources.add(detailSource); detailSource.setLocale("en_US"); detailSource.setWebDetail("web detail info"); detailSource.setMobileDetail("{\\\"version\\\":\\\"2.0.0\\\",\\\"moduleList\\\":[{\\\"type\\\":\\\"text-image\\\",\\\"texts\\\":[{\\\"content\\\":\\\"Brand Story\\\",\\\"class\\\":\\\"title\\\"}],\\\"images\\\":[{\\\"url\\\":\\\"//ae01.alicdn.com/kf/HTB1QuVqacfrK1RkSmLy760GApXaG.png\\\",\\\"style\\\":{\\\"width\\\":700,\\\"height\\\":296}}]},{\\\"type\\\":\\\"text\\\",\\\"texts\\\":[{\\\"content\\\":\\\"Describe your brand story, including establishment and development timelines, milestones, etc.\\\",\\\"class\\\":\\\"body\\\"}]}]}\"\n"); aeopAEProduct.setDetailSourceList(detailSources); //4. Packaging and Logistics aeopAEProduct.setDeliveryTime(7L); aeopAEProduct.setGrossWeight("0.500"); aeopAEProduct.setLotNum(1L); aeopAEProduct.setPackageLength(50); aeopAEProduct.setPackageHeight(10); aeopAEProduct.setPackageType(false); aeopAEProduct.setPackageWidth(30); aeopAEProduct.setFreightTemplateId(1000); aeopAEProduct.setPromiseTemplateId(0L); //5. Other Settings aeopAEProduct.setReduceStrategy("place_order_withhold or payment_success_deduct"); aeopAEProduct.setWsValidNum(30L); String apiName = "aliexpress.offer.product.post"; Map<String, String> params = new HashMap<String, String>(); params.put("product", new JSONObject(aeopAEProduct).toString()); JSONObject jsonResponse = ApiInvoker.invokeApi(appKey, appSecret, accessToken, apiName, params); }
{ //1. Product Information "subject_list": [ { "locale": "en_US", "value": "test new post api" } ], "category_id": 152401, "image_u_r_ls": "http://ae01.alicdn.com/kf/HLB1XxDQRNTpK1RjSZFKq6y2wXXam.jpg", "aeop_ae_product_propertys": [ { "attr_name_id": 200000137, "attr_value_id": 200001583 }, { "attr_name_id": 20205, "attr_value_id": 365212 }, { "attr_name_id": 2, "attr_value_id": 200659476 } ], //2. Price and Inventory "product_unit": 100000015, "is_pack_sell": false, "aeop_ae_product_s_k_us": [ { "aeop_s_k_u_property": [], "currency_code": "USD", "ipm_sku_stock": 12, "sku_price": "8888.0", "sku_stock": false } ], "product_price": "8888.00", "currency_code": "USD", "aeop_ae_product_s_k_us": [ { "aeop_s_k_u_property": [ { "property_value_id": 771, "sku_property_id": 14 }, { "property_value_id": 311, "sku_property_id": 5 } ], "currency_code": "USD", "id": "14:771;5:311", "ipm_sku_stock": 10, "sku_price": "8886.0", "sku_stock": false }, { "aeop_s_k_u_property": [ { "property_value_id": 771, "sku_property_id": 14 }, { "property_value_id": 312, "sku_property_id": 5 } ], "currency_code": "USD", "id": "14:771;5:312", "ipm_sku_stock": 10, "sku_price": "8886.0", "sku_stock": false }, { "aeop_s_k_u_property": [ { "property_value_id": 173, "sku_property_id": 14 }, { "property_value_id": 311, "sku_property_id": 5 } ], "currency_code": "USD", "id": "14:173;5:311", "ipm_sku_stock": 10, "sku_price": "8886.0", "sku_stock": false }, { "aeop_s_k_u_property": [ { "property_value_id": 173, "sku_property_id": 14 }, { "property_value_id": 312, "sku_property_id": 5 } ], "currency_code": "USD", "id": "14:173;5:312", "ipm_sku_stock": 10, "sku_price": "8886.0", "sku_stock": false } ], "aeop_national_quote_configuration": { "configuration_data": "[{\"absoluteQuoteMap\":{\"14:771;5:311\":12.0},\"shiptoCountry\":\"RU\"},{\"absoluteQuoteMap\":{\"14:771;5:311\":-10.0},\"shiptoCountry\":\"ES\"}]", "configuration_type": "relative" }, //3. Detail Page "locale": "en_US", "detail_source_list": [ { "locale": "en_US", "mobile_detail": "{\"version\":\"2.0.0\",\"moduleList\":[{\"type\":\"text-image\",\"texts\":[{\"content\":\"Brand Story\",\"class\":\"title\"}],\"images\":[{\"url\":\"//ae01.alicdn.com/kf/HTB1QuVqacfrK1RkSmLy760GApXaG.png\",\"style\":{\"width\":700,\"height\":296}}]},{\"type\":\"text\",\"texts\":[{\"content\":\"Describe your brand story, including establishment and development timelines, milestones, etc.\",\"class\":\"body\"}]}]}" } ], //4.Packaging and Logistics "delivery_time": 7, "gross_weight": "0.500", "lot_num": 1, "add_weight": "null", "package_height": 10, "package_length": 50, "package_type": false, "package_width": 30, "freight_template_id": 1000, "promise_template_id": 0, //5. Other Settings "reduce_strategy": "payment_success_deduct", "ws_valid_num": 30 }
{ "aliexpress_offer_product_post_response": { "result": { "product_id": 33008948515 }, "request_id": "54sycq1o7vme" } }
{ AeopAEProduct aeopAEProduct = new AeopAEProduct(); //1. Product Information List<Subject> subjects = new ArrayList<Subject>(); Subject subject = new Subject(); subjects.add(subject); subject.setLocale("en_US"); subject.setValue("test new post api"); aeopAEProduct.setSubjectList(subjects); aeopAEProduct.setLocale("en_US"); //1.1 Category: Luggage & Bags -> Backpacks(152401L) Long categoryId = 152401L; aeopAEProduct.setCategoryId(categoryId); aeopAEProduct.setImageURLs("http://ae01.alicdn.com/kf/HLB1XxDQRNTpK1RjSZFKq6y2wXXam.jpg;http://g02.a.alicdn.com/kf/HTB1q1aLJXXXXXcfaXXXq6xXFXXXv.jpg"); //1.2. System property List<AeopAeProductProperty> aeopAeProductProperties = new ArrayList<AeopAeProductProperty>(); AeopAeProductProperty aeopAeProductProperty1 = new AeopAeProductProperty(); aeopAeProductProperties.add(aeopAeProductProperty1); aeopAeProductProperty1.setAttrNameId(200000137); aeopAeProductProperty1.setAttrValueIdLong(200001583L); AeopAeProductProperty aeopAeProductProperty2 = new AeopAeProductProperty(); aeopAeProductProperties.add(aeopAeProductProperty2); aeopAeProductProperty2.setAttrNameId(20205); aeopAeProductProperty2.setAttrValueIdLong(365212L); AeopAeProductProperty aeopAeProductProperty3 = new AeopAeProductProperty(); aeopAeProductProperties.add(aeopAeProductProperty3); aeopAeProductProperty3.setAttrNameId(2); aeopAeProductProperty3.setAttrValueIdLong(200659476L); aeopAEProduct.setAeopAeProductPropertys(aeopAeProductProperties); //2. Price and Inventory aeopAEProduct.setProductUnit(100000015L); aeopAEProduct.setIsPackSell(false); aeopAEProduct.setProductPrice("8888.00"); aeopAEProduct.setCurrencyCode("USD"); //2.1 SKU price List<AeopSKUProperty> aeopSKUProperties = new ArrayList<AeopSKUProperty>(); AeopSKUProperty aeopSKUProperty11 = new AeopSKUProperty(); aeopSKUProperty11.setSkuPropertyId(14); aeopSKUProperty11.setPropertyValueIdLong(771L); AeopSKUProperty aeopSKUProperty12 = new AeopSKUProperty(); aeopSKUProperty12.setSkuPropertyId(14); aeopSKUProperty12.setPropertyValueIdLong(173L); AeopSKUProperty aeopSKUProperty21 = new AeopSKUProperty(); aeopSKUProperty21.setSkuPropertyId(5); aeopSKUProperty21.setPropertyValueIdLong(312L); AeopSKUProperty aeopSKUProperty22 = new AeopSKUProperty(); aeopSKUProperty22.setSkuPropertyId(5); aeopSKUProperty22.setPropertyValueIdLong(311L); List<AeopAEProductSKU> aeopAEProductSKUS = new ArrayList<AeopAEProductSKU>(); AeopAEProductSKU aeopAEProductSKU1 = new AeopAEProductSKU(); aeopAEProductSKUS.add(aeopAEProductSKU1); List<AeopSKUProperty> aeopSKUProperties1 = new ArrayList<AeopSKUProperty>(); aeopSKUProperties1.add(aeopSKUProperty11); aeopSKUProperties1.add(aeopSKUProperty21); aeopAEProductSKU1.setAeopSKUProperty(aeopSKUProperties1); //aeopAEProductSKU1.setBarcode("AEfgsdg334"); aeopAEProductSKU1.setCurrencyCode("USD"); aeopAEProductSKU1.setIpmSkuStock(12L); aeopAEProductSKU1.setSkuPrice("8886.0"); AeopAEProductSKU aeopAEProductSKU2 = new AeopAEProductSKU(); aeopAEProductSKUS.add(aeopAEProductSKU2); List<AeopSKUProperty> aeopSKUProperties2 = new ArrayList<AeopSKUProperty>(); aeopSKUProperties2.add(aeopSKUProperty11); aeopSKUProperties2.add(aeopSKUProperty22); aeopAEProductSKU2.setAeopSKUProperty(aeopSKUProperties2); //aeopAEProductSKU2.setBarcode("AEfgsdg334"); aeopAEProductSKU2.setCurrencyCode("USD"); aeopAEProductSKU2.setIpmSkuStock(12L); aeopAEProductSKU2.setSkuPrice("8886.0"); AeopAEProductSKU aeopAEProductSKU3 = new AeopAEProductSKU(); aeopAEProductSKUS.add(aeopAEProductSKU3); List<AeopSKUProperty> aeopSKUProperties3 = new ArrayList<AeopSKUProperty>(); aeopSKUProperties3.add(aeopSKUProperty12); aeopSKUProperties3.add(aeopSKUProperty21); aeopAEProductSKU3.setAeopSKUProperty(aeopSKUProperties3); //aeopAEProductSKU3.setBarcode("AEfgsdg334"); aeopAEProductSKU3.setCurrencyCode("USD"); aeopAEProductSKU3.setIpmSkuStock(12L); aeopAEProductSKU3.setSkuPrice("8886.0"); AeopAEProductSKU aeopAEProductSKU4 = new AeopAEProductSKU(); aeopAEProductSKUS.add(aeopAEProductSKU4); List<AeopSKUProperty> aeopSKUProperties4 = new ArrayList<AeopSKUProperty>(); aeopSKUProperties4.add(aeopSKUProperty12); aeopSKUProperties4.add(aeopSKUProperty22); aeopAEProductSKU4.setAeopSKUProperty(aeopSKUProperties4); //aeopAEProductSKU4.setBarcode("AEfgsdg334"); aeopAEProductSKU4.setCurrencyCode("USD"); aeopAEProductSKU4.setIpmSkuStock(12L); aeopAEProductSKU4.setSkuPrice("8886.0"); aeopAEProduct.setAeopAeProductSKUs(aeopAEProductSKUS); //2.2. National quote AeopNationalQuoteConfiguration aeopNationalQuoteConfiguration = new AeopNationalQuoteConfiguration(); aeopNationalQuoteConfiguration.setConfigurationData("[{\"absoluteQuoteMap\":{\"14:173;5:311\":12.0},\"shiptoCountry\":\"RU\"},{\"absoluteQuoteMap\":{\"14:173;5:311\":-10.0},\"shiptoCountry\":\"ES\"}]"); aeopNationalQuoteConfiguration.setConfigurationType("percentage or relative"); aeopAEProduct.setAeopNationalQuoteConfiguration(aeopNationalQuoteConfiguration); //3. Detail Page List<DetailSource> detailSources = new ArrayList<DetailSource>(); DetailSource detailSource = new DetailSource(); detailSources.add(detailSource); detailSource.setLocale("en_US"); detailSource.setWebDetail("web detail info"); detailSource.setMobileDetail("{\\\"version\\\":\\\"2.0.0\\\",\\\"moduleList\\\":[{\\\"type\\\":\\\"text-image\\\",\\\"texts\\\":[{\\\"content\\\":\\\"Brand Story\\\",\\\"class\\\":\\\"title\\\"}],\\\"images\\\":[{\\\"url\\\":\\\"//ae01.alicdn.com/kf/HTB1QuVqacfrK1RkSmLy760GApXaG.png\\\",\\\"style\\\":{\\\"width\\\":700,\\\"height\\\":296}}]},{\\\"type\\\":\\\"text\\\",\\\"texts\\\":[{\\\"content\\\":\\\"Describe your brand story, including establishment and development timelines, milestones, etc.\\\",\\\"class\\\":\\\"body\\\"}]}]}\"\n"); aeopAEProduct.setDetailSourceList(detailSources); //4. Packaging and Logistics aeopAEProduct.setDeliveryTime(7L); aeopAEProduct.setGrossWeight("0.500"); aeopAEProduct.setLotNum(1L); aeopAEProduct.setPackageLength(50); aeopAEProduct.setPackageHeight(10); aeopAEProduct.setPackageType(false); aeopAEProduct.setPackageWidth(30); aeopAEProduct.setFreightTemplateId(1000); aeopAEProduct.setPromiseTemplateId(0L); //5. Other Settings aeopAEProduct.setReduceStrategy("place_order_withhold or payment_success_deduct"); aeopAEProduct.setWsValidNum(30L); String apiName = "aliexpress.offer.product.post"; Map<String, String> params = new HashMap<String, String>(); params.put("product", new JSONObject(aeopAEProduct).toString()); JSONObject jsonResponse = ApiInvoker.invokeApi(appKey, appSecret, accessToken, apiName, params); }