Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Base Url: /smartfin/api/v1/whitelist
...
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:
...
Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
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:
| ||
Returns
|
Company - Upsert ( Update/ Insert )
...
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
...
Schema
...
Code Block |
---|
last_update_time, update_by_name, update_by - string |
Information about last updated time for the data and the user who updating the data.
Code Block |
---|
create_time, create_by, create_by_name - string |
Information about created time for the data and the user who creating the data.
Code Block |
---|
user_id, entity_id, company_id - integer |
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.
Code Block |
---|
entity_name, entity_type - string |
entity_name
- Company nameentity_type
- Company type (COUNTERPARTY
orBROKER
)
Info |
---|
|
Code Block |
---|
address, email, tel, country, credit_amt, invoice_code, invoice_add, invoice_bank,
reg_no, credit_ccy, fax_no - string |
Extra information of the company data
Code Block |
---|
invalid - boolean |
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
...
Code Block |
---|
insert_list - array[object] |
Contain the same parameters as
items
in response body of https://mafint.atlassian.net/wiki/spaces/MAD/pages/2128150536/Entity+Management#Responses ( Refer to the definition of each parameter )entity_id
does not need to be parsed and not required in this arrayConsists of new company data to be inserted into database.
Code Block |
---|
update_list - array[object] |
Contain the same parameters as
items
in response body of https://mafint.atlassian.net/wiki/spaces/MAD/pages/2128150536/Entity+Management#Responses ( Refer to the definition of each parameter )Consists of existing company data to be updated into database.
Response
Example:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
Schema
...
Code Block |
---|
insert_list - array[object] |
Contain the same parameters as
items
in response body of https://mafint.atlassian.net/wiki/spaces/MAD/pages/2128150536/Entity+Management#Responses ( Refer to the definition of each parameter )The array list contains data of failed and successful inserts
Code Block |
---|
update_list - object
updated - array[object]
failed - array[object] |
Contain the same parameters as
items
in response body of https://mafint.atlassian.net/wiki/spaces/MAD/pages/2128150536/Entity+Management#Responses ( Refer to the definition of each parameter )updated
consists of data that has been updated successfully ,wherefailed
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.
Warning |
---|
Insert process will fail if there is an existing |
...
company with the same Update |
...
process will fail if there is an existing |
...
company with the same |
entity_type can be empty ''
Company - Delete
...
Delete Company
...
DELETE/smartfin/api/v1/whitelist
Deletes single / multiple company
...
according to its entity_id
...
Request
URL:
{basePath}
Method:
...
Authentication / Authorization
- API Key
Headers
Schema
...
Headers:
Content-Type: application/json
Authorization:
string - JWT
...
<<YOUR_API_KEY_HERE>> (required)
Request
Example:
JSON Body:
|
Code Block |
---|
del_id_list |
...
Code Block |
---|
[2824] |
...
Response
- array |
A list that consists of unique
entity_id
, that user would like to delete from.
Response:
Example:
|
|
Notes
Return a list of object named
value
, each object containsentity_id
that indicates the company that has been deleted successfully.