接口 youzan.scrm.customer.create 创建客户 错误
YZClient client = new DefaultYZClient(new Token("25eff848da19383098f2840b7dc18457")); //new Sign(appKey, appSecret)
YouzanScrmCustomerCreateParams youzanScrmCustomerCreateParams = new YouzanScrmCustomerCreateParams();
CommuDic dic =new CommuDic();
CommuDic contact_address =new CommuDic();
dic.put("name","青青");
dic.put("gender",0);
dic.put("birthday","1989-01-01");
dic.put("remark","OK");
contact_address.put("area_code",210224);
contact_address.put("address","bbb");
dic.put("contact_address",contact_address);
youzanScrmCustomerCreateParams.setMobile("13858143440");
youzanScrmCustomerCreateParams.setCustomerCreate(dic.toString());
YouzanScrmCustomerCreate youzanScrmCustomerCreate = new YouzanScrmCustomerCreate();
youzanScrmCustomerCreate.setAPIParams(youzanScrmCustomerCreateParams);
YouzanScrmCustomerCreateResult result = client.invoke(youzanScrmCustomerCreate);
dic.toString()={name=青青, gender=0, birthday=1989-01-01, remark=OK, contact_address={area_code=210224, address=bbb}}
报错 {"error_response":{"code":0,"message":"Invalid <customerCreate> type, expects object"}}
|
|
用手机打开
收藏
赞 0
···
回复
|
|
|
|