Welcome‎ > ‎Version 3‎ > ‎Publisher Api‎ > ‎Methods‎ > ‎2 - Consumer Related‎ > ‎

Get Email Leads

Will retrieve a list of email leads from the system based on the query.  The result will be sorted by CreateDate descending.

Method: GET /api/v3/publisher/emailleads
Authentication: oauth
 
Parameters
Required QueryString Value
Explanation
No
PageSize
The number of records to return per page. Default is 100
No
PageNumberThe page number of records to return. Default is 1
NoDateRange
The date range to filter against the email leads.

Returns
base response fields
emailLeads - Will return a list of Email Lead.

Sample Request:

GET http://api.groupcommerce.com/api/v3/publisher/emailleads?pagenumber=1&pagesize=20&daterange=t1317427200-t1320105599

Authorization: OAuth oauth_signature="%2fgfRH1bwM6mGK6wMiJ%2b6t3OvMag%3d", oauth_nonce="4207487", oauth_timestamp="1319872429", oauth_consumer_key="eeb6b959-b854-4ad1-b563-e801c83cf81d", oauth_signature_method="HMAC-SHA1", oauth_version="1.0"

Sample JSON Response:

{
    "errors": [],
    "lastPublished": "/Date(1319851251455)/",
    "success": true,
    "version": "3",
    "metaData": {
        "pageCount": 21,
        "pageNumber": 3,
        "pageSize": 3,
        "totalItems": 63
    },
    "emailLeads": [
        {
            "dateCreated": "/Date(1319834893000)/",
            "emailAddress": "test@groupcommerce.com",
            "firstName": "Sylvester",
            "lastName": "Martin",
            "segmentKey": "national",
            "zipCode": "10001"
        },
        {
            "dateCreated": "/Date(1319568685000)/",
            "emailAddress": "mlee+dv1@groupcommerce.com",
            "firstName": null,
            "lastName": null,
            "segmentKey": "national",
            "zipCode": null
        },
        {
            "dateCreated": "/Date(1319483072000)/",
            "emailAddress": "jfairchild+1@groupcommerce.com",
            "firstName": "jeff",
            "lastName": "wdawdawda",
            "segmentKey": "new-york",
            "zipCode": "10012"
        }
    ]
}


Sample XML Response:

<getEmailLeadsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <errors/>
    <lastPublished>2011-10-29T01:21:24.3165547Z</lastPublished>
    <success>true</success>
    <version>3</version>
    <metaData>
        <pageCount>21</pageCount>
        <pageNumber>3</pageNumber>
        <pageSize>3</pageSize>
        <totalItems>63</totalItems>
    </metaData>
    <emailLeads>
        <emailLead>
            <dateCreated>2011-10-28T20:48:13Z</dateCreated>
            <emailAddress>test@groupcommerce.com</emailAddress>
            <firstName>Sylvester</firstName>
            <lastName>Martin</lastName>
            <segmentKey>national</segmentKey>
            <zipCode>10001</zipCode>
        </emailLead>
        <emailLead>
            <dateCreated>2011-10-25T18:51:25Z</dateCreated>
            <emailAddress>mlee+dv1@groupcommerce.com</emailAddress>
            <firstName i:nil="true"/>
            <lastName i:nil="true"/>
            <segmentKey>national</segmentKey>
            <zipCode i:nil="true"/>
        </emailLead>
        <emailLead>
            <dateCreated>2011-10-24T19:04:32Z</dateCreated>
            <emailAddress>jfairchild+1@groupcommerce.com</emailAddress>
            <firstName>jeff</firstName>
            <lastName>wdawdawda</lastName>
            <segmentKey>new-york</segmentKey>
            <zipCode>10012</zipCode>
        </emailLead>
    </emailLeads>
</getEmailLeadsResponse>
Comments