Overview

Skill Level: Beginner

Step-by-step

  1. Syntax of the request and response XML for GetPrograms

    Operation <GetPrograms>      
    Elements INCLUDE_ACTIVE Required Specify to return the Programs that are in Running and Scheduled state. Valid values are:

    • True
    • False
     
      INCLUDE_INACTIVE Required Specify to return the Programs that are only in inactive state. Valid values are:

    • True
    • False
     
      CREATED_DATE_RANGE Optional Specify to return programs that are created within specific date range. This date is based on Program create date.  
    ¬† Child Element BEGIN_DATE Specify start of the date range in the format “mm/dd/yyyy”. ¬†
    ¬† ¬† END_DATE Specify end of the date range in the format “mm/dd/yyyy”. ¬†
      LIST_ID Optional Parameter that makes the function return Programs for the specified list (Database or Query). The database List returns all programs that are tied to that list through its associated queries.  
      APPROVED_FOR_SALES Optional

    Specify to return programs that are only Approved for Sales.

    Accepted values are:

    • True
    • False

    If this element is not included, False is assumed.

    Note: These programs are available through contact insight.
     
      INCLUDE_TAGS Optional Specify to return programs that are associated to specific tags.  
      ChildElement TAG Specify to return a program that is associated to a specific tag.  
    Example
    <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>
    
         
    Response <RESULT>      
    Elements SUCCESS True if successful.    
      PROGRAM XML node that defines all returned programs.    
      ChildElement 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 the status of the Program. Possible values:

    • Running
    • Scheduled
    • Completed
    • 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. (user’s time zone).  
        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, value is null.  
        LAST_CONTACT_DATE Returns the Program’s date for which its last contact can be added. Not always available and can be null.  
        TAGS Returns TAGS associated with the Program.  
        ChildElement TAG XML nodes that contain the Tags that are associated with the Program.
    Success Example
    <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>
         
    Error Message Response Example
    <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>
         

2 comments on"Get a list of programs"

  1. Is there an XML API call to stop or start a program?

    • Hello Peeyoosh,
      Currently there is no API call that will start or stop a Program. However, I will make this suggestion to the development team.

      Thank you,
      Jeri

Join The Discussion

Your email address will not be published. Required fields are marked *