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

Feed Solution Tutorial

更新时间:2021/05/10 访问次数:5153

This document describes the details of how to use feed solutions. The entire process is quite simple, including 2 steps.

  1. Step1 : submitting a feed and returning a job id
  2. Step 2: querying the feed result based on the previous job id.

Please Check the sample codes below for 4 types of operation.

Step 1: Submitting a feed

aliexpress.solution.feed.submit

Request Paramter    
Operation_type Required PRODUCT_CREATE
PRODUCT_FULL_UPDATE
PRODUCT_STOCKS_UPDATE Will be deprecated soon
PRODUCT_PRICES_UPDATE Will be deprecated soon
Item_list Required Item_list is a list of item that have 2 required fields:  "item_content_id" and "item-content". Depends on the operation type, "item_content"has different data format. Check the sample code for each type.
Response Parameter  
Job ID Job id will be returned once the feed solution is submitted. It's required for step 2: query feed solution.

 

Data Format

Each item in the item_list will have an "item_content_id" and an "item_content". The item_content_id is an unique id corresponding to each item in the item_list. It's self-defined. It provides convenience for sellers to match the item_execuation_result with the item_content.

Following are sample code for 4 type of feed operations we currently support:

PRODUCT_CREATE

PRODUCT_FULL_UPDATE Will be deprecated soon

PRODUCT_STOCKS_UPDATE Will be deprecated soon

PRODUCT_PRICES_UPDATE Will be deprecated

 

Creating a Product (PRODUCT_CREATE)

For PRODUCT_CREATE, item_content follows our Product Schema. Please refer to the document to learn how to generate the product instance data.

Sample code for item_list:

 

[{
  "item_content_id": "A00000000Y1",
  "item_content": {
    "category_id":200000346,
    "title_multi_language_list":[{"locale":"es_ES","title":"test"}],
    "description_multi_language_list":[{"locale":"es_ES","module_list":[{"type":"html","html":{"content":"test"}}]}],
    "locale":"es_ES",
    "product_units_type":"100000000",
    "image_url_list":["https://ae01.alicdn.com/kf/HTB1TZJRVkvoK1RjSZFwq6AiCFXa0.jpg_350x350.jpg"],
    "category_attributes":{
      "Brand Name":{"value":"200010868"},
      "Material":{"value":["47","49"]},
      "Clothing Length":{"value":"1876"}},
    "sku_info_list":[{
      "sku_code":"234",
      "inventory":234,
      "price":23,
      "discount_price":12,
      "sku_attributes":{       
        "Size":{"value":"200000989"},
        "Color":{"alias":"32","sku_image_url":"https://ae01.alicdn.com/kf/HTB1TZJRVkvoK1RjSZFwq6AiCFXa0.jpg_350x350.jpg","value":"771"}}}],
    "inventory_deduction_strategy":"place_order_withhold",
    "package_weight":234,
    "package_length":234,
    "package_height":234,
    "package_width":234,
    "shipping_preparation_time":3,
    "shipping_template_id":"1000",
    "service_template_id":"0"}
},
  {  
    "item_content_id": "A00000000Y2",  
    "item_content": {
    "category_id":200000347,
    "title_multi_language_list":[{"locale":"es_ES","title":"test"}],
    "description_multi_language_list":[{"locale":"es_ES","module_list":[{"type":"html","html":{"content":"test"}}]}],
    "locale":"es_ES",
    "product_units_type":"100000000",
    "image_url_list":["https://ae01.alicdn.com/kf/HTB1TZJRVkvoK1RjSZFwq6AiCFXa0.jpg_350x350.jpg"],
    "category_attributes":{
      "Brand Name":{"value":"200010868"},
      "Material":{"value":["47","49"]},
      "Clothing Length":{"value":"1876"}},
    "sku_info_list":[{
      "sku_code":"234",
      "inventory":234,
      "price":23,
      "discount_price":12,
      "sku_attributes":{       
        "Size":{"value":"200000989"},
        "Color":{"alias":"32","sku_image_url":"https://ae01.alicdn.com/kf/HTB1TZJRVkvoK1RjSZFwq6AiCFXa0.jpg_350x350.jpg","value":"771"}}}],
    "inventory_deduction_strategy":"place_order_withhold",
    "package_weight":234,
    "package_length":234,
    "package_height":234,
    "package_width":234,
    "shipping_preparation_time":3,
    "shipping_template_id":"1000",
    "service_template_id":"0"}
  }
]

Edit Product (PRODUCT_FULL_UPDATE)

Regarding PRODUCT_FULL_UPDATE, the format is similar with PRODUCT_CREATE, following Product schema.

One extra field "aliexpress_product_id" needs to be filled in to indicate which product you want to update.

Note:

  • Please fill in all the fields in schema when you update
  • It is mandatory to indicate different aliexpress_product_id in each item_content in the feed request, otherwise the execution result for the feed would be unpredictable.


For more info, please refer to the document to learn how to compose the product data.
Sample code for item_list:

