Skip to content

This is a backend for an eccomerce platform. It is made public, so you can interact with it. Built with NodeJS

Notifications You must be signed in to change notification settings

Ayobamiu/Backend-with-NodeJS---Ecommerce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This is a backend for an eccomerce platform. It is made public, so you can interact with it. Use Postman to interact with the backend.

Guides

Create user at https://ecommerce-usman.herokuapp.com/users . This endpoint takes three {key:value} as input

Type POST

inputs

  - input 1 {name : Type(String)}
  - input 2 {email: Type(email)} 
  - input 3 {password: Type(String)} 

response

  - User 
  -token 

https://ecommerce-usman.herokuapp.com/users returns User details plus {token: Type(String)}. Copy the token and use as Authentication Headers
Set {headers: {Authentication: Bearer <token>}}

Endpoints

Enpoint

  https://ecommerce-usman.herokuapp.com/products 

Name

  Create Product 

Type

  POST 

inputs

 - input 1 `{images : Type(file)}` (multiple)
 - input 2 `{title: Type(String)}`
 - input 3 `{description: Type(String)}`
 - input 4 `{price: Type(Number)}`

response

  -Product
  -User

Enpoint

  https://ecommerce-usman.herokuapp.com/products 

Name

  Get Products      

Type

  GET   

response

  -Products
  -Users

Enpoint

  https://ecommerce-usman.herokuapp.com/products/<id> 

Name

  Get product by ID 

Type

  GET 

inputs

response

  -Product
  -User

Enpoint

  https://ecommerce-usman.herokuapp.com/products/<id> 

Name

  Delete Product       by ID

Type

  Delete   

response

  -Product
  -User

Enpoint

  https://ecommerce-usman.herokuapp.com/products/<id> 

Name

  Update product by ID 

Type

  PATCH 

inputs

response

  -Product
  -User

Enpoint

  https://ecommerce-usman.herokuapp.com/users 

Name

  Create User 

Type

  POST 

inputs

 - input 1 `{name : Type(String)}`
 - input 2 `{email: Type(email)}`
 - input 3 `{password: Type(String)}`

response

  -User
  -token

Enpoint

  https://ecommerce-usman.herokuapp.com/users/login 

Name

  Login User 

Type

  POST 

inputs

 - input 1 `{email: Type(email)}`
 - input 2 `{password: Type(String)}`

response

  -User
  -token

Enpoint

  https://ecommerce-usman.herokuapp.com/users/logout 

Name

  LogoutUser 

Type

  POST 

inputs

response

  -User

Enpoint

  https://ecommerce-usman.herokuapp.com/users/me 

Name

  Get profile 

Type

  POST 

inputs

response

  -User

Enpoint

  https://ecommerce-usman.herokuapp.com/users/me 

Name

  Update profile 

Type

  PATCH 

inputs

 - input 1 `{name : Type(String)}`
 - input 2 `{email: Type(email)}`
 - input 3 `{password: Type(String)}`

response

  -User

Enpoint

  https://ecommerce-usman.herokuapp.com/users/me 

Name

  Delete profile 

Type

  DELETE 

inputs

response

  -User

Enpoint

  https://ecommerce-usman.herokuapp.com/users/me/image 

Name

  Upload user image 

Type

  POST 

inputs

 - input 1 `{image: Type(File)}`

response

  -User

Enpoint

  https://ecommerce-usman.herokuapp.com/users/me/image 

Name

  Update user image 

Type

  PATCH 

inputs

 - input 1 `{image: Type(File)}`

response

  -User

Enpoint

  https://ecommerce-usman.herokuapp.com/users/me/image 

Name

  Delete user image 

Type

  DELETE 

inputs

response

  -User

Enpoint

  https://ecommerce-usman.herokuapp.com/carts/<productID> 

Name

  Add cart by Product ID 

Type

  POST 

inputs

response

  -Cart
  -User

Enpoint

  https://ecommerce-usman.herokuapp.com/carts 

Name

  Get carts 

Type

  GET 

inputs

response

  -Carts
  -Users

Enpoint

  https://ecommerce-usman.herokuapp.com/carts/<cartID> 

Name

  Delete cart by ID 

Type

  PATCH 

inputs

response

  -Cart
  -User

Enpoint

  https://ecommerce-usman.herokuapp.com/orders/<cartID> 

Name

  Add order by Product ID 

Type

  POST 

inputs

response

  -Order
  -User

Enpoint

  https://ecommerce-usman.herokuapp.com/orders 

Name

  Get orders 

Type

  GET 

inputs

response

  -orders
  -Users

Enpoint

  https://ecommerce-usman.herokuapp.com/orders/<orderID> 

Name

  Delete order by ID 

Type

  PATCH 

inputs

response

  -order
  -User

About

This is a backend for an eccomerce platform. It is made public, so you can interact with it. Built with NodeJS

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published