# Units

From the API, you are able to obtain a list of current active Units (venues / locations).&#x20;

The API user is linked to an Airship account, and all the units associated to that account will be returned, paginated in the response.

### **Endpoint**

{% tabs %}
{% tab title="GET" %}

```
https://api.airship.co.uk/v1/account/units
```

{% endtab %}
{% endtabs %}

### Response

**Fields**

<table><thead><tr><th width="139">Field</th><th>Notes</th></tr></thead><tbody><tr><td><pre><code>id
</code></pre></td><td>Airships unique unit ID for the unit. It is required when sending Airship data</td></tr><tr><td><pre><code>name
</code></pre></td><td>The unit name</td></tr><tr><td><pre><code>is_root
</code></pre></td><td>Each Airship account has a 'root' account (typically named Head Office) - this is used for data that can't be associated with a specific location. Only 1 root account can be setup for each account, and is identified by this flag</td></tr></tbody></table>

#### Example response

```json
{
    "current_page": 1,
    "data": [
        {
            "id": 13822,
            "name": "Head Office",
            "is_root": true
        },
        {
            "id": 13835,
            "name": "The shack",
            "is_root": false
        }
    ],
    "first_page_url": "https://api.airship.co.uk/v1/account/units?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https://api.airship.co.uk/v1/account/units?page=1",
    "next_page_url": null,
    "path": "https://api.airship.co.uk/v1/account/units",
    "per_page": 100,
    "prev_page_url": null,
    "to": 2,
    "total": 2
}
```


---

# 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://developers.airship.co.uk/basics/units.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.
