Routes - DeliveryBoy

File Name : deliveryBoy.js
File Path : /server/routes/deliveryBoy.js
DeliveryBoy route contains getAllDeliveryBoy, addDeliveryBoy, getDeliveryBoy. These functionalities are included in deliveryBoy Controller.

Add DeliveryBoy Route By Admin

  1. API Path: api/rider/addRider
  2. Method: POST
  3. Description: This is a protected route in which you can add the deliveryBoy.
  4. Parameters:

    • Name: req
    • Type: Object
    Name In Type
    name req.body string
    emailId req.body string
    mobileNo req.body string
    callingCode req.body string
    gpsLoc req.body array
    cardHolder req.body string
    licenseNumber req.body string
    dateOfIssue req.body string
    validityOfLicense req.body string
    address req.body string
    license req.body string
    • Name: jwtAccessToken
    • In: Header
    • Type: String
    • Description: JWT access token is used to check the authenticity of the user.
  • Name: res

    • Type: Object
    • Description: res is nothing but the response object in which you get the save deliveryBoy details
  • Response:

    • Http Code: 200
    • Name: returnObj
    • Type: Object
    Name Type
    success boolean
    message string
    data object

Get All Deliveryboy Count For Admin

  1. API Path: api/rider/getActiveRider
  2. Method: GET
  3. Description: This is a protected route which gets the user details through JWT access token which is provided in the header.
  4. Parameters:

    • Name: req
    • Type: Object
  • Name: jwtAccessToken
  • In: Header
  • Type: String
  • Description: JWT access token is used to check the authenticity of the user.
  • Name: res

    • Type: Object
    • Description: res is nothing but the response object which gets you the active and non-active delivery boy count.
  • Response:

    • Http Code: 200
    • Name: returnObj
    • Type: Object
    Name Type
    success boolean
    message string
    data object

Get All Deliveryboy For Admin

  1. API Path: api/rider/getAllRiders
  2. Method: GET
  3. Description: This is a protected route which gets the user details through JWT access token which is provided in the header.
  4. Parameters:

    • Name: req
    • Type: Object
    Name In Type
    pageNo req.query number
  • Name: jwtAccessToken
  • In: Header
  • Type: String
  • Description: JWT access token is used to check the authenticity of the user.
  • Name: res

    • Type: Object
    • Description: res is nothing but the response object which gets you the delivery boy details.
  • Response:

    • Http Code: 200
    • Name: returnObj
    • Type: Object
    Name Type
    success boolean
    message string
    data array

results matching ""

    No results matching ""