/api/results

Retrieve project launch results collected via send requests.

Retrieve a list of results

Retrieve a list of results filtered via URL params.

URL Param

Type

Required

Notes

project_launch_guid

string

No

Pass to filter results by project launch

participant_guid

string

No

Pass to filter results by participant

limit

int

No

Max number of results to return

offset

int

No

Index of result list to start at

format

string

No

Data format to return. Supported values are json and csv

project_tag

string

No

Optional filter

question_tag

string

No

Optional filter

curl "https://platform.tillmobile.com/api/results?username=username&api_key=api_key"
<?php
// ## Example Dependencies
//
// - PHP >= 5.5.36
//
// - PHP cURL extension
//   * sudo apt-get install php-curl
//
// - Composer
//   * curl -sS https://getcomposer.org/installer | php
//
// ## Install Guzzle HTTP Client
// php composer.phar require guzzlehttp/guzzle

// Init Composer
require "vendor/autoload.php";

// Load Guzzle HTTP Client
use Guzzle\Http\Client;

// Your Till credentials
$till_username = "username";
$till_api_key = "api_key";

// The Till project_launch_guid returned by the /api/send/ request
$till_project_launch_guid = "project_launch_guid";

// Execute HTTP request
$client = new GuzzleHttp\Client();
try {

    $res = $client->request(
        "GET", 
        "https://platform.tillmobile.com/api/results?username=".$till_username."&api_key=".$till_api_key."&project_launch_guid=".$till_project_launch_guid,
        ["body" => json_encode($till_project)]
    );

    // Till HTTP response body
    echo $res->getBody();

} catch(Exception $e) {

    echo $e;

}
?>
{
  "meta": {
    "limit": 20,
    "next": "",
    "offset": 0,
    "previous": null,
    "total_count": 1
  },
  "objects": [{
    "created": "2016-11-28T22:23:02.098725",
    "guid": "0e483f1d-4yu9-4d1f-a640-18083331bf97",
    "participant_guid": "058d9a42-23de-486e-9020-274316d14cd8",
    "participant_phone_number": "+15558675309",
    "project_launch_guid": "30b03ffc-desg-4b68-beda-a79b83289c54",
    "project_launch_participant_guid": "2fc977dd-4a46-4448-df23-45e32599d66b",
    "project_tag": "example_tag",
    "question_display_order": "0",
    "question_guid": "e39f144f-f6e9-4127-vf67-b60d6a11ff05",
    "question_tag": "favorite_color",
    "question_text": "What is your favorite color?",
    "result_answer": "1",
    "result_guid": "0e483f1d-4f9d-4d1f-dd11-18083331bf97",
    "result_response": "Red",
    "result_timestamp": "2016-11-28T22:23:02.098725",
    "updated": "2016-11-28T22:23:02.098757"
  }
]}

Retrieve a single result

curl "https://platform.tillmobile.com/api/results/{result_guid}/?username=username&api_key=api_key"
<?php
// ## Example Dependencies
//
// - PHP >= 5.5.36
//
// - PHP cURL extension
//   * sudo apt-get install php-curl
//
// - Composer
//   * curl -sS https://getcomposer.org/installer | php
//
// ## Install Guzzle HTTP Client
// php composer.phar require guzzlehttp/guzzle

// Init Composer
require "vendor/autoload.php";

// Load Guzzle HTTP Client
use Guzzle\Http\Client;

// Your Till credentials
$till_username = "username";
$till_api_key = "api_key";

// The Till project_launch_guid returned by the /api/send/ request
$till_project_launch_guid = "project_launch_guid";

// The Till result_guid for a specific result
$till_result_guid = "result_guid";

// Execute HTTP request
$client = new GuzzleHttp\Client();
try {

    $res = $client->request(
        "GET", 
        "https://platform.tillmobile.com/api/results/".$till_result_guid."/?username=".$till_username."&api_key=".$till_api_key."&project_launch_guid=".$till_project_launch_guid,
        ["body" => json_encode($till_project)]
    );

    // Till HTTP response body
    echo $res->getBody();

} catch(Exception $e) {

    echo $e;

}
?>
{
  "created": "2016-11-28T22:23:02.098725",
  "guid": "0e483f1d-4yu9-4d1f-a640-18083331bf97",
  "participant_guid": "058d9a42-23de-486e-9020-274316d14cd8",
  "participant_phone_number": "+15558675309",
  "project_launch_guid": "30b03ffc-desg-4b68-beda-a79b83289c54",
  "project_launch_participant_guid": "2fc977dd-4a46-4448-df23-45e32599d66b",
  "project_tag": "example_tag",
  "question_display_order": "0",
  "question_guid": "e39f144f-f6e9-4127-vf67-b60d6a11ff05",
  "question_tag": "favorite_color",
  "question_text": "What is your favorite color?",
  "result_answer": "1",
  "result_guid": "0e483f1d-4f9d-4d1f-dd11-18083331bf97",
  "result_response": "Red",
  "result_timestamp": "2016-11-28T22:23:02.098725",
  "updated": "2016-11-28T22:23:02.098757"
}