Nodeflux Central

API Reference — Plate Enrollment

Endpoint untuk mengelola pendaftaran plat nomor kendaraan, status, dan referensi internal LPR.

Semua endpoint memerlukan header Authorization: Bearer <token>. Basis URL mengikuti variabel lingkungan VITE_API_URL yang dikonfigurasi pada instalasi Lenz. Jika Anda belum punya token, lihat halaman Otentikasi.


CRUD Plate Enrollment

Endpoint utama untuk membuat, membaca, memperbarui, dan menghapus data enrollment plat nomor kendaraan satu per satu.

GET
/api/enrolled-plates

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

page?integer

Nomor halaman, dimulai dari 1

Default1
limit?integer

Jumlah data per halaman

Default10
search?string

Pencarian berdasarkan nama pemilik atau nomor plat

filter[status]?string

Filter berdasarkan status kendaraan (contoh: whitelist, blacklist)

sortBy?string

Kolom untuk pengurutan

Default"id"
descending?boolean

Urutan menurun jika true

Defaulttrue

Response Body

application/json

curl -X GET "https://lenz.example.com/api/enrolled-plates"
{  "ok": true,  "message": "successfully get enrolled plates",  "result": {    "limit": 10,    "current_page": 1,    "total_data": 2,    "total_page": 1,    "offset": 0,    "vehicles": [      {        "id": 1,        "unique_id": "VH-001",        "name": "Budi Santoso",        "plate_number": "B 1234 ABC",        "type": "car",        "brand": "Toyota",        "color": "Putih",        "status": "whitelist",        "created_at": "2024-01-01T00:00:00Z",        "updated_at": "2024-01-01T00:00:00Z",        "deleted_at": null,        "vehicles": [          {            "id": 1,            "enrolled_plate_id": 1,            "variation": 1,            "created_at": "2024-01-01T00:00:00Z"          }        ]      }    ]  }}
POST
/api/enrolled-plates

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

multipart/form-data

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://lenz.example.com/api/enrolled-plates" \  -F name="string" \  -F plate_number="string" \  -F images="[    \"string\"  ]"
{  "ok": true,  "message": "successfully enrolled plate",  "result": {    "id": 42,    "unique_id": "VH-042",    "name": "Budi Santoso",    "plate_number": "B 1234 ABC",    "type": "car",    "brand": "Toyota",    "color": "Putih",    "status": "whitelist",    "created_at": "2024-06-01T08:00:00Z",    "updated_at": "2024-06-01T08:00:00Z",    "deleted_at": null  }}
GET
/api/enrolled-plates/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*integer

ID numerik enrollment plat

Response Body

application/json

curl -X GET "https://lenz.example.com/api/enrolled-plates/0"
{  "ok": true,  "message": "successfully get detail enrolled plate",  "vehicle": {    "id": 42,    "unique_id": "VH-042",    "name": "Budi Santoso",    "plate_number": "B 1234 ABC",    "type": "car",    "brand": "Toyota",    "color": "Putih",    "status": "whitelist",    "created_at": "2024-06-01T08:00:00Z",    "updated_at": "2024-06-01T08:00:00Z",    "deleted_at": null,    "vehicles": [      {        "id": 10,        "enrolled_plate_id": 42,        "variation": 1,        "created_at": "2024-06-01T08:00:00Z"      }    ]  }}
PUT
/api/enrolled-plates/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*integer

ID numerik enrollment plat

Request Body

multipart/form-data

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PUT "https://lenz.example.com/api/enrolled-plates/0" \  -F name="string" \  -F plate_number="string"
{  "ok": true,  "message": "successfully updated enrolled plate"}
DELETE
/api/enrolled-plates/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*integer

ID numerik enrollment plat

Response Body

application/json

curl -X DELETE "https://lenz.example.com/api/enrolled-plates/0"
{  "ok": true,  "message": "successfully deleted enrolled plate"}

Statistik & Status

Endpoint ringan untuk widget dashboard dan filter status di toolbar tabel enrollment.

GET
/api/enrolled-plates/statuses

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Response Body

application/json

curl -X GET "https://lenz.example.com/api/enrolled-plates/statuses"
{  "ok": true,  "message": "success",  "results": {    "total": 150,    "statuses": [      {        "status": "whitelist",        "total": 100      },      {        "status": "blacklist",        "total": 30      },      {        "status": "normal",        "total": 20      }    ]  }}

Endpoint Legacy (/api/vehicles)

Beberapa komponen internal masih menggunakan path /api/vehicles yang merupakan alias lama untuk operasi CRUD yang sama. Gunakan /api/enrolled-plates untuk integrasi baru.

Endpoint /api/vehicles bersifat legacy. Fungsionalitasnya identik dengan /api/enrolled-plates — gunakan path baru untuk semua integrasi baru.

GET
/api/vehicles

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

page?integer
Default1
limit?integer
Default10
search?string
filter[status]?string

Response Body

curl -X GET "https://lenz.example.com/api/vehicles"
Empty
POST
/api/vehicles

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Response Body

curl -X POST "https://lenz.example.com/api/vehicles"
Empty
PUT
/api/vehicles/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*integer

Response Body

curl -X PUT "https://lenz.example.com/api/vehicles/0"
Empty
DELETE
/api/vehicles/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*integer

Response Body

curl -X DELETE "https://lenz.example.com/api/vehicles/0"
Empty
GET
/api/vehicles/statuses

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Response Body

curl -X GET "https://lenz.example.com/api/vehicles/statuses"
Empty

On this page