Skip to main content

API Endpoints

All routes are defined in scannersky/urls.py.

DRF ViewSets

PrefixViewSetAuthNotes
/api/departments/DepartmentViewSetNone
/api/persons/PersonViewSetNoneReturns non-archived persons only (is_archived=False)
/api/records/RecordViewSetRequired
/api/devicelogs/DeviceLogViewSetNone

Custom Endpoints

MethodPathPurposeAuth
POST/api/scan/Submit scan from node. Resolves the person via issued IDCard (active/lost/damaged/expired) first, then falls back to the legacy Person.card_number, so replaced/old cards still attribute to the correct person.None
GET/api/info/{card_number}/Lookup person by card number (same resolution order as /api/scan/).None
GET/api/devices/status/Device online or offline stateAdmin
GET/api/devicelogs/latest-meta/Latest device log metadataAdmin
POST/admin/core/person/register-id/save/ID registration save. A plain save updates profile info only. With print_trigger=true it issues a new active IDCard, expires the previous active card, writes an IDCardPrintLog (using print_reason), and keeps Person.id_image in sync.Admin (person_id_registration)
GET/admin/core/person/register-id/print-logs/?person_id=<id>Powers the "Save and Print Card" modal. Returns reasons (the IDCardPrintLog reason choices) and logs (the person's prior print audit entries: reason, printed_at, printed_by, notes, card_number, card_status), newest first.Admin (person_id_registration)

Template & Documentation Views

PathPurpose
/Home landing page
/learn/Redirects (302) to /docs/learn/ (User Manual)
/docs/Documentation portal (Docusaurus developer docs & user manual)
/docs/learn/King's College of the Philippines (KCP) User Manual
/docs/dev/Developer technical documentation
/scan/Public scan page