---
search:
  tags:
    - organization-reads
    - POST
seo:
  description: >-
    Get private lesson types, availability, pack types and the… Reference for
    the POST /queries/get_private_lesson_setup endpoint in the Soljio
    Organization API.
sidebar:
  label: >-
    Get private lesson types, availability, pack types and the locations,
    instructors and resources they use.
  badge: POST
title: >-
  Get private lesson types, availability, pack types and the locations,
  instructors and resources they use.
type: openapi-operation
---
Get private lesson types, availability, pack types and the locations, instructors and resources they use. An organization-scoped read using JSON filter arguments; requires private_lessons.read. Pagination cursors must be reused only with the same organization, operation and filters.

`POST /queries/get_private_lesson_setup`

**Request body** (`application/json`, required)

Request body example:

```json
{}
```

**Responses**

- `200` — Successful read.
- `400` — invalid\_request
- `401` — unauthorized
- `403` — forbidden
- `404` — not\_found
- `405` — method\_not\_allowed
- `409` — conflict, idempotency\_conflict
- `413` — payload\_too\_large
- `415` — unsupported\_media\_type
- `429` — rate\_limited
- `500` — internal\_error

Response example, 200:

```json
{
  "data": {
    "availability": [
      {
        "id": "string",
        "exceptions": [
          {
            "date": "string",
            "windows": [
              {
                "end_minute": 0,
                "start_minute": 0
              }
            ]
          }
        ],
        "instructor_id": "string",
        "location_id": "string",
        "resource_id": "string",
        "timezone": "string",
        "windows": [
          {
            "end_minute": 0,
            "start_minute": 0,
            "weekday": 0
          }
        ]
      }
    ],
    "instructors": [
      {
        "id": "string",
        "name": "string"
      }
    ],
    "lesson_types": [
      {
        "id": "string",
        "allow_instructor_choice": true,
        "allow_pay_later": true,
        "approval_hours": 0,
        "booking_increment_minutes": 0,
        "buffer_after_minutes": 0,
        "buffer_before_minutes": 0,
        "cancellation_hours": 0,
        "capacity": 0,
        "description": "string",
        "duration_minutes": 0,
        "horizon_days": 0,
        "instructor_permissions": {
          "approval": true,
          "availability": true,
          "reschedule": true
        },
        "invitation_hours": 0,
        "locations": [
          {
            "instructor_ids": [
              "string"
            ],
            "location_id": "string",
            "resource_groups": [
              [
                "string"
              ]
            ]
          }
        ],
        "max_age": 0,
        "min_age": 0,
        "name": "string",
        "notice_hours": 0,
        "payment_hours": 0,
        "pricing": {
          "amount_minor": 0,
          "currency": "string",
          "group_rates": [
            {
              "amount_minor": 0,
              "students": 0
            }
          ],
          "mode": "booking"
        },
        "published": true,
        "reminder_hours": 0,
        "requires_approval": true,
        "skill_levels": [
          "string"
        ],
        "updated_at": "2019-08-24T14:15:22Z"
      }
    ],
    "locations": [
      {
        "id": "string",
        "name": "string",
        "timezone": "string"
      }
    ],
    "online_payments": true,
    "pack_types": [
      {
        "id": "string",
        "credits": 0,
        "currency": "string",
        "expiry_days": 0,
        "group_sizes": [
          0
        ],
        "lesson_type_ids": [
          "string"
        ],
        "name": "string",
        "price_minor": 0,
        "published": true,
        "single_student": true,
        "unit": "booking"
      }
    ],
    "resources": [
      {
        "id": "string",
        "kind": "string",
        "location_id": "string",
        "name": "string"
      }
    ],
    "skill_levels": [
      "string"
    ],
    "timezone": "string"
  },
  "request_id": "266ea41d-adf5-480b-af50-15b940c2b846"
}
```

Response example, 400:

```json
{
  "error": {
    "code": "invalid_request",
    "message": "The request is invalid."
  },
  "request_id": "00000000-0000-4000-8000-000000000001"
}
```

Response example, 401:

```json
{
  "error": {
    "code": "unauthorized",
    "message": "A valid service token is required."
  },
  "request_id": "00000000-0000-4000-8000-000000000001"
}
```

Response example, 403:

```json
{
  "error": {
    "code": "forbidden",
    "message": "The service token lacks a required scope."
  },
  "request_id": "00000000-0000-4000-8000-000000000001"
}
```

Response example, 404:

```json
{
  "error": {
    "code": "not_found",
    "message": "The requested resource was not found."
  },
  "request_id": "00000000-0000-4000-8000-000000000001"
}
```

Response example, 405:

```json
{
  "error": {
    "code": "method_not_allowed",
    "message": "The method is not supported for this resource."
  },
  "request_id": "00000000-0000-4000-8000-000000000001"
}
```

Response example, 409:

```json
{
  "error": {
    "code": "conflict",
    "message": "The command conflicts with the current state."
  },
  "request_id": "00000000-0000-4000-8000-000000000001"
}
```

Response example, 413:

```json
{
  "error": {
    "code": "payload_too_large",
    "message": "The request body exceeds the byte limit for this operation."
  },
  "request_id": "00000000-0000-4000-8000-000000000001"
}
```

Response example, 415:

```json
{
  "error": {
    "code": "unsupported_media_type",
    "message": "Use application/json for command requests."
  },
  "request_id": "00000000-0000-4000-8000-000000000001"
}
```

Response example, 429:

```json
{
  "error": {
    "code": "rate_limited",
    "message": "Too many requests. Retry after the indicated delay."
  },
  "request_id": "00000000-0000-4000-8000-000000000001"
}
```

Response example, 500:

```json
{
  "error": {
    "code": "internal_error",
    "message": "The request could not be completed."
  },
  "request_id": "00000000-0000-4000-8000-000000000001"
}
```
