/
额度矩阵

额度矩阵

 

基准URL: /smartfin/api/v1/entity_credit_matrix


获取额度矩阵


POST /smartfin/api/v1/entity_credit_matrix/select

获取当前用户可见的所有额度。

验证 / 授权

API密钥(令牌)

 

请求标头

架构


请求标头:

  • Content-Type: application/json

Authorization (验证):

  • string - JWT <<您的API密钥(令牌)>> (必填项)

响应

例子:

{ "error_code": 0, "value": { "list": [ { "ecm_id": 20, "entity_id": 261508, "min_margin_ratio": null, "ecm_credit_amt": null, "ecm_credit_term": null, "dept_credit_amt": null, "measure_unit": null, "ecm_auth_qty": null, "ecm_auth_amt": null, "create_by": 2, "create_time": "2024-01-17 14:32:19", "update_by": null, "update_time": null, "company_id": 119, "dept": "THIS IS DEPT", "dept_auth_amt": "", "trade_cat": [ "q2we", "123" ], "trade_ dirc": null, "pricing_method": null, "sett_method": null, "biz_type": null, "c_name": "test2", "user_id": null, "u_name": null }, ... ], "dropdown_list": { "entity_whitelist": [ { "entity_id": 261582, "entity_name": "TEST COMPANY", "entity_type": "BROKER", "credit_amt": null, "credit_lvl": null, "credit_score": null }, { "entity_id": 261580, "entity_name": "TESTUPLOADFILE1", "entity_type": "COUNTERPARTY", "credit_amt": 2345.0, "credit_lvl": 0.0, "credit_score": 0.0 }, ... ], "validation": [ "entity_whitelist", "trade_dirc", "pricing_method", "sett_method", "biz_type" ], "trade_cat": [ "q2we", "123", "qwe" ], "trade_dirc": [ { "value": 1, "label": "PURCHASE", "ch_label": "采购" }, { "value": 2, "label": "SALE", "ch_label": "销售" }, { "value": 3, "label": "FREIGHT", "ch_label": "货代" }, { "value": 4, "label": "CUSTOMS", "ch_label": "报关" }, { "value": 5, "label": "WAREHOUSING", "ch_label": "仓储" }, { "value": 6, "label": "LOGISTICS", "ch_label": "物流" } ], "pricing_method": [ { "value": 1, "label": "FIXED PRICE", "ch_label": "固价方式" }, { "value": 2, "label": "SPOT PRICING", "ch_label": "点价方式" } ], "sett_method": [ { "value": 1, "label": "PAYMENT BEFORE DELIVERY", "ch_label": "先款后货" }, { "value": 2, "label": "DELIVERY BEFORE PAYMENT", "ch_label": "先货后款" }, { "value": 3, "label": "LC", "ch_label": "国际信用证" }, { "value": 4, "label": "DOCUMENTS AGAINST PAYMENT", "ch_label": "付款交单" }, { "value": 5, "label": "EXCHANGE SETTLEMENT", "ch_label": "交易所结算" } ], "biz_type": [ { "value": 1, "label": "LOW RISK", "ch_label": "低风险业务" }, { "value": 2, "label": "ANNUAL CREDIT", "ch_label": "年度授信" }, { "value": 3, "label": "WHITELIST CREDIT", "ch_label": "白名单授信" }, { "value": 4, "label": "BATCH OR SINGLE CREDIT", "ch_label": "单笔单批" } ] } } }

返回

  • 一个名为list的对象列表,每个对象表示一个额度矩阵 ( 按ecm_id降序排列 )

  • 一个名为dropdown_list的列表,其中包含在输入/更新额度矩阵时使用的各种选择列表。

架构


last_update_time, update_by_name, update_by - string

有关数据的最后更新时间以及更新数据的用户的信息。

 

create_time, create_by, create_by_name - string

有关数据的创建时间以及创建数据的用户的信息。

 

user_id, entity_id - integer
  • user_id - 用户ID(数据所属的用户)

  • ecm_id - 额度矩阵ID, 分配给数据独立ID。该ID可用于检索额度矩阵。

  • entity_id - 此数据的公司ID。

  • company_id - 此数据的母公司ID。

 

