API Quick Start Guide - Pulling Data

Below are examples of calls that you must make to pull a list of unsubscribes or mailing activity for a single day.

  • Informz recommends writing your call to pull unsubscribes daily using the previous day’s data.
  • For mailing activity, Informz recommends doing a single pull for all activity from mailings sent five days earlier.

Request 1 below is the sample code for pulling all the mailing instances sent on a single day. You'll need to use the results from that query to pull any and all activity related to specific mailings. A mailing subscriber actions example is shown at the end of this article.

Mailing Instances from a Single Day

Below is the syntax for the call to find the specific mailing instance(s) you wish to pull activity for. Most of your calls for information that you want to pull begin here.

Request 1: Get List of Mailing Instances from a Single Day

<GridRequest xmlns="http://partner.informz.net/aapi/2009/08/">
  <Brand id="9999">Test Brand</Brand>
  <User>testuser</User>
  <Grids>
    <Grid type="mailing_instance">
      <Conditions>
        <Condition>
          <Single>
            <DataElement>Mailing_Date</DataElement>
            <DataValue>2014-06-01</DataValue>
            <Comparator>GTE</Comparator>
          </Single>
        </Condition>
        <Condition>
          <Single>
            <DataElement>Mailing_Date</DataElement>
            <DataValue>2014-06-02</DataValue>
            <Comparator>LT</Comparator>
          </Single>
        </Condition>
      </Conditions>
      <ReturnFields>
        <DataElement>Mailing_ID</DataElement>
        <DataElement>Mailing_Instance_ID</DataElement>
        <DataElement>Mailing_Date</DataElement>
        <DataElement>Mailing_Subject</DataElement>
      </ReturnFields>
      <SortField order="asc">Mailing_Date</SortField>
    </Grid>
  </Grids>
</GridRequest>

Reponse 1: Get List of Mailing Instances from a Single Day

<?xml version="1.0" encoding="utf-16"?>
<GridResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://partner.informz.net/aapi/2009/08/">
  <Brand id="9999">Test Brand</Brand>
  <User>testuser</User>
  <Grids>
    <Grid type="mailing_instance">
      <Record row="1">
        <Fields>
          <Field element="mailing_id">134384</Field>
          <Field element="mailing_instance_id">1297889</Field>
          <Field element="mailing_date">2011-09-13T18:37:37.2630000Z</Field>
          <Field element="mailing_subject">Mailing one</Field>
        </Fields>
      </Record>
      <Record row="2">
        <Fields>
          <Field element="mailing_id">134385</Field>
          <Field element="mailing_instance_id">1297891</Field>
          <Field element="mailing_date">2011-09-13T18:38:21.3700000Z</Field>
          <Field element="mailing_subject">Mailing two</Field>
        </Fields>
      </Record>
    </Grid>
  </Grids>
</GridResponse>

Unsubscribes from a Single Day

Request 2: Get List of Unsubscribes from a Single Day

<GridRequest xmlns="http://partner.informz.net/aapi/2009/08/">
  <Brand id="9999">Test Brand</Brand>
  <User>testuser</User>
  <Grids>
    <Grid type="mailing_instance">
      <Conditions>
        <Condition>
          <Single>
            <DataElement>Mailing_Date</DataElement>
            <DataValue>2014-06-01</DataValue>
            <Comparator>GTE</Comparator>
          </Single>
        </Condition>
        <Condition>
          <Single>
            <DataElement>Mailing_Date</DataElement>
            <DataValue>2014-06-02</DataValue>
            <Comparator>LT</Comparator>
          </Single>
        </Condition>
      </Conditions>
      <ReturnFields>
        <DataElement>Count</DataElement>     
      </ReturnFields>
    </Grid>
  </Grids>
</GridRequest>

Response 2: Get List of Unsubscribes from a Single Day

<?xml version="1.0" encoding="utf-16"?>
<GridResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://partner.informz.net/aapi/2009/08/">
  <Brand id="9999">Test Brand</Brand>
  <User>testuser</User>
  <Grids>
    <Grid type="mailing_instance">
      <Record row="0">
        <Fields>
          <Field element="count">6</Field>
        </Fields>
      </Record>
    </Grid>
  </Grids>
</GridResponse>

Mailing Activity Subscriber Actions

For Mailings less than 90 days old:

Element List

Data Element Type Length Conditional? Description
Count Bit True Number of matches found based upon criteria used
was_clicked Bit True Clicked counts
was_delivered Bit True Delivered counts
Email String 100 True Email address
mailing_instance_id Int True Unique mailing instance ID
was_opened Bit True Opened counts
user_id Int True Informz user ID

Request

<GridRequest xmlns="http://partner.informz.net/aapi/2009/08/">
  <Password>password</Password>
  <Brand id="9999">Test Brand</Brand>
  <User>testuser</User>
  <Grids>
    <Grid type="mailing_activity_subscriber_actions">
      <ReturnFields>
        <DataElement>was_clicked</DataElement>
        <DataElement>was_delivered</DataElement>
        <DataElement>email</DataElement>
        <DataElement>mailing_instance_id</DataElement>
        <DataElement>was_opened</DataElement>
        <DataElement>user_id</DataElement>
      </ReturnFields>
    </Grid>
  </Grids>
</GridRequest>