Public
Documentation Settings

Duck Cart

Users

POSTSign Up

http://127.0.0.1:3000/user/signup
  • This end point allows to sign up the user
  • This accepts
    #Name
    #username
    #password
    #Confirm Password
    #Role of the user (only accepts creator, user)
    #Profile URL
Bodyraw (json)
json
{
    "name":"Carry Minati",
    "username":"CarryMinati",
    "password":"123456789",
    "confirmPassword":"123456789",
    "role":"creator"
}
Example Request
curl
curl --location 'http://127.0.0.1:3000/user/signup' \
--data '{
    "name":"Carry Minati",
    "username":"CarryMinati",
    "password":"123456789",
    "confirmPassword":"123456789",
    "role":"creator"
}'
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers

POSTLogin

http://127.0.0.1:3000/user/login
  • This endpoint allows you to login
  • This route accepts
    #Username
    #Password
  • Also you have to send the JWT token as bearer token
  • This route send back
    #JWT token
    #Data of the user
Bodyraw (json)
json
{
    "username":"user",
    "password":"123456789"
}
Example Request
curl
curl --location 'http://127.0.0.1:3000/user/login' \
--data '{
    "username":"user",
    "password":"123456789"
}'
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers