TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaCsrDonateInvoiceQuerytoblockchainossRequest req = new AlibabaCsrDonateInvoiceQuerytoblockchainossRequest();
AlibabaCsrDonateInvoiceQuerytoblockchainossRequest.AccountCheckQuery obj1 = new AlibabaCsrDonateInvoiceQuerytoblockchainossRequest.AccountCheckQuery();
obj1.setMerchantId(1234L);
obj1.setInvoiceOrgId("202102167");
List<AlibabaCsrDonateInvoiceQuerytoblockchainossRequest.BillDTO> list3 = new ArrayList<AlibabaCsrDonateInvoiceQuerytoblockchainossRequest.BillDTO>();
AlibabaCsrDonateInvoiceQuerytoblockchainossRequest.BillDTO obj4 = new AlibabaCsrDonateInvoiceQuerytoblockchainossRequest.BillDTO();
list3.add(obj4);
obj4.setBillTime(202109L);
obj4.setBillId("231213");
obj1.setBillList(list3);
obj1.setInvoiceId("261563");
req.setAccountCheckQuery(obj1);
AlibabaCsrDonateInvoiceQuerytoblockchainossResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaCsrDonateInvoiceQuerytoblockchainossRequest req = new AlibabaCsrDonateInvoiceQuerytoblockchainossRequest();
AlibabaCsrDonateInvoiceQuerytoblockchainossRequest.AccountCheckQueryDomain obj1 = new AlibabaCsrDonateInvoiceQuerytoblockchainossRequest.AccountCheckQueryDomain();
obj1.MerchantId = 1234L;
obj1.InvoiceOrgId = "202102167";
List<AlibabaCsrDonateInvoiceQuerytoblockchainossRequest.BillDTODomain> list3 = new List<AlibabaCsrDonateInvoiceQuerytoblockchainossRequest.BillDTODomain>();
AlibabaCsrDonateInvoiceQuerytoblockchainossRequest.BillDTODomain obj4 = new AlibabaCsrDonateInvoiceQuerytoblockchainossRequest.BillDTODomain();
list3.Add(obj4);
obj4.BillTime = 202109L;
obj4.BillId = "231213";
obj1.BillList= list3;
obj1.InvoiceId = "261563";
req.AccountCheckQuery_ = obj1;
AlibabaCsrDonateInvoiceQuerytoblockchainossResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaCsrDonateInvoiceQuerytoblockchainossRequest;
$account_check_query = new AccountCheckQuery;
$account_check_query->merchant_id="1234";
$account_check_query->invoice_org_id="202102167";
$bill_list = new BillDTO;
$bill_list->bill_time="202109";
$bill_list->bill_id="231213";
$account_check_query->bill_list = $bill_list;
$account_check_query->invoice_id="261563";
$req->setAccountCheckQuery(json_encode($account_check_query));
$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.csr.donate.invoice.querytoblockchainoss' \
-d 'partner_id=apidoc' \
-d 'sign=4D6B7D3AE6643CEC5CCF15A22C281753' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-12+02%3A26%3A27' \
-d 'v=2.0' \
-d 'account_check_query=%7B+++++%5C%22merchantId%5C%22%3A+1234%2C+++++%5C%22invoiceOrgId%5C%22%3A+%5C%2220211027%5C%22%2C+++++%5C%22billList%5C%22%3A+%5B+++++++%7B+++++++++%5C%22billTime%5C%22%3A+20210930%2C+++++++++%5C%22billId%5C%22%3A+%5C%22122332%5C%22%2C+++++++++%5C%22class%5C%22%3A+%5C%22com.alibaba.csr.donate.domain.invoice.BillDTO%5C%22+++++++%7D+++++%5D%2C+++++%5C%22invoiceId%5C%22%3A+%5C%222ds34567ds12%5C%22%2C+++++%5C%22class%5C%22%3A+%5C%22com.alibaba.csr.donate.domain.invoice.AccountCheckQuery%5C%22+++%7D'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaCsrDonateInvoiceQuerytoblockchainossRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.account_check_query="{ \"merchantId\": 1234, \"invoiceOrgId\": \"20211027\", \"billList\": [ { \"billTime\": 20210930, \"billId\": \"122332\", \"class\": \"com.alibaba.csr.donate.domain.invoice.BillDTO\" } ], \"invoiceId\": \"2ds34567ds12\", \"class\": \"com.alibaba.csr.donate.domain.invoice.AccountCheckQuery\" }"
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.csr.donate.invoice.querytoblockchainoss");
add_param(pRequest,"account_check_query","数据结构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.csr.donate.invoice.querytoblockchainoss', {
'account_check_query':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})