Geographic

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

Caller Profile Data

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

This service fetches any of the available data in the Caller Profile/Geographic page 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: 146
X-RateLimit-Reset: 1519671600
Content-Length: 394
Content-Type: application/json

{
  "US":{
    "AL":0,
    "AK":0,
    "AZ":0,
    "AR":0,
    "CA":0,
    "CO":0,
    "CT":0,
    "DC":0,
    "DE":0,
    "FL":0,
    "GA":0,
    "HI":0,
    "ID":0,
    "IL":0,
    "IN":0,
    "IA":0,
    "KS":0,
    "KY":0,
    "LA":0,
    "ME":0,
    "MD":0,
    "MA":0,
    "MI":0,
    "MN":0,
    "MS":0,
    "MO":0,
    "MT":0,
    "NE":0,
    "NV":0,
    "NH":0,
    "NJ":0,
    "NM":0,
    "NY":0,
    "NC":0,
    "ND":0,
    "OH":0,
    "OK":0,
    "OR":0,
    "PA":0,
    "RI":0,
    "SC":0,
    "SD":0,
    "TN":0,
    "TX":0,
    "UT":0,
    "VT":0,
    "VA":0,
    "WA":0,
    "WV":0,
    "WI":0,
    "WY":0,
    "US Toll-Free":1
  },
  "NON_US":[]
}

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 authenticate an account using PHP, but any language capable of integrating with a REST API works for this type of request:

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

// build the URL
$url = 'https://voicetrends.plumvoice.com/api/performance/'.$start.'/'.$end.'/'.$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