Skip to content

Latest commit

 

History

History
116 lines (78 loc) · 4.91 KB

File metadata and controls

116 lines (78 loc) · 4.91 KB

Krak\MagentoApiClient\CatalogBasePriceStorageV1Api

All URIs are relative to http://ce22.vg/index.php/rest/default

Method HTTP request Description
catalogBasePriceStorageV1GetPost POST /V1/products/base-prices-information
catalogBasePriceStorageV1UpdatePost POST /V1/products/base-prices

catalogBasePriceStorageV1GetPost

\Krak\MagentoApiClient\Model\CatalogDataBasePriceInterface[] catalogBasePriceStorageV1GetPost($catalogBasePriceStorageV1GetPostBody)

Return product prices. In case of at least one of skus is not found exception will be thrown.

Example

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

// Configure OAuth2 access token for authorization: OAuth2
$config = Krak\MagentoApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Krak\MagentoApiClient\Api\CatalogBasePriceStorageV1Api(
    // 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
);
$catalogBasePriceStorageV1GetPostBody = new \Krak\MagentoApiClient\Model\CatalogBasePriceStorageV1GetPostBody(); // \Krak\MagentoApiClient\Model\CatalogBasePriceStorageV1GetPostBody | 

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

Parameters

Name Type Description Notes
catalogBasePriceStorageV1GetPostBody \Krak\MagentoApiClient\Model\CatalogBasePriceStorageV1GetPostBody [optional]

Return type

\Krak\MagentoApiClient\Model\CatalogDataBasePriceInterface[]

Authorization

OAuth2

HTTP request headers

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

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

catalogBasePriceStorageV1UpdatePost

\Krak\MagentoApiClient\Model\CatalogDataPriceUpdateResultInterface[] catalogBasePriceStorageV1UpdatePost($catalogBasePriceStorageV1UpdatePostBody)

Add or update product prices. Input item should correspond \Magento\Catalog\Api\Data\CostInterface. If any items will have invalid price, store id or sku, they will be marked as failed and excluded from update list and \Magento\Catalog\Api\Data\PriceUpdateResultInterface[] with problem description will be returned. If there were no failed items during update empty array will be returned. If error occurred during the update exception will be thrown.

Example

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

// Configure OAuth2 access token for authorization: OAuth2
$config = Krak\MagentoApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Krak\MagentoApiClient\Api\CatalogBasePriceStorageV1Api(
    // 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
);
$catalogBasePriceStorageV1UpdatePostBody = new \Krak\MagentoApiClient\Model\CatalogBasePriceStorageV1UpdatePostBody(); // \Krak\MagentoApiClient\Model\CatalogBasePriceStorageV1UpdatePostBody | 

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

Parameters

Name Type Description Notes
catalogBasePriceStorageV1UpdatePostBody \Krak\MagentoApiClient\Model\CatalogBasePriceStorageV1UpdatePostBody [optional]

Return type

\Krak\MagentoApiClient\Model\CatalogDataPriceUpdateResultInterface[]

Authorization

OAuth2

HTTP request headers

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

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