We all started somewhere! Share your experience on the Get Advice: Let's Get Started Sweepstakes thread and be entered to win a $100 credit on your Constant Contact account.

get all contacts info add (import) with bulk operation

imann4
Participant

get all contacts info add (import) with bulk operation

hi all

 

how  can i get all the contacts info added by bulk operation?

i need contact id created by constant contact.

(using php-sdk)

1 REPLY 1
Elijah_G
Member

Hello,

 

With the bulk import activity, there is not a method available to retrieve the contact IDs for those contacts that were just uploaded. If you would like to get IDs for contacts, then you would need to get the details of all contacts, or specifically requests the details of all contacts assigned to the lists included in your upload.

 

To get these contacts in the PHP SDK, you would use these two methods in the ConstantContact Class:

getContacts($accessToken, $params)

getContactsFromList($accessToken, $list, $params)

 

Both of these methods will return a ResultSet class that will contain pagination data that can be used to page the results. Here is a sample of how you can handle multiple pages of output:

        $result = $ctct->getContacts($accessToken,array("limit"=>"5"));
        $contacts = $result->results;
        while(isset($result->next)) {
            $result = $ctct->getContacts($accessToken, array("next"=>$result->next));
            $contacts = array_merge($contacts,$result->results);
        }

 

If you have any questions, please let us know!

 

Sincerely, 

Elijah G.
API Support Engineer
Developer Portal

View API documentation, code samples, get your API key.

Visit Page