> 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-feedback.md).

# Append feedback

### Overview

Airship can store full feedback history for contact records. This is useful to show the sentiment of a particular guest, and can be used in campaigns whereby a broadcast could be suppressed if someone has left feedback recently (for example if you don't want to ask someone for feedback about a recent visit if they've already done so).

### Storing feedback

To store feedback, simply include a feedback object as you write a contact to us. We'll store a historic feedback record against the contact.

| Field       | Notes                                                                                                                                                                                                                                                                                                                                                                                     |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `type_id`   | <p>1 = positive</p><p>2 = negative</p><p>3 = neutral</p><p>4 = unknown</p><p></p><p>You can also retrieve feedback types from the <code>/feedback/types</code> endpoint.</p>                                                                                                                                                                                                              |
| `source_id` | <p>1 = website</p><p>2 = facebook</p><p>3 = tablet</p><p>4 = email</p><p>5 = twitter</p>                                                                                                                                                                                                                                                                                                  |
| `unit_id`   | The unit\_id representing the physical location for which this feedback relates.                                                                                                                                                                                                                                                                                                          |
| `comments`  | Pass in a `type` to tag comment types together (e.g. "Toilets", "Service" etc) along with a text string for this comment.                                                                                                                                                                                                                                                                 |
| `ratings`   | <p>Pass in a ratings <code>category\_id</code> along with a value for this rating in the <code>rating\_text</code> field, and an optional <code>contact\_note</code>..</p><p></p><p>You can retrieve a list of categories from the <code>/feedback/categories</code> endpoint. However, commonly used ones are:</p><p></p><p>1 - Food</p><p>2 - Drink</p><p>3 - Service</p><p>4 - NPS</p> |

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

"feedback": [
    {
      "type_id": 1, // positive
      "source_id": 1, // website
      "unit_id": 8775,
      "comments": [
        {
          "type": "Toilets",
          "note": "Recently cleared and sparkling!"
        },
        {
          "type": "Other Comments",
          "note": "Had a great time, will definitely return!"
        }
      ],
      "ratings": [
        {
          "category_id": 1, // Food
          "rating_text": "Excellent",
          "contact_note": "Food was super tasty."
        },
        {
          "category_id": 2, // Drink
          "rating_text": "Good",
          "contact_note": "Drinks were great, if a little expensive."
        },
        {
          "category_id": 3, // Service
          "rating_text": "Poor",
          "contact_note": "We had to wait 15 minutes to pay at the end."
        },
        {
          "category_id": 4, // NPS
          "rating_text": "8",
          "contact_note": "Would definitely recommend to a friend"
        }
      ]
    }
  ]
```


---

# 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-feedback.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.
