# Replace zones for lot share view

`PUT https://api.parklio.com/v2/lot-share-views/{id}/zones`

This endpoint allows the user to replace zones for lot share view by id

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

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes |  |

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `ids` | number[] | yes | The IDs of the zones to assign to this lot share view, replacing any previously assigned zones. |

```json
{
  "ids": [
    1,
    2,
    3
  ]
}
```

## Responses

### 200

```json
{
  "success": true,
  "data": {
    "id": 1,
    "revoked": false,
    "url": "string",
    "lot_share_view_type": "counts_only",
    "lot": {
      "id": 1,
      "name": "Default Lot",
      "spot_count": 10,
      "occupied_count": 0
    },
    "zones": [
      {
        "id": 1,
        "name": "Zone A",
        "spot_count": 10,
        "occupied_count": 0
      }
    ],
    "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"
    }
  ]
}
```

