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
- API Path: api/rider/addRider
- Method: POST
- Description: This is a protected route in which you can add the deliveryBoy.
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
- API Path: api/rider/getActiveRider
- Method: GET
- Description: This is a protected route which gets the user details through JWT access token which is provided in the header.
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
- API Path: api/rider/getAllRiders
- Method: GET
- Description: This is a protected route which gets the user details through JWT access token which is provided in the header.
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