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

« Previous Version 5 Next »

 

Overview

MailUpService API allows to create and delete geographic filters

FiltersCreateGeographicFilter

This method creates a new filter to be applied to recipients' geolocation of opens and clicks

Method parameters

ParameterDescriptionExample
Idalways set to zero 
IdListSpecify here MailUp list ID (or zero, if filter is applicable to all lists) 
NameFilter name 
DescriptionFilter description (free text) 
Category  
Conditions[ ]

Array of conditions (at list one). Each condition is composed of the following fields:

  • Id (always set to zero)
  • IdFilter (always set to zero)
  • LogicalOperation (allowed values: "None for the first condition, "Or" for the other conditions)
  • Type (allowed values: "UserIsLocatedIn" and "UserIsNotLocatedIn")
  • Country (country code)
  • Region (region name)
 

SOAP Examples

SOAP request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ifil="http://Mailup.WS/IFilterService">
<soapenv:Header/>
<soapenv:Body>
	<ifil:FiltersCreateGeographicFilter>
		<ifil:request>
			<ifil:AccessToken>ykpSh06dkwEv+Mrogyv4U59837ftsZUNRaAxODcpxYAni4VOKmxvoLzAIul5PIo89E1ecrUqUY59M=</ifil:AccessToken>
			<ifil:Filter>
				<ifil:Id>0</ifil:Id>
				<ifil:IdList>2</ifil:IdList>
				<ifil:Name>MailUp headquarters</ifil:Name>
				<ifil:Description>Recipients located near MailUp headquarters</ifil:Description>
				<ifil:Category>4</ifil:Category>
				<ifil:Conditions>
					<ifil:GeographicFilterCondition>
						<ifil:Id>0</ifil:Id>
						<ifil:IdFilter>0</ifil:IdFilter>
						<ifil:LogicalOperation>None</ifil:LogicalOperation>
						<ifil:Type>UserIsLocatedIn</ifil:Type>
						<ifil:Country>IT</ifil:Country>
						<ifil:Region>LOMBARDIA</ifil:Region>
					</ifil:GeographicFilterCondition>
					<ifil:GeographicFilterCondition>
						<ifil:Id>0</ifil:Id>
						<ifil:IdFilter>0</ifil:IdFilter>
						<ifil:LogicalOperation>Or</ifil:LogicalOperation>
						<ifil:Type>UserIsLocatedIn</ifil:Type>
						<ifil:Country>US</ifil:Country>
						<ifil:Region>CALIFORNIA</ifil:Region>
					</ifil:GeographicFilterCondition>
				</ifil:Conditions>
				<ifil:Precision>Low</ifil:Precision>
			</ifil:Filter>
		</ifil:request>
	</ifil:FiltersCreateGeographicFilter>
</soapenv:Body>
</soapenv:Envelope>
SOAP response
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <FiltersCreateGeographicFilterResponse xmlns="http://Mailup.WS/IFilterService">
         <FiltersCreateGeographicFilterResult>
            <Filter>
               <Id>57</Id>
               <IdList>2</IdList>
               <Name>MailUp headquarters</Name>
               <Description>Recipients located near MailUp headquarters</Description>
               <Category>4</Category>
               <Conditions>
                  <GeographicFilterCondition>
                     <Id>45</Id>
                     <IdFilter>57</IdFilter>
                     <LogicalOperation>None</LogicalOperation>
                     <Type>UserIsLocatedIn</Type>
                     <Country>IT</Country>
                     <Region>LOMBARDIA</Region>
                  </GeographicFilterCondition>
                  <GeographicFilterCondition>
                     <Id>46</Id>
                     <IdFilter>57</IdFilter>
                     <LogicalOperation>Or</LogicalOperation>
                     <Type>UserIsLocatedIn</Type>
                     <Country>US</Country>
                     <Region>CALIFORNIA</Region>
                  </GeographicFilterCondition>
               </Conditions>
               <Precision>Low</Precision>
            </Filter>
         </FiltersCreateGeographicFilterResult>
      </FiltersCreateGeographicFilterResponse>
   </s:Body>
</s:Envelope>

FiltersDeleteGeographicFilter

Method parameters

ParameterDescriptionExample
Token Access token, used for authentication 
IdFilterID of a previously created filter 

SOAP Example

SOAP request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ifil="http://Mailup.WS/IFilterService">
<soapenv:Header/>
<soapenv:Body>
	<ifil:FiltersDeleteGeographicFilter>
	<ifil:request>
		<ifil:AccessToken>5JTPq1MRiKnMa07AbT81qTjtravi3IFb6m9aVI6Nfw+dr+iYKMWDVS5D8byhzpy4aPOcaNawNfVnqa0=</ifil:AccessToken><ifil:IdFilter>57</ifil:IdFilter>
	</ifil:request>
	</ifil:FiltersDeleteGeographicFilter>
</soapenv:Body>
</soapenv:Envelope>
SOAP response
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <FiltersDeleteGeographicFilterResponse xmlns="http://Mailup.WS/IFilterService">
         <FiltersDeleteGeographicFilterResult/>
      </FiltersDeleteGeographicFilterResponse>
   </s:Body>
</s:Envelope>
  • No labels