Welcome‎ > ‎Version 2‎ > ‎Publisher Api (Read/Write)‎ > ‎Methods‎ > ‎4 - Email Leads‎ > ‎

Get Email Leads

Method used for getting the list of emails leads.  By default will return the last 100 email leads created.

Method: /api/v2/publisher/emailLeads

Authentication:
oauth


Required Parameters:
  none

Optional Parameters:
 PageNumber - The page number for results. Default = 1
 PageSize - The number of records to return per page.  Default = 100 (max 100)
 DateRange - The date filter to apply against the email lead create date.


Returns:
  A paged list of EmailLead.

Sample Request:
GET /api/v2/publisher/emailLeads

Authorization: OAuth oauth_signature="fzL99LUd5m6B%2bX4fz1V746e3UGk%3d", oauth_nonce="5821555", oauth_timestamp="1312575679", oauth_consumer_key="43c5c674-620c-4f2b-bdcf-3082c99e8186", oauth_signature_method="HMAC-SHA1", oauth_version="1.0"

Host: apitest.groupcommerce.com


Sample XML Response:
<emailLeads xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <errors/>
    <lastPublished>2011-08-05T20:21:30.4871696Z</lastPublished>
    <success>true</success>
    <version>2</version>
    <metaData>
        <pageCount>1</pageCount>
        <pageNumber>1</pageNumber>
        <pageSize>10000</pageSize>
        <totalItems>3</totalItems>
    </metaData>
    <data>
        <emailLead>
            <dateCreated>2011-08-05T20:18:49Z</dateCreated>
            <emailAddress>email@email.com</emailAddress>
            <firstName>Sylvester</firstName>
            <lastName>Martin</lastName>
            <segmentKey>new-york-city</segmentKey>
            <zipCode>11218</zipCode>
        </emailLead>
        <emailLead>
            <dateCreated>2011-08-05T20:17:34Z</dateCreated>
            <emailAddress>email@email.com</emailAddress>
            <firstName>Sylvester</firstName>
            <lastName>Martin</lastName>
            <segmentKey>dfw</segmentKey>
            <zipCode>75067</zipCode>
        </emailLead>
        <emailLead>
            <dateCreated>2011-06-18T13:17:08Z</dateCreated>
            <emailAddress>jkindrc1@groupcommerce.com</emailAddress>
            <firstName i:nil="true"/>
            <lastName i:nil="true"/>
            <segmentKey i:nil="true"/>
            <zipCode i:nil="true"/>
        </emailLead>
    </data>
</emailLeads>


Sample JSON Response:
{
    "errors": [],
    "lastPublished": "/Date(1312575734692)/",
    "success": true,
    "version": "2",
    "metaData": {
        "pageCount": 1,
        "pageNumber": 1,
        "pageSize": 10000,
        "totalItems": 3
    },
    "data": [
        {
            "dateCreated": "/Date(1312575529000)/",
            "emailAddress": "email@email.com",
            "firstName": "Sylvester",
            "lastName": "Martin",
            "segmentKey": "new-york-city",
            "zipCode": "11218"
        },
        {
            "dateCreated": "/Date(1312575454000)/",
            "emailAddress": "email@email.com",
            "firstName": "Sylvester",
            "lastName": "Martin",
            "segmentKey": "new-york-city",
            "zipCode": "11218"
        },
        {
            "dateCreated": "/Date(1308403028000)/",
            "emailAddress": "jkindrc1@groupcommerce.com",
            "firstName": null,
            "lastName": null,
            "segmentKey": null,
            "zipCode": null
        }
    ]
}

Comments