Skip to content

Latest commit

 

History

History
540 lines (361 loc) · 21.5 KB

AudienceApi.md

File metadata and controls

540 lines (361 loc) · 21.5 KB

criteo\api\retailmedia\preview\AudienceApi

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

Method HTTP request Description
bulkCreateAudienceSegments() POST /preview/retail-media/accounts/{account-id}/audience-segments/create
bulkDeleteAudienceSegments() POST /preview/retail-media/accounts/{account-id}/audience-segments/delete
bulkUpdateAudienceSegments() PATCH /preview/retail-media/accounts/{account-id}/audience-segments
deleteContactListIdentifiers() POST /preview/retail-media/audience-segments/{audience-segment-id}/contact-list/clear
getAudienceSegmentContactListStatistics() GET /preview/retail-media/accounts/{account-id}/audience-segments/{audience-segment-id}/contact-list
searchAudienceSegments() POST /preview/retail-media/accounts/{account-id}/audience-segments/search
searchAudiences() POST /preview/retail-media/accounts/{account-id}/audiences/search
updateContactListIdentifiers() POST /preview/retail-media/audience-segments/{audience-segment-id}/contact-list/add-remove

bulkCreateAudienceSegments()

bulkCreateAudienceSegments($account_id, $rm_audience_segment_bulk_create_input_v1): \criteo\api\retailmedia\preview\Model\RmAudienceSegmentEntityV1ListResponse

Creates all segments with a valid configuration, and returns the full segments. For those that cannot be created, one or multiple errors are returned.

Example

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


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

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


$apiInstance = new criteo\api\retailmedia\preview\Api\AudienceApi(
    // 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
);
$account_id = 'account_id_example'; // string | Account Id
$rm_audience_segment_bulk_create_input_v1 = new \criteo\api\retailmedia\preview\Model\RmAudienceSegmentBulkCreateInputV1(); // \criteo\api\retailmedia\preview\Model\RmAudienceSegmentBulkCreateInputV1 | Segment creation parameter

