Coder Social home page Coder Social logo

getresponse-api-php's Introduction

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();

getresponse-api-php's People

Contributors

pmaslak avatar alainhl avatar gstruczynski avatar montewski avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.