文档中心 > API类目 > 淘宝服饰

taobao.cloth.count.create (淘宝服饰平台仓盘点单创建)

淘宝服饰平台仓盘点单创建

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
req CountMainOrderTopDTO 可选 请求体
  • └ count_order_type
  • String
  • 可选
  • SURPLUS
  • 盘点单类型:盘盈SURPLUS/盘亏SHORTAGE
  • └ idempotent_id
  • String
  • 可选
  • 1
  • 操作幂等ID
  • sub_orders
  • CountSubOrderTopDTO []
  • 可选
  • subOrders
  • 子单列表
  • └ count_quantity
  • Number
  • 可选
  • 2
  • 盘点变化数量
  • └ goods_id
  • Number
  • 可选
  • 1
  • 货品id
  • └ count_full_quantity_after
  • Number
  • 可选
  • 10
  • 盘点后全量数量
  • └ remark
  • String
  • 可选
  • 盘盈2件
  • 备注
  • └ owner_id
  • String
  • 可选
  • 2
  • 货主id
  • └ count_inv_type
  • String
  • 可选
  • DEFECTIVE
  • 盘点库存类型: SPOT正品DEFECTIVE残品
  • └ count_full_quantity_before
  • Number
  • 可选
  • 8
  • 盘点前全量数量
  • └ warehouse_code
  • String
  • 可选
  • F88_GZ001_TEST
  • 仓库编码

响应参数

名称 类型 示例值 描述
result TResult 返回体
  • └ data
  • String
  • CN202501170001
  • 盘点单单号
  • └ success
  • Boolean
  • true
  • 调用是否成功
  • └ error_message
  • String
  • 授权异常
  • 错误信息
  • └ error_code
  • String
  • 401
  • 错误码

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
ClothCountCreateRequest req = new ClothCountCreateRequest();
ClothCountCreateRequest.CountMainOrderTopDTO obj1 = new ClothCountCreateRequest.CountMainOrderTopDTO();
obj1.setCountOrderType("SURPLUS");
obj1.setIdempotentId("1");
List<ClothCountCreateRequest.CountSubOrderTopDTO> list3 = new ArrayList<ClothCountCreateRequest.CountSubOrderTopDTO>();
ClothCountCreateRequest.CountSubOrderTopDTO obj4 = new ClothCountCreateRequest.CountSubOrderTopDTO();
list3.add(obj4);
obj4.setCountQuantity(2L);
obj4.setGoodsId(1L);
obj4.setCountFullQuantityAfter(10L);
obj4.setRemark("盘盈2件");
obj4.setOwnerId("2");
obj4.setCountInvType("DEFECTIVE");
obj4.setCountFullQuantityBefore(8L);
obj1.setSubOrders(list3);
obj1.setWarehouseCode("F88_GZ001_TEST");
req.setReq(obj1);
ClothCountCreateResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<cloth_count_create_response>
    <result>
        <data>CN202501170001</data>
        <success>true</success>
        <error_message>授权异常</error_message>
        <error_code>401</error_code>
    </result>
</cloth_count_create_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

返回
顶部