Справочник API

Методы API Планёрки
/rest/v2/schedules/{id}
v1.0.0
OpenAPI 3.0.0

Планёрка — API бронирования

REST API бронирования Планёрки (v2). Авторизация — Bearer API-ключ cal_…. Все ответы — в стандартном конверте ({status, data} / {status:"error", error}). Обязателен заголовок cal-api-version.

Server:https://planerka.app

текущий хост

Client Libraries

Bookings

​

Список броней (только владельца ключа)

​
Query Parameters
  • status
    Type: string

    upcoming|past|cancelled|unconfirmed (можно несколько через запятую)

  • attendee Email
    Type: string
  • event Type Id
    Type: integer

    Integer numbers.

  • after Start
    Type: string
  • before End
    Type: string
  • take
    Type: integer

    Integer numbers.

  • skip
    Type: integer

    Integer numbers.

  • sort Start
    Type: string enum
    values
    • asc
    • desc
Headers
  • cal -api -version
    Type: string
    required
Responses
  • application/json
Request Example for get /rest/v2/bookings
curl https://planerka.app/rest/v2/bookings \
  --header 'cal-api-version: 2024-08-13' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "status": "success",
  "data": [
    {
      "id": 1,
      "uid": "string",
      "title": "string",
      "description": "string",
      "hosts": [
        {
          "id": 1,
          "name": "string",
          "email": "string",
          "displayEmail": "string",
          "username": "string",
          "timeZone": "string"
        }
      ],
      "status": "accepted",
      "start": "string",
      "end": "string",
      "duration": 1,
      "eventTypeId": 1,
      "eventType": {
        "id": 1,
        "slug": "string"
      },
      "location": "string",
      "meetingUrl": "https://meet.jit.si/cal/7d4ccc46-c0f1-424a-9c17-8ead6f65e992",
      "absentHost": true,
      "createdAt": "string",
      "updatedAt": "string",
      "attendees": [
        {
          "name": "string",
          "email": "string",
          "displayEmail": "string",
          "phone": "+79990001122",
          "telegram": "@ivan",
          "company": "ООО «Ромашка»",
          "timeZone": "string",
          "absent": true
        }
      ],
      "bookingFieldsResponses": {
        "additionalProperty": "anything"
      }
    }
  ],
  "pagination": {
    "totalItems": 1,
    "remainingItems": 1,
    "returnedItems": 1,
    "itemsPerPage": 1,
    "currentPage": 1,
    "totalPages": 1,
    "hasNextPage": true,
    "hasPreviousPage": true
  }
}

Создать бронь

​
Headers
  • cal -api -version
    Type: string
    required
Body·
required
application/json
  • attendee
    Type: object
    required
  • start
    Type: string Format: date-time
    required

    the date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z

  • booking Fields Responses
    Type: object | null
  • event Type Id
    Type: integer | null

    Либо eventTypeId, либо eventTypeSlug+username

  • event Type Slug
    Type: string | null
  • guests
    nullable
    • Type: array string[]
  • length In Minutes
    Type: integer | null

    Integer numbers.

  • location
    Type: string | null
  • metadata
    Type: object | null
  • username
    Type: string | null
Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post /rest/v2/bookings
curl https://planerka.app/rest/v2/bookings \
  --request POST \
  --header 'cal-api-version: 2024-08-13' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "start": "2050-09-05T09:00:00.000Z",
  "attendee": {
    "name": "Иван",
    "timeZone": "Europe/Moscow",
    "email": null,
    "phoneNumber": null,
    "telegram": "@ivan",
    "company": "ООО «Ромашка»",
    "language": "ru"
  },
  "eventTypeId": null,
  "eventTypeSlug": null,
  "username": null,
  "lengthInMinutes": null,
  "guests": [],
  "location": null,
  "metadata": null,
  "bookingFieldsResponses": null
}'
{
  "status": "success",
  "data": {
    "id": 1,
    "uid": "string",
    "title": "string",
    "description": "string",
    "hosts": [
      {
        "id": 1,
        "name": "string",
        "email": "string",
        "displayEmail": "string",
        "username": "string",
        "timeZone": "string"
      }
    ],
    "status": "accepted",
    "start": "string",
    "end": "string",
    "duration": 1,
    "eventTypeId": 1,
    "eventType": {
      "id": 1,
      "slug": "string"
    },
    "location": "string",
    "meetingUrl": "https://meet.jit.si/cal/7d4ccc46-c0f1-424a-9c17-8ead6f65e992",
    "absentHost": true,
    "createdAt": "string",
    "updatedAt": "string",
    "attendees": [
      {
        "name": "string",
        "email": "string",
        "displayEmail": "string",
        "phone": "+79990001122",
        "telegram": "@ivan",
        "company": "ООО «Ромашка»",
        "timeZone": "string",
        "absent": true
      }
    ],
    "bookingFieldsResponses": {
      "additionalProperty": "anything"
    }
  }
}

