Skip to content

alainhl/getresponse-api-php

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Overview

GetResponse API v3 wrapper working on PHP 5.2+. Here you can find our api documentation.

##Examples

Standard authorization

$getresponse = new GetResponse('your_api_key');

--

Enterprise authorization

$getresponse = new GetResponse('your_api_key');
$getresponse->enterprise_domain = 'somedomain.com';

//api URL is relative to your domain UR:
$getresponse->api_url = 'https://api3.getresponse360.pl/v3'; //for PL domains
$getresponse->api_url = 'https://api3.getresponse360.com/v3'; //default

-- Search contacts

$result = $getresponse->getContacts(array(
	'query' => array(
		'email' => '@getresponse.com',
	),
	'fields' => 'name,email'
));

Add contact

$getresponse->addContact(array(
    'name'              => 'Jon Smith',
    'email'             => '[email protected]',
    'dayOfCycle'        => 0,
    'campaign'          => array('campaignId' => 'campaign_id_obtained_by_API'),
    'ipAddress'         => '89.206.31.190',
    'customFieldValues' => array(
        array('customFieldId' => 'custom_field_id_obtained_by_API',
            'value' => array(
                'Y'
            )),
         array('customFieldId' => 'custom_field_id_obtained_by_API',
            'value' => array(
                'Y'
            ))
    )
));

-- Send message

$result = $getresponse->sendNewsletter(array(
				"subject" => 'Test subject',
				"fromField" => array('fromFieldId' => 'from_field_id'),
				"content" => array(
					'html' => 'Test newsletter contetnt.'
				),
				"sendSettings" => array(
					"selectedContacts" => array('contact_id_obtained_by_API')
			)
    ));

-- Add custom field

$getresponse->setCustomField(array(
				'name' => 'custom_name',
				'type' => 'text',
				'hidden' => 'false',
    ));

-- List saved search

$result = $getresponse->searchContacts();

-- List new web forms

$result = $getresponse->getForms();

-- List old web forms

$result = $getresponse->getWebForms();

About

GetResponse API v3 wrapper.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%