Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
minLevel | 1 | maxLevel | ||||||||
Table of Contents | ||||||||||
|
...
Info |
---|
The response of the following APIs will be returned as compressed form. To decompress it, please install https://www.npmjs.com/package/pako plugin and using the specific function ( |
...
POST /smartfin/api/v1/stockmgmt/select
Get all stocks that are visible to current user.
Info |
---|
During the implementation of HTTP service, |
Code Block |
---|
headers: new HttpHeaders({
'Content-Type': 'application/json'
}),
responseType: 'arraybuffer' as 'json' |
Retrieve Stock Details
...
POST /smartfin/api/v1/stockmgmt/select
Get all stocks that are visible to current user.
Authentication / Authorization
...
JSON Body:
|
Schema
...
Code Block |
---|
s_date, e_date - 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, stock_id, phy_trade_id, wh_id - integer |
user_id
- User Id ( who the data belongs to)stock_id
- A unique ID assigned to the data. This ID can be used to retrieve stock details.phy_trade_id
- The physical trade id that assigned with the stock.wh_id
- The warehouse id that are assigned with the stock.
Update / Insert Stock Details
...
Insert new or update existing stock details into database
Authentication / Authorization
- API Key
Headers
Schema
Headers:
Content-Type: application/json
Authorization:
string - JWT <<YOUR_API_KEY_HERE>> (required)
Request ( Update )
Example:
JSON Body:
...
Code Block |
---|
group_name - string
maf_group_id - integer |
maf_group_id
- A unique group ID where the stock belongs to.
Code Block |
---|
wh_add, wh_entity, wh_name - string
wh_id - integer |
wh_id
- A unique warehouse ID where the stock belongs to.wh_add, wh_entity, wh_name
- related details of the warehouse.
Update / Insert Stock Details
...
Update:
POST/smartfin/api/v1/stockmgmt/execution_update
Insert:
POST/smartfin/api/v1/stockmgmt/execution_insert
Insert new or update existing stock details into database
Authentication / Authorization
- API Key
Headers
Schema
...
Headers:
Content-Type: application/json
Authorization:
string - JWT <<YOUR_API_KEY_HERE>> (required)
Request ( Update )
Example:
JSON Body:
|
Request ( Insert )
Example:
JSON Body:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Request ( Insert )
Example:
JSON Body:
|
Schema
...
Code Block |
---|
s_date, e_date - string |
Filter the stocks according to the given date range ( s_date = start date, e_date = end date )
Code Block |
---|
phy_trade_ids - array[number] |
The physical trade id/s that will be updated ( when the valid id is parsed, the trade’s stock details will be updated ( stock quantity, un-stock quantity etc.) )
Code Block |
---|
insert_list - array[object] |
Contain the same parameters as
stmg
in response body of https://mafint.atlassian.net/wiki/spaces/MAD/pages/2143158293/Stock+Details#Response ( Please refer to the request body https://mafint.atlassian.net/wiki/spaces/MAD/pages/2143158293/Stock+Details#Request-(-Insert-) above for the required parameters that needs to be included into request )stock_id
does not need to be parsed and not required in this arrayConsists of new stock detail/s 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/2143158293/Stock+Details#Response ( Please refer to the request body https://mafint.atlassian.net/wiki/spaces/MAD/pages/2143158293/Stock+Details#Request-(-Update-) above for the required parameters that needs to be included into request )Consists of existing stock detail/s to be updated into database.
Response:
Same as the response body from https://mafint.atlassian.net/wiki/spaces/MAD/pages/2143158293/Stock+Details#Response ( Refer to the definition of each parameter )
Delete Stock Details
...
DELETE/smartfin/api/v1/stockmgmt/delete
Deletes single / multiple stock details according to its stock_id
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 |
---|
s_date, e_date - string |
Filter the stocks according to the given date range ( s_date = start date, e_date = end date )
Code Block |
---|
phy_trade_ids - array[number] |
The physical trade id/s that will be updated ( when the valid id is parsed, the trade’s stock details will be updated ( stock quantity, un-stock quantity etc.) )
Code Block |
---|
insert_list - array[object] |
Contain the same parameters as
stmg
in response body of ( Please refer to the request body above for the required parameters that needs to be included into request )stock_id
does not need to be parsed and not required in this arrayConsists of new stock detail/s to be inserted into database.
Code Block |
---|
update_list - array[object] |
...
Contain the same parameters as items
in response body of ( Please refer to the request body above for the required parameters that needs to be included into request )
...
|
Code Block |
---|
del_ids - array[integer] |
An array that consists unique
stock_id
, that user would like to delete from.
Code Block |
---|
phy_trade_ids - array[number] |
The physical trade id/s that will be updated ( when the valid id is parsed, the trade’s stock details will be updated ( stock quantity, un-stock quantity etc.) )
Response:
Same as the response body from https://mafint.atlassian.net/wiki/spaces/MAD/pages/2143158293/Stock+Details#Response ( Refer to the definition of each parameter )