All URIs are relative to https://my.yoast.test
Method | HTTP request | Description |
---|---|---|
customerFromWooCommerce | PUT /api/Customers/fromWooCommerce | Update or create a customer |
orderFromWooCommerce | PUT /api/Orders/fromWooCommerce | Sync orders to MyYoast. |
productFromWooCommerce | PUT /api/Products/fromWooCommerce | Sync products to MyYoast. |
productGroupFromWooCommerce | PUT /api/ProductGroups/fromWooCommerce | Sync products to MyYoast. |
\Yoast\MyYoastApiClient\Model\Customer customerFromWooCommerce($body)
Update or create a customer
This endpoint can be used by WooCommerce to update or create a customer in the MyYoast database.
<?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\FromWooCommerceApi(
// 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\CustomerFromWooDto(); // \Yoast\MyYoastApiClient\Model\CustomerFromWooDto |
try {
$result = $apiInstance->customerFromWooCommerce($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FromWooCommerceApi->customerFromWooCommerce: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Yoast\MyYoastApiClient\Model\CustomerFromWooDto |
\Yoast\MyYoastApiClient\Model\Customer
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Yoast\MyYoastApiClient\Model\Order orderFromWooCommerce($body)
Sync orders to MyYoast.
This route allows WooCommerce to sync order data to MyYoast.
<?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\FromWooCommerceApi(
// 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\OrderFromWooDto(); // \Yoast\MyYoastApiClient\Model\OrderFromWooDto |
try {
$result = $apiInstance->orderFromWooCommerce($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FromWooCommerceApi->orderFromWooCommerce: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Yoast\MyYoastApiClient\Model\OrderFromWooDto |
\Yoast\MyYoastApiClient\Model\Order
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Yoast\MyYoastApiClient\Model\Product productFromWooCommerce($body)
Sync products to MyYoast.
This route allows WooCommerce to sync product data to MyYoast.
<?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\FromWooCommerceApi(
// 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\ProductFromWooDto(); // \Yoast\MyYoastApiClient\Model\ProductFromWooDto |
try {
$result = $apiInstance->productFromWooCommerce($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FromWooCommerceApi->productFromWooCommerce: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Yoast\MyYoastApiClient\Model\ProductFromWooDto |
\Yoast\MyYoastApiClient\Model\Product
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Yoast\MyYoastApiClient\Model\ProductGroup productGroupFromWooCommerce($body)
Sync products to MyYoast.
This route allows WooCommerce to sync product data to MyYoast.
<?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\FromWooCommerceApi(
// 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\ProductGroupFromWooDto(); // \Yoast\MyYoastApiClient\Model\ProductGroupFromWooDto |
try {
$result = $apiInstance->productGroupFromWooCommerce($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FromWooCommerceApi->productGroupFromWooCommerce: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Yoast\MyYoastApiClient\Model\ProductGroupFromWooDto |
\Yoast\MyYoastApiClient\Model\ProductGroup
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]