Skip to content

Getting a list of websites

Method get.sites
Description Getting a list of websites
Who has access Agent, Customer

Parameters of a request

Title Type Required Description
access_token string yes Authentication session key
user_id number no the ID of an agent's customer user who makes request
Is required for agent
To access a list of customer users, use the method "get.customer_users"
limit number no Returning entries count. Refer to "Paging"
offset number no Offset that defines from which number to return the entries "limit". Default value is "0". Refer to "Paging"
filter object no Refer to "Filters"
fields array no Refer to "Viewing returning data"
sort array no Refer to "Data sorting"

Parameters of a reply

Title Type Valid values Filtering Sorting Description
id number yes Website unique ID
domain_name string yes Website address on the internet. Whithout protocol - "http://" or "https://".
default_phone_number string E164 format yes Phone number, calls from the web callback will be transferred to, by default. Also analytics numbers that are used in the advertising campaigns.
default_scenario object Scenario according to which calls to the numbers whithout active settings will be proccessed by default. Default value is none.
scenario_id number Scenario unique ID
scenario_name string yes Scenario name
site_key string Key for website patch code You need to insert this parameter into a template in place of the parameter `{site_key}`

            <script type="text/javascript">
                var __cs = __cs || [];
                __cs.push(["setCsAccount", "{site_key}"]);
            </script>
            <script type="text/javascript" async src="//app.callgear.com/static/cs.min.js"></script>

            
creation_date iso8601 YYYY-MM-DD hh:mm:ss yes Dte when a website was created
target_call_min_duration number yes Default value is "30". Minimal duration of a call. After it's up the call is considered targeted. Value is in seconds.
track_subdomains boolean false, true yes Default value is "true". Gathering statistics from all the subdomains (statistics from a "www" subdomain, related to the website's main domain, is always gathered, whether or not a flag is set).
cookie_lifetime number yes Default value is "90". Lifespan of a "cookie". Value is in days.
campaign_lifetime number yes Default value is "90". Lifespan of an advertising campaign. Value is in days.
sales_enabled boolean false, true yes Default value is "false". Whether or not sales are taken into account
second_communication_period number 1, 3, 7, 30 yes Deafault value is "1". Time period for a return period. Value is in days.
services_enabled boolean false, true yes Default value is "true". A way to disable a service for a particular website. When a service is disabled, only website statistics are gathered. All the services (call tracking, live support) are swithed off and not working.
replacement_dynamical_block_enabled boolean false, true Replace numbers in dynamically uploaded blocks. (Default value is False)
widget_link object no As you activate this option, a link appears in the request forms, chats and questionnaire details queries. When a visitor click it, he or she will be redirected to a specified URL.
enabled boolean Link in widgets
text string Text of a link (up to 100 symbols)
url string URL
industry_id number Website's industry unique ID
industry_name string Website's industry name
Show visitor's ID on a website
show_visitor_id object When you display a visitor's ID on your website or when you ask a visitor's ID during a call, you can tie data about the visit up with the call. This way you can get comprehensive data about your callers (for example, which search queries led them).
enabled boolean false, true Default value is "false". Enabling visitors to be displayed on a website.
element_id_value string For a visitor's ID to be displayed on a website, you need to specify the ID of the website's HTML element in this field. You also need to add a container with this ID on the pages where you placed the visitor's ID (for example, <div id="callgearID"></div>).
message string Defines a text, that will be displayed next to a visitor's phone number on a website.
length_visitor_id string from 1 to 20 Default value is 6. Visitor's ID digit count.
List of website's numbers blocks
site_blocks array yes IDs blocks bulk. one block is created for a website by default.
site_block_id number Block unique ID
site_block_name string Block name
Connected intergrations
connected_integrations array
  • yandex.direct
  • google.adwords
  • yandex.metrika
  • google.analytics
Integrations connected on the website level

JSON request structure

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

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

JSON reply structure

{
  "jsonrpc": "2.0",
  "id": "number",
  "result": {
    "meta_data": {},
    "data": [
      {
        "id": "number",
        "domain_name": "string",
        "default_phone_number": "string",
        "default_scenario": {
          "scenario_id": "number",
          "scenario_name": "string"
        },
        "site_key": "string",
        "industry_id": "number",
        "industry_name": "string",
        "target_call_min_duration": "number",
        "track_subdomains": "boolean",
        "cookie_lifetime": "number",
        "campaign_lifetime": "number",
        "sales_enabled": "boolean",
        "second_communication_period": "number",
        "services_enabled": "boolean",
        "replacement_dynamical_block_enabled": "boolean",
        "widget_link": {
          "enabled": "boolean",
          "text": "string",
          "url": "string"
        },
        "show_visitor_id": {
          "enabled": "boolean",
          "element_id_value": "string",
          "message": "string",
          "length_visitor_id": "number"
        },
        "site_blocks": [
          {
            "site_block_id": "number",
            "site_block_name": "string"
          }
        ],
        "connected_integrations": []
      }
    ]
  }
}

List of returning errors

Refer to "List of errors for the methods with the verb get"