trade_dirc, pricing_method, sett_method - array[integer] biz_type - integer
  • 参数以整数数组( array )形式存在,或者如果参数为空,则将解析为 null。

  • 请参考 dropdown_list 中相应列表的名称获取相对正确的整数。

  • trade_dirc - 业务方向

  • pricing_method- 定价方式

  • sett_method- 结算方式

  • biz_type- 申请业务类型

 

min_margin_ratio, ecm_credit_amt, dept_credit_amt,ecm_auth_qty, ecm_auth_amt, dept_auth_amt - float ecm_credit_term - integer measure_unit - string
  • min_margin_ratio- 最低保证金比例(%)

  • ecm_credit_amt- 授信金额 ( 折人民币万元)

  • ecm_credit_term - 信用期限(自然日)

  • dept_credit_amt - 单一部门授信金额(折人民币万元)

  • ecm_auth_qty - 授权数量

  • ecm_auth_amt - 未了结合同金额(折人民币万元)

  • measure_unit - 计量单位

  • dept_auth_amt - 单一部门未了结合同金额(折人民币万元)

 

entity_id - integer dept - string trade_cat - array[string] ecm_id - integer

* 上述提到的参数在输入 (ecm_id除外) 或更新数据时是必须填写的。

  • trade_cat - 交易品种, 参数以字符串数组形式存在,或者如果参数为空,则将解析为 null。

  • dept- 申请部门

 

 



 

 

更新 / 输入额度矩阵


更新URL:
POST /smartfin/api/v1/entity_credit_matrix/update

输入URL:
POST /smartfin/api/v1/entity_credit_matrix/insert

 

将新的公司数据输入或更新到数据库中。

 

验证 / 授权

API密钥(令牌)

 

请求标头

架构


请求标头:

  • Content-Type: application/json

Authorization (验证):

  • string - JWT <<您的API密钥(令牌)>> (必填项)

 

请求载荷 ( 更新 )

例子:

JSON 主体:

{ "return_full": false, "dropdown": true, "update_list": [ { "ecm_id": 22, "entity_id": "261582", "dept": "this is dept", "entity_name":"TESTUPLOADFILE1", "trade_cat": ["testinsert","12345"], "min_margin_ratio": 0, "ecm_credit_amt": 0, "ecm_credit_term": 0, "dept_credit_amt": null, "measure_unit": null, "ecm_auth_qty": null, "ecm_auth_amt": null, "company_id": 119, "trade_dirc": [1], "pricing_method": [1], "sett_method": [3,4], "biz_type": null, "dept_auth_amt": "", } ] }

请求载荷 ( 输入 )

例子:

JSON 主体:

{ "return_full": false, "dropdown": true, "insert_list": [ { "entity_id": "261582", "dept": "this is dept", "entity_name":"TESTUPLOADFILE1", "trade_cat": ["testinsert","12345"], "min_margin_ratio": 0, "ecm_credit_amt": 0, "ecm_credit_term": 0, "dept_credit_amt": null, "measure_unit": null, "ecm_auth_qty": null, "ecm_auth_amt": null, "company_id": 119, "trade_dirc": [1], "pricing_method": [1], "sett_method": [3,4], "biz_type": null, "dept_auth_amt": "", } ] }

 

请求架构


return_full - boolean
  • true 或 false

  • 如果是true,将返回全部数据。

  • 反之是false,将返回已输入或者更新的数据。

insert_list - array[object]

 

update_list - array[object]

 

dropdown - boolean
  • 决定是否在响应里返回 dropdown_list (MAF界面使用的下拉选项)

响应:

 

删除额度矩阵


DELETE /smartfin/api/v1/entity_credit_matrix/delete

根据其 ecm_id 删除单个/多个额度。

 

验证 / 授权

API密钥(令牌)

 

请求标头

架构


请求标头:

  • Content-Type: application/json

Authorization (验证):

  • string - JWT <<您的API密钥(令牌)>> (必填项)

 

请求载荷

例子:

JSON 主体:

{ "del_ids":[261572], "dropdown": true, }
del_ids - array[integer]
  • 包含用户删除的独立ecm_id的数组。

 

dropdown - boolean
  • 决定是否在响应里返回 dropdown_list (MAF界面使用的下拉选项)

 

响应:

Related content