Developer Network

API Reference: Chart.ListActivity

Provides the subscriber list activity in a timeframe such as subscriptions and unsubscriptions.

Input Parameters

Following parameters are required by this command:

  • APIKey
    Your user account API key. You can learn your API key in your Sendloop area > Manage Account section
  • Command
    For subscribing an email address, you should set this parameter to 'Chart.ListActivity'
  • ListID ID number of the target subscriber list. List ID can be gathered from Lists > List Overview > List Settings section
  • Start
    Date to start from. Date format is YYYY-MM-DD
  • Days
    Days to go ahead from start date

Output

Sendloop will return some information about the request status. Sendloop always return in XML-RPC format. Below, you can see the list of all available codes and messages which can be returned by this command:

Error Codes and Messages:

One of the following error messages will be returned if any error occurs:

  • #1
    Connection type is not compatible
  • #2
    Invalid API key or user account is not available

Success Message

Success message will be XML string as displayed in example below.

Examples

We provided examples in all three accepted messaging formats. Bold texts means data that needs to be replaced by you.

HTTP-POST Example

Input:

POST /api/index.php HTTP/1.1
Host: yoursubdomain.sendloop.com
Content-Type: application/x-www-form-urlencoded

FormValue_APIKey=YourAPIKeyHere&FormValue_Command=Chart.ListActivity&
FormValue_ListID=10&FormValue_Start=2007-11-01&FormValue_Days=5

HTTP-GET Example

Even this command accepts HTTP-GET method, we strongly recommend you to use HTTP-POST or XML-RPC methods

GET /api/index.php?APIKey=YourAPIKeyHere&Command=Chart.ListActivity&ListID=10&
Start=2007-11-01&Days=5 HTTP/1.1 Host: yoursubdomain.sendloop.com

XML-RPC Example

To connect Sendloop API through XML-RPC messaging format, you will need to pass XML-RPC code via HTTP-POST or HTTP-GET method:

XML-RPC connection via HTTP-POST:

POST /api/index.php HTTP/1.1
Host: yoursubdomain.sendloop.com
Content-Type: application/x-www-form-urlencoded

FormValue_Message=<<<The following XML structure must be inserted here with URL
encoded structure>>> <Entry>  <Message>   <APIKey>YourAPIKeyHere</APIKey>   <Command>Media.Browse</Command>   <ListID>10</ListID>   <Start>2007-11-01</Start>   <Days>5</Days>  </Message> </Entry>

XML-RPC connection via HTTP-GET:

GET /api/index.php?FormValue_Message=<<<The following XML structure must be
inserted here with URL encoded structure>>> HTTP/1.1 Host: yoursubdomain.sendloop.com <Entry>  <Message>   <APIKey>YourAPIKeyHere</APIKey>   <Command>Media.Browse</Command>   <ListID>10</ListID>   <Start>2007-11-01</Start>   <Days>5</Days>  </Message> </Entry>

Error Output Example

<value>
 <struct>
  <member>
   <name>APIError</name>
   <value><string>Invalid API key or user account
     is not available</string></value>
  </member>
  <member>
   <name>APIErrorCode</name>
   <value><string>2</string></value>
  </member>
 </struct>
</value>

Success Output Example

<?xml version="1.0"?>
<data>
	<tooltip show="true"/>
	<xaxis showlabel="false" showgridlines="true">
		<xaxislabel value="1"/>
		<xaxislabel value="2"/>
		<xaxislabel value="3"/>
		<xaxislabel value="4"/>
		<xaxislabel value="5"/>
	</xaxis>
	<yaxis steps="2" showlabel="true" showgridlines="true"/>
	<series demo="true" demotext="EXAMPLE DATA" demotextsize="36">
		<set label="Subscription" color="0x57b8ef">
			<serie value="3">
				<tooltip><![CDATA[<b>December 20, 2007</b><br>3
subscriptions]]></tooltip> </serie> <serie value="4"> <tooltip><![CDATA[<b>December 21, 2007</b><br>4
subscriptions]]></tooltip> </serie> <serie value="3"> <tooltip><![CDATA[<b>December 22, 2007</b><br>3
subscriptions]]></tooltip> </serie> <serie value="4"> <tooltip><![CDATA[<b>December 23, 2007</b><br>4
subscriptions]]></tooltip> </serie> <serie value="8"> <tooltip><![CDATA[<b>December 24, 2007</b><br>8
subscriptions]]></tooltip> </serie> </set> <set label="Unsubscription" color="0xFBC38F"> <serie value="1"> <tooltip><![CDATA[<b>December 20, 2007</b><br>1
unsubscriptions]]></tooltip> </serie> <serie value="7"> <tooltip><![CDATA[<b>December 21, 2007</b><br>7
unsubscriptions]]></tooltip> </serie> <serie value="0"> <tooltip><![CDATA[<b>December 22, 2007</b><br>0
unsubscriptions]]></tooltip> </serie> <serie value="4"> <tooltip><![CDATA[<b>December 23, 2007</b><br>4
unsubscriptions]]></tooltip> </serie> <serie value="12"> <tooltip><![CDATA[<b>December 24, 2007</b><br>12
unsubscriptions]]></tooltip> </serie> </set> </series> </data>

API Reference

Campaign Functions

Subscriber List Functions

Subscriber Custom Field Functions

Subscriber List Segment Functions

Subscriber List Integration Functions

Subscriber Functions

Report Functions

Media Library Functions

Chart Functions