Vendor Authentication
Authenticating Vendors
STAGING_URL: https://switch-api-staging.herokuapp.com
LIVE_URL: https://switchapi.azurewebsites.net
Create Vendor
POST
https://switch-api-staging.herokuapp.com/vendor/register
This endpoint registers a Vendor and returns a valid token for sessions .
Request Body
Name
Type
Description
category
string
vendor category
name
string
Name of Vendor
string
email of vendor
password
string
preferred password of Vendor
{
"message": "Vendor created successfully",
"data": {
"id": 197,
"email": "example@gmail.com"
}
}
Login Vendor
POST
https://switch-api-staging.herokuapp.com/vendor/login
This endpoint authenticate the vendor and returns a token used for sessions
Request Body
Name
Type
Description
password
string
Vendor password
string
vendor email
{
"message": "Vendor login successful",
"data": {
"auth_token": "eyJhbGciOiJIUzI1NiJ9.eyJ2ZW5kb3JfaWQiOjcsImV4cCI6MTU0NzUyMjkyMSwiY29udGV4dCI6InZlbmRvciJ9.arMSfaN1eCcn5G47NBdUAwagKgNzERhUQaGvuhVE-JY",
"vendor": {
"id": 7,
"email": "example@gmail.com"
}
}
}
Forgot Password
POST
https://switch-api-staging.herokuapp.com/vendor/forgot_password
Request Body
Name
Type
Description
string
{
"message": "Password reset email sent successfully"
}
Reset Password
GET
https://switch-api-staging.herokuapp.com/vendor/reset_password
Path Parameters
Name
Type
Description
reset_password_token
string
token attached to reset link
Request Body
Name
Type
Description
password
string
new password for vendor
{
"message": "Password changed successfully"
}
Last updated
Was this helpful?