mc-test/marketing

dev-master 2020-07-25 18:12 UTC

This package is not auto-updated.

Last update: 2024-09-28 14:43:02 UTC


README

The official PHP SDK for the Mailchimp Marketing API

Installation

Option 1: Install via Packagist

composer require mailchimp/marketing

Or add the following to composer.json

{
  "require": {
    "mailchimp/marketing": "*"
  }
}

Install all composer dependencies using:

composer install

Option 2: Install Manually

Clone the repo

git clone git@github.com:postlight/mailchimp-marketing-php.git

In the SDK project root, install all dependencies

composer install

Manually include vendor/autoload.php in your implementation

require_once('/path/to/MailchimpMarketing/vendor/autoload.php');

Quick Start

require_once('/path/to/MailchimpMarketing/vendor/autoload.php');

$mailchimp = new MailchimpMarketing\ApiClient();

$mailchimp->setConfig([
  'apiKey' => 'YOUR_API_KEY',
  'server' => 'YOUR_SERVER_PREFIX'
]);

$response = $mailchimp->ping->get();
print_r($response);

API Endpoints

All URIs are relative to https://server.api.mailchimp.com/3.0