Routes : DeliveryArea
File Name: deliveryarea.js
File Path: server/routes/api/deliveryarea.js
Contains route which can create, update, view and delete the user details. These functionalities are included in deliveryarea Controller.
Post DeliveryAreas Route
1.API Path: api/deliveryareas
2.Method: POST
3.Description: DeliveryAreas route is used to create a new deliveryarea.
4.Parameters:
FieldName: req,
Type: Object,
Token:TRUE,
In: Header,
Token-Type: String,
Role: Admin
FieldName | Type | Required |
---|---|---|
restaurantID | ObjectId | true |
city | String | true |
zone | String | true |
minAmount | Number | true |
Response:
Http Code: 200
Data: { }
Type: Object
Name | Type |
---|---|
statusCode | Number |
Data | Object |
Description:Data is an Object with a DeliveryArea.
Get DeliveryAreas Route
1.API Path: api/deliveryareas
2.Method: GET
3.Description: DeliveryAreas route is used to get all deliveryareas.
4.Parameters:
FieldName: req,
Type: Object
Response:
Http Code: 200
Data: [ ]
Type: Array
Name | Type |
---|---|
statusCode | Number |
Data | Array |
Description: Data is an Array with all DeliveryAreas details.
Get DeliveryAreas(particular deliveryArea) Route
1.API Path: api/deliveryareas/:id
2.Method: GET
3.Description: DeliveryAreas route is used to get a particular deliveryarea.
4.Parameters:
FieldName: req,
Type: Object,
id: req.params.id
Response:
Http Code: 200
Data: { }
Type: Object
Name | Type |
---|---|
StatusCode | Number |
Data | Object |
Description: Data is an Object with a particular DeliveryAreas details.
Update DeliveryAreas Route
1.API Path: api/deliveryareas/:id
2.Method: PUT
3.Description: DeliveryAreas route is used to update an existing deliveryarea.
4.Parameters:
FieldName: req,
Type: Object,
Token:TRUE,
In : Header,
Token-Type: String,
Role: Admin
Response:
Http Code:200
Data:{ }
Type: Object
Name | Type |
---|---|
statusCode | Number |
Data | Object |
Description:Data is an Object with a particular DeliveryAreas details.
Delete DeliveryAreas Route
1.API Path:
api/deliveryareas/:id
2.Method:
DELETE
3.Description: DeliveryAreas route is used to delete particular deliveryarea.
4.Parameters:
FieldName: req,
Type: Object,
Token:TRUE,
In: Header,
Token-Type: String,
Role: Admin
Response:
Http Code: 200
Data: { }
Type: Object
Name | Type |
---|---|
statusCode | Number |
Data | blank Object |
Description: Data is an Object with a particular DeliveryAreas details.