Customer

Customer register

Register a customer

POST/customer/register
Body
name*string
lastNamestring
password*string
confirmPassword*string
emailId*string
phoneNumberinteger (int32)
Response

success response

Body
firstNamestring
emailstring
usernamestring
mobileNumberstring
createdDatestring
idinteger (int32)
Request
const response = await fetch('/customer/register', {
    method: 'POST',
    headers: {
      "Content-Type": "application/x-www-form-urlencoded"
    },
    body: JSON.stringify({
      "confirmPassword": "text",
      "emailId": "text",
      "name": "text",
      "password": "text"
    }),
});
const data = await response.json();
Response
{
  "firstName": "text",
  "email": "text",
  "username": "text",
  "mobileNumber": "text",
  "createdDate": "text"
}

Login

Login customer

POST/customer/login
Body
emailIdstring
passwordstring
typestring
tokenstring
Response

success response

Body
tokenstring
useruser (object)
Request
const response = await fetch('/customer/login', {
    method: 'POST',
    headers: {
      "Content-Type": "application/x-www-form-urlencoded"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "token": "text",
  "user": {
    "firstName": "text",
    "lastName": "text",
    "email": "text",
    "mobileNumber": "text",
    "avatar": "text",
    "avatarPath": "text",
    "lockedOn": "text",
    "username": "text"
  }
}

Change password

Change password

POST/customer/change-password
Header parameters
Body
oldPasswordstring
newPasswordstring
Response

success response

Body
statusinteger
messagestring
Request
const response = await fetch('/customer/change-password', {
    method: 'POST',
    headers: {
      "Content-Type": "application/x-www-form-urlencoded"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "message": "Your password has been change successfully."
}

Get profile

Get profile

GET/customer/get-profile
Header parameters
Response

success response

Body
statusinteger
messagestring
Request
const response = await fetch('/customer/get-profile', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "message": "Successfully Get the Profile."
}

Edit profile

Edit customer profile

POST/customer/edit-profile
Header parameters
Body
firstName*string
lastNamestring
emailId*string
phoneNumberinteger (int32)
imagestring
Response

success response

Body
idinteger (int32)
firstNamestring
lastNamestring
emailstring
mobileNumberstring
addressstring
countryIdstring
zoneIdinteger (int32)
avatarstring
avatarPathstring
pincodestring
usernamestring
customerIdinteger (int32)
Request
const response = await fetch('/customer/edit-profile', {
    method: 'POST',
    headers: {
      "Content-Type": "application/x-www-form-urlencoded"
    },
    body: JSON.stringify({
      "emailId": "text",
      "firstName": "text"
    }),
});
const data = await response.json();
Response
{
  "firstName": "text",
  "lastName": "text",
  "email": "text",
  "mobileNumber": "text",
  "address": "text",
  "countryId": "text",
  "avatar": "text",
  "avatarPath": "text",
  "pincode": "text",
  "username": "text"
}

Loging log list

List of loging log

GET/customer/login-log-list
Query parameters
Header parameters
Response

success response

Body
statusinteger
messagestring
Request
const response = await fetch('/customer/login-log-list', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "message": "Successfully get login Log list"
}

Oauth login

Oauth login

POST/customer/Oauth-login
Body
emailIdstring
sourcestring
oauthDatastring
Response

success response

Body
tokenstring
userouthUserData (object)
Request
const response = await fetch('/customer/Oauth-login', {
    method: 'POST',
    headers: {
      "Content-Type": "application/x-www-form-urlencoded"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "token": "text",
  "user": {
    "createdDate": "2024-04-29T05:16:52.865Z",
    "firstName": "text",
    "lastName": "text",
    "username": "text",
    "email": "text",
    "address": "text",
    "city": "text",
    "local": "text",
    "oauthData": "text",
    "avatar": "text",
    "avatarPath": "text",
    "lastLogin": "text",
    "pincode": "text",
    "linkExpires": "text",
    "lockedOn": "text"
  }
}

Forgot password link

Get mail of forgot password link

GET/customer/forgot-password-link
Query parameters
Response

success response

Body
statusinteger
messagestring
Request
const response = await fetch('/customer/forgot-password-link', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "message": "Thank you! A link to reset your password will be sent to your registered email shortly."
}

Forget password key check

Forget password key check

GET/customer/forgot-password-key-check
Query parameters
Response

success response

Body
statusinteger
messagestring
Request
const response = await fetch('/customer/forgot-password-key-check', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "message": "Invalid key. please try again \" or \" your password reset link has been expired, try again \" or \" Valid key \" or \" This link has been used already. please try again"
}

Reset password

Reset the password

PUT/customer/reset-password
Body
newPasswordstring
keystring
Response

success response

Body
statusinteger
messagestring
datastring
Request
const response = await fetch('/customer/reset-password', {
    method: 'PUT',
    headers: {
      "Content-Type": "application/x-www-form-urlencoded"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "message": "Your password has been changed successfully",
  "data": "xxx@gmail.com"
}

Logout

Customer logout

POST/customer/logout
Header parameters
Response

success response

Body
statusinteger
messagestring
Request
const response = await fetch('/customer/logout', {
    method: 'POST',
    headers: {},
});
const data = await response.json();
Response
{
  "message": "Successfully Logout"
}

Last updated