Overview
The Law Enforcement API provides endpoints for managing officers, conducting searches, creating records, handling incidents, and managing impound lots.
Most LEO endpoints require the Leo permission and an active officer on duty.
Get Active Officer
GET /api/leo/active-officer
curl -X GET https://your-cad.com/api/leo/active-officer \
-H "Cookie: snaily-cad-access-token=<token>"
Get the currently active officer for the authenticated user.
Response
Current status (on duty, busy, etc.)
Associated citizen information
Get Active Officers
GET /api/leo/active-officers
curl -X GET "https://your-cad.com/api/leo/active-officers?skip=0&includeAll=false" \
-H "Cookie: snaily-cad-access-token=<token>"
Get all currently active officers and combined units.
Query Parameters
Include all officers (ignore pagination)
Number of records to skip
Search query for filtering officers
Response
Returns an array of active officer and combined unit objects.
Create/Update Officer
curl -X POST https://your-cad.com/api/leo \
-H "Cookie: snaily-cad-access-token=<token>" \
-H "Content-Type: application/json" \
-d '{
"citizenId": "citizen-id",
"department": "department-id",
"divisions": ["division-id-1"],
"callsign": "1A-23",
"badgeNumber": "12345"
}'
Create a new officer.
Request Body
Citizen ID to link to officer
Officer callsign (e.g., “1A-23”)
POST /api/leo/panic-button
curl -X POST https://your-cad.com/api/leo/panic-button \
-H "Cookie: snaily-cad-access-token=<token>" \
-H "Content-Type: application/json" \
-d '{
"officerId": "officer-id",
"isEnabled": true
}'
Enable or disable panic button for an officer.
Request Body
Enable or disable panic mode
Response
Returns the updated officer object with panic button status.
Search
Search by Name
curl -X POST https://your-cad.com/api/search/name \
-H "Cookie: snaily-cad-access-token=<token>" \
-H "Content-Type: application/json" \
-d '{
"name": "John Doe"
}'
Search for citizens by name, surname, or license numbers.
Request Body
Name to search (first, last, or full name)
Specific citizen ID to search
Response
Returns array of matching citizens with records, warrants, vehicles, and weapons.
Search by Plate
POST /api/search/plate-or-vin
curl -X POST https://your-cad.com/api/search/plate-or-vin \
-H "Cookie: snaily-cad-access-token=<token>" \
-H "Content-Type: application/json" \
-d '{
"plateOrVin": "ABC123"
}'
Search for vehicles by license plate or VIN number.
Request Body
License plate or VIN to search
Response
Returns vehicle information including owner, registration status, and flags.
Search by Weapon Serial
curl -X POST https://your-cad.com/api/search/weapon \
-H "Cookie: snaily-cad-access-token=<token>" \
-H "Content-Type: application/json" \
-d '{
"serialNumber": "SN123456"
}'
Search for weapons by serial number.
Request Body
Records
Create Record
POST /api/search/actions/records
curl -X POST https://your-cad.com/api/search/actions/records \
-H "Cookie: snaily-cad-access-token=<token>" \
-H "Content-Type: application/json" \
-d '{
"type": "ARREST_REPORT",
"citizenId": "citizen-id",
"violations": [
{
"penalCodeId": "penal-code-id",
"fine": 500,
"jailTime": 0
}
]
}'
Create an arrest report, ticket, or written warning.
Request Body
Record type: ARREST_REPORT, TICKET, or WRITTEN_WARNING
Array of violation objects
Postal/zip code of incident
Impound Lot
Get Impounded Vehicles
GET /api/leo/impounded-vehicles
curl -X GET "https://your-cad.com/api/leo/impounded-vehicles?skip=0" \
-H "Cookie: snaily-cad-access-token=<token>"
Get all impounded vehicles.
Query Parameters
Response
Array of impounded vehicle objects
Release Impounded Vehicle
DELETE /api/leo/impounded-vehicles/:id
curl -X DELETE https://your-cad.com/api/leo/impounded-vehicles/{vehicleId} \
-H "Cookie: snaily-cad-access-token=<token>"
Release a vehicle from the impound lot.
Path Parameters
Impounded vehicle ID or registered vehicle ID
Incidents
Create Incident
curl -X POST https://your-cad.com/api/incidents \
-H "Cookie: snaily-cad-access-token=<token>" \
-H "Content-Type: application/json" \
-d '{
"title": "Armed Robbery",
"description": "Incident description",
"postal": "90210",
"involvedOfficers": ["officer-id-1"]
}'
Create a new incident report.
Request Body
Array of officer IDs involved
Update Officer Callsign
PUT /api/leo/callsign/:officerId
curl -X PUT https://your-cad.com/api/leo/callsign/{officerId} \
-H "Cookie: snaily-cad-access-token=<token>" \
-H "Content-Type: application/json" \
-d '{
"callsign": "division-callsign-id"
}'
Update an officer’s active division callsign.
Path Parameters
Request Body
Division callsign ID (or “null” to clear)
Get Unit Qualifications
GET /api/leo/qualifications/:unitId
curl -X GET https://your-cad.com/api/leo/qualifications/{unitId} \
-H "Cookie: snaily-cad-access-token=<token>"
Get awards and qualifications for a unit.
Path Parameters
Response
Returns array of qualification objects with associated values.