K/3 Cloud Web API接口说明文
目的
三方集成,提供第三方系统与Cloud集成调用接口。
技术实现
HTTP + Json
提供标准接口
编号 |
名称 |
说明 |
1 |
Kingdee.BOS.WebApi.ServicesStub.AuthService.ValidateUser |
用户验证 |
2 |
Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Save |
保存 |
3 |
Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Audit |
审核 |
4 |
Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Delete |
删除 |
5 |
Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.UnAudit |
反审核 |
6 |
Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Submit |
提交 |
7 |
Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.View |
查看 |
8 |
Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.StatusConvert |
状态转换 |
示例
三方客户端 引用Kingdee.BOS.WebApi.Client.dll (注:此客户端引用Api封装的是Http请求)。
币别->保存 示例
public void TestMethodSave_BD_Currency() { //Cloud 业务站点Url ApiClient client = new ApiClient("http://localhost:1200/"); //调用登陆接口 参数 数据中心Id,用户名,密码,语言id bool ret = client.Login("005056a30125ad4311e40291d44c593a", "Administrator", "888888", 2052); // 登陆成功 if (ret) { //业务对象Id string sFormId = "BD_Currency"; //Json字串 string sJson = "{"Creator":"三方调用者标识","NeedUpDateFields":["FNumber","FName","FCODE"],"Model":{"FCURRENCYID":0,"FNumber":"编码","FName":"名称","FCODE":"货币代码","FPRICEDIGITS":4,"FAMOUNTDIGITS":2,"FPRIORITY":0,"FIsTrans":false,"FIsShowCSymbol":false,"FIsSysPreset":false,"FDescription":"info"}}"; object[] saveInfo = new object[] { sFormId, sJson }; //调用保存接口 client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Save", saveInfo); } }
示例说明:
其中主要关注构造的Json字串
通过Json编译工具,可查看及构造相应Json数据
Json数据是币别界面字段对应的。
包含单据体的Json数据构造:
凭证界面构造的Json数据,如下图: