Get Sources by Type
Purpose
To get the details of a member of a user group by the type.
Endpoints
- GET /settings/user_groups/{group_ID}/sources
Request Details
Request URL
{api-domain}/crm/{version}/settings/user_groups/{group_id}/sources
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
scope=ZohoCRM.settings.user_groups.READ
Parameters
- typemandatory if you want to filter by typeTo get the details of the members of a group by type. The possible values are users, roles, groups, and territories. 
- user_typemandatory if you want to filter by the user typeTo get the details of the members of a group by user type. The possible values are active, inactive, and deleted. 
- pagenumber, optionalTo get the list of records from the respective pages. The default value is 1. 
- per_pagenumber, optionalTo get the list of records available per page. The default and the maximum possible value is 200. 
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v8/settings/user_groups/3652397000009952001/sources?type=roles"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"Response JSON Keys
- sourceJSON ObjectThis holds the name and ID based on the type. - For type=users - The name and ID of the users that are a part of the user group.
- For type=roles - The name and ID of the roles that are present in the user group.
- For type=territories - The name and ID of the territories that are present in the user group.
- For type=groups - The name and ID of the other user groups that are present in this user group.
 
- typestringThe type based on which you have filtered the user group. 
- subordinatesstringThe boolean field that represents whether this source has subordinates. 
- infoJSON objectThe number of records fetched in this API call(count), page, per_page, and if more records are present that are yet to be fetched(more_records). 
Possible Errors
- INVALID_DATAHTTP 400The group ID is incorrect in the URL. 
 Resolution: Specify a valid group ID. Use the Get User Groups API to get the ID of the user group.
Sample Response
Copied{
    "sources": [
        {
            "source": {
                "name": "CEO",
                "id": "3652397000000026005"
            },
            "type": "roles",
            "subordinates": false
        },
        {
            "source": {
                "name": "Manager",
                "id": "3652397000000026008"
            },
            "type": "roles",
            "subordinates": true
        }
    ],
    "info": {
        "per_page": 200,
        "count": 2,
        "page": 1,
        "more_records": false
    }
}