Avito Call API

The Call API from Avito — 4 operation(s) for call.

Documentation

📖
Documentation
https://developers.avito.ru/api-catalog/accounts-hierarchy/documentation
📖
Documentation
https://developers.avito.ru/api-catalog/ads/documentation
📖
Documentation
https://developers.avito.ru/api-catalog/auction/documentation
📖
Documentation
https://developers.avito.ru/api-catalog/auth/documentation
📖
Documentation
https://developers.avito.ru/api-catalog/autoload/documentation
📖
Documentation
https://developers.avito.ru/api-catalog/autostrategy/documentation
📖
Documentation
https://developers.avito.ru/api-catalog/autoteka/documentation
📖
Documentation
https://developers.avito.ru/api-catalog/avito-promo/documentation
📖
Documentation
https://developers.avito.ru/api-catalog/calltracking/documentation
📖
Documentation
https://developers.avito.ru/api-catalog/cpa/documentation
📖
Documentation
https://developers.avito.ru/api-catalog/cpxpromo/documentation
📖
Documentation
https://developers.avito.ru/api-catalog/delivery-sandbox/documentation
📖
Documentation
https://developers.avito.ru/api-catalog/item/documentation
📖
Documentation
https://developers.avito.ru/api-catalog/job/documentation
📖
Documentation
https://developers.avito.ru/api-catalog/messenger/documentation
📖
Documentation
https://developers.avito.ru/api-catalog/order-management/documentation
📖
Documentation
https://developers.avito.ru/api-catalog/promotion/documentation
📖
Documentation
https://developers.avito.ru/api-catalog/ratings/documentation
📖
Documentation
https://developers.avito.ru/api-catalog/realty-reports/documentation
📖
Documentation
https://developers.avito.ru/api-catalog/sbc-gateway/documentation
📖
Documentation
https://developers.avito.ru/api-catalog/stock-management/documentation
📖
Documentation
https://developers.avito.ru/api-catalog/str/documentation
📖
Documentation
https://developers.avito.ru/api-catalog/tariff/documentation
📖
Documentation
https://developers.avito.ru/api-catalog/trxpromo/documentation
📖
Documentation
https://developers.avito.ru/api-catalog/user/documentation

Specifications

OpenAPI Specification

