基准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": "单笔单批" } ] } } } |
返回
|
架构
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, biz_type - array[integer]
参数以整数数组( array )形式存在,或者如果参数为空,则将解析为 null。
请参考
dropdown_list
中相应列表的名称获取相对正确的整数。trade_dirc
- 业务方向pricing_method
- 定价方式sett_method
- 结算方式biz_type
- 申请业务类型
min_margin_ratio, ecm_credit_amt, ecm_credit_term, dept_credit_amt, ecm_auth_qty, ecm_auth_amt, dept_auth_amt - 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, "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, "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]
包含与
list
于 https://mafint.atlassian.net/wiki/spaces/MAD/pages/2156298244#%E5%93%8D%E5%BA%94 相同的参数 ( 请参考上述 https://mafint.atlassian.net/wiki/spaces/MAD/pages/2156298244#%E8%AF%B7%E6%B1%82%E8%BD%BD%E8%8D%B7--(-%E8%BE%93%E5%85%A5-) 请求主体中需要包含的必需参数 )ecm_id
不需要传递,并且在此数组中不是必需的。包含要输入到数据库中的新额度。
update_list - array[object]
包含与
list
于 https://mafint.atlassian.net/wiki/spaces/MAD/pages/2156298244#%E5%93%8D%E5%BA%94 相同的参数 (请参考上述 https://mafint.atlassian.net/wiki/spaces/MAD/pages/2156298244#%E8%AF%B7%E6%B1%82%E8%BD%BD%E8%8D%B7-%EF%BC%88-%E6%9B%B4%E6%96%B0-%EF%BC%89 请求主体中需要包含的必需参数 )包含要更新到数据库中的现有额度。
响应:
与 https://mafint.atlassian.net/wiki/spaces/MAD/pages/2156298244#%E5%93%8D%E5%BA%94 ( 请参考每个参数的定义 ) 的响应主体相同。
删除额度矩阵
DELETE /smartfin/api/v1/whitelist/delete
根据其 ecm_id
删除单个/多个额度。
验证 / 授权
- API密钥(令牌)
请求标头
架构
请求标头:
Content-Type: application/json
Authorization (验证):
string - JWT <<您的API密钥(令牌)>> (必填项)
请求载荷
例子:
JSON 主体: { "del_ids":[261572] } |
del_ids - array[integer]
包含用户删除的独立
ecm_id
的数组。
响应:
与 https://mafint.atlassian.net/wiki/spaces/MAD/pages/2156298244#%E5%93%8D%E5%BA%94 ( 请参考每个参数的定义 ) 的响应主体相同。