getAdvocacyAlerts

This method returns a list of Advocacy alerts.

Client Servlet Server Servlet HTTP Methods Supported Requires Authentication
CRAdvocacyAPI SRAdvocacyAPI GET, POST Server.

Client API Syntax

https://secure2.convio.net/organization/site/CRAdvocacyAPI?method=getAdvocacyAlerts &api_key=value &v=value [ &auth=value ] [ &center_id=value ] [ &error_redirect=value ] [ &redirect=value ] [ &response_format=xml | json ] [ &sign_redirects=value ] [ &source=value ] [ &sso_auth_token=value ] [ &sub_source=value ] [ &success_redirect=value ] [ &suppress_response_codes=value ] [ &alert_status=active | inactive | archived | datedriven ] [ &alert_type=action | lte | vote | call ] [ &issue_id=value ] [ &list_ascending=value ] [ &list_category_id=value ] [ &list_filter_column=title | internalName | description | category | issues | restrictByState | targets | messageSubject | messageGreeting | messageOpening | messageBody | messageClosing | messageSignature ] [ &list_filter_text=value ] [ &list_page_offset=value ] [ &list_page_size=value ] [ &list_record_offset=value ] [ &list_sort_column=alertId | type | status | priority | url | interactionCount | title | internalName | description | category | issues | restrictByState | modified | publish | expire | targets | messageSubject | messageSubjectEditable | messageGreeting | messageOpening | messageBody | messageBodyEditable | messageClosing | messageSignature | letterLimit | wordLimit | position | yeaCount | nayCount | abstainCount | notPresentCount ] [ &match=value ] [ &max_expire=value ] [ &max_modified=value ] [ &max_publish=value ] [ &min_expire=value ] [ &min_modified=value ] [ &min_publish=value ] [ &priority=low | medium | high ] [ &restrict_by_state=value ] [ &taken=ignore | never | already ]

Server API Syntax

https://secure2.convio.net/organization/site/SRAdvocacyAPI?method=getAdvocacyAlerts & api_key =value & login_name =value & login_password =value & v =value [ & center_id =value ] [ & cons_id =value ] [ & error_redirect =value ] [ & redirect =value ] [ & response_format =xml |json ] [ & sign_redirects =value ] [ & source =value ] [ & sub_source =value ] [ & success_redirect =value ] [ & suppress_response_codes =value ] [ & alert_status =active |inactive |archived |datedriven ] [ & alert_type =action |lte |vote |call ] [ & issue_id =value ] [ & list_ascending =value ] [ & list_category_id =value ] [ & list_filter_column =title |internalName |description |category |issues |restrictByState |targets |messageSubject |messageGreeting |messageOpening |messageBody |messageClosing |messageSignature ] [ & list_filter_text =value ] [ & list_page_offset =value ] [ & list_page_size =value ] [ & list_record_offset =value ] [ & list_sort_column =alertId |type |status |priority |url |interactionCount |title |internalName |description |category |issues |restrictByState |modified |publish |expire |targets |messageSubject |messageSubjectEditable |messageGreeting |messageOpening |messageBody |messageBodyEditable |messageClosing |messageSignature |letterLimit |wordLimit |position |yeaCount |nayCount |abstainCount |notPresentCount ] [ & match =value ] [ & max_expire =value ] [ & max_modified =value ] [ & max_publish =value ] [ & min_expire =value ] [ & min_modified =value ] [ & min_publish =value ] [ & priority =low |medium |high ] [ & restrict_by_state =value ] [ & taken =ignore |never |already ]

Usage Notes

Call getAdvocacyAlerts to obtain a list of advocacy alerts and information about each alert. Optionally, specify additional parameters to limit and order the result set.

Filtering, Sorting and Paging Results

To control which alerts are returned, specify filter parameters. Available filters include:
  • alert_status
  • alert_type
  • issue_id
  • match
  • priority
  • restrict_by_state
  • taken

Optionally specify publication, expiration, or last modification date and time limits or ranges using min and max parameters. Note that these fields and the ranges they define include date, time and time zone offset components in ISO 8601 format. You specify both date and time when publishing an alert. The time zone offset applied is the one configured for your Luminate Online site.

