K/3 Cloud Web API interface Explanatory text
Objective
Three-party integration, providing a third-party system with the cloud integration call interface.
Technology implementation
HTTP + Json
Standard interfaces available
Number |
Name |
Description |
1 |
Kingdee.BOS.WebApi.ServicesStub.AuthService.ValidateUser |
User authentication |
2 |
Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Save |
Save |
3 |
Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Audit |
Audit |
4 |
Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Delete |
Delete |
5 |
Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.UnAudit |
Anti-Audit |
6 |
Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Submit |
Submit |
7 |
Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.View |
View |
8 |
Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.StatusConvert |
State transitions |
|
|
|
Example
The three-party client references Kingdee.BOS.WebApi.Client.dll (Note: This Client Reference API encapsulates an HTTP request).
Currency Save Example
Public voidtestmethodsave_bd_currency () {//Cloud business Site URLapiclient Client=NewApiclient ("http://localhost:1200/"); //Call Login interface parameter data center ID, user name, password, language ID BOOLRET = client. Login ("005056a30125ad4311e40291d44c593a","Administrator","888888",2052); //Landing Success if(ret) {//business Object ID stringSformid ="bd_currency"; //JSON string stringSjson ="{\ "creator\": \ "three-party caller ID \", \ "needupdatefields\": [\ "Fnumber\", \ "fname\", \ "Fcode\"],\ "model\": {\ "fcurrencyid\" : 0,\ "fnumber\": \ "encoding \", \ "fname\": \ "name \", \ "fcode\": \ "Currency code \", \ "fpricedigits\": 4,\ "famountdigits\": 2,\ "fpriority\" : 0,\ "fistrans\": False,\ "fisshowcsymbol\": False,\ "fissyspreset\": False,\ "fdescription\": \ "Info\"}}"; Object[] Saveinfo =New Object[] {sformid, sjson}; //calling the Save interfaceclient. Execute<string> ("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Save", Saveinfo); } }
Example Description:
The main concern is the structure of the JSON string
JSON compilation tool allows you to view and construct the appropriate JSON data
The JSON data corresponds to the Currency interface field.
JSON containing the body of the document Data constructs:
The document interface constructs JSON data, such as:
K/3 Cloud Web API interface Explanatory text