文档中心 > API类目 > 信息平台-采购

alibaba.pur.basket.merge (合并购物车)

采购商城接入第三方商家合并购物车接口服务

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param_mall_merge_cart_request_d_t_o MallMergeCartRequestDto 可选 合并购物车入参
  • └ app_code
  • String
  • 必须
  • xxx
  • 外部平台标识
  • items
  • MallItemDto []
  • 可选
  • 合并的商品行
  • └ contract_code
  • String
  • 可选
  • T501234
  • 合同单号
  • └ currency_code
  • String
  • 必须
  • CNY
  • 币种
  • └ img_url
  • String
  • 可选
  • https://baidu.com
  • 商品预览图
  • └ item_description
  • String
  • 可选
  • 123
  • 商品描述
  • └ item_id
  • String
  • 必须
  • 123
  • 商品id
  • └ item_name
  • String
  • 必须
  • 商品名称
  • 商品名称
  • └ mall_category_id
  • String
  • 必须
  • 123
  • 外部品类id
  • └ quantity
  • Number
  • 必须
  • 1
  • 数量
  • └ sku_id
  • String
  • 必须
  • 1234
  • skuid
  • └ sub_pur_req_id
  • String
  • 必须
  • 123
  • 外部订单行id
  • └ supplier_id
  • String
  • 必须
  • 123
  • 供应商id
  • └ tax_rate
  • String
  • 必须
  • 12
  • 税率
  • └ unit_price
  • String
  • 必须
  • 123
  • 单价
  • └ uom
  • String
  • 必须
  • 计价单位
  • └ item_url
  • String
  • 必须
  • https://
  • 产品详情链接
  • └ order_id
  • String
  • 必须
  • 123456
  • 外部订单标识
  • └ user_id
  • String
  • 必须
  • dhasha1esd2
  • 用户加密id

响应参数

名称 类型 示例值 描述
result ActionResult 获取url的出参
  • └ success
  • Boolean
  • true
  • 系统自动生成
  • └ error_code
  • String
  • 系统自动生成
  • └ error_msg
  • String
  • 系统自动生成
  • └ redirect_url
  • String
  • 合并成功后跳转链接
  • https://

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaPurBasketMergeRequest req = new AlibabaPurBasketMergeRequest();
AlibabaPurBasketMergeRequest.MallMergeCartRequestDto obj1 = new AlibabaPurBasketMergeRequest.MallMergeCartRequestDto();
obj1.setAppCode("xxx");
List<AlibabaPurBasketMergeRequest.MallItemDto> list3 = new ArrayList<AlibabaPurBasketMergeRequest.MallItemDto>();
AlibabaPurBasketMergeRequest.MallItemDto obj4 = new AlibabaPurBasketMergeRequest.MallItemDto();
list3.add(obj4);
obj4.setContractCode("T501234");
obj4.setCurrencyCode("CNY");
obj4.setImgUrl("https://baidu.com");
obj4.setItemDescription("123");
obj4.setItemId("123");
obj4.setItemName("商品名称");
obj4.setMallCategoryId("123");
obj4.setQuantity(1L);
obj4.setSkuId("1234");
obj4.setSubPurReqId("123");
obj4.setSupplierId("123");
obj4.setTaxRate("12");
obj4.setUnitPrice("123");
obj4.setUom("个");
obj4.setItemUrl("https://");
obj1.setItems(list3);
obj1.setOrderId("123456");
obj1.setUserId("dhasha1esd2");
req.setParamMallMergeCartRequestDTO(obj1);
AlibabaPurBasketMergeResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_pur_basket_merge_response>
    <result>
        <success>true</success>
        <error_code></error_code>
        <error_msg></error_msg>
        <redirect_url>合并成功后跳转链接</redirect_url>
    </result>
</alibaba_pur_basket_merge_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

返回
顶部