GET {clientId}/export/Segment/{accessToken}?limit={limit}&offset={offset}&keepAlive={keepAlive}

Retrieve the data. You may iterate through multiple calls until all records are retrieved. The access token will expire automatically upon complete data retrieval. Set the keepAlive parameter to true to retrieve data beyond the initial retrieval. The default value is set to false, if not specified.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
clientId

PossibleNow ClientId

string

Required

accessToken

AccessToken to pull data for

integer

Required

limit

Specifies the maximum number of records to return

integer

None.

offset

Specifies 1 based starting point for the batch of records to retrieve

integer

None.

keepAlive

Optional, defaults to false. If specified and true, then DO NOT mark the data as retrieved when the last block of data has been retrieved.

boolean

Default value is False

Body Parameters

None.

Response Information

Resource Description

PreferenceResult
NameDescriptionTypeAdditional information
Count

The number of records in the current batch

integer

None.

HasMore

Indicates if there are additional records available for retrieval

boolean

None.

Limit

Specifies the maximum number of records to return. Defaults to 1000, if not specified

integer

None.

Offset

Used in conjunction with limit that specifies the starting point to retrieve the next batch of records. Defaults to 1, if not specified. For example, if your limit is 100 and you specify an offset of 100, the system returns records from 100 through 200.

integer

None.

TotalResults

The total number of records generated by the system for the export request.

integer

None.

Preferences

Collection of Preferences.

Collection of PreferenceWithOperation

None.

Response Formats

application/json, text/json

Sample:

{
    "Count": 1,
    “hasmore”:  false
    "limit": 1000,
    "offset": 1,
    "totalResults": 100

     "Preferences": [{
         “ProgramID”: “samplestring1”,
         “ChannelID”: “samplestring2”,
         "FilterID": "sample string 3",
         "CustomProperties" : [ ],
          "CID": "sample string 4",
         "Prefix": "sample string 5",
         "FirstName": "sample string 6",
         "MiddleName": "sample string 7",
         "LastName": "sample string 8",
         "Suffix": "sample string 9",
         "PreferenceType": “10”,
         "ContactElement": {
           "Email": "sample string 1",
           "PFT": "sample string 2",
           "Address1": "sample string 3",
           "Address2": "sample string 4",
           "City": "sample string 5",
           "StateProvince": "sample string 6",
           "CountryCode": "sample string 7",
           "PostalCode": "sample string 8"
         },
         "FrequencyID": "sample string 11",
         "PreferenceAttributes": [
           {
             "Key": "sample string 1",
             "Value": "sample string 2"
		   }
         ],
         "CustomerDate": "sample string 12",
         "MatchType": "sample string 13",
         "ReasonCode": "sample string 14",
         "ExpirationDate": "sample string 15",
         "LastModifiedDate": "sample string 16",
         "PreferenceStatus": "sample string 17",
         "SourceId": "sample string 18",
         "UserId”: "sample string 19" 
     }]
}

application/xml, text/xml

