注意:以下文档只适用于TOP接口,请谨慎使用!

文档中心 > API类目 > AE-Oversea-Solution

aliexpress.solution.batch.product.inventory.update (aliexpress.solution.batch.product.inventory.update)

batch product inventory update API for oversea sellers. Sellers could update multiple skus among multiple products in a single call. Maximum 20 products could be updated at the same time and maximum 200 skus could be updated within one product.

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
mutiple_product_update_list SynchronizeProductRequestDto [] 必须
  • 最大列表长度:20
  • The product list, in which the inventory needs to be updated. Maximum 20 products.
    • └ product_id
    • Number
    • 必须
    • 1000005237852
    • product id
    • multiple_sku_update_list
    • SynchronizeSkuRequestDto []
    • 必须
    • The sku list, in which the inventory needs to be updated within the same product id. Maximum 200 skus.
    • └ sku_code
    • String
    • 必须
    • 123abc
    • sku code
    • └ inventory
    • Number
    • 必须
    • 99
    • inventory

    响应参数

    名称 类型 示例值 描述
    update_error_code String When success equals false, indicating the error code
    update_error_message String When success equals false, indicating the error message
    update_success Boolean Indicates the update result is successful or not. Only all the products in mutiple_product_update_list have been updated successfully will make the success to be true, otherwise false.
    update_failed_list SynchronizeProductResponseDto [] update failed list
    • └ error_code
    • String
    • error code
    • └ error_message
    • String
    • error message
    • └ product_id
    • Number
    • product id
    update_successful_list SynchronizeProductResponseDto [] update succesful list
    • └ product_id
    • Number
    • product id

    请求示例

    • JAVA
    • .NET
    • PHP
    • CURL
    • Python
    • C/C++
    • NodeJS
    TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
    AliexpressSolutionBatchProductInventoryUpdateRequest req = new AliexpressSolutionBatchProductInventoryUpdateRequest();
    List<AliexpressSolutionBatchProductInventoryUpdateRequest.SynchronizeProductRequestDto> list2 = new ArrayList<AliexpressSolutionBatchProductInventoryUpdateRequest.SynchronizeProductRequestDto>();
    AliexpressSolutionBatchProductInventoryUpdateRequest.SynchronizeProductRequestDto obj3 = new AliexpressSolutionBatchProductInventoryUpdateRequest.SynchronizeProductRequestDto();
    list2.add(obj3);
    obj3.setProductId(1000005237852L);
    List<AliexpressSolutionBatchProductInventoryUpdateRequest.SynchronizeSkuRequestDto> list6 = new ArrayList<AliexpressSolutionBatchProductInventoryUpdateRequest.SynchronizeSkuRequestDto>();
    AliexpressSolutionBatchProductInventoryUpdateRequest.SynchronizeSkuRequestDto obj7 = new AliexpressSolutionBatchProductInventoryUpdateRequest.SynchronizeSkuRequestDto();
    list6.add(obj7);
    obj7.setSkuCode("123abc");
    obj7.setInventory(99L);
    list4.setMultipleSkuUpdateList(list6);
    req.setMutipleProductUpdateList(list2);
    AliexpressSolutionBatchProductInventoryUpdateResponse rsp = client.execute(req, sessionKey);
    System.out.println(rsp.getBody());

    响应示例

    • XML示例
    • JSON示例
    <aliexpress_solution_batch_product_inventory_update_response>
        <update_error_code></update_error_code>
        <update_error_message></update_error_message>
        <update_success></update_success>
        <update_failed_list>
            <synchronize_product_response_dto>
                <error_code></error_code>
                <error_message></error_message>
                <product_id></product_id>
            </synchronize_product_response_dto>
        </update_failed_list>
        <update_successful_list>
            <synchronize_product_response_dto>
                <product_id></product_id>
            </synchronize_product_response_dto>
        </update_successful_list>
    </aliexpress_solution_batch_product_inventory_update_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

    返回
    顶部