Skip to content

Latest commit

 

History

History
575 lines (397 loc) · 16.1 KB

MailingListApi.md

File metadata and controls

575 lines (397 loc) · 16.1 KB

Yoast\MyYoastApiClient\MailingListApi

All URIs are relative to https://my.yoast.test

Method HTTP request Description
checkGetRoute GET /api/Mailing-list/newsletter/tZhjyjwsYFUMPzNNhJaVADZZIrixRSbXOFgptZJyyK
getStatus GET /api/Mailing-list/status Get the subscription status.
isSubscribedToNewsletter GET /api/Mailing-list/isSubscribedToNewsletter Get the subscription status.
mailChimpWebhook POST /api/Mailing-list/newsletter/tZhjyjwsYFUMPzNNhJaVADZZIrixRSbXOFgptZJyyK Entry point for the mailchimp webhooks
mailblueWebhook POST /api/Mailing-list/newsletter/wALazNYUBfqZIeUDiqyzETbLdbkODeTCjKokMKcbJV Entry point for the mailblue webhooks
removeContactCustomField DELETE /api/Mailing-list/fieldValue Delete contact tags and/or fields.
setContactCustomField POST /api/Mailing-list/fieldValue Update contact tags and/or fields.
setContactTag POST /api/Mailing-list/contactTag Update contact tags and/or fields.
subscribe POST /api/Mailing-list/subscribe Subscribe contact to a mailing list.
subscribeToNewsletter POST /api/Mailing-list/subscribeToNewsletter Subscribe contact to the newsletter.
unsubscribe POST /api/Mailing-list/unsubscribe Unsubscribe to a mailing list.
unsubscribeFromNewsletter POST /api/Mailing-list/unsubscribeFromNewsletter Unsubscribe to a mailing list.

checkGetRoute

checkGetRoute()

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Yoast\MyYoastApiClient\Api\MailingListApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);

try {
    $apiInstance->checkGetRoute();
} catch (Exception $e) {
    echo 'Exception when calling MailingListApi->checkGetRoute: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getStatus

getStatus($email, $list)

Get the subscription status.

Get the subscription status for a contact and list name.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Yoast\MyYoastApiClient\Api\MailingListApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$email = "email_example"; // string | 
$list = "list_example"; // string | 

try {
    $apiInstance->getStatus($email, $list);
} catch (Exception $e) {
    echo 'Exception when calling MailingListApi->getStatus: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
email string
list string

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

isSubscribedToNewsletter

isSubscribedToNewsletter($email)

Get the subscription status.

Get the subscription status for a contact and list name.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Yoast\MyYoastApiClient\Api\MailingListApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$email = "email_example"; // string | 

try {
    $apiInstance->isSubscribedToNewsletter($email);
} catch (Exception $e) {
    echo 'Exception when calling MailingListApi->isSubscribedToNewsletter: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
email string

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

mailChimpWebhook

mailChimpWebhook()

Entry point for the mailchimp webhooks

Digests the mailchimp subscribe webhook response to subscribe a customer(contact) to a mailblue list

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Yoast\MyYoastApiClient\Api\MailingListApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);

try {
    $apiInstance->mailChimpWebhook();
} catch (Exception $e) {
    echo 'Exception when calling MailingListApi->mailChimpWebhook: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

mailblueWebhook

mailblueWebhook()

Entry point for the mailblue webhooks

Digests the mailblue webhook

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Yoast\MyYoastApiClient\Api\MailingListApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);

try {
    $apiInstance->mailblueWebhook();
} catch (Exception $e) {
    echo 'Exception when calling MailingListApi->mailblueWebhook: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

removeContactCustomField

removeContactCustomField($body)

Delete contact tags and/or fields.

Update contact tags and/or fields.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Yoast\MyYoastApiClient\Api\MailingListApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$body = new \Yoast\MyYoastApiClient\Model\FieldValueDto(); // \Yoast\MyYoastApiClient\Model\FieldValueDto | 

try {
    $apiInstance->removeContactCustomField($body);
} catch (Exception $e) {
    echo 'Exception when calling MailingListApi->removeContactCustomField: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \Yoast\MyYoastApiClient\Model\FieldValueDto

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

setContactCustomField

setContactCustomField($body)

Update contact tags and/or fields.

Update contact tags and/or fields.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Yoast\MyYoastApiClient\Api\MailingListApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$body = new \Yoast\MyYoastApiClient\Model\FieldValueDto(); // \Yoast\MyYoastApiClient\Model\FieldValueDto | 

try {
    $apiInstance->setContactCustomField($body);
} catch (Exception $e) {
    echo 'Exception when calling MailingListApi->setContactCustomField: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \Yoast\MyYoastApiClient\Model\FieldValueDto

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

setContactTag

setContactTag($body)

Update contact tags and/or fields.

Update contact tags and/or fields.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Yoast\MyYoastApiClient\Api\MailingListApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$body = new \Yoast\MyYoastApiClient\Model\TagDto(); // \Yoast\MyYoastApiClient\Model\TagDto | 

try {
    $apiInstance->setContactTag($body);
} catch (Exception $e) {
    echo 'Exception when calling MailingListApi->setContactTag: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \Yoast\MyYoastApiClient\Model\TagDto

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

subscribe

subscribe($body)

Subscribe contact to a mailing list.

subscribes a contact to a mailing list.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Yoast\MyYoastApiClient\Api\MailingListApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$body = new \Yoast\MyYoastApiClient\Model\SubscribeDto(); // \Yoast\MyYoastApiClient\Model\SubscribeDto | 

try {
    $apiInstance->subscribe($body);
} catch (Exception $e) {
    echo 'Exception when calling MailingListApi->subscribe: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \Yoast\MyYoastApiClient\Model\SubscribeDto

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

subscribeToNewsletter

subscribeToNewsletter()

Subscribe contact to the newsletter.

subscribes a contact to a mailing list.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Yoast\MyYoastApiClient\Api\MailingListApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);

try {
    $apiInstance->subscribeToNewsletter();
} catch (Exception $e) {
    echo 'Exception when calling MailingListApi->subscribeToNewsletter: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

unsubscribe

unsubscribe($body)

Unsubscribe to a mailing list.

Unsubscribes a contact to a mailing list.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Yoast\MyYoastApiClient\Api\MailingListApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$body = new \Yoast\MyYoastApiClient\Model\UnsubscribeDto(); // \Yoast\MyYoastApiClient\Model\UnsubscribeDto | 

try {
    $apiInstance->unsubscribe($body);
} catch (Exception $e) {
    echo 'Exception when calling MailingListApi->unsubscribe: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \Yoast\MyYoastApiClient\Model\UnsubscribeDto

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

unsubscribeFromNewsletter

unsubscribeFromNewsletter()

Unsubscribe to a mailing list.

Unsubscribes a contact to a mailing list.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Yoast\MyYoastApiClient\Api\MailingListApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);

try {
    $apiInstance->unsubscribeFromNewsletter();
} catch (Exception $e) {
    echo 'Exception when calling MailingListApi->unsubscribeFromNewsletter: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]