(Quick Reference) Service: Delete a survey

Description: This web service is used in order to delete an existing survey instance.

URL:

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

Method: DELETE

Parameters:

NameDescriptionTypeRequiredExamples values
idThe numerical ID of the desired surveyLongYes123

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"
}
{
    "error": "delete_not_authorized",
    "error_description": "Survey with answers can not be deleted"
}

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

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