Model/Apiconnector/Client.php
public function postCampaignsSend($campaignId, $contacts)
    {
        $data = [
            'username' => $this->getApiUsername(),
            'password' => $this->getApiPassword(),
            'campaignId' => $campaignId,
            'ContactIds' => $contacts,
        ];
        $this->setUrl($this->getApiEndpoint() . self::REST_CAMPAIGN_SEND)
            ->setVerb('POST')
            ->buildPostBody($data);

        $response = $this->execute();
        if (isset($response->message)) {
            unset($data['password']);
            $message = 'SENDING CAMPAIGN ' . $response->message;
            $this->helper->debug('postCampaignsSend', [$message]);
            $this->helper->debug('postCampaignsSend', $data);
        }

        return $response;
    }
public function postCampaignsSend($campaignId, $contacts)
    {
        $data = [
            'username' => $this->getApiUsername(),
            'password' => $this->getApiPassword(),
            'campaignId' => $campaignId,
            'ContactIds' => $contacts,
        ];
        $this->setUrl($this->getApiEndpoint() . self::REST_CAMPAIGN_SEND)
            ->setVerb('POST')
            ->buildPostBody($data);

        $response = $this->execute();
        if (isset($response->message)) {
            unset($data['password']);
            $message = 'SENDING CAMPAIGN ' . $response->message;
            $this->helper->debug('postCampaignsSend', [$message]);
            $this->helper->debug('postCampaignsSend', $data);
        }

        return $response;
    }
public function postCampaignsSend ( $ campaignId , $ contacts ) { $ data = [ 'username' => $ this -> getApiUsername ( ) , 'password' => $ this -> getApiPassword ( ) , 'campaignId' => $ campaignId , 'ContactIds' => $ contacts , ] ; $ this -> setUrl ( $ this -> getApiEndpoint ( ) . self :: REST_CAMPAIGN_SEND ) -> setVerb ( 'POST' ) -> buildPostBody ( $ data ) ; $ response = $ this -> execute ( ) ; if ( isset ( $ response -> message ) ) { unset ( $ data [ 'password' ] ) ; $ message = 'SENDING CAMPAIGN ' . $ response -> message ; $ this -> helper -> debug ( 'postCampaignsSend' , [ $ message ] ) ; $ this -> helper -> debug ( 'postCampaignsSend' , $ data ) ; } return $ response ; }
Sends a specified campaign to one or more address books, segments or contacts at a specified time.
Leave the address book array empty to send to All Contacts.

@param int $campaignId
@param array $contacts

@return mixed
Sends a specified campaign to one or more address books segments or contacts at a specified time . Leave the address book array empty to send to All Contacts .