Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
...
基准URL: /smartfin/api/v1/stockmgmt
Info |
---|
The response of the following APIs will be returned as compressed form. To decompress it, please install 以下API的响应将以压缩形式返回。要对其进行解压缩,请安装https://www.npmjs.com/package/pako plugin and using the specific function ( |
Info |
During the implementation of HTTP service, |
Info |
---|
在实现HTTP服务时,每个请求的 |
Code Block |
---|
headers: new HttpHeaders({ 'Content-Type': 'application/json' }), responseType: 'arraybuffer' as 'json' |
...
获取库存明细
...
POST /smartfin/api/v1/stockmgmt/select
Get all stocks that are visible to current user.
Authentication / Authorization
- API Key
Headers
Schema
Headers获取当前用户可见的所有库存。
验证 / 授权
- API密钥(令牌)
请求标头
架构
...
请求标头:
Content-Type: application/json
Authorization:Authorization (验证):
string - JWT <<YOUR_API_KEY_HERE>> (required<<您的API密钥(令牌)>> (必填项)
...
请求载荷
Example例子:
JSON Body:JSON主体:
|
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] |
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 根据在请求主体中提供的合同ID过滤库存 ( 每个库存明细都分配给一个合同ID,响应将仅返回具有给定合同ID的库存,而不考虑解析的
s_date and
和e_date
parsed.。 )
...
响应
Example例子:
| ||
Returns
|
...
返回
|
架构
...
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, stock_id, phy_trade_id, wh_id - integer |
user_id
- User Id ( who the data belongs to) 用户ID(数据所属的用户)stock_id
- A unique ID assigned to the data. This ID can be used to retrieve stock details.分配给数据独立ID。该ID可用于检索库存明细。phy_trade_id
- The physical trade id that assigned with the stock.wh_id
- The warehouse id that are assigned with the stock.与库存关联的合同ID。
Code Block |
---|
group_name - string maf_group_id - integer |
maf_group_id
- A unique group ID where the stock belongs to.库存所属的独立群组ID。
Code Block |
---|
wh_add, wh_entity, wh_name - string wh_id - integer |
wh_id
- A unique warehouse ID where the stock belongs to.与库存关联的仓储ID。wh_add, wh_entity, wh_name
- related details of the warehouse.
Update / Insert Stock Details
...
仓储的相关细节。
更新 / 输入库存明细
...
更新URL:
POST/smartfin/api/v1/stockmgmt/execution_update
Insert输入URL:
POST/smartfin/api/v1/stockmgmt/execution_insert
Insert new or update existing stock details into database
Authentication / Authorization
- API Key
Headers
Schema
Headers将新的库存明细输入或更新到数据库中。
验证 / 授权
- API密钥(令牌)
请求标头
架构
...
请求标头:
Content-Type: application/json
Authorization:Authorization (验证):
string - JWT <<YOUR_API_KEY_HERE>> (required)
Request ( Update )
...
<<您的API密钥(令牌)>> (必填项)
请求载荷 ( 更新 )
例子:
JSON Body主体:
|
...
请求载荷 (
...
输入 )
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] |
...
将被更新的合同ID(当传递有效合同ID时,将更新合同的库存明细,如出入库数量、未出入库数量等)。
Code Block |
---|
insert_list - array[object] |
包含与
stmg
于 https://mafint.atlassian.net/wiki/spaces/MAD/pages/2146304017#Response ( Please refer to the request body 2146304017#%E5%93%8D%E5%BA%94 相同的参数 ( 请参考上述 https://mafint.atlassian.net/wiki/spaces/MAD/pages/2146304017#Request2146304017#%E8%AF%B7%E6%B1%82%E8%BD%BD%E8%8D%B7--(-Insert%E8%BE%93%E5%85%A5-) 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 包含与stmg
于 https://mafint.atlassian.net/wiki/spaces/MAD/pages/2146304017#Response ( Please refer to the request body 2146304017#%E5%93%8D%E5%BA%94 相同的参数 (请参考上述 https://mafint.atlassian.net/wiki/spaces/MAD/pages/2146304017#Request2146304017#%E8%AF%B7%E6%B1%82%E8%BD%BD%E8%8D%B7-(-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 %EF%BC%88-%E6%9B%B4%E6%96%B0-%EF%BC%89 请求主体中需要包含的必需参数 )
包含要更新到数据库中的现有库存明细。
响应:
与 https://mafint.atlassian.net/wiki/spaces/MAD/pages/2146304017#Response ( Refer to the definition of each parameter )
...
2146304017#%E5%93%8D%E5%BA%94 ( 请参考每个参数的定义 ) 的响应主体相同。
删除库存明细
...
DELETE/smartfin/api/v1/stockmgmt/delete
Deletes single / multiple stock details according to its 根据其 stock_id
删除单个/多个库存明细。
...
验证 /
...
授权
- API KeyAPI密钥(令牌)
...
请求标头
Schema架构
...
Headers请求标头:
Content-Type: application/json
Authorization:Authorization (验证):
string - JWT <<YOUR_API_KEY_HERE>> (required<<您的API密钥(令牌)>> (必填项)
...
请求载荷
Example例子:
JSON Body主体:
|
Code Block |
---|
del_ids - array[integer] |
An array that consists unique
stock_id
, that user would like to delete from.包含用户删除的独立stock_id的数组。
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 将被更新的合同ID(当传递有效合同ID时,将更新合同的库存明细,如出入库数量、未出入库数量等)。
响应:
与 https://mafint.atlassian.net/wiki/spaces/MAD/pages/2146304017#Response ( Refer to the definition of each parameter )2146304017#%E5%93%8D%E5%BA%94 ( 请参考每个参数的定义 ) 的响应主体相同。