Base Url: /smartfin/api/v1/whitelist
Retrieve Company’s Data
GET /smartfin/api/v1/whitelist
Get all company data that are visible to current user.
Authentication / Authorization
- API Key
Headers
Schema
GET /smartfin/api/v1/whitelist
Headers:
Content-Type: application/json
Authorization:
string - Bearer <<YOUR_API_KEY_HERE>> (required)
Responses
Example:
{ "error_code": 0, "value": { "items": [ { "last_update_time": "2020-07-20 10:39:29", "user_id": 10, "entity_id": 2909, "create_by_name": "test10", "entity_name": "name", "entity_type": "", "country": "country", "address": "address", "company_id": 1, "create_time": "2020-07-20 10:39:29", "create_by": 10, "update_by": "", "tel": "tel", "update_by_name": "", "email": "email@example.com" }, { "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", "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": "", "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
|
Company - Upsert ( Update/ Insert )
Update/insert company | Inserts/Update company |
---|---|
Request | URL:
Method:
Headers:
Authorization:
JSON Body:
[ { "entity_name": "name", "entity_type": "COUNTERPARTY", "address": "address", "email": "email@example.com", "tel": "tel", "country": "country" } ]
[ { "entity_id": 2385, "entity_name": "updated name", "entity_type": "COUNTERPARTY", "address": "address", "email": "email@example.com", "tel": "tel", "country": "country" } ] |
Response | { "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 Update would fail if there is an existing whitelist with the same entity_type can be empty '' |
Company - Delete
Delete company | Deletes single/ multiple company by id |
---|---|
Request | URL:
Method:
Headers:
Authorization:
JSON Body:
[2824] |
Response | { "error_code": 0, "value": [ { "entity_id": 2824 } ] } |
Notes | Returns only ids that were successfully deleted |