openapi: 3.1.0
info:
  title: MEGOGO Content API
  version: 1.0.0
  summary: Каталог, метадані, авторизація користувачів і відтворення відео для застосунків партнерів.
  description: "Ця специфікація описує методи Content API, за допомогою яких партнери\nпоказують контент\
    \ MEGOGO у своїх застосунках.\n\n\n## Підпис запиту\n\nКожен запит має містити query-параметр `sign`:\n\
    \n1. Об'єднайте параметри запиту у форматі `name=value` без роздільника\n   в тому самому порядку,\
    \ що й в URL. Параметр `sign` не включайте.\n2. Додайте в кінець приватний ключ. Обчисліть MD5-хеш\
    \ (hex у нижньому регістрі).\n3. Додайте в кінець хешу публічний ключ.\n\n`sign = md5(\"p1=v1p2=v2…\"\
    \ + private_key) + public_key`\n\nПередавайте `sign` останнім параметром. Для запиту без параметрів\n\
    `sign = md5(private_key) + public_key`.\n\n## Структура відповіді\n\nКожна відповідь містить поля\
    \ `result` (`ok` або `error`), `code` і\n`data`. Відповідь з помилкою містить також `message`.\n\n\
    УВАГА: Більшість помилок повертається з HTTP-статусом 200. Наприклад,\nдля невідомого ID відео API\
    \ повертає HTTP 200 з `\"result\": \"error\", \"code\": 404`.\nПеревіряйте `result` і `code`, а не\
    \ HTTP-статус. Неправильний `sign`\nповертає HTTP 400.\n\n## Каталог і `/video/info`\n\nКаталог можна\
    \ побудувати двома способами: імпортувати XML-фід або\nсформувати екрани за допомогою запитів списків\
    \ цього API. Надсилайте\n`/video/info` лише після дії користувача (коли він відкриває сторінку\nвідео).\
    \ Не використовуйте цей запит, щоб збирати метадані багатьох відео.\n\n## Пагінація\n\nДля всіх запитів\
    \ списків використовуйте пагінацію за токеном:\n\n1. Надішліть перший запит із `paging_strategy=token`.\n\
    2. Якщо відповідь містить `next_page`, є ще елементи. Щоб отримати\n   наступну сторінку, надішліть\
    \ той самий запит і додайте `page={next_page}`.\n3. Якщо у відповіді немає `next_page`, це остання\
    \ сторінка.\n\nЗначення `page` — це закодована позиція. Не змінюйте його й не\nформуйте самостійно.\
    \ Включайте `page` у підпис, як і всі інші\nпараметри. Відповіді в цьому режимі містять `next_page`\
    \ і `prev_page`,\nале не містять `total`, `offset` і `has_more`.\n\nНе використовуйте `offset` і `limit`:\
    \ MEGOGO планує їх прибрати.\nРозмір сторінки — 20 елементів.\n\n## Мова\n\nПередавайте `lang` у кожному\
    \ запиті. Якщо `lang` не передано, API\nвикористовує заголовок `Accept-Language`. Якщо значення заголовка\n\
    невідоме, тексти повертаються російською мовою.\n\n## Обмеження\n\n1000 запитів на хвилину для кожного\
    \ ключа. Якщо перевищити цей ліміт,\nAPI може повернути HTTP 429 Too Many Requests. Заголовків з\n\
    інформацією про ліміти у відповідях немає.\n\n## Геолокація\n\nЯкщо ваш застосунок надсилає `/stream`\
    \ з пристрою користувача, MEGOGO\nвизначає країну користувача за IP-адресою запиту. Якщо запити\n\
    надсилає ваш сервер, MEGOGO вмикає для вашого ключа фіксований\n(«перевизначений») регіон, і ви самі\
    \ відповідаєте за контроль\nмісцеперебування своїх користувачів.\n\n## Тестові ключі\n\nОкремого тестового\
    \ середовища немає. MEGOGO надає кожному партнерові\nтестовий ID партнера (наприклад, `testprod_ua`)\
    \ і тестові ключі в\nпродуктивному середовищі.\n"
  contact:
    name: MEGOGO partner support
    email: supportpartners@megogo.net
servers:
- url: https://api.megogo.net/v1
  description: 'Продуктивне середовище

    '
