Git Product home page Git Product logo

criteo-api-marketingsolutions-php-sdk's Introduction

Criteo API SDK for PHP

Introduction

API Client Libraries can facilitate your use of the Criteo API allowing you to build unique and customized solutions to serve your businesses and clients. These libraries can reduce the amount of code you need to write in order to start accessing Criteo programmatically. They also can help expedite troubleshooting, should you encounter any issues.

More information: https://developers.criteo.com/marketing-solutions/docs/php-api-client-library

This PHP package is automatically generated by the OpenAPI Generator project:

  • Package version: 0.0.220120
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

Requirements

PHP 7.1 and later

Installation & Usage

Composer

To install the bindings via Composer:

either run the following command: composer require criteo/criteo-api-php-sdk

or add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/criteo/criteo-api-marketingsolutions-php-sdk.git"
    }
  ],
  "require": {
    "criteo/criteo-api-marketingsolutions-php-sdk": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/criteo-api-marketingsolutions-sdk/vendor/autoload.php');

Tests

To run the unit tests:

composer run-script test

Getting Started

Please follow the installation procedure and then run the following:

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

$clientId = 'YOUR_CLIENT_ID';
$clientSecret = 'YOUR_CLIENT_SECRET';

// Automatic token refresh
$apiInstance = new criteo\api\marketingsolutions\preview\Api\AdvertiserApi(new criteo\api\marketingsolutions\preview\TokenAutoRefreshClient($clientId, $clientSecret));


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

?>

You can find the full example here.

Documentation for API Endpoints

All URIs are relative to https://api.criteo.com

Class Method HTTP request Description
AdvertiserApi apiPortfolioGet GET /preview/advertisers/me
AdvertiserApi createAdvertiser POST /preview/advertisers
AdvertiserApi getDatasetList GET /preview/advertisers/{advertiser-id}/datasets
AdvertiserApi listIndustries GET /preview/industries
AnalyticsApi getAdsetReport POST /preview/statistics/report
AnalyticsApi getCategoriesReport POST /preview/categories/report
AnalyticsApi getPlacementsReport POST /preview/placements/report
AnalyticsApi getTransactionsReport POST /preview/transactions/report
AnalyticsApi getTransparencyReport POST /preview/log-level/advertisers/{advertiser-id}/report
AudienceApi createAudience POST /preview/audiences
AudienceApi deleteIdentifiers DELETE /preview/audiences/{audience-id}/contactlist
AudienceApi getAudiences GET /preview/audiences
AudienceApi modifyAudience PATCH /preview/audiences/{audience-id}
AudienceApi modifyAudienceUsers PATCH /preview/audiences/{audience-id}/contactlist
AudienceApi modifyAudienceUsersWithAttributes PATCH /preview/audiences/{audience-id}/contactlist-attributes
AudienceApi removeAudience DELETE /preview/audiences/{audience-id}
CampaignApi createAdSet POST /preview/marketing-solutions/ad-sets
CampaignApi createCampaign POST /preview/marketing-solutions/campaigns
CampaignApi deleteAdvertiserBundleRules DELETE /preview/advertisers/{advertiserId}/targeting/bundle-rules
CampaignApi deleteAdvertiserDomainRules DELETE /preview/advertisers/{advertiserId}/targeting/domain-rules
CampaignApi deleteCampaignBundleRules DELETE /preview/campaigns/{campaignId}/targeting/bundle-rules
CampaignApi deleteCampaignDomainRules DELETE /preview/campaigns/{campaignId}/targeting/domain-rules
CampaignApi deleteOCIbrandSafetyRule DELETE /preview/brand-safety/oci
CampaignApi deleteOCItargetingRule DELETE /preview/targeting/oci
CampaignApi getAdSet GET /preview/marketing-solutions/ad-sets/{adSetId}
CampaignApi getAdvertiserBundleRules GET /preview/advertisers/{advertiserId}/targeting/bundle-rules
CampaignApi getAdvertiserDomainRules GET /preview/advertisers/{advertiserId}/targeting/domain-rules
CampaignApi getCampaign GET /preview/marketing-solutions/campaigns/{campaign-id}
CampaignApi getCampaignBundleRules GET /preview/campaigns/{campaignId}/targeting/bundle-rules
CampaignApi getCampaignDomainRules GET /preview/campaigns/{campaignId}/targeting/domain-rules
CampaignApi getCategoryBidList GET /preview/marketing-solutions/ad-sets/{ad-set-id}/category-bids
CampaignApi getDisplayMultipliers GET /preview/marketing-solutions/ad-sets/{ad-set-id}/display-multipliers
CampaignApi getOCIbrandSafetyRule GET /preview/brand-safety/oci
CampaignApi getOCItargetingRule GET /preview/targeting/oci
CampaignApi patchAdSets PATCH /preview/marketing-solutions/ad-sets
CampaignApi patchCampaigns PATCH /preview/marketing-solutions/campaigns
CampaignApi patchCategoryBidList PATCH /preview/marketing-solutions/ad-sets/{ad-set-id}/category-bids
CampaignApi patchDisplayMultipliers PATCH /preview/marketing-solutions/ad-sets/{ad-set-id}/display-multipliers
CampaignApi postAdvertiserBundleRules POST /preview/advertisers/{advertiserId}/targeting/bundle-rules
CampaignApi postAdvertiserDomainRules POST /preview/advertisers/{advertiserId}/targeting/domain-rules
CampaignApi postCampaignBundleRules POST /preview/campaigns/{campaignId}/targeting/bundle-rules
CampaignApi postCampaignDomainRules POST /preview/campaigns/{campaignId}/targeting/domain-rules
CampaignApi putAdvertiserBundleRules PUT /preview/advertisers/{advertiserId}/targeting/bundle-rules
CampaignApi putAdvertiserDomainRules PUT /preview/advertisers/{advertiserId}/targeting/domain-rules
CampaignApi putCampaignBundleRules PUT /preview/campaigns/{campaignId}/targeting/bundle-rules
CampaignApi putCampaignDomainRules PUT /preview/campaigns/{campaignId}/targeting/domain-rules
CampaignApi searchAdSets POST /preview/marketing-solutions/ad-sets/search
CampaignApi searchCampaigns POST /preview/marketing-solutions/campaigns/search
CampaignApi startAdSets POST /preview/marketing-solutions/ad-sets/start
CampaignApi stopAdSets POST /preview/marketing-solutions/ad-sets/stop
CampaignApi upsertOCIbrandSafetyRule POST /preview/brand-safety/oci
CampaignApi upsertOCItargetingRule POST /preview/targeting/oci
CatalogApi previewCatalogProductsBatchPost POST /preview/catalog/products/batch
CatalogApi previewCatalogProductsBatchReportOperationTokenGet GET /preview/catalog/products/batch/report/{operation-token}
CreativeApi createAd POST /preview/advertisers/{advertiser-id}/ads
CreativeApi createCoupon POST /preview/advertisers/{advertiser-id}/coupons
CreativeApi createCreative POST /preview/advertisers/{advertiser-id}/creatives
CreativeApi deleteAd DELETE /preview/ads/{id}
CreativeApi deleteCoupon DELETE /preview/advertisers/{advertiser-id}/coupons/{id}
CreativeApi deleteCreative DELETE /preview/creatives/{id}
CreativeApi editCoupon PUT /preview/advertisers/{advertiser-id}/coupons/{id}
CreativeApi editCreative PUT /preview/creatives/{id}
CreativeApi getAd GET /preview/ads/{id}
CreativeApi getAds GET /preview/advertisers/{advertiser-id}/ads
CreativeApi getCoupon GET /preview/advertisers/{advertiser-id}/coupons/{id}
CreativeApi getCouponPreview GET /preview/advertisers/{advertiser-id}/coupons/{id}/preview
CreativeApi getCouponSupportedSizes GET /preview/advertisers/{advertiser-id}/coupons-supported-sizes
CreativeApi getCoupons GET /preview/advertisers/{advertiser-id}/coupons
CreativeApi getCreative GET /preview/creatives/{id}
CreativeApi getCreativePreview GET /preview/creatives/{id}/preview
CreativeApi getCreatives GET /preview/advertisers/{advertiser-id}/creatives
GatewayApi getCurrentApplication GET /me
OAuthApi getToken POST /oauth2/token Creates a token based either on supplied client credentials or on single use authorization code
OnSiteRecommendationApi apiV1RecoPost POST /preview/recommendation/search

Documentation For Models

Documentation For Authorization

In order to ease usage of this client library, you might want to use the TokenAutoRefreshClient as explained in the example.

oauth

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes: N/A

Author

Criteo

Disclaimer

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

criteo-api-marketingsolutions-php-sdk's People

Contributors

arturrudiuk-criteo avatar bubianchi-criteo avatar ouvreboite avatar paulmathon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.