Inventory Manager
Go to file
2020-10-19 10:41:40 -05:00
templates/ui Reformat code 2020-10-19 10:41:40 -05:00
.gitignore Add Visual Studio Code to .gitignore 2020-10-06 16:18:51 -05:00
.pylintrc Update all routes to use SQLAlchemy 2020-10-05 01:00:50 -05:00
libdb.py Finish API 2020-10-05 19:22:24 -05:00
LICENSE Initial commit 2020-09-23 17:59:11 -05:00
postgres.ini.default Add postgres.ini.default 2020-10-05 19:25:03 -05:00
README.md Write README.md 2020-10-16 18:56:31 -05:00
requirements.txt Begin rewrite from psycopg2 to SQLAlchemy 2020-10-04 21:12:09 -05:00
webapi.py Reformat code 2020-10-19 10:41:40 -05:00
webui.py Add purchases and uses pages 2020-10-08 23:49:14 -05:00

InvMan

Table of Contents

  1. What is InvMan?
  2. API Usage
    1. GET Requests
    2. POST Requests

What is InvMan?

InvMan is a Flask app which provides a web API and web UI to keep inventory using a PostgreSQL backend.


API Usage

GET requests (getting information)


Please keep in mind:

  • Text surrounded by [ and ] are parameters which should be replaced.
  • Names are case-sensitive.

Get a list of locations

GET /api/v1/locations

Get information about a location

GET /api/v1/location/name/[location-name]

Get the quantities of all products at a location

GET /api/v1/location/[location-name]/quantities

Get the quantity of a product (by UPC) at a location

GET /api/v1/location/[location-name]/quantity/upc/[product-upc]

Get the quantity of a product (by name) at a location

GET /api/v1/location/[location-name]/quantity/name/[product-name]

Get a list of products

GET /api/v1/products

Get information about a product (by UPC)

GET /api/v1/product/upc/[product-upc]

Get information about a product (by name)

GET /api/v1/product/name/[product-name]

Get a list of brands

GET /api/v1/brands

Get information about a brand

GET /api/v1/brand/name/[brand-name]

Get a list of units

GET /api/v1/units

Get information about a unit (by name)

GET /api/v1/unit/name/[unit-name]

Get a list of purchases

GET /api/v1/purchases

Get information about a purchase (by id)

GET /api/v1/purchase/id/[purchase-id]

Get a list of uses

GET /api/v1/uses

Get information about a use (by id)

GET /api/v1/purchase/id/[use-id]

POST Requests (creating objects)


Create a location

POST /api/v1/create_location
Argument Name Description Required?
name Name of the location Yes
description Description of the location No

Request form:

Create a brand

POST /api/v1/create_brand
Argument Name Description Required?
name Name of the brand Yes
description Description of the brand No

Request form:

Create a unit

POST /api/v1/create_unit
Argument Name Description Required?
name Name of the unit Yes
description Description of the unit No

Request form:

Create a product

POST /api/v1/create_product
Argument Name Description Required?
upc UPC of the product Yes
brand Brand which makes the product Yes
name Name of the product Yes
size Size of the product Yes
sizeunit Unit used in size Yes
description Description of the product No

Request form:

Create a purchase

POST /api/v1/create_purchase
Argument Name Description Required?
upc UPC of the product which was purchased Yes
quantity Quantity of the product purchased Yes
date Date of this purchase Yes
location Location to link this purchase to Yes

Create a use

POST /api/v1/create_use
Argument Name Description Required?
upc UPC of the product which was used Yes
quantity Quantity of the product used Yes
date Date of this usage Yes
location Location to link this usage to Yes