Nodeflux Central
Plate Enrollment

API Reference — Plate Enrollment

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

Semua endpoint memerlukan otentikasi. Untuk integrasi, kirim header X-Api-Key: <key> di setiap request tanpa header Authorization. Bearer token (Authorization: Bearer <access_token>, berlaku 30 menit) hanya untuk aplikasi yang menampilkan login Lenz ke penggunanya sendiri dan wajib menyertakan X-Integration-Signature. Basis URL mengikuti variabel lingkungan VITE_API_URL yang dikonfigurasi pada instalasi Lenz. Lihat Otentikasi untuk memilih jalur yang tepat.


CRUD Plate Enrollment

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

Daftar Plate Enrollment

GET
/api/vehicles

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/vehicles"
{  "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"          }        ]      }    ]  }}

Tambah Plate Enrollment

POST
/api/vehicles

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/vehicles" \  -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  }}

Detail Plate Enrollment

GET
/api/vehicles/{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/vehicles/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"      }    ]  }}

Update Plate Enrollment

PUT
/api/vehicles/{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/vehicles/0" \  -F name="string" \  -F plate_number="string"
{  "ok": true,  "message": "successfully updated enrolled plate"}

Hapus Plate Enrollment

DELETE
/api/vehicles/{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/vehicles/0"
{  "ok": true,  "message": "successfully deleted enrolled plate"}

Statistik & Status

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

Status Enrollment Plat

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      }    ]  }}

On this page