TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TmallNrItemItemCreateRequest req = new TmallNrItemItemCreateRequest();
TmallNrItemItemCreateRequest.ItemCreateDto obj1 = new TmallNrItemItemCreateRequest.ItemCreateDto();
obj1.setRefOnlineItemId(100L);
obj1.setBizCode("txp");
obj1.setNeedLogistics(100L);
TmallNrItemItemCreateRequest.StepPayDto obj2 = new TmallNrItemItemCreateRequest.StepPayDto();
obj2.setTemplateId("txp");
obj2.setAgreementPath("txp");
obj2.setGuidePicPath("txp");
obj2.setNeedFullPayment("txp");
obj2.setDetailList("{}");
obj2.setTemplateName("txp");
obj1.setStepPay(obj2);
obj1.setMediaUrls(""txp","txp"");
obj1.setRefBpuId(100L);
obj1.setSubTitle("txp");
obj1.setCategoryName("txp");
obj1.setStatusOpen(100L);
obj1.setSelfBrandName("txp");
obj1.setNameSpace("0");
obj1.setSelfCategoryId(100L);
obj1.setBarCode("txp");
obj1.setSaleNum30("txp");
TmallNrItemItemCreateRequest.VideoDto obj3 = new TmallNrItemItemCreateRequest.VideoDto();
obj3.setId(100L);
obj3.setBizCodes(""txp","txp"");
obj3.setDuaration("txp");
obj3.setState(100L);
obj3.setBizCode("txp");
obj3.setFileFormat("txp");
obj3.setThumbPic("txp");
obj3.setUrl("txp");
obj1.setVideo(obj3);
obj1.setPurchaseChannel("{}");
obj1.setStatus(100L);
obj1.setPurchaseChannelId("txp");
obj1.setCategoryId(100L);
obj1.setItemPrice(100L);
obj1.setPromotionPrice(100L);
obj1.setInventoryUnit("txp");
obj1.setSelfBrandId(100L);
obj1.setShortKey("txp");
obj1.setStoreId(100L);
obj1.setOuterId("txp");
obj1.setScItemId(100L);
obj1.setGmtModified(StringUtils.parseDateTime("2019-01-01 00:00:00"));
obj1.setSaleUnit("txp");
obj1.setRefOnlineSkuId(100L);
obj1.setIsStandardGood(100L);
obj1.setLocationId(100L);
obj1.setSaleSpec("txp");
obj1.setExtendMediaUrls(""txp","txp"");
obj1.setTitle("txp");
obj1.setBizCodes(""txp","txp"");
obj1.setSelfItemId(100L);
obj1.setOptions(100L);
obj1.setChannelStates("{}");
obj1.setChannelInventoryThreshold("txp");
obj1.setPicUrl("txp");
obj1.setGmtCreate(StringUtils.parseDateTime("2019-01-01 00:00:00"));
obj1.setSelfScItemId(100L);
obj1.setSelfStatus(100L);
obj1.setOrigin("txp");
obj1.setSkuList("{}");
obj1.setParentItemId(100L);
obj1.setRefOnlineCatName("txp");
obj1.setDetailDesc("txp");
obj1.setItemId(100L);
obj1.setIsGrant(100L);
obj1.setSelfParentItemId(100L);
obj1.setSaleUnitRate(100L);
obj1.setSelfCategoryName("txp");
obj1.setScItemName("txp");
obj1.setInventoryId(100L);
obj1.setRefOnlineCatId(100L);
obj1.setHasSku(true);
obj1.setAttributes("{}");
obj1.setRowStatus(100L);
req.setItemCreateDto(obj1);
TmallNrItemItemCreateRequest.ItemCreateOptions obj4 = new TmallNrItemItemCreateRequest.ItemCreateOptions();
obj4.setNeedGrand(true);
obj4.setChannelSwitches("{}");
obj4.setSyncStore(true);
obj4.setCreateScItem(true);
obj4.setIcOptions(new Long[] { 1,2 };
);
obj4.setNeedAudit(true);
obj4.setStoreIdList(new Long[] { 1,2 };
);
obj4.setSyncIC(true);
obj4.setSyncItemState(true);
obj4.setUseItemDo(true);
req.setOptions(obj4);
TmallNrItemItemCreateResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TmallNrItemItemCreateRequest req = new TmallNrItemItemCreateRequest();
TmallNrItemItemCreateRequest.ItemCreateDtoDomain obj1 = new TmallNrItemItemCreateRequest.ItemCreateDtoDomain();
obj1.RefOnlineItemId = 100L;
obj1.BizCode = "txp";
obj1.NeedLogistics = 100L;
TmallNrItemItemCreateRequest.StepPayDtoDomain obj2 = new TmallNrItemItemCreateRequest.StepPayDtoDomain();
obj2.TemplateId = "txp";
obj2.AgreementPath = "txp";
obj2.GuidePicPath = "txp";
obj2.NeedFullPayment = "txp";
obj2.DetailList = "{}";
obj2.TemplateName = "txp";
obj1.StepPay= obj2;
obj1.MediaUrls = ""txp","txp"";
obj1.RefBpuId = 100L;
obj1.SubTitle = "txp";
obj1.CategoryName = "txp";
obj1.StatusOpen = 100L;
obj1.SelfBrandName = "txp";
obj1.NameSpace = "0";
obj1.SelfCategoryId = 100L;
obj1.BarCode = "txp";
obj1.SaleNum30 = "txp";
TmallNrItemItemCreateRequest.VideoDtoDomain obj3 = new TmallNrItemItemCreateRequest.VideoDtoDomain();
obj3.Id = 100L;
obj3.BizCodes = ""txp","txp"";
obj3.Duaration = "txp";
obj3.State = 100L;
obj3.BizCode = "txp";
obj3.FileFormat = "txp";
obj3.ThumbPic = "txp";
obj3.Url = "txp";
obj1.Video= obj3;
obj1.PurchaseChannel = "{}";
obj1.Status = 100L;
obj1.PurchaseChannelId = "txp";
obj1.CategoryId = 100L;
obj1.ItemPrice = 100L;
obj1.PromotionPrice = 100L;
obj1.InventoryUnit = "txp";
obj1.SelfBrandId = 100L;
obj1.ShortKey = "txp";
obj1.StoreId = 100L;
obj1.OuterId = "txp";
obj1.ScItemId = 100L;
obj1.GmtModified = DateTime.Parse(2019-01-01 00:00:00");
obj1.SaleUnit = "txp";
obj1.RefOnlineSkuId = 100L;
obj1.IsStandardGood = 100L;
obj1.LocationId = 100L;
obj1.SaleSpec = "txp";
obj1.ExtendMediaUrls = ""txp","txp"";
obj1.Title = "txp";
obj1.BizCodes = ""txp","txp"";
obj1.SelfItemId = 100L;
obj1.Options = 100L;
obj1.ChannelStates = "{}";
obj1.ChannelInventoryThreshold = "txp";
obj1.PicUrl = "txp";
obj1.GmtCreate = DateTime.Parse(2019-01-01 00:00:00");
obj1.SelfScItemId = 100L;
obj1.SelfStatus = 100L;
obj1.Origin = "txp";
obj1.SkuList = "{}";
obj1.ParentItemId = 100L;
obj1.RefOnlineCatName = "txp";
obj1.DetailDesc = "txp";
obj1.ItemId = 100L;
obj1.IsGrant = 100L;
obj1.SelfParentItemId = 100L;
obj1.SaleUnitRate = 100L;
obj1.SelfCategoryName = "txp";
obj1.ScItemName = "txp";
obj1.InventoryId = 100L;
obj1.RefOnlineCatId = 100L;
obj1.HasSku = true;
obj1.Attributes = "{}";
obj1.RowStatus = 100L;
req.ItemCreateDto_ = obj1;
TmallNrItemItemCreateRequest.ItemCreateOptionsDomain obj4 = new TmallNrItemItemCreateRequest.ItemCreateOptionsDomain();
obj4.NeedGrand = true;
obj4.ChannelSwitches = "{}";
obj4.SyncStore = true;
obj4.CreateScItem = true;
obj4.IcOptions = new long[] { 1,2 };
;
obj4.NeedAudit = true;
obj4.StoreIdList = new long[] { 1,2 };
;
obj4.SyncIC = true;
obj4.SyncItemState = true;
obj4.UseItemDo = true;
req.Options_ = obj4;
TmallNrItemItemCreateResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TmallNrItemItemCreateRequest;
$item_create_dto = new ItemCreateDto;
$item_create_dto->ref_online_item_id="100";
$item_create_dto->biz_code="txp";
$item_create_dto->need_logistics="100";
$step_pay = new StepPayDto;
$step_pay->template_id="txp";
$step_pay->agreement_path="txp";
$step_pay->guide_pic_path="txp";
$step_pay->need_full_payment="txp";
$step_pay->detail_list="{}";
$step_pay->template_name="txp";
$item_create_dto->step_pay = $step_pay;
$item_create_dto->media_urls="[\"txp\",\"txp\"]";
$item_create_dto->ref_bpu_id="100";
$item_create_dto->sub_title="txp";
$item_create_dto->category_name="txp";
$item_create_dto->status_open="100";
$item_create_dto->self_brand_name="txp";
$item_create_dto->name_space="0";
$item_create_dto->self_category_id="100";
$item_create_dto->bar_code="txp";
$item_create_dto->sale_num30="txp";
$video = new VideoDto;
$video->id="100";
$video->biz_codes="[\"txp\",\"txp\"]";
$video->duaration="txp";
$video->state="100";
$video->biz_code="txp";
$video->file_format="txp";
$video->thumb_pic="txp";
$video->url="txp";
$item_create_dto->video = $video;
$item_create_dto->purchase_channel="{}";
$item_create_dto->status="100";
$item_create_dto->purchase_channel_id="txp";
$item_create_dto->category_id="100";
$item_create_dto->item_price="100";
$item_create_dto->promotion_price="100";
$item_create_dto->inventory_unit="txp";
$item_create_dto->self_brand_id="100";
$item_create_dto->short_key="txp";
$item_create_dto->store_id="100";
$item_create_dto->outer_id="txp";
$item_create_dto->sc_item_id="100";
$item_create_dto->gmt_modified="2019-01-01 00:00:00";
$item_create_dto->sale_unit="txp";
$item_create_dto->ref_online_sku_id="100";
$item_create_dto->is_standard_good="100";
$item_create_dto->location_id="100";
$item_create_dto->sale_spec="txp";
$item_create_dto->extend_media_urls="[\"txp\",\"txp\"]";
$item_create_dto->title="txp";
$item_create_dto->biz_codes="[\"txp\",\"txp\"]";
$item_create_dto->self_item_id="100";
$item_create_dto->options="100";
$item_create_dto->channel_states="{}";
$item_create_dto->channel_inventory_threshold="txp";
$item_create_dto->pic_url="txp";
$item_create_dto->gmt_create="2019-01-01 00:00:00";
$item_create_dto->self_sc_item_id="100";
$item_create_dto->self_status="100";
$item_create_dto->origin="txp";
$item_create_dto->sku_list="{}";
$item_create_dto->parent_item_id="100";
$item_create_dto->ref_online_cat_name="txp";
$item_create_dto->detail_desc="txp";
$item_create_dto->item_id="100";
$item_create_dto->is_grant="100";
$item_create_dto->self_parent_item_id="100";
$item_create_dto->sale_unit_rate="100";
$item_create_dto->self_category_name="txp";
$item_create_dto->sc_item_name="txp";
$item_create_dto->inventory_id="100";
$item_create_dto->ref_online_cat_id="100";
$item_create_dto->has_sku="true";
$item_create_dto->attributes="{}";
$item_create_dto->row_status="100";
$req->setItemCreateDto(json_encode($item_create_dto));
$options = new ItemCreateOptions;
$options->need_grand="true";
$options->channel_switches="{}";
$options->sync_store="true";
$options->create_sc_item="true";
$options->ic_options="[1,2]";
$options->need_audit="true";
$options->store_id_list="[1,2]";
$options->sync_i_c="true";
$options->sync_item_state="true";
$options->use_item_do="true";
$req->setOptions(json_encode($options));
$resp = $c->execute($req, $sessionKey);
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=tmall.nr.item.item.create' \
-d 'partner_id=apidoc' \
-d 'session=c45fac26-cc71-4b51-890e-abf5175d46f4' \
-d 'sign=9FC936F2F6F29B3FD9E9A845C6D03CAB' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-15+14%3A23%3A54' \
-d 'v=2.0' \
-d 'item_create_dto=null' \
-d 'options=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TmallNrItemItemCreateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.item_create_dto=""
req.options=""
try:
resp= req.getResponse(sessionkey)
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,"tmall.nr.item.item.create");
add_param(pRequest,"item_create_dto","数据结构JSON示例");
add_param(pRequest,"options","数据结构JSON示例");
pResponse = top_execute(pClient,pRequest,sessionKey);
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('tmall.nr.item.item.create', {
'item_create_dto':'数据结构JSON示例',
'options':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})