Skip to content

thangdjw/java-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API List

User Service

used to management user info

Retrieve user info

GET /api/user/{id}
param type description
id string id of user

Add new User

POST /api/user
body type description
fullName string user name
birthDay yyyy-MM-dd birthday of user
location string current living state
language string language code. ex : vn

Update user info

PUT /api/user
body type description
fullName string user name
birthDay yyyy-MM-dd birthday of user
location string current living state
language string language code. ex : vn

Product Service

Used to management product info


Search product by identity with filter

GET /api/product/search/{identity}
param type description
identity string product name, or barcode
query type description
filter_name string exactly name of product
filter_lt_price float filter product with price <= given price
filter_gt_price float filter product with price >= given price
filter_owner string filter product by seller
filter_producer string filter product by maker
filter_species string filter product by species
sort_name boolean true if products sort desc by name
sort_price boolean true if products sort desc by price

Get product by id

GET /api/product/{id}
param type description
id number id of target product

Add a product

POST /api/product
body type description
barcode number barcode of product
name string name of product
image string[] list of product image url
ownerId string seller user id
producer string company or national who make this product
description string product information
version string version of this product
price float price of this product
species string species of this product. Ex : iphone

Update product info

PUT /api/product/{id}
body type description
barcode number barcode of product
name string name of product
image string[] list of product image url
ownerId string seller user id
producer string company or national who make this product
description string product information
version string version of this product
price float price of this product
species string species of this product. Ex : iphone

Order service

used to create & manager order to buy a product

Get order by id

GET /api/order/{id}
param type description
id number id of target order

Add new order

POST /api/order
body type description
clientId string user id of this client
productId string id of target product
amount string[] number of order of this product
totalPrice string price of this order
deliveryAddress string address to delivery this product
transporter string shipper. include : SHIPPO, GIAO_HANG_NHANH, GIAO_HANG_TIET_KIEN
status string status of this order. include : COMPLETE, CANCEL, DELAY, WAIT

About

simple backend api using spring boot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages