> For the complete documentation index, see [llms.txt](https://developers.airship.co.uk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.airship.co.uk/basics/contacts/append-wifi-data.md).

# Append WiFi data

### Overview

Airship can store WIFI interaction history for each contact.

Having WIFI data attached to contacts is useful to measure and target recent or lapsed visitors based on their last visit.

### Storing WIFI interactions

To store WIFI interactions, simply append a `wifi_interactions` object to your contact as you send it to us.

| Value              | Notes                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `datetime`         | <p>The date / time of the WIFI interaction<br><br><em>Required field</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `unit_id`          | <p>The unit\_id representing the physical location for which this WIFI interaction relates<br><br><em>Required field</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `type`             | <p><strong>detected -</strong> This interaction type should be used when a user's device passively connects to the WiFi hotspot. <br></p><p><strong>connected</strong> - This interaction type should be used once a user proactively views your captive portal. <br><br><strong>authenticated</strong> - This interaction type should be used once a user has provided the information required by the captive portal to connect to the Internet via your WiFi service. <br><br><strong>unknown -</strong> If your platform doesn't support the above connection types, use the unknown type<br><br><em>Required field</em></p> |
| `hotspot_name`     | <p>Text description of where the connection was made (i.e. Upstairs Bar)</p><p></p><p><em>Optional</em> </p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `mac_address`      | <p>Unique device reference <br><br><em>Optional</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `device_mime_type` | <p>Text description for the source of the WIFI interaction<br><br><em>Required Field</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |

### Example Payload

```json
{
"account_id": 3,
"email": "johnsmith@gmail.com",
//...etc...

    "wifi_interactions" :[
        {
            "datetime":"2022-01-01 12:00:00",
            "unit_id": "4",
            "type": "authenticated",
            "hotspot_name": "Bar 01",
            "mac_address": "01:A1:C1:11:C1:11",
            "device_mime_type": "Airship Splash page"
        }
    ]
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://developers.airship.co.uk/basics/contacts/append-wifi-data.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
