---
metadata:
  - name: generator
    content: Diplodoc Platform v5.48.2
alternate:
  - https://yandex.com.tr/dev/metrika/en/management/openapi/goal/goals.md
  - https://yandex.com.tr/dev/metrika/ru/management/openapi/goal/goals.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com.tr/dev/metrika/ru/llms.txt

<!-- source: ru/management-src/Upravlenie-celyami/goals.md -->
<div class="openapi">

# Список целей

<!-- markdownlint-disable-file -->

Возвращает информацию о целях счетчика.

## Request

<div class="openapi__requests">

<div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-get);margin-bottom: 12px">

<div class="openapi__request">

GET {.openapi__method}
```text translate=no
https://api-metrika.yandex.net/management/v1/counter/{counterId}/goals
```

</div>

</div>

</div>

### Path parameters

#|
|| **Name** | **Description** ||
||

_counterId_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

Идентификатор счетчика, список целей которого вы хотите получить.
{.table-cell}
||
|#{.json-schema-properties}

### Query parameters

#|
|| **Name** | **Description** ||
||

_callback_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Функция обратного вызова, которая обрабатывает ответ API.

_Example:_{.json-schema-reset .json-schema-example} ``
{.table-cell}
||
||

_useDeleted_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean

Информация об удаленных целях.

_Default:_{.json-schema-reset .json-schema-value} `false`
{.table-cell}
||
|#{.json-schema-properties}

## Responses

<div class="openapi__response__code__200">

## 200 OK

OK

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "goals": [
    {
      "id": 0,
      "name": "example",
      "type": "example",
      "default_price": 0.5,
      "goal_source": "example",
      "is_favorite": true,
      "status": "example",
      "conditions": [
        null
      ]
    }
  ]
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_goals_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**Type**: array" %}

{% cut "**One of 13 types**" %}{.json-schema-combinators data-marker=or}

- **Type**: [ActionGoal](#entity-ActionGoal)

  Целевое событие.

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example",
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ]
  }
  ```

  {% endcut %}

- **Type**: [ChatGoal](#entity-ChatGoal)

  Нажатие на чат.

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example",
    "conditions": [
      null
    ]
  }
  ```

  {% endcut %}

- **Type**: [CompositeGoal](#entity-CompositeGoal)

  Составная цель.
  Нужна для группировки и задания порядка обычных целей.
  В качестве шагов может содержать цели типа "Посещение страниц" и "JavaScript-событие".
  Шаг считается достигнутым, если были достигнуты все предыдущие шаги, и после этого были выполнены все условия текущего шага.


  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example",
    "steps": [
      null
    ]
  }
  ```

  {% endcut %}

- **Type**: [DepthGoal](#entity-DepthGoal)

  Количество просмотров.
  Цель считается достигнутой, если посетитель просмотрел заданное количество страниц сайта.


  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example",
    "depth": 2
  }
  ```

  {% endcut %}

