Hanzo AI
OpenapiPatrol

Create alarm

Takes one activation. It records the activation whatever happens, then matches a site — the one the caller named, else the one whose account number…

POST /v1/patrol/alarm

Addresshttps://api.hanzo.ai/v1/patrol/alarm
MethodPOST
Operationpost_patrol_alarm
AuthAuthorization: Bearer $HANZO_API_KEY

Takes one activation. It records the activation whatever happens, then matches a site — the one the caller named, else the one whose account number reported — and on a match opens an incident in state received with that site's tier and SLA, puts the site into alarm, raises a red feed row and tells the controllers. An activation that matches no site is still recorded, raises an amber row, and answers 202: an activation is never dropped.

It admits the receiving centre's own credential and a controller keying one in by hand. The centre holds the centre role its tenant granted it, which posts an activation and reads nothing, like every other identity here.

The centre's own reference identifies the activation while the response it opened is still running, so a redelivery is answered with that response rather than dispatching a second unit. Centres recycle references, so once the response has closed the same one is the next activation.

Request

7 fields, body application/json (required).

FieldInTypeRequiredDescription
accountbodystringAccount is the alarm-panel account number that reported.
rawbodyanyRaw is the activation exactly as it arrived, kept verbatim up to 16 KiB.
refbodystringRef is the receiving centre's own reference for the activation.
sitebodystringSite names the site directly, by document name, when the caller already knows it.
sourcebodystringSource is which receiver or operator the activation came through.
triggerbodystringTrigger is what the panel reported.
zonebodystringZone is the panel zone that fired.

Response

StatusBodyMeaning
201patrol.patrolAlarmOutcreated
202patrol.patrolAlarmOutaccepted
defaultproblem-detailsrefused

201 body — 38 fields.

FieldInTypeAlwaysDescription
databodypatrol.patrolActivation
data.alarmbodystringAlarm is the recorded activation's document name.
data.incidentbodypatrol.patrolIncident
data.incident.checkedbodystringChecked is when the premises had been walked.
data.incident.clocksbodypatrol.patrolClock[]Clocks is the SLA clocks, present on a single-incident read.
data.incident.clocks[].elapsedbodyinteger (int64)Elapsed is the seconds run so far, or the seconds it took when settled.
data.incident.clocks[].labelbodystringLabel names the clock: Verify, Dispatch or On site.
data.incident.clocks[].settledbodyinteger (int64)Settled is the seconds it took, or -1 while the clock is still running.
data.incident.clocks[].targetbodyinteger (int64)Target is the contracted seconds.
data.incident.closedbodystringClosed is when the incident was closed.
data.incident.dispatchedbodystringDispatched is when a unit was assigned.
data.incident.enroutebodystringEnroute is when that unit started moving.
data.incident.escalatedbodystringEscalated is when it was escalated, or empty.
data.incident.falsebodybooleanFalse says the activation turned out to be nothing.
data.incident.filedbodystringFiled is when the report was written.
data.incident.namebodystringName is the incident's document name.
data.incident.onsitebodystringOnsite is when it arrived.
data.incident.openedbodystringOpened is when the activation landed.
data.incident.outcomebodystringOutcome is what it came to.
data.incident.refbodystringRef is the receiving centre's own reference.
data.incident.securedbodystringSecured is when the site was made safe.
data.incident.sitebodystringSite is where it is happening.
data.incident.slabodyinteger (int64)SLA is the contracted response time in minutes.
data.incident.statebodystringState is one of received, verified, dispatched, enroute, onsite, checked, secured, filed and closed.
data.incident.stepsbodypatrol.patrolAct[]Steps is the act trail, present on a single-incident read.
data.incident.steps[].actbodystringAct is the act performed.
data.incident.steps[].actorbodystringActor is who performed it.
data.incident.steps[].atbodystringAt is when it happened.
data.incident.steps[].detailbodystringDetail is what they wrote with it.
data.incident.steps[].frombodystringFrom is the state the incident left.
data.incident.steps[].tobodystringTo is the state it landed in.
data.incident.tierbodystringTier is the site's contracted service tier.
data.incident.triggerbodystringTrigger is what the panel reported.
data.incident.unitbodystringUnit is the call sign attending, or empty.
data.incident.verifiedbodystringVerified is when the activation was confirmed real.
data.incident.zonebodystringZone is the panel zone that reported.
data.matchedbodybooleanMatched says whether a site was found for it.
data.sitebodystringSite is the site it matched, or empty.

Failure carries the platform error shape — see Errors.

Examples

hanzo patrol alarm

Patrol API · All Hanzo APIs · Interactive reference

How is this guide?

On this page