企业购订单创建
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 |
---|---|---|---|---|---|
param | ContractPlaceOrderReq | 可选 | 渲染/创建订单接口参数 | ||
|
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
result | Result | result | |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret); PcOutTowerOrderCreateRequest req = new PcOutTowerOrderCreateRequest(); PcOutTowerOrderCreateRequest.ContractPlaceOrderReq obj1 = new PcOutTowerOrderCreateRequest.ContractPlaceOrderReq(); obj1.setBuyerNick( "张三" ); obj1.setOutOrderId( "10000001" ); obj1.setContractNo( "10000001" ); List<PcOutTowerOrderCreateRequest.ContractOrder> list3 = new ArrayList<PcOutTowerOrderCreateRequest.ContractOrder>(); PcOutTowerOrderCreateRequest.ContractOrder obj4 = new PcOutTowerOrderCreateRequest.ContractOrder(); list3.add(obj4); List<PcOutTowerOrderCreateRequest.ContractItem> list7 = new ArrayList<PcOutTowerOrderCreateRequest.ContractItem>(); PcOutTowerOrderCreateRequest.ContractItem obj8 = new PcOutTowerOrderCreateRequest.ContractItem(); list7.add(obj8); obj8.setItemId(3L); obj8.setSkuId(3L); obj8.setQuantity(10L); obj8.setUnitPrice(3L); list5.setItems(list7); PcOutTowerOrderCreateRequest.ContractAddress obj10 = new PcOutTowerOrderCreateRequest.ContractAddress(); obj10.setAddressDetail( "xxxxx" ); obj10.setConsigneeName( "xxxxx" ); obj10.setMobilePhone( "xxxxx" ); list9.setAddress(obj10); obj4.setRemark( "买家备注" ); obj4.setSocialCreditCode( "社会信用编码" ); obj1.setOrders(list3); obj1.setBuyerId(10000001L); req.setParam(obj1); PcOutTowerOrderCreateResponse rsp = client.execute(req); System.out.println(rsp.getBody()); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | < pc_out_tower_order_create_response > < result > < success >true</ success > < error_code >200</ error_code > < error_msg >参数错误</ error_msg > < contract_place_order > < contract_no >xxxxx</ contract_no > < out_order_id >xxxxx</ out_order_id > < biz_order_ids > < string >Top</ string > < string >Pub</ string > </ biz_order_ids > < order_items > < order_item > < item_id >3</ item_id > < sku_id >3</ sku_id > < buy_amount >10</ buy_amount > < item_price >3</ item_price > < can_buy >false</ can_buy > </ order_item > </ order_items > </ contract_place_order > </ result > </ pc_out_tower_order_create_response > |
1 2 3 4 5 6 | < error_response > < code >50</ code > < msg >Remote service error</ msg > < sub_code >isv.invalid-parameter</ sub_code > < sub_msg >非法参数</ sub_msg > </ error_response > |
错误码 | 错误描述 | 解决方案 |
---|