TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaEinvoiceFlowTaxCreateRequest req = new AlibabaEinvoiceFlowTaxCreateRequest();
AlibabaEinvoiceFlowTaxCreateRequest.InvoiceTaxFlowCreateDto obj1 = new AlibabaEinvoiceFlowTaxCreateRequest.InvoiceTaxFlowCreateDto();
AlibabaEinvoiceFlowTaxCreateRequest.InvoiceCompanyDto obj2 = new AlibabaEinvoiceFlowTaxCreateRequest.InvoiceCompanyDto();
obj2.setArea("朝阳区");
obj2.setBankAccountId("888888888888");
obj2.setBankName("深圳市软件园招商银行");
obj2.setCity("北京市");
obj2.setCompanyName("阿里巴巴发票中台测试企业");
obj2.setCompanyType(1L);
obj2.setDefaultItemName("稻谷");
obj2.setDefaultTaxCode("1010101010000000000");
obj2.setDefaultTaxRate("0.13");
obj2.setDetailedAddress("深圳市南山区软件园");
obj2.setInvoicePhone("0730-12345678");
obj2.setPayeeChecker("李四");
obj2.setPayeeOperator("张三");
obj2.setPayeeReceiver("王五");
obj2.setPayeeRegisterNo("QWERTY0000001");
obj2.setProvince("北京市");
obj2.setZeroTaxRateFlag("1");
obj1.setInvoiceCompany(obj2);
AlibabaEinvoiceFlowTaxCreateRequest.InvoiceContactDto obj3 = new AlibabaEinvoiceFlowTaxCreateRequest.InvoiceContactDto();
obj3.setContactAddr("广东深深圳市南山区软件园南区");
obj3.setContactMail("test@alibaba.com");
obj3.setContactMobile("13388888888");
obj3.setContactName("张三");
obj1.setInvoiceContact(obj3);
obj1.setOuterId("S0000001");
obj1.setPlatformCode("ABC");
obj1.setPlatformUserId("12345678");
obj1.setProductCode("OEM_OWNTAX_ASYNC");
obj1.setServiceValidDays(365L);
req.setInvoiceTaxFlowCreateDto(obj1);
AlibabaEinvoiceFlowTaxCreateResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaEinvoiceFlowTaxCreateRequest req = new AlibabaEinvoiceFlowTaxCreateRequest();
AlibabaEinvoiceFlowTaxCreateRequest.InvoiceTaxFlowCreateDtoDomain obj1 = new AlibabaEinvoiceFlowTaxCreateRequest.InvoiceTaxFlowCreateDtoDomain();
AlibabaEinvoiceFlowTaxCreateRequest.InvoiceCompanyDtoDomain obj2 = new AlibabaEinvoiceFlowTaxCreateRequest.InvoiceCompanyDtoDomain();
obj2.Area = "朝阳区";
obj2.BankAccountId = "888888888888";
obj2.BankName = "深圳市软件园招商银行";
obj2.City = "北京市";
obj2.CompanyName = "阿里巴巴发票中台测试企业";
obj2.CompanyType = 1L;
obj2.DefaultItemName = "稻谷";
obj2.DefaultTaxCode = "1010101010000000000";
obj2.DefaultTaxRate = "0.13";
obj2.DetailedAddress = "深圳市南山区软件园";
obj2.InvoicePhone = "0730-12345678";
obj2.PayeeChecker = "李四";
obj2.PayeeOperator = "张三";
obj2.PayeeReceiver = "王五";
obj2.PayeeRegisterNo = "QWERTY0000001";
obj2.Province = "北京市";
obj2.ZeroTaxRateFlag = "1";
obj1.InvoiceCompany= obj2;
AlibabaEinvoiceFlowTaxCreateRequest.InvoiceContactDtoDomain obj3 = new AlibabaEinvoiceFlowTaxCreateRequest.InvoiceContactDtoDomain();
obj3.ContactAddr = "广东深深圳市南山区软件园南区";
obj3.ContactMail = "test@alibaba.com";
obj3.ContactMobile = "13388888888";
obj3.ContactName = "张三";
obj1.InvoiceContact= obj3;
obj1.OuterId = "S0000001";
obj1.PlatformCode = "ABC";
obj1.PlatformUserId = "12345678";
obj1.ProductCode = "OEM_OWNTAX_ASYNC";
obj1.ServiceValidDays = 365L;
req.InvoiceTaxFlowCreateDto_ = obj1;
AlibabaEinvoiceFlowTaxCreateResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaEinvoiceFlowTaxCreateRequest;
$invoice_tax_flow_create_dto = new InvoiceTaxFlowCreateDto;
$invoice_company = new InvoiceCompanyDto;
$invoice_company->area="朝阳区";
$invoice_company->bank_account_id="888888888888";
$invoice_company->bank_name="深圳市软件园招商银行";
$invoice_company->city="北京市";
$invoice_company->company_name="阿里巴巴发票中台测试企业";
$invoice_company->company_type="1";
$invoice_company->default_item_name="稻谷";
$invoice_company->default_tax_code="1010101010000000000";
$invoice_company->default_tax_rate="0.13";
$invoice_company->detailed_address="深圳市南山区软件园";
$invoice_company->invoice_phone="0730-12345678";
$invoice_company->payee_checker="李四";
$invoice_company->payee_operator="张三";
$invoice_company->payee_receiver="王五";
$invoice_company->payee_register_no="QWERTY0000001";
$invoice_company->province="北京市";
$invoice_company->zero_tax_rate_flag="1";
$invoice_tax_flow_create_dto->invoice_company = $invoice_company;
$invoice_contact = new InvoiceContactDto;
$invoice_contact->contact_addr="广东深深圳市南山区软件园南区";
$invoice_contact->contact_mail="test@alibaba.com";
$invoice_contact->contact_mobile="13388888888";
$invoice_contact->contact_name="张三";
$invoice_tax_flow_create_dto->invoice_contact = $invoice_contact;
$invoice_tax_flow_create_dto->outer_id="S0000001";
$invoice_tax_flow_create_dto->platform_code="ABC";
$invoice_tax_flow_create_dto->platform_user_id="12345678";
$invoice_tax_flow_create_dto->product_code="OEM_OWNTAX_ASYNC";
$invoice_tax_flow_create_dto->service_valid_days="365";
$req->setInvoiceTaxFlowCreateDto(json_encode($invoice_tax_flow_create_dto));
$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.einvoice.flow.tax.create' \
-d 'partner_id=apidoc' \
-d 'sign=684961462F756B9069922A4B402DB210' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-27+00%3A54%3A16' \
-d 'v=2.0' \
-d 'invoice_tax_flow_create_dto=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaEinvoiceFlowTaxCreateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.invoice_tax_flow_create_dto=""
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.einvoice.flow.tax.create");
add_param(pRequest,"invoice_tax_flow_create_dto","数据结构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.einvoice.flow.tax.create', {
'invoice_tax_flow_create_dto':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})