Получить бронь по uid

​
Path Parameters
  • booking Uid
    Type: string
    required
Headers
  • cal -api -version
    Type: string
    required
Responses
  • application/json
  • application/json
Request Example for get /rest/v2/bookings/{bookingUid}
curl 'https://planerka.app/rest/v2/bookings/{bookingUid}' \
  --header 'cal-api-version: 2024-08-13' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "status": "success",
  "data": {
    "id": 1,
    "uid": "string",
    "title": "string",
    "description": "string",
    "hosts": [
      {
        "id": 1,
        "name": "string",
        "email": "string",
        "displayEmail": "string",
        "username": "string",
        "timeZone": "string"
      }
    ],
    "status": "accepted",
    "start": "string",
    "end": "string",
    "duration": 1,
    "eventTypeId": 1,
    "eventType": {
      "id": 1,
      "slug": "string"
    },
    "location": "string",
    "meetingUrl": "https://meet.jit.si/cal/7d4ccc46-c0f1-424a-9c17-8ead6f65e992",
    "absentHost": true,
    "createdAt": "string",
    "updatedAt": "string",
    "attendees": [
      {
        "name": "string",
        "email": "string",
        "displayEmail": "string",
        "phone": "+79990001122",
        "telegram": "@ivan",
        "company": "ООО «Ромашка»",
        "timeZone": "string",
        "absent": true
      }
    ],
    "bookingFieldsResponses": {
      "additionalProperty": "anything"
    }
  }
}

Отменить бронь

​
Path Parameters
  • booking Uid
    Type: string
    required
Headers
  • cal -api -version
    Type: string
    required
Body·
application/json
  • cancellation Reason
    Type: string | null
Responses
  • application/json
  • application/json
  • application/json
Request Example for post /rest/v2/bookings/{bookingUid}/cancel
curl 'https://planerka.app/rest/v2/bookings/{bookingUid}/cancel' \
  --request POST \
  --header 'cal-api-version: 2024-08-13' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "cancellationReason": "передумал"
}'
{
  "status": "success",
  "data": {
    "id": 1,
    "uid": "string",
    "title": "string",
    "description": "string",
    "hosts": [
      {
        "id": 1,
        "name": "string",
        "email": "string",
        "displayEmail": "string",
        "username": "string",
        "timeZone": "string"
      }
    ],
    "status": "accepted",
    "start": "string",
    "end": "string",
    "duration": 1,
    "eventTypeId": 1,
    "eventType": {
      "id": 1,
      "slug": "string"
    },
    "location": "string",
    "meetingUrl": "https://meet.jit.si/cal/7d4ccc46-c0f1-424a-9c17-8ead6f65e992",
    "absentHost": true,
    "createdAt": "string",
    "updatedAt": "string",
    "attendees": [
      {
        "name": "string",
        "email": "string",
        "displayEmail": "string",
        "phone": "+79990001122",
        "telegram": "@ivan",
        "company": "ООО «Ромашка»",
        "timeZone": "string",
        "absent": true
      }
    ],
    "bookingFieldsResponses": {
      "additionalProperty": "anything"
    }
  }
}

EventTypes (Collapsed)

​

Me (Collapsed)

​

Me

Me Operations

Slots (Collapsed)

​

Slots

Slots Operations

/rest/v2/schedules

​
Responses
  • default
Request Example for get /rest/v2/schedules
curl https://planerka.app/rest/v2/schedules \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
No Body

/rest/v2/schedules

​
Responses
  • default
Request Example for post /rest/v2/schedules
curl https://planerka.app/rest/v2/schedules \
  --request POST \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
No Body

/rest/v2/schedules/{id}

​
Path Parameters
  • id
    Type: string Pattern: \d+
    required
Responses
  • default
Request Example for get /rest/v2/schedules/{id}
curl 'https://planerka.app/rest/v2/schedules/{id}' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
No Body

/rest/v2/schedules/{id}

​
Path Parameters
  • id
    Type: string Pattern: \d+
    required
Responses
  • default
Request Example for patch /rest/v2/schedules/{id}
curl 'https://planerka.app/rest/v2/schedules/{id}' \
  --request PATCH \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
No Body

/rest/v2/whoami

​
Responses
  • default
Request Example for get /rest/v2/whoami
curl https://planerka.app/rest/v2/whoami \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
No Body

Models