[

  {
    "item_content_id": "A00000000Y1",
    "item_content": {
      "aliexpress_product_id": 10000000338448,
      "category_id": 200000346,
      "title_multi_language_list": [
        {
          "locale": "es_ES",
          "title": "test"
        }
      ],
      "description_multi_language_list": [
        {
          "locale": "es_ES",
          "module_list": [
            {
              "type": "html",
              "html": {
                "content": "test"
              }
            }
          ]
        }
      ],
      "locale": "es_ES",
      "product_units_type": "100000000",
      "image_url_list": [
        "https://ae01.alicdn.com/kf/HTB1TZJRVkvoK1RjSZFwq6AiCFXa0.jpg_350x350.jpg"
      ],
      "category_attributes": {
        "Brand Name": {
          "value": "200010868"
        },
        "Material": {
          "value": [
            "47",
            "49"
          ]
        },
        "Clothing Length": {
          "value": "1876"
        }
      },
      "sku_info_list": [
        {
          "sku_code": "234",
          "inventory": 234,
          "price": 23,
          "discount_price": 12,
          "sku_attributes": {
            "Size": {
              "value": "200000989"
            },
            "Color": {
              "alias": "32",
              "sku_image_url": "https://ae01.alicdn.com/kf/HTB1TZJRVkvoK1RjSZFwq6AiCFXa0.jpg_350x350.jpg",
              "value": "771"
            }
          }
        }
      ],
      "inventory_deduction_strategy": "place_order_withhold",
      "package_weight": 234,
      "package_length": 234,
      "package_height": 234,
      "package_width": 234,
      "shipping_preparation_time": 3,
      "shipping_template_id": "1000",
      "service_template_id": "0"
    }
  }
]

 

Update Inventory / Price(PRODUCT_STOCKS_UPDATE/PRODUCT_PRICES_UPDATE)

Both updating inventory and price follow the similar data format.

Note:

  • It is mandatory to indicate different aliexpress_product_id in each item_content in the feed request for PRODUCT_STOCKS_UPDATE/PRODUCT_PRICES_UPDATE, otherwise the price/stock updating result for the feed would be unpredictable. If you have multiple variations for the same product which needs to be updated, please merge them into one item_content.

Sample code 1 (Update inventory: PRODUCT_STOCKS_UPDATE)

[
  {
    "item_content_id": "A00000000Y1",
    "item_content": {
      "aliexpress_product_id": 33046841283,
      "multiple_sku_update_list": [
        {
          "sku_code": "123abc",
          "inventory": 111
        },
        {
          "sku_code": "456abc",
          "inventory": 222
        }
      ]
    }
  },
  {
    "item_content_id": "A00000000Y2",
    "item_content": {
      "aliexpress_product_id": 4000046982046,
      "multiple_sku_update_list": [
        {
          "sku_code": "789abc",
          "inventory": 111
        },
        {
          "sku_code": "789xyz",
          "inventory": 222
        }
      ]
    }
  }
]

Sample code 2 (Update price: PRODUCT_PRICES_UPDATE)

[
  {
    "item_content_id": "A00000000Y1",
    "item_content": {
      "aliexpress_product_id": 33046841283,
      "multiple_sku_update_list": [
        {
          "sku_code": "123abc",
          "price": 29.99,
          "discount_price": 19.99
        },
        {
          "sku_code": "456abc",
          "price": 39.99
        }
      ]
    }
  },
  {
    "item_content_id": "A00000000Y2",
    "item_content": {
      "aliexpress_product_id": 4000046982046,
      "multiple_sku_update_list": [
        {
          "sku_code": "789abc",
          "price": 19.99
        },
        {
          "sku_code": "789xyz",
          "price": 49.99,
          "discount_price": 39.99
        }
      ]
    }
  }
]


Sample code 3 (Update price with multi-country price configuration: PRODUCT_PRICES_UPDATE)

[
  {
    "item_content_id": "A00000000Y1",
    "item_content": {
      "aliexpress_product_id": 33046841283,
      "multiple_sku_update_list": [
        {
          "sku_code": "123abc",
          "price": 29.99,
          "discount_price": 19.99
        },
        {
          "sku_code": "456abc",
          "price": 39.99
        }
      ],
      "multi_country_price_configuration": {
"price_type": "absolute",
"country_price_list": [
{
"ship_to_country": "ES",
"sku_price_by_country_list": [
{
"sku_code": "123abc",
"price": 27.77,
"discount_price": 20.22
},
{
"sku_code": "456abc",
"price": 41
}
]
}
]
}
} }, { "item_content_id": "A00000000Y2", "item_content": { "aliexpress_product_id": 4000046982046, "multiple_sku_update_list": [ { "sku_code": "789abc", "price": 19.99 }, { "sku_code": "789xyz", "price": 49.99, "discount_price": 39.99 } ],
"multi_country_price_configuration": {
"price_type": "absolute",
"country_price_list": [
{
"ship_to_country": "ES",
"sku_price_by_country_list": [
{
"sku_code": "789abc",
"price": 22,
"discount_price": 21.49
}
]
}
]
}
} } ]

 

 

Step 2: Query the executation result of feed

aliexpress.solution.feed.query

 

Request Sample

Job Id:200000000474663248

 

Response Sample(Still Process)

{ "aliexpress_solution_feed_query_response": { "request_id": "1493apso5qawx" } }

 

Response Sample (Finished)

 

{
  "aliexpress_solution_feed_query_response": {
    "job_id": 200000000474663248,
    "result_list": {
      "single_item_response_dto": [
        {
          "item_content_id": "A1",
          "item_execution_result": "{\"productId\":33046841283,\"skuCode\":\"8682164384312\",\"success\":true,\"traceId\":\"0bb6385615621338445012861d07a5\"}"
        }
      ]
    },
    "success_item_count": 1,
    "total_item_count": 1,
    "request_id": "ql9ymkrwjzqj"
  }
}

 

Note:

  • The job is done only when you receive response that contains job_id, result_list, success_item_count, total_item_count. If your response doesn't have any of those, you will need to wait until the job is finished and query for the feed solution again. Depends on the feed solution you submit, it may take minutes.
  • For each seller, the recommended number of feeds submitted for each operation_type every 24 hours should be less than 150, otherwise significant delay might be encountered for processing the feed.

FAQ

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