Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Base Url: /smartfin/api/v1/wh
Retrieve Warehouse’s Data
...
POST/smartfin/api/v1/wh/select
Retrieve all of the warehouse’s data under the current user
Authentication / Authorization
- API Key
Headers
Schema
...
Headers:
Content-Type: application/json
Authorization:
string - JWT <<YOUR_API_KEY_HERE>> (required)
Request
Example:
JSON Body:
|
Response
Example:
|
Schema
...
In whs
,
Code Block |
---|
whs - array[object] |
An array of object that contains warehouse’s data
Code Block |
---|
update_time, u_name, update_by - string |
Information about last updated time for the data and the user who updating the data.
Code Block |
---|
create_time, c_name, create_by - string |
Information about created time for the data and the user who creating the data.
Code Block |
---|
user_id, wh_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 warehouse data.company_id
- The main company Id for the data.
Code Block |
---|
wh_name, wh_entity, wh_add - string |
wh_name
- Warehouse namewh_entity
- Warehouse Entitywh_add
- Warehouse address
Info |
---|
|
In dropdown_list
,
Code Block |
---|
wh_entity , wh_name - array[string] |
a list of
string
that serve as dropdown list for selection purpose.
Code Block |
---|
validation - array[string] |
a list of
validation
that been used to indicate the name of array indropdown_list
that is not able to add a new value (it is empty, all of the array are able to update and add a new value
Update / Insert Warehouse Data
...
POST/smartfin/api/v1/wh/upsert
Insert new or update existing warehouse 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
whs
in response body of https://mafint.atlassian.net/wiki/spaces/MAD/pages/2128248833/Warehouses#Retrieve-Warehouse%E2%80%99s-Data ( Refer to the definition of each parameter )wh_id
does not need to be parsed and not required in this arrayConsists of new warehouse data to be inserted into database.
Code Block |
---|
update_list - array[object] |
Contain the same parameters as
whs
in response body of https://mafint.atlassian.net/wiki/spaces/MAD/pages/2128248833/Warehouses#Retrieve-Warehouse%E2%80%99s-Data ( Refer to the definition of each parameter )Consists of existing warehouse data to be updated into database.
Warning |
---|
Insert process would fail if there is an existing warehouse with the same Update process would fail if there is an existing warehouse with the same |
Response:
Same as the response body from https://mafint.atlassian.net/wiki/spaces/MAD/pages/2128248833/Warehouses#Retrieve-Warehouse%E2%80%99s-Data ( Refer to the definition of each parameter )
Delete Warehouse Data
...
DELETE/smartfin/api/v1/wh/delete
Deletes single / multiple warehouse data according to its wh_id
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_ids - array[integer] |
An array that consists of unique
wh_id
, that user would like to delete from.
Response:
Same as the response body from https://mafint.atlassian.net/wiki/spaces/MAD/pages/2128248833/Warehouses#Retrieve-Warehouse%E2%80%99s-Data ( Refer to the definition of each parameter )