Short URL Analytics


URL:

https://api2.protexting.com/v1/shorturl/analytics?access_token=your_access_token&id=<id>


Method:

GET

Request parameters:

* required parameters

Parameter Description
id Integer, required
from_date Date
to_date Date

Response parameters:

Parameter Description
Id Integer
Title String
TotalClicks Integer
TotalSentMessages Integer
GroupCampaigns Object, see here »
TotalByState Object, see here »
TotalByCity Object, see here »

* List Group Campaign

Parameter Description
Campaign_Id Integer, see here »
TotalSentMessages Integer

* List Total By State

Parameter Description
State String
TotalClicks Integer

* List Total By City

Parameter Description
City String
TotalClicks Integer

Example Request:

curl -i -H "Accept:application/xml" "https://api2.protexting.com/v1/shorturl/analytics?access_token=your_access_token&id=1"

 

Example Response Headers:

 Status Code: 200 OK
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection: Keep-Alive
Content-Type: application/xml; charset=utf-8
Keep-Alive: timeout=5, max=100
Link: <https://api2.protexting.com/v1/shorturl/analytics?access_token=your_access_token&id=1&page=1>; rel=self
Pragma: no-cache
Transfer-Encoding: chunked
X-Pagination-Current-Page: 1
X-Pagination-Page-Count: 1
X-Pagination-Per-Page: 100
X-Pagination-Total-Count: 1
X-Powered-By: PHP/5.6.2
X-Rate-Limit-Limit: 60
X-Rate-Limit-Remaining: 59
X-Rate-Limit-Reset: 0

Example Response Body:

[
    {
        "Id": 1,
        "Title": "My Short URL",
        "TotalClicks": 1000,
"TotalSentMessages": 1500, "GroupCampaigns": [
{
"Campaign_Id": 100,
"TotalSentMessages": 1500
}
],
"TotalByState": [
{
"State": "Ohio",
"TotalClicks": 1000
}
],
"TotalByCity": [
{
"City": "Wooster",
"TotalClicks": 1000
}
], }, ..... ]
<response>
<item>
<Id>1</Id>
<Title>My Short URL</Title>
<TotalClicks>1000</TotalClicks>
<TotalSentMessages>1500</TotalSentMessages>
<GroupCampaigns>
<item>
<Campaign_Id>100</Campaign_Id>
<TotalSentMessages>1500</TotalSentMessages>
</item>
</GroupCampaigns>
<TotalByState>
<item>
<State>Ohio</State>
<TotalClicks>1500</TotalClicks>
</item>
</TotalByState>
<TotalByCity>
<item>
<City>Wooster</City>
<TotalClicks>1500</TotalClicks>
</item>
</TotalByCity>
</item>
...
</response>

HTTP Status Codes:

The standard HTTP Status Codes are used. More information is available here: http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml