TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaFinanceInsuranceCreateorderRequest req = new AlibabaFinanceInsuranceCreateorderRequest();
AlibabaFinanceInsuranceCreateorderRequest.CreateOrderRequest obj1 = new AlibabaFinanceInsuranceCreateorderRequest.CreateOrderRequest();
obj1.setIdentifier("xxx");
obj1.setOrderId("xxx");
obj1.setTotalGuaranteedAmount("100");
obj1.setEffectiveTime(StringUtils.parseDateTime("2026-01-01 10:00:00"));
List<AlibabaFinanceInsuranceCreateorderRequest.Policy> list3 = new ArrayList<AlibabaFinanceInsuranceCreateorderRequest.Policy>();
AlibabaFinanceInsuranceCreateorderRequest.Policy obj4 = new AlibabaFinanceInsuranceCreateorderRequest.Policy();
list3.add(obj4);
obj4.setCorrelationPolicyNo("xxx");
obj4.setFeeAmount("10.00");
obj4.setActualReceivedAmount("10.00");
obj4.setEffectiveTime(StringUtils.parseDateTime("2026-01-01 10:00:00"));
obj4.setExpirationTime(StringUtils.parseDateTime("2026-01-01 10:00:00"));
obj4.setIsRenewPolicy(false);
obj4.setPolicyNo("xxx");
obj4.setIsSupportRenew(false);
obj4.setPlan("xxx");
obj4.setGuaranteedAmount("10.00");
obj4.setIsSelectedCommercial(false);
obj1.setPolicyList(list3);
obj1.setTotalActualReceivedAmount("100.00");
obj1.setTotalFeeAmount("10.00");
obj1.setOutUserId("xxx");
obj1.setPaymentType("monthly");
obj1.setItemId("xxx");
obj1.setSubProduct("xxx");
obj1.setInstitution("xx");
obj1.setTotalInstallments(1L);
obj1.setProductCode("xxx");
obj1.setExpirationTime(StringUtils.parseDateTime("2027-01-01 10:00:00"));
obj1.setAttributes("{\"spm\":\"xxx\"}");
obj1.setApplyTime(StringUtils.parseDateTime("2026-01-01 10:00:00"));
obj1.setTenant("DTAO");
req.setCreateOrderRequest(obj1);
AlibabaFinanceInsuranceCreateorderResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaFinanceInsuranceCreateorderRequest req = new AlibabaFinanceInsuranceCreateorderRequest();
AlibabaFinanceInsuranceCreateorderRequest.CreateOrderRequestDomain obj1 = new AlibabaFinanceInsuranceCreateorderRequest.CreateOrderRequestDomain();
obj1.Identifier = "xxx";
obj1.OrderId = "xxx";
obj1.TotalGuaranteedAmount = "100";
obj1.EffectiveTime = DateTime.Parse(2026-01-01 10:00:00");
List<AlibabaFinanceInsuranceCreateorderRequest.PolicyDomain> list3 = new List<AlibabaFinanceInsuranceCreateorderRequest.PolicyDomain>();
AlibabaFinanceInsuranceCreateorderRequest.PolicyDomain obj4 = new AlibabaFinanceInsuranceCreateorderRequest.PolicyDomain();
list3.Add(obj4);
obj4.CorrelationPolicyNo = "xxx";
obj4.FeeAmount = "10.00";
obj4.ActualReceivedAmount = "10.00";
obj4.EffectiveTime = DateTime.Parse(2026-01-01 10:00:00");
obj4.ExpirationTime = DateTime.Parse(2026-01-01 10:00:00");
obj4.IsRenewPolicy = false;
obj4.PolicyNo = "xxx";
obj4.IsSupportRenew = false;
obj4.Plan = "xxx";
obj4.GuaranteedAmount = "10.00";
obj4.IsSelectedCommercial = false;
obj1.PolicyList= list3;
obj1.TotalActualReceivedAmount = "100.00";
obj1.TotalFeeAmount = "10.00";
obj1.OutUserId = "xxx";
obj1.PaymentType = "monthly";
obj1.ItemId = "xxx";
obj1.SubProduct = "xxx";
obj1.Institution = "xx";
obj1.TotalInstallments = 1L;
obj1.ProductCode = "xxx";
obj1.ExpirationTime = DateTime.Parse(2027-01-01 10:00:00");
obj1.Attributes = "{\"spm\":\"xxx\"}";
obj1.ApplyTime = DateTime.Parse(2026-01-01 10:00:00");
obj1.Tenant = "DTAO";
req.CreateOrderRequest_ = obj1;
AlibabaFinanceInsuranceCreateorderResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaFinanceInsuranceCreateorderRequest;
$create_order_request = new CreateOrderRequest;
$create_order_request->identifier="xxx";
$create_order_request->order_id="xxx";
$create_order_request->total_guaranteed_amount="100";
$create_order_request->effective_time="2026-01-01 10:00:00";
$policy_list = new Policy;
$policy_list->correlation_policy_no="xxx";
$policy_list->fee_amount="10.00";
$policy_list->actual_received_amount="10.00";
$policy_list->effective_time="2026-01-01 10:00:00";
$policy_list->expiration_time="2026-01-01 10:00:00";
$policy_list->is_renew_policy="false";
$policy_list->policy_no="xxx";
$policy_list->is_support_renew="false";
$policy_list->plan="xxx";
$policy_list->guaranteed_amount="10.00";
$policy_list->is_selected_commercial="false";
$create_order_request->policy_list = $policy_list;
$create_order_request->total_actual_received_amount="100.00";
$create_order_request->total_fee_amount="10.00";
$create_order_request->out_user_id="xxx";
$create_order_request->payment_type="monthly";
$create_order_request->item_id="xxx";
$create_order_request->sub_product="xxx";
$create_order_request->institution="xx";
$create_order_request->total_installments="1";
$create_order_request->product_code="xxx";
$create_order_request->expiration_time="2027-01-01 10:00:00";
$create_order_request->attributes="{\"spm\":\"xxx\"}";
$create_order_request->apply_time="2026-01-01 10:00:00";
$create_order_request->tenant="DTAO";
$req->setCreateOrderRequest(json_encode($create_order_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.finance.insurance.createorder' \
-d 'partner_id=apidoc' \
-d 'sign=C87596B250483783736BB3FF41E06958' \
-d 'sign_method=hmac' \
-d 'timestamp=2026-04-02+11%3A11%3A04' \
-d 'v=2.0' \
-d 'create_order_request=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaFinanceInsuranceCreateorderRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.create_order_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.finance.insurance.createorder");
add_param(pRequest,"create_order_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',
'url': 'http://gw.api.taobao.com/router/rest'
});
client.execute('alibaba.finance.insurance.createorder', {
'create_order_request':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})