Note that the taken and match filters apply to alerts which are associated with an individual constituent, either by cons_id parameter or through the caller's current logged-in user session.

In order to filter alerts associated with a given issue, you must specify one or more issue_id values. To locate the issue_id value for a particular issue in Luminate Online, select Issues from the Advocacy menu. The ID for each issue appears in parentheses beside its the name in the list.

You can further filter the list of results using the list_filter_column and list_filter_text parameters.

To sort the results, specify list_sort_column and list_ascending parameters.

Client API Parameters

Common Client Parameters

See topic Common Parameters.

alert_status

Optional. Filter by alert status. Accepts a comma separated list. Active alerts allow qualified participants to take action, inactive and archived alerts do not. Inactive alerts have been active at some point but no longer are, typically because they have expired, but they have not been archived by an administrator.

Type advocacyAlertStatus.

Options are:
  • active
  • inactive
  • archived
  • datedriven
alert_type

Optional. Filter by alert type. Accepts a comma separated list. The default is 'action,lte,vote,call' (all types).

Type advocacyAlertType.

Options are:
  • action
  • lte
  • vote
  • call
issue_id

Optional. Filter by alert issues. Accepts a comma separated list of valid Issue IDs. The default is an empty list, which causes this filter to be ignored. Only alerts associated with all of the specified issues will be returned.

Type xsd:positiveInteger.

list_ascending

Optional. Whether the list should be sorted in ascending order.

Type xsd:boolean.

Default is true.

list_category_id

Optional. Security Category filter.

Type xsd:integer.

list_filter_column

Optional. The database column that will be used to match the filter text (used with "list_filter_text").

Type xsd:string.

Options are:
  • title
  • internalName
  • description
  • category
  • issues
  • restrictByState
  • targets
  • messageSubject
  • messageGreeting
  • messageOpening
  • messageBody
  • messageClosing
  • messageSignature
list_filter_text

Optional. The text that will be used to filter results.

Type xsd:string.

list_page_offset

Optional. The requested page number (used with "list_page_size"). The first page (default) is zero. Only one of "list_record_offset" or "list_page_offset" should be used in a request.

Type xsd:integer.

list_page_size

Optional. The number of results in each page (used with "list_record_offset" or "list_page_offset").

Type xsd:integer.

Default is 25.

list_record_offset

Optional. The requested initial record number (used with "list_page_size"). The first record (default) is zero. Only one of "list_record_offset" or "list_page_offset" should be used in a request.

Type xsd:integer.

list_sort_column

Optional. The column to sort with (used with "list_ascending").

Type xsd:string.

Options are:
  • alertId
  • type
  • status
  • priority
  • url
  • interactionCount
  • title
  • internalName
  • description
  • category
  • issues
  • restrictByState
  • modified
  • publish
  • expire
  • targets
  • messageSubject
  • messageSubjectEditable
  • messageGreeting
  • messageOpening
  • messageBody
  • messageBodyEditable
  • messageClosing
  • messageSignature
  • letterLimit
  • wordLimit
  • position
  • yeaCount
  • nayCount
  • abstainCount
  • notPresentCount
match

Optional. Filter by geographic match. If true, returns only alerts where the constituent's address matches a target recipient for the alert. The default is 'false'.

Type xsd:boolean.

Default is false.

max_expire

Optional. Filter by expiration timestamp. If you specify a timestamp, only alerts expiring on or before the specified timestamp will be returned.

Type xsd:dateTime.

max_modified

Optional. Filter by last modified timestamp. If you specify a timestamp, only alerts last modified on or before the specified timestamp will be returned.

Type xsd:dateTime.

max_publish

Optional. Filter by publish timestamp. If you specify a timestamp, only alerts published on or before the specified timstamp will be returned.

Type xsd:dateTime.

min_expire

Optional. Filter by expiration timestamp. If you specify a timestamp, only alerts expiring on or after the specified timestamp will be returned.

Type xsd:dateTime.

min_modified

