TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
PcInvoiceApplyRequest req = new PcInvoiceApplyRequest();
PcInvoiceApplyRequest.ApplyInvoiceReq obj1 = new PcInvoiceApplyRequest.ApplyInvoiceReq();
obj1.setOuterBizNo("1000001");
obj1.setSubBizOrderIdList(""1000001","1000002"");
obj1.setRemark("发票备注信息");
obj1.setBuyerId(10000001L);
obj1.setClientId("10000001");
req.setReq(obj1);
PcInvoiceApplyResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
PcInvoiceApplyRequest req = new PcInvoiceApplyRequest();
PcInvoiceApplyRequest.ApplyInvoiceReqDomain obj1 = new PcInvoiceApplyRequest.ApplyInvoiceReqDomain();
obj1.OuterBizNo = "1000001";
obj1.SubBizOrderIdList = ""1000001","1000002"";
obj1.Remark = "发票备注信息";
obj1.BuyerId = 10000001L;
obj1.ClientId = "10000001";
req.Req_ = obj1;
PcInvoiceApplyResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new PcInvoiceApplyRequest;
$req = new ApplyInvoiceReq;
$req->outer_biz_no="1000001";
$req->sub_biz_order_id_list="[\"1000001\",\"1000002\"]";
$req->remark="发票备注信息";
$req->buyer_id="10000001";
$req->client_id="10000001";
$req->setReq(json_encode($req));
$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=taobao.pc.invoice.apply' \
-d 'partner_id=apidoc' \
-d 'sign=44D6909A29069B53067E4D83C5639540' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-08-24+04%3A24%3A08' \
-d 'v=2.0' \
-d 'req=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.PcInvoiceApplyRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.req=""
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,"taobao.pc.invoice.apply");
add_param(pRequest,"req","数据结构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('taobao.pc.invoice.apply', {
'req':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})