tags:
- name: Authorization
- name: Configuration
- name: Catalog
- name: Video
- name: Playback
security:
- signature: []
paths:
  /auth/by_partners:
    get:
      tags:
      - Authorization
      operationId: authorizeUser
      summary: Авторизувати кінцевого користувача партнера
      description: 'Повертає токен доступу для кінцевого користувача, який має передплату

        або купівлю в партнерському білінгу MEGOGO. Додавайте `access_token`

        до `/stream` та інших запитів, яким потрібен користувач.


        Це єдиний спосіб авторизації для застосунків партнерів. Авторизація

        через cookie — застарілий спосіб, не використовуйте його. Коли строк дії

        токена доступу завершиться, отримайте новий. Коли і як це робити

        (новим запитом `auth/by_partners` чи за допомогою `remember_me_token`),

        залежить від вашої платформи.


        `token = md5(user_identifier + partner_id + salt)`.


        Якщо MEGOGO не знає ідентифікатора користувача, запит створює для нього

        обліковий запис MEGOGO. Токен доступу діє приблизно 6 годин, токен

        «запам''ятати мене» (remember-me) — приблизно 5 років. Відповідь також

        містить поля профілю та `is_new_user`. Не використовуйте їх.

        '
      parameters:
      - name: isdn
        in: query
        required: true
        description: 'Ідентифікатор користувача на боці партнера (те саме значення, що й `userId` у запитах
          білінгу).

          '
        schema:
          type: string
          maxLength: 255
      - name: partner_key
        in: query
        required: true
        description: 'ID партнера.

          '
        schema:
          type: string
      - name: token
        in: query
        required: true
        description: 'Токен авторизації (MD5 у форматі hex).

          '
        schema:
          type: string
          pattern: ^[a-f0-9]{32}$
      - $ref: '#/components/parameters/sign'
      responses:
        '200':
          description: 'Користувача авторизовано.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthResponse'
        '400':
          $ref: '#/components/responses/Error'
  /auth/refresh:
    get:
      tags:
      - Authorization
      operationId: refreshAccessToken
      summary: Отримати новий токен доступу за токеном «запам'ятати мене»
      description: 'Повертає новий токен доступу для користувача без токена авторизації.

        Використовуйте `remember_me_token` з відповіді `/auth/by_partners`.


        ПРИМІТКА: Параметр називається `rememberme_token` (без другого

        підкреслення). З назвою `remember_me_token` запит повертає помилку.


        Якщо попередній токен доступу ще дійсний, відповідь може містити той

        самий токен доступу.

        '
      parameters:
      - name: rememberme_token
        in: query
        required: true
        description: 'Значення `remember_me_token` з відповіді `/auth/by_partners` або попереднього `/auth/refresh`.

          '
        schema:
          type: string
      - $ref: '#/components/parameters/sign'
      responses:
        '200':
          description: 'Нові токени. Структура така сама, як у `/auth/by_partners`.

            Недійсний токен повертає `"result": "error", "code": 400`

            з HTTP 200.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthResponse'
        '400':
          $ref: '#/components/responses/Error'
  /configuration:
    get:
      tags:
      - Configuration
      operationId: getConfiguration
      summary: Отримати конфігурацію (категорії, жанри, гео)
      description: 'Повертає довідкові дані для каталогу. Зберігайте відповідь у кеші на своєму сервері.

        '
      parameters:
      - $ref: '#/components/parameters/lang'
      - $ref: '#/components/parameters/did'
      - $ref: '#/components/parameters/sign'
      responses:
        '200':
          description: 'Конфігурація.

            '
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Envelope'
                - type: object
                  properties:
                    data:
                      $ref: '#/components/schemas/Configuration'
              examples:
                lang_ua:
                  summary: Відповідь з lang=ua (тестовий ключ, 2026-10-30). Масиви скорочено
                  description: '`GET /configuration?lang=ua&sign={sign}`

                    '
                  value:
                    result: ok
                    code: 200
                    data:
                      bitrate_from: 0
                      bitrate_to: 2160
                      partner_id: 2331
                      free_vod_types:
                      - ADVOD
                      categories:
                      - id: 16
                        title: Фільми
                        path: films
                        genres:
                        - 23361
                        - 37
                      - id: 4
                        title: Серіали
                        path: series
                        genres:
                        - 37
                        - 3
                      member_types:
                      - type: ANNOUNCER
                        title: Диктори
                      genres:
                      - id: 2
                        title: Комедії
                        path: comedy
                        images: []
                        categories:
                        - id: 4
                        - id: 6
                      - id: 3
                        title: Екшн
                        path: action
                        images: []
                        categories:
                        - id: 4
                        - id: 16
                      video_year_filters:
                      - id: 236
                        year_from: 2026
                        year_to: 2026
                        title: '2026'
                      geo: ua
                      age_limits:
                      - id: 1
                        backdrop_autoplay: false
                        max_age: 6
                        title: 6+
        '400':
          $ref: '#/components/responses/Error'
  /collections:
    get:
      tags:
      - Catalog
      operationId: listCollections
      summary: Отримати список добірок
      description: 'MEGOGO створює добірки для деяких партнерів на запит.

        Якщо добірок немає, `collections` — порожній масив.

        '
      parameters:
      - name: category_id
        in: query
        description: 'Повернути лише добірки цієї категорії.

          '
        schema:
          type: integer
      - $ref: '#/components/parameters/paging_strategy'
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/offset'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/lang'
      - $ref: '#/components/parameters/did'
      - $ref: '#/components/parameters/sign'
      responses:
        '200':
          description: 'Сторінка добірок. Значення `limit` за замовчуванням — 10.

            '
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Envelope'
                - type: object
                  properties:
                    data:
                      allOf:
                      - $ref: '#/components/schemas/PageMeta'
                      - type: object
                        properties:
                          collections:
                            type: array
                            items:
                              $ref: '#/components/schemas/Collection'
        '400':
          $ref: '#/components/responses/Error'
  /video/collection:
    get:
      tags:
      - Catalog
      operationId: listCollectionVideos
      summary: Отримати відео добірки
      description: 'Відео однієї добірки з `/collections`. Добірки надаються на запит.

        '
      parameters:
      - name: id
        in: query
        required: true
        description: 'ID добірки.

          '
        schema:
          type: integer
      - $ref: '#/components/parameters/paging_strategy'
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/offset'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/category_id_filter'
      - $ref: '#/components/parameters/genre'
      - $ref: '#/components/parameters/country'
      - $ref: '#/components/parameters/year_min'
      - $ref: '#/components/parameters/year_max'
      - $ref: '#/components/parameters/vod'
      - $ref: '#/components/parameters/sort'
      - $ref: '#/components/parameters/lang'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/did'
      - $ref: '#/components/parameters/sign'
      responses:
        '200':
          description: 'Сторінка відео.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionVideoPage'
        '400':
          $ref: '#/components/responses/Error'
  /video:
    get:
      tags:
      - Catalog
      operationId: listVideos
      summary: Отримати відео категорії
      description: 'Сторінка відео однієї категорії з фільтрами й сортуванням. Використовуйте

        пагінацію за токеном (`paging_strategy=token`).

        '
      parameters:
      - name: category_id
        in: query
        required: true
        description: 'ID категорії з `/configuration`.

          '
        schema:
          type: integer
      - $ref: '#/components/parameters/genre'
      - $ref: '#/components/parameters/sort'
      - $ref: '#/components/parameters/paging_strategy'
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/offset'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/country'
      - $ref: '#/components/parameters/year_min'
      - $ref: '#/components/parameters/year_max'
      - $ref: '#/components/parameters/lang'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/did'
      - $ref: '#/components/parameters/sign'
      responses:
        '200':
          description: 'Сторінка відео.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoPage'
              examples:
                lang_ua:
                  summary: Відповідь з lang=ua (тестовий ключ, 2026-10-30). Масиви скорочено
                  description: '`GET /video?category_id=16&lang=ua&sign={sign}`

                    '
                  value:
                    result: ok
                    code: 200
                    data:
                      limit: 20
                      offset: 0
                      total: 4115
                      has_more: true
                      video_list:
                      - item_type: video
                        id: 3858251
                        title: Привид
                        image:
                          big: https://s8.vcdn.biz/static/f/11995104941/image.jpg
                          small: https://s2.vcdn.biz/static/f/11995104791/image.jpg
                          original: https://s4.vcdn.biz/static/f/11995104541/image.jpg
                          original_wide: https://s1.vcdn.biz/static/f/11995100551/image.jpg
                          fullscreen: https://s3.vcdn.biz/static/f/6152873961/image.jpg
                          image_470х270: ''
                          image_215х120: ''
                        country: США
                        countries:
                        - 153
                        year: '1990'
                        slug: privid
                        categories:
                        - 16
                        age_limit: '12'
                        rating_imdb: '7.1'
                        rating_megogo: '8.4'
                        duration: 7286
                        watched_progress_percent: 0
                        genres:
                        - 25
                        - 39401
                        is_exclusive: false
                        show: show
                        is_sport: false
                        delivery_rules:
                        - svod
        '400':
          $ref: '#/components/responses/Error'
  /video/info:
    get:
      tags:
      - Video
      operationId: getVideoInfo
      summary: Отримати дані відео
      description: 'Повертає метадані відео та дані для його купівлі.


        **Надсилайте цей запит лише після дії користувача** (коли він відкриває

        сторінку відео). Не використовуйте `/video/info`, щоб по черзі збирати

        метадані багатьох відео. Для побудови каталогу використовуйте XML-фід

        або запити списків (`/video`, `/video/collection`, `/catalog/objects`).


        Для платного відео переконайтеся, що відповідь містить `purchase_info`.

        Якщо його немає, не показуйте варіанти купівлі.


        Якщо передано `access_token`, поле `is_available` показує, чи може

        користувач дивитися відео.

        '
      parameters:
      - name: id
        in: query
        required: true
        description: 'ID відео.

          '
        schema:
          type: integer
      - name: root_object
        in: query
        description: '`1` — для ID серії повернути дані серіалу. Без цього параметра відповідь містить
          дані серії.

          '
        schema:
          type: integer
          enum:
          - 0
          - 1
      - $ref: '#/components/parameters/lang'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/did'
      - $ref: '#/components/parameters/sign'
      responses:
        '200':
          description: 'Дані відео.

            '
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Envelope'
                - type: object
                  properties:
                    data:
                      $ref: '#/components/schemas/VideoInfo'
              examples:
                lang_ua:
                  summary: Відповідь з lang=ua (тестовий ключ, 2026-10-30). Масиви скорочено
                  description: '`GET /video/info?id=3858251&lang=ua&sign={sign}`


                    Запит без `access_token` з країни, де фільм недоступний, тому `is_available: false`
                    і обмеження `NO_VOD_COUNTRY`.

                    '
                  value:
                    result: ok
                    code: 200
                    data:
                      item_type: video
                      type: VIDEO
                      id: 3858251
                      title: Привид
                      image:
                        big: https://s8.vcdn.biz/static/f/11995104941/image.jpg
                        small: https://s2.vcdn.biz/static/f/11995104791/image.jpg
                        original: https://s4.vcdn.biz/static/f/11995104541/image.jpg
                        original_wide: https://s1.vcdn.biz/static/f/11995100551/image.jpg
                        fullscreen: https://s3.vcdn.biz/static/f/6152873961/image.jpg
                        image_470х270: ''
                        image_215х120: ''
                      country: США
                      countries:
                      - 153
                      year: '1990'
                      slug: privid
                      categories:
                      - 16
                      age_limit: '12'
                      rating_imdb: '7.1'
                      rating_megogo: '8.4'
                      duration: 7286
                      trailer_id: 23600946
                      quality: Full HD
                      description: 'Сем і Моллі — щасливі закохані. Але одного вечора грабіжник, який
                        напав на них, вбиває Сема. Хлопець не зникає з лиця землі безслідно — він стає
                        примарою. Через деякий час йому стає ясно, що Моллі загрожує небезпека, а його
                        власна смерть не…

                        '
                      short_description: Сем стає привидом після вбивства та намагається попередити кохану
                        про небезпеку через ексцентричну медіумку, яка його чує.
                      video_url: https://megogo.net/ua/view/3858251
                      full_url: https://megogo.net/ua/view/3858251-privid.html
                      title_original: Ghost
                      is_promocode: true
                      is_embed: false
                      people:
                      - id: 43
                        name: Патрік Суейзі
                        name_original: Patrick Swayze
                        avatar:
                          image_original: https://s1.vcdn.biz/static/f/2312198551/image.jpg
                          image_130x2000: https://s6.vcdn.biz/static/f/2312198601/image.jpg
                          image_540x2000: https://s7.vcdn.biz/static/f/2312198611/image.jpg
                          image_185x185: ''
                          image_240x240: https://s2.vcdn.biz/static/f/2312198651/image.jpg
                          image_360x360: https://s3.vcdn.biz/static/f/2312198661/image.jpg
                        type: ROLE
                        slug: patrik-sueyzi
                      season_list: []
                      subtitles:
                      - Українська
                      - Російська
                      purchase_info: {}
                      is_available: false
                      is_selling: true
                      allow_external_streaming: true
                      video_type: FILM
                      cartoon: false
                      genres:
                      - 25
                      - 39401
                      is_exclusive: false
                      show: show
                      is_sport: false
                      audio_list:
                      - Українська
                      is_series: false
                      is_3d: false
                      parental_control_required: false
                      is_wvdrm: false
                      drm_types:
                      - modular
                      - playready
                      restriction: invalid
                      restrictions:
                      - code: NO_VOD_COUNTRY
                        message: Виникла помилка, спробуйте пізніше
                      delivery_rules: []
        '400':
          $ref: '#/components/responses/Error'
  /video/episodes:
    get:
      tags:
      - Video
      operationId: listSeasonEpisodes
      summary: Отримати серії сезону
      description: '`data` — масив серій. Якщо ID сезону неправильний або сезон

        недоступний, `data` — порожній масив (без помилки).


        ПРИМІТКА: Для серіалу `/video/info` повертає `season_list`. Лише перший

        сезон містить `episode_list` із серіями. Для інших сезонів

        `episode_list` порожній: надсилайте цей запит з ID сезону.

        З ID серіалу запит повертає порожній масив.

        '
      parameters:
      - name: id
        in: query
        required: true
        description: 'ID сезону (`season_list[].id` у `/video/info`).

          '
        schema:
          type: integer
      - $ref: '#/components/parameters/lang'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/did'
      - $ref: '#/components/parameters/sign'
      responses:
        '200':
          description: 'Серії.

            '
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Envelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/Episode'
              examples:
                lang_ua:
                  summary: Відповідь з lang=ua (тестовий ключ, 2026-10-30). Масиви скорочено
                  description: '`GET /video/episodes?id=3628801&lang=ua&sign={sign}`

                    '
                  value:
                    result: ok
                    code: 200
                    data:
                    - id: 3628811
                      title: Серія 1. Північ пам'ятає
                      title_original: Episode 1. The North Remembers
                      order: 1
                      is_embed: false
                      duration: 3162
                      slug: gra-prestoliv-sezon-2-seriya-1-pivnich-pam-yataie
                      description: '

                        '
                      watched_progress_percent: 0
                      images:
                        image_original: https://s1.vcdn.biz/static/f/8940091951/image.jpg
                        image_800x450: https://s1.vcdn.biz/static/f/8940091951/image.jpg
                        image_640x360: https://s1.vcdn.biz/static/f/8940091951/image.jpg/pt/c640x360
                        image_162x100: https://s1.vcdn.biz/static/f/8940091951/image.jpg/pt/c162x100
                        image_126x71: https://s1.vcdn.biz/static/f/8940091951/image.jpg/pt/c126x71
                        image_115x120: https://s1.vcdn.biz/static/f/8940091951/image.jpg/pt/c115x120
                      image: https://s1.vcdn.biz/static/f/8940091951/image.jpg
        '400':
          $ref: '#/components/responses/Error'
  /search:
    get:
      tags:
      - Catalog
      operationId: searchVideos
      summary: Пошук відео за текстом
      description: 'Відео, назва яких збігається з текстом. Використовуйте пагінацію за токеном (`paging_strategy=token`).

        '
      parameters:
      - name: text
        in: query
        required: true
        description: 'Текст для пошуку.

          '
        schema:
          type: string
      - $ref: '#/components/parameters/category_id_filter'
      - $ref: '#/components/parameters/paging_strategy'
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/offset'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/lang'
      - $ref: '#/components/parameters/did'
      - $ref: '#/components/parameters/sign'
      responses:
        '200':
          description: 'Сторінка відео.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoPage'
        '400':
          $ref: '#/components/responses/Error'
  /stream:
    get:
      tags:
      - Playback
      operationId: getStream
      summary: Отримати URL потоку відео
      description: 'Повертає URL маніфесту, дані DRM, бітрейти, аудіодоріжки та

        субтитри відео.


        **Важливо:** якщо користувач не може дивитися відео, відповідь

        повертається з HTTP 200 і `result: ok`, але з порожнім `src` і масивом

        `restrictions`. Завжди перевіряйте `src` і `restrictions`.


        УВАГА: URL потоку містить токен доступу та дані користувача. Не

        зберігайте цей URL у кеші, не записуйте його в логи й нікому не передавайте.


        Надсилайте цей запит з пристрою кінцевого користувача. Якщо ви

        надсилаєте його зі свого сервера, ви відповідаєте за гео користувача.


        Тип DRM визначають налаштування API-ключа.


        УВАГА: Для орендованого (TVOD) відео перша відповідь із `src`

        запускає період оренди. Надсилайте цей запит лише тоді, коли

        користувач запускає відтворення. Не надсилайте його, щоб заздалегідь

        підготувати чи перевірити потік.

        '
      parameters:
      - name: video_id
        in: query
        required: true
        description: 'ID фільму, серії або трейлера. Для ID серіалу відповідь

          повертає першу серію.

          '
        schema:
          type: integer
      - $ref: '#/components/parameters/lang'
      - $ref: '#/components/parameters/access_token'
      - $ref: '#/components/parameters/did'
      - $ref: '#/components/parameters/sign'
      responses:
        '200':
          description: 'Дані потоку або обмеження, якщо відео недоступне.

            '
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Envelope'
                - type: object
                  properties:
                    data:
                      $ref: '#/components/schemas/Stream'
              examples:
                lang_ua:
                  summary: Відповідь з lang=ua (тестовий ключ, 2026-10-30). Масиви скорочено
                  description: '`GET /stream?video_id=23600946&lang=ua&sign={sign}`


                    Трейлер, без `access_token`. Посилання на потоки скорочено.

                    '
                  value:
                    result: ok
                    code: 200
                    data:
                      video_id: 23600946
                      root_video_id: 3858251
                      title: Привид
                      hierarchy_titles:
                        VIDEO: Привид
                      src: https://meta.vcdn.biz/…/vod/hls/…/playlist.m3u8?…
                      drm_type: ''
                      stream_type: hls
                      content_type: trailer
                      audio_tracks:
                      - id: 14
                        lang: ua
                        lang_iso_639_1: uk
                        lang_tag: uk-x-14
                        lang_original: Українська
                        display_name: Українська
                        is_active: true
                        index: 0
                        require_subtitles: false
                        subtitles_policy:
                          allowed_subtitles: []
                          is_disableable: true
                      subtitles: []
                      bitrates:
                      - index: 1
                        name: Низька (240)
                        bitrate: 240
                        src: https://meta.vcdn.biz/…/vod/hls/b/450/…/playlist.m3u8
                        license_server: null
                      - index: 2
                        name: Середня (320)
                        bitrate: 320
                        src: https://meta.vcdn.biz/…/vod/hls/b/900/…/playlist.m3u8
                        license_server: null
                      cdn_id: 188683801
                      advert_url: ''
                      allow_external_streaming: true
                      start_session_url: ''
                      parental_control_required: false
                      play_start_time: 0
                      watermark: //s4.vcdn.biz/static/79126941/megogo_watermark.png
                      watermark_clickable_enabled: true
                      show_best_quality_link: false
                      share_link: https://megogo.net/ua/view/3858251
                      siblings: {}
                      credits_start: 0
                      external_source: false
                      is_sport: false
                      preview_images:
                        thumbsline_xml: https://s7.vcdn.biz/static/f/7167263551/thumbline.xml
                        thumbsline_list:
                        - id: 1
                          url: https://s5.vcdn.biz/static/f/7167263531/thumbsline_1.jpg
                        thumbsline_list_full_hd:
                        - id: 1
                          url: https://s9.vcdn.biz/static/f/7167263571/thumbsline_144x81_1.jpg
                        thumbsline_list_uhd:
                        - id: 1
                          url: https://s8.vcdn.biz/static/f/7167263561/thumbsline_192x108_1.jpg
                      is_autoplay: true
                      is_embed: false
                      is_hierarchy: true
                      is_wvdrm: false
                      is_uhd: false
                      is_uhd_8k: false
                      is_hdr: false
                      is_tv: false
                      is_3d: false
                      is_live: false
                      is_favorite: false
        '400':
          $ref: '#/components/responses/Error'
  /video/recommended:
    get:
      tags:
      - Catalog
      operationId: listRecommendedVideos
      summary: Отримати рекомендації, що не залежать від користувача
      description: '`data`: `limit`, `version`, `video_list` (12 відео для фільму).

        Для того самого фільму `recommended_videos` у `/video/info` був

        порожнім.

        '
      parameters:
      - name: video_id
        in: query
        description: 'Повернути рекомендації для цього відео.

          '
        schema:
          type: integer
      - $ref: '#/components/parameters/paging_strategy'
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/offset'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/lang'
      - $ref: '#/components/parameters/sign'
      responses:
        '200':
          description: 'Сторінка відео.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoPage'
  /catalog/filters:
    get:
      tags:
      - Catalog
      operationId: getCatalogFilters
      summary: Отримати доступні фільтри каталогу та варіанти сортування
      description: 'Фільтри, які ваш ключ може використовувати в `/catalog/objects`.

        Фільтри каталогу для ключа вмикає MEGOGO. Якщо їх не ввімкнено,

        `filter_by` — порожній масив: у такому разі використовуйте фільтри

        `/video`.


        Кожен елемент `filter_by` містить `id` (назву query-параметра

        `/catalog/objects`), `multichoice` (кілька значень через кому),

        `inline` та `items` (`id`, `slug`, `enabled`; `title` — якщо

        `show_title=true`). Фільтри тестового ключа: `category_id`,

        `video_genre_id`, `country_id`, `year_id`, `audiotrack_id`,

        `subtitle_id`, `video_quality` (`hd`, `hdr`, `4k`), `vod_free`,

        `vod_sub`, `vod_buy`, `finger_language`, `audio_description`.


        Варіанти сортування (`order_by`: `popular`, `add`, `novelty`,

        `rating_megogo`, `rating_imdb`, `recommended`) відповідь містить

        лише з `show_disabled_items=true`.

        '
      parameters:
      - name: show_title
        in: query
        description: '`true` — додати `title` до фільтрів та їхніх елементів.

          '
        schema:
          type: boolean
      - name: show_disabled_items
        in: query
        description: '`true` — додати елементи з `enabled: false` і `order_by`.

          '
        schema:
          type: boolean
      - name: category_id
        in: query
        schema:
          type: integer
      - name: video_genre_id
        in: query
        schema:
          type: string
      - $ref: '#/components/parameters/lang'
      - $ref: '#/components/parameters/sign'
      responses:
        '200':
          description: 'Фільтри (`filter_by`) і варіанти сортування (`order_by`).

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Envelope'
              examples:
                lang_ua:
                  summary: Відповідь з lang=ua (тестовий ключ, 2026-10-30). Масиви скорочено
                  description: '`GET /catalog/filters?lang=ua&sign={sign}`

                    '
                  value:
                    result: ok
                    code: 200
                    data:
                      filter_by:
                      - id: category_id
                        multichoice: false
                        inline: false
                        items:
                        - id: '16'
                          slug: films
                          enabled: true
  /catalog/objects:
    get:
      tags:
      - Catalog
      operationId: listCatalogObjects
      summary: Отримати елементи каталогу за вибраними фільтрами
      description: '`data.groups[]` з полями `limit`, `next_page`, `content_type` і

        `videos`. Передавайте кожен фільтр із `/catalog/filters` як

        query-параметр з `id` елемента, наприклад

        `video_genre_id=2,25`, `country_id=2`, `video_quality=4k`,

        `vod_buy=true`. Неправильний ID елемента повертає

        `code 400`.

        '
      parameters:
      - name: category_id
        in: query
        schema:
          type: integer
      - name: video_genre_id
        in: query
        description: 'ID жанрів через кому.

          '
        schema:
          type: string
      - name: country_id
        in: query
        schema:
          type: string
      - name: year_id
        in: query
        schema:
          type: string
      - name: audiotrack_id
        in: query
        schema:
          type: string
      - name: subtitle_id
        in: query
        schema:
          type: string
      - name: video_quality
        in: query
        schema:
          type: string
          examples:
          - hd
          - hdr
          - 4k
      - name: vod_free
        in: query
        schema:
          type: boolean
      - name: vod_sub
        in: query
        schema:
          type: boolean
      - name: vod_buy
        in: query
        schema:
          type: boolean
      - name: sort
        in: query
        description: 'Значення `order_by` з `/catalog/filters`, наприклад `popular`, `add`.

          '
        schema:
          type: string
      - $ref: '#/components/parameters/paging_strategy'
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/offset'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/lang'
      - $ref: '#/components/parameters/sign'
      responses:
        '200':
          description: 'Групи елементів каталогу.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Envelope'
              examples:
                lang_ua:
                  summary: Відповідь з lang=ua (тестовий ключ, 2026-10-30). Масиви скорочено
                  description: '`GET /catalog/objects?category_id=16&video_genre_id=2&lang=ua&sign={sign}`

                    '
                  value:
                    result: ok
                    code: 200
                    data:
                      groups:
                      - limit: 20
                        next_page: PjIw
                        content_type: video
                        videos:
                        - item_type: video
                          id: 2113971
                          title: Сам удома
                          image:
                            big: https://s5.vcdn.biz/static/f/866625521/image.jpg
                            small: https://s4.vcdn.biz/static/f/866625511/image.jpg
                            original: https://s9.vcdn.biz/static/f/866625561/image.jpg
                            original_wide: https://s5.vcdn.biz/static/f/8935216331/image.jpg
                            fullscreen: https://s5.vcdn.biz/static/f/7827511721/image.jpg
                            image_470х270: ''
                            image_215х120: ''
                          country: США
                          countries:
                          - 153
                          year: '1990'
                          slug: sam-udoma
                          categories:
                          - 16
                          age_limit: '12'
                          rating_imdb: '7.8'
                          rating_megogo: '9.6'
                          duration: 5914
                          watched_progress_percent: 0
                          genres:
                          - 2
                          - 35
                          is_exclusive: false
                          show: show
                          is_sport: false
                          delivery_rules:
                          - svod