Optional. Filter by last modified timestamp. If you specify a timestamp, only alerts last modified on or after the specified timestamp will be returned.

Type xsd:dateTime.

min_publish

Optional. Filter by publish timestamp. If you specify a timestamp, only alerts published on or after the specified timestamp will be returned.

Type xsd:dateTime.

priority

Optional. Filter by alert priority. Accepts a comma separated list. The default is 'high,medium,low' (all priorities).

Type advocacyPriority.

Options are:
  • low
  • medium
  • high
restrict_by_state

Optional. Filter by alert "restrict by state" setting. Accepts a comma separated list of US Postal abbreviations. The default is an empty list, which causes this filter to be ignored. Only alerts that list all of the specified abbreviations will be returned.

Type xsd:string.

taken

Optional. For alerts that apply to a given constituent, filter by whether the constituent has taken action on the alert. The default is 'ignore'.

Type advocacyTaken.

Default is ignore.

Options are:
  • ignore
  • never
  • already

Server API Parameters

Common Server Parameters

See topic Common Parameters.

cons_id

Optional. Specifies the constituent associated with the alert or action.

Type xsd:nonNegativeInteger.

sign_redirects

Optional. Specifies that redirect URLs should be signed with a timestamp and a hash of the query string arguments and a secret key.

Type xsd:boolean.

Default is false.

alert_status

Optional. Filter by alert status. Accepts a comma separated list. Active alerts allow qualified participants to take action, inactive and archived alerts do not. Inactive alerts have been active at some point but no longer are, typically because they have expired, but they have not been archived by an administrator.

Type advocacyAlertStatus.

Options are:
  • active
  • inactive
  • archived
  • datedriven
alert_type

Optional. Filter by alert type. Accepts a comma separated list. The default is 'action,lte,vote,call' (all types).

Type advocacyAlertType.

Options are:
  • action
  • lte
  • vote
  • call
issue_id

Optional. Filter by alert issues. Accepts a comma separated list of valid Issue IDs. The default is an empty list, which causes this filter to be ignored. Only alerts associated with all of the specified issues will be returned.

Type xsd:positiveInteger.

list_ascending

Optional. Whether the list should be sorted in ascending order.

Type xsd:boolean.

Default is true.

list_category_id

Optional. Security Category filter.

Type xsd:integer.

list_filter_column

Optional. The database column that will be used to match the filter text (used with "list_filter_text").

Type xsd:string.

Options are:
  • title
  • internalName
  • description
  • category
  • issues
  • restrictByState
  • targets
  • messageSubject
  • messageGreeting
  • messageOpening
  • messageBody
  • messageClosing
  • messageSignature
list_filter_text

Optional. The text that will be used to filter results.

Type xsd:string.

list_page_offset

Optional. The requested page number (used with "list_page_size"). The first page (default) is zero. Only one of "list_record_offset" or "list_page_offset" should be used in a request.

Type xsd:integer.

list_page_size

Optional. The number of results in each page (used with "list_record_offset" or "list_page_offset").

Type xsd:integer.

Default is 25.

list_record_offset

Optional. The requested initial record number (used with "list_page_size"). The first record (default) is zero. Only one of "list_record_offset" or "list_page_offset" should be used in a request.

Type xsd:integer.

list_sort_column

Optional. The column to sort with (used with "list_ascending").

Type xsd:string.

Options are:
  • alertId
  • type
  • status
  • priority
  • url
  • interactionCount
  • title
  • internalName
  • description
  • category
  • issues
  • restrictByState
  • modified
  • publish
  • expire
  • targets
  • messageSubject
  • messageSubjectEditable
  • messageGreeting
  • messageOpening
  • messageBody
  • messageBodyEditable
  • messageClosing
  • messageSignature
  • letterLimit
  • wordLimit
  • position
  • yeaCount
  • nayCount
  • abstainCount
  • notPresentCount
match

Optional. Filter by geographic match. If true, returns only alerts where the constituent's address matches a target recipient for the alert. The default is 'false'.

Type xsd:boolean.

Default is false.

max_expire

