Movie Planner Plans API

The Plans API from Movie Planner — 8 operation(s) for plans.

GitHub OpenAPI

Operations 10

GET /v1/plans Предстоящие планы текущей комнаты (как /api/site/plans) #
POST /v1/plans Создать или обновить план для фильма в текущей комнате #
DELETE /v1/plans/{plan_id} Удалить один план текущего профиля или выбранной комнаты #
POST /v1/plans/{plan_id}/calendar/google/push Создать событие в Google Календаре пользователя (Calendar API). #
GET /v1/plans/{plan_id}/tickets Список файлов билетов у кино-плана (имя, mime, индекс для скачивания) #
POST /v1/plans/{plan_id}/tickets Прикрепить билет (JPEG/PNG/GIF) к кино-плану — JSON base64, multipart file или… #
GET /v1/plans/{plan_id}/tickets/{index} Скачать билет. Без query — бинарное тело (image/pdf). #
GET /v1/plans/{plan_id}.ics Календарное событие (iCalendar). #
GET /v1/plans/{plan_id}/google-calendar Ссылка «Добавить в Google Календарь» (шаблон, без OAuth в Google). #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/movie-planner-ru:movie-planner-ru-plans-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

movie-planner-ru-plans-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Movie Planner Unified Plans API
  version: 1.2.2
  description: 'Единый API для Mini App, сайта movie-planner.ru, Chrome-расширения и

    нативных мобильных приложений (React Native).


    Билеты (`POST /v1/plans/{id}/tickets`) поддерживаются только для планов с `plan_type: cinema`.

    Для кино в `POST /v1/plans` передавайте реальное название и/или адрес кинотеатра; **не передавайте заглушки**

    вроде одного слова «Кинотеатр» без адреса — геокодер интерпретирует это как запрос и может выбрать случайную точку в городе.

    Если адрес пользователя ещё неизвестен, **опустите** `cinema_name` и `cinema_address`.

    При осмысленной строке и отсутствии координат сервер при `YANDEX_GEOCODER_API_KEY` нормализует адрес и подставит `cinema_lat` / `cinema_lon`.

    События в Google Calendar и .ics получают человекочитаемое описание (ссылка на Кинопоиск, кинотеатр, Яндекс.Карты).


    MCP Streamable HTTP: `/mcp` — те же Bearer-токены, что для `/v1` (инструменты для Cursor / Claude Desktop).


    Три группы авторизации:

    • `/api/miniapp/*` — Telegram Mini App (initData) ИЛИ Bearer JWT (RN).

    • `/api/site/*` — Bearer token из site_sessions.

    • `/v1/*` — версия API для агентов; Bearer = JWT, site session или OAuth token.

    Для OAuth: если при authorize указан непустой `scope`, на /v1 проверяются права

    (profile.read, movies.read/write, plans.read/write, calendar.read). Пустой scope у OAuth = полный доступ.

    • `/oauth/*` — OAuth2 code + PKCE: authorize (нужен уже залогиненный Bearer) и token.

    • `/api/extension/*` — chat_id query param (legacy).

    • `/api/auth/*` — регистрация / refresh / me, выдаёт JWT пары.

    • `/api/push/register` — FCM-токен устройств RN.

    • `/api/maps/*` — общие maps-подсказки (без авторизации).


    Стабильные поля в ответах всех плановых/фильмовых эндпоинтов совместимы,

    что даёт возможность генерировать единый клиент (openapi-typescript).'
servers:
- url: https://web-production-3921c.up.railway.app
  description: Production