- **Type**: [EmailGoal](#entity-EmailGoal)

  Нажатие на email.

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example",
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

- **Type**: [FileGoal](#entity-FileGoal)

  Скачивание файлов.
  Цель считается достигнутой, если посетитель скачал любой файл или определенный файл.


  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example",
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

- **Type**: [MessengerGoal](#entity-MessengerGoal)

  Переход в мессенджер.
  Цель будет достигнута при клике пользователем на ссылку, которая ведет в мессенджер.


  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example",
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

- **Type**: [PaymentSystemGoal](#entity-PaymentSystemGoal)

  Платежные системы.
  Цель считается достигнутой, если посетитель совершил оплату через платежную систему.


  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- **Type**: [PhoneGoal](#entity-PhoneGoal)

  Нажатие на номер телефона.

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example",
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example",
    "hide_phone_number": true
  }
  ```

  {% endcut %}

- **Type**: [SiteSearchGoal](#entity-SiteSearchGoal)

  Поиск по сайту.
  Цель будет достигнута при поиске на сайте, если в урле в get-параметрах есть хотя бы одно совпадение.


  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example",
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

- **Type**: [SocialNetworkGoal](#entity-SocialNetworkGoal)

  Переход в социальную сеть.
  Цель будет достигнута при клике пользователем на ссылку, которая ведет в социальную сеть.


  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example",
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

- **Type**: [UrlGoal](#entity-UrlGoal)

  Посещение страниц.
  Достигается, когда выполняется хотя бы одно из условий.


  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example",
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ]
  }
  ```

  {% endcut %}

- **Type**: [VisitDurationGoal](#entity-VisitDurationGoal)

  Продолжительность визита.
  Цель будет достигнута при времени визита больше заданного.


  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example",
    "duration": 1
  }
  ```

  {% endcut %}

{% endcut %}

{% endcut %}

Список структур с информацией о целях счетчика.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example",
    "conditions": [
      {}
    ]
  }
]
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### GoalE {#entity-GoalE}

#|
|| **Name** | **Description** ||
||

_type_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Тип цели:
- `action` — JavaScript-событие.
- `chat` — клик по чату.
- `email` — клик по email.
- `file` — скачивание файлов.
- `messenger` — переход в мессенджер.
- `number` — количество просмотров.
- `payment_system` — платежная система.
- `phone` — клик по номеру телефона.
- `search` — поиск по сайту.
- `social` — переход в соцсети.
- `step` — составная цель.
- `url` — посещение страниц.
- `visit_duration` — продолжительность визита.


_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_default_price_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: number

Цена цели по умолчанию.
{.table-cell}
||
||

_goal_source_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Признак того, как создана цель:
- `user` — цель создана пользователем Метрики.
- `auto` — цель создана автоматически. К таким целям относятся т. н. [автоматические цели](https://yandex.ru/support/metrica/general/auto-goals.html?lang=ru), цель **Звонок** (создается при [передаче данных о звонках](https://yandex.com.tr/dev/metrika/ru/management/calls.md)).


_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Идентификатор цели. Укажите данный параметр при изменении и удалении цели счетчика.
{.table-cell}
||
||

_is_favorite_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean

Является ли цель избранной:
- 0 ― не является (по умолчанию).
- 1 ― является.

{.table-cell}
||
||

_name_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Наименование цели.

_Min length:_{.json-schema-reset .json-schema-assertion} `0`

_Max length:_{.json-schema-reset .json-schema-assertion} `255`

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_status_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "goal_source": "example",
  "is_favorite": true,
  "status": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### ActionGoalCondition {#entity-ActionGoalCondition}

Список структур с условиями цели.

#|
|| **Name** | **Description** ||
||

_type_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Тип условия. Возможные значения:
- `contain` — содержит.
- `exact` — совпадает.
- `start` — начинается с.
- `regexp` — удовлетворяет регулярному выражению.


_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_url_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Значение.

_Min length:_{.json-schema-reset .json-schema-assertion} `0`

_Max length:_{.json-schema-reset .json-schema-assertion} `16384`

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "type": "example",
  "url": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### ActionGoal {#entity-ActionGoal}

Целевое событие.

{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _conditions_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: [ActionGoalCondition](#entity-ActionGoalCondition)[]

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  [
    {
      "type": "example",
      "url": "example"
    }
  ]
  ```

  {% endcut %}
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ]
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "goal_source": "example",
  "is_favorite": true,
  "status": "example",
  "conditions": [
    {
      "type": "example",
      "url": "example"
    }
  ]
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### ChatGoalCondition {#entity-ChatGoalCondition}

Список структур с условиями цели.

#|
|| **Name** | **Description** ||
||

_field_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

К чему применять цель:
- `chat_answered` — статус ответа в чате.
- `chat_platform` — платформа чата.
- `chat_tag` — тег чата.


_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "field": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### ChatGoalConditionAnswered {#entity-ChatGoalConditionAnswered}

{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [ChatGoalCondition](#entity-ChatGoalCondition)

  Список структур с условиями цели.

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "field": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _answered_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: boolean

  Статус ответа в чате.
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "answered": true
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "field": "example",
  "answered": true
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### ChatGoalConditionPlatform {#entity-ChatGoalConditionPlatform}

{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [ChatGoalCondition](#entity-ChatGoalCondition)

  Список структур с условиями цели.

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "field": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _platform_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  Платформа чата.
  Возможные значения:
  - `telegram`;
  - `viber`;
  - `whatsApp`.


  _Example:_{.json-schema-reset .json-schema-example} `telegram`
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "platform": "telegram"
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "field": "example",
  "platform": "telegram"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### ChatGoalConditionTag {#entity-ChatGoalConditionTag}

{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [ChatGoalCondition](#entity-ChatGoalCondition)

  Список структур с условиями цели.

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "field": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _operator_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  Тип условия. Возможные значения:
  - `contain` — содержит.
  - `exact` — совпадает.
  - `start` — начинается с.
  - `regexp` — удовлетворяет регулярному выражению.


  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  ||

  _value_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  _Min length:_{.json-schema-reset .json-schema-assertion} `0`

  _Max length:_{.json-schema-reset .json-schema-assertion} `1024`

  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "operator": "example",
    "value": "example"
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "field": "example",
  "operator": "example",
  "value": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### ChatGoal {#entity-ChatGoal}

Нажатие на чат.

{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _conditions_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  {% cut "**Type**: array" %}

  {% cut "**One of 3 types**" %}{.json-schema-combinators data-marker=or}

  - **Type**: [ChatGoalConditionAnswered](#entity-ChatGoalConditionAnswered)

    {% cut "**Example**" %}{.json-schema-example}

    ```json translate=no
    {
      "field": "example",
      "answered": true
    }
    ```

    {% endcut %}

  - **Type**: [ChatGoalConditionPlatform](#entity-ChatGoalConditionPlatform)

    {% cut "**Example**" %}{.json-schema-example}

    ```json translate=no
    {
      "field": "example",
      "platform": "telegram"
    }
    ```

    {% endcut %}

  - **Type**: [ChatGoalConditionTag](#entity-ChatGoalConditionTag)

    {% cut "**Example**" %}{.json-schema-example}

    ```json translate=no
    {
      "field": "example",
      "operator": "example",
      "value": "example"
    }
    ```

    {% endcut %}

  {% endcut %}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  [
    {
      "field": "example",
      "answered": true
    }
  ]
  ```

  {% endcut %}
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "conditions": [
      {
        "field": "example",
        "answered": true
      }
    ]
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "goal_source": "example",
  "is_favorite": true,
  "status": "example",
  "conditions": [
    null
  ]
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### CompositeGoal {#entity-CompositeGoal}

Составная цель.
Нужна для группировки и задания порядка обычных целей.
В качестве шагов может содержать цели типа "Посещение страниц" и "JavaScript-событие".
Шаг считается достигнутым, если были достигнуты все предыдущие шаги, и после этого были выполнены все условия текущего шага.


{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _steps_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  {% cut "**Type**: array" %}

  {% cut "**One of 13 types**" %}{.json-schema-combinators data-marker=or}

  - **Type**: [ActionGoal](#entity-ActionGoal)

    Целевое событие.

    {% cut "**Example**" %}{.json-schema-example}

    ```json translate=no
    {
      "id": 0,
      "name": "example",
      "type": "example",
      "default_price": 0.5,
      "goal_source": "example",
      "is_favorite": true,
      "status": "example",
      "conditions": [
        {
          "type": "example",
          "url": "example"
        }
      ]
    }
    ```

    {% endcut %}

  - **Type**: [ChatGoal](#entity-ChatGoal)

    Нажатие на чат.

    {% cut "**Example**" %}{.json-schema-example}

    ```json translate=no
    {
      "id": 0,
      "name": "example",
      "type": "example",
      "default_price": 0.5,
      "goal_source": "example",
      "is_favorite": true,
      "status": "example",
      "conditions": [
        null
      ]
    }
    ```

    {% endcut %}

  - **Type**: [CompositeGoal](#entity-CompositeGoal)

    Составная цель.
    Нужна для группировки и задания порядка обычных целей.
    В качестве шагов может содержать цели типа "Посещение страниц" и "JavaScript-событие".
    Шаг считается достигнутым, если были достигнуты все предыдущие шаги, и после этого были выполнены все условия текущего шага.


    {% cut "**Example**" %}{.json-schema-example}

    ```json translate=no
    {
      "id": 0,
      "name": "example",
      "type": "example",
      "default_price": 0.5,
      "goal_source": "example",
      "is_favorite": true,
      "status": "example",
      "steps": [
        null
      ]
    }
    ```

    {% endcut %}

  - **Type**: [DepthGoal](#entity-DepthGoal)

    Количество просмотров.
    Цель считается достигнутой, если посетитель просмотрел заданное количество страниц сайта.


    {% cut "**Example**" %}{.json-schema-example}

    ```json translate=no
    {
      "id": 0,
      "name": "example",
      "type": "example",
      "default_price": 0.5,
      "goal_source": "example",
      "is_favorite": true,
      "status": "example",
      "depth": 2
    }
    ```

    {% endcut %}

  - **Type**: [EmailGoal](#entity-EmailGoal)

    Нажатие на email.

    {% cut "**Example**" %}{.json-schema-example}

    ```json translate=no
    {
      "id": 0,
      "name": "example",
      "type": "example",
      "default_price": 0.5,
      "goal_source": "example",
      "is_favorite": true,
      "status": "example",
      "conditions": [
        {
          "type": "example",
          "url": "example"
        }
      ],
      "flag": "example"
    }
    ```

    {% endcut %}

  - **Type**: [FileGoal](#entity-FileGoal)

    Скачивание файлов.
    Цель считается достигнутой, если посетитель скачал любой файл или определенный файл.


    {% cut "**Example**" %}{.json-schema-example}

    ```json translate=no
    {
      "id": 0,
      "name": "example",
      "type": "example",
      "default_price": 0.5,
      "goal_source": "example",
      "is_favorite": true,
      "status": "example",
      "conditions": [
        {
          "type": "example",
          "url": "example"
        }
      ],
      "flag": "example"
    }
    ```

    {% endcut %}

  - **Type**: [MessengerGoal](#entity-MessengerGoal)

    Переход в мессенджер.
    Цель будет достигнута при клике пользователем на ссылку, которая ведет в мессенджер.


    {% cut "**Example**" %}{.json-schema-example}

    ```json translate=no
    {
      "id": 0,
      "name": "example",
      "type": "example",
      "default_price": 0.5,
      "goal_source": "example",
      "is_favorite": true,
      "status": "example",
      "conditions": [
        {
          "type": "example",
          "url": "example"
        }
      ],
      "flag": "example"
    }
    ```

    {% endcut %}

  - **Type**: [PaymentSystemGoal](#entity-PaymentSystemGoal)

    Платежные системы.
    Цель считается достигнутой, если посетитель совершил оплату через платежную систему.


    {% cut "**Example**" %}{.json-schema-example}

    ```json translate=no
    {
      "id": 0,
      "name": "example",
      "type": "example",
      "default_price": 0.5,
      "goal_source": "example",
      "is_favorite": true,
      "status": "example"
    }
    ```

    {% endcut %}

  - **Type**: [PhoneGoal](#entity-PhoneGoal)

    Нажатие на номер телефона.

    {% cut "**Example**" %}{.json-schema-example}

    ```json translate=no
    {
      "id": 0,
      "name": "example",
      "type": "example",
      "default_price": 0.5,
      "goal_source": "example",
      "is_favorite": true,
      "status": "example",
      "conditions": [
        {
          "type": "example",
          "url": "example"
        }
      ],
      "flag": "example",
      "hide_phone_number": true
    }
    ```

    {% endcut %}

  - **Type**: [SiteSearchGoal](#entity-SiteSearchGoal)

    Поиск по сайту.
    Цель будет достигнута при поиске на сайте, если в урле в get-параметрах есть хотя бы одно совпадение.


    {% cut "**Example**" %}{.json-schema-example}

    ```json translate=no
    {
      "id": 0,
      "name": "example",
      "type": "example",
      "default_price": 0.5,
      "goal_source": "example",
      "is_favorite": true,
      "status": "example",
      "conditions": [
        {
          "type": "example",
          "url": "example"
        }
      ],
      "flag": "example"
    }
    ```

    {% endcut %}

  - **Type**: [SocialNetworkGoal](#entity-SocialNetworkGoal)

    Переход в социальную сеть.
    Цель будет достигнута при клике пользователем на ссылку, которая ведет в социальную сеть.


    {% cut "**Example**" %}{.json-schema-example}

    ```json translate=no
    {
      "id": 0,
      "name": "example",
      "type": "example",
      "default_price": 0.5,
      "goal_source": "example",
      "is_favorite": true,
      "status": "example",
      "conditions": [
        {
          "type": "example",
          "url": "example"
        }
      ],
      "flag": "example"
    }
    ```

    {% endcut %}

  - **Type**: [UrlGoal](#entity-UrlGoal)

    Посещение страниц.
    Достигается, когда выполняется хотя бы одно из условий.


    {% cut "**Example**" %}{.json-schema-example}

    ```json translate=no
    {
      "id": 0,
      "name": "example",
      "type": "example",
      "default_price": 0.5,
      "goal_source": "example",
      "is_favorite": true,
      "status": "example",
      "conditions": [
        {
          "type": "example",
          "url": "example"
        }
      ]
    }
    ```

    {% endcut %}

  - **Type**: [VisitDurationGoal](#entity-VisitDurationGoal)

    Продолжительность визита.
    Цель будет достигнута при времени визита больше заданного.


    {% cut "**Example**" %}{.json-schema-example}

    ```json translate=no
    {
      "id": 0,
      "name": "example",
      "type": "example",
      "default_price": 0.5,
      "goal_source": "example",
      "is_favorite": true,
      "status": "example",
      "duration": 1
    }
    ```

    {% endcut %}

  {% endcut %}

  _Min items:_{.json-schema-reset .json-schema-assertion} `0`

  _Max items:_{.json-schema-reset .json-schema-assertion} `5`

  {% endcut %}

  _Min items:_{.json-schema-reset .json-schema-assertion} `0`

  _Max items:_{.json-schema-reset .json-schema-assertion} `5`

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  [
    {
      "id": 0,
      "name": "example",
      "type": "example",
      "default_price": 0.5,
      "goal_source": "example",
      "is_favorite": true,
      "status": "example",
      "conditions": [
        {}
      ]
    }
  ]
  ```

  {% endcut %}
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "steps": [
      {
        "id": 0,
        "name": "example",
        "type": "example",
        "default_price": 0.5,
        "goal_source": "example",
        "is_favorite": true,
        "status": "example",
        "conditions": [
          null
        ]
      }
    ]
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "goal_source": "example",
  "is_favorite": true,
  "status": "example",
  "steps": [
    null
  ]
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### DepthGoal {#entity-DepthGoal}

Количество просмотров.
Цель считается достигнутой, если посетитель просмотрел заданное количество страниц сайта.


{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _depth_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: integer

  Количество просмотренных пользователем страниц.

  _Min value:_{.json-schema-reset .json-schema-assertion} `2`
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "depth": 2
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "goal_source": "example",
  "is_favorite": true,
  "status": "example",
  "depth": 2
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### GoalCondition {#entity-GoalCondition}

Список структур с условиями цели.

#|
|| **Name** | **Description** ||
||

_type_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Тип условия:
- `contain` — содержит;
- `exact` — совпадает;
- `start` — начинается с;
- `regexp` — удовлетворяет регулярному выражению;
- `action` — специальный тип условия для целей «JavaScript-событие»;
- `messenger` — специальный тип условия для целей типа form, путь в dom дереве;
- `all_files` — признак для целей «Переход в мессенджер»;
- `file` — скачивание конкретного файла для целей «Скачивание файлов»;
- `search` — признак для целей «Поиск по сайту»;
- `all_social` — специальный тип условия для целей типа `social` (все социальные сети);
- `social` — специальный тип условия для целей типа `social` (конкретная социальная сеть);
- `regexp_action` — js-событие удовлетворяет регулярному выражению (используется только в шаге составной цели);
- `contain_action` — js-событие содержит (используется только в шаге составной цели).


_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_url_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Значение зависит от типа цели:
- **Посещение страниц**. Адрес страницы или части страницы для условия.
- **Клик по email** или **Клик по номеру телефона**. Email или номер телефона, который указан в ссылках на сайте. Подробнее о том, как отследить клик по [email](https://yandex.ru/support/metrica/simple-goal/email.html) или [номеру телефона](https://yandex.ru/support/metrica/simple-goal/tel.html).
- **Переход в мессенджер**. Название мессенджера, полученное с помощью метода [GET management/v1/messengers](https://yandex.com.tr/dev/metrika/ru/management/openapi/goal/getMessengers.md), или значение `all_messengers`.
- **Поиск по сайту**. GET-параметр, который используется для поиска на сайте. Метрика автоматически распознает параметры `q`, `text`, `query` или `search`. Если на сайте используется другой параметр, укажите его в запросе.
- **Скачивание файлов**. Имя файла, например `example.pdf`. Значение может быть пустым, если нужно отслеживать скачивание всех файлов на сайте.
- **Переход в социальную сеть**. Название социальной сети, полученное с помощью метода [GET management/v1/social_networks](https://yandex.com.tr/dev/metrika/ru/management/openapi/goal/getSocialNetworks.md), или значение `all_social`.


_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "type": "example",
  "url": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### EmailGoal {#entity-EmailGoal}

Нажатие на email.

{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _conditions_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: [GoalCondition](#entity-GoalCondition)[]

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  [
    {
      "type": "example",
      "url": "example"
    }
  ]
  ```

  {% endcut %}
  {.table-cell}
  ||
  ||

  _flag_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  Тип цели для клиентов Яндекс Маркета:
  - `basket` — **корзина**, страница посещения корзины.
  - `order` — **заказ**, страница подтверждения заказа.


  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "goal_source": "example",
  "is_favorite": true,
  "status": "example",
  "conditions": [
    {
      "type": "example",
      "url": "example"
    }
  ],
  "flag": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### FileGoal {#entity-FileGoal}

Скачивание файлов.
Цель считается достигнутой, если посетитель скачал любой файл или определенный файл.


{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _conditions_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: [GoalCondition](#entity-GoalCondition)[]

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  [
    {
      "type": "example",
      "url": "example"
    }
  ]
  ```

  {% endcut %}
  {.table-cell}
  ||
  ||

  _flag_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  Тип цели для клиентов Яндекс Маркета:
  - `basket` — **корзина**, страница посещения корзины.
  - `order` — **заказ**, страница подтверждения заказа.


  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "goal_source": "example",
  "is_favorite": true,
  "status": "example",
  "conditions": [
    {
      "type": "example",
      "url": "example"
    }
  ],
  "flag": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### MessengerGoal {#entity-MessengerGoal}

Переход в мессенджер.
Цель будет достигнута при клике пользователем на ссылку, которая ведет в мессенджер.


{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _conditions_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: [GoalCondition](#entity-GoalCondition)[]

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  [
    {
      "type": "example",
      "url": "example"
    }
  ]
  ```

  {% endcut %}
  {.table-cell}
  ||
  ||

  _flag_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  Тип цели для клиентов Яндекс Маркета:
  - `basket` — **корзина**, страница посещения корзины.
  - `order` — **заказ**, страница подтверждения заказа.


  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "goal_source": "example",
  "is_favorite": true,
  "status": "example",
  "conditions": [
    {
      "type": "example",
      "url": "example"
    }
  ],
  "flag": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### PaymentSystemGoal {#entity-PaymentSystemGoal}

Платежные системы.
Цель считается достигнутой, если посетитель совершил оплату через платежную систему.


{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "goal_source": "example",
  "is_favorite": true,
  "status": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### PhoneGoal {#entity-PhoneGoal}

Нажатие на номер телефона.

{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _conditions_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: [GoalCondition](#entity-GoalCondition)[]

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  [
    {
      "type": "example",
      "url": "example"
    }
  ]
  ```

  {% endcut %}
  {.table-cell}
  ||
  ||

  _flag_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  Тип цели для клиентов Яндекс Маркета:
  - `basket` — **корзина**, страница посещения корзины.
  - `order` — **заказ**, страница подтверждения заказа.


  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  ||

  _hide_phone_number_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: boolean

  Скрывать номер телефона на десктопах.
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example",
    "hide_phone_number": true
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "goal_source": "example",
  "is_favorite": true,
  "status": "example",
  "conditions": [
    {
      "type": "example",
      "url": "example"
    }
  ],
  "flag": "example",
  "hide_phone_number": true
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### SiteSearchGoal {#entity-SiteSearchGoal}

Поиск по сайту.
Цель будет достигнута при поиске на сайте, если в урле в get-параметрах есть хотя бы одно совпадение.


{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _conditions_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: [GoalCondition](#entity-GoalCondition)[]

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  [
    {
      "type": "example",
      "url": "example"
    }
  ]
  ```

  {% endcut %}
  {.table-cell}
  ||
  ||

  _flag_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  Тип цели для клиентов Яндекс Маркета:
  - `basket` — **корзина**, страница посещения корзины.
  - `order` — **заказ**, страница подтверждения заказа.


  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "goal_source": "example",
  "is_favorite": true,
  "status": "example",
  "conditions": [
    {
      "type": "example",
      "url": "example"
    }
  ],
  "flag": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### SocialNetworkGoal {#entity-SocialNetworkGoal}

Переход в социальную сеть.
Цель будет достигнута при клике пользователем на ссылку, которая ведет в социальную сеть.


{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _conditions_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: [GoalCondition](#entity-GoalCondition)[]

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  [
    {
      "type": "example",
      "url": "example"
    }
  ]
  ```

  {% endcut %}
  {.table-cell}
  ||
  ||

  _flag_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  Тип цели для клиентов Яндекс Маркета:
  - `basket` — **корзина**, страница посещения корзины.
  - `order` — **заказ**, страница подтверждения заказа.


  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ],
    "flag": "example"
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "goal_source": "example",
  "is_favorite": true,
  "status": "example",
  "conditions": [
    {
      "type": "example",
      "url": "example"
    }
  ],
  "flag": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### UrlGoal {#entity-UrlGoal}

Посещение страниц.
Достигается, когда выполняется хотя бы одно из условий.


{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _conditions_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: [UrlGoalCondition](#entity-UrlGoalCondition)[]

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  [
    {
      "type": "example",
      "url": "example"
    }
  ]
  ```

  {% endcut %}
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "conditions": [
      {
        "type": "example",
        "url": "example"
      }
    ]
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "goal_source": "example",
  "is_favorite": true,
  "status": "example",
  "conditions": [
    {
      "type": "example",
      "url": "example"
    }
  ]
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### VisitDurationGoal {#entity-VisitDurationGoal}

Продолжительность визита.
Цель будет достигнута при времени визита больше заданного.


{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [GoalE](#entity-GoalE)

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "name": "example",
    "type": "example",
    "default_price": 0.5,
    "goal_source": "example",
    "is_favorite": true,
    "status": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _duration_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: integer

  Продолжительность визита в секундах.

  _Min value:_{.json-schema-reset .json-schema-assertion} `1`
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "duration": 1
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "type": "example",
  "default_price": 0.5,
  "goal_source": "example",
  "is_favorite": true,
  "status": "example",
  "duration": 1
}
```

{% endcut %}

</div>

</div>

</div>
<!-- endsource: ru/management-src/Upravlenie-celyami/goals.md -->

[*Deprecated]: No longer supported, please use an alternative and newer version.