Welcome‎ > ‎Version 2‎ > ‎Publisher Api (Read/Write)‎ > ‎Data Structures‎ > ‎

Segment


Data structure holding a segment.

Fields:

  active - Determines whether this segment is active.
  description - The description associated with the segment.
  externalRefId - An external identifier for the segment (defined by the publisher).
  facebookUrl - The facebook Url defined for the segment.
  key - Will contain the key name for the segment.  This is the value to be used on all <segmentKey> requires
  latitude - The longitude entered for the segment location.
  longitude - The latitude entered for the segment location.
  name - Will contain the name of the segment.
  notes - Any notes associated with the segment
  timezone - The timezone id.
  twitterUrl - The twitter Url defined for the segment.
  viewOrder - The order the segments should appear in.

Sample XML Response:

<segment>
    <active>true</active>
    <description i:nil="true"/>
    <externalRefId>7</externalRefId>
    <facebookUrl>http://www.facebook.com/DailyCandy</facebookUrl>
    <key>all-cities</key>
    <latitude>0</latitude>
    <longitude>0</longitude>
    <name>All Cities</name>
    <notes i:nil="true"/>
    <timezone>Central Standard Time</timezone>
    <twitterUrl>http://www.twitter.com/DailyCandy</twitterUrl>
    <viewOrder>0</viewOrder>
</segment>

Sample JSON Response:
{
    "segment" : {
        "active": true,
        "description": null,
        "externalRefId":"7",
        "facebookUrl": "http:\/\/www.facebook.com\/DailyCandy",
        "key": "all-cities",
        "latitude": 0,
        "longitude": 0,
        "name": "All Cities",
        "notes": null,
        "timezone": "Central Standard Time",
        "twitterUrl": "http:\/\/www.twitter.com\/DailyCandy",
        "viewOrder": 0
    }
}
Comments