Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel2
outlinefalse
typelist
printablefalse

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


获取公司数据

...

POST /smartfin/api/v1/whitelist/select

获取当前用户可见的所有公司数据。

验证 / 授权

  •  API密钥(令牌)

请求标头

架构

...

请求标头:

  • Content-Type: application/json

...

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

响应

例子:

Code Block
{
    "error_code": 0,
    "value": {
        "list": [
            {
                "entity_id": 261580,
                "company_id": 119,
                "entity_name": "TESTUPLOADFILE1",
                "entity_type": "COUNTERPARTY",
                "address": null,
                "email": null,
                "tel": null,
                "country": null,
                "create_by": 2,
                "create_time": "2024-01-18 10:27:51",
                "update_by": 2,
                "update_time": "2024-01-18 10:40:04",
                "user_id": 2,
                "credit_amt": 2345.0,
                "invoice_code": "234",
                "invoice_add": null,
                "invoice_bank": null,
                "reg_no": null,
                "entity_ccy": "DOP",
                "fax_no": null,
                "invalid": null,
                "client_attr": [
                    1,
                    2
                ],
                "reg_cap": 0.0,
                "own_eq": 0.0,
                "credit_score": 0.0,
                "credit_lvl": 0.0,
                "rec_credit_amt": 0.0,
                "aff_group": null,
                "biz_abbrev": null,
                "aff_group_credit_amt": 0.0,
                "company_auth_amt": "",
                "aff_group_auth_amt": "",
                "c_name": "test2",
                "u_name": "test2"
            },
            ...
        ],
        "dropdown_list": {
            "entity_name": [
                "CONN",
                "上海嵘亿国际贸易有限公司",
                "U",
                "BASIS TRADE CHINA",
                "OKOKOK",
                "SALES4",
                "1",
                "123",
                ...
            ],
            "aff_group": [
                "ADSF"
            ],
            "validation": [
                "entity_type",
                "client_attr"
            ],
            "entity_type": [
                "COUNTERPARTY",
                "BROKER"
            ],
            "client_attr": [
                {
                    "value": 1,
                    "label": "DOMESTIC TRADE COUNTERPARTY"
                },
                {
                    "value": 2,
                    "label": "FOREIGN TRADE COUNTERPARTY"
                }
            ]
        }
    }

返回

  • 一个名为list的对象列表,每个对象表示一个公司数据 ( 按entity_id降序排列 )

  • 一个名为dropdown_list的列表,其中包含在输入/更新公司数据时使用的各种选择列表。

...

Code Block
invalid - boolean

公司的现状 (true (停用) or ““ )

更新 / 输入公司数据

...

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

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

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

验证 / 授权

  •  API密钥(令牌)

请求标头

架构

...

请求标头:

  • Content-Type: application/json

...

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

请求载荷 ( 更新 )

例子:

JSON 主体:

Code Block
{
   "update_list":[
      {
         "entity_id":261580,
         "entity_name":"TESTUPLOADFILE1",
         "entity_type":"COUNTERPARTY",
         "address":"Address",
         "email":"",
         "tel":"",
         "fax_no":"",
         "country":"",
         "credit_amt":2345,
         "entity_ccy":"DOP",
         "invoice_code":"234",
         "invoice_add":"",
         "invoice_bank":"",
         "reg_no":"",
         "invalid":"",
         "client_attr":[
            1,
            2
         ],
         "reg_cap":0,
         "own_eq":0,
         "credit_score":0,
         "credit_lvl":0,
         "rec_credit_amt":0,
         "aff_group":"",
         "biz_abbrev":"",
         "aff_group_credit_amt":0,
         "company_auth_amt": "",
         "aff_group_auth_amt": "",
      }
   ]
}

请求载荷 ( 输入 )

例子:

JSON 主体:

Code Block
{
   "insert_list":[
      {
         "entity_id":"",
         "entity_name":"test company",
         "entity_type":"BROKER",
         "address":"",
         "email":"",
         "tel":"",
         "fax_no":"",
         "country":"",
         "credit_amt":"",
         "entity_ccy":"",
         "invoice_code":"",
         "invoice_add":"",
         "invoice_bank":"",
         "reg_no":"",
         "invalid":"",
         "client_attr":"",
         "reg_cap":"",
         "own_eq":"",
         "credit_score":"",
         "credit_lvl":"",
         "rec_credit_amt":"",
         "aff_group":"",
         "biz_abbrev":"",
         "aff_group_credit_amt":"",
         "company_auth_amt": "",
         "aff_group_auth_amt": "",
      }
   ]
}

...

响应:

删除公司数据

...

DELETE/smartfin/api/v1/whitelist/delete

根据其 entity_id 删除单个/多个公司数据。

验证 / 授权

  •  API密钥(令牌)

请求标头

架构

...

请求标头:

  • Content-Type: application/json

...

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

请求载荷

例子:

JSON 主体:

Code Block
{
  "del_ids":[261579]
}
Code Block
del_ids - array[integer]
  • 包含用户删除的独立entity_id的数组。

响应: