AdvertServe User Manual

Segments :: Query API Module

Query

Description

Allows you to query for a list of segments using search criteria. A complete list of all existing segments will be returned if no search criteria is specified. Multiple search criteria may be specified together in the same query.

Module URI

Hyperlink /servlet/control/api/segments/query

Parameters

Parameter NameParameter TypeRequired?Example ValueValidation Rules (If Applicable)
secretStringYesa78bf24c5a23581aceba1c5f51ac4cad Must be a String containing no more than 32 characters
outputStringNoxml Must be a String equal to either json or xml
Parameter NameParameter TypeRequired?Example ValueValidation Rules (If Applicable)
idIntegerNo123 Must be the ID# of an existing segment
nameStringNoAcme Products Page Must be a String containing no more than 80 characters
aliasStringNoHTDJFERCTRPQLUC2 Must be a String containing no more than 16 alphanumeric characters
timeoutIntegerNo90 Must be an Integer between 1 and 365
statusbooleanNotrue Must be a boolean value equal to either true or false
notesStringNoN/A Must be a String containing no more than 65,535 characters
Parameter NameParameter TypeRequired?Example ValueValidation Rules (If Applicable)
campaignIntegerNo123 Must be the ID# of an existing campaign

XML Response

Hyperlink /servlet/control/api/segments/query?secret=(key)&name=acme


<results>
  <segment id="1" name="Acme Product Page" alias="LAIWVNIGAUOMB9DX" timeout="30" status="true">
    <notes/>
  </segment>
  <segment id="2" name="Acme Order Page" alias="AZFFZOKYDQQHZZQA" timeout="60" status="true">
    <notes/>
  </segment>
  <segment id="3" name="Acme Success Page" alias="HTDJFERCTRPQLUC2" timeout="90" status="true">
    <notes/>
  </segment>
</results>

JSON Response

Hyperlink /servlet/control/api/themes/query?secret=(key)&output=json&name=acme


{
  "results": [
    {
      "id": 1,
      "name": "Acme Product Page",
      "alias": "LAIWVNIGAUOMB9DX",
      "timeout": 30,
      "status": true,
      "notes": ""
    },
    {
      "id": 2,
      "name": "Acme Order Page",
      "alias": "AZFFZOKYDQQHZZQA",
      "timeout": 60,
      "status": true,
      "notes": ""
    },
    {
      "id": 3,
      "name": "Acme Success Page",
      "alias": "HTDJFERCTRPQLUC2",
      "timeout": 90,
      "status": true,
      "notes": ""
    }
  ]
}