文档中心 > API类目 > 五道口API

alibaba.xsd.batch.multi.sku.add (一品多规子品批量新增接口)

一品多规子品批量新增接口

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param_list MultiSkuDTO [] 必须
  • 最大列表长度:20
  • 多规sku
    • └ item_code
    • String
    • 必须
    • 123
    • itemCode
    • └ sku_code
    • String
    • 必须
    • 123456
    • sku编码
    • └ barcodes
    • String []
    • 必须
    • ["123","456"]
    • 条码
    • cat_props
    • CatPropDTO []
    • 必须
    • [{"valueId":28338,"valueText":"蓝色","propertyText":"颜色分类","propertyId":1627207},{"valueId":28383,"valueText":"均码","propertyText":"尺码","propertyId":20509}]
    • 类目属性
    • └ property_id
    • Number
    • 必须
    • 123
    • 属性项id
    • └ property_text
    • String
    • 必须
    • 颜色分类
    • 属性项名称
    • └ value_id
    • Number
    • 必须
    • 1234
    • 属性值id
    • └ value_text
    • String
    • 必须
    • 白色
    • 属性值名称
    • └ prop_value_url
    • String
    • 可选
    • https://alicdn.xxx
    • 属性值图片
    • └ weight
    • Number
    • 必须
    • 100
    • 重量(单位g)
    • └ sale_unit
    • String
    • 必须
    • 销售单位
    • └ sale_spec
    • String
    • 必须
    • 1g/个
    • 销售规格描述
    • └ inventory_unit
    • String
    • 必须
    • 库存单位
    • └ pre_minus_weight
    • String
    • 必须
    • 1
    • 预扣款重量
    • └ content
    • String
    • 必须
    • 55g
    • 净含量
    • └ period
    • Number
    • 必须
    • 365
    • 保质期天数
    • └ import_flag
    • Number
    • 必须
    • 1
    • 是否进口 1:是 0:否
    • └ producer_place
    • String
    • 必须
    • 中国|浙江省|杭州市
    • 产地,不传则默认:见产品外包装
    • └ delivery_condition
    • String
    • 必须
    • 常温
    • 配送条件:常温、冷藏、冷冻
    • └ fragile
    • Number
    • 必须
    • 1
    • 是否易碎 1:是 0:否
    • └ purchase_quantity
    • Number
    • 必须
    • 1
    • 起购数量
    • └ step_quantity
    • Number
    • 必须
    • 1
    • 步长
    • └ length
    • String
    • 必须
    • 0.5
    • 长度(深) cm
    • └ width
    • String
    • 必须
    • 0.5
    • 宽度(宽)cm
    • └ height
    • String
    • 必须
    • 0.8
    • 高度(高)cm

    响应参数

    名称 类型 示例值 描述
    result ApiResults 调用结果
    • models
    • ApiResult []
    • 返回列表
    • └ success
    • Boolean
    • true
    • 是否成功
    • └ err_msg
    • String
    • skuCode不能为空
    • 错误描述
    • └ err_code
    • String
    • illegal_param
    • 错误码
    • └ model
    • String
    • 1234
    • sku编码
    • └ success
    • Boolean
    • true
    • 接口调用结果
    • └ err_code
    • String
    • systemError
    • 接口调用错误码
    • └ err_msg
    • String
    • 系统错误
    • 接口调用错误描述

    请求示例

    • JAVA
    • .NET
    • PHP
    • CURL
    • Python
    • C/C++
    • NodeJS
    TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
    AlibabaXsdBatchMultiSkuAddRequest req = new AlibabaXsdBatchMultiSkuAddRequest();
    List<AlibabaXsdBatchMultiSkuAddRequest.MultiSkuDTO> list2 = new ArrayList<AlibabaXsdBatchMultiSkuAddRequest.MultiSkuDTO>();
    AlibabaXsdBatchMultiSkuAddRequest.MultiSkuDTO obj3 = new AlibabaXsdBatchMultiSkuAddRequest.MultiSkuDTO();
    list2.add(obj3);
    obj3.setItemCode("123");
    obj3.setSkuCode("123456");
    obj3.setBarcodes(""123","456"");
    List<AlibabaXsdBatchMultiSkuAddRequest.CatPropDTO> list6 = new ArrayList<AlibabaXsdBatchMultiSkuAddRequest.CatPropDTO>();
    AlibabaXsdBatchMultiSkuAddRequest.CatPropDTO obj7 = new AlibabaXsdBatchMultiSkuAddRequest.CatPropDTO();
    list6.add(obj7);
    obj7.setPropertyId(123L);
    obj7.setPropertyText("颜色分类");
    obj7.setValueId(1234L);
    obj7.setValueText("白色");
    obj7.setPropValueUrl("https://alicdn.xxx");
    list4.setCatProps(list6);
    obj3.setWeight(100L);
    obj3.setSaleUnit("个");
    obj3.setSaleSpec("1g/个");
    obj3.setInventoryUnit("个");
    obj3.setPreMinusWeight("1");
    obj3.setContent("55g");
    obj3.setPeriod(365L);
    obj3.setImportFlag(1L);
    obj3.setProducerPlace("中国|浙江省|杭州市");
    obj3.setDeliveryCondition("常温");
    obj3.setFragile(1L);
    obj3.setPurchaseQuantity(1L);
    obj3.setStepQuantity(1L);
    obj3.setLength("0.5");
    obj3.setWidth("0.5");
    obj3.setHeight("0.8");
    req.setParamList(list2);
    AlibabaXsdBatchMultiSkuAddResponse rsp = client.execute(req, sessionKey);
    System.out.println(rsp.getBody());

    响应示例

    • XML示例
    • JSON示例
    <alibaba_xsd_batch_multi_sku_add_response>
        <result>
            <models>
                <api_result>
                    <success>true</success>
                    <err_msg>skuCode不能为空</err_msg>
                    <err_code>illegal_param</err_code>
                    <model>1234</model>
                </api_result>
            </models>
            <success>true</success>
            <err_code>systemError</err_code>
            <err_msg>系统错误</err_msg>
        </result>
    </alibaba_xsd_batch_multi_sku_add_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

    返回
    顶部