Skip to content

Latest commit

 

History

History
2189 lines (1560 loc) · 68 KB

CustomerApi.md

File metadata and controls

2189 lines (1560 loc) · 68 KB

Yoast\MyYoastApiClient\CustomerApi

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

Method HTTP request Description
activate POST /api/Customers/activate Activate the account of a user
addRole POST /api/Customers/{id}/roleMapping
cancelSubscription POST /api/Customers/{customerId}/subscriptions/{id}/cancel Cancel (part of) a subscription.
changePassword PATCH /api/Customers/{id}/password Update a customer's password in WordPress
createAccessToken POST /api/Customers/{id}/accessTokens Create an access token for a user
createAccount POST /api/Customers/create-account Creates an account for a customer on yoast.com without the signup flow.
createSite POST /api/Customers/{customerId}/sites Create a site for a user
current GET /api/Customers/current Get the current customer
deleteCustomer DELETE /api/Customers/{id}/gdpr-delete Performs a "GDPR forget me" request.
deleteRole DELETE /api/Customers/{id}/roleMapping
downloadProfile GET /api/Customers/{id}/download Download profile.
enable POST /api/Customers/{id}/enable Enables the customer with the given ID
findRefunds GET /api/Customers/{id}/findRefunds Find refunds for user
getAllRoles GET /api/Customers/allroles Get all existing roles with their ID.
getBuyerCourseEnrollments GET /api/Customers/{customerId}/buyerCourseEnrollments Find Course Enrollments that a customer is buyer of
getCourseAccessList GET /api/Customers/academyCourseAccessList/{sourceId} Academy Course access
getCourseAccessListByCustomerId GET /api/Customers/academyCourseAccessListByCustomerId/{customerId} Academy Course access
getCourseEnrollments GET /api/Customers/{customerId}/courseEnrollments Find Course Enrollments
getCustomersWithRole GET /api/Customers/rolemapping-ids Get the ids of all customers with at least one role.
getMany GET /api/Customers/{customerId}/composerTokens Get composer tokens
getManyPaged GET /api/Customers/paged Get customers
getMany_0 GET /api/Customers/{customerId}/subscriptions Get subscriptions
getMany_1 GET /api/Customers/{customerId}/sites Get sites
getMany_2 GET /api/Customers/{customerId}/orders Get orders
getMany_3 GET /api/Customers/{id}/roles
getMany_4 GET /api/Customers/{customerId}/identities Get user identities
getMany_5 GET /api/Customers Get customers
getMany_6 GET /api/Customers/{customerId}/licenses Get licenses
getOne GET /api/Customers/{customerId}/composerTokens/{id} Get a composer token
getOne_0 GET /api/Customers/{customerId}/subscriptions/{id} Get a subscriptions
getOne_1 GET /api/Customers/{customerId}/sites/{id} Get a site
getOne_2 GET /api/Customers/{customerId}/orders/{id} Get a order
getOne_3 GET /api/Customers/{id} Get a customer
getStudentCourseEnrollments GET /api/Customers/{customerId}/studentCourseEnrollments Find Course Enrollments that a customer is student in
patchProfile PATCH /api/Customers/{id}/profile Update a customer to WordPress
profile GET /api/Customers/{id}/profile
resetPassword PATCH /api/Customers/resetPassword Reset the user's password.
sendResetPasswordEmail POST /api/Customers/sendResetPasswordEmail Send a reset password email to the user.
signup POST /api/Customers/signup Signup a customer on yoast.com following the normal signup flow.
updateOne PATCH /api/Customers/{id}

activate

\Yoast\MyYoastApiClient\Model\ActivateAccountResponseDto activate($body)

Activate the account of a user

This route can be used to activate the account of a new user.

Example

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

$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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\ActivateAccountDto(); // \Yoast\MyYoastApiClient\Model\ActivateAccountDto | 

