REST API to manage order transaction.
- Go 1.8.x+
- MongoDB 3.4.x+
Install packages by issuing in cmd:
go get gopkg.in/validator.v2
go get github.com/julienschmidt/httprouter
go get gopkg.in/mgo.v2
go get gopkg.in/mgo.v2/bson
- GET /customer/:id - Find customer info by id
- POST/customer - Create new customer
- DELETE /customer/:id - Remove customer by id
- GET /product/:id - Find product by id
- POST /product - Create new product
- POST /product/:id/reduce/:quantity - Reduce product quantity
- DELETE /product/:id - Remove product by id
- GET /coupon/:id - Find coupon by id
- GET /coupon/:id/valid - Check if coupon is valid by its starting date and expired date
- POST /coupon - Create new coupon
- POST /coupon/:id/reduce/:quantity - Reduce coupon quantity
- DELETE /coupon/:id - Remove coupon by id
- GET /order/:id - Find order by id
- POST /order - Create new order
- PUT /order/ - Adding orderLine which contains productId and quantity (when ordering)
- DELETE /order/:id - Remove order by id
- GET /shipment/:id - Find shipment status by id
- POST /shipment - Create new shipment
- DELETE /shipment/:id - Remove shipment by id
MIT