Event Tracker

- NEW! - Interactive API docs, now live!

Visit api-docs.plumvoice.com to read Plum API documentation, build and test requests in our interactive API sandbox, review the responses, and share it all with your team.

Event Tracker

GET https://voicetrends.plumvoice.com/api/events/{start}/{end}/{period}/{phone}

This service fetches any of the available data in the Event Tracker section in VoiceTrends. To use this service, provide your temporary authentication credentials and several GET parameters, which function as filters for this data. This API is rate-limited in a group with all other raw data resources to 150 requests per 15-minute window.

Path Parameters

HTTP/1.1 200 OK
X-RateLimit-Limit: 150
X-RateLimit-Remaining: 149
X-RateLimit-Reset: 1519659900
Content-Length: 813
Content-Type: application/json

{
  "calls":{"1517461200":0,"1517547600":0,"1517634000":0,"1517720400":0,"1517806800":0,"1517893200":0,"1517979600":1,"1518066000":0},
  "log_events":{"1517461200":0,"1517547600":0,"1517634000":0,"1517720400":0,"1517806800":0,"1517893200":0,"1517979600":0,"1518066000":0},
  "loops_per_call":{"1517461200":0,"1517547600":0,"1517634000":0,"1517720400":0,"1517806800":0,"1517893200":0,"1517979600":0,"1518066000":0},
  "form_items":{"1517461200":0,"1517547600":0,"1517634000":0,"1517720400":0,"1517806800":0,"1517893200":0,"1517979600":0,"1518066000":0},
  "loops":{"1517461200":0,"1517547600":0,"1517634000":0,"1517720400":0,"1517806800":0,"1517893200":0,"1517979600":0,"1518066000":0},
  "average_form_items":{"1517461200":0,"1517547600":0,"1517634000":0,"1517720400":0,"1517806800":0,"1517893200":0,"1517979600":0,"1518066000":0}
}

Possible Response Codes

  • 200: success, data successfully returned.

  • 400: supplied data improperly formatted or invalid

  • 401: authentication parameters invalid or the account is inactive

  • 405: invalid HTTP method supplied (only POST allowed)

  • 429: rate limit exceeded

  • 500: unknown error

The return structure will contain the following item(s):

Sample Code

This sample code makes a request to fetch events data using PHP but any language capable of integrating with a REST API can be used:

<?php
// authentication and filter settings
$login = '<your_temporary_login>';
$password = '<your_temporary_password>';
$start = '<start_date>';
$end = '<end_date>';
$period = '<selected_period>';
$phone = '<selected_phone_number>';

// build the URL
$url = 'https://voicetrends.plumvoice.com/api/events/'.$start.'/'.$end.'/'.$period.'/'.$phone;

$ch = curl_init();
curl_setopt($ch, CURLOPT_USERPWD, $login.':'.$password);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/json"));
$result = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
var_dump($result);
var_dump($http_code);

Last updated