try {
    $result = $apiInstance->activate($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->activate: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

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

Return type

\Yoast\MyYoastApiClient\Model\ActivateAccountResponseDto

Authorization

No authorization required

HTTP request headers

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

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

addRole

addRole($body, $id)

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);
$body = new \Yoast\MyYoastApiClient\Model\RoleIDDto(); // \Yoast\MyYoastApiClient\Model\RoleIDDto | 
$id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 

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

Parameters

Name Type Description Notes
body \Yoast\MyYoastApiClient\Model\RoleIDDto
id string

Return type

void (empty response body)

Authorization

bearer

HTTP request headers

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

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

cancelSubscription

\Yoast\MyYoastApiClient\Model\UnspecifiedResponseDto cancelSubscription($body, $customerId, $id)

Cancel (part of) a subscription.

Communicates a (partial) subscription to yoast.com.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);
$body = new \Yoast\MyYoastApiClient\Model\CancelSubscriptionBodyDto(); // \Yoast\MyYoastApiClient\Model\CancelSubscriptionBodyDto | 
$customerId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 
$id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 

try {
    $result = $apiInstance->cancelSubscription($body, $customerId, $id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->cancelSubscription: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \Yoast\MyYoastApiClient\Model\CancelSubscriptionBodyDto
customerId string
id string

Return type

\Yoast\MyYoastApiClient\Model\UnspecifiedResponseDto

Authorization

bearer

HTTP request headers

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

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

changePassword

\Yoast\MyYoastApiClient\Model\Customer changePassword($body, $id)

Update a customer's password in WordPress

This route allows a customer to updates their password on WordPress.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);
$body = new \Yoast\MyYoastApiClient\Model\ChangePasswordDto(); // \Yoast\MyYoastApiClient\Model\ChangePasswordDto | 
$id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 

try {
    $result = $apiInstance->changePassword($body, $id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->changePassword: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \Yoast\MyYoastApiClient\Model\ChangePasswordDto
id string

Return type

\Yoast\MyYoastApiClient\Model\Customer

Authorization

bearer

HTTP request headers

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

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

createAccessToken

createAccessToken($id)

Create an access token for a user

Example

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

$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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()
);
$id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 

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

Parameters

Name Type Description Notes
id 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]

createAccount

\Yoast\MyYoastApiClient\Model\UnspecifiedResponseDto createAccount($body)

Creates an account for a customer on yoast.com without the signup flow.

Using this route, a new account can be created on yoast.com. The customer will receive a set-password mail.

Example

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

$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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\CreateAccountDto(); // \Yoast\MyYoastApiClient\Model\CreateAccountDto | 

try {
    $result = $apiInstance->createAccount($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->createAccount: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

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

Return type

\Yoast\MyYoastApiClient\Model\UnspecifiedResponseDto

Authorization

No authorization required

HTTP request headers

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

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

createSite

\Yoast\MyYoastApiClient\Model\Site createSite($body, $customerId)

Create a site for a user

Create a site record so we can link a subscription to a site which is linked to a customer

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);
$body = new \Yoast\MyYoastApiClient\Model\CreateSiteBodyDto(); // \Yoast\MyYoastApiClient\Model\CreateSiteBodyDto | 
$customerId = "customerId_example"; // string | 

try {
    $result = $apiInstance->createSite($body, $customerId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->createSite: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \Yoast\MyYoastApiClient\Model\CreateSiteBodyDto
customerId string

Return type

\Yoast\MyYoastApiClient\Model\Site

Authorization

bearer

HTTP request headers

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

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

current

\Yoast\MyYoastApiClient\Model\Customer current()

Get the current customer

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);

try {
    $result = $apiInstance->current();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->current: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

\Yoast\MyYoastApiClient\Model\Customer

Authorization

bearer

HTTP request headers

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

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

deleteCustomer

string deleteCustomer($id)

Performs a "GDPR forget me" request.

Deletes and/or obfuscates all data related to a customer, except order data that we legally need to generate invoices.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);
$id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 

try {
    $result = $apiInstance->deleteCustomer($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->deleteCustomer: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id string

Return type

string

Authorization

bearer

HTTP request headers

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

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

deleteRole

deleteRole($body, $id)

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);
$body = new \Yoast\MyYoastApiClient\Model\RoleIDDto(); // \Yoast\MyYoastApiClient\Model\RoleIDDto | 
$id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 

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

Parameters

Name Type Description Notes
body \Yoast\MyYoastApiClient\Model\RoleIDDto
id string

Return type

void (empty response body)

Authorization

bearer

HTTP request headers

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

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

downloadProfile

\Yoast\MyYoastApiClient\Model\JSZip downloadProfile($id)

Download profile.

Downloads the data of the given customer as CSV files inside a ZIP file.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);
$id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 

try {
    $result = $apiInstance->downloadProfile($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->downloadProfile: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id string

Return type

\Yoast\MyYoastApiClient\Model\JSZip

Authorization

bearer

HTTP request headers

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

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

enable

\Yoast\MyYoastApiClient\Model\UnspecifiedResponseDto enable($id)

Enables the customer with the given ID

Used when customers accidentally disable their own account

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);
$id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 

try {
    $result = $apiInstance->enable($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->enable: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id string

Return type

\Yoast\MyYoastApiClient\Model\UnspecifiedResponseDto

Authorization

bearer

HTTP request headers

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

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

findRefunds

\Yoast\MyYoastApiClient\Model\Refund[] findRefunds($id)

Find refunds for user

Find the refunds for provided user id.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);
$id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 

try {
    $result = $apiInstance->findRefunds($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->findRefunds: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id string

Return type

\Yoast\MyYoastApiClient\Model\Refund[]

Authorization

bearer

HTTP request headers

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

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

getAllRoles

\Yoast\MyYoastApiClient\Model\UnspecifiedResponseDto getAllRoles()

Get all existing roles with their ID.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);

try {
    $result = $apiInstance->getAllRoles();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->getAllRoles: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

\Yoast\MyYoastApiClient\Model\UnspecifiedResponseDto

Authorization

bearer

HTTP request headers

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

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

getBuyerCourseEnrollments

\Yoast\MyYoastApiClient\Model\CourseEnrollment[] getBuyerCourseEnrollments($customerId)

Find Course Enrollments that a customer is buyer of

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);
$customerId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 

try {
    $result = $apiInstance->getBuyerCourseEnrollments($customerId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->getBuyerCourseEnrollments: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customerId string

Return type

\Yoast\MyYoastApiClient\Model\CourseEnrollment[]

Authorization

bearer

HTTP request headers

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

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

getCourseAccessList

\Yoast\MyYoastApiClient\Model\AcademyCourseAccessListDto getCourseAccessList($sourceId)

Academy Course access

A list of Course IDs the customer has access to. Alongside some data in the case of shopify.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);
$sourceId = 56; // int | The WordPress User ID to retrieve the course IDs for.

try {
    $result = $apiInstance->getCourseAccessList($sourceId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->getCourseAccessList: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
sourceId int The WordPress User ID to retrieve the course IDs for.

Return type

\Yoast\MyYoastApiClient\Model\AcademyCourseAccessListDto

Authorization

bearer

HTTP request headers

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

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

getCourseAccessListByCustomerId

\Yoast\MyYoastApiClient\Model\AcademyCourseAccessListDto getCourseAccessListByCustomerId($customerId)

Academy Course access

A list of Course IDs the customer has access to. Alongside some data in the case of shopify.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);
$customerId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 

try {
    $result = $apiInstance->getCourseAccessListByCustomerId($customerId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->getCourseAccessListByCustomerId: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customerId string

Return type

\Yoast\MyYoastApiClient\Model\AcademyCourseAccessListDto

Authorization

bearer

HTTP request headers

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

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

getCourseEnrollments

\Yoast\MyYoastApiClient\Model\CourseEnrollment[] getCourseEnrollments($customerId, $ownershipRelation, $courseId)

Find Course Enrollments

Find Course Enrollments and filter by course or ownership relation.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);
$customerId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 
$ownershipRelation = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 
$courseId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 

try {
    $result = $apiInstance->getCourseEnrollments($customerId, $ownershipRelation, $courseId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->getCourseEnrollments: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customerId string
ownershipRelation string
courseId string [optional]

Return type

\Yoast\MyYoastApiClient\Model\CourseEnrollment[]

Authorization

bearer

HTTP request headers

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

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

getCustomersWithRole

string[] getCustomersWithRole()

Get the ids of all customers with at least one role.

Requires the caller to have the admin role.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);

try {
    $result = $apiInstance->getCustomersWithRole();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->getCustomersWithRole: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

string[]

Authorization

bearer

HTTP request headers

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

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

getMany

\Yoast\MyYoastApiClient\Model\ComposerToken[] getMany($customerId, $filter)

Get composer tokens

Get and filter composer tokens of a customer

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);
$customerId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 
$filter = new \stdClass; // object | Used for filtering/joining the results.

try {
    $result = $apiInstance->getMany($customerId, $filter);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->getMany: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customerId string
filter object Used for filtering/joining the results. [optional]

Return type

\Yoast\MyYoastApiClient\Model\ComposerToken[]

Authorization

bearer

HTTP request headers

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

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

getManyPaged

getManyPaged($filter)

Get customers

Get and filter customer

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);
$filter = new \stdClass; // object | Used for filtering/joining the results.

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

Parameters

Name Type Description Notes
filter object Used for filtering/joining the results. [optional]

Return type

void (empty response body)

Authorization

bearer

HTTP request headers

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

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

getMany_0

\Yoast\MyYoastApiClient\Model\Subscription[] getMany_0($customerId, $filter)

Get subscriptions

Get and filter subscriptions of a customer

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);
$customerId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 
$filter = new \stdClass; // object | Used for filtering/joining the results.

try {
    $result = $apiInstance->getMany_0($customerId, $filter);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->getMany_0: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customerId string
filter object Used for filtering/joining the results. [optional]

Return type

\Yoast\MyYoastApiClient\Model\Subscription[]

Authorization

bearer

HTTP request headers

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

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

getMany_1

\Yoast\MyYoastApiClient\Model\Site[] getMany_1($customerId, $filter)

Get sites

Get and filter sites of a customer

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);
$customerId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 
$filter = new \stdClass; // object | Used for filtering/joining the results.

try {
    $result = $apiInstance->getMany_1($customerId, $filter);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->getMany_1: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customerId string
filter object Used for filtering/joining the results. [optional]

Return type

\Yoast\MyYoastApiClient\Model\Site[]

Authorization

bearer

HTTP request headers

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

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

getMany_2

\Yoast\MyYoastApiClient\Model\Order[] getMany_2($customerId, $filter)

Get orders

Get and filter orders of a customer

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);
$customerId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 
$filter = new \stdClass; // object | Used for filtering/joining the results.

try {
    $result = $apiInstance->getMany_2($customerId, $filter);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->getMany_2: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customerId string
filter object Used for filtering/joining the results. [optional]

Return type

\Yoast\MyYoastApiClient\Model\Order[]

Authorization

bearer

HTTP request headers

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

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

getMany_3

getMany_3($id)

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);
$id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 

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

Parameters

Name Type Description Notes
id string

Return type

void (empty response body)

Authorization

bearer

HTTP request headers

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

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

getMany_4

\Yoast\MyYoastApiClient\Model\UserIdentity[] getMany_4($customerId, $filter)

Get user identities

Get and filter user identities of a customer

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);
$customerId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 
$filter = new \stdClass; // object | Used for filtering/joining the results.

try {
    $result = $apiInstance->getMany_4($customerId, $filter);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->getMany_4: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customerId string
filter object Used for filtering/joining the results. [optional]

Return type

\Yoast\MyYoastApiClient\Model\UserIdentity[]

Authorization

bearer

HTTP request headers

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

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

getMany_5

\Yoast\MyYoastApiClient\Model\Customer[] getMany_5($filter)

Get customers

Get and filter customers

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);
$filter = new \stdClass; // object | Used for filtering/joining the results.

try {
    $result = $apiInstance->getMany_5($filter);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->getMany_5: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
filter object Used for filtering/joining the results. [optional]

Return type

\Yoast\MyYoastApiClient\Model\Customer[]

Authorization

bearer

HTTP request headers

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

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

getMany_6

\Yoast\MyYoastApiClient\Model\License[] getMany_6($customerId, $filter)

Get licenses

Get and filter licenses of a customer

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);
$customerId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 
$filter = new \stdClass; // object | Used for filtering/joining the results.

try {
    $result = $apiInstance->getMany_6($customerId, $filter);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->getMany_6: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customerId string
filter object Used for filtering/joining the results. [optional]

Return type

\Yoast\MyYoastApiClient\Model\License[]

Authorization

bearer

HTTP request headers

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

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

getOne

\Yoast\MyYoastApiClient\Model\ComposerToken getOne($customerId, $id, $filter)

Get a composer token

Get a single composer token of a customer

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);
$customerId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 
$id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 
$filter = new \stdClass; // object | Used for filtering/joining the results.

try {
    $result = $apiInstance->getOne($customerId, $id, $filter);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->getOne: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customerId string
id string
filter object Used for filtering/joining the results. [optional]

Return type

\Yoast\MyYoastApiClient\Model\ComposerToken

Authorization

bearer

HTTP request headers

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

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

getOne_0

\Yoast\MyYoastApiClient\Model\Subscription getOne_0($customerId, $id, $filter)

Get a subscriptions

Get a single subscriptions of a customer

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);
$customerId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 
$id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 
$filter = new \stdClass; // object | Used for filtering/joining the results.

try {
    $result = $apiInstance->getOne_0($customerId, $id, $filter);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->getOne_0: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customerId string
id string
filter object Used for filtering/joining the results. [optional]

Return type

\Yoast\MyYoastApiClient\Model\Subscription

Authorization

bearer

HTTP request headers

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

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

getOne_1

\Yoast\MyYoastApiClient\Model\Site getOne_1($customerId, $id, $filter)

Get a site

Get a single site of a customer

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);
$customerId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 
$id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 
$filter = new \stdClass; // object | Used for filtering/joining the results.

try {
    $result = $apiInstance->getOne_1($customerId, $id, $filter);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->getOne_1: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customerId string
id string
filter object Used for filtering/joining the results. [optional]

Return type

\Yoast\MyYoastApiClient\Model\Site

Authorization

bearer

HTTP request headers

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

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

getOne_2

\Yoast\MyYoastApiClient\Model\Order getOne_2($customerId, $id, $filter)

Get a order

Get a single order of a customer

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);
$customerId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 
$id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 
$filter = new \stdClass; // object | Used for filtering/joining the results.

try {
    $result = $apiInstance->getOne_2($customerId, $id, $filter);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->getOne_2: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customerId string
id string
filter object Used for filtering/joining the results. [optional]

Return type

\Yoast\MyYoastApiClient\Model\Order

Authorization

bearer

HTTP request headers

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

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

getOne_3

\Yoast\MyYoastApiClient\Model\Customer getOne_3($id, $filter)

Get a customer

Get a single customer

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);
$id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 
$filter = new \stdClass; // object | Used for filtering/joining the results.

try {
    $result = $apiInstance->getOne_3($id, $filter);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->getOne_3: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id string
filter object Used for filtering/joining the results. [optional]

Return type

\Yoast\MyYoastApiClient\Model\Customer

Authorization

bearer

HTTP request headers

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

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

getStudentCourseEnrollments

\Yoast\MyYoastApiClient\Model\CourseEnrollment[] getStudentCourseEnrollments($customerId)

Find Course Enrollments that a customer is student in

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);
$customerId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 

try {
    $result = $apiInstance->getStudentCourseEnrollments($customerId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->getStudentCourseEnrollments: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customerId string

Return type

\Yoast\MyYoastApiClient\Model\CourseEnrollment[]

Authorization

bearer

HTTP request headers

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

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

patchProfile

\Yoast\MyYoastApiClient\Model\Customer patchProfile($body, $id)

Update a customer to WordPress

This route allows a customer to updates their profile on WordPress.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);
$body = new \Yoast\MyYoastApiClient\Model\UpdateUserToWordpressDto(); // \Yoast\MyYoastApiClient\Model\UpdateUserToWordpressDto | 
$id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 

try {
    $result = $apiInstance->patchProfile($body, $id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->patchProfile: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \Yoast\MyYoastApiClient\Model\UpdateUserToWordpressDto
id string

Return type

\Yoast\MyYoastApiClient\Model\Customer

Authorization

bearer

HTTP request headers

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

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

profile

\Yoast\MyYoastApiClient\Model\UnspecifiedResponseDto profile($id)

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);
$id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 

try {
    $result = $apiInstance->profile($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->profile: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id string

Return type

\Yoast\MyYoastApiClient\Model\UnspecifiedResponseDto

Authorization

bearer

HTTP request headers

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

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

resetPassword

\Yoast\MyYoastApiClient\Model\UnspecifiedResponseDto resetPassword($body)

Reset the user's password.

This route allows a user to reset its password.

Example

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

$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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\ResetPasswordDto(); // \Yoast\MyYoastApiClient\Model\ResetPasswordDto | 

try {
    $result = $apiInstance->resetPassword($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->resetPassword: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

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

Return type

\Yoast\MyYoastApiClient\Model\UnspecifiedResponseDto

Authorization

No authorization required

HTTP request headers

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

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

sendResetPasswordEmail

\Yoast\MyYoastApiClient\Model\UnspecifiedResponseDto sendResetPasswordEmail($body)

Send a reset password email to the user.

Use yoast.com to send a password reset email to the user email specified in the request body.

Example

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

$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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\SendResetPasswordEmailDto(); // \Yoast\MyYoastApiClient\Model\SendResetPasswordEmailDto | 

try {
    $result = $apiInstance->sendResetPasswordEmail($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->sendResetPasswordEmail: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

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

Return type

\Yoast\MyYoastApiClient\Model\UnspecifiedResponseDto

Authorization

No authorization required

HTTP request headers

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

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

signup

\Yoast\MyYoastApiClient\Model\UnspecifiedResponseDto signup($body)

Signup a customer on yoast.com following the normal signup flow.

Using this route, a new account can be created on yoast.com

Example

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

$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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\SignupAccountDto(); // \Yoast\MyYoastApiClient\Model\SignupAccountDto | 

try {
    $result = $apiInstance->signup($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->signup: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

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

Return type

\Yoast\MyYoastApiClient\Model\UnspecifiedResponseDto

Authorization

No authorization required

HTTP request headers

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

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

updateOne

updateOne($body, $id)

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\CustomerApi(
    // 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(),
    $config
);
$body = new \Yoast\MyYoastApiClient\Model\UpdateUserDto(); // \Yoast\MyYoastApiClient\Model\UpdateUserDto | 
$id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 

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

Parameters

Name Type Description Notes
body \Yoast\MyYoastApiClient\Model\UpdateUserDto
id string

Return type

void (empty response body)

Authorization

bearer

HTTP request headers

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

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