security:
- BearerAuth: []
- SiteSession: []
tags:
- name: Plans
paths:
  /v1/plans:
    get:
      tags:
      - Plans
      summary: Предстоящие планы текущей комнаты (как /api/site/plans)
      description: Для OAuth нужен plans.read. В записях сохраняется id и дополнительно возвращаются plan_id, year и created_by_user_id.
      security:
      - BearerAuth: []
      - SiteSession: []
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  api_version:
                    type: string
                    example: v1
                  home:
                    type: array
                    items:
                      $ref: '#/components/schemas/Plan'
                  cinema:
                    type: array
                    items:
                      $ref: '#/components/schemas/Plan'
                  premieres:
                    type: array
                    items:
                      $ref: '#/components/schemas/Plan'
        '401':
          description: Нет валидного Bearer (JWT или site session).
      operationId: getV1Plans
      x-operation-id-source: derived
    post:
      tags:
      - Plans
      summary: Создать или обновить план для фильма в текущей комнате
      description: 'Для просмотра **в кино** обязательно `plan_type: cinema`. Поля кинотеатра (`cinema_*`) — для карты и календаря;

        пока нет данных пользователя, **не заполняйте** их фиктивными значениями («Кинотеатр», «кино» и т.п.).

        Геокодинг выполняется только для осмысленных строк (не одни стоп-слова); иначе сервер не меняет координаты.'
      security:
      - BearerAuth: []
      - SiteSession: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - film_id
              - plan_type
              - plan_datetime
              properties:
                film_id:
                  type: integer
                plan_type:
                  type: string
                  enum:
                  - home
                  - cinema
                plan_datetime:
                  type: string
                  format: date-time
                streaming_service:
                  type:
                  - string
                  - 'null'
                streaming_url:
                  type:
                  - string
                  - 'null'
                cinema_name:
                  type:
                  - string
                  - 'null'
                cinema_address:
                  type:
                  - string
                  - 'null'
                cinema_lat:
                  type:
                  - number
                  - 'null'
                cinema_lon:
                  type:
                  - number
                  - 'null'
      responses:
        '200':
          description: ok
        '400':
          description: bad request
        '401':
          description: unauthorized
      operationId: postV1Plans
      x-operation-id-source: derived
  /v1/plans/{plan_id}:
    delete:
      tags:
      - Plans
      summary: Удалить один план текущего профиля или выбранной комнаты
      description: 'Для OAuth нужен plans.write; если текущая комната — группа, также groups.write.

        В группе нужны действующее членство и права автора плана либо владельца/администратора.

        Удаляются план и связанные приглашения; фильм и оценки сохраняются.

        Ранее экспортированное событие Google Calendar не удаляется.

        Сообщать об удалении можно только при deleted=true. plan_id берётся из списка планов.'
      security:
      - BearerAuth: []
      - SiteSession: []
      parameters:
      - in: path
        name: plan_id
        required: true
        schema:
          type: integer
          minimum: 1
      responses:
        '200':
          description: Результат удаления; deleted=false не подтверждает удаление.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanDeletion'
        '400':
          description: invalid_request
        '401':
          description: unauthorized
        '403':
          description: insufficient_scope
          not_member или forbidden: null
        '404':
          description: plan_not_found — план отсутствует в доступной комнате
      operationId: deleteV1PlansByPlanId
      x-operation-id-source: derived
  /v1/plans/{plan_id}/calendar/google/push:
    post:
      tags:
      - Plans
      summary: Создать событие в Google Календаре пользователя (Calendar API).
      description: 'Тело запроса не используется (можно отправить пустой JSON или без тела).

        Описание события формируется на сервере: ссылка на страницу фильма на Кинопоиске, данные кинотеатра, ссылка на Яндекс.Карты.

        Файлы билетов с плана загружаются в Drive пользователя и прикрепляются к событию при наличии scope OAuth Calendar + Drive.'
      security:
      - BearerAuth: []
      - SiteSession: []
      parameters:
      - in: path
        name: plan_id
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Событие создано
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  event_id:
                    type:
                    - string
                    - 'null'
                  html_link:
                    type:
                    - string
                    - 'null'
                  plan_id:
                    type: integer
                  tickets_on_plan:
                    type: integer
                    description: число билетов по данным на диске (tickets_paths)
                  tickets_attached:
                    type: integer
                    description: сколько файлов реально добавлено во вложения события
        '400':
          description: календарь не подключён или нет даты плана
        '401':
          description: unauthorized
        '403':
          description: insufficient_scope
      operationId: postV1PlansByPlanIdCalendarGooglePush
      x-operation-id-source: derived
  /v1/plans/{plan_id}/tickets:
    get:
      tags:
      - Plans
      summary: Список файлов билетов у кино-плана (имя, mime, индекс для скачивания)
      security:
      - BearerAuth: []
      - SiteSession: []
      parameters:
      - in: path
        name: plan_id
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: JSON с массивом tickets
        '401':
          description: unauthorized
        '403':
          description: insufficient_scope
        '404':
          description: plan not in room
      operationId: getV1PlansByPlanIdTickets
      x-operation-id-source: derived
    post:
      tags:
      - Plans
      summary: Прикрепить билет (JPEG/PNG/GIF) к кино-плану — JSON base64, multipart file или…
      description: Доступно только если у плана plan_type cinema. После загрузки билет доступен через GET этого же префикса и учитывается при push в Google Calendar.
      security:
      - BearerAuth: []
      - SiteSession: []
      parameters:
      - in: path
        name: plan_id
        required: true
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - image_base64
              properties:
                image_base64:
                  type: string
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: Скрин билета (JPEG/PNG/GIF)
          image/jpeg:
            schema:
              type: string
              format: binary
          image/png:
            schema:
              type: string
              format: binary
          image/gif:
            schema:
              type: string
              format: binary
      responses:
        '200':
          description: ok
        '400':
          description: invalid_request
        '401':
          description: unauthorized
        '403':
          description: insufficient_scope or no_ticket_subscription
        '404':
          description: plan not found
      operationId: postV1PlansByPlanIdTickets
      x-operation-id-source: derived
  /v1/plans/{plan_id}/tickets/{index}:
    get:
      tags:
      - Plans
      summary: Скачать билет. Без query — бинарное тело (image/pdf).
      security:
      - BearerAuth: []
      - SiteSession: []
      parameters:
      - in: path
        name: plan_id
        required: true
        schema:
          type: integer
      - in: path
        name: index
        required: true
        schema:
          type: integer
      - in: query
        name: format
        required: false
        schema:
          type: string
          enum:
          - base64
          - json
        description: base64 — ответ JSON с data_base64
      responses:
        '200':
          description: файл или JSON
        '401':
          description: unauthorized
        '403':
          description: insufficient_scope
        '404':
          description: not found
        '413':
          description: файл слишком большой для embed
      operationId: getV1PlansByPlanIdTicketsByIndex
      x-operation-id-source: derived
  /v1/plans/{plan_id}.ics:
    get:
      tags:
      - Plans
      summary: Календарное событие (iCalendar).
      security:
      - BearerAuth: []
      - SiteSession: []
      parameters:
      - in: path
        name: plan_id
        required: true
        schema:
          type: integer
      - in: query
        name: subscribe_token
        required: false
        schema:
          type: string
        description: Подписанный токен (из GET /v1/plans/{id}/calendar-links)
      - in: query
        name: t
        required: false
        schema:
          type: string
        description: Алиас для subscribe_token
      responses:
        '200':
          description: text/calendar
          content:
            text/calendar:
              schema:
                type: string
        '401':
          description: unauthorized
        '403':
          description: invalid_subscribe_token
        '404':
          description: plan not in this room
      operationId: getV1Plans{planId}Ics
      x-operation-id-source: derived
  /v1/plans/{plan_id}/google-calendar:
    get:
      tags:
      - Plans
      summary: Ссылка «Добавить в Google Календарь» (шаблон, без OAuth в Google).
      security:
      - BearerAuth: []
      - SiteSession: []
      parameters:
      - in: path
        name: plan_id
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: JSON с полем url
        '401':
          description: unauthorized
        '403':
          description: insufficient_scope
        '404':
          description: not found
      operationId: getV1PlansByPlanIdGoogleCalendar
      x-operation-id-source: derived
  /v1/plans/{plan_id}/calendar-links:
    get:
      tags:
      - Plans
      summary: Подписанный путь к .ics, полный ics_url (если задан BACKEND_PUBLIC_URL) и…
      security:
      - BearerAuth: []
      - SiteSession: []
      parameters:
      - in: path
        name: plan_id
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: ok
        '401':
          description: unauthorized
        '403':
          description: insufficient_scope
        '404':
          description: not found
      operationId: getV1PlansByPlanIdCalendarLinks
      x-operation-id-source: derived
