User—Get Reason Code List

This API allows an agent or supervisor to get a list of Not Ready or Sign Out reason codes (that are applicable to that agent or supervisor), which are defined and stored in the Finesse database. Users can assign one of the reason codes on the desktop when they change their state to NOT_READY or LOGOUT.


Note


The ReasonCode list can be empty (for example, if no reason codes for the specified category exist in the Finesse configuration database).

Reason codes that have the forAll parameter set to true apply to any user.

The category parameter is required when making a request to get a list of reason codes.

For information about the ReasonCode object, see ReasonCode.


URI:

http://<FQDN>/finesse/api/User/<id>/ReasonCodes?category=NOT_READY|LOGOUT

Example URI:

http://finesse1.xyz.com/finesse/api/User/1234/ReasonCodes?category=NOT_READY

Security Constraints:

Administrators, agents and supervisors can use this API.

To get a list of reason codes, a user must be signed in, or provide valid authorization credentials when challenged.

Only an administrator can get another user's list of reason codes.

HTTP Method:

GET

Content Type:

Application/XML

Input/Output Format:

XML

HTTP Request:

HTTP Response:

200: Success

400: Bad Request

400: Finesse API Error (for example, the object does not exist, the object is stale, or violation of DB constraint)

401: Authorization Failure

401: Invalid Authorization User Specified

404: Not Found (for example, the reason code does not exist or has been deleted)

500: Internal Server Error

Example Response:

<ReasonCodes category="NOT_READY">
   <ReasonCode>
      <uri>/finesse/api/ReasonCode/1</uri>
      <category>NOT_READY</category>
      <code>12</code>
      <label>Lunch</label>
      <forAll>True</forAll>
   </ReasonCode>
   <ReasonCode>
      ...Full ReasonCode Object...
   </ReasonCode>
   <ReasonCode>
      ...Full ReasonCode Object...
   </ReasonCode>
  </ReasonCodes>

Example Failure Response:

<ApiErrors>
  <ApiError>
    <ErrorType>Authorization Failure</ErrorType>
    <ErrorMessage>UNAUTHORIZED</ErrorMessage>
    <ErrorData>1234</ErrorData>
  </ApiError>
</ApiErrors>