components:
  securitySchemes:
    signature:
      type: apiKey
      in: query
      name: sign
      description: 'Підпис запиту. Див. розділ «Підпис запиту» в описі.

        '
  parameters:
    sign:
      name: sign
      in: query
      required: true
      description: '`md5(params + private_key) + public_key`. Передавайте останнім параметром.

        '
      schema:
        type: string
        pattern: ^[a-f0-9]{32}_.+$
    lang:
      name: lang
      in: query
      description: 'Мова текстів. Коди мов MEGOGO, наприклад `ru`,

        `ua`, `en`, `kz`, `pl`. Передавайте в кожному запиті.

        '
      schema:
        type: string
    did:
      name: did
      in: query
      description: 'ID пристрою. Необов''язковий.

        '
      schema:
        type: string
    access_token:
      name: access_token
      in: query
      description: 'Токен доступу з `/auth/by_partners`. Входить до

        підпису. Строк дії ≈ 6 годин.

        '
      schema:
        type: string
    paging_strategy:
      name: paging_strategy
      in: query
      description: 'Передавайте `token` у кожному запиті списку. Тоді відповідь містить

        `next_page` замість `offset`, `total` і `has_more`.

        '
      schema:
        type: string
        enum:
        - token
    page:
      name: page
      in: query
      description: 'Значення `next_page` з попередньої відповіді. Не передавайте його

        в першому запиті. Не змінюйте значення.

        '
      schema:
        type: string
        examples:
        - PjIw
    offset:
      name: offset
      in: query
      deprecated: true
      description: 'Застаріла пагінація. Не використовуйте. Використовуйте `paging_strategy=token`.

        '
      schema:
        type: integer
        minimum: 0
        default: 0
    limit:
      name: limit
      in: query
      deprecated: true
      description: 'Застаріла пагінація. Не використовуйте. Без `limit` сторінка містить

        20 елементів.

        '
      schema:
        type: integer
        minimum: 1
        default: 20
    category_id_filter:
      name: category_id
      in: query
      description: 'Фільтр за ID категорії.

        '
      schema:
        type: integer
    genre:
      name: genre
      in: query
      description: 'Фільтр за ID жанрів (через кому).

        '
      schema:
        type: string
        examples:
        - 2,25
    country:
      name: country
      in: query
      description: 'Фільтр за ID країн (через кому).

        '
      schema:
        type: string
    year_min:
      name: year_min
      in: query
      description: 'Перший рік випуску (включно).

        '
      schema:
        type: integer
    year_max:
      name: year_max
      in: query
      description: 'Останній рік випуску (включно).

        '
      schema:
        type: integer
    vod:
      name: vod
      in: query
      description: 'Фільтр за моделями доступу (через кому: `svod,tvod,...`).

        '
      schema:
        type: string
    sort:
      name: sort
      in: query
      description: 'Порядок сортування: `popular` (спочатку популярні), `add` (спочатку нові на

        MEGOGO), `year` (спочатку найновіші). Без `sort` порядок не відповідає

        популярності. Невідоме значення MEGOGO ігнорує без помилки.

        '
      schema:
        type: string
        enum:
        - popular
        - add
        - year
  responses:
    Error:
      description: 'Помилка. Приклад: неправильний підпис → HTTP 400 з

        `message: "You entered wrong sign key"`. Усі коди й що робити з кожним

        з них — у [каталозі помилок](../errors/).

        '
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Envelope'
          example:
            result: error
            code: 400
            message: You entered wrong sign key
  schemas:
    Envelope:
      type: object
      required:
      - result
      - code
      properties:
        result:
          type: string
          enum:
          - ok
          - error
        code:
          type: integer
          description: 'Дублює HTTP-статус.

            '
        message:
          type: string
          description: 'Текст помилки. Лише якщо `result` дорівнює `error`.

            '
    PageMeta:
      type: object
      properties:
        limit:
          type: integer
          description: 'Кількість елементів на сторінці.

            '
        next_page:
          type: string
          description: 'Пагінація за токеном. Значення `page` для наступної сторінки. На останній сторінці
            відсутнє.

            '
        prev_page:
          type: string
          description: 'Пагінація за токеном. Значення `page` для попередньої сторінки. На першій сторінці
            відсутнє.

            '
        offset:
          type: integer
          deprecated: true
          description: 'Лише для застарілої пагінації.

            '
        total:
          type: integer
          deprecated: true
          description: 'Лише для застарілої пагінації. Загальна кількість елементів.

            '
        has_more:
          type: boolean
          deprecated: true
          description: 'Лише для застарілої пагінації.

            '
    VideoPage:
      allOf:
      - $ref: '#/components/schemas/Envelope'
      - type: object
        properties:
          data:
            allOf:
            - $ref: '#/components/schemas/PageMeta'
            - type: object
              properties:
                video_list:
                  type: array
                  items:
                    $ref: '#/components/schemas/VideoShort'
    CollectionVideoPage:
      allOf:
      - $ref: '#/components/schemas/Envelope'
      - type: object
        properties:
          data:
            allOf:
            - $ref: '#/components/schemas/PageMeta'
            - type: object
              properties:
                title:
                  type: string
                  description: 'Назва добірки.

                    '
                url:
                  type: string
                featured_source:
                  type: string
                external_type:
                  type: string
                custom_html:
                  type: string
                video_list:
                  type: array
                  items:
                    $ref: '#/components/schemas/VideoShort'
    Image:
      type: object
      description: 'URL постерів. Деякі значення можуть бути порожніми рядками.


        ОБЕРЕЖНО: Ключі `image_470х270` і `image_215х120` містять

        кириличну літеру `х` (U+0445), а не латинську `x`. Використовуйте ключі

        точно в такому вигляді. MEGOGO не планує їх змінювати. Розміри

        зображень можуть змінюватися: не прив''язуйте до них свою верстку.


        Щоб отримати інший розмір або формат, додайте до URL операцію,

        наприклад `{url}/pt/r193x272x4` (див. сторінку «Зображення» посібника).

        '
      properties:
        big:
          type: string
          format: uri
          description: 'Вертикальний постер, 300 × 423 px.

            '
        small:
          type: string
          format: uri
          description: 'Вертикальний постер, 162 × 228 px.

            '
        original:
          type: string
          format: uri
          description: 'Вертикальний постер в оригінальному розмірі.

            '
        original_wide:
          type: string
          description: 'Горизонтальне зображення 16 : 9 в оригінальному розмірі. Може бути порожнім.

            '
        fullscreen:
          type: string
          format: uri
          description: 'Горизонтальне зображення 16 : 9 для фону. Може бути порожнім.

            '
        image_470х270:
          type: string
        image_215х120:
          type: string
    DeliveryRule:
      type: string
      description: 'Бізнес-модель відео. Для потоків `advod` і `fvod` користувач не

        потрібен. У застосунку партнера відео `svod`, `fvod` і

        `advod` входять до партнерської передплати: доступ контролює

        партнер.

        '
      enum:
      - advod
      - fvod
      - svod
      - tvod
      - dto
    VideoShort:
      type: object
      description: 'Відео у списку.

        '
      properties:
        item_type:
          type: string
          examples:
          - video
          - series
          description: '`video` для фільму, `series` для серіалу.

            '
        id:
          type: integer
          description: 'ID об''єкта. Той самий ID у XML-фіді — це `object@id`.

            '
        title:
          type: string
          description: 'Назва мовою, заданою в `lang`.

            '
        image:
          $ref: '#/components/schemas/Image'
          description: 'URL постерів. Інші розміри див. на сторінці посібника «Зображення».

            '
        country:
          type: string
          description: 'Країни виробництва у вигляді тексту.

            '
        countries:
          type: array
          items:
            type: integer
          description: 'ID країн виробництва.

            '
        year:
          type: string
          description: 'Для серіалу може бути діапазоном, наприклад «2010 - 2018».

            '
        slug:
          type: string
          description: 'Частина URL сторінки відео на megogo.net. Для інтеграції не потрібна.

            '
        categories:
          type: array
          items:
            type: integer
          description: 'ID категорій (`categories` у `/configuration`).

            '
        genres:
          type: array
          items:
            type: integer
          description: 'ID жанрів (`genres` у `/configuration`).

            '
        age_limit:
          type: string
          examples:
          - '0'
          - '6'
          - '12'
          - '16'
          - '18'
          description: 'Мінімальний вік глядача у вигляді тексту.

            '
        rating_imdb:
          type: string
          description: 'Рейтинг IMDb у вигляді тексту. Порожній, якщо рейтингу немає.

            '
        rating_kinopoisk:
          type: string
          description: 'Не призначене для партнерів.

            '
        rating_megogo:
          type: string
          description: 'Рейтинг серед користувачів MEGOGO від 0 до 10 у вигляді тексту.

            '
        duration:
          type: integer
          description: 'Секунди.

            '
        quality:
          type: string
          examples:
          - Full HD
          description: 'Найвища якість відео, наприклад `Full HD`.

            '
        watched_progress_percent:
          type: integer
          description: 'Яку частину відео користувач переглянув, у відсотках. Лише з `access_token`; без
            нього — `0`.

            '
        is_exclusive:
          type: boolean
          description: '`true` для ексклюзиву MEGOGO.

            '
        is_sport:
          type: boolean
          description: '`true` для спортивного відео.

            '
        show:
          type: string
          description: 'Не призначене для партнерів.

            '
        delivery_rules:
          type: array
          items:
            $ref: '#/components/schemas/DeliveryRule'
          description: 'Як користувач може отримати відео в країні запиту. Див. сторінку посібника «Моделі
            доступу».

            '
      required:
      - id
      - item_type
      - title
      - image
      - categories
      - genres
      - age_limit
      - delivery_rules
      - year
      - country
      - countries
      - rating_imdb
      - rating_megogo
      - slug
      - is_exclusive
      - is_sport
      - watched_progress_percent
    VideoInfo:
      type: object
      description: 'Дані відео: фільму, серіалу або серії.

        '
      properties:
        item_type:
          type: string
          examples:
          - video
          - series
          description: '`video` для фільму або серії, `series` для серіалу.

            '
        type:
          type: string
          examples:
          - VIDEO
          - SERIES
          description: '`VIDEO`, `SERIES` або `EPISODE`.

            '
        video_type:
          type: string
          examples:
          - FILM
          - SERIAL
          description: 'Наприклад, `FILM`, `SERIAL`.

            '
        id:
          type: integer
          description: 'ID об''єкта.

            '
        title:
          type: string
          description: 'Назва мовою, заданою в `lang`.

            '
        title_original:
          type: string
          description: 'Оригінальна назва.

            '
        image:
          $ref: '#/components/schemas/Image'
          description: 'URL постерів. Інші розміри див. на сторінці посібника «Зображення».

            '
        country:
          type: string
          description: 'Країни виробництва у вигляді тексту.

            '
        countries:
          type: array
          items:
            type: integer
          description: 'ID країн виробництва.

            '
        year:
          type: string
        slug:
          type: string
          description: 'Частина URL сторінки відео на megogo.net. Для інтеграції не потрібна.

            '
        categories:
          type: array
          items:
            type: integer
          description: 'ID категорій (`categories` у `/configuration`).

            '
        age_limit:
          type: string
          description: 'Мінімальний вік глядача у вигляді тексту.

            '
        rating_imdb:
          type: string
          description: 'Рейтинг IMDb у вигляді тексту. Порожній, якщо рейтингу немає.

            '
        rating_kinopoisk:
          type: string
          description: 'Не призначене для партнерів.

            '
        rating_megogo:
          type: string
          description: 'Рейтинг серед користувачів MEGOGO від 0 до 10 у вигляді тексту.

            '
        duration:
          type: integer
          description: 'Секунди.

            '
        trailer_id:
          type: integer
          description: 'Передайте як `video_id` у `/stream`, щоб відтворити трейлер.

            '
        quality:
          type: string
          examples:
          - Full HD
          description: 'Найвища якість відео, наприклад `Full HD`.

            '
        description:
          type: string
          description: 'Повний опис у вигляді простого тексту.

            '
        short_description:
          type: string
          description: 'Короткий опис. Може бути порожнім.

            '
        people:
          type: array
          items:
            type: object
          description: 'Актори та знімальна група. Кожен елемент: `id`, `name`, `name_original`, `type`
            (`ROLE`, `DIRECTOR`, `SCENARIO`, `PRODUCER`...), `avatar` (URL зображень), `slug`.

            '
        screenshots:
          type: array
          items:
            type: object
          description: 'Кадри з відео. Кожен елемент: URL зображень `big` і `small`.

            '
        season_list:
          type: array
          items:
            $ref: '#/components/schemas/Season'
          description: 'Сезони серіалу. Лише перший сезон містить `episode_list`; для інших сезонів надсилайте
            `/video/episodes`.

            '
        subtitles:
          type: array
          items:
            type: string
          description: 'Мови субтитрів (назви). Файли субтитрів отримуйте через `/stream`.

            '
        recommended_videos:
          type: array
          items:
            $ref: '#/components/schemas/VideoShort'
          description: 'Може бути порожнім. Для рекомендацій використовуйте `/video/recommended`.

            '
        purchase_info:
          $ref: '#/components/schemas/PurchaseInfo'
        is_available:
          type: boolean
          description: '`true`, якщо користувач (з `access_token`) може дивитися відео.

            '
        is_selling:
          type: boolean
        allow_external_streaming:
          type: boolean
          description: 'AirPlay і Chromecast дозволені.

            '
        is_embed:
          type: boolean
        is_promocode:
          type: boolean
        is_favorite:
          type: boolean
          description: 'Лише з `access_token`.

            '
        video_url:
          type: string
          description: 'Сторінка відео на megogo.net.

            '
        full_url:
          type: string
          description: 'Сторінка відео на megogo.net (URL зі slug).

            '
        watch_target:
          type: object
        watched_progress_percent:
          type: integer
        vote:
          type: integer
        vote_type:
          type: string
        like:
          type: integer
          description: 'Кількість лайків від користувачів MEGOGO.

            '
        dislike:
          type: integer
          description: 'Кількість дизлайків від користувачів MEGOGO.

            '
        comments_num:
          type: integer
          description: 'Кількість коментарів від користувачів MEGOGO.

            '
        vod_channel:
          type: boolean
        dvr:
          type: boolean
        tv:
          type: boolean
        genres:
          type: array
          items:
            type: integer
          description: 'ID жанрів (`genres` у `/configuration`).

            '
        audio_list:
          type: array
          items:
            type: string
          description: 'Мови аудіо (назви). Аудіодоріжки отримуйте через `/stream`.

            '
        delivery_rules:
          type: array
          description: 'Як користувач може отримати відео в країні запиту. Порожній, якщо відео недоступне;
            у такому разі див. `restrictions`.

            '
          items:
            $ref: '#/components/schemas/DeliveryRule'
        restrictions:
          type: array
          description: 'Лише якщо відео недоступне, наприклад `NO_VOD_COUNTRY`. Ті самі коди, що й у `/stream`.

            '
          items:
            $ref: '#/components/schemas/Restriction'
        is_series:
          type: boolean
          description: '`true` для серіалу.

            '
        drm_types:
          type: array
          items:
            type: string
          description: 'Системи DRM відео, наприклад `modular`, `playready`, `fairplay`. Для відео без
            DRM цього поля у відповіді немає.

            '
        is_wvdrm:
          type: boolean
          deprecated: true
          description: 'Завжди `false`. Використовуйте `drm_types` і `drm_type` у `/stream`.

            '
        is_3d:
          type: boolean
          description: '`true` для 3D-версії.

            '
        is_exclusive:
          type: boolean
          description: '`true` для ексклюзиву MEGOGO.

            '
        is_sport:
          type: boolean
          description: '`true` для спортивного відео.

            '
        show:
          type: string
          description: 'Не призначене для партнерів.

            '
        kinopoisk_url:
          type: string
          description: 'Не призначене для партнерів.

            '
      required:
      - id
      - item_type
      - type
      - video_type
      - title
      - title_original
      - image
      - categories
      - genres
      - age_limit
      - year
      - duration
      - description
      - delivery_rules
      - is_available
      - is_series
      - purchase_info
      - season_list
      - people
      - subtitles
      - audio_list
    PurchaseService:
      type: object
      description: 'Пропозиція TVOD або DTO. Відповідь може містити й інші поля.

        '
      additionalProperties: true
      properties:
        subscription_id:
          type: integer
          description: 'ID пропозиції (послуги).

            '
        title:
          type: string
        currency_code:
          type: string
          examples:
          - uah
        is_bought:
          type: boolean
          description: '`true`, якщо користувач уже купив цю пропозицію. Лише з `access_token`.

            '
        tariffs:
          type: array
          items:
            type: object
            properties:
              tariff_id:
                type: integer
                description: 'ID тарифу. Передавайте його як `serviceId` у `buyMovie`. Це не `tariff_id`
                  з XML-фіду.

                  '
              price:
                type: number
              period:
                type: integer
                description: 'Період доступу в днях.

                  '
              quality:
                type: object
                properties:
                  group:
                    type: string
                    examples:
                    - HD
                    - SD
                  title:
                    type: string
                    examples:
                    - Full HD
                    - SD
                  bitrate:
                    type: integer
                    examples:
                    - 1080
                    - 576
              is_bought:
                type: boolean
    PurchaseInfo:
      type: object
      description: 'Способи, якими користувач може отримати доступ. Структури SVOD, TVOD і DTO перевірено.
        Об''єкт містить лише ті моделі доступу,

        які ввімкнено для вашого ключа.

        '
      properties:
        svod:
          type: object
          properties:
            subscriptions:
              type: array
              description: 'ID послуг, що містять це відео.

                '
              items:
                type: integer
        tvod:
          type: object
          description: 'Пропозиції оренди (TVOD) цього відео для вашого ключа.

            '
          properties:
            subscriptions:
              type: array
              items:
                $ref: '#/components/schemas/PurchaseService'
        dto:
          type: object
          description: 'Пропозиції купівлі (DTO) цього відео для вашого ключа. Структура така сама, як
            у `tvod`. `period` — період доступу в днях, наприклад 3650. Показуйте його користувачеві як
            «назавжди».

            '
          properties:
            subscriptions:
              type: array
              items:
                $ref: '#/components/schemas/PurchaseService'
        advod:
          type: object
          properties:
            subscriptions:
              type: array
              items:
                type: integer
        fvod:
          type: object
          properties:
            subscriptions:
              type: array
              items:
                type: integer
    Season:
      type: object
      properties:
        id:
          type: integer
          description: 'ID сезону. Використовуйте його в `/video/episodes`.

            '
        order:
          type: integer
          description: 'Номер сезону.

            '
        title:
          type: string
          description: 'Назва мовою, заданою в `lang`.

            '
        title_original:
          type: string
          description: 'Оригінальна назва.

            '
        total:
          type: integer
          description: 'Кількість серій. Може бути більшою за кількість елементів у `episode_list`.

            '
        episode_list:
          type: array
          items:
            $ref: '#/components/schemas/Episode'
    Episode:
      type: object
      properties:
        id:
          type: integer
          description: 'ID серії. Передавайте його як `video_id` у `/stream`.

            '
        order:
          type: integer
          description: 'Номер серії в сезоні.

            '
        title:
          type: string
          description: 'Назва мовою, заданою в `lang`.

            '
        title_original:
          type: string
          description: 'Оригінальна назва.

            '
        description:
          type: string
          description: 'Опис. Може бути порожнім.

            '
        duration:
          type: integer
          description: 'Секунди.

            '
        image:
          type: string
          format: uri
          description: 'Зображення серії.

            '
        images:
          type: object
          properties:
            image_115x120:
              type: string
              format: uri
            image_126x71:
              type: string
              format: uri
            image_162x100:
              type: string
              format: uri
            image_640x360:
              type: string
              format: uri
            image_800x450:
              type: string
              format: uri
            image_original:
              type: string
              format: uri
          description: 'Зображення серії в кількох розмірах.

            '
        is_embed:
          type: boolean
          description: 'Не призначене для партнерів.

            '
        slug:
          type: string
          description: 'Не призначене для партнерів.

            '
        watched_progress_percent:
          type: integer
          description: 'Яку частину серії користувач переглянув, у відсотках. Лише з `access_token`.

            '
    Collection:
      type: object
      description: 'Список відео, який складають редактори MEGOGO. MEGOGO вмикає добірки для деяких партнерів
        на запит.

        '
      properties:
        id:
          type: integer
        title:
          type: string
        path:
          type: string
        image:
          type: object
          properties:
            image_horizontal:
              type: string
              format: uri
            image_vertical:
              type: string
              format: uri
    Configuration:
      type: object
      description: 'Конфігурація вашого ключа. Відповідь може містити й інші ключі — ігноруйте їх.

        '
      additionalProperties: true
      properties:
        geo:
          type: string
          description: 'Країна користувача, наприклад `kz`.

            '
        partner_id:
          type: integer
          description: 'Номер вашого партнерського облікового запису. Це не рядковий ID партнера. Той
            самий номер є в URL вашого XML-фіду.

            '
        free_vod_types:
          type: array
          items:
            type: string
          examples:
          - - ADVOD
            - FVOD
        categories:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              title:
                type: string
        genres:
          type: array
          items:
            type: object
        member_types:
          type: array
          items:
            type: object
        age_limits:
          type: array
          items:
            type: object
        video_country_filters:
          type: array
          items:
            type: object
        video_year_filters:
          type: array
          items:
            type: object
        bitrate_from:
          type: integer
        bitrate_to:
          type: integer
        download:
          type: object
          properties:
            enabled:
              type: boolean
        force_update:
          type: object
          properties:
            is_update:
              type: boolean
        order_strategy:
          type: string
        support_info:
          type: object
        payment_systems:
          type: array
          items: {}
    AuthResponse:
      allOf:
      - $ref: '#/components/schemas/Envelope'
      - type: object
        properties:
          data:
            type: object
            properties:
              user_id:
                type: integer
                description: 'ID користувача MEGOGO.

                  '
              tokens:
                type: object
                properties:
                  access_token:
                    type: string
                    description: 'Використовуйте в запитах Content API.

                      '
                  access_token_expires_at:
                    type: integer
                    description: 'Unix-час. ≈ 6 годин після авторизації.

                      '
                  remember_me_token:
                    type: string
                    description: 'Передайте його як `rememberme_token` у `/auth/refresh`, щоб отримати
                      новий токен доступу.

                      '
                  remember_me_token_expires_at:
                    type: integer
                    description: 'Unix-час. ≈ 5 років після авторизації.

                      '
              is_new_user:
                type: boolean
              is_autouser:
                type: boolean
              extra:
                type: object
                properties:
                  access_key:
                    type: string
                    description: 'Призначення не задокументовано.

                      '
    Restriction:
      type: object
      properties:
        code:
          type: string
          description: 'Причина, з якої користувач не може дивитися відео. MEGOGO може додавати нові коди:
            якщо код вам невідомий, покажіть, що відео недоступне. Що робити з кожним кодом, описано на
            сторінці «Розв''язання проблем» і в каталозі помилок.

            '
          examples:
          - NOT_PURCHASABLE
          enum:
          - NOT_PURCHASABLE
          - BIZ_CLASS
          - NO_CONTRACT
          - CONTRACT
          - NOT_ENABLED_IN_COUNTRY
          - NO_VOD_COUNTRY
          - DRM
          - NO_DRM_SUPPORT
          - PARTNER_IS_DISABLED
          - NO_BITRATE
          - BITRATE_DISABLED_BY_PURCHASED_SUBSCRIPTION
          - UHD_IS_NOT_SUPPORTED
          - HDR_IS_NOT_SUPPORTED
          - D3_IS_NOT_SUPPORTED
          - NO_SCHEDULE_FOR_CHANNEL
          - INVALID_VIRTUAL_OBJECT_ID
          - CATCH_UP_IS_UNAVAILABLE
        message:
          type: string
          description: 'Загальний текст. Не показуйте його як причину.

            '
    Stream:
      type: object
      properties:
        video_id:
          type: integer
          description: 'ID із запиту.

            '
        root_video_id:
          type: integer
          description: 'ID серіалу. Лише для серії.

            '
        title:
          type: string
          description: 'Назва мовою, заданою в `lang`.

            '
        hierarchy_titles:
          type: object
          description: '`VIDEO` для фільму. `SERIES`, `SEASON`, `EPISODE` для серії.

            '
          additionalProperties:
            type: string
        is_hierarchy:
          type: boolean
        prev:
          type: integer
          description: 'ID попередньої серії. Відсутнє для першої серії.

            '
        next:
          type: integer
          description: 'ID наступної серії. Відсутнє для останньої серії.

            '
        src:
          type: string
          description: 'URL маніфесту. Порожній, якщо відео недоступне (див.

            `restrictions`). HLS (`.m3u8`) або DASH (`.mpd`).

            Запитуйте новий `src` щоразу, коли користувач запускає відтворення.

            Не зберігайте й не кешуйте цей URL.

            '
        stream_type:
          type: string
          enum:
          - hls
          - dash
          - mss
          description: 'Лише якщо `src` не порожній. MEGOGO задає протокол у налаштуваннях вашого

            ключа. Для `mss` шлях `src` закінчується на `/Manifest`.

            '
        content_type:
          type: string
          description: '`vod` для фільму або серії, `trailer` для трейлера. Інші значення стосуються ТБ-контенту
            й прямих трансляцій, які цей посібник не описує.

            '
        drm_type:
          type: string
          description: 'Порожній рядок, якщо DRM немає. Систему DRM задано в налаштуваннях ключа: `modular`
            (Widevine, DASH), `playready` (PlayReady, DASH),

            `fairplay` (FairPlay, HLS).

            '
          enum:
          - ''
          - modular
          - playready
          - fairplay
        license_server:
          type: string
          description: 'URL сервера ліцензій DRM. Порожній, якщо DRM немає.

            '
        license_certificate:
          type: string
          description: 'URL сертифіката. Лише для FairPlay. Для інших систем DRM порожній.

            '
        is_wvdrm:
          type: boolean
          deprecated: true
          description: 'Завжди `false`. Використовуйте `drm_type`.

            '
        restrictions:
          type: array
          description: 'Лише якщо відео недоступне.

            '
          items:
            $ref: '#/components/schemas/Restriction'
        bitrates:
          type: array
          items:
            $ref: '#/components/schemas/Bitrate'
        audio_tracks:
          type: array
          items:
            $ref: '#/components/schemas/AudioTrack'
        subtitles:
          type: array
          items:
            $ref: '#/components/schemas/Subtitle'
        advert_url:
          type: string
          description: 'Не призначене для партнерів. Ігноруйте це поле.

            '
        start_session_url:
          type: string
          description: 'Не призначене для партнерів.

            '
        allow_external_streaming:
          type: boolean
          description: 'AirPlay і Chromecast дозволені.

            '
        parental_control_required:
          type: boolean
        play_start_time:
          type: integer
          description: 'Секунди. Позиція, на якій користувач зупинив перегляд минулого разу.

            '
        credits_start:
          type: integer
          description: 'Секунди. Початок фінальних титрів.

            '
        preview_images:
          type: object
          properties:
            thumbsline_xml:
              type: string
              format: uri
            thumbsline_list:
              type: array
              items:
                $ref: '#/components/schemas/Thumb'
            thumbsline_list_full_hd:
              type: array
              items:
                $ref: '#/components/schemas/Thumb'
            thumbsline_list_uhd:
              type: array
              items:
                $ref: '#/components/schemas/Thumb'
          description: 'Мініатюри для шкали перемотування.

            '
        share_link:
          type: string
          format: uri
          description: 'Сторінка відео на megogo.net.

            '
        watermark:
          type: string
          description: 'Не призначене для партнерів.

            '
        watermark_clickable_enabled:
          type: boolean
          description: 'Не призначене для партнерів.

            '
        show_best_quality_link:
          type: boolean
          description: 'Не призначене для партнерів.

            '
        show_vod_recommendations:
          type: boolean
          description: 'Не призначене для партнерів.

            '
        cdn_id:
          type: integer
          description: 'Не призначене для партнерів.

            '
        external_source:
          type: boolean
          description: 'Не призначене для партнерів.

            '
        is_autoplay:
          type: boolean
          description: 'Не призначене для партнерів.

            '
        is_embed:
          type: boolean
          description: 'Не призначене для партнерів.

            '
        is_favorite:
          type: boolean
          description: 'Лише з `access_token`.

            '
        is_live:
          type: boolean
          description: '`true` для прямої трансляції. Цей посібник не описує прямі трансляції.

            '
        is_tv:
          type: boolean
          description: '`true` для ТБ-контенту. Цей посібник не описує ТБ-контент.

            '
        is_sport:
          type: boolean
          description: '`true` для спортивного відео.

            '
        is_uhd:
          type: boolean
          description: '`true` для 4K-версії. Ключ повинен мати налаштування 4K; тоді `bitrates` містить
            лише 2160.

            '
        is_uhd_8k:
          type: boolean
          description: '`true` для 8K-версії.

            '
        is_hdr:
          type: boolean
          description: '`true` для HDR-версії.

            '
        is_3d:
          type: boolean
          description: '`true` для 3D-версії.

            '
      required:
      - video_id
      - title
      - src
    Thumb:
      type: object
      properties:
        id:
          type: integer
          description: 'Позиція мініатюри.

            '
        url:
          type: string
          format: uri
          description: 'URL зображення.

            '
    Bitrate:
      type: object
      properties:
        index:
          type: integer
          description: 'Порядковий номер у списку.

            '
        bitrate:
          type: integer
          description: 'Роздільна здатність по вертикалі

            '
          for example 720.: null
        name:
          type: string
          description: 'Локалізована назва, наприклад «High (720)».

            '
        src:
          type: string
          description: 'URL маніфесту лише для цього бітрейту. Порожній, якщо бітрейт недоступний.

            '
        license_server:
          type:
          - string
          - 'null'
          description: 'URL сервера ліцензій для цього `src`. З DRM кожен бітрейт має власні `src` і `license_server`.

            '
    AudioTrack:
      type: object
      properties:
        id:
          type: integer
          description: 'ID мовної версії. Однаковий для всіх відео (наприклад, 11 — російська).

            '
        index:
          type: integer
          description: 'Значення для сегмента `/a/{index}/` в URL потоку (HLS

            версії 3, MSS). Це не порядок у меню. Для меню використовуйте порядок

            елементів масиву `audio_tracks`.

            '
        lang:
          type: string
          description: 'Код мови MEGOGO (`ua`, `ge`, `kz`...). Не ISO. Може повторюватися.

            '
        lang_iso_639_1:
          type: string
          description: 'Код ISO 639-1.

            '
        lang_tag:
          type: string
          description: 'Унікальний ключ доріжки: `<ISO 639-1>-x-<id>`. Маніфест

            містить те саме значення в `LANGUAGE` (HLS) або `lang` (DASH).

            '
          examples:
          - ru-x-11
        lang_original:
          type: string
          description: 'Назва мови цією самою мовою.

            '
        display_name:
          type: string
          description: 'Назва доріжки мовою, заданою в `lang`. Показуйте її в меню.

            '
        is_active:
          type: boolean
          description: 'Доріжка за замовчуванням: перша доріжка із запитаною мовою `lang`. Починайте відтворення
            з неї. Шукайте доріжку в маніфесті за `lang_tag`.

            '
        require_subtitles:
          type: boolean
          description: 'З цією доріжкою плеєр повинен показувати субтитри. Користувач не може їх вимкнути,
            але може вибрати їхню мову. Не пропонуйте субтитри мовою доріжки. Якщо інших субтитрів немає,
            не показуйте цю доріжку.

            '
        subtitles_policy:
          type: object
          properties:
            allowed_subtitles:
              type: array
              items:
                type: integer
              description: 'ID субтитрів.

                '
            is_disableable:
              type: boolean
              description: 'Користувач може вимкнути субтитри. `false` для доріжки з `require_subtitles:
                true`.

                '
            preselect:
              type: integer
              description: '`id` субтитрів, які потрібно ввімкнути з цією доріжкою, якщо `is_disableable`
                дорівнює `false`. Якщо `is_disableable` дорівнює `true`, ігноруйте це поле.

                '
    Subtitle:
      type: object
      properties:
        id:
          type: integer
          description: 'ID субтитрів. Його використовують `subtitles_policy.allowed_subtitles` і `preselect`
            аудіодоріжок.

            '
        index:
          type: integer
          description: 'Порядковий номер субтитрів.

            '
        type:
          type: string
          examples:
          - srt
          description: 'Формат файлу, наприклад `srt`.

            '
        lang:
          type: string
          description: 'Код мови MEGOGO. Не ISO.

            '
        lang_iso_639_1:
          type: string
          description: 'Код ISO 639-1.

            '
        lang_tag:
          type: string
          description: 'Унікальний ключ субтитрів: `<ISO 639-1>-x-<id>`.

            '
        lang_original:
          type: string
          description: 'Назва мови цією самою мовою.

            '
        display_name:
          type: string
          description: 'Назва мови мовою, заданою в `lang`. Показуйте її в меню.

            '
        url:
          type: string
          format: uri
          description: 'URL файлу субтитрів.

            '
