(Quick Reference) Service: Delete an appointment category

Description: This web service is used to delete an existing appointment category object to the database

URL:

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

URL with external_id:

https://BASE_URL/api/VERSION/appointmentCategories/reference/{id}

Method: DELETE

Parameters:

NameDescriptionTypeRequiredExample values
idid of the desired record to deleteLong/StringYes777

In order to delete an appointment categories there is two special condition we must respect. The first is that the desired appointment category must not be a default category. The second is that appointment category must not contains any appointments.

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_not_authorized",
  	"error_description": "the appointment category you are trying to delete is a default category"
}
{
    "error": "missing_param",
    "error_description": "name parameter is missing"
}
{
	"error": "delete_failed",
	"error_description": "Failed to delete instance."
}
Failure case:response.status = 404
{
  	"error": "not_found",
  	"error_description": "The appointment category with the id 999 doesn't exist."
}

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