用友 t6 凭证http API
作者:互联网
API服务器支持日记录功能,方便网管查询调用记录
API采用的是http +JSON方式,方便与各种语言对接
API加入token验证,目前token由服务器固定生成,可以手工更新,更新后,调用方需将调用的token更新,否则不予调用API,这样将更加的安全。
生前的凭证科目支持供应商辅助,客户辅助核算,部门辅助核算,人员辅助核算。项目辅助核算。
对于传入的档案也将进行验校,对于法非数据将不写入凭证。避免数据错误
例如,调用API的数据为
{"main":{"cbill":"demo1","dbill_date":"2012-04-29","iperiod":"4","csign":"记","code":"800001"},"detail":[{"ccode":"1008","md":"10","ctext1":"ctext1","ctext2":"EC21080001","cdigest":"借方摘要","cdept_id":"01"},{"ccode":"100101","md":"15","ctext1":"ctext1","ctext2":"EC21080001","cdigest":"借方摘要"},{"ccode":"2008","mc":"20","cperson_id":"030201","cdigest":"借方摘要","ctext1":"ctext1","ctext2":"EC21080001"},{"ccode":"5001","mc":"5","ctext1":"ctext1","ctext2":"EC21080001","cdept_id":"02","cdigest":"借方摘要"},{"ccode":"1008","md":"30","cdept_id":"02","ctext1":"ctext1","ctext2":"EC21080001","cdigest":"借方摘要"},{"ccode":"2008","mc":"30","ctext1":"ctext1","ctext2":"EC21080001","cdigest":"借方摘要","cperson_id":"030201"}],"token":"hHYql4JTmBzku=g1EJzBgCapL8LV5dGR"}
其中token取自服务器的设置
调用成功能,返回一个json内容如下,
{"state":200,"sMng":"\u8BB018","code":"800001"}
解析后为
其中sMng为凭证信息,如记 为记账证,后面的18为凭证号 18,Code是客户端写入的ID,服务端生成凭证后将把Code回传。
此时,日记录里己详细记录了该调用记录
打开用友,生成的凭证为
目前我己实现了各种业务单据的API,和凭证的API,如有商务合作,联系我,QQ 961138505
标签:http,ccode,t6,cdigest,ctext1,ctext2,API,EC21080001 来源: https://www.cnblogs.com/wuxi15/p/15135049.html