available, ranked from best to worst match for the incident. The score combines how close each team is, what it can handle (vertical, event type, operational equipment), how many of its members are available and whether the incident falls inside the boundary of the team’s zone (a team whose zone boundary does not contain the incident ranks lower, but is not excluded). Nothing is dispatched: use the result to choose a team, then call Dispatch a team.
With event_id, the ranking follows the event’s type in your catalog: the candidates are the teams with members that cover the type (tier 1) or its whole category (tier 2), the type’s required_equipment counts in the score and is reported per team as missing_equipment, and the other teams of the vertical come back in excluded with a reason. This is how the dashboard ranks teams. A team without members is never a candidate in either mode.
Authentication
Session token (Authorization: Bearer <token>) with the dispatch:assign permission. Tenant roles with it: company_admin, operational_supervisor, corporate_client.
Body
event_id of an event of your tenant. When its type is in your catalog, the ranking is by coverage (see above) and vertical, event_type and required_equipment are taken from the type. Otherwise the plain ranking below applies.Event type of the incident. Teams whose vertical settings list it rank higher.
Codes of your equipment list the incident needs, lowercase (for example
defibrillator). Only equipment with status operational counts.Example
Response 200
Estimated distance from the team to the incident, in kilometres.
0 when the team position is unknown.From
0 to 1. With required_equipment, the share of those codes the team has operational. Without it, a neutral value that is higher when the team has any operational equipment.Position used for the team:
lat, lng, source and, when known, last_seen. source is gps (a member’s reported location), zone (centre of the team’s home zone) or unknown.With
event_id only: 1 when the team covers the type, 2 when it covers the whole category. Tier 1 teams come first.Teams left out, each with
team_id, team_name and reason: no_members (nobody would receive the mission) or, with event_id, no_coverage (the team covers neither the type nor its category).true when the ranking followed the event’s type. Then event_type (code) and required_equipment (codes) are also returned.Errors
SDKs
scoreTeams in JavaScript, score_teams in Python.