Sample:
<PreferenceResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/MyPreferences.Async.Models">
  <Count>1</Count>
  <HasMore>true</HasMore>
  <Limit>3</Limit>
  <Offset>4</Offset>
  <Preferences xmlns:d2p1="http://schemas.datacontract.org/2004/07/MyPreferences.REST.Models">
    <d2p1:PreferenceWithOperation>
      <d2p1:CID>sample string 4</d2p1:CID>
      <d2p1:ChannelID>sample string 2</d2p1:ChannelID>
      <d2p1:ContactElement>
        <d2p1:Address1>sample string 3</d2p1:Address1>
        <d2p1:Address2>sample string 4</d2p1:Address2>
        <d2p1:City>sample string 5</d2p1:City>
        <d2p1:CountryCode>sample string 7</d2p1:CountryCode>
        <d2p1:Email>sample string 1</d2p1:Email>
        <d2p1:PFT>sample string 2</d2p1:PFT>
        <d2p1:PostalCode>sample string 8</d2p1:PostalCode>
        <d2p1:StateProvince>sample string 6</d2p1:StateProvince>
      </d2p1:ContactElement>
      <d2p1:CustomProperties>
        <d2p1:Attribute>
          <d2p1:Key>sample string 1</d2p1:Key>
          <d2p1:Value>sample string 2</d2p1:Value>
        </d2p1:Attribute>
        <d2p1:Attribute>
          <d2p1:Key>sample string 1</d2p1:Key>
          <d2p1:Value>sample string 2</d2p1:Value>
        </d2p1:Attribute>
      </d2p1:CustomProperties>
      <d2p1:CustomerDate>sample string 12</d2p1:CustomerDate>
      <d2p1:ExpirationDate>sample string 15</d2p1:ExpirationDate>
      <d2p1:FilterID>sample string 3</d2p1:FilterID>
      <d2p1:FirstName>sample string 6</d2p1:FirstName>
      <d2p1:FrequencyID>sample string 11</d2p1:FrequencyID>
      <d2p1:IsDeactivated>sample string 26</d2p1:IsDeactivated>
      <d2p1:LastModifiedDate>sample string 16</d2p1:LastModifiedDate>
      <d2p1:LastName>sample string 8</d2p1:LastName>
      <d2p1:MatchType>sample string 13</d2p1:MatchType>
      <d2p1:MiddleName>sample string 7</d2p1:MiddleName>
      <d2p1:PreferenceAttributes>
        <d2p1:Attribute>
          <d2p1:Key>sample string 1</d2p1:Key>
          <d2p1:Value>sample string 2</d2p1:Value>
        </d2p1:Attribute>
        <d2p1:Attribute>
          <d2p1:Key>sample string 1</d2p1:Key>
          <d2p1:Value>sample string 2</d2p1:Value>
        </d2p1:Attribute>
      </d2p1:PreferenceAttributes>
      <d2p1:PreferenceStatus>sample string 17</d2p1:PreferenceStatus>
      <d2p1:PreferenceType>10</d2p1:PreferenceType>
      <d2p1:Prefix>sample string 5</d2p1:Prefix>
      <d2p1:ProgramID>sample string 1</d2p1:ProgramID>
      <d2p1:ReasonCode>sample string 14</d2p1:ReasonCode>
      <d2p1:SourceId>sample string 24</d2p1:SourceId>
      <d2p1:Suffix>sample string 9</d2p1:Suffix>
      <d2p1:UserId>sample string 25</d2p1:UserId>
      <d2p1:Operation>1</d2p1:Operation>
    </d2p1:PreferenceWithOperation>
    <d2p1:PreferenceWithOperation>
      <d2p1:CID>sample string 4</d2p1:CID>
      <d2p1:ChannelID>sample string 2</d2p1:ChannelID>
      <d2p1:ContactElement>
        <d2p1:Address1>sample string 3</d2p1:Address1>
        <d2p1:Address2>sample string 4</d2p1:Address2>
        <d2p1:City>sample string 5</d2p1:City>
        <d2p1:CountryCode>sample string 7</d2p1:CountryCode>
        <d2p1:Email>sample string 1</d2p1:Email>
        <d2p1:PFT>sample string 2</d2p1:PFT>
        <d2p1:PostalCode>sample string 8</d2p1:PostalCode>
        <d2p1:StateProvince>sample string 6</d2p1:StateProvince>
      </d2p1:ContactElement>
      <d2p1:CustomProperties>
        <d2p1:Attribute>
          <d2p1:Key>sample string 1</d2p1:Key>
          <d2p1:Value>sample string 2</d2p1:Value>
        </d2p1:Attribute>
        <d2p1:Attribute>
          <d2p1:Key>sample string 1</d2p1:Key>
          <d2p1:Value>sample string 2</d2p1:Value>
        </d2p1:Attribute>
      </d2p1:CustomProperties>
      <d2p1:CustomerDate>sample string 12</d2p1:CustomerDate>
      <d2p1:ExpirationDate>sample string 15</d2p1:ExpirationDate>
      <d2p1:FilterID>sample string 3</d2p1:FilterID>
      <d2p1:FirstName>sample string 6</d2p1:FirstName>
      <d2p1:FrequencyID>sample string 11</d2p1:FrequencyID>
      <d2p1:IsDeactivated>sample string 26</d2p1:IsDeactivated>
      <d2p1:LastModifiedDate>sample string 16</d2p1:LastModifiedDate>
      <d2p1:LastName>sample string 8</d2p1:LastName>
      <d2p1:MatchType>sample string 13</d2p1:MatchType>
      <d2p1:MiddleName>sample string 7</d2p1:MiddleName>
      <d2p1:PreferenceAttributes>
        <d2p1:Attribute>
          <d2p1:Key>sample string 1</d2p1:Key>
          <d2p1:Value>sample string 2</d2p1:Value>
        </d2p1:Attribute>
        <d2p1:Attribute>
          <d2p1:Key>sample string 1</d2p1:Key>
          <d2p1:Value>sample string 2</d2p1:Value>
        </d2p1:Attribute>
      </d2p1:PreferenceAttributes>
      <d2p1:PreferenceStatus>sample string 17</d2p1:PreferenceStatus>
      <d2p1:PreferenceType>10</d2p1:PreferenceType>
      <d2p1:Prefix>sample string 5</d2p1:Prefix>
      <d2p1:ProgramID>sample string 1</d2p1:ProgramID>
      <d2p1:ReasonCode>sample string 14</d2p1:ReasonCode>
      <d2p1:SourceId>sample string 24</d2p1:SourceId>
      <d2p1:Suffix>sample string 9</d2p1:Suffix>
      <d2p1:UserId>sample string 25</d2p1:UserId>
      <d2p1:Operation>1</d2p1:Operation>
    </d2p1:PreferenceWithOperation>
  </Preferences>
  <TotalResults>5</TotalResults>
</PreferenceResult>