# Unit Login

### EVENT\_UNIT\_LOGIN

```javascript
{
    "key": "YOUR_API_KEY", // Authenticate legitimate event traffic
    "type": "EVENT_UNIT_LOGIN",
    "data": [
        {
            "unit":
            {
                "id": -1,
                "accId": "123-456-7890", // Account UUID
                "status": 0, // See UNIT_STATUS Enum
                "isPanic": false, // PANIC State
                "location": "1234 E. Test Ave",
                "aop": "South District",
                "data": {
                     "apiIds": [
                         "STEAM:1234", // API ID - Typically Steam Hex
                     ],
                     "unitNum": "A-10",
                     "name": "Brian Sosnowski",
                     "district": "Maricopa County",
                     "department": "MCSO",
                     "subdivision": "Speed Enforcement",
                     "rank": "CPT",
                     "group": "CAR 51", // Name of unit group
                     "page": 0 // Police
                }
            },
            "isDispatch": false,
            "selfDispatch": false
        }
    ]
}
```

### Enumeration Values

#### Unit Status

Sonoran CAD uses integer enumeration values for the unit `STATUS` field. See the tables below for more information. These values reflect the default [unit status](/cad/tutorials/customization/unit-status-codes.md) options.

| Integer (Enumeration) Value | Status Description |
| --------------------------- | ------------------ |
| 0                           | UNAVAILABLE        |
| 1                           | BUSY               |
| 2                           | AVAILABLE          |
| 3                           | ENROUTE            |
| 4                           | ON\_SCENE          |

#### Unit Page

The unit's `data.page` property reflects what page in the CAD the unit is viewing.

| Integer (Enumeration) Value | Description |
| --------------------------- | ----------- |
| 0                           | POLICE      |
| 1                           | FIRE        |
| 2                           | EMS         |
| 3                           | DISPATCH    |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sonoransoftware.com/cad/api-integration/push-events/unit-events/unit-login.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
