{"openapi":"3.0.3","info":{"title":"10-8 CAD Incident API","version":"1.5.2","description":"10-8 Systems API for incidents.\n\nThis spec covers:\n- health check\n- create incident\n- list open incidents or filter by timestamp range\n- get incident by numeric ID, incident lookup, or UUID\n- search persons or vehicles and see what calls they've been on\n- create/update comments\n- add/remove tags\n- add/remove persons\n- add/remove vehicles\n- add/remove dispositions (by catalog name, shortname, or ID; optionally tied to a unit)\n- list or append unit activity-log (unitsLog) entries; filter by unit name, call, shift, or time range\n- list units (read-only) with their type, jurisdiction, and assigned vehicle; filter by status, job, or type\n- read, create, update, and remove call types (incident types)\n\nRate limiting: requests are limited per API key (fixed one-minute window). Responses\ninclude X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers. When a\nkey exceeds its limit, the API returns 429 Too Many Requests with a Retry-After header.\nA key may be configured as unlimited.\n"},"servers":[{"url":"https://ps569km5w9.execute-api.us-gov-west-1.amazonaws.com/prod","description":"Production API Gateway endpoint (default)."},{"url":"https://connect.10-8systems.com","description":"Custom domain."}],"tags":[{"name":"Health"},{"name":"Incidents"},{"name":"Comments"},{"name":"Tags"},{"name":"Persons"},{"name":"Vehicles"},{"name":"Dispositions"},{"name":"Units"},{"name":"Call Types"},{"name":"Search"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key"},"ApiSecretAuth":{"type":"apiKey","in":"header","name":"X-API-Secret"}},"parameters":{"LookupParam":{"name":"lookup","in":"path","required":true,"description":"Numeric global incident ID, primary incident number (for example `25-0129`), or the incident's UUID.","schema":{"type":"string"},"examples":{"numericId":{"value":"12345"},"incidentNumber":{"value":"25-0129"},"alternateIncident":{"value":"FD-1234"},"uuid":{"value":"550e8400-e29b-41d4-a716-446655440000"}}},"CommentIdParam":{"name":"commentId","in":"path","required":true,"schema":{"type":"integer"}},"DispositionIdParam":{"name":"dispositionId","in":"path","required":true,"description":"The callDispositions row id (the `id` field of a dispositions entry).","schema":{"type":"integer"}},"CallTypeIdParam":{"name":"id","in":"path","required":true,"description":"callTypes id.","schema":{"type":"integer"}}},"schemas":{"ErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}},"HealthResponse":{"type":"object","properties":{"ok":{"type":"boolean"},"service":{"type":"string"}}},"Comment":{"type":"object","properties":{"id":{"type":"integer"},"callid":{"type":"integer"},"userID":{"type":"integer"},"time":{"type":"string"},"timestamp":{"type":"integer"},"officer":{"type":"string"},"comment":{"type":"string"},"type":{"type":"string"},"isEdited":{"type":"integer"}}},"Tag":{"type":"object","properties":{"id":{"type":"integer"},"tagID":{"type":"integer"},"tag":{"type":"string"}}},"Person":{"type":"object","properties":{"id":{"type":"integer"},"personID":{"type":"integer"},"relation":{"type":"string"},"notes":{"type":"string"},"IsInCustody":{"type":"integer"},"InCustodyByUserId":{"type":"integer","nullable":true},"InCustodyCreated":{"type":"string","nullable":true},"bookingId":{"type":"integer","nullable":true},"firstName":{"type":"string"},"middleName":{"type":"string"},"lastName":{"type":"string"},"alias":{"type":"string"},"dob":{"type":"string"},"address":{"type":"string"},"city":{"type":"string"},"county":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"sex":{"type":"string"},"race":{"type":"string"},"height":{"type":"string"},"weight":{"type":"integer"},"eyes":{"type":"string"},"hair":{"type":"string"},"features":{"type":"string"},"stateID":{"type":"string"},"stateIDNumber":{"type":"string"},"profileImage":{"type":"string"},"isJuvenile":{"type":"integer"}}},"Vehicle":{"type":"object","properties":{"id":{"type":"integer"},"vehicleID":{"type":"integer"},"notes":{"type":"string"},"owner":{"type":"integer"},"license":{"type":"string"},"vin":{"type":"string"},"state":{"type":"string"},"type":{"type":"string"},"make":{"type":"string"},"model":{"type":"string"},"color":{"type":"string"},"year":{"type":"integer"},"profileImage":{"type":"string"}}},"AlternateIncident":{"type":"object","properties":{"id":{"type":"integer"},"departmentsID":{"type":"integer"},"incidentPrefix":{"type":"string"},"incidentNumber":{"type":"integer"},"departmentName":{"type":"string","nullable":true}}},"UserSummary":{"type":"object","description":"Minimal user record returned inside unit assignments.","properties":{"id":{"type":"integer"},"email":{"type":"string","nullable":true},"name":{"type":"string"},"badge":{"type":"string"},"altid":{"type":"string"}}},"Case":{"type":"object","properties":{"id":{"type":"integer"},"callID":{"type":"integer"},"casePrefix":{"type":"string"},"caseID":{"type":"integer"},"createdBy":{"type":"integer","nullable":true},"case_formatted":{"type":"string","description":"Formatted case label, e.g. `CASE-0042`. The case number is zero-padded to 4\ndigits for most tenants and to 6 digits for the OCSD agencies (OCSDCA,\nOCSDCADEV, OCSDSNA) — e.g. `CASE-000042`. Numbers longer than the padding\nare never truncated.\n"}}},"Disposition":{"type":"object","description":"A disposition applied to an incident, optionally tied to a specific unit on the\ncall. Only non-deleted dispositions (`isDeleted = 0`) are returned.\n","properties":{"id":{"type":"integer","description":"callDispositions row id. Use this value to delete the disposition."},"userID":{"type":"integer"},"callID":{"type":"integer"},"dispositionID":{"type":"integer","description":"ID of the catalog disposition (from the agency's dispositions list)."},"disposition":{"type":"string","description":"Full catalog name of the disposition."},"shortname":{"type":"string","nullable":true,"description":"Catalog shortname for the disposition, resolved from dispositionID. Null when the catalog entry has no shortname or dispositionID is unset/legacy (0)."},"notes":{"type":"string"},"name":{"type":"string","description":"Display name of the user who set the disposition."},"time":{"type":"string","description":"Formatted local time, e.g. `06-17-2026 19:04:00`."},"timestamp":{"type":"integer","format":"int64","description":"Unix timestamp in seconds."},"callUnitsID":{"type":"integer","nullable":true,"description":"The callUnits row id this disposition is tied to, or null for a call-level disposition."},"unitID":{"type":"integer","nullable":true,"description":"The units-table id of the linked unit, resolved from callUnitsID, or null."},"unit":{"type":"string","nullable":true,"description":"Display name of the linked unit, or null."}}},"CallSummary":{"type":"object","description":"Lightweight reference to an incident. Fetch the full object via `GET /v1/incidents/{id}`.","properties":{"id":{"type":"integer"},"uuid":{"type":"string","format":"uuid"},"incident_id":{"type":"string","nullable":true},"incident_id1":{"type":"string","nullable":true},"type":{"type":"string"},"timestamp":{"type":"integer","format":"int64"},"timestamp_closed":{"type":"integer","format":"int64","nullable":true},"isClosed":{"type":"integer"},"status":{"type":"string"}}},"PersonSearchResult":{"type":"object","description":"Full person record plus a lightweight list of calls they've been linked to.","properties":{"id":{"type":"integer"},"uid":{"type":"string"},"firstName":{"type":"string"},"middleName":{"type":"string"},"lastName":{"type":"string"},"alias":{"type":"string"},"dob":{"type":"string"},"address":{"type":"string"},"city":{"type":"string"},"county":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"sex":{"type":"string"},"race":{"type":"string"},"height":{"type":"string"},"weight":{"type":"integer"},"eyes":{"type":"string"},"hair":{"type":"string"},"features":{"type":"string"},"stateID":{"type":"string"},"stateIDNumber":{"type":"string"},"profileImage":{"type":"string"},"isJuvenile":{"type":"integer"},"calls":{"type":"array","items":{"$ref":"#/components/schemas/CallSummary"}}}},"VehicleSearchResult":{"type":"object","description":"Full vehicle record plus a lightweight list of calls it's been linked to.","properties":{"id":{"type":"integer"},"uid":{"type":"string"},"owner":{"type":"integer"},"license":{"type":"string"},"vin":{"type":"string"},"state":{"type":"string"},"type":{"type":"string"},"make":{"type":"string"},"model":{"type":"string"},"color":{"type":"string"},"year":{"type":"integer"},"profileImage":{"type":"string"},"calls":{"type":"array","items":{"$ref":"#/components/schemas/CallSummary"}}}},"PersonSearchResponse":{"type":"object","properties":{"limit":{"type":"integer"},"count":{"type":"integer"},"truncated":{"type":"boolean","description":"True when `count` reached `limit`, meaning more results may exist. Narrow the search."},"results":{"type":"array","items":{"$ref":"#/components/schemas/PersonSearchResult"}}}},"VehicleSearchResponse":{"type":"object","properties":{"limit":{"type":"integer"},"count":{"type":"integer"},"truncated":{"type":"boolean","description":"True when `count` reached `limit`, meaning more results may exist. Narrow the search."},"results":{"type":"array","items":{"$ref":"#/components/schemas/VehicleSearchResult"}}}},"CallUnit":{"type":"object","properties":{"id":{"type":"integer"},"unitID":{"type":"integer"},"unit":{"type":"string"},"isPrimary":{"type":"integer","enum":[0,1],"description":"1 when this unit is the primary unit on the call, otherwise 0."},"status":{"type":"string"},"assignment":{"type":"string"},"dispatched":{"type":"string"},"enroute":{"type":"string"},"onscene":{"type":"string"},"transporting":{"type":"string"},"destination":{"type":"string"},"complete":{"type":"string"},"time_dispatched":{"type":"integer","nullable":true},"time_enroute":{"type":"integer","nullable":true},"time_onscene":{"type":"integer","nullable":true},"time_transporting":{"type":"integer","nullable":true},"time_destination":{"type":"integer","nullable":true},"time_complete":{"type":"integer","nullable":true},"users":{"type":"array","description":"Users assigned to this unit on this call.","items":{"$ref":"#/components/schemas/UserSummary"}}}},"Incident":{"type":"object","description":"Call/incident record with related collections.","properties":{"id":{"type":"integer"},"uuid":{"type":"string","format":"uuid","description":"Globally unique identifier for the incident. Can be used as a lookup value."},"status":{"type":"string"},"idPrefix":{"type":"string"},"agencyID":{"type":"integer"},"code":{"type":"string"},"isClosed":{"type":"integer"},"type":{"type":"string"},"priority":{"type":"string","nullable":true},"channel":{"type":"string"},"source":{"type":"integer","nullable":true},"jurisdiction":{"type":"integer","nullable":true},"location":{"type":"string"},"latlng":{"type":"string"},"lat":{"type":"number"},"lng":{"type":"number"},"address":{"type":"string"},"city":{"type":"string"},"county":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"},"xstreet":{"type":"string"},"map":{"type":"string"},"locnotes":{"type":"string"},"rpname":{"type":"string"},"rplocation":{"type":"string"},"rpphone":{"type":"string"},"rpcontact":{"type":"string"},"dispatcher":{"type":"string"},"destination":{"type":"string"},"agencyLinkAck":{"type":"integer"},"time":{"type":"string"},"date":{"type":"string"},"timeSaved":{"type":"string"},"timeScheduledEnd":{"type":"string","nullable":true},"timestamp":{"type":"integer"},"isScheduled":{"type":"integer"},"created":{"type":"boolean","nullable":true},"incident_id":{"type":"string","nullable":true},"alternate_incidents":{"type":"array","items":{"$ref":"#/components/schemas/AlternateIncident"}},"comments":{"type":"array","items":{"$ref":"#/components/schemas/Comment"}},"units":{"type":"array","items":{"$ref":"#/components/schemas/CallUnit"}},"tags":{"type":"array","items":{"$ref":"#/components/schemas/Tag"}},"persons":{"type":"array","items":{"$ref":"#/components/schemas/Person"}},"vehicles":{"type":"array","items":{"$ref":"#/components/schemas/Vehicle"}},"cases":{"type":"array","items":{"$ref":"#/components/schemas/Case"}},"dispositions":{"type":"array","items":{"$ref":"#/components/schemas/Disposition"}}}},"CreateIncidentRequest":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"priority":{"type":"string"},"location":{"type":"string"},"latlng":{"type":"string","description":"Coordinate pair, for example `(33.717,-117.831)`"},"streetAddress":{"type":"string"},"address":{"type":"string","description":"Alias accepted by the implementation as a fallback for streetAddress."},"city":{"type":"string"},"county":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"},"xstreet":{"type":"string"},"apt":{"type":"string"},"locnotes":{"type":"string"},"rpname":{"type":"string"},"rpphone":{"type":"string"},"rpcontact":{"type":"boolean"},"rplocation":{"type":"string"},"destination":{"type":"string"},"timeScheduledEnd":{"type":"string","format":"date-time"},"dispatcher":{"type":"string"},"isScheduled":{"type":"integer","enum":[0,1]},"scheduled_timestamp":{"type":"integer","description":"Unix timestamp used when isScheduled=1."},"acknowledged":{"type":"boolean"},"summary":{"type":"string"},"units":{"oneOf":[{"type":"string","description":"Comma-separated unit list."},{"type":"array","items":{"type":"string"}}]}},"example":{"type":"Traffic Collision","priority":"1","location":"123 Main St","latlng":"33.717, -117.831","streetAddress":"123 Main St","city":"Anaheim","county":"Orange","state":"CA","zip":"92805","xstreet":"1st St","apt":"2B","locnotes":"Rear parking lot","rpname":"Jane Doe","rpphone":"555-111-2222","rpcontact":true,"rplocation":"On scene","destination":"St. Joseph Hospital","dispatcher":"API User","isScheduled":0,"acknowledged":true,"summary":"Caller reports two vehicles blocking roadway.","units":["A12","E4"]}},"AddCommentRequest":{"type":"object","required":["comment"],"properties":{"officer":{"type":"string"},"comment":{"type":"string"},"type":{"type":"string","default":"comment"}},"example":{"officer":"Dispatcher 1","comment":"Additional caller reports smoke.","type":"update"}},"UpdateCommentRequest":{"type":"object","required":["comment"],"properties":{"comment":{"type":"string"}},"example":{"comment":"Corrected initial note."}},"AddTagRequest":{"type":"object","properties":{"tagId":{"type":"integer"},"tag":{"type":"string"}},"example":{"tag":"Hazmat"}},"RemoveTagRequest":{"type":"object","required":["tagId"],"properties":{"tagId":{"type":"integer"}},"example":{"tagId":12}},"AddPersonRequest":{"type":"object","properties":{"personId":{"type":"integer","description":"Optional. Used when person ID is already known, otherwise add person object."},"relation":{"type":"string"},"notes":{"type":"string"},"person":{"type":"object","properties":{"firstName":{"type":"string"},"middleName":{"type":"string"},"lastName":{"type":"string"},"alias":{"type":"string"},"dob":{"type":"string"},"address":{"type":"string"},"city":{"type":"string"},"county":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"sex":{"type":"string"},"race":{"type":"string"},"height":{"type":"string"},"weight":{"type":"integer"},"eyes":{"type":"string"},"hair":{"type":"string"},"features":{"type":"string"},"stateID":{"type":"string"},"stateIDNumber":{"type":"string"},"profileImage":{"type":"string"},"isJuvenile":{"type":"integer"}}}},"example":{"relation":"Victim","notes":"Seen leaving scene","person":{"firstName":"John","lastName":"Smith","dob":"01/01/1990","phone":"555-111-2222","sex":"M","race":"W"}}},"RemovePersonRequest":{"type":"object","required":["personId"],"properties":{"personId":{"type":"integer"}},"example":{"personId":55}},"AddVehicleRequest":{"type":"object","properties":{"vehicleId":{"type":"integer","description":"Optional. Used when vehicle ID is already known, otherwise add vehicle object."},"notes":{"type":"string"},"vehicle":{"type":"object","properties":{"owner":{"type":"integer"},"license":{"type":"string"},"vin":{"type":"string"},"state":{"type":"string"},"type":{"type":"string"},"make":{"type":"string"},"model":{"type":"string"},"color":{"type":"string"},"year":{"type":"integer"},"profileImage":{"type":"string"}}}},"example":{"notes":"Parked on south curb","vehicle":{"license":"8ABC123","vin":"1HGCM82633A123456","state":"CA","type":"Sedan","make":"Honda","model":"Accord","color":"Black","year":2019}}},"RemoveVehicleRequest":{"type":"object","required":["vehicleId"],"properties":{"vehicleId":{"type":"integer"}},"example":{"vehicleId":88}},"CreateDispositionRequest":{"type":"object","description":"Provide either `disposition` (a full name or shortname from the agency's\ndisposition catalog) or `dispositionId` (the catalog ID). When the same text\nmatches both a full name and a shortname, the full name wins.\n\nTo tie the disposition to a specific unit on the call, pass `unit` (the unit\nname as assigned to this incident) or `callUnitsID` (the callUnits row id).\nOmit both for a call-level disposition.\n","properties":{"disposition":{"type":"string","description":"Full disposition name or shortname from the catalog."},"dispositionId":{"type":"integer","description":"Catalog disposition ID. Alternative to `disposition`."},"unit":{"type":"string","description":"Name of a unit assigned to this incident to link the disposition to."},"callUnitsID":{"type":"integer","description":"callUnits row id to link to. Alternative to `unit`."},"notes":{"type":"string"},"name":{"type":"string","description":"Display name of who set the disposition. Defaults to the API key's name."}},"example":{"disposition":"Citation - Parked Car","unit":"A12","notes":"Issued parking citation"}},"RemoveDispositionRequest":{"type":"object","required":["id"],"properties":{"id":{"type":"integer","description":"The callDispositions row id (the `id` field from a dispositions entry)."}},"example":{"id":3438621}},"DispositionResponse":{"type":"object","description":"The disposition that was created.","properties":{"ok":{"type":"boolean"},"id":{"type":"integer"},"callID":{"type":"integer"},"userID":{"type":"integer"},"dispositionID":{"type":"integer"},"disposition":{"type":"string"},"shortname":{"type":"string","nullable":true,"description":"Catalog shortname resolved from dispositionID; null when unset/legacy."},"notes":{"type":"string"},"name":{"type":"string"},"time":{"type":"string"},"timestamp":{"type":"integer","format":"int64"},"callUnitsID":{"type":"integer","nullable":true},"unitID":{"type":"integer","nullable":true},"unit":{"type":"string","nullable":true}}},"DispositionMutationResponse":{"type":"object","properties":{"ok":{"type":"boolean"},"callID":{"type":"integer"},"id":{"type":"integer"},"removed":{"type":"boolean","description":"True if a matching non-deleted disposition was found and soft-deleted."}}},"UnitLogEntry":{"type":"object","description":"A single unit activity-log row. `timestamp` is raw unix seconds (not converted to any timezone).","properties":{"id":{"type":"integer"},"unitID":{"type":"integer"},"unit":{"type":"string","description":"Unit name (units.unit)."},"userID":{"type":"integer"},"user":{"type":"string","nullable":true,"description":"Display name of the user who created the entry."},"callID":{"type":"integer","nullable":true,"description":"Linked incident id, or null for a non-call entry."},"shiftID":{"type":"integer","nullable":true},"timestamp":{"type":"integer","format":"int64","description":"Unix timestamp in seconds (not timezone-adjusted)."},"log":{"type":"string"},"type":{"type":"string","nullable":true,"description":"Incident type of the linked call, if any."},"incident_id":{"type":"string","nullable":true,"description":"Formatted primary incident number of the linked call, or null."},"idPrefix":{"type":"string","nullable":true},"agencyID":{"type":"integer","nullable":true},"callCode":{"type":"string","nullable":true,"description":"Tenant code of the linked call."}}},"CreateUnitLogRequest":{"type":"object","required":["log"],"description":"Append a unit activity-log entry. Provide the unit as either `unitID`\n(units.id) or `unit` (units.unit name, resolved to its id). `callID`,\n`shiftID`, `timestamp`, and `userID` are optional.\n","properties":{"log":{"type":"string","description":"The log message."},"unitID":{"type":"integer","description":"units.id. Provide this or `unit`."},"unit":{"type":"string","description":"Unit name (units.unit). Alternative to `unitID`."},"callID":{"type":"integer","nullable":true,"description":"Optional incident id to associate. Stored as null when omitted."},"shiftID":{"type":"integer","description":"Optional. Defaults to 0."},"timestamp":{"type":"integer","format":"int64","description":"Optional unix timestamp in seconds. Defaults to the current server time."},"userID":{"type":"integer","description":"Optional. Defaults to the API key's user."}},"example":{"unit":"1A-12","callID":5362020,"log":"On Scene"}},"UnitLogResponse":{"type":"object","description":"The unit activity-log entry that was created.","properties":{"ok":{"type":"boolean"},"id":{"type":"integer"},"code":{"type":"string"},"userID":{"type":"integer"},"unitID":{"type":"integer"},"shiftID":{"type":"integer"},"callID":{"type":"integer","nullable":true},"timestamp":{"type":"integer","format":"int64"},"log":{"type":"string"}}},"UnitVehicle":{"type":"object","description":"Vehicle assigned to a unit (from unitsVehicles), embedded in the unit object.","properties":{"id":{"type":"integer"},"name":{"type":"string"},"vehicleID":{"type":"string","description":"Device/GPS identifier (unitsVehicles.vehicleID), distinct from the unit's vehicleID foreign key."},"macAddress":{"type":"string"},"lat":{"type":"number"},"lng":{"type":"number"},"locationTime":{"type":"integer","format":"int64"},"year":{"type":"integer","nullable":true},"make":{"type":"string","nullable":true},"model":{"type":"string","nullable":true},"color":{"type":"string","nullable":true},"vin":{"type":"string","nullable":true},"plate_number":{"type":"string","nullable":true},"usage_type":{"type":"string","nullable":true},"status":{"type":"string","description":"One of Active, Maintenance, Retired, Out of Service, Deleted."},"odometer":{"type":"integer","nullable":true},"service_interval":{"type":"integer","nullable":true},"assigned_to":{"type":"integer","nullable":true},"groupID":{"type":"integer","nullable":true},"home_address":{"type":"string","nullable":true},"purchase_date":{"type":"string","nullable":true},"last_service_date":{"type":"string","nullable":true},"next_service_due":{"type":"string","nullable":true}}},"UnitTypeRef":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string","nullable":true}}},"JurisdictionRef":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string","nullable":true}}},"Unit":{"type":"object","description":"A unit from the units table. tinyint columns are returned as booleans.","properties":{"id":{"type":"integer"},"code":{"type":"string"},"name":{"type":"string"},"rank":{"type":"string"},"unit":{"type":"string","description":"Unit callsign."},"job":{"type":"string","description":"Job/department (e.g. Sheriff, Fire, Police, EMS)."},"type":{"$ref":"#/components/schemas/UnitTypeRef"},"jurisdiction":{"$ref":"#/components/schemas/JurisdictionRef"},"radio":{"type":"string"},"notes":{"type":"string"},"statusTimestamp":{"type":"string"},"statusTime":{"type":"integer","format":"int64"},"status":{"type":"integer","description":"0 = available, 1 = busy, 2 = unavailable / out of service."},"statusText":{"type":"string","nullable":true,"description":"Human-readable status (available / busy / unavailable)."},"statusOther":{"type":"string"},"post":{"type":"string"},"postID":{"type":"integer","nullable":true},"district":{"type":"string"},"beat":{"type":"string"},"callstatus":{"type":"string"},"location":{"type":"string"},"location_assigned":{"type":"string"},"geLocation":{"type":"string"},"lat":{"type":"number"},"lng":{"type":"number"},"address":{"type":"string"},"locationTime":{"type":"string"},"locationTimestamp":{"type":"integer","format":"int64"},"speed":{"type":"string"},"locationAccuracy":{"type":"string"},"eosTime":{"type":"string","nullable":true},"generate_run":{"type":"boolean"},"confirm_run":{"type":"boolean"},"multiAssign":{"type":"boolean"},"vehicleID":{"type":"integer","nullable":true,"description":"Foreign key to unitsVehicles.id."},"vehicle":{"allOf":[{"$ref":"#/components/schemas/UnitVehicle"}],"nullable":true,"description":"The assigned vehicle, or null."},"personnel":{"type":"array","description":"Users assigned to the unit, resolved from personnel_1..5 (users.id).","items":{"$ref":"#/components/schemas/UserSummary"}},"pager1":{"type":"string"},"pager2":{"type":"string"},"pager3":{"type":"string"},"autoStatus_enroute":{"type":"boolean"},"autoStatus_onscene":{"type":"boolean"},"color_bg":{"type":"string"},"color_fg":{"type":"string"},"isActive":{"type":"boolean"},"sortGroupID":{"type":"integer"}}},"CallType":{"type":"object","description":"A call/incident type from callTypes. tinyint(1)/int(1) columns are returned as booleans; the questions column is not exposed.","properties":{"id":{"type":"integer"},"code":{"type":"string"},"type":{"type":"string","description":"Call type name (unique per tenant)."},"shortcut":{"type":"string","description":"Shortcut code (unique per tenant when non-empty)."},"priority":{"type":"integer","enum":[1,2,3,4]},"SOP":{"type":"string"},"sop_upload":{"type":"boolean"},"ic_assignments":{"type":"string","description":"Comma-separated incident-command assignments."},"timer":{"type":"integer","nullable":true},"buffer":{"type":"integer"},"isTrafficStop":{"type":"boolean"},"captureVehicle":{"type":"boolean"},"mentalWeight":{"type":"integer"},"defaultOnScene":{"type":"boolean"},"noSelfInitiate":{"type":"boolean"},"blotter":{"type":"boolean"},"callerInform":{"type":"boolean"}}},"CreateCallTypeRequest":{"type":"object","required":["type","priority"],"description":"type must be unique; shortcut must be unique when non-empty; priority must be 1-4.","properties":{"type":{"type":"string"},"shortcut":{"type":"string"},"priority":{"type":"integer","enum":[1,2,3,4]},"SOP":{"type":"string"},"sop_upload":{"type":"boolean"},"ic_assignments":{"type":"string"},"timer":{"type":"integer","nullable":true},"buffer":{"type":"integer"},"isTrafficStop":{"type":"boolean"},"captureVehicle":{"type":"boolean"},"mentalWeight":{"type":"integer"},"defaultOnScene":{"type":"boolean"},"noSelfInitiate":{"type":"boolean"},"blotter":{"type":"boolean","default":true},"callerInform":{"type":"boolean","default":true}},"example":{"type":"Welfare Check","shortcut":"WC","priority":3,"blotter":true,"callerInform":true}},"UpdateCallTypeRequest":{"type":"object","description":"Partial update — send only the fields to change. Same rules as create (unique type/shortcut, priority 1-4).","properties":{"type":{"type":"string"},"shortcut":{"type":"string"},"priority":{"type":"integer","enum":[1,2,3,4]},"SOP":{"type":"string"},"sop_upload":{"type":"boolean"},"ic_assignments":{"type":"string"},"timer":{"type":"integer","nullable":true},"buffer":{"type":"integer"},"isTrafficStop":{"type":"boolean"},"captureVehicle":{"type":"boolean"},"mentalWeight":{"type":"integer"},"defaultOnScene":{"type":"boolean"},"noSelfInitiate":{"type":"boolean"},"blotter":{"type":"boolean"},"callerInform":{"type":"boolean"}},"example":{"priority":1,"isTrafficStop":false}},"CallTypeDeleteResponse":{"type":"object","properties":{"ok":{"type":"boolean"},"id":{"type":"integer"},"removed":{"type":"boolean"}}},"MutationResponse":{"type":"object","properties":{"ok":{"type":"boolean"},"id":{"type":"integer"},"callID":{"type":"integer"},"tagId":{"type":"integer"},"personId":{"type":"integer"},"vehicleId":{"type":"integer"}}}}},"paths":{"/v1/health":{"get":{"tags":["Health"],"summary":"Health check","security":[],"responses":{"200":{"description":"Healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/v1/incidents":{"get":{"tags":["Incidents"],"summary":"List open incidents, or filter by timestamp range","description":"With no query parameters, returns all open incidents for the authenticated tenant\n(`isClosed = 0`), ordered newest first.\n\nWhen `from` and `field` are provided, returns every incident (open or closed)\nwhose indexed unix-seconds timestamp falls within the inclusive range\n`[from, to]`. If `to` is omitted, it defaults to the current server time.\nThe `field` parameter selects which column to filter on:\n  - `timestamp` — incident creation time\n  - `timestamp_closed` — incident close time\n\nEach item is the full incident object — identical in shape to\n`GET /v1/incidents/{lookup}` — including `alternate_incidents`, `comments`,\n`units`, `tags`, `persons`, `vehicles`, `cases`, and `dispositions`.\n","parameters":[{"name":"from","in":"query","required":false,"description":"Inclusive lower bound, unix timestamp in seconds. Required together with `field`.","schema":{"type":"integer","format":"int64"},"example":1745280000},{"name":"to","in":"query","required":false,"description":"Inclusive upper bound, unix timestamp in seconds. Defaults to the current server time if omitted.","schema":{"type":"integer","format":"int64"},"example":1745366400},{"name":"field","in":"query","required":false,"description":"Which timestamp column to filter against. Required when `from` is provided.","schema":{"type":"string","enum":["timestamp","timestamp_closed"]}}],"responses":{"200":{"description":"Array of incidents","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Incident"}}}}},"400":{"description":"Invalid or incomplete range parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Incidents"],"summary":"Create a new incident","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIncidentRequest"}}}},"responses":{"201":{"description":"Incident created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Incident"}}}},"400":{"description":"Validation or request error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/incidents/types":{"get":{"tags":["Call Types"],"summary":"List call types","responses":{"200":{"description":"Array of call types","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CallType"}}}}}}},"post":{"tags":["Call Types"],"summary":"Create a call type","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCallTypeRequest"}}}},"responses":{"201":{"description":"Call type created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallType"}}}},"400":{"description":"Validation error (missing/duplicate type or shortcut, or priority not 1-4)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/incidents/types/{id}":{"get":{"tags":["Call Types"],"summary":"Get a call type","parameters":[{"$ref":"#/components/parameters/CallTypeIdParam"}],"responses":{"200":{"description":"Call type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallType"}}}},"404":{"description":"Call type not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"put":{"tags":["Call Types"],"summary":"Update a call type","parameters":[{"$ref":"#/components/parameters/CallTypeIdParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCallTypeRequest"}}}},"responses":{"200":{"description":"Updated call type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallType"}}}},"400":{"description":"Validation error (duplicate type or shortcut, or priority not 1-4)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Call type not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Call Types"],"summary":"Remove a call type","description":"Marks the call type as removed by renaming its tenant code to \"REMOVED - {code}\"\n(the DB user has no DELETE grant and callTypes has no isDeleted column). The row\nstops appearing for the tenant and its type/shortcut become reusable. Existing\nincidents store the type as text and are unaffected.\n","parameters":[{"$ref":"#/components/parameters/CallTypeIdParam"}],"responses":{"200":{"description":"Call type removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallTypeDeleteResponse"}}}}}}},"/v1/incidents/{lookup}":{"get":{"tags":["Incidents"],"summary":"Get incident by global ID or incident number","parameters":[{"$ref":"#/components/parameters/LookupParam"}],"responses":{"200":{"description":"Incident","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Incident"}}}},"404":{"description":"Incident not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/incidents/{lookup}/comments":{"post":{"tags":["Comments"],"summary":"Create an incident comment","parameters":[{"$ref":"#/components/parameters/LookupParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddCommentRequest"}}}},"responses":{"201":{"description":"Comment created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Comment"}}}}}}},"/v1/incidents/{lookup}/comments/{commentId}":{"put":{"tags":["Comments"],"summary":"Update an incident comment","parameters":[{"$ref":"#/components/parameters/LookupParam"},{"$ref":"#/components/parameters/CommentIdParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommentRequest"}}}},"responses":{"200":{"description":"Comment updated","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer"},"callid":{"type":"integer"},"comment":{"type":"string"},"updated":{"type":"boolean"}}}}}}}}},"/v1/incidents/{lookup}/tags":{"post":{"tags":["Tags"],"summary":"Add a tag to an incident","parameters":[{"$ref":"#/components/parameters/LookupParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddTagRequest"}}}},"responses":{"200":{"description":"Tag added","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationResponse"}}}}}},"delete":{"tags":["Tags"],"summary":"Remove a tag from an incident","parameters":[{"$ref":"#/components/parameters/LookupParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveTagRequest"}}}},"responses":{"200":{"description":"Tag removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationResponse"}}}}}}},"/v1/persons":{"get":{"tags":["Search","Persons"],"summary":"Search persons","description":"Search the agency's person records and get back the full person record plus a\nlightweight list of every incident each person has been linked to.\n\nAt least one search parameter is required. `q` does a fuzzy substring match across\nfirst/middle/last name, alias, phone, and stateIDNumber. Explicit params (`firstName`,\n`lastName`, `dob`, etc.) are exact matches and AND together with `q`.\n\nEach result's `calls` array contains lightweight `CallSummary` objects — use\n`GET /v1/incidents/{id}` to fetch full incident details for any you care about.\n\nResults are capped at `limit` (default 50, max 200). `truncated: true` in the\nresponse means there may be more matches; narrow the search to see them.\n","parameters":[{"name":"q","in":"query","required":false,"description":"Fuzzy substring match across firstName, middleName, lastName, alias, phone, and stateIDNumber.","schema":{"type":"string"}},{"name":"firstName","in":"query","required":false,"schema":{"type":"string"}},{"name":"lastName","in":"query","required":false,"schema":{"type":"string"}},{"name":"dob","in":"query","required":false,"schema":{"type":"string"}},{"name":"phone","in":"query","required":false,"schema":{"type":"string"}},{"name":"stateIDNumber","in":"query","required":false,"schema":{"type":"string"}},{"name":"sex","in":"query","required":false,"schema":{"type":"string"}},{"name":"race","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Max results to return. Default 50, max 200.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonSearchResponse"}}}},"400":{"description":"No search parameters provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/vehicles":{"get":{"tags":["Search","Vehicles"],"summary":"Search vehicles","description":"Search the agency's vehicle records and get back the full vehicle record plus a\nlightweight list of every incident each vehicle has been linked to.\n\nAt least one search parameter is required. `q` does a fuzzy substring match across\nlicense, vin, make, and model. Explicit params (`license`, `vin`, `make`, `model`,\n`year`, etc.) are exact matches and AND together with `q`.\n\nEach result's `calls` array contains lightweight `CallSummary` objects — use\n`GET /v1/incidents/{id}` to fetch full incident details for any you care about.\n\nResults are capped at `limit` (default 50, max 200). `truncated: true` in the\nresponse means there may be more matches; narrow the search to see them.\n","parameters":[{"name":"q","in":"query","required":false,"description":"Fuzzy substring match across license, vin, make, and model.","schema":{"type":"string"}},{"name":"license","in":"query","required":false,"schema":{"type":"string"}},{"name":"vin","in":"query","required":false,"schema":{"type":"string"}},{"name":"make","in":"query","required":false,"schema":{"type":"string"}},{"name":"model","in":"query","required":false,"schema":{"type":"string"}},{"name":"color","in":"query","required":false,"schema":{"type":"string"}},{"name":"state","in":"query","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string"}},{"name":"year","in":"query","required":false,"schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Max results to return. Default 50, max 200.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VehicleSearchResponse"}}}},"400":{"description":"No search parameters provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/incidents/{lookup}/persons":{"post":{"tags":["Persons"],"summary":"Add or create-and-link a person on an incident","parameters":[{"$ref":"#/components/parameters/LookupParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddPersonRequest"}}}},"responses":{"201":{"description":"Person linked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationResponse"}}}}}},"delete":{"tags":["Persons"],"summary":"Remove a person from an incident","parameters":[{"$ref":"#/components/parameters/LookupParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemovePersonRequest"}}}},"responses":{"200":{"description":"Person removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationResponse"}}}}}}},"/v1/incidents/{lookup}/vehicles":{"post":{"tags":["Vehicles"],"summary":"Add or create-and-link a vehicle on an incident","parameters":[{"$ref":"#/components/parameters/LookupParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddVehicleRequest"}}}},"responses":{"201":{"description":"Vehicle linked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationResponse"}}}}}},"delete":{"tags":["Vehicles"],"summary":"Remove a vehicle from an incident","parameters":[{"$ref":"#/components/parameters/LookupParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveVehicleRequest"}}}},"responses":{"200":{"description":"Vehicle removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationResponse"}}}}}}},"/v1/incidents/{lookup}/dispositions":{"post":{"tags":["Dispositions"],"summary":"Add a disposition to an incident","description":"Resolve a disposition from the agency catalog by `disposition` (full name or\nshortname) or `dispositionId`, and attach it to the incident — optionally tied\nto a unit on the call via `unit` or `callUnitsID`. Omit the unit fields for a\ncall-level disposition.\n","parameters":[{"$ref":"#/components/parameters/LookupParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDispositionRequest"}}}},"responses":{"201":{"description":"Disposition created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DispositionResponse"}}}},"400":{"description":"Disposition not found in the catalog, or invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Incident not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Dispositions"],"summary":"Remove a disposition from an incident (by body)","description":"Soft-deletes the disposition (sets `isDeleted = 1`). Identify it by its\ncallDispositions row id in the request body.\n","parameters":[{"$ref":"#/components/parameters/LookupParam"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveDispositionRequest"}}}},"responses":{"200":{"description":"Disposition removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DispositionMutationResponse"}}}}}}},"/v1/incidents/{lookup}/dispositions/{dispositionId}":{"delete":{"tags":["Dispositions"],"summary":"Remove a disposition from an incident (by path)","description":"Soft-deletes the disposition (sets `isDeleted = 1`) identified by its\ncallDispositions row id in the path.\n","parameters":[{"$ref":"#/components/parameters/LookupParam"},{"$ref":"#/components/parameters/DispositionIdParam"}],"responses":{"200":{"description":"Disposition removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DispositionMutationResponse"}}}}}}},"/v1/units":{"get":{"tags":["Units"],"summary":"List units","description":"Read-only. Returns all units in the units table for the authenticated tenant,\neach with its resolved type and jurisdiction and its assigned vehicle (if any).\nAll filters are optional and AND together. tinyint columns are returned as booleans.\n","parameters":[{"name":"status","in":"query","required":false,"description":"Filter by status: 0 available, 1 busy, 2 unavailable/OOS. Text aliases accepted (available, busy, unavailable, oos).","schema":{"type":"string"}},{"name":"job","in":"query","required":false,"description":"Filter by job/department (e.g. Sheriff, Fire, Police, EMS). Exact, case-insensitive.","schema":{"type":"string"}},{"name":"type","in":"query","required":false,"description":"Filter by unit type — unitTypes id (numeric) or unitTypes name.","schema":{"type":"string"}},{"name":"unit","in":"query","required":false,"description":"Filter by unit callsign (units.unit), exact.","schema":{"type":"string"}},{"name":"isActive","in":"query","required":false,"description":"Filter by active flag (true/false).","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Array of units","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Unit"}}}}},"401":{"description":"Missing or invalid API credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/units/log":{"get":{"tags":["Units"],"summary":"List unit activity-log entries","description":"Returns unit activity-log (`unitsLog`) rows for the authenticated tenant.\nAll filters are optional and AND together. `timestamp` values are raw unix\nseconds (not timezone-adjusted).\n\nBecause the log table is very large, results are capped by `limit` (default\n100, max 500) and returned newest-first by default. Narrow with `unit`/`unitID`,\n`callID`, or a `from`/`to` range for best performance.\n","parameters":[{"name":"unit","in":"query","required":false,"description":"Filter by unit name (units.unit), case-insensitive exact match. An unknown name returns an empty list.","schema":{"type":"string"}},{"name":"unitID","in":"query","required":false,"description":"Filter by units.id. Alternative to `unit`.","schema":{"type":"integer"}},{"name":"callID","in":"query","required":false,"schema":{"type":"integer"}},{"name":"shiftID","in":"query","required":false,"schema":{"type":"integer"}},{"name":"from","in":"query","required":false,"description":"Inclusive lower bound, unix timestamp in seconds.","schema":{"type":"integer","format":"int64"}},{"name":"to","in":"query","required":false,"description":"Inclusive upper bound, unix timestamp in seconds.","schema":{"type":"integer","format":"int64"}},{"name":"sort","in":"query","required":false,"description":"Order by id. Defaults to desc (newest first).","schema":{"type":"string","enum":["asc","desc"],"default":"desc"}},{"name":"limit","in":"query","required":false,"description":"Max rows to return. Default 100, max 500.","schema":{"type":"integer","minimum":1,"maximum":500,"default":100}}],"responses":{"200":{"description":"Array of unit log entries","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UnitLogEntry"}}}}},"401":{"description":"Missing or invalid API credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Units"],"summary":"Append a unit activity-log entry","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUnitLogRequest"}}}},"responses":{"201":{"description":"Log entry created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnitLogResponse"}}}},"400":{"description":"Missing unit/log, or unit name not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}