TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaCfoIncomingInvoiceLedgerFullysyncRequest req = new AlibabaCfoIncomingInvoiceLedgerFullysyncRequest();
AlibabaCfoIncomingInvoiceLedgerFullysyncRequest.PytLedgerSyncRequest obj1 = new AlibabaCfoIncomingInvoiceLedgerFullysyncRequest.PytLedgerSyncRequest();
obj1.setAccountType("AP");
obj1.setAmountWithTax("1");
obj1.setAmountWithoutTax("1");
obj1.setAuthRemark("123");
obj1.setAuthStatus("1");
obj1.setAuthStyle("0");
obj1.setAuthTaxPeriod("202210");
obj1.setAuthUse("1");
obj1.setBizOrderNo("123");
obj1.setBuyerAddressTel("上海1234567890");
obj1.setBuyerBankAccount("123456");
obj1.setBuyerBankInfo("123456");
obj1.setBuyerBankName("中国银行");
obj1.setBuyerName("阿里巴巴");
obj1.setBuyerTaxNo("1234");
obj1.setCheckCode("123");
obj1.setCipherText("123");
obj1.setCipherTextQRCode("123");
obj1.setDateIssued("2022-10-03 10:00:00");
List<AlibabaCfoIncomingInvoiceLedgerFullysyncRequest.PytLedgerInvoiceLineRequest> list3 = new ArrayList<AlibabaCfoIncomingInvoiceLedgerFullysyncRequest.PytLedgerInvoiceLineRequest>();
AlibabaCfoIncomingInvoiceLedgerFullysyncRequest.PytLedgerInvoiceLineRequest obj4 = new AlibabaCfoIncomingInvoiceLedgerFullysyncRequest.PytLedgerInvoiceLineRequest();
list3.add(obj4);
obj4.setAmountWithTax("1");
obj4.setAmountWithoutTax("1");
obj4.setDeductions("1");
obj4.setGoodsTaxNo("1");
obj4.setGoodsTaxNoVersion("1");
obj4.setQuantity("1");
obj4.setSpecifications("中型");
obj4.setTaxAmount("1");
obj4.setTaxPre("1");
obj4.setTaxPreCon("123");
obj4.setTaxRate("6");
obj4.setTollEndDate("2022-10-01 00:00:00");
obj4.setTollStartDate("2022-10-02 00:00:00");
obj4.setUnit("部");
obj4.setUnitPrice("1");
obj4.setZeroTax("1");
obj4.setItemName("*体育用品*护膝");
obj4.setItemCode("123");
obj1.setDetails(list3);
obj1.setEffectiveTaxAmount("1");
obj1.setElConfirmDate("2022-10-05 00:00:00");
obj1.setElSyncTime("2022-10-05 14:00:00");
obj1.setExtendedAttrs("{\"key\":\"value\"}");
obj1.setInvoiceCode("123");
obj1.setInvoiceColor("1");
obj1.setInvoiceType("1");
obj1.setInvoiceNo("11223344");
obj1.setInvoiceSource("1");
obj1.setInvoiceStyleType("1");
obj1.setIssuer("张三");
obj1.setMachineCode("123");
obj1.setNoAuthReason("123");
obj1.setOriginalInvoiceCode("123");
obj1.setOriginalInvoiceNo("11223344");
obj1.setPayee("李四");
obj1.setPdfUrl("123");
obj1.setRemark("123");
obj1.setReverseAmountWithTax("1");
obj1.setReverseAmountWithoutTax("1");
obj1.setReverseFlag("1");
obj1.setReverseTaxAmount("1");
obj1.setReviewer("王明");
obj1.setSaleListFileFlag("true");
obj1.setSellerAddress("上海");
obj1.setSellerAddressTel("上海1234566697");
obj1.setSellerBankAccount("123");
obj1.setSellerBankInfo("中国银行123");
obj1.setSellerBankName("中国银行");
obj1.setSellerName("阿里巴巴");
obj1.setSellerTaxNo("123");
obj1.setSellerTel("123");
obj1.setSource("1");
obj1.setSpecialType("1");
obj1.setStatus("1");
obj1.setTaxAmount("1");
obj1.setTaxInvoiceSource("1");
obj1.setTaxRate("6");
obj1.setSendTime(1670487816528L);
req.setParamPytLedgerSyncRequest(obj1);
AlibabaCfoIncomingInvoiceLedgerFullysyncResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaCfoIncomingInvoiceLedgerFullysyncRequest req = new AlibabaCfoIncomingInvoiceLedgerFullysyncRequest();
AlibabaCfoIncomingInvoiceLedgerFullysyncRequest.PytLedgerSyncRequestDomain obj1 = new AlibabaCfoIncomingInvoiceLedgerFullysyncRequest.PytLedgerSyncRequestDomain();
obj1.AccountType = "AP";
obj1.AmountWithTax = "1";
obj1.AmountWithoutTax = "1";
obj1.AuthRemark = "123";
obj1.AuthStatus = "1";
obj1.AuthStyle = "0";
obj1.AuthTaxPeriod = "202210";
obj1.AuthUse = "1";
obj1.BizOrderNo = "123";
obj1.BuyerAddressTel = "上海1234567890";
obj1.BuyerBankAccount = "123456";
obj1.BuyerBankInfo = "123456";
obj1.BuyerBankName = "中国银行";
obj1.BuyerName = "阿里巴巴";
obj1.BuyerTaxNo = "1234";
obj1.CheckCode = "123";
obj1.CipherText = "123";
obj1.CipherTextQRCode = "123";
obj1.DateIssued = "2022-10-03 10:00:00";
List<AlibabaCfoIncomingInvoiceLedgerFullysyncRequest.PytLedgerInvoiceLineRequestDomain> list3 = new List<AlibabaCfoIncomingInvoiceLedgerFullysyncRequest.PytLedgerInvoiceLineRequestDomain>();
AlibabaCfoIncomingInvoiceLedgerFullysyncRequest.PytLedgerInvoiceLineRequestDomain obj4 = new AlibabaCfoIncomingInvoiceLedgerFullysyncRequest.PytLedgerInvoiceLineRequestDomain();
list3.Add(obj4);
obj4.AmountWithTax = "1";
obj4.AmountWithoutTax = "1";
obj4.Deductions = "1";
obj4.GoodsTaxNo = "1";
obj4.GoodsTaxNoVersion = "1";
obj4.Quantity = "1";
obj4.Specifications = "中型";
obj4.TaxAmount = "1";
obj4.TaxPre = "1";
obj4.TaxPreCon = "123";
obj4.TaxRate = "6";
obj4.TollEndDate = "2022-10-01 00:00:00";
obj4.TollStartDate = "2022-10-02 00:00:00";
obj4.Unit = "部";
obj4.UnitPrice = "1";
obj4.ZeroTax = "1";
obj4.ItemName = "*体育用品*护膝";
obj4.ItemCode = "123";
obj1.Details= list3;
obj1.EffectiveTaxAmount = "1";
obj1.ElConfirmDate = "2022-10-05 00:00:00";
obj1.ElSyncTime = "2022-10-05 14:00:00";
obj1.ExtendedAttrs = "{\"key\":\"value\"}";
obj1.InvoiceCode = "123";
obj1.InvoiceColor = "1";
obj1.InvoiceType = "1";
obj1.InvoiceNo = "11223344";
obj1.InvoiceSource = "1";
obj1.InvoiceStyleType = "1";
obj1.Issuer = "张三";
obj1.MachineCode = "123";
obj1.NoAuthReason = "123";
obj1.OriginalInvoiceCode = "123";
obj1.OriginalInvoiceNo = "11223344";
obj1.Payee = "李四";
obj1.PdfUrl = "123";
obj1.Remark = "123";
obj1.ReverseAmountWithTax = "1";
obj1.ReverseAmountWithoutTax = "1";
obj1.ReverseFlag = "1";
obj1.ReverseTaxAmount = "1";
obj1.Reviewer = "王明";
obj1.SaleListFileFlag = "true";
obj1.SellerAddress = "上海";
obj1.SellerAddressTel = "上海1234566697";
obj1.SellerBankAccount = "123";
obj1.SellerBankInfo = "中国银行123";
obj1.SellerBankName = "中国银行";
obj1.SellerName = "阿里巴巴";
obj1.SellerTaxNo = "123";
obj1.SellerTel = "123";
obj1.Source = "1";
obj1.SpecialType = "1";
obj1.Status = "1";
obj1.TaxAmount = "1";
obj1.TaxInvoiceSource = "1";
obj1.TaxRate = "6";
obj1.SendTime = 1670487816528L;
req.ParamPytLedgerSyncRequest_ = obj1;
AlibabaCfoIncomingInvoiceLedgerFullysyncResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaCfoIncomingInvoiceLedgerFullysyncRequest;
$param_pyt_ledger_sync_request = new PytLedgerSyncRequest;
$param_pyt_ledger_sync_request->account_type="AP";
$param_pyt_ledger_sync_request->amount_with_tax="1";
$param_pyt_ledger_sync_request->amount_without_tax="1";
$param_pyt_ledger_sync_request->auth_remark="123";
$param_pyt_ledger_sync_request->auth_status="1";
$param_pyt_ledger_sync_request->auth_style="0";
$param_pyt_ledger_sync_request->auth_tax_period="202210";
$param_pyt_ledger_sync_request->auth_use="1";
$param_pyt_ledger_sync_request->biz_order_no="123";
$param_pyt_ledger_sync_request->buyer_address_tel="上海1234567890";
$param_pyt_ledger_sync_request->buyer_bank_account="123456";
$param_pyt_ledger_sync_request->buyer_bank_info="123456";
$param_pyt_ledger_sync_request->buyer_bank_name="中国银行";
$param_pyt_ledger_sync_request->buyer_name="阿里巴巴";
$param_pyt_ledger_sync_request->buyer_tax_no="1234";
$param_pyt_ledger_sync_request->check_code="123";
$param_pyt_ledger_sync_request->cipher_text="123";
$param_pyt_ledger_sync_request->cipher_text_q_r_code="123";
$param_pyt_ledger_sync_request->date_issued="2022-10-03 10:00:00";
$details = new PytLedgerInvoiceLineRequest;
$details->amount_with_tax="1";
$details->amount_without_tax="1";
$details->deductions="1";
$details->goods_tax_no="1";
$details->goods_tax_no_version="1";
$details->quantity="1";
$details->specifications="中型";
$details->tax_amount="1";
$details->tax_pre="1";
$details->tax_pre_con="123";
$details->tax_rate="6";
$details->toll_end_date="2022-10-01 00:00:00";
$details->toll_start_date="2022-10-02 00:00:00";
$details->unit="部";
$details->unit_price="1";
$details->zero_tax="1";
$details->item_name="*体育用品*护膝";
$details->item_code="123";
$param_pyt_ledger_sync_request->details = $details;
$param_pyt_ledger_sync_request->effective_tax_amount="1";
$param_pyt_ledger_sync_request->el_confirm_date="2022-10-05 00:00:00";
$param_pyt_ledger_sync_request->el_sync_time="2022-10-05 14:00:00";
$param_pyt_ledger_sync_request->extended_attrs="{\"key\":\"value\"}";
$param_pyt_ledger_sync_request->invoice_code="123";
$param_pyt_ledger_sync_request->invoice_color="1";
$param_pyt_ledger_sync_request->invoice_type="1";
$param_pyt_ledger_sync_request->invoice_no="11223344";
$param_pyt_ledger_sync_request->invoice_source="1";
$param_pyt_ledger_sync_request->invoice_style_type="1";
$param_pyt_ledger_sync_request->issuer="张三";
$param_pyt_ledger_sync_request->machine_code="123";
$param_pyt_ledger_sync_request->no_auth_reason="123";
$param_pyt_ledger_sync_request->original_invoice_code="123";
$param_pyt_ledger_sync_request->original_invoice_no="11223344";
$param_pyt_ledger_sync_request->payee="李四";
$param_pyt_ledger_sync_request->pdf_url="123";
$param_pyt_ledger_sync_request->remark="123";
$param_pyt_ledger_sync_request->reverse_amount_with_tax="1";
$param_pyt_ledger_sync_request->reverse_amount_without_tax="1";
$param_pyt_ledger_sync_request->reverse_flag="1";
$param_pyt_ledger_sync_request->reverse_tax_amount="1";
$param_pyt_ledger_sync_request->reviewer="王明";
$param_pyt_ledger_sync_request->sale_list_file_flag="true";
$param_pyt_ledger_sync_request->seller_address="上海";
$param_pyt_ledger_sync_request->seller_address_tel="上海1234566697";
$param_pyt_ledger_sync_request->seller_bank_account="123";
$param_pyt_ledger_sync_request->seller_bank_info="中国银行123";
$param_pyt_ledger_sync_request->seller_bank_name="中国银行";
$param_pyt_ledger_sync_request->seller_name="阿里巴巴";
$param_pyt_ledger_sync_request->seller_tax_no="123";
$param_pyt_ledger_sync_request->seller_tel="123";
$param_pyt_ledger_sync_request->source="1";
$param_pyt_ledger_sync_request->special_type="1";
$param_pyt_ledger_sync_request->status="1";
$param_pyt_ledger_sync_request->tax_amount="1";
$param_pyt_ledger_sync_request->tax_invoice_source="1";
$param_pyt_ledger_sync_request->tax_rate="6";
$param_pyt_ledger_sync_request->send_time="1670487816528";
$req->setParamPytLedgerSyncRequest(json_encode($param_pyt_ledger_sync_request));
$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.cfo.incoming.invoice.ledger.fullysync' \
-d 'partner_id=apidoc' \
-d 'sign=5370C58C7B98739A4C0BAD172697ED44' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-07-27+11%3A27%3A45' \
-d 'v=2.0' \
-d 'param_pyt_ledger_sync_request=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaCfoIncomingInvoiceLedgerFullysyncRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param_pyt_ledger_sync_request="数据结构示例JSON格式"
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.cfo.incoming.invoice.ledger.fullysync");
add_param(pRequest,"param_pyt_ledger_sync_request","数据结构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.cfo.incoming.invoice.ledger.fullysync', {
'param_pyt_ledger_sync_request':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})