新增/更新 V2

接口 /loan/record/save POST JSON

请求参数

参数 类型 必须 默认值 主键 描述
businessCode String Y Y 借还款编号
employeeId String Y 员工工号
subsidiaryBizCode String Y 业务实体编码
departmentBizCode String Y 部门编码
loanRepaymentDate long Y 借还款日期
loanRepaymentMode String Y 借还款方式,包括上线初始化,工资抵扣
loanTypeBizCode String Y 借款类型编码
changeAmount BigDecimal Y 变动金额,借款为正,还款为负
baseCcy String CNY 借还款币种,为ISO国际标准支持的货币符号,比如CNY,USD等

返回参数

该接口采用单条失败的处理方式,即整批数据中,如果只有其中的几条因为各种原因失败,那么只有那几条数据不会被保存;其它的数据仍然会被正常处理;错误数据的主键(businessCode)会被放在errorData里面;

errorData为结构题, 包含出错记录主键(businessCode), 以及与之对应的出错信息; 类似 {"项目": "部门不存在"}; 具体参见失败实例;

为保持向后兼容, data也会包含有和errorData相同的记录,但后续可能会改变; 不支持单据化借款

示例:

请求数据

{
    "timestamp": 1478487353000,
    "data": [
        {
            "businessCode": "123456",
            "employeeId": "10001",
            "subsidiaryBizCode": "SU1606271XHM3DA8",
            "departmentBizCode": "DI1875161OYMN3D8",
            "loanRepaymentDate": 1478487353000,
            "loanRepaymentMode": "上线初始化",
            "loanTypeBizCode": "2020_01",
            "changeAmount": 1000,
            "baseCcy": "CNY"
        },
        {
            "businessCode": "123457",
            "employeeId": "10001",
            "subsidiaryBizCode": "SU1606271XHM3DA8",
            "departmentBizCode": "DI1875161OYMN3D8",
            "loanRepaymentDate": 1478487353000,
            "loanRepaymentMode": "上线初始化",
            "loanTypeBizCode": "2020_01",
            "changeAmount": -7000,
            "baseCcy": "CNY"
        }
    ]
}

返回数据(成功)

{
 "code": "ACK",
 "message": "",
}

返回数据(失败)

{ "code": "NACK", "errorData": { "123457": "编码(SU1606271XHM3DA8)对应业务实体不存在" }}

results matching ""

    No results matching ""