Skip to content

Latest commit

 

History

History
201 lines (132 loc) · 7.03 KB

File metadata and controls

201 lines (132 loc) · 7.03 KB

criteo\api\marketingsolutions\preview\CatalogApi

All URIs are relative to https://api.criteo.com, except if the operation defines another base path.

Method HTTP request Description
previewCatalogProductsBatchPost() POST /preview/catalog/products/batch
previewCatalogProductsBatchReportOperationTokenGet() GET /preview/catalog/products/batch/report/{operation-token}
previewCatalogStatsMerchantsMerchantIdGet() GET /preview/catalog/stats/merchants/{merchant-id}

previewCatalogProductsBatchPost()

previewCatalogProductsBatchPost($products_custom_batch_request): \criteo\api\marketingsolutions\preview\Model\BatchAcceptedResponse

Used to publish a batch of operations to insert, update and deletes products. The batch is processed asynchronously.The response provides an operationToken which can be used to track the status of the report of the operation.

Example

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


// Configure OAuth2 access token for authorization: oauth
$config = criteo\api\marketingsolutions\preview\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Configure OAuth2 access token for authorization: oauth
$config = criteo\api\marketingsolutions\preview\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new criteo\api\marketingsolutions\preview\Api\CatalogApi(
    // 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
);
$products_custom_batch_request = new \criteo\api\marketingsolutions\preview\Model\ProductsCustomBatchRequest(); // \criteo\api\marketingsolutions\preview\Model\ProductsCustomBatchRequest

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

Parameters

Name Type Description Notes
products_custom_batch_request \criteo\api\marketingsolutions\preview\Model\ProductsCustomBatchRequest

Return type

\criteo\api\marketingsolutions\preview\Model\BatchAcceptedResponse

Authorization

oauth, oauth

HTTP request headers

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

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

previewCatalogProductsBatchReportOperationTokenGet()

previewCatalogProductsBatchReportOperationTokenGet($operation_token): \criteo\api\marketingsolutions\preview\Model\ReportOkResponse

Get the report of an asynchronous batch operation previously requested

Example

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


// Configure OAuth2 access token for authorization: oauth
$config = criteo\api\marketingsolutions\preview\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Configure OAuth2 access token for authorization: oauth
$config = criteo\api\marketingsolutions\preview\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new criteo\api\marketingsolutions\preview\Api\CatalogApi(
    // 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
);
$operation_token = 'operation_token_example'; // string | The token returned by the batch endpoint.

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

Parameters

Name Type Description Notes
operation_token string The token returned by the batch endpoint.

Return type

\criteo\api\marketingsolutions\preview\Model\ReportOkResponse

Authorization

oauth, oauth

HTTP request headers

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

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

previewCatalogStatsMerchantsMerchantIdGet()

previewCatalogStatsMerchantsMerchantIdGet($merchant_id, $last_num_hours): \criteo\api\marketingsolutions\preview\Model\StatisticsOkResponse

get an stats request

Example

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


// Configure OAuth2 access token for authorization: oauth
$config = criteo\api\marketingsolutions\preview\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Configure OAuth2 access token for authorization: oauth
$config = criteo\api\marketingsolutions\preview\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new criteo\api\marketingsolutions\preview\Api\CatalogApi(
    // 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
);
$merchant_id = 56; // int | merchant-id to get
$last_num_hours = 56; // int | the last number of hours

try {
    $result = $apiInstance->previewCatalogStatsMerchantsMerchantIdGet($merchant_id, $last_num_hours);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CatalogApi->previewCatalogStatsMerchantsMerchantIdGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
merchant_id int merchant-id to get
last_num_hours int the last number of hours [optional]

Return type

\criteo\api\marketingsolutions\preview\Model\StatisticsOkResponse

Authorization

oauth, oauth

HTTP request headers

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

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