criteo / criteo-php-marketing-sdk
Official Criteo PHP Marketing SDK
Installs: 6 664
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 10
Forks: 4
Open Issues: 0
Requires
- php: >=7.1
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~2.12
- mockery/mockery: ^1.3
- phpunit/phpunit: ^7.4
- squizlabs/php_codesniffer: ~2.6
- dev-master
- 1.0.47
- 1.0.46
- 1.0.45
- 1.0.44
- 1.0.43
- 1.0.42
- 1.0.41
- 1.0.40
- 1.0.39
- 1.0.38
- 1.0.37
- 1.0.36
- 1.0.35
- 1.0.34
- 1.0.33
- 1.0.32
- 1.0.31
- 1.0.30
- 1.0.29
- 1.0.28
- 1.0.27
- 1.0.26
- 1.0.25
- 1.0.24
- 1.0.23
- 1.0.22
- 1.0.21
- 1.0.20
- 1.0.19
- 1.0.18
- 1.0.17
- 1.0.16
- 1.0.15
- 1.0.14
- 1.0.13
- 1.0.12
- 1.0.11
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- dev-addTravisSlackNotifications
This package is auto-updated.
Last update: 2022-10-04 16:36:35 UTC
README
This project is deprecated
We've built a new set of SDKs to help you use our Criteo's API.
You can find the new PHP SDKs repositories here : https://github.com/criteo/criteo-api-marketingsolutions-php-sdk and https://github.com/criteo/criteo-api-retailmedia-php-sdk
Info
This PHP package is automatically generated by the OpenAPI Generator project:
- API version: v.1.0
- Package version: 1.0.47
- 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-php-marketing-sdk
or add the following to composer.json
:
{ "repositories": [ { "type": "vcs", "url": "https://github.com/criteo/criteo-php-marketing-sdk.git" } ], "require": { "criteo/criteo-php-marketing-sdk": "*@dev" } }
Then run composer install
Manual Installation
Download the files and include autoload.php
:
require_once('/path/to/CriteoMarketing/vendor/autoload.php');
Tests
To run the unit tests:
composer install ./vendor/bin/phpunit
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); $clientId = 'YOUR_CLIENT_ID'; $clientCredentials = 'YOUR_PASSWORD'; // Automatic token refresh $apiInstance = new Criteo\Marketing\Api\AdvertisersApi(new TokenAutoRefreshClient($clientId, $clientCredentials)); $advertiser_id = 56; $authorization = 'Bearer VALID_JWT_TOKEN_BASE64'; try { $result = $apiInstance->getCampaigns($advertiser_id, $authorization); print_r($result); } catch (Exception $e) { echo 'Exception when calling AdvertisersApi->getCampaigns: ', $e->getMessage(), PHP_EOL; } ?>
You can find the full example here.
Documentation for API Endpoints
All URIs are relative to https://api.criteo.com/marketing
Class | Method | HTTP request | Description |
---|---|---|---|
AdvertisersApi | getCampaigns | GET /v1/advertisers/{advertiserId}/campaigns | Gets all advertiser's campaigns |
AdvertisersApi | getCategories | GET /v1/advertisers/{advertiserId}/categories | Gets all advertiser's categories |
AdvertisersApi | getCategory | GET /v1/advertisers/{advertiserId}/categories/{categoryHashCode} | Gets a specific advertiser's category |
AudiencesApi | addRemoveUsersToAudience | PATCH /v1/audiences/userlist/{audienceId} | Add/Remove users to an Audience. |
AudiencesApi | createAudience | POST /v1/audiences/userlist | Create a new Audience. |
AudiencesApi | deleteAudience | DELETE /v1/audiences/{audienceId} | Delete an Audience. |
AudiencesApi | getAudiences | GET /v1/audiences | Get the list of Audiences. |
AudiencesApi | removeUsersFromAudience | DELETE /v1/audiences/userlist/{audienceId}/users | Remove all users from an Audience. |
AudiencesApi | updateAudienceMetadata | PUT /v1/audiences/{audienceId} | Update an Audience metadata. |
AuthenticationApi | oAuth2TokenPost | POST /oauth2/token | Authenticates provided credentials and returns an access token |
BudgetsApi | get | GET /v1/budgets | Gets budgets |
CampaignsApi | getBids | GET /v1/campaigns/bids | Gets a the bids for campaigns and their categories |
CampaignsApi | getCampaign | GET /v1/campaigns/{campaignId} | Gets a specific campaign |
CampaignsApi | getCampaigns | GET /v1/campaigns | Gets campaigns |
CampaignsApi | getCategories | GET /v1/campaigns/{campaignId}/categories | Gets categories |
CampaignsApi | getCategory | GET /v1/campaigns/{campaignId}/categories/{categoryHashCode} | Gets a specific category |
CampaignsApi | updateBids | PUT /v1/campaigns/bids | Update bids for campaigns and their categories |
CategoriesApi | getCategories | GET /v1/categories | Gets categories |
CategoriesApi | updateCategories | PUT /v1/categories | Enables/disables categories |
PortfolioApi | getPortfolio | GET /v1/portfolio | Gets portfolio |
PublishersApi | getStats | POST /v1/publishers/stats | |
SellersApi | createBudgets | POST /v1/sellers/budgets | Creates a budget for a seller/list of sellers. |
SellersApi | get | GET /v1/sellers | Gets sellers details. |
SellersApi | getCampaigns | GET /v1/sellers/campaigns | Gets campaigns |
SellersApi | getStats | POST /v1/sellers/stats | Generates a statistics report |
SellersApi | updateBids | PUT /v1/sellers/bids | Set or update a bid for a seller/list of sellers. |
SellersApi | updateBudgets | PUT /v1/sellers/budgets | Updates a budget for a seller/list of sellers. |
SellersV2Api | createSellerBudgets | POST /v2/crp/budgets | Create a collection of budgets. |
SellersV2Api | createSellerCampaignsBySeller | POST /v2/crp/sellers/{sellerId}/seller-campaigns | Create a SellerCampaign |
SellersV2Api | createSellers | POST /v2/crp/advertisers/{advertiserId}/sellers | Create new sellers for an advertiser |
SellersV2Api | getAdvertiser | GET /v2/crp/advertisers/{advertiserId} | Get an advertiser. |
SellersV2Api | getAdvertiserCampaigns | GET /v2/crp/advertisers/{advertiserId}/campaigns | Get the collection of CRP campaigns associated with the advertiserId. |
SellersV2Api | getAdvertiserPreviewLimits | GET /v2/crp/advertisers/preview-limit | Get the collection of advertisers preview limits associated with the authorized user. |
SellersV2Api | getAdvertisers | GET /v2/crp/advertisers | Get the collection of advertisers associated with the user. |
SellersV2Api | getBudgetsByAdvertiser | GET /v2/crp/advertisers/{advertiserId}/budgets | Get CRP budgets for a specific advertiser |
SellersV2Api | getBudgetsBySeller | GET /v2/crp/sellers/{sellerId}/budgets | Get a collection of budgets for this seller. |
SellersV2Api | getBudgetsBySellerCampaignId | GET /v2/crp/seller-campaigns/{sellerCampaignId}/budgets | Get a collection of budgets for this seller campaign. |
SellersV2Api | getSeller | GET /v2/crp/sellers/{sellerId} | Get details for a seller. |
SellersV2Api | getSellerAdDemo | GET /v2/crp/advertisers/{advertiserId}/ad-preview | Get a preview of an HTML ad with products belonging to the provided seller |
SellersV2Api | getSellerBudget | GET /v2/crp/budgets/{budgetId} | Get details for a budget. |
SellersV2Api | getSellerBudgets | GET /v2/crp/budgets | Get a collection of budgets. |
SellersV2Api | getSellerCampaign | GET /v2/crp/seller-campaigns/{sellerCampaignId} | Get details for a seller campaign. |
SellersV2Api | getSellerCampaigns | GET /v2/crp/seller-campaigns | Get a collection of seller campaigns. |
SellersV2Api | getSellerCampaignsByAdvertiser | GET /v2/crp/advertisers/{advertiserId}/seller-campaigns | Get CRP seller-campaigns for a specific advertiser |
SellersV2Api | getSellerCampaignsBySeller | GET /v2/crp/sellers/{sellerId}/seller-campaigns | Get a collection of seller campaigns for this seller. |
SellersV2Api | getSellers | GET /v2/crp/sellers | Get a collection of sellers. |
SellersV2Api | updateSellerBudget | PATCH /v2/crp/budgets/{budgetId} | Modify a single budget. |
SellersV2Api | updateSellerBudgets | PATCH /v2/crp/budgets | Modify a collection of budgets. |
SellersV2Api | updateSellerCampaign | PATCH /v2/crp/seller-campaigns/{sellerCampaignId} | Update an existing seller campaign. |
SellersV2Api | updateSellerCampaigns | PATCH /v2/crp/seller-campaigns | Update a collection of seller campaigns. |
SellersV2StatsApi | campaigns | GET /v2/crp/stats/campaigns | Get stats by campaign. |
SellersV2StatsApi | sellerCampaigns | GET /v2/crp/stats/seller-campaigns | Get stats by seller-campaign. |
SellersV2StatsApi | sellers | GET /v2/crp/stats/sellers | Get stats by seller. |
StatisticsApi | getCampaignReport | POST /v1/statistics/report | Generates a statistics report |
StatisticsApi | getStats | POST /v1/statistics | Generates a statistics report |
Documentation For Models
- AdvertiserCampaignMessage
- AdvertiserInfoMessage
- AdvertiserQuotaMessage
- AudienceCreateRequest
- AudienceCreateResponse
- AudiencePatchRequest
- AudiencePatchResponse
- AudiencePutRequest
- AudienceResponse
- AudiencesGetResponse
- BidMessage
- BudgetMessage
- CampaignBidChangeRequest
- CampaignBidChangeResponse
- CampaignBidMessage
- CampaignMessage
- CampaignReportQueryMessage
- CatalogProduct
- CatalogProductV3
- CategoryBidChangeRequest
- CategoryBidMessage
- CategoryMessage
- CategoryUpdateError
- CategoryUpdateInput
- CategoryUpdatesPerCatalog
- CategoryUpdatesPerCatalogError
- CheckResult
- ClientRegistrationRequestMessage
- ClientRegistrationResponseMessage
- CreateSellerBudgetMapiMessage
- CreateSellerCampaignMessageMapi
- CustomAttributeV3
- ErrorSource
- GoogleProduct
- GoogleProductV3
- IThrottlingConfiguration
- InlineResponse200
- Installment
- InstallmentAmount
- InstallmentV3
- LoyaltyPointsV3
- LoyatyPoints
- MapiUserMessage
- MarketplaceCampaignMessage
- MessageWithDetailsCampaignBidChangeResponse
- MessageWithDetailsCategoryUpdatesPerCatalogError
- PolicyRouteInfo
- PortfolioMessage
- Price
- ProductImporterBatch
- ProductImporterMessage
- ProductShippingDimensionV3
- ProductShippingV3
- ProductShippingWeightV3
- ProductTaxV3
- ProductUnitPricingBaseMeasureV3
- PublisherFileStatsMessage
- PublisherStatsMessage
- PublisherStatsQueryMessage
- RoutePolicy
- SellerBase
- SellerBidInfoMessage
- SellerBidsMessage
- SellerBudgetCreateMessage
- SellerBudgetInfoMessage
- SellerBudgetMessage
- SellerBudgetResponseMessage
- SellerBudgetUpdateMessage
- SellerBudgetsCreateMessage
- SellerBudgetsMessage
- SellerBudgetsUpdateMessage
- SellerCampaignMessage
- SellerCampaignUpdate
- SellerInfoMessage
- SellerMessage
- ServiceStatusCheckResult
- Shipping
- ShippingSize
- StatsQueryMessage
- StatsQueryMessageEx
- Tax
- ThrottlePolicy
- ThrottlePolicyRates
- UnitMeasure
- UpdateSellerBudgetMessage
- UpdateSellerBudgetMessageBase
Documentation For Authorization
In order to ease usage of this client library, you might want to use the TokenAutoRefreshClient as explained in the example.
Authorization
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
Author
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.