Get a list of programs - GetPrograms

Used to extract a list of Programs for an organization.

Elements (Required)

INCLUDE_ACTIVE - Specify True or False to return programs that are in Running and Scheduled state.

INCLUDE_INACTIVE - Specify True or False to return programs that are only in Inactive state.

Elements (Optional)

CREATED_DATE_RANGE - Specify a specific date range to return programs created in that range. This date is based on program create date.
BEGIN_DATE - A child element of CREATED_DATE_RANGE. Specify the start of a date range with the "mm/dd/yyyy" format.
END_DATE - A child element of CREATED_DATE_RANGE. Specify the end of a date range with the "mm/dd/yyyy" format.

LIST_ID - Returns programs for the specified list (Database or Query). The database list returns all programs associted with that list.

APPROVED_FOR_SALES - Specify True or False to return programs only approved for sales. If this element is not included. False is assumed. Note: These programs are available through contact insight.

INCLUDE_TAGS - Returns programs that are associated to specific tags.
TAG - Returns programs that are associate with a specific tag.

<Envelope>
   <Body>
      <GetPrograms>
         <INCLUDE_ACTIVE>True</INCLUDE_ACTIVE>
         <INCLUDE_INACTIVE>False</INCLUDE_INACTIVE>
         <CREATED_DATE_RANGE>
            <BEGIN_DATE>01/01/2012</BEGIN_DATE>
            <END_DATE>12/12/2012</END_DATE>
         </CREATED_DATE_RANGE>
         <INCLUDE_TAGS>
            <TAG>Lead Gen</TAG>
            <TAG>January Campaigns</TAG>
         </INCLUDE_TAGS>
         <APPROVED_FOR_SALES/>
      </GetPrograms>
   </Body>
</Envelope>
<Envelope>
  <Body>
    <RESULT>
      <SUCCESS>TRUE</SUCCESS>
      <PROGRAMS>
        <PROGRAM>
          <ID>5435</ID>
          <NAME>Hot Leads Program</NAME>
          <LIST_ID>423126</LIST_ID>
          <NOTES>This program contains all the leads 
          that are considered actionable</NOTES>
          <STATE>Running</STATE>
          <CREATED>06/12/11 10:15 PM</CREATED>
          <LAST_MODIFIED>10/23/11 04:18 PM</LAST_MODIFIED>
          <START_DATE>10/10/2011</START_DATE>
          <END_DATE/>
          <LAST_CONTACT_DATE/>
          <TAGS>
            <TAG>January Campaign</TAG>
          </TAGS>
        </PROGRAM>
      </PROGRAMS>
    </RESULT>
  </Body>
</Envelope>
<Envelope>
  <Body>
    <RESULT>
      <SUCCESS>false</SUCCESS>
    </RESULT>
    <Fault>
      <Request/>
      <FaultCode/>
      <FaultString> The database or Contact List ID 
      provided does not exist.
      </FaultString>
      <detail>
        <error>
          <errorid>133</errorid>
          <module/>
          <class>SP.API</class>
          <method/>
        </error>
      </detail>
    </Fault>
  </Body>
</Envelope>

Elements (Results)

SUCCESS - True if successful; False if not.

PROGRAM - XML node that defines all returned programs.

The following elements are children of PROGRAMS>PROGRAM.

ID - Returns the unique ID of the program.

NAME - Returns the name of the program.

LIST_ID - The Contact Source List ID tied to the program (database or query).

NOTES - Returns the program notes/description.

STATE - Returns that status of the program: Running, Scheduled, Completed, and Inactive.

TIME_ZONE - Returns the program's time zone.

CREATED - Returns the date when the program was created.

LAST_MODIFIED - Returns the date and time when the program was last modified.

START_DATE - Returns the program's start date. If the program does not have a start date, value is null.

END_DATE - Returns the program's end date. If the program does not have a start date, balue is null.

LAST_CONTACT_DATE - Returns the program's date that a contact can last be added. This is not always available and can be null.

TAGS - Returns tages associated with a program.
TAG - XML nodes that contain tags that are associated with the program.