avito-call-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  contact:
    email: supportautoload@avito.ru
  description: 'API для взаимодействия с иерархией аккаунтов в Авито

    **Авито API для бизнеса предоставляется согласно [Условиям использования](https://www.avito.ru/legal/pro_tools/public-api).**

    '
  title: Иерархия Аккаунтов Access Call API
  version: '1'
servers:
- url: https://api.avito.ru/
tags:
- name: Call
paths:
  /cpa/v1/call/{call_id}:
    parameters:
    - $ref: '#/components/parameters/authHeader'
    - $ref: '#/components/parameters/sourceHeader'
    - description: Идентификатор звонка
      in: path
      name: call_id
      required: true
      schema:
        format: int64
        type: integer
    get:
      deprecated: true
      description: '__DEPRECATED__

        __Используйте endpoint [get_record_by_call_id](https://developers.avito.ru/api-catalog/calltracking/documentation#operation/get_record_by_call_id)__

        Получение записи звонка по идентификатору

        '
      operationId: getCall
      responses:
        '200':
          description: Успешный ответ
          headers:
            Content-Length:
              description: Заголовок содержит размер объекта
              schema:
                type: string
            Content-Type:
              description: Заголовок будет содержать тип возвращаемого контента (audio/mpeg)
              schema:
                type: string
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFoundError'
          description: Звонок не найден
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/tooManyRequestsError'
          description: Превышено допустимое количество запросов
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serviceError'
          description: Внутренняя ошибка метода API
      security:
      - ClientCredentials: []
      summary: Запись звонка (deprecated)
      tags:
      - Call
  /cpa/v1/createComplaint:
    parameters:
    - $ref: '#/components/parameters/authHeader'
    - $ref: '#/components/parameters/sourceHeader'
    post:
      description: Создание жалобы на звонок по идентификатору. Максимальное количество запросов в минуту - 1.
      operationId: postCreateComplaint
      requestBody:
        content:
          application/json:
            example:
              callId: 218491749
              message: Клиент позвонил по ошибке
            schema:
              $ref: '#/components/schemas/CreateComplaint'
        description: Идентификатор звонка и текст жалобы
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  error:
                    $ref: '#/components/schemas/CpaError'
                  success:
                    title: Флаг статуса запроса
                    type: boolean
                type: object
          description: Успешный ответ или сообщение об ошибке
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/tooManyRequestsError'
          description: Превышено допустимое количество запросов
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
      security:
      - ClientCredentials: []
      summary: Создание жалобы для звонков
      tags:
      - Call
  /cpa/v2/callById:
    parameters:
    - $ref: '#/components/parameters/authHeader'
    - $ref: '#/components/parameters/sourceHeader'
    post:
      deprecated: true
      description: Получение модели звонка по идентификатору
      operationId: getCallByIdV2
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CallById'
        description: Идентификатор звонка
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  calls:
                    $ref: '#/components/schemas/CallV2'
                  error:
                    $ref: '#/components/schemas/CpaError'
                title: Звонок или ошибка
                type: object
          description: Успешный ответ или сообщение об ошибке
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/tooManyRequestsError'
          description: Превышено допустимое количество запросов
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
      security:
      - ClientCredentials: []
      summary: Звонок
      tags:
      - Call
  /cpa/v2/callsByTime:
    parameters:
    - $ref: '#/components/parameters/authHeader'
    - $ref: '#/components/parameters/sourceHeader'
    post:
      description: Получение списка звонков по времени создания. Максимальное количество запросов в минуту - 1.
      operationId: getCallsByTimeV2
      requestBody:
        content:
          application/json:
            example:
              dateTimeFrom: '2021-01-02T15:04:05Z'
              limit: 1000
              offset: 100
            schema:
              $ref: '#/components/schemas/CallsByTime'
        description: Время с которого нужного производить поиск звонков, размер выборки и смещение
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  calls:
                    items:
                      $ref: '#/components/schemas/CallV2'
                    title: Полученные звонки
                    type: array
                  error:
                    $ref: '#/components/schemas/CpaError'
                title: Список звонков
                type: object
          description: Успешный ответ или сообщение об ошибке
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/tooManyRequestsError'
          description: Превышено допустимое количество запросов
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
      security:
      - ClientCredentials: []
      summary: Звонки по времени
      tags:
      - Call
components:
  headers:
    X-RateLimit-Limit:
      description: Количество запросов в минуту
      schema:
        format: int32
        type: integer
    X-RateLimit-Remaining:
      description: Доступное количество запросов в текущем временном окне
      schema:
        format: int32
        type: integer
  schemas:
    CpaError:
      properties:
        code:
          description: 'Внутренний код ошибки


            Возможные значения:

            - 1000 - пустой запрос

            - 1001 - ошибка валидации

            - 1002 - ошибка авторизации

            - 1003 - внутренняя ошибка

            - 1004 - не найдено

            '
          format: int64
          type: integer
        message:
          description: Текст ошибки
          example: ЦД недоступно для обжалования
          type: string
      type: object
    CreateComplaint:
      properties:
        callId:
          description: Идентификатор звонка
          format: int64
          type: integer
        message:
          description: Текст жалобы
          type: string
      required:
      - callId
      - message
      type: object
    serviceError:
      properties:
        error:
          properties:
            code:
              description: Код ошибки
              example: 500
              format: int32
              type: integer
            message:
              description: Описание ошибки
              example: Error while processing request. Please, contact support
              type: string
          required:
          - code
          - message
          type: object
      type: object
    tooManyRequestsError:
      properties:
        error:
          properties:
            code:
              description: Код ошибки
              example: 429
              format: int32
              type: integer
          required:
          - code
          type: object
      type: object
    CallsByTime:
      properties:
        dateTimeFrom:
          description: Время с которого нужно начинать поиск звонков по startTime (строка в формате RFC3339)
          example: '2021-01-02T15:04:05Z'
          type: string
        limit:
          description: Размер выборки
          format: int64
          type: integer
        offset:
          description: 'Смещение выборки (по-умолчанию 0). Для улучшения производительности лучше использовать

            максимальный startTime звонка из предыдущей выборки

            '
          format: int64
          type: integer
      required:
      - dateTimeFrom
      - limit
      type: object
    notFoundError:
      properties:
        error:
          properties:
            code:
              description: Код ошибки
              example: 404
              format: int32
              type: integer
            message:
              description: Сообщение об ошибке
              example: Not found
              type: string
          required:
          - code
          - message
          type: object
      type: object
    CallById:
      properties:
        callId:
          description: Идентификатор звонка
          format: int64
          type: integer
      required:
      - callId
      type: object
    CallV2:
      properties:
        buyerPhone:
          description: Телефонный номер покупателя
          example: '89444988703'
          type: string
        createTime:
          description: Время поступления звонка (строка в формате RFC3339)
          example: '2024-01-12T14:52:10+03:00'
          type: string
        duration:
          description: Время разговора в секундах
          example: '119'
          type: integer
        groupTitle:
          description: Название группы
          example: Автомобили · Новые
          type: string
        id:
          description: Идентификатор звонка
          example: '2024'
          format: int64
          type: integer
        isArbitrageAvailable:
          description: Флаг, указывающий на то, доступен ли арбитраж по звонку
          example: 'true'
          type: boolean
        itemId:
          description: Идентификатор объявления
          example: '2164143441'
          format: int64
          type: integer
        price:
          description: Цена звонка CPA в копейках
          example: '171600'
          format: int64
          type: integer
        recordUrl:
          description: Ссылка на запись звонка
          example: https://prod.k.avito.ru/service-open-api-proxy/cpa/v1/call/3xx8
          type: string
        sellerPhone:
          description: Реальный телефонный номер продавца
          example: '89444988705'
          type: string
        startTime:
          description: Время начала разговора (строка в формате RFC3339)
          example: '2024-01-12T14:52:00+03:00'
          type: string
        statusId:
          description: 'Статус звонка (0 - целевой, 1 - на модерации, 2 - помечен как целевой после модерации,

            3 - помечен как нецелевой после модерации)

            '
          enum:
          - 0
          - 1
          - 2
          - 3
          format: int64
          type: integer
        virtualPhone:
          description: Виртуальный телефонный номер продавца
          example: '89444988704'
          type: string
        waitingDuration:
          description: Время ожидания в секундах
          example: '0.0109999'
          type: number
      type: object
  parameters:
    authHeader:
      description: Токен для авторизации
      in: header
      name: Authorization
      required: true
      schema:
        example: Bearer ACCESS_TOKEN
        type: string
    sourceHeader:
      description: Имя сервиса, отправляющего запрос
      in: header
      name: X-Source
      required: true
      schema:
        example: someName
        type: string
  securitySchemes:
    AuthorizationCode:
      description: Это API использует OAuth 2 с механизмом authorization_code. Используйте его для доступа к данным других пользователей при разработке стороннего приложения. [Подробнее](/api-catalog/auth/documentation#tag/ApplicationAccess)
      flows:
        authorizationCode:
          authorizationUrl: https://avito.ru/oauth
          scopes:
            ah:access: Взаимодействие с иерархией аккаунтов
          tokenUrl: https://api.avito.ru/token
      type: oauth2
    ClientCredentials:
      description: Это API использует OAuth 2 с механизмом client_credentials. Используйте его для доступа к возможностям своей личной учетной записи. [Подробнее](#tag/Access)
      flows:
        clientCredentials:
          scopes: {}
          tokenUrl: https://api.avito.ru/token
      type: oauth2