Optional. Filter by expiration timestamp. If you specify a timestamp, only alerts expiring on or before the specified timestamp will be returned.

Type xsd:dateTime.

max_modified

Optional. Filter by last modified timestamp. If you specify a timestamp, only alerts last modified on or before the specified timestamp will be returned.

Type xsd:dateTime.

max_publish

Optional. Filter by publish timestamp. If you specify a timestamp, only alerts published on or before the specified timstamp will be returned.

Type xsd:dateTime.

min_expire

Optional. Filter by expiration timestamp. If you specify a timestamp, only alerts expiring on or after the specified timestamp will be returned.

Type xsd:dateTime.

min_modified

Optional. Filter by last modified timestamp. If you specify a timestamp, only alerts last modified on or after the specified timestamp will be returned.

Type xsd:dateTime.

min_publish

Optional. Filter by publish timestamp. If you specify a timestamp, only alerts published on or after the specified timestamp will be returned.

Type xsd:dateTime.

priority

Optional. Filter by alert priority. Accepts a comma separated list. The default is 'high,medium,low' (all priorities).

Type advocacyPriority.

Options are:
  • low
  • medium
  • high
restrict_by_state

Optional. Filter by alert "restrict by state" setting. Accepts a comma separated list of US Postal abbreviations. The default is an empty list, which causes this filter to be ignored. Only alerts that list all of the specified abbreviations will be returned.

Type xsd:string.

taken

Optional. For alerts that apply to a given constituent, filter by whether the constituent has taken action on the alert. The default is 'ignore'.

Type advocacyTaken.

Default is ignore.

Options are:
  • ignore
  • never
  • already

Response

See topic HTTP Status Codes.

XML response
<?xml version="1.0" encoding="UTF-8"?>
<getAdvocacyAlertsResponse alertCount="20" xsi:schemaLocation="http://convio.com/crm/v1.0 http://service.convio.net/xmlschema/crm.public.v1.xsd" xmlns="http://convio.com/crm/v1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <alert>
    <alertId>103</alertId>
    <type>action</type>
    <status>active</status>
    <priority>high</priority>
    <url>https://secure2.convio.net/orgname/site/Advocacy?pagename=homepage&amp;id=103</url>
    <interactionCount>1000002</interactionCount>
    <title>Alert Title</title>
    <thumbnail>https://secure2.convio.net/orgname/images/Thumbnails/ActionAlerts/103</thumbnail>
    <internalName>Internal Name</internalName>
    <description>Description</description>
    <category categoryId="1">General</category>
    <issues>
      <issue issueId="1001">Issue1</issue>
      <issue issueId="1002">Issue2</issue>
    </issues>
    <restrictByState>
      <state>TN</state>
      <state>TX</state>
    </restrictByState>
    <modified>2016-02-01T09:43:44.808-06:00</modified>
    <publish>2016-02-01T09:43:44.808-06:00</publish>
    <expire>2016-02-01T09:43:44.808-06:00</expire>
    <targets>
      <target>Governor</target>
      <target>US Senator</target>
      <target>US Representative</target>
      <target>State Senator</target>
      <target>State Representative</target>
    </targets>
    <messageSubject>Subject</messageSubject>
    <messageSubjectEditable>optional</messageSubjectEditable>
    <messageGreeting>Dear</messageGreeting>
    <messageOpening>Message Opening Text</messageOpening>
    <messageBody>Message Body Text</messageBody>
    <messageBodyEditable>optional</messageBodyEditable>
    <messageClosing>Sincerely,</messageClosing>
    <messageSignature>Signature</messageSignature>
    <wordLimit>0</wordLimit>
    <position>none</position>
    <yeaCount>0</yeaCount>
    <nayCount>0</nayCount>
    <abstainCount>0</abstainCount>
  </alert>
  <alert>
    <alertId>116</alertId>
    <type>action</type>
    <status>active</status>
    <priority>high</priority>
    <url>https://secure2.convio.net/orgname/site/Advocacy?pagename=homepage&amp;id=116</url>
    <interactionCount>1000002</interactionCount>
    <title>Alert Title</title>
    <thumbnail>https://secure2.convio.net/orgname/images/Thumbnails/ActionAlerts/116</thumbnail>
    <internalName>Internal Name</internalName>
    <description>Description</description>
    <category categoryId="1">General</category>
    <issues>
      <issue issueId="1001">Issue1</issue>
      <issue issueId="1002">Issue2</issue>
    </issues>
    <restrictByState>
      <state>TN</state>
      <state>TX</state>
    </restrictByState>
    <modified>2016-02-01T09:43:44.809-06:00</modified>
    <publish>2016-02-01T09:43:44.809-06:00</publish>
    <expire>2016-02-01T09:43:44.809-06:00</expire>
    <targets>
      <target>Governor</target>
      <target>US Senator</target>
      <target>US Representative</target>
      <target>State Senator</target>
      <target>State Representative</target>
    </targets>
    <messageSubject>Subject</messageSubject>
    <messageSubjectEditable>optional</messageSubjectEditable>
    <messageGreeting>Dear</messageGreeting>
    <messageOpening>Message Opening Text</messageOpening>
    <messageBody>Message Body Text</messageBody>
    <messageBodyEditable>optional</messageBodyEditable>
    <messageClosing>Sincerely,</messageClosing>
    <messageSignature>Signature</messageSignature>
    <wordLimit>0</wordLimit>
    <position>none</position>
    <yeaCount>0</yeaCount>
    <nayCount>0</nayCount>
    <abstainCount>0</abstainCount>
  </alert>
