cancel
Showing results for 
Search instead for 
Did you mean: 
Due to an issue with YouTube, inserting videos in your emails is showing an error. Until they are able to resolve this issue, we recommend using a different video hosting service. We will continue to monitor this outage and update you as we have more information.

get all contacts info add (import) with bulk operation

Occasional Contributor

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
Honored Contributor

Re: get all contacts info add (import) with bulk operation

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