应收单和收款单接口调用实例原创
金蝶云社区-风以灵
风以灵
4人赞赏了该文章 1,786次浏览 未经作者许可,禁止转载编辑于2022年10月25日 13:41:26
summary-icon摘要由AI智能服务提供

本文档概述了金蝶云星空V7.5.1450.1版本中webAPI接口测试实例,特别是针对应收单和收款单的接口实现,包括单据的保存、提交、审核、下推等操作的测试说明。测试参考了金蝶的webAPI接口文档,通过POSTMAN等工具展示了如何填写单据数据并提交请求,包括必要的JSON格式数据结构和HTTP头部参数设置。

金蝶云星空V7.5.1450.1版本webAPI接口测试实例目录

说明:三方系统调用金蝶云星空 应收单和收款单接口实现单据保存、提交、审核、下推,实现三方系统联动

/**以下内容参考金蝶【C】webAPI接口文档说明整理形成,仅供交流参考。**/


1.保存接口测试:


(1)通过金蝶webAPI文档工具查看对应单据的文档信息,在线测试填写单据数据,拿返回实例json

image.png

*formid:可在金蝶webAPI文档工具中的代码示例中的client.Save中获取,如 AR_receivable

POSTMAN测试实例:

image.png


*须在Headers 加入kdservice-sessionid 参数,值为登录接口是返回的kdservice-sessionid值

image.png

json格式:

{"formid":"AR_receivable",
    "data":{
    "NeedUpDateFields": [],
    "NeedReturnFields": [],
    "IsDeleteEntry""true",
    "SubSystemId""",
    "IsVerifyBaseDataField""false",
    "IsEntryBatchFill""true",
    "ValidateFlag""true",
    "NumberSearch""true",
    "InterationFlags""",
    "IsAutoSubmitAndAudit""false",
    "Model": {
        "FID"0,
        "FBillTypeID": {
            "FNUMBER""YSD01_SYS"
        },
        "FDATE""2022-08-30 00:00:00",
        "FISINIT"false,
        "FENDDATE_H""2022-08-30 00:00:00",
        "FCUSTOMERID": {
            "FNumber""10-201"
        },
        "FCURRENCYID": {
            "FNumber""PRE001"
        },
        "FPayConditon": {
            "FNumber""SKTJ00_SYS"
        },
        "FISPRICEEXCLUDETAX"true,
        "FSETTLEORGID": {
            "FNumber""0051014"
        },
        "FPAYORGID": {
            "FNumber""0051014"
        },
        "FSALEORGID": {
            "FNumber""0051014"
        },
        "FISTAX"true,
        "FCancelStatus""A",
        "FBUSINESSTYPE""BZ",
        "F_TP_Text1""测试应收单数据保存",
        "FSetAccountType""1",
        "FISHookMatch"false,
        "FISINVOICEARLIER"false,
        "FWBOPENQTY"false,
        "FsubHeadSuppiler": {
            "FORDERID": {
                "FNumber""10-201"
            },
            "FTRANSFERID": {
                "FNumber""10-201"
            },
            "FChargeId": {
                "FNumber""10-201"
            }
        },
        "FsubHeadFinc": {
            "FACCNTTIMEJUDGETIME""2022-08-30 00:00:00",
            "FMAINBOOKSTDCURRID": {
                "FNumber""PRE001"
            },
            "FEXCHANGETYPE": {
                "FNumber""HLTX01_SYS"
            },
            "FExchangeRate"1.0,
            "FTaxAmountFor"291.26,
            "FNoTaxAmountFor"9708.74
        },
        "FEntityDetail": [
            {
                "FMATERIALID": {
                    "FNumber""003"
                },
                "FMaterialDesc""服务费",
                "FPRICEUNITID": {
                    "FNumber""Pcs"
                },
                "FPriceQty"1.0,
                "FTaxPrice"10000.0,
                "FPrice"9708.737864,
                "FEntryTaxRate"3.00,
                "FNoTaxAmountFor_D"9708.74,
                "FTAXAMOUNTFOR_D"291.26,
                "FALLAMOUNTFOR_D"10000.00,
                "FDeliveryControl"false,
                "FStockUnitId": {
                    "FNumber""Pcs"
                },
                "FStockQty"1.0,
                "FIsFree"false,
                "FStockBaseQty"1.0,
                "FSalUnitId": {
                    "FNumber""Pcs"
                },
                "FSalQty"1.0,
                "FSalBaseQty"1.0,
                "FPriceBaseDen"1.0,
                "FSalBaseNum"1.0,
                "FStockBaseNum"1.0
            }
        ],
        "FEntityPlan": [
            {
                "FENDDATE""2022-08-30 00:00:00",
                "FPAYRATE"100.00000,
                "FPAYAMOUNTFOR"10000.00
            }
        ]
    }
}
}


2.提交接口测试:


POSTMAN测试实例:

image.png

*须在Headers 加入kdservice-sessionid 参数,值为登录接口时返回的kdservice-sessionid值

*须根据保存接口返回的单据编号和内码id入参

json格式:

{"formid":"AR_receivable",
 "data":{
    "CreateOrgId""0",
    "Numbers":"AR00000243",
    "Ids""101019",
    "SelectedPostId""0"
}}


3.审核接口测试:


POSTMAN测试实例:

image.png

*须在Headers 加入kdservice-sessionid 参数,值为登录接口是返回的kdservice-sessionid值

*须根据保存接口返回的单据编号和内码id入参

json格式:

{"formid":"AR_receivable",
 "data":{
    "CreateOrgId""0",
    "Numbers":"AR00000243",
    "Ids""101019",
    "InterationFlags""0"
}}


4.下推接口测试:


POSTMAN测试实例:

image.png


应收单转收款单参数说明:

参数列表

参数含义

 备注  

formid

应收单模板ID:AR_receivable

必录

data

数据包

{\"Ids\":\"\",

\"Numbers\":[],

\"EntryIds\":\"\",

\"RuleId\":\"\",

\"TargetBillTypeId\":\"\",

\"TargetOrgId\":\"0\",

\"TargetFormId\":\"\",

\"IsEnableDefaultRule\":\"false\",

\"CustomParams\":{}}

1. Ids:应收单单据内码ID

2.Numbers:应收单单据编号

3.EntryIds: 

4.RuleId:应收单转收款单规则ID(在开发平台单据转换里获取)        

5.TargetBillTypeId:空

6.TargetOrgId:结算组织内码,从T_ORG_ORGANIZATIONS_L中获取的FORGID值

7.TargetFormId:收款单单据模板ID

8.IsEnableDefaultRule:false

9.IsDraftWhenSaveFail: false

10.CustomParams:空

  

*TargetOrgId:select FORGID from T_ORG_ORGANIZATIONS_L where FNAME='结算组织名称'

json格式:

{"formid":"AR_receivable",
    "data":{
    "Ids""101019",
    "Numbers":"AR00000243",
    "EntryIds""",
    "RuleId""AR_recableToRecBill",
    "TargetBillTypeId""",
    "TargetOrgId""100003",
    "TargetFormId""AR_RECEIVEBILL",
    "IsEnableDefaultRule""false",
    "IsDraftWhenSaveFail""false",
    "CustomParams": {}
}}


*下推成功后再通过提交、审核接口对下推生成的收款单进行提交和审核操作即可。




图标赞 4
4人点赞
还没有人点赞,快来当第一个点赞的人吧!
图标打赏
0人打赏
还没有人打赏,快来当第一个打赏的人吧!