This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »


Overview

The following operations allow you to work with subscribers. Click an operation name to see details on how to use it.

For a sample proxy service that illustrates how to work with subscribers, see Sample configuration

OperationDescription

getSubscriber

Retrieves the subscriber information.

listSubscribers

Retrieves the list of subscribers for a specific list and segment.

searchSubscriberSearches subscriber lists for a specific e-mail address..
subscribeSubscribes an e-mail address to one of the lists.
unsubscribeUnsubscribes an e-mail address from your lists.
updateSubscriberUpdates subscriber information.

Operation details

This section provides further details on the operations related to subscribers.

Retrieving the subscriber information

The getSubscriber operation retrieves the subscriber information.

getSubscriber
<sendloop.getSubscriber>
    <subscriberId>{$ctx:subscriberId}</subscriberId>
    <listId>{$ctx:listId}</listId>
	<emailAddress>{$ctx:emailAddress}</emailAddress>
</sendloop.getSubscriber>
Properties
  • subscriberId: Optional- The ID number of the target subscriber.
  • listId: Required - The ID of the target list to get subscribers.
  • emailAddress: Optional - The e-mail address of the subscriber.
   Sample request

Following is a sample REST/JSON request that can be handled by the getSubscriber operation.

Sample Request for getSubscriber
{
    "apiUrl": "https://b1baa4a-ae4d45.sendloop.com",
    "apiKey": "e470-fb56-ee1f-e561-ed5e-987d-0340-e119",
    "format": "json",
    "subscriberId": 2,
    "listId": 8,
    "emailAddress": "mayuranbro@gmail.com"
}
Related Sendloop documentation

https://sendloop.com/help/api-006/subscriber-management#subscriber_get

Retrieving the list of subscribers 

The listSubscribers operation retrieves the list of subscribers for a specific list and segment. 

listSubscribers
<sendloop.listSubscribers>
    <listId>{$ctx:listId}</listId>
    <segmentId>{$ctx:segmentId}</segmentId>
	<startIndex>{$ctx:startIndex}</startIndex>
</sendloop.listSubscribers>
Properties
  • listId: Required - The ID of the target list to get subscribers.
  • segmentId: Optional- The ID of the segment in the target list to get subscribers.
  • startIndex: Optional - Page index to get subscribers from. Each call returns 100 records. Default is 0.
   Sample request

Following is a sample REST/JSON request that can be handled by the listSubscribers operation.

Sample Request for listSubscribers
{
    "apiUrl": "https://b1baa4a-ae4d45.sendloop.com",
    "apiKey": "e470-fb56-ee1f-e561-ed5e-987d-0340-e119",
    "format": "json",
    "listId": 8,
    "segmentId": 234,
    "startIndex": 0
}
Related Sendloop documentation

https://sendloop.com/help/api-006/subscriber-management#subscriber_browse

Retrieving the list of e-mail campaigns

The listEmailCampaigns operation retrieves the list of e-mail campaigns you have in your Sendloop account. 

listEmailCampaigns
<sendloop.listEmailCampaigns>
    <ignoreDrafts>{$ctx:ignoreDrafts}</ignoreDrafts>
    <ignoreSending>{$ctx:ignoreSending}</ignoreSending>
    <ignorePaused>{$ctx:ignorePaused}</ignorePaused>
    <ignoreSent>{$ctx:ignoreSent}</ignoreSent>
    <ignoreFailed>{$ctx:ignoreFailed}</ignoreFailed>
	<ignoreApproval>{$ctx:ignoreApproval}</ignoreApproval>
</sendloop.listEmailCampaigns>
Properties
  • ignoreDrafts: Set this field to 1 if you want to exclude drafts. Otherwise, set to zero (0).
  • ignoreSending: Set this field to 1 if you want to exclude currently sending campaigns. Otherwise, set to zero (0).
  • ignorePaused: Set this field to 1 if you want to exclude paused campaigns. Otherwise, set to zero (0).
  • ignoreSent: Set this field to 1 if you want to exclude sent campaigns. Otherwise, set to zero (0).
  • ignoreFailed: Set this field to 1 if you want to exclude failed campaigns. Otherwise, set to zero (0).
  • ignoreApproval: Set this field to 1 if you want to exclude approval pending campaigns. Otherwise, set to zero (0).
   Sample request

Following is a sample REST/JSON request that can be handled by the listEmailCampaigns operation.

Sample Request for listEmailCampaigns
{
    "apiUrl": "https://b1baa4a-ae4d45.sendloop.com",
    "apiKey": "e470-fb56-ee1f-e561-ed5e-987d-0340-e119",
    "format": "json",
    "ignoreDrafts": 0,
    "ignoreSending": 0,
    "ignorePaused": 0,
    "ignoreSent": 0,
    "ignoreFailed": 0,
    "ignoreApproval": 0
}
Related Sendloop documentation

https://sendloop.com/help/api-004/email-campaign-management#campaign_getlist

Searching subscriber lists for a specific e-mail address

The searchSubscriber operation searches subscriber lists for a specific e-mail address.

searchSubscriber
<sendloop.searchSubscriber>
	<emailAddress>{$ctx:emailAddress}</emailAddress>
</sendloop.searchSubscriber>
Properties
  • emailAddress: Required - Enter the exact or partial e-mail address you wish to make a search for.
   Sample request

Following is a sample REST/JSON request that can be handled by the searchSubscriber operation.

Sample Request for searchSubscriber
{
    "apiUrl": "https://b1baa4a-ae4d45.sendloop.com",
    "apiKey": "e470-fb56-ee1f-e561-ed5e-987d-0340-e119",
    "format": "json",
    "emailAddress": "testing123@gmail.com"
}
Related Sendloop documentation

