# Create a lot share view

`POST https://api.parklio.com/v2/lot-share-views`

Creates a **public** web page with live occupancy for some zones of a lot, viewable without logging in. The response's `url` is the page: share it as you would a password.

- `zone_ids`: at least one zone of the lot.
- `lot_share_view_type`: `counts_only`, `live_camera` (needs a parking-detection camera in a zone) or `vector_map` (needs zones with a map).

Revoke it with `PATCH /v2/lot-share-views/{id}` and `{"revoked": true}`. See the [Live occupancy](/guides/live-occupancy#6-share-a-live-view) guide.

**Auth:** `Authorization: Bearer <token>`

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `lot_id` | number | yes | The ID of the lot this lot share view belongs to. |
| `zone_ids` | number[] | no | The IDs of the zones to include in this lot share view. At least one zone must be provided. |
| `lot_share_view_type` | string (`counts_only`, `live_camera`, `vector_map`) | yes | The type of view rendered when the share link is opened. Determines what information is displayed to the public. |

```json
{
  "lot_id": 1,
  "zone_ids": [
    1,
    2
  ],
  "lot_share_view_type": "counts_only"
}
```

## Responses

### 200

```json
{
  "success": true,
  "data": {
    "id": 21,
    "revoked": false,
    "url": "https://api.parklio.com/v2/lot-share-views/display/<share-token>",
    "lot_share_view_type": "counts_only",
    "lot": {
      "id": 7,
      "name": "Main garage",
      "spot_count": 120,
      "occupied_count": 42
    },
    "zones": [
      {
        "id": 9,
        "name": "Level -1",
        "spot_count": 80,
        "occupied_count": 30
      },
      {
        "id": 10,
        "name": "Level -2",
        "spot_count": 40,
        "occupied_count": 12
      }
    ],
    "created_at": "2026-01-15T09:30:00.000Z",
    "updated_at": "2026-01-15T09:30:00.000Z"
  }
}
```

### 401 — Account user is not logged in and they should log in again.

```json
{
  "success": false,
  "errors": [
    {
      "code": 1,
      "message": "Unauthorized access."
    }
  ]
}
```

### 403 — User does not have permission to access requested resource.

```json
{
  "success": false,
  "errors": [
    {
      "code": 4,
      "message": "No permission."
    }
  ]
}
```

### 404 — Resource that has been requested does not exist. User should not try to repeat this request.

```json
{
  "success": false,
  "errors": [
    {
      "code": 6,
      "message": "Resource not found."
    }
  ]
}
```

### 422 — Some of the provided request parameters are missing or are invalid. User should add/change them according to response message.

```json
{
  "success": false,
  "errors": [
    {
      "code": 23,
      "message": "Validation error",
      "field": "field"
    }
  ]
}
```

