Routes : OrderTrack


File Name : ordertrack.js

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

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

Post OrderTrack Route

1.API Path:

api/ordertracks

2.Method:

POST

3.Description:

Ordertrack route is used to create a new ordertrack.

4.Parameters:

  • Name: req

  • Type: Object

    | Name | Type | Required | | :--- | :--- | :--- | | deliveryBy | ObjectId | true | | order | ObjectId | true | | latLongInfo | Array | true | | user | ObjectId | true | | restaurantID | ObjectId | true |

Response:

  • Http Code:200

  • Data:{ }

  • Type: Object

Name Type
statusCode Number
Data Object

Description:Data is an Object with an Ordertrack.

Get OrderTrack Route

1.API Path:

api/ordertracks

2.Method:

GET

3.Description:

Ordertrack route is used to get all ordertracks.

4.Parameters:

  • Name: req

  • Type: Object

Response:

  • Http Code:200

  • Data:[ ]

  • Type: Array

Name Type
statusCode Number
Data Array

Description:Data is an Array with all Ordertracks.

Get OrderTrack(particular) Route

1.API Path:

api/ordertracks/:id

2.Method:

GET

3.Description:

Ordertrack route is used to get particular ordertrack.

4.Parameters:

  • Name: 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 particular Ordertrack.

Update OrderTrack(particular) Route

1.API Path:

api/ordertracks/:id

2.Method:

PUT

3.Description:

Ordertrack route is used to update particular ordertrack.

4.Parameters:

  • Name: req,

  • Type: Object,

  • id: req.params.id

Response:

  • Http Code:200

  • Data:{ }

  • Type: Object

Name type
statusCode Numbet
Data Object

Description:Data is an object with updating particular Ordertrack.

Delete OrderTrack(particular) Route

1.API Path:

api/ordertracks/:id

2.Method:

DELETE

3.Description:

Ordertrack route is used to delete particular ordertrack.

4.Parameters:

  • Name: req,

  • Type: Object,

  • id: req.params.id

Response:

  • Http Code:200

  • Data:{ }

  • Type: Object

Name type
stausCode Number
Data blank Object

Description:Data is an blank object Ordertrack.

Get OrderTrack(particular) Route

1.API Path:

api/ordertracks/delivery/assigned/

2.Method:

GET

3.Description:

Ordertrack route is used to assign order to particular deliveryboy.

4.Parameters:

  • Name: req,

  • Type: Object,

  • Token:TRUE,

  • In : Header,

  • Token-Type: String,

  • id: req.user._id

Response:

  • Http Code:200

  • Data:[ ]

  • Type: Array

Name Type
statusCode Number
Data Array

Description:Data is an Array with particular user Ordertrack.

results matching ""

    No results matching ""