The service enables you to view a list of recipients for a group.
The operation returns an array of RecipientData with the recipient's id, email, registration date, last update date, a value indicating whether the recipient's email is valid, a value indicating whether the recipient has confirmed his/her regiration, an Array of CustomFieldValue with the custom fields values for the recipient.
The results count is limited to 25000
Parameters:
-
int groupid
The id of the group.
Java Code:
//get a reference to the service InwiseWebServices ws = new InwiseWebServices();
InwiseWebServicesSoap inwiseWebServicesSoap = ws.getInwiseWebServicesSoap();
//fill the security header
HeaderHandler hh = new HeaderHandler("myusername", "myPassword");
hh.setHeader(inwiseWebServicesSoap);
//the group id
int groupid = 299;
//call the operation
inwise.ArrayOfRecipientData recipients = inwiseWebServicesSoap.groupsGetRecipients(groupid);
Iterator<RecipientData> it= recipients.getRecipientData().iterator();
while (it.hasNext())
{
RecipientData recipient = it.next();
int recipientid=recipient.getId();//the id of the recipient
String email = recipient.getEmail();//the recipient's email
XMLGregorianCalendar registrationDate = recipient.getRegistrationDate();//the registration date of the recipient
XMLGregorianCalendar lastUpdateDate = recipient.getLastUpdateDate();//the last time the recipient's details have been update
boolean isValidEmail = recipient.isIsValidEmail();//a value indicating whether the syntax of the recipient's email is valid. Messages will not be sent to recipients with invalid email address.
boolean confirmedRegistration = recipient.isConfirmedRegistraion();//a value indicating whether the recipient has confirmed his/her registration.
inwise.ArrayOfCustomFieldValue customFields = recipient.getCustomFields();//the custom fields values for the recipient
Iterator<CustomFieldValue> fields=customFields.getCustomFieldValue().iterator();
while(fields.hasNext())
{
CustomFieldValue field = fields.next();
if (field == null) continue; //not all fields has values
String localName = field.getLocalName();//the local name of the fields on our system (field1,field3 etc.) This value will be equal for all the recipients
Object fieldValue = field.getFieldValue();//the value of the field
}
}
C# Code:
//get a reference to the service
InwiseWebServices.InwiseWebServices ws = new InwiseWebServices.InwiseWebServices();
//fill the security header
InwiseWebServices.SecHeader header = new InwiseWebServices.SecHeader();
header.username = "username";
header.pass = "myPassword";
ws.SecHeaderValue = header;//set credentials
//the group id
int groupid = 299;
//call the operation
InwiseWebServices.RecipientData[] recipients = ws.Groups_GetRecipients(groupid);
for (int i = 0; i < recipients.Length; i++)
{
InwiseWebServices.RecipientData recipient = recipients[i];
int recipientid=recipient.Id;//the id of the recipient
string email = recipient.Email;//the recipient's email
DateTime registrationDate = recipient.RegistrationDate;//the registration date of the recipient
DateTime lastUpdateDate = recipient.LastUpdateDate;//the last time the recipient's details have been update
bool isValidEmail = recipient.IsValidEmail;//a value indicating whether the syntax of the recipient's email is valid. Messages will not be sent to recipients with invalid email address.
bool confirmedRegistration = recipient.ConfirmedRegistraion;//a value indicating whether the recipient has confirmed his/her registration.
InwiseWebServices.CustomFieldValue[] customFields = recipient.CustomFields;//the custom fields values for the recipient
for (int j = 0; j < customFields.Length; j++)
{
InwiseWebServices.CustomFieldValue field = customFields[j];
if (field == null) continue; //not all fields has values
string localName = field.LocalName;//the local name of the fields on our system (field1,field3 etc.) This value will be equal for all the recipients
object fieldValue = field.FieldValue;//the value of the field
}
}
VB Code:
'get a reference to the service
Dim ws As InwiseWebServices.InwiseWebServices = New InwiseWebServices.InwiseWebServices()
'fill the security header
Dim header As InwiseWebServices.SecHeader = New InwiseWebServices.SecHeader()
header.username = "username"
header.pass = "myPassword"
ws.SecHeaderValue = header 'set credentials
'the group id
Dim groupid As Integer = 299
'call the operation
Dim recipients() As InwiseWebServices.RecipientData = ws.Groups_GetRecipients(groupid)
Dim i As Integer
For i = 0 To recipients.Length - 1 Step i + 1
Dim recipient As InwiseWebServices.RecipientData = recipients(i)
Dim recipientid As Integer = recipient.Id 'the id of the recipient
Dim email As String = recipient.Email 'the recipient's email
Dim registrationDate As DateTime = recipient.RegistrationDate 'the registration date of the recipient
Dim lastUpdateDate As DateTime = recipient.LastUpdateDate 'the last time the recipient's details have been update
Dim isValidEmail As Boolean = recipient.IsValidEmail 'a value indicating whether the syntax of the recipient's email is valid. Messages will not be sent to recipients with invalid email address.
Dim confirmedRegistration As Boolean = recipient.ConfirmedRegistraion 'a value indicating whether the recipient has confirmed his/her registration.
Dim customFields() As InwiseWebServices.CustomFieldValue = recipient.CustomFields 'the custom fields values for the recipient
Dim j As Integer
For j = 0 To customFields.Length - 1 Step j + 1
Dim field As InwiseWebServices.CustomFieldValue = customFields(j)
If field Is Nothing Then
End If
Dim localName As String = field.LocalName 'the local name of the fields on our system (field1,field3 etc.) This value will be equal for all the recipients
Dim fieldValue As Object = field.FieldValue 'the value of the field
Next
Next