To use the routes using deployed link (heroku , cyclic) you can replace localhost link with the deployed link
Get Request
http://localhost:3005/api/v1/products
Post Request
http://localhost:3005/api/v1/product/new
{
"payload":{
"name" : "i phone 8",
"price": 15000,
"description" : "Old is gold but here is 8",
"categories" : "Smartphones",
"images" : {
"public_id" : "sample id",
"url" : "http://google.com"
}
}
}
Put Request
http://localhost:3005/api/v1/product/6385851169cc1ec39c296460
{
"payload":{
"name" : "i phone 6",
"price": 12000,
"description" : "Here is i phone 6",
"categories" : "Smartphones",
"images" : {
"public_id" : "sample id",
"url" : "http://google.com"
}
}
}
Delete Request
http://localhost:3005/api/v1/product/635038da3c973c2971ecadd5
Get Request
http://localhost:3005/api/v1/product/635038da3c973c2971ecadd5
Get Request
http://localhost:3005/api/v1/products?keyword=iphone
Get Request
http://localhost:3005/api/v1/products?keyword=i&category=Smartphones
Get request
http://localhost:3005/api/v1/products?keyword=i&price[gte]=100&price[lt]=200000
Post Request
http://localhost:3005/api/v1/register
{
"payload":{
"name": "sid",
"email": "sid@email.com",
"password": "password",
"role":"user"
}
}
Post Request
http://localhost:3005/api/v1/login
{
payload:
{
"email": "admin@email.com",
"password": "password"
}
}
Post Request
http://localhost:3005/api/v1/logout
Get Request
http://localhost:3005/api/v1/me
Put Request
http://localhost:3005/api/v1/password/update
{
payload:{
"oldPassword": "password",
"newPassword": "password",
"confirmPassword": "password"
}
}
Put Request
http://localhost:3005/api/v1/me/update
{
"name": "The Admin",
"email": "admin@email.com"
}
Get Request
http://localhost:3005/api/v1/admin/users
Get Request
http://localhost:3005/api/v1/admin/user/6386288a6f61be886840e39a
Post Request
http://localhost:3005/api/v1/order/new
{
payload:{
"itemsPrice": 11000,
"taxPrice" : 400,
"shippingPrice": 600,
"totalPrice": 12000,
"orderItems" : [
{
"product": "6385851169cc1ec39c296460",
"name" : "i phone 6",
"price" : 12000,
"image": "sampleImg",
"quantity":1
}
],
"shippingInfo":{
"address":"Charton Lodge Mallital Nainital",
"city": "Nainital",
"state":"Uttarakhand",
"country":"India",
"pincode":263001,
"phoneNo":8077305268
},
"paymentInfo":{
"id":"sample payment id",
"status":"succeeded"
}
}
}
Get Request
http://localhost:3005/api/v1/orders/me
Get Request
http://localhost:3005/api/v1/admin/orders
Get Request
http://localhost:3005/api/v1/admin/order/:id
Delete Request
http://localhost:3005/api/v1/admin/order/:id
Put Request
http://localhost:3005/api/v1/admin/order/:id
{
"status": "Delivered"
}
Put Request
http://localhost:3005/api/v1/review
{
"payload":{
"productId": "6385851169cc1ec39c296460",
"comment" : "Nice product loved its features",
"ratings" : 3
}
}
Get Request
http://localhost:3005/api/v1/reviews
Delete Request
http://localhost:3005/api/v1/reviews