(Quick Reference)
Service: Update an appointment category
Description: This web service is used to update 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: PUT
Request content type: application/json
Parameters:
Name | Description | Type | Required | Example values |
---|
id | id of the desired record to update | Long/String | Yes | 777 |
reference | the reference of the appointment category | String | Yes | |
name | the name of the appointment category | String | Yes | |
isActive | | Boolean | No | true |
color | | String | No | #FFFFFF, #1BE9D8 |
The default value of isActive is true
The reference of a default appointment category can not be updated
The reference must be unique
Success Output
Success case: response.status=200
{
"id": 1,
"reference": "meeting",
"name": "Rendez-vous",
"isActive": true,
"isDefault": true,
"color": "#FFD312",
"organization": "entity1",
"dateCreated": "2016-09-09T17:18:40Z",
"lastUpdated": "2016-10-12T09:32:18Z"
}
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": "invalid_param_type",
"error_description": "An invalid value was specified for parameter: isActive (must be a boolean: true or false)"
}
{
"error": "missing_param",
"error_description": "name parameter is missing"
}
{
"error": "not_unique",
"error_description": "reference already used"
}
{
"error": "invalid_color_format",
"error_description": "The format used to indicate the color is incorrect"
}
{
"error": "save_failed",
"error_description": "Failed to save 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..."
}