try {
    $result = $apiInstance->bulkCreateAudienceSegments($account_id, $rm_audience_segment_bulk_create_input_v1);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AudienceApi->bulkCreateAudienceSegments: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
account_id string Account Id
rm_audience_segment_bulk_create_input_v1 \criteo\api\retailmedia\preview\Model\RmAudienceSegmentBulkCreateInputV1 Segment creation parameter

Return type

\criteo\api\retailmedia\preview\Model\RmAudienceSegmentEntityV1ListResponse

Authorization

oauth, oauth

HTTP request headers

  • Content-Type: application/json-patch+json, application/json, text/json, application/*+json
  • Accept: text/plain, application/json, text/json

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

bulkDeleteAudienceSegments()

bulkDeleteAudienceSegments($account_id, $rm_audience_segment_bulk_delete_input_v1): \criteo\api\retailmedia\preview\Model\RmAudienceSegmentIdEntityV1ListResponse

Delete the segments associated to the given audience IDs.

Example

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


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

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


$apiInstance = new criteo\api\retailmedia\preview\Api\AudienceApi(
    // 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
);
$account_id = 'account_id_example'; // string | Account id
$rm_audience_segment_bulk_delete_input_v1 = new \criteo\api\retailmedia\preview\Model\RmAudienceSegmentBulkDeleteInputV1(); // \criteo\api\retailmedia\preview\Model\RmAudienceSegmentBulkDeleteInputV1 | Segment delete request.

try {
    $result = $apiInstance->bulkDeleteAudienceSegments($account_id, $rm_audience_segment_bulk_delete_input_v1);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AudienceApi->bulkDeleteAudienceSegments: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
account_id string Account id
rm_audience_segment_bulk_delete_input_v1 \criteo\api\retailmedia\preview\Model\RmAudienceSegmentBulkDeleteInputV1 Segment delete request.

Return type

\criteo\api\retailmedia\preview\Model\RmAudienceSegmentIdEntityV1ListResponse

Authorization

oauth, oauth

HTTP request headers

  • Content-Type: application/json-patch+json, application/json, text/json, application/*+json
  • Accept: text/plain, application/json, text/json

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

bulkUpdateAudienceSegments()

bulkUpdateAudienceSegments($account_id, $rm_audience_segment_bulk_update_input_v1): \criteo\api\retailmedia\preview\Model\RmAudienceSegmentEntityV1ListResponse

Updates the properties of all segments with a valid configuration, and returns the full segments. For those that cannot be updated, one or multiple errors are returned.

Example

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


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

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


$apiInstance = new criteo\api\retailmedia\preview\Api\AudienceApi(
    // 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
);
$account_id = 'account_id_example'; // string | Account id
$rm_audience_segment_bulk_update_input_v1 = new \criteo\api\retailmedia\preview\Model\RmAudienceSegmentBulkUpdateInputV1(); // \criteo\api\retailmedia\preview\Model\RmAudienceSegmentBulkUpdateInputV1 | Segment Update request

try {
    $result = $apiInstance->bulkUpdateAudienceSegments($account_id, $rm_audience_segment_bulk_update_input_v1);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AudienceApi->bulkUpdateAudienceSegments: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
account_id string Account id
rm_audience_segment_bulk_update_input_v1 \criteo\api\retailmedia\preview\Model\RmAudienceSegmentBulkUpdateInputV1 Segment Update request

Return type

\criteo\api\retailmedia\preview\Model\RmAudienceSegmentEntityV1ListResponse

Authorization

oauth, oauth

HTTP request headers

  • Content-Type: application/json-patch+json, application/json, text/json, application/*+json
  • Accept: text/plain, application/json, text/json

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

deleteContactListIdentifiers()

deleteContactListIdentifiers($audience_segment_id)

Delete all identifiers from a retail-media contact list audience-segment, with external audience segment id.

Example

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


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

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


$apiInstance = new criteo\api\retailmedia\preview\Api\AudienceApi(
    // 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
);
$audience_segment_id = 56; // int | The id of the contact list audience-segment to amend, we only accept external Id here

try {
    $apiInstance->deleteContactListIdentifiers($audience_segment_id);
} catch (Exception $e) {
    echo 'Exception when calling AudienceApi->deleteContactListIdentifiers: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
audience_segment_id int The id of the contact list audience-segment to amend, we only accept external Id here

Return type

void (empty response body)

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]

getAudienceSegmentContactListStatistics()

getAudienceSegmentContactListStatistics($account_id, $audience_segment_id): \criteo\api\retailmedia\preview\Model\RmContactListStatisticsEntityV1Response

Returns the statistics of a contact list segment.

Example

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


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

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


$apiInstance = new criteo\api\retailmedia\preview\Api\AudienceApi(
    // 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
);
$account_id = 'account_id_example'; // string | Account Id
$audience_segment_id = 'audience_segment_id_example'; // string | Segment Id.

try {
    $result = $apiInstance->getAudienceSegmentContactListStatistics($account_id, $audience_segment_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AudienceApi->getAudienceSegmentContactListStatistics: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
account_id string Account Id
audience_segment_id string Segment Id.

Return type

\criteo\api\retailmedia\preview\Model\RmContactListStatisticsEntityV1Response

Authorization

oauth, oauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json

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

searchAudienceSegments()

searchAudienceSegments($account_id, $rm_audience_segment_search_input_v1, $limit, $offset): \criteo\api\retailmedia\preview\Model\RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse

Returns a list of segments that match the provided filters. If present, the filters are AND'ed together when applied.

Example

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


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

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


$apiInstance = new criteo\api\retailmedia\preview\Api\AudienceApi(
    // 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
);
$account_id = 'account_id_example'; // string | Account Id
$rm_audience_segment_search_input_v1 = new \criteo\api\retailmedia\preview\Model\RmAudienceSegmentSearchInputV1(); // \criteo\api\retailmedia\preview\Model\RmAudienceSegmentSearchInputV1 | Segment search filters.
$limit = 50; // int | The number of elements to be returned. The default is 50 and the maximum is 100.
$offset = 0; // int | The (zero-based) offset into the collection. The default is 0.

try {
    $result = $apiInstance->searchAudienceSegments($account_id, $rm_audience_segment_search_input_v1, $limit, $offset);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AudienceApi->searchAudienceSegments: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
account_id string Account Id
rm_audience_segment_search_input_v1 \criteo\api\retailmedia\preview\Model\RmAudienceSegmentSearchInputV1 Segment search filters.
limit int The number of elements to be returned. The default is 50 and the maximum is 100. [optional] [default to 50]
offset int The (zero-based) offset into the collection. The default is 0. [optional] [default to 0]

Return type

\criteo\api\retailmedia\preview\Model\RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse

Authorization

oauth, oauth

HTTP request headers

  • Content-Type: application/json-patch+json, application/json, text/json, application/*+json
  • Accept: text/plain, application/json, text/json

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

searchAudiences()

searchAudiences($account_id, $rm_audience_search_input_v1, $limit, $offset): \criteo\api\retailmedia\preview\Model\RmAudienceEntityV1RmAudienceSearchMetadataV1ListResponse

Returns a list of audiences that match the provided filters. If present, the filters are AND'ed together when applied.

Example

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


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

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


$apiInstance = new criteo\api\retailmedia\preview\Api\AudienceApi(
    // 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
);
$account_id = 'account_id_example'; // string | Account Id
$rm_audience_search_input_v1 = new \criteo\api\retailmedia\preview\Model\RmAudienceSearchInputV1(); // \criteo\api\retailmedia\preview\Model\RmAudienceSearchInputV1 | Audience search filters.
$limit = 50; // int | The number of elements to be returned. The default is 50 and the maximum is 100.
$offset = 0; // int | The (zero-based) offset into the collection. The default is 0.

try {
    $result = $apiInstance->searchAudiences($account_id, $rm_audience_search_input_v1, $limit, $offset);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AudienceApi->searchAudiences: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
account_id string Account Id
rm_audience_search_input_v1 \criteo\api\retailmedia\preview\Model\RmAudienceSearchInputV1 Audience search filters.
limit int The number of elements to be returned. The default is 50 and the maximum is 100. [optional] [default to 50]
offset int The (zero-based) offset into the collection. The default is 0. [optional] [default to 0]

Return type

\criteo\api\retailmedia\preview\Model\RmAudienceEntityV1RmAudienceSearchMetadataV1ListResponse

Authorization

oauth, oauth

HTTP request headers

  • Content-Type: application/json-patch+json, application/json, text/json, application/*+json
  • Accept: text/plain, application/json, text/json

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

updateContactListIdentifiers()

updateContactListIdentifiers($audience_segment_id, $retail_media_contactlist_amendment_request): \criteo\api\retailmedia\preview\Model\RetailMediaContactlistOperation

Add/remove identifiers to or from a retail-media contact list audience-segment, with external audience segment id.

Example

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


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

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


$apiInstance = new criteo\api\retailmedia\preview\Api\AudienceApi(
    // 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
);
$audience_segment_id = 56; // int | The id of the contact list audience-segment to amend, we only accept external Id here
$retail_media_contactlist_amendment_request = new \criteo\api\retailmedia\preview\Model\RetailMediaContactlistAmendmentRequest(); // \criteo\api\retailmedia\preview\Model\RetailMediaContactlistAmendmentRequest

try {
    $result = $apiInstance->updateContactListIdentifiers($audience_segment_id, $retail_media_contactlist_amendment_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AudienceApi->updateContactListIdentifiers: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
audience_segment_id int The id of the contact list audience-segment to amend, we only accept external Id here
retail_media_contactlist_amendment_request \criteo\api\retailmedia\preview\Model\RetailMediaContactlistAmendmentRequest

Return type

\criteo\api\retailmedia\preview\Model\RetailMediaContactlistOperation

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]