https://sendloop.com/help/api-006/subscriber-management#subscriber_search

Subscribing an e-mail address to one of the lists

The subscribe operation subscribes an e-mail address to one of the lists.

subscribe
<sendloop.subscribe>
    <emailAddress>{$ctx:emailAddress}</emailAddress>
    <subscriberListId>{$ctx:subscriberListId}</subscriberListId>
    <subscriptionIp>{$ctx:subscriptionIp}</subscriptionIp>
	<fields>{$ctx:fields}</fields>
</sendloop.subscribe>
Properties
  • emailAddress: Required - The e-mail address which is going to be subscribed.
  • subscriberListId: Required - The ID of the target subscriber list.
  • subscriptionIp: Required - The IP address of the subscriber.
  • fields: If you are going to pass custom fields such as name or age, pass them in an array here.
   Sample request

Following is a sample REST/JSON request that can be handled by the subscribe operation.

Sample Request for subscribe
{
    "apiUrl": "https://b1baa4a-ae4d45.sendloop.com",
    "apiKey": "e470-fb56-ee1f-e561-ed5e-987d-0340-e119",
    "format": "json",
    "emailAddress": "homeanda@gmail.com",
    "subscriberListId": 8,
    "subscriptionIp": "192.36.59.68",
    "fields": [{
				"index":12,
				"value":"15f8e955fd54asfdf45s4f"
			},{
				"index":11,
				"value":"Harry"
			},{
				"index":10,
				"value":"Potter"
			}
		]
}
Related Sendloop documentation

https://sendloop.com/help/api-006/subscriber-management#subscriber_subscribe

Unsubscribes an e-mail address from your lists

The unsubscribe operation unsubscribes an e-mail address from your lists.

unsubscribe
<sendloop.unsubscribe>
    <emailAddress>{$ctx:emailAddress}</emailAddress>
    <listId>{$ctx:listId}</listId>
	<unsubscriptionIP>{$ctx:unsubscriptionIP}</unsubscriptionIP>
</sendloop.unsubscribe>
Properties
  • emailAddress: Required - Unsubscribe an e-mail address from your lists.
  • listId: The ID of the list from where to unsubscribe the e-mail address.
  • unsubscriptionIP: The IP of the machine from which the e-mail was unsubscribed.
   Sample request

Following is a sample REST/JSON request that can be handled by the unsubscribe operation.

Sample Request for unsubscribe
{
    "apiUrl": "https://b1baa4a-ae4d45.sendloop.com",
    "apiKey": "e470-fb56-ee1f-e561-ed5e-987d-0340-e119",
    "format": "json",
    "emailAddress": "sampler02@gmail.com",
    "listId": "789",
    "unsubscriptionIP": "192.168.39.65"
}
Related Sendloop documentation

https://sendloop.com/help/api-006/subscriber-management#subscriber_unsubscribe

Updates subscriber information

The updateSubscriber operation updates subscriber information.

updateSubscriber
<sendloop.updateSubscriber>
    <subscriberId>{$ctx:subscriberId}</subscriberId>
    <listId>{$ctx:listId}</listId>
    <emailAddress>{$ctx:emailAddress}</emailAddress>
	<fields>{$ctx:fields}</fields>
</sendloop.updateSubscriber>
Properties
  • subscriberId: Optional - The ID number of the target subscriber.
  • listId: Required - The ID of the target list to get subscribers.
  • emailAddress: The e-mail address of the subscriber.
  • fields: Custom fields to be updated. This parameter should be set as an array.
   Sample request

Following is a sample REST/JSON request that can be handled by the updateSubscriber operation.

Sample Request for updateSubscriber
{
    "apiUrl": "https://b1baa4a-ae4d45.sendloop.com",
    "apiKey": "e470-fb56-ee1f-e561-ed5e-987d-0340-e119",
    "format": "json",
    "subscriberId": 2,
    "listId": 8,
    "emailAddress": "mayuranbro@gmail.com",
    "fields": [{
				"index":12,
				"value":"1596357486245963258"
			},{
				"index":11,
				"value":"Mayuran"
			},{
				"index":10,
				"value":"Bro"
			}
		]
}
Related Sendloop documentation

https://sendloop.com/help/api-006/subscriber-management#subscriber_update

Sample configuration

Following is a sample proxy service that illustrates how to connect to Sendloop with the init operation and use the getSubscriber operation. The sample request for this proxy can be found in the getSubscriber sample request.

Sample Proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy name="sendloop_getSubscriber" startOnLoad="true" statistics="disable" trace="disable" transports="https,http" xmlns="http://ws.apache.org/ns/synapse">
   <target>
      <inSequence onError="faultHandlerSeq">
         <property name="apiUrl" expression="json-eval($.apiUrl)"/>
         <property name="apiKey" expression="json-eval($.apiKey)"/>
         <property name="format" expression="json-eval($.format)"/>
         <property name="subscriberId" expression="json-eval($.subscriberId)"/>
         <property name="listId" expression="json-eval($.listId)"/>
         <property name="emailAddress" expression="json-eval($.emailAddress)"/>
         <sendloop.init>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
            <apiKey>{$ctx:apiKey}</apiKey>
            <format>{$ctx:format}</format>
         </sendloop.init>
         <sendloop.getSubscriber>
            <subscriberId>{$ctx:subscriberId}</subscriberId>
            <listId>{$ctx:listId}</listId>
            <emailAddress>{$ctx:emailAddress}</emailAddress>
         </sendloop.getSubscriber>
         <respond/>
      </inSequence>
      <outSequence>
         <send/>
      </outSequence>
   </target>
   <description/>
</proxy>                  
  • No labels