Git Product home page Git Product logo

ims-backend's Introduction

EndPoints:

	•	/transactions/new/map
	•	/purchases/all
	•	/products/all
	•	/sales/all
  

INVENTORY PRODUCTS TABLE:

TO ADD A NEW RECORD FOR "PRODUCTS" • /products/all

	Method: POST
	/products/all
  • Body must contain the following:
	 {
  	 "item":"chocolate",
	 "description":"food",
	 "quantity":"7"
         }
  • First: Item Name and description
  • Second: you must put an initial quantity

TO GET ALL RECORDS OF "PRODUCTS"

	Method: GET
	/products/all
  • Retrieves all records (products) and the related Transactions of each item

INVENTORY PURCHASES TABLE • /purchases/all

TO ADD A NEW RECORD FOR "PURCHASES"

	Method: POST
	/purchases/all
  • Adds a record with id and Creation Date

TO GET ALL RECORDS OF "PURCHASES"

	Method: GET
	/purchases/all
  • Retrieves all records on this table, including the related products

INVENTORY SALES TABLE: • /sales/all

TO ADD A NEW RECORD FOR "SALES"

	Method: POST
	/sales/all
  • Adds a record with id and Creation Date

TO GET ALL RECORDS OF "SALES"

	Method: GET
	/sales/all
  • Retrieves all records on this table, including the related product

INVENTORY TRANSACTIONS TABLE:

TO ADD A NEW RECORD FOR "TRANSACTIONS" (CAN BE IN OR OUT)

	Method: POST
	/transactions/new
  • Body must contain the following: (AT LEAST ONE OR MORE OBJECTS)
	{
	"products_id":3,
	"quantity":5,
	"purchases_id": null
	},
  {
	"products_id":4,
	"quantity":5,
	"purchases_id": null
	}
  • First you should have a product with an initial quantity

  • Second: if it's a sale you must not include the sales_id, because it will be created automatically, and viceversa with purchases, but you must include purchases_id = null, and viceversa

  • third: you must set a warehouse_id, that's mandatory, consider the following: 1.MAIN 2.MOTORCYCLE1 3.MOTORCYCLE2 4.MOTORCYCLE3

  • If its a PURCHASE you should set the quantity amount to positive, if its SALE you should set it to negative (example : -3)

TO GET ALL RECORDS OF "TRANSACTIONS" • /transactions/new/map

	Method: GET
	/transactions/new/map
  • Retrieves all records on this table

ims-backend's People

Contributors

alesanchezr avatar sebastianpd1 avatar hernanjkd avatar

Stargazers

Denisse Orellana avatar PaolaC avatar  avatar ColbyWTaylor avatar

Watchers

James Cloos avatar PaolaC avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.