(Quick Reference) Service: Dissociate an employee from a route

Description: This web service is used to dissociate an assigned employee to a route and delete the data from the database

URL:

https://BASE_URL/api/VERSION/routeEmployees/{id}

Method: DELETE

Parameters:

NameDescriptionTypeRequiredExample values
idid of the desired record to deleteLongYes777
deleteOccurencesboolean to say if delete will also delete the occurrences instancesBooleanNotrue

When deleteOccurences is set to true, starting from the rooting date of the desired route/employee instance all the route/employee occurrences will be deleted.

Success Output

Success case: response.status = 200
{
  "success": "true",
  "success_description": "Instance deleted successfully"
}

Failure Output

Failure case:response.status = 400
{
	"error":"invalid_param_type",
 	"error_description": "The type of parameter id you provided is not valid for this request."
}

{
	"error": "delete_failed",
	"error_description": "Failed to delete instance."
}

Failure case:response.status = 404
{
  	"error": "not_found",
  	"error_description": "The routeEmployee with the id 999 doesn't exist."
}

Failure case:response.status = 500
{
     "error": "server_error",
     "error_description": "Oops! Something went wrong..."
}