marketingplatform/api_parser_v2

PHP class for using our company's API v2 as part of the subscription

2.0 2021-01-27 20:03 UTC

This package is auto-updated.

Last update: 2024-04-21 07:02:16 UTC


README

PHP class for using our company's API v2 as part of the subscription.


Installation

Run following command in terminal from the root of your project:

composer require marketingplatform/api_parser_v2

You can load dependencies by adding these lines to your code:

require_once 'vendor/marketingplatform/api_parser/src/settings.php';
require_once 'vendor/marketingplatform/api_parser/src/ApiParser.class.php';

How to use

  1. Set up your API credentials (apiusername & apitoken) into settings.php
  2. Create instance from ApiParser.class.php
$parser = new ApiParser($settings);
  1. Call method from ApiParser
$listid = 24;
$emailaddress = "contact@marketingplatform.com";
$mobileNumber = "72444444";
$mobilePrefix = "45";
$confirmed = false;
$addToAutoreposnders = false;

$result = $parser->AddProfileToList($listid, $emailaddress, $mobileNumber, $mobilePrefix, $confirmed, $addToAutoreposnders);

print_r($result);

Changelog: