# Update lot whitelists

`PATCH https://api.parklio.com/v2/lot-whitelists/{id}`

This endpoint allows the user to update lot whitelists by id

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

## Path parameters

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

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | no |  |
| `start_time` | string | no |  |
| `end_time` | string | no |  |
| `lot_id` | number | no |  |

```json
{
  "name": "John Doe",
  "start_time": "2026-01-15T09:30:00.000Z",
  "end_time": "2026-01-15T09:30:00.000Z",
  "lot_id": 0
}
```

## Responses

### 200

```json
{
  "success": true,
  "data": {
    "id": 1,
    "account_user_id": 1,
    "lot_id": 1,
    "license_plate": "DT-PLATE2",
    "license_plate_id": 1,
    "name": "John Doe",
    "status": "active",
    "start_time": "2026-01-15T09:30:00.000Z",
    "end_time": "2026-01-15T09:30:00.000Z",
    "is_unlimited": 0,
    "bound_products": [
      {
        "id": 1,
        "device_id": "L123456789",
        "name": "Main Gate"
      }
    ],
    "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."
    }
  ]
}
```

### 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."
    }
  ]
}
```

