Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Base Url: /smartfin/api/v1/stockmgmt
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 ( |
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
- API Key
Headers
Schema
...
Headers:
Content-Type: application/json
...
string - JWT <<YOUR_API_KEY_HERE>> (required)
Request
Example:
JSON Body:
|
...
Filter the stock details according to the physical trade id given in the body (each stock detail is assigned to a physical trade id. The response will only return the stock with the given physical trade id, regardless of
s_date and e_date
parsed.)
Response
Example:
| ||
Returns
|
...
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
...
string - JWT <<YOUR_API_KEY_HERE>> (required)
Request ( Update )
Example:
JSON Body:
|
Request ( Insert )
Example:
JSON Body:
|
...
Contain the same parameters as
stmg
in response body of https://mafint.atlassian.net/wiki/spaces/MAD/pages/2143158293/Stock+Details#Response2146304017#Response ( Please refer to the request body https://mafint.atlassian.net/wiki/spaces/MAD/pages/2143158293/Stock+Details#Request2146304017#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.
...
Contain the same parameters as
items
in response body of https://mafint.atlassian.net/wiki/spaces/MAD/pages/2143158293/Stock+Details#Response2146304017#Response ( Please refer to the request body https://mafint.atlassian.net/wiki/spaces/MAD/pages/2143158293/Stock+Details#Request2146304017#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#Response2146304017#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
...
string - JWT <<YOUR_API_KEY_HERE>> (required)
Request
Example:
JSON Body:
|
...
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#Response2146304017#Response ( Refer to the definition of each parameter )