post https://refer-base-url-sub-domains.imi.chat/v3.1/users/search
This endpoint allows you to perform a conditional search to fetch users of a team.
Supported Params and Operators
| Param Name | Operator |
|---|---|
| status | eq |
| created_at | eq,lt,gt,lte,gte |
| updated_at | eq,lt,gt,lte,gte |
| accepting_chats | eq |
| active_chats | lt,gt,lte,gte |
Response Body Params:
| Param Name | Data Type | Description |
|---|---|---|
| teamid | integer | Unique identifier of the team |
| role | enum | Role to be assigned to the user: - Team Manager- Team Agent- Team Analyst |
Note
This API endpoint only allows creating users of role type:
Customer Care- in other words, team level users alone. Creating Administrative Users is not supported currently
Response Body Params:
| Param Name | Description |
|---|---|
| status_code | Denotes the status of the response. Detailed guide can be found here |
| description | States the description of the status_code. Gives you information about the success/error |
| response | Contains details of the current resource fetched/updated/created |
Note
This endpoint is paginated response and retrieves 10 records at a time. To access any page you can append
pageas a query param to the URL
Users List OBJECT:
| Param Name | Data Type | Description |
|---|---|---|
| users | ARRAY - User List View | Contains an array of User List View object |
User List View OBJECT:
| Param Name | Data Type | Description |
|---|---|---|
| id | integer | Unique identifier of a user |
| created_at | datetime - UTC format | Datetime when the user was created on the application |
| created_at | datetime - UTC format | Datetime when the user was last updated on the application |
| first_name | string | First name of the user |
| last_name | string | Last name of the user |
| login_id | string | Login ID of the user |
| email_id | string | Email ID of the user |
| status | enum | Current status of the user: - active- inactive |
| accepting_chats | boolean | States whether the user is ready to accept chats currently |
| active_chats | integer | No. of chats being handled by the user in his/her My Chats currently |
Response Codes
| status_code | HTTP Status | Description |
|---|---|---|
| 4307 | 200 | The list of users retrieved successfully |
| 2002 | 400 | Invalid header param - could not find mandatory header parameters |
| 2003 | 400 | Invalid Access Token |
| 2004 | 401 | Access Token expired |
| 2007 | 500 | Internal Server Error |
| 2010 | 404 | Could not find details of team based on the teamid passed in the header |
| 2099 | 405 | Method not allowed |
| 3016 | 500 | The user details could not be retrieved |
| 3114 | 500 | Request body not provided. |
| 3115 | 400 | Request is invalid |
| 3445 | 400 | Provided filtration parameter name: '{0}' is not valid.[ |
| 3446 | 400 | Provided operator: '{0}' for filtration parameter:'{1}' is not valid |
| 3447 | 400 | Provided condition is not valid. |
| 3451 | 400 | Search query request format is not valid |
| 4303 | 400 | Invalid input value:'{0}' provided for filtration parameter:'{1}'. |
