# 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
}
```
