Skip to content

Update maximum segment size

Using this method you can change maximum segment size (number of subscribers) of a particular segment. 

Request data format

Request URL parameters:

ParameterTypeNotes
apiKeystringYour API key, required for authentication. Required.
SegmentIdstringIdentifier of segment. Required.
MaxSegmentSizeintMaximum segment size.
SegmentOrderstringSegment sort type. There are 3 options of sort:
Random – Random sorting 
SubscriptionDateAscending – Sort by date of subscriber addition (ascending) 
SubscriptionDateDescending – Sort by date of subscriber addition (descending)

Response 

Response Data element:

Element/attributeTypeNotes
MaxSegmentSizestringMaximum segment size.
SegmentOrderstringSegment sort type.

Examples

Request:

POST https://api.esv2.com/v2/Api/UpdateMaximumSegmentSize/ HTTP/1.1 
Accept-Encoding: gzip,deflate 
Content-Type: text/xml 
User-Agent: Jakarta Commons-HttpClient/3.1 
Host: api.esv2.com 
Content-Length: 715  

 <ApiRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <ApiKey>test_api_key1</ApiKey>
    <Data>
       <SegmentId>AddAndUpdate</SegmentId>
       <MaxSegmentSize>350</MaxSegmentSize>
       <SegmentOrder>Random</SegmentOrder>
    </Data>
 </ApiRequest>

OK response: 

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNetMvc-Version: 5.2
X-AspNet-Version: 4.0.30319
Set-Cookie: TEMP_DATA=2baf0f58-63a5-44bc-9673-988be8061978; path=/
X-Powered-By: ASP.NET
Date: Tue, 27 Jan 2017 13:37:40 GMT
Content-Length: 1259

<ApiResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Data>
     <MaxSegmentSize>350</MaxSegmentSize>
     <SegmentOrder>Random</SegmentOrder>
  </Data>
</ApiResponse>

Error response:

HTTP/1.1 400 Bad Request 
Cache-Control: private 
Content-Type: text/xml; charset=utf-8 
Server: Microsoft-IIS/7.5 
X-AspNetMvc-Version: 1.0 
X-AspNet-Version: 2.0.50727 
X-Powered-By: ASP.NET 
Date: Wed, 28 Oct 2009 11:32:07 GMT 
Content-Length: 239  

<ApiResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <ErrorMessage>
     <Code>400</Code> 
    <Message>SegmentOrder is required to set Max Segment Size</Message>
   </ErrorMessage>
</ApiResponse>
On this page
To top