Routes : Tag


File Name : tag.js

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

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

Post Tags Route

1.API Path:

api/tags/

2.Method:

POST

3.Description:

Tag router is used to create a new tag.

4.Parameters:

  • FieldName: req,

  • Type: Object,

  • jwtAccessToken: TRUE,

  • In: Header,

  • Type: String,

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

Name Type Required
restaurantID ObjectId true
location ObjectId true
tag String true
enable Boolean true

Response:

Returns an object with properties: Data.

  • Http Code:200

  • Data:{ }

  • Type: Object

Name Type
statusCode Number
Data Object

Description: Data is an object with a new tag.

Update Tags Route

1.API Path:

api/tags/:id

2.Method:

PUT

3.Description:

Tag router is used to update an particular tag.

4.Parameters:

  • FieldName: req,

  • Type: Object,

  • id: req.params.id,

  • jwtAccessToken: TRUE,

  • In: Header,

  • Type: String,

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

Response:

Returns an object with properties: Data.

  • Http Code:200

  • Data:{ }

  • Type: Object

Name Type
statusCode Number
Data Object

Description: Data is an object with a update an existing tag.

Delete Tags Route

1.API Path:

api/tags/:id

2.Method:

DELETE

3.Description:

Tag router is used to delete a particular tag.

4.Parameters:

  • FieldName: req,

  • Type: Object,

  • id: req.params.id,

  • jwtAccessToken: TRUE,

  • In: Header,

  • Type: String,

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

Response:

Returns an object with properties: Data.

  • Http Code:200

  • Data:{ }

  • Type: Object

Name Type
statusCode Number
Data blank object

Description: Data is an empty object.

Get Tags Route

1.API Path:

api/tags/:id

2.Method:

GET

3.Description:

Tag router is used to get a particular tag.

4.Parameters:

  • FieldName: req,

  • Type: Object,

  • id: req.params.id,

  • jwtAccessToken: TRUE,

  • In: Header,

  • Type: String,

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

Response:

Returns an object with properties: Data.

  • Http Code:200

  • Data:{ }

  • Type: Object

Name Type
statusCode Number
Data Object

Description: Data is an object with a particular tag.

Get Tags Route

1.API Path:

api/tags/all/:id

2.Method:

GET

3.Description:

Tag router is used to get a particular tag.

4.Parameters:

  • FieldName: req,

  • Type: Object,

  • id: req.params.id,(location ID)

  • jwtAccessToken: TRUE,

  • In: Header,

  • Type: String,

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

Response:

Returns an object with properties: Data.

  • Http Code:200

  • Data:[ ]

  • Type: Array

Name type
statusCode Number
Data Array

Description: Data is an array with all tags based on particular locationId.

Get Tags Route

1.API Path:

api/tags/custom/data/:id

2.Method:

GET

3.Description:

Tag router is used to get all coustomized tags.

4.Parameters:

  • FieldName: req,

  • Type: Object,

  • id: req.params.id(locationId)

  • jwtAccessToken: TRUE,

  • In: Header,

  • Type: String,

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

Response:

Returns an object with properties: Data.

  • Http Code:200

  • Data:[ ]

  • Type: Array

Name Type
statusCode Number
Data Array

Description: Data is an array with all customized tags based on particular locationId.

results matching ""

    No results matching ""