TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaIhomeCtomSuborderCustomSaveRequest req = new AlibabaIhomeCtomSuborderCustomSaveRequest();
AlibabaIhomeCtomSuborderCustomSaveRequest.CreateCustomSubOrderRequest obj1 = new AlibabaIhomeCtomSuborderCustomSaveRequest.CreateCustomSubOrderRequest();
obj1.setProjectId("1");
obj1.setSvjSubOrderId("1");
obj1.setSubCaseId("1");
obj1.setCaseId("1");
obj1.setItemId("10001");
obj1.setItemPrice(100L);
obj1.setItemPic("https://xx.jpg");
obj1.setSubCaseUrl("https://xx.jpg");
obj1.setTitle("测试商品");
obj1.setMarkUrls("[\"http://xxx\"]");
obj1.setMainOrderId(1L);
obj1.setCaseProductTypeName("1");
obj1.setCaseProductTypeOutId("1");
obj1.setMaterialStructureUrl("1");
obj1.setCaseProductOutId("1");
obj1.setCaseProductName("1");
req.setParam(obj1);
AlibabaIhomeCtomSuborderCustomSaveResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaIhomeCtomSuborderCustomSaveRequest req = new AlibabaIhomeCtomSuborderCustomSaveRequest();
AlibabaIhomeCtomSuborderCustomSaveRequest.CreateCustomSubOrderRequestDomain obj1 = new AlibabaIhomeCtomSuborderCustomSaveRequest.CreateCustomSubOrderRequestDomain();
obj1.ProjectId = "1";
obj1.SvjSubOrderId = "1";
obj1.SubCaseId = "1";
obj1.CaseId = "1";
obj1.ItemId = "10001";
obj1.ItemPrice = 100L;
obj1.ItemPic = "https://xx.jpg";
obj1.SubCaseUrl = "https://xx.jpg";
obj1.Title = "测试商品";
obj1.MarkUrls = "[\"http://xxx\"]";
obj1.MainOrderId = 1L;
obj1.CaseProductTypeName = "1";
obj1.CaseProductTypeOutId = "1";
obj1.MaterialStructureUrl = "1";
obj1.CaseProductOutId = "1";
obj1.CaseProductName = "1";
req.Param_ = obj1;
AlibabaIhomeCtomSuborderCustomSaveResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaIhomeCtomSuborderCustomSaveRequest;
$param = new CreateCustomSubOrderRequest;
$param->project_id="1";
$param->svj_sub_order_id="1";
$param->sub_case_id="1";
$param->case_id="1";
$param->item_id="10001";
$param->item_price="100";
$param->item_pic="https://xx.jpg";
$param->sub_case_url="https://xx.jpg";
$param->title="测试商品";
$param->mark_urls="[\"http://xxx\"]";
$param->main_order_id="1";
$param->case_product_type_name="1";
$param->case_product_type_out_id="1";
$param->material_structure_url="1";
$param->case_product_out_id="1";
$param->case_product_name="1";
$req->setParam(json_encode($param));
$resp = $c->execute($req);
curl -X POST 'http://gw.api.taobao.com/router/rest' \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'app_key=12129701' \
-d 'format=json' \
-d 'method=alibaba.ihome.ctom.suborder.custom.save' \
-d 'partner_id=apidoc' \
-d 'sign=935492604D316F33FB40E3EDEB303BA9' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-06-20+16%3A04%3A41' \
-d 'v=2.0' \
-d 'param=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaIhomeCtomSuborderCustomSaveRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param=""
try:
resp= req.getResponse()
print(resp)
except Exception,e:
print(e)
pTopRequest pRequest = alloc_top_request();
pTopResponse pResponse = NULL;
pTaobaoClient pClient = alloc_taobao_client(url, appkey, appsecret);
set_api_name(pRequest,"alibaba.ihome.ctom.suborder.custom.save");
add_param(pRequest,"param","数据结构JSON示例");
pResponse = top_execute(pClient,pRequest,NULL);
printf("ret code:%d\n",pResponse->code);
if(pResponse->code == 0){
pTopResponseIterator ite = init_response_iterator(pResponse);
pResultItem pResultItem = alloc_result_item();
while(parseNext(ite, pResultItem) == 0){
printf("%s:%s\n",pResultItem->key,pResultItem->value);
}
destroy_response_iterator(ite);
destroy_result_item(pResultItem);
}
destroy_top_request(pRequest);
destroy_top_response(pResponse);
destroy_taobao_client(pClient);
TopClient = require('./topClient').TopClient;
var client = new TopClient({
'appkey': 'appkey',
'appsecret': 'secret',
'REST_URL': 'http://gw.api.taobao.com/router/rest'
});
client.execute('alibaba.ihome.ctom.suborder.custom.save', {
'param':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})