Skip to content

Latest commit

 

History

History
434 lines (284 loc) · 6.83 KB

API.md

File metadata and controls

434 lines (284 loc) · 6.83 KB

Register

  1. POST https://seva-backend1.herokuapp.com/register
{
    "userName" : "bhupendra",
    "fullName" : "user bhupendra ",
    "email":"[email protected]",
    "img":"https://res.cloudinary.com/drampnn2w/image/upload/v1615808628/user_iapj1a.tiff"
    "password":"12345678",
    "role": "provider",
    "state": "MH",
    "city": "pune",
    "village": "katraj",
    "pincode": "411048"
}

login

  1. POST https://seva-backend1.herokuapp.com/login
{
    "email":"[email protected]",
    "password": "12345678"
}

User dashboard

  1. GET https://seva-backend1.herokuapp.com/user
Header : 
    auth-token - token-value

Provider dashboard

  1. GET https://seva-backend1.herokuapp.com/provider
Header : 
    auth-token - token-value

Admin dashboard

  1. GET https://seva-backend1.herokuapp.com/admin

feedback

  1. GET https://seva-backend1.herokuapp.com/feedback

  2. GET https://seva-backend1.herokuapp.com/feedback/:feedbackId

  3. GET https://seva-backend1.herokuapp.com/user/my/feedback/:userId

Header : 
    auth-token - token-value

  1. POST https://seva-backend1.herokuapp.com/user/feedback
Header : 
    auth-token - token-value
{
    "feedback":"hello"
}
  1. PUT https://seva-backend1.herokuapp.com/user/feedback/:feedbackId
Header : 
    auth-token - token-value
{
    "feedback":"hello"
}
  1. DELETE https://seva-backend1.herokuapp.com/user/feedback/:feedbackId
Header : 
    auth-token - token-value

category

  1. GET https://seva-backend1.herokuapp.com/admin/category

  1. GET https://seva-backend1.herokuapp.com/admin/category/:categoryId

  1. POST https://seva-backend1.herokuapp.com/admin/category
{
    "icon":"https://res.cloudinary.com/drampnn2w/image/upload/v1615808107/Healthicon_ih06eq.png",
    "category": "Health Care",
    "description": "Health Care Service"
}
  1. PUT https://seva-backend1.herokuapp.com/admin/category/:Id
{
    "icon":"https://res.cloudinary.com/drampnn2w/image/upload/v1615808107/Healthicon_ih06eq.png",
    "category": "Health Care",
    "description": "Health Care Service"
}
  1. DELETE https://seva-backend1.herokuapp.com/admin/category/:Id

Service (Provider)

  1. GET https://seva-backend1.herokuapp.com/service

  1. GET https://seva-backend1.herokuapp.com/seriveBycategory/:categoryId

  1. GET https://seva-backend1.herokuapp.com/seriveBycategoryAndPin/:categoryId/:pin

  1. GET https://seva-backend1.herokuapp.com/service/:serviceId

  1. GET https://seva-backend1.herokuapp.com/serviceByPin/:pincode

  1. GET https://seva-backend1.herokuapp.com/VerifiedService

  1. GET https://seva-backend1.herokuapp.com/provider/my/service/:Id
Header : 
    auth-token - token-value
  1. POST https://seva-backend1.herokuapp.com/provider/service

Header : 
    auth-token - token-value
{
        "image": "sdfsd",
        "serviceNames": " new provider demo",
        "serviceEmail": "[email protected]",
        "servicePincode":"411048",
        "category": "604cdf8b0bc38c07e8a6fd94",
        "contactNo": "+91844******9",
        "map_location": "map location",
        "description": "sadfsdf"
}
  1. PUT https://seva-backend1.herokuapp.com/provider/service/:Id
Header : 
    auth-token - token-value
{
        "image": "sdfsd",
        "serviceNames": " new provider demo",
        "serviceEmail": "[email protected]",
        "servicePincode":"411048",
        "category": "604cdf8b0bc38c07e8a6fd94",
        "contactNo": "+91844******9",
        "map_location": "map location",
        "description": "sadfsdf"
}
  1. DELETE https://seva-backend1.herokuapp.com/provider/service/:Id
Header : 
    auth-token - token-value

User Suggestiom

  1. GET https://seva-backend1.herokuapp.com/suggestionBycategory/:categoryId

  1. GET https://seva-backend1.herokuapp.com//VoteSuggestion/:suggestionId

  1. GET https://seva-backend1.herokuapp.com/s/suggestionBycategoryAndPin/:categoryId/:pin

  1. GET https://seva-backend1.herokuapp.com/suggestion/:suggestionId

  1. GET https://seva-backend1.herokuapp.com/suggestion

  1. GET https://seva-backend1.herokuapp.com/suggestionByPincode/:pincode

  1. GET https://seva-backend1.herokuapp.com/validSuggestion

  1. GET https://seva-backend1.herokuapp.com/user/my/suggestion/:userId
Header : 
    auth-token - token-value

  1. GET https://seva-backend1.herokuapp.com/user/my/suggestion/:userId
Header : 
    auth-token - token-value
https://seva-backend1.herokuapp.com/user/my/suggestion/604cc1fd43e82822a85786e6
user id - 604cc1fd43e82822a85786e6
  1. POST https://seva-backend1.herokuapp.com/user/suggestion
Header : 
    auth-token - token-value
{
    "ServiceType": "chai`s shop",
    "ServicePinCode": "411046",
    "category": "604cdf8b0bc38c07e8a6fd94",
    "ServiceDescription": "Service Description"
}
  1. PUT https://seva-backend1.herokuapp.com/user/suggestion/:suggestionId
Header : 
    auth-token - token-value
   "ServiceType": "chai`s shop",
    "ServicePinCode": "411046",
    "category": "604cdf8b0bc38c07e8a6fd94",
    "ServiceDescription": "Service Description"
  1. DELETE https://seva-backend1.herokuapp.com/user/suggestion/:suggestionId
Header : 
    auth-token - token-value

Admin all user

  1. GET https://seva-backend1.herokuapp.com/admin/alluser

User Profile

  1. GET https://seva-backend1.herokuapp.com/user/profile/:profileId

  1. PUT https://seva-backend1.herokuapp.com/user/profile/:profileId
Header : 
    auth-token - token-value
    "fullName" : "user bhupendra ",
    "state": "MH",
    "city": "pune",
    "village": "katraj",
    "pincode": "411048"
  1. DELETE https://seva-backend1.herokuapp.com/user/profile/:profileId
Header : 
    auth-token - token-value

Provider Profile

  1. GET https://seva-backend1.herokuapp.com/provider/profile/:profileId

  1. PUT https://seva-backend1.herokuapp.com/provider/profile/:profileId
Header : 
    auth-token - token-value
    "fullName" : "user bhupendra ",
    "state": "MH",
    "city": "pune",
    "village": "katraj",
    "pincode": "411048"
  1. DELETE https://seva-backend1.herokuapp.com/provider/profile/:profileId
Header : 
    auth-token - token-values