Routes : PointRate


File Name : pointrate.js

File Path : server/routes/api/pointrate.js

Contains route which create, update, view and delete the user details. These functionalities are included in pointrate

Controller.

Post PointRate Route

1.API Path:

api/pointrates

2.Method:

POST

3.Description:

PointRate Route is used to create a new pointrate.

4.Parameters:

  • FieldName: req,

  • Type: Object,

  • jwtAccessToken: TRUE,

  • In: Header,

  • Type: String,

  • Description: JWT access token is used to check the authenticity of the pointrate.

Name Type
restaurantID ObjectId
points Number
orderAmount Number

Response:

  • Http Code:200

  • Data:{ }

  • Type: Object

Name Type
statusCode Number
Data Object

Description:Data is an Object with an PointRate.

Get PointRate Route

1.API Path:

api/pointrates/restaurant/:id

2.Method:

GET

3.Description:

PointRate Route is used to get all pointrates.

4.Parameters:

  • FieldName: req,

  • Type: Object,

  • jwtAccessToken: TRUE,

  • In: Header,

  • Type: String,

  • id: req.params.id(restaurantID)

  • Description: JWT access token is used to check the authenticity of the pointrate.

Response:

  • Http Code:200,

  • Data:[ ],

  • Type: Array

Name Type
statusCode Number
Data Array

Description:Data is an Array with all PointRates.

Get PointRate(particular) Route

1.API Path:

api/pointrates/:id

2.Method:

GET

3.Description:

PointRate Route is used to get particular pointrate.

4.Parameters:

  • FieldName: req,

  • Type: Object,

  • jwtAccessToken: TRUE,

  • In: Header,

  • Type: String,

  • id: req.params.id

  • Description: JWT access token is used to check the authenticity of the pointrate.

Response:

  • Http Code:200,

  • Data:{ },

  • Type: Object

Name Type
statusCode Number
Data object

Description:Data is an Object with a particular PointRate.

Update PointRate(particular) Route

1.API Path:

api/pointrates/:id

2.Method:

PUT

3.Description:

PointRate Route is used to update particular pointrate.

4.Parameters:

  • FieldName: req,

  • Type: Object,

  • jwtAccessToken: TRUE,

  • In: Header,

  • Type: String,

  • id: req.params.id

  • Description: JWT access token is used to check the authenticity of the pointrate.

Response:

  • Http Code:200,

  • Data:{ },

  • Type: Object

Name Type
statusCode Number
Data Object

Description:Data is an Object with a particular PointRate.

Delete PointRate(particular) Route

1.API Path:

api/pointrates/:id

2.Method:

DELETE

3.Description:

PointRate Route is used to delete particular pointrate.

4.Parameters:

  • FieldName: req,

  • Type: Object,

  • jwtAccessToken: TRUE,

  • In: Header,

  • Type: String,

  • id: req.params.id

  • Description: JWT access token is used to check the authenticity of the pointrate.

Response:

  • Http Code:404,

  • Data:{ },

  • Type: Object

Name Type
statusCode Number
Data blank Object

Description:Data is an blank Object.

results matching ""

    No results matching ""