Method get.sources_groups
Description Getting source groups
Available to Agent, Client
Necessary components for working with the method Data API for configuration
Method weight 1 point

Request parameters

Title Type Required Description
access_token string yes Authentication session key
user_id number no Unique user identifier of the agent client on behalf of which the request is made
Is required for the agent
To obtain a list of client users, you must use the method "get.customer_users"
limit number no Number of records returned. See section "Paging"
offset number no Shift - determines from which record number to return "limit" records. Default is "0". See section "Paging"
filter object no See section "Filtering Criteria"
fields array no See "View of Returned Data"
sort array no See section "Sorting data"

Response parameters

Name Type Valid values Filtering Sorting Default response Description
id number yes yes yes Unique identifier of the source group
name string yes yes yes Source group name
channel_id number yes yes yes Source group channel ID
channel_name string yes yes yes Source group channel name
channel_mnemonicstring yes yes yes Source group channel mnemonic
is_custom boolean yes yes yes Whether the group was created by the client user
state enum
  • active Group active
  • off Group disabled
  • removed Group deleted
yes yes yes Source Source Status

JSON request structure```json

{ "jsonrpc":"2.0", "id":"number", "method":"get.sources_groups", "params":{ "access_token":"string", "user_id":"number", "offset":"number", "limit":"number", "filter":{

    },
    "sort":[
    {
    "field":"string",
    "order":"string"
    }
    ],
    "fields":[
    "string"
    ]
}

}

### JSON response structure```JSON
{
    "jsonrpc": "2.0",
    "id": "number",
    "result": {
        "metadata": {

        },
        "data": [
            {
            "id": "number",
            "name": "string",
            "channel_id": "number",
            "channel_name": "string",
            "channel_mnemonic": "string",
            "is_custom": "boolean"
            }
        ]
    }
}

JSON Example response```JSON

{ "jsonrpc": "2.0", "id": "HXw4IeLYAfblv6FRkzRNd", "result": { "data": [ { "id": -3, "name": "Bing Ads", "is_custom": false, "channel_id": -1, "channel_name": "Контекстная реклама", "channel_mnemonic": "context" }, { "id": -1, "name": "Google Ads", "is_custom": false, "channel_id": -1, "channel_name": "Контекстная реклама", "channel_mnemonic": "context" }, { "id": -4, "name": "Бегун", "is_custom": false, "channel_id": -1, "channel_name": "Контекстная реклама", "channel_mnemonic": "context" }, { "id": -2, "name": "Яндекс.Директ", "is_custom": false, "channel_id": -1, "channel_name": "Контекстная реклама", "channel_mnemonic": "context" } ], "metadata": { "total_items": 4, "version": null, "limits": {} } } } ```

List of returned errors

See the section "List of errors for methods with the verb get"