</getAdvocacyAlertsResponse>

        
JSON response
{"getAdvocacyAlertsResponse":{"alert":[{"position":"none","internalName":"Internal Name","messageSubjectEditable":"optional","messageSubject":"Subject","nayCount":"0","yeaCount":"0","messageSignature":"Signature","type":"action","title":"Alert Title","alertId":"103","interactionCount":"1000002","description":"Description","priority":"high","publish":"2016-02-01T09:43:44.817-06:00","targets":{"target":["Governor","US Senator","US Representative","State Senator","State Representative"]},"messageGreeting":"Dear","messageBody":"Message Body Text","abstainCount":"0","expire":"2016-02-01T09:43:44.817-06:00","messageBodyEditable":"optional","status":"active","messageOpening":"Message Opening Text","url":"https://secure2.convio.net/orgname/site/Advocacy?pagename=homepage&id=103","modified":"2016-02-01T09:43:44.817-06:00","messageClosing":"Sincerely,","category":{"content":"General","categoryId":"1"},"thumbnail":"https://secure2.convio.net/orgname/images/Thumbnails/ActionAlerts/103","restrictByState":{"state":["TN","TX"]},"wordLimit":"0","issues":{"issue":[{"content":"Issue1","issueId":"1001"},{"content":"Issue2","issueId":"1002"}]}},{"position":"none","internalName":"Internal Name","messageSubjectEditable":"optional","messageSubject":"Subject","nayCount":"0","yeaCount":"0","messageSignature":"Signature","type":"action","title":"Alert Title","alertId":"116","interactionCount":"1000002","description":"Description","priority":"high","publish":"2016-02-01T09:43:44.817-06:00","targets":{"target":["Governor","US Senator","US Representative","State Senator","State Representative"]},"messageGreeting":"Dear","messageBody":"Message Body Text","abstainCount":"0","expire":"2016-02-01T09:43:44.817-06:00","messageBodyEditable":"optional","status":"active","messageOpening":"Message Opening Text","url":"https://secure2.convio.net/orgname/site/Advocacy?pagename=homepage&id=116","modified":"2016-02-01T09:43:44.817-06:00","messageClosing":"Sincerely,","category":{"content":"General","categoryId":"1"},"thumbnail":"https://secure2.convio.net/orgname/images/Thumbnails/ActionAlerts/116","restrictByState":{"state":["TN","TX"]},"wordLimit":"0","issues":{"issue":[{"content":"Issue1","issueId":"1001"},{"content":"Issue2","issueId":"1002"}]}}],"alertCount":"20"}}

        

Leave a Comment

Nickname
Comment
Enter this word: