inwise - email marketing and newsletter software company
 
inwise Top Background
Arrow on Service

Recipients Add Or Update
Footer

Recipients Add Or Update

Operation Name: operation Name
Description: description

All actions require a valid user name and password using authenticaion header.
Show a raw xml example including the authentication header.

Service url:https://api.inwise.com/InwiseWebServices.asmx

Adding a reference to inwise web services

User Name:
Password:  
operation name :Recipients_AddOrUpdate
email :
Groups ID
(separate with ',') :
fields values :
Field1:
Field2:
Field3:
Field4:
Field5:
Field6:
Field7:
Field8:
Field9:
Field10:
Field11:
Field12:
Field13:
Field14:
Field15:
Field16:
Field17:
Field18:
Field19:
Field20:
Field21:
Field22:
Field23:
Field24:
Field25:
Field26:
Field27:
Field28:
Field29:
Field30:
The service enables you to add a new recipient or update the details of an existing recipient. If the recipient already exists, the recipient will be removed from the previous groups and added to the new ones you send
The value returned by the operation indicates whether the recipient existed before the operation and an update was make, or the recipient is a new one.

Parameters:

  • String email
    The email of the recipient. This field is required and the email syntax must be valid.
  • Array groups
    The group for subscribing the recipient. This is array with the groups ids you want to add the recipient to. The values must be numerical and must be your groups.
    This field is optional.
  • InwiseWebServices.CustomFieldValue[] fields;
    An array with custom fields values for the recipient.
    The fields contain mapping of the recipient information to the local fields on our system.
    For example, if you have defined on our system that "field1" is the recipient first name, and you want to set the value for the new recipient, add a new CustomFieldValue with the LocalName set to "field1" and the FieldValue set to the recipient's first name.
    This field is optional and can set to null or 0 length array.

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 recipient's email
String email = "[email protected]";

//the groups to subscribe to
inwise.ArrayOfAnyType groups = new ArrayOfAnyType();
groups.anyType = new ArrayList<Object>();
groups.anyType.add(34);
groups.anyType.add(158);

//recipient custom fields
//the custom fields values
inwise.ArrayOfCustomFieldValue fields = new ArrayOfCustomFieldValue();
fields.customFieldValue = new ArrayList<CustomFieldValue>();

CustomFieldValue field1 = new CustomFieldValue();//string field
field1.setLocalName("field1");
field1.setFieldValue("my first name");
fields.customFieldValue.add(field1);

CustomFieldValue field23 = new CustomFieldValue();//date field
field23.setLocalName("field23");
field23.setFieldValue(new Date());
fields.customFieldValue.add(field23);

CustomFieldValue field28 = new CustomFieldValue();//int field
field28.setLocalName("field28");
field28.setFieldValue(30);
fields.customFieldValue.add(field28);


//call the operation
boolean existingRecipient = inwiseWebServicesSoap.recipientsAddOrUpdate(email,groups,fields);

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 recipient's email

        string email = "[email protected]";

 

        //the groups to subscribe to

        object[] groups = new object[2];

        groups[0]=342;

        groups[1]=9934;

 

        //recipient custom fields

        InwiseWebServices.CustomFieldValue[] fields = new InwiseWebServices.CustomFieldValue[3];

        fields[0] = new InwiseWebServices.CustomFieldValue();//string field

        fields[0].LocalName = "field1";

        fields[0].FieldValue = "tal";

 

        fields[1] = new InwiseWebServices.CustomFieldValue();//integer field

        fields[1].LocalName = "field28";

        fields[1].FieldValue = 30;

 

        fields[2] = new InwiseWebServices.CustomFieldValue();//date field

        fields[2].LocalName = "field22";

        fields[2].FieldValue = DateTime.Now.ToString("yyyy-MM-dd");

 

        //call the operation

        bool existingRecipient = ws.Recipients_AddOrUpdate(email, groups, fields);

VB Code:

   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 recipient's email

        Dim email As String = "[email protected]"

 

        'the groups to subscribe to

        Dim groups() As Object = New Object(2) {}

        groups(0) = 342

        groups(1) = 9934

 

        'recipient custom fields

        Dim fields() As InwiseWebServices.CustomFieldValue = New InwiseWebServices.CustomFieldValue(3) {}

        fields(0) = New InwiseWebServices.CustomFieldValue() 'string field

        fields(0).LocalName = "field1"

        fields(0).FieldValue = "tal"

 

        fields(1) = New InwiseWebServices.CustomFieldValue() 'integer field

        fields(1).LocalName = "field28"

        fields(1).FieldValue = 30

 

        fields(2) = New InwiseWebServices.CustomFieldValue() 'date field

        fields(2).LocalName = "field22"

        fields(2).FieldValue = DateTime.Now.ToString("yyyy-MM-dd")

 

        'call the operation

        Dim existingRecipient As Boolean = ws.Recipients_AddOrUpdate(email, groups, fields)




Home  |  About us  |  Products  |  Service  |  Partners  |  Forum  |  Email Marketing Terms  |  Support  |  Contact us
Terms & Conditions  |  Privacy Policy  |  Anti Spam Policy  |  Site Map
© 2008 inwise LTD. All rights reserved.