TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaFinTaoInsuranceInsureApplyRequest req = new AlibabaFinTaoInsuranceInsureApplyRequest();
AlibabaFinTaoInsuranceInsureApplyRequest.InsureApply4TopRequest obj1 = new AlibabaFinTaoInsuranceInsureApplyRequest.InsureApply4TopRequest();
obj1.setApplyTime(StringUtils.parseDateTime("2021-01-01 01:01:01"));
obj1.setAttributes("{}");
AlibabaFinTaoInsuranceInsureApplyRequest.CustomerDTO obj2 = new AlibabaFinTaoInsuranceInsureApplyRequest.CustomerDTO();
obj2.setCifNo(0L);
obj2.setCustomerId("123456");
obj2.setCustomerType("ALI");
obj1.setCustomer(obj2);
obj1.setEffectiveTime(StringUtils.parseDateTime("2021-01-01 01:01:01"));
obj1.setExpirationTime(StringUtils.parseDateTime("2021-01-01 01:01:01"));
obj1.setFeeAmount("1");
obj1.setGuaranteedAmount("2");
obj1.setIdentifier("20223489348");
obj1.setInstitution("SUNSHINE");
obj1.setPolicyNo("123445677");
obj1.setProductCode("PET_INSURANCE");
obj1.setSubProduct("PLATFORM_BONUS_INSURANCE");
obj1.setSubjectMatterId("123456");
obj1.setTenant("DTAO");
obj1.setOutUserId("open_id");
req.setParamRequest(obj1);
AlibabaFinTaoInsuranceInsureApplyResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaFinTaoInsuranceInsureApplyRequest req = new AlibabaFinTaoInsuranceInsureApplyRequest();
AlibabaFinTaoInsuranceInsureApplyRequest.InsureApply4TopRequestDomain obj1 = new AlibabaFinTaoInsuranceInsureApplyRequest.InsureApply4TopRequestDomain();
obj1.ApplyTime = DateTime.Parse(2021-01-01 01:01:01");
obj1.Attributes = "{}";
AlibabaFinTaoInsuranceInsureApplyRequest.CustomerDTODomain obj2 = new AlibabaFinTaoInsuranceInsureApplyRequest.CustomerDTODomain();
obj2.CifNo = 0L;
obj2.CustomerId = "123456";
obj2.CustomerType = "ALI";
obj1.Customer= obj2;
obj1.EffectiveTime = DateTime.Parse(2021-01-01 01:01:01");
obj1.ExpirationTime = DateTime.Parse(2021-01-01 01:01:01");
obj1.FeeAmount = "1";
obj1.GuaranteedAmount = "2";
obj1.Identifier = "20223489348";
obj1.Institution = "SUNSHINE";
obj1.PolicyNo = "123445677";
obj1.ProductCode = "PET_INSURANCE";
obj1.SubProduct = "PLATFORM_BONUS_INSURANCE";
obj1.SubjectMatterId = "123456";
obj1.Tenant = "DTAO";
obj1.OutUserId = "open_id";
req.ParamRequest_ = obj1;
AlibabaFinTaoInsuranceInsureApplyResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaFinTaoInsuranceInsureApplyRequest;
$param_request = new InsureApply4TopRequest;
$param_request->apply_time="2021-01-01 01:01:01";
$param_request->attributes="{}";
$customer = new CustomerDTO;
$customer->cif_no="0";
$customer->customer_id="123456";
$customer->customer_type="ALI";
$param_request->customer = $customer;
$param_request->effective_time="2021-01-01 01:01:01";
$param_request->expiration_time="2021-01-01 01:01:01";
$param_request->fee_amount="1";
$param_request->guaranteed_amount="2";
$param_request->identifier="20223489348";
$param_request->institution="SUNSHINE";
$param_request->policy_no="123445677";
$param_request->product_code="PET_INSURANCE";
$param_request->sub_product="PLATFORM_BONUS_INSURANCE";
$param_request->subject_matter_id="123456";
$param_request->tenant="DTAO";
$param_request->out_user_id="open_id";
$req->setParamRequest(json_encode($param_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.fin.tao.insurance.insure.apply' \
-d 'partner_id=apidoc' \
-d 'sign=2838BAA378ED8970990197C45AC65CFF' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-22+17%3A11%3A39' \
-d 'v=2.0' \
-d 'param_request=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaFinTaoInsuranceInsureApplyRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param_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.fin.tao.insurance.insure.apply");
add_param(pRequest,"param_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.fin.tao.insurance.insure.apply', {
'param_request':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})