GetFeedback Reporting API

For questions please email help@getfeedback.com.

Overview

The GetFeedback Reporting API is simple, modern, RESTful, and JSON-based. All API access is over HTTPS to the api.getfeedback.com domain. Appropriate HTTP verbs are used to manipulate resources.

Authentication

API bearer tokens should be sent in an HTTP Authorization header. Follow the RFC 6750 spec section 2.1 (http://tools.ietf.org/html/rfc6750). For example:

Authorization: Bearer mF_9.B5f-4.1JqM

Errors

Standard HTTP error codes are used to signal success and errors:

200 OK: Request was successful and a representation is included in the body.

204 No Content: Request was successful. No body is returned.

400 Bad Request: There was an issue parsing your request. Check the JSON.

422 Unprocessable Entity: The request made an invalid state change or didn’t pass application-level validation. Check the errors returned in the body.

Representation

All dates or timestamps are returned and expected as ISO 8601 strings.

The Accept HTTP header must always be sent to signify the correct resource representation. At this time only application/json is supported.

Resources

Response

A response object represents a single survey taker experience. It holds a collection of answers to every question in the survey. It also includes metadata about the taker collected by the GetFeedback system.

GET /surveys/:survey_id/responses

Responses are returned in descending timestamp order by created_at.

Parameters

since: Timestamp from which to return responses. If set with an ISO 8601 datestamp, responses are returned in ascending timestamp ordered by the since_field (see below). If not set or an incorrect format is passed, returns responses in descending timestamp order by created_at.

since_field: If using since, date on responses to compare to. Can be created_at, updated_at, or completed_at. When set to completed_at, status is filtered to only completed responses. Defaults to created_at.

until: If using since, timestamp to which to return responses. If set with an ISO 8601 datestamp, it will be the endcap date to the since param.

status: Can be set to started or completed and then only responses in that state will be returned. If not set, returns all responses.

per_page: Responses to return per page. Defaults to 30. Maximum 100.

page: Page number when paging through responses. Note there is no server cursor state.

Response

Sample JSON response object:

{
  "active_models": [
    {
      "id": 525,
      "token": "cTmIyeFWNwqTJcZbEpHYmA",
      "status": "completed",
      "created_at": "2014-03-17T17:22:10.055-07:00",
      "updated_at": "2014-03-17T17:22:36.041-07:00",
      "merge_map": {
        "xid": "xxxxxxxxxxxxxxxxxx"
      },
      "answers": [
        {
          "id": 509,
          "type": "MultipleChoiceAnswer",
          "component_id": 73,
          "created_at": "2014-03-17T17:22:35.906-07:00",
          "choices": [
            {
              "id": 52,
              "text": "Yes",
              "is_other": false
            }
          ]
        },
        {
          "id": 507,
          "type": "RatingAnswer",
          "component_id": 92,
          "created_at": "2014-03-17T17:22:34.097-07:00",
          "number": 4,
          "scale": 5
        }
      ],
    },
    { },
    ...
  ]
}

Definitions

merge_map: Parameters that were appended to the URL when the taker opened the survey.

component_id: Identifier for the survey question the answer represents.