Versions Compared

Key

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

...

Base Url: /smartfin/api/v1/whitelist


Retrieve Company’s Data

...

GET /smartfin/api/v1/whitelist

...

The company data’s status (true or false)

Update / Insert

...

Company’s Data

...

Update/insert company

Inserts/Update company

Request

URL:

  • {basePath}

Method:

  • POST

Headers:

  • Content-Type: application/json

Authorization:

  • JWT { token }

JSON Body:

  • insert_list: company/s to be inserted

Code Block
[
  {
    "entity_name": "name",
    "entity_type": "COUNTERPARTY",
    "address": "address",
    "email": "email@example.com",
    "tel": "tel",
    "country": "country"
  }
]
  • update_list: company/s to be updated

Code Block
[
  {
    "entity_id": 2385,
    "entity_name": "updated name",
    "entity_type": "COUNTERPARTY",
    "address": "address",
    "email": "email@example.com",
    "tel": "tel",
    "country": "country"
  }
]

Response

Code Block
{
    "error_code": 0,
    "value": {
        "update_list": {
            "failed": [],
            "updated": [
                {
                    "last_update_time": "2020-07-13 17:01:42",
                    "user_id": 10,
                    "entity_id": 2385,
                    "create_by_name": "test10",
                    "entity_name": "updated name",
                    "entity_type": "COUNTERPARTY",
                    "country": "country",
                    "address": "address",
                    "company_id": 1,
                    "create_time": "2020-06-03 10:10:29",
                    "create_by": 10,
                    "update_by": 10,
                    "tel": "tel",
                    "update_by_name": "test10",
                    "email": "email@example.com"
                }
            ]
        },
        "insert_list": [
            {
                "last_update_time": "2020-07-13 17:01:42",
                "user_id": 10,
                "entity_id": 2876,
                "create_by_name": "test10",
                "entity_name": "name",
                "entity_type": "COUNTERPARTY",
                "country": "country",
                "address": "address",
                "company_id": 1,
                "create_time": "2020-07-13 17:01:42",
                "create_by": 10,
                "update_by": "",
                "tel": "tel",
                "update_by_name": "",
                "email": "email@example.com"
            }
        ]
    }
}

Notes

The returned insert_list contains data of failed and successful inserts

The returned update_list contains data of failed and successful updates

Insert would fail if there is an existing whitelist with the same entity_name, entity_type or same entity_name

Update would fail if there is an existing whitelist with the same entity_name, entity_type or same entity_name

entity_type can be empty ''

...