components:
  schemas:
    Plan:
      type: object
      required:
      - id
      - plan_type
      - plan_datetime
      - title
      properties:
        id:
          type: integer
        plan_id:
          type: integer
          description: Идентификатор плана, равен id; используется для удаления, не film_id и не kp_id.
        year:
          type:
          - integer
          - 'null'
        created_by_user_id:
          type:
          - integer
          - 'null'
          description: Автор плана; поле добавлено к существующему ответу.
        plan_type:
          type: string
          enum:
          - home
          - cinema
        plan_datetime:
          type: string
          format: date-time
        title:
          type: string
        film_id:
          type:
          - integer
          - 'null'
        kp_id:
          type:
          - integer
          - 'null'
        cinema_name:
          type:
          - string
          - 'null'
        cinema_address:
          type:
          - string
          - 'null'
        online_link:
          type:
          - string
          - 'null'
        is_series:
          type: boolean
    PlanDeletion:
      type: object
      required:
      - success
      - deleted
      - plan_id
      - chat_id
      properties:
        success:
          type: boolean
        deleted:
          type: boolean
        plan_id:
          type: integer
        chat_id:
          type: integer
        api_version:
          type: string
          example: v1
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    SiteSession:
      type: apiKey
      in: header
      name: Authorization
      description: Bearer <site_session_token>