/
Entity Management

Entity Management

 

Base Url: /smartfin/api/v1/whitelist


Retrieve Company Data


GET /smartfin/api/v1/whitelist

Get all company data that are visible to current user.

Authentication / Authorization

API Key

 

Headers

Schema


Headers:

  • Content-Type: application/json

Authorization:

  • string - JWT <<YOUR_API_KEY_HERE>> (required)

 

Responses

Example:

{ "error_code": 0, "value": { "items": [ { "last_update_time": "2020-07-20 10:33:45", "user_id": 10, "entity_id": 2905, "create_by_name": "test10", "entity_name": "name", "entity_type": "", "country": "country", "address": "address", "company_id": 1, "create_time": "2020-07-20 10:33:45", "create_by": 10, "update_by": "", "tel": "tel", "credit_amt": "", "invoice_code": "", "invoice_add": "", "invoice_bank": "", "reg_no": "", "credit_ccy": "", "fax_no": "", "invalid": "", "update_by_name": "", "email": "email@example.com" }, { "last_update_time": "2020-07-20 10:29:33", "user_id": 10, "entity_id": 2901, "create_by_name": "test10", "entity_name": "name", "entity_type": "", "country": "country", "address": "address", "company_id": 1, "create_time": "2020-07-20 10:29:33", "create_by": 10, "update_by": "", "credit_amt": "", "invoice_code": "", "invoice_add": "", "invoice_bank": "", "reg_no": "", "credit_ccy": "", "fax_no": "", "invalid": "", "tel": "tel", "update_by_name": "", "email": "email@example.com" }, .. ], "company_type": [ "OWNER", "COUNTERPARTY" ], "broker": [ "VANTAGE", "BGC", "STEEM1961", "SSY" ], "company_name": [ "VITOL SA", "name", "xyz", "HYUNDAI", "BRITISH AIRWAYS", "CHINA AVIATION OIL (SINGAPORE) CORPORATION LTD", "yyyy", "updated name2", "SC SHIPPING", "qqq", "updated name", "aaaaa", "PTT" ] } }

Returns

  • a list of objects named items, each representing a company (in descending order of entity_id)

  • a list of company_names present in the data

  • a list of company_types present in the data

  • a list of brokers present in the data

Schema


last_update_time, update_by_name, update_by - string

Information about last updated time for the data and the user who updating the data.

create_time, create_by, create_by_name - string

Information about created time for the data and the user who creating the data.

  • user_id - User Id ( who the data belongs to)

  • entity_id - A unique ID assigned to the data. This ID can be used to retrieve company data.

  • company_id - The main company Id for the data.

  • entity_name - Company name

  • entity_type - Company type (COUNTERPARTY or BROKER)

entity_name and entity_type cannot be duplicated,

  • Eg. entity_name of 'COMPANY NAME' will not allow to be stored if the same entity_name has been found in database.

  • Eg. entity_name of ‘COMPANY NAME' and entity_type of 'COUNTERPARTY’ will not allow to be stored if the same entity_name and entity_type has been found in database.

 

Extra information of the company data

The status of company data (true or false)

Update / Insert Company Data


POST /smartfin/api/v1/whitelist

Insert new or update existing company data in database

Authentication / Authorization

API Key

 

Headers

Schema


Headers:

  • Content-Type: application/json

Authorization:

  • string - JWT <<YOUR_API_KEY_HERE>> (required)

 

Request

Example:

JSON Body:

Schema


 

  • Contain the same parameters as items in response body of Entity Management | Responses ( Refer to the definition of each parameter )

  • Consists of existing company data to be updated into database.

Response

Example:

Schema


  • Contain the same parameters as items in response body of Entity Management | Responses ( Refer to the definition of each parameter )

  • The array list contains data of failed and successful inserts

 

  • Contain the same parameters as items in response body of Entity Management | Responses ( Refer to the definition of each parameter )

  • updated consists of data that has been updated successfully ,where failed consists of data that has not been updated in database.

  • The relevant error message will be returned if there are any duplicated data attempting to insert or update into the database.

Insert process will fail if there is an existing company with the same entity_name, entity_type or same entity_name

Update process will fail if there is an existing company with the same entity_name, entity_type or same entity_name

 

Delete Company


DELETE /smartfin/api/v1/whitelist

Deletes single / multiple company according to its entity_id

Authentication / Authorization

API Key

 

Headers

Schema


Headers:

  • Content-Type: application/json

Authorization:

  • string - JWT <<YOUR_API_KEY_HERE>> (required)

 

Request

Example:

JSON Body:

  • A list that consists of unique entity_id, that user would like to delete from.

 

Response:

Example:

  • Return a list of object named value, each object contains entity_id that indicates the company that has been deleted successfully.

 

Related content

Stock Details
Stock Details
Read with this
Warehouses
Warehouses
More like this
公司数据设置
公司数据设置
More like this
额度矩阵
额度矩阵
More like this
获取公司ID接口
获取公司ID接口
More like this
仓储
More like this