| Method | get.sites |
|---|---|
| Description | Getting a list of sites |
| Available to | Agent, Client |
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 agentTo obtain a list of client users, you must use the "get.customer_users" method |
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 section "View of returned data" |
sort |
array | no | See section "Sorting data" |
Response parameters
| Name | Type | Valid values | Filtering | Sorting | Description |
|---|---|---|---|---|---|
id |
number | yes | Unique site identifier | ||
domain_name |
string | yes | Site address on the Internet. Without specifying the protocol - "http://" or "https://". | ||
name |
string | yes | Site name to display in the LC site filter, overview report and site list. | ||
default_phone_number |
string | E164 format | yes | The default phone number to which calls received through the sitephone will be forwarded, as well as to analytics numbers used in advertising campaigns. | |
default_scenario |
object | The default scenario, according to which calls to numbers without active settings will be processed. Default is none. | |||
scenario_id |
number | Unique script identifier | |||
scenario_name |
string | yes | Scenario name | ||
app_key |
string |
Client Embed Code Shared KeyThis parameter must be inserted into the template instead of the `{app_key}` parameter
|
|||
site_key |
string |
Embed code key for the site
This parameter must be inserted into the template instead of the `{site_key}` parameter
|
|||
is_editable |
boolean | Is it possible to manage the site. Edit and delete. These sites are managed from the agent's personal account | |||
creation_date |
iso8601 | YYYY-MM-DD hh:mm:ss | yes | Date of site creation | |
target_call_min_duration |
number | yes | Default is "30". The minimum call time after which it is considered target. The value is specified in seconds. | ||
track_subdomains |
boolean | false, true | yes | Default is "true". Collection of statistics from all subdomains (statistics from the “www” subdomain corresponding to the main domain of the website are always collected, regardless of the flag specified). | |
cookie_lifetime |
number | yes | The default is "90". Cookie lifetime. Time is specified in days. | ||
campaign_lifetime |
number | yes | The default is "90". Lifetime of an advertising company. Time is specified in days. | ||
sales_enabled |
boolean | false, true | yes | Default is "false". Should sales be taken into account | |
second_communication_period |
number | 1, 3, 7, 30 | yes | Default "1". Re-application period. Specified in days. | |
services_enabled |
boolean | false, true | yes | Default is "true". Ability to deactivate the service for one specific site. In the deactivated state, only site statistics are collected; all services (call tracking, online consultant) are disabled and do not work. | |
replacement_dynamical_block_enabled |
boolean | false, true | Automatically select numbers in dynamically loaded blocks. (Default False) | ||
is_support_web_directory |
boolean | false, true | yes | Default is "false". Website Directory Tracking | |
widget_link |
object | no | When the option is activated, a link will appear on the application, chat and personal data request forms, upon clicking on which the site visitor will be redirected to the specified URL. | ||
enabled |
boolean | Link on widgets | |||
text |
string | Link text (Maximum 100 characters) | |||
url |
string | URL | |||
state |
string | new, disable, error, work | Site status | ||
industry_id |
number | Unique identifier for the site's industry | |||
industry_name |
string | Site industry name | |||
child_customer_id |
number | yes | yes | Unique identifier of the agent client for whom the site is created | |
| Show visitor ID on the site | |||||
show_visitor_id |
object | Having displayed the visitor ID on the site and learned it from the visitor when calling, you will be able to associate visit data with a call and thereby find out complete data about the callers (for example, what specific search queries are used by visitors who call you). | |||
enabled |
boolean | false, true | Default is "false". We activate the display of the visitor on the site. | ||
element_id_value |
string |
In order for a visitor ID to appear on the site, you must specify the identifier (id) of the site's HTML element in this field.
Where the visitor ID is placed on the site pages, you need to add a container with this id
(for example <div id="comagicID"></div>).
|
|||
message |
string | Sets the text that will be displayed next to the visitor number on the site. | |||
length_visitor_id |
string | from 1 to 20 | Default is 6. Number of digits of the visitor ID. | ||
site_block_id |
number | Unique block identifier | |||
| List of site number blocks | |||||
site_blocks |
array | yes | Array of identifier blocks. By default, when creating a site, one block is created. | ||
site_block_name |
string | Block name. | |||
| Connected integrations | |||||
connected_integrations |
array |
|
Integrations connected at the site level. | ||
parent_id |
number | yes | yes | Unique identifier of the parent site | |
JSON request structure```json
{ "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 response structure```json
{
"jsonrpc": "2.0",
"id": "number",
"result": {
"meta_data": {},
"data": [
{
"id": "number",
"domain_name": "string",
"name": "string",
"default_phone_number": "string",
"default_scenario": {
"scenario_id": "number",
"scenario_name": "string"
},
"app_key": "string",
"site_key": "string",
"is_editable": "boolean",
"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": [],
"is_support_web_directory": "boolean",
"child_customer_id": "number",
"parent_id": "number"
}
]
}
}
List of returned errors
See the section "List of errors for methods with the verb get"