Update Inactivity Reasons

Updates a selected inactivity reason.

Permissions

  ----
  Permissions:INTEGRATOR
  ----

Request Parameters

ParameterTypeDescription
codestringUnique code of the inactivity reason
reasons.localestringTwo-letter language code
reasons.namestringTranslation of the reason to the language specified in reasons.locale
colorstring (optional)RGB, for example, #FFFFFF or #ffffff
activeboolean (optional)Status of the reason. Default value: true

HTTP Request

PUT /api/v1/inactivity/reasons HTTP/1.1
Content-Type: application/json
Content-Length: 140
Host: localhost:8080
{
  "code" : "123",
  "reasons" : [ {
  "locale" : "ru",
  "name" : "Обучение"
  } ],
  "color" : "#FFFFFF",
  "active" : true
}

Example of a Successfull HTTP Response

HTTP/1.1 200 OK

Example of a Failed HTTP Response

  • Example of the response that is returned if you try to update a reason that does not exist:
HTTP/1.1 404 Not Found
Content-Type: application/json
Content-Length: 148
{
  "method" : "PUT",
  "uri" : "/api/v1/inactivity/reasons",
  "code" : null,
  "message" : "InactivityReason with code \"123432 \" wasn't found"
}
  • Example of the response that is returned when you reach the limit of the number of active reasons:
HTTP/1.1 409 Conflict