POST {clientId}/DataExport/Segments

Add Segments.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
clientId

Your required clientId used to access the WebAPI. A 404 is returned if this value is invalid.

string

Required

Body Parameters

Segment class instance containing list of segments to import

SegmentResult
NameDescriptionTypeAdditional information
Segments

Collection of Segment

None.

Request Formats

application/json, text/json

Sample:
{
  "Segments": [
    {
      "SearchGroupLink": 1,
      "ClientLink": 2,
      "Name": "sample string 3",
      "Description": "sample string 4",
      "DeactivatedPreferencesOnly": true,
      "ChannelNbr": 6,
      "SearchGroupSteps": [
        {
          "SearchGroupLink": 1,
          "SearchStepLink": 2,
          "SetOperatorNbr": 3,
          "GroupNumber": 4,
          "Steps": [
            {
              "SearchStepLink": 1,
              "PreferenceType": 2,
              "StartDate": "2025-05-31T17:42:59.7299612-04:00",
              "EndDate": "2025-05-31T17:42:59.7299612-04:00",
              "ViewLink": 5,
              "AttributeViewLink": 6,
              "PreferenceDataTypeNbr": 7,
              "AlwaysProcessAsFull": true,
              "PreferenceStatusNbr": 9,
              "ViewInfo": [
                {
                  "ThreePartName": "sample string 1",
                  "IsAttributeView": true,
                  "ChannelNbr": 3
                }
              ],
              "AttributeViewInfo": [
                {
                  "ThreePartName": "sample string 1",
                  "IsAttributeView": true,
                  "ChannelNbr": 3
                }
              ],
              "AttributeWhereColumns": [
                {
                  "AttributeWhereColumnLink": 1,
                  "ViewLink": 2,
                  "AttributeLink": 3,
                  "ComparisonOperatorNbr": 4,
                  "Operand": "sample string 5",
                  "LogicOperatorNbr": 6,
                  "GroupNumber": 7,
                  "AttributeID": "sample string 8",
                  "ThreePartName": "sample string 9"
                }
              ],
              "Channels": [
                {
                  "ChannelNbr": 1
                }
              ],
              "CustomerTypeProfiles": [
                {
                  "CustomerTypeProfileLink": 1,
                  "CustomerTypeProfileID": "sample string 2"
                }
              ],
              "Programs": [
                {
                  "ProgramLink": 1,
                  "ProgramID": "sample string 2"
                }
              ],
              "FilterHeaders": [
                {
                  "FilterHeaderLink": 1,
                  "FilterClientID": "sample string 2"
                }
              ],
              "Frequencies": [
                {
                  "FrequencyLink": 1,
                  "FrequencyID": "sample string 2"
                }
              ],
              "Sources": [
                {
                  "SourceLink": 1,
                  "SourceID": "sample string 2"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}

application/xml, text/xml

Sample:
<SegmentResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/MyPreferences.REST.Codebase.Results">
  <Segments xmlns:d2p1="http://schemas.datacontract.org/2004/07/MyPreferences.REST.Models">
    <d2p1:Segment>
      <d2p1:ChannelNbr>6</d2p1:ChannelNbr>
      <d2p1:ClientLink>2</d2p1:ClientLink>
      <d2p1:DeactivatedPreferencesOnly>true</d2p1:DeactivatedPreferencesOnly>
      <d2p1:Description>sample string 4</d2p1:Description>
      <d2p1:Name>sample string 3</d2p1:Name>
      <d2p1:SearchGroupLink>1</d2p1:SearchGroupLink>
      <d2p1:SearchGroupSteps>
        <d2p1:SearchGroupSteps>
          <d2p1:GroupNumber>4</d2p1:GroupNumber>
          <d2p1:SearchGroupLink>1</d2p1:SearchGroupLink>
          <d2p1:SearchStepLink>2</d2p1:SearchStepLink>
          <d2p1:SetOperatorNbr>3</d2p1:SetOperatorNbr>
          <d2p1:Steps>
            <d2p1:Steps>
              <d2p1:AlwaysProcessAsFull>true</d2p1:AlwaysProcessAsFull>
              <d2p1:AttributeViewInfo>
                <d2p1:AttributeViewInfo>
                  <d2p1:ChannelNbr>3</d2p1:ChannelNbr>
                  <d2p1:IsAttributeView>true</d2p1:IsAttributeView>
                  <d2p1:ThreePartName>sample string 1</d2p1:ThreePartName>
                </d2p1:AttributeViewInfo>
              </d2p1:AttributeViewInfo>
              <d2p1:AttributeViewLink>6</d2p1:AttributeViewLink>
              <d2p1:AttributeWhereColumns>
                <d2p1:AttributeWhereColumns>
                  <d2p1:AttributeID>sample string 8</d2p1:AttributeID>
                  <d2p1:AttributeLink>3</d2p1:AttributeLink>
                  <d2p1:AttributeWhereColumnLink>1</d2p1:AttributeWhereColumnLink>
                  <d2p1:ComparisonOperatorNbr>4</d2p1:ComparisonOperatorNbr>
                  <d2p1:GroupNumber>7</d2p1:GroupNumber>
                  <d2p1:LogicOperatorNbr>6</d2p1:LogicOperatorNbr>
                  <d2p1:Operand>sample string 5</d2p1:Operand>
                  <d2p1:ThreePartName>sample string 9</d2p1:ThreePartName>
                  <d2p1:ViewLink>2</d2p1:ViewLink>
                </d2p1:AttributeWhereColumns>
              </d2p1:AttributeWhereColumns>
              <d2p1:Channels>
                <d2p1:Channels>
                  <d2p1:ChannelNbr>1</d2p1:ChannelNbr>
                </d2p1:Channels>
              </d2p1:Channels>
              <d2p1:CustomerTypeProfiles>
                <d2p1:CustomerTypeProfiles>
                  <d2p1:CustomerTypeProfileID>sample string 2</d2p1:CustomerTypeProfileID>
                  <d2p1:CustomerTypeProfileLink>1</d2p1:CustomerTypeProfileLink>
                </d2p1:CustomerTypeProfiles>
              </d2p1:CustomerTypeProfiles>
              <d2p1:EndDate>2025-05-31T17:42:59.7299612-04:00</d2p1:EndDate>
              <d2p1:FilterHeaders>
                <d2p1:FilterHeaders>
                  <d2p1:FilterClientID>sample string 2</d2p1:FilterClientID>
                  <d2p1:FilterHeaderLink>1</d2p1:FilterHeaderLink>
                </d2p1:FilterHeaders>
              </d2p1:FilterHeaders>
              <d2p1:Frequencies>
                <d2p1:Frequencies>
                  <d2p1:FrequencyID>sample string 2</d2p1:FrequencyID>
                  <d2p1:FrequencyLink>1</d2p1:FrequencyLink>
                </d2p1:Frequencies>
              </d2p1:Frequencies>
              <d2p1:PreferenceDataTypeNbr>7</d2p1:PreferenceDataTypeNbr>
              <d2p1:PreferenceStatusNbr>9</d2p1:PreferenceStatusNbr>
              <d2p1:PreferenceType>2</d2p1:PreferenceType>
              <d2p1:Programs>
                <d2p1:Programs>
                  <d2p1:ProgramID>sample string 2</d2p1:ProgramID>
                  <d2p1:ProgramLink>1</d2p1:ProgramLink>
                </d2p1:Programs>
              </d2p1:Programs>
              <d2p1:SearchStepLink>1</d2p1:SearchStepLink>
              <d2p1:Sources>
                <d2p1:Sources>
                  <d2p1:SourceID>sample string 2</d2p1:SourceID>
                  <d2p1:SourceLink>1</d2p1:SourceLink>
                </d2p1:Sources>
              </d2p1:Sources>
              <d2p1:StartDate>2025-05-31T17:42:59.7299612-04:00</d2p1:StartDate>
              <d2p1:ViewInfo>
                <d2p1:ViewInfo>
                  <d2p1:ChannelNbr>3</d2p1:ChannelNbr>
                  <d2p1:IsAttributeView>true</d2p1:IsAttributeView>
                  <d2p1:ThreePartName>sample string 1</d2p1:ThreePartName>
                </d2p1:ViewInfo>
              </d2p1:ViewInfo>
              <d2p1:ViewLink>5</d2p1:ViewLink>
            </d2p1:Steps>
          </d2p1:Steps>
        </d2p1:SearchGroupSteps>
      </d2p1:SearchGroupSteps>
    </d2p1:Segment>
  </Segments>
</SegmentResult>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Response Codes

  • Unauthorized (401)
  • InternalServerError (500)
  • BadRequest (400)

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.