# Assign a new Axis LPR Camera to an account

`POST https://api.parklio.com/v2/lpr-cameras/axis`

This endpoint serves the purpose of assigning a parklio lpr
    camera to the account of the authorised user. Assigning is done by scanning
    the UUID sticker located on the LPR Camera.

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

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `mac` | string | yes |  |
| `name` | string | no | A user assigned name |
| `connected_device_type` | string (`gate`, `chain`, `bollard`, `other`, `standalone`) | no | A enum indicating the type of device connected to the Camera |
| `lpr_position` | string (`in`, `out`, `in/out`) | yes | The direction of the passage that the Camera is overlooking |
| `zone_id` | number | yes | The zone we wish to assign the camera to |

```json
{
  "mac": "00:1A:2B:3C:4D:5E",
  "name": "John Doe",
  "connected_device_type": "gate",
  "lpr_position": "in",
  "zone_id": 0
}
```

## Responses

### 200

```json
{
  "success": true,
  "data": {
    "id": 1,
    "name": "L123456789",
    "device_id": "L123456789",
    "device_serial": "L123456789",
    "account_id": "1",
    "zone_id": "1",
    "status": "online",
    "lpr_position": "in",
    "connected_device_type": "gate",
    "input_status": "unknown",
    "mac": "be:a0:42:fd:21:b8",
    "save_image": false,
    "deleted_at": null,
    "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 — LPR has owner already set and trying to set another one won't work. User should first unassign LPR owner before trying again.

```json
{
  "success": false,
  "errors": [
    {
      "code": 223,
      "message": "Lpr camera owner already set."
    }
  ]
}
```

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

