Skip to main content

Marketing API v.1.0

Project description

Criteo Marketing SDK for Python

Build Status

IMPORTANT: This swagger links to Criteo production environment. Any test applied here will thus impact real campaigns.

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

  • API version: v.1.0
  • Package version: 1.0.50

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

pip install criteo_marketing

(you may need to run pip with root permission: sudo pip install criteo_marketing)

Then import the package:

import criteo_marketing 

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import criteo_marketing

Example

Please see examples/authentication.py for a full example to get a valid token and make a call to the API.

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import criteo_marketing
from criteo_marketing.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = criteo_marketing.AdvertisersApi(criteo_marketing.ApiClient(configuration))
advertiser_id = 56 # int | Mandatory. The id of the advertiser to return.
authorization = 'Bearer VALID_JWT_TOKEN_BASE64' # str | JWT Bearer Token (default to 'Bearer VALID_JWT_TOKEN_BASE64')

try:
    # Gets all advertiser's campaigns
    api_response = api_instance.get_campaigns(advertiser_id, authorization)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AdvertisersApi->get_campaigns: %s\n" % e)

Documentation for API Endpoints

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

Class Method HTTP request Description
AdvertisersApi get_campaigns GET /v1/advertisers/{advertiserId}/campaigns Gets all advertiser's campaigns
AdvertisersApi get_categories GET /v1/advertisers/{advertiserId}/categories Gets all advertiser's categories
AdvertisersApi get_category GET /v1/advertisers/{advertiserId}/categories/{categoryHashCode} Gets a specific advertiser's category
AudiencesApi add_remove_users_to_audience PATCH /v1/audiences/userlist/{audienceId} Add/Remove users to an Audience.
AudiencesApi create_audience POST /v1/audiences/userlist Create a new Audience.
AudiencesApi delete_audience DELETE /v1/audiences/{audienceId} Delete an Audience.
AudiencesApi get_audiences GET /v1/audiences Get the list of Audiences.
AudiencesApi remove_users_from_audience DELETE /v1/audiences/userlist/{audienceId}/users Remove all users from an Audience.
AudiencesApi update_audience_metadata PUT /v1/audiences/{audienceId} Update an Audience metadata.
AuthenticationApi o_auth2_token_post POST /oauth2/token Authenticates provided credentials and returns an access token
BudgetsApi get GET /v1/budgets Gets budgets
CampaignsApi get_bids GET /v1/campaigns/bids Gets a the bids for campaigns and their categories
CampaignsApi get_campaign GET /v1/campaigns/{campaignId} Gets a specific campaign
CampaignsApi get_campaigns GET /v1/campaigns Gets campaigns
CampaignsApi get_categories GET /v1/campaigns/{campaignId}/categories Gets categories
CampaignsApi get_category GET /v1/campaigns/{campaignId}/categories/{categoryHashCode} Gets a specific category
CampaignsApi update_bids PUT /v1/campaigns/bids Update bids for campaigns and their categories
CategoriesApi get_categories GET /v1/categories Gets categories
CategoriesApi update_categories PUT /v1/categories Enables/disables categories
PortfolioApi get_portfolio GET /v1/portfolio Gets portfolio
PublishersApi get_stats POST /v1/publishers/stats
SellersApi create_budgets POST /v1/sellers/budgets Creates a budget for a seller/list of sellers.
SellersApi get GET /v1/sellers Gets sellers details.
SellersApi get_campaigns GET /v1/sellers/campaigns Gets campaigns
SellersApi get_stats POST /v1/sellers/stats Generates a statistics report
SellersApi update_bids PUT /v1/sellers/bids Set or update a bid for a seller/list of sellers.
SellersApi update_budgets PUT /v1/sellers/budgets Updates a budget for a seller/list of sellers.
StatisticsApi get_stats POST /v1/statistics Generates a statistics report

Documentation For Models

Documentation For Authorization

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

criteo_marketing-1.0.50.tar.gz (48.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page