Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

basePath = /smartfin/api/v1/wh

Warehouses - Post

...

Get company

...

Get warehouse list that is visible to current user

...

Request

URL:

  • {basePath}/select

Method:

  • POST

Headers:

  • Content-Type: application/json

Authorization:

  • JWT { token }

JSON Body:

  • {}

...

Response

...

Table of Contents
minLevel1
maxLevel2
outlinefalse
typelist
printablefalse

Base Url: /smartfin/api/v1/wh

Retrieve Warehouse’s Data

...

POST/smartfin/api/v1/whitelist/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:

Code Block
{}

Response

Example:

Code Block
{
    "error_code": 0,
    "value": {
        
"u_name
"whs": 
null },
[
            {
                "wh_id": 
165
174,
                "wh_name": "
2
JIJI",
                "update_time": 
"2023-08-23 14:31:04"
null,
                "update_by": 
65
null,
                "create_by": 2,
                "create_time": "2023-
08
11-
23
01 
14
11:
07
50:
39
35",
                "user_id": 
65
null,
                "wh_entity": "
KKK1
KIKIK",
                "wh_add": "
KKK
OOOO",
                "company_id": 119,
                "c_name": "test2",
                "u_name": 
"Careers"
null
            },
            {
                "wh_id": 
164
165,
                "wh_name": "
KKK
2",
                "update_time": 
null
"2023-08-23 14:31:04",
                "update_by": 
null
65,
                "create_by": 2,
                "create_time": "2023-08-23 14:07:
19
39",
                "user_id": 
null
65,
                "wh_entity": "
KKK
KKK1",
                "wh_add": "KKK",
                "company_id": 119,
                "c_name": "test2",
                "u_name": 
null
"Careers"
            },
        ],
        "dropdown_list": {
            "wh_entity": [
                "KKK1",
                "\u4e2d\u50a8\u65b0\u6e2f",
                "MARK",
                "WAREHOUSE",
                "CAR",
                "KIKIK",
                "TEST",
                "CAR1",
                "4",
                "SALESX",
                "NEW E",
                "LOLOLO1",
                "XX",
                "2",
                "\u5170\u8003\u660c\u76db",
                "DGG",
                "1",
                "HAHA",
                "SALES",
                "34",
                "MARKS",
                "BUY ENTITY",
                "ADMIN",
                "MARKX",
                "KKK"
            ],
            "wh_name": [
                "\u4e2d\u50a8\u65b0\u6e2f",
                "54546",
                "MARK",
                "WAREHOUSE",
                "CAR",
                "NEW NAME",
                "TEST",
                "CAR1",
                "55",
                "4",
                "SALESX",
                "\u9752\u5c9b\u6e2f-\u7eac\u56db\u8def",
                "XX",
                "222",
                "2",
                "\u5170\u8003\u660c\u76db",
                "BUY NAME",
                "1",
                "HAHA",
                "SALES",
                "JIJI",
                "MARKS",
                "MARKX",
                "ADMIN",
                "KKK"
            ],
            "validation": []
        }
    }
}

Schema

...

Code Block
whs - 

...

Notes

Returns

...

a list of objects (whs), each representing a warehouse (in descending order of wh_id)

...

a list of wh_entity present in the data

...

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 name

  • wh_entity - Warehouse Entity

  • wh_add - Warehouse address

Info

wh_name , wh_entity and wh_add cannot be duplicated,

  • Eg. wh_name of ‘WAREHOUSE' , wh_entity of ‘ENTITY’ wh_add of 'ADDRESS’ will not allow to be stored if the same wh_name , wh_entity and wh_add has been created in database.

Code Block
validation - array[string]

  • a list of validation that been used to indicate the list that is not able to add a new value (it is empty, all of the lists are able to update and add a new value)

Warehouses - Upsert ( Update/ Insert )

...