python-amazon-ad-api 2.2.9__tar.gz → 2.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/PKG-INFO +1 -1
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/__init__.py +24 -0
- python_amazon_ad_api-2.3.1/ad_api/api/ad_library.py +76 -0
- python_amazon_ad_api-2.3.1/ad_api/api/campaign_diagnostics.py +54 -0
- python_amazon_ad_api-2.3.1/ad_api/api/forecast.py +130 -0
- python_amazon_ad_api-2.3.1/ad_api/api/hashed_records.py +39 -0
- python_amazon_ad_api-2.3.1/ad_api/api/historic_reach.py +148 -0
- python_amazon_ad_api-2.3.1/ad_api/api/locations.py +57 -0
- python_amazon_ad_api-2.3.1/ad_api/api/moderation.py +65 -0
- python_amazon_ad_api-2.3.1/ad_api/api/persona_builder.py +174 -0
- python_amazon_ad_api-2.3.1/ad_api/api/plan_management.py +1268 -0
- python_amazon_ad_api-2.3.1/ad_api/api/pre_moderation.py +64 -0
- python_amazon_ad_api-2.3.1/ad_api/api/record_management.py +121 -0
- python_amazon_ad_api-2.3.1/ad_api/api/targetable_entities.py +89 -0
- python_amazon_ad_api-2.3.1/ad_api/version.py +1 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/python_amazon_ad_api.egg-info/PKG-INFO +1 -1
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/python_amazon_ad_api.egg-info/SOURCES.txt +12 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/setup.cfg +1 -1
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/setup.py +1 -1
- python_amazon_ad_api-2.2.9/ad_api/version.py +0 -1
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/LICENSE +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/README.md +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/__init__.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/account.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/account_budgets.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/ads_data_manager.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/advertising_invitations.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/advertising_test_account.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/advertising_user_permissions.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/attribution.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/audiences.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/billing.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/brand_benchmarks.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/brand_home.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/brand_metrics.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/creative_assets.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/dsp_advertiser.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/eligibility.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/exports.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/history.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/insights.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/localization.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/manager_accounts.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/marketing_mix_modeling.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/metadata.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/partner_opportunities.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/portfolios.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/portfolios_v3.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/profiles.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/ras_campaign_management.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/ras_retailer_identity.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/recommendations.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/reports.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sb/__init__.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sb/ad_creatives_v4.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sb/ad_groups.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sb/ad_groups_v4.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sb/ads_v4.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sb/benchmarks.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sb/bid_recommendations.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sb/brands.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sb/budget_rules.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sb/campaigns.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sb/campaigns_v4.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sb/forecast.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sb/keywords.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sb/keywords_recommendations.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sb/landing_page_asins.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sb/media.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sb/migration.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sb/negative_keywords.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sb/negative_product_targeting.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sb/optimization_rules.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sb/product_targeting.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sb/recommendations.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sb/reports.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sb/stores.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sb/targeting_categories.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sb/targeting_recommendations.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sb/themes.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sd/__init__.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sd/ad_groups.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sd/bid_recommendations.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sd/brand_safety.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sd/budget_rules.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sd/campaigns.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sd/campaigns_budget_usage.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sd/creatives.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sd/forecast.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sd/negative_product_targeting.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sd/product_ads.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sd/product_targeting.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sd/recommendations.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sd/reports.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sd/snapshots.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sd/targeting_recommendations.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sp/__init__.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sp/ad_groups_v3.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sp/bid_recommendations_v3.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sp/budget_initial_recommendation.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sp/budget_recommendations.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sp/budget_rules.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sp/budget_rules_recommendations.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sp/campaign_consolidated_recommendations.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sp/campaign_negative_keywords_v3.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sp/campaign_negative_targets.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sp/campaigns_budget_usage.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sp/campaigns_v3.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sp/campaings_optimization.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sp/global_recommendations.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sp/keyword_groups_recommendations.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sp/keywords_v3.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sp/negative_keywords_v3.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sp/negative_product_targeting_v3.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sp/product_ads_v3.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sp/product_recommendations.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sp/product_targeting_v3.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sp/ranked_keywords_recommendations.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sp/schedule_based_bid_optimization.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/sp/target_promotion_groups.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/st/__init__.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/st/ad_groups.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/st/ads.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/st/campaigns.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/st/creatives.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/st/creatives_moderations.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/st/creatives_preview.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/st/forecasts.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/st/locations.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/st/targets.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/stores.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/stream.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/v1/__init__.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/v1/ad_associations.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/v1/ad_extensions.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/v1/ad_groups.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/v1/ads.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/v1/advertiser_accounts.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/v1/brand_store_edition_publish_versions.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/v1/brand_store_editions.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/v1/brand_store_pages.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/v1/brand_stores.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/v1/campaigns.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/v1/geo_locations.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/v1/label_object_associations.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/v1/labels.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/v1/location_indexes.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/v1/manager_accounts.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/v1/portfolios.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/v1/recommendation_types.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/v1/recommendations.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/v1/reports.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/v1/selling_accounts.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/v1/targets.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/api/validation_configurations.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/auth/__init__.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/auth/access_token_client.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/auth/access_token_response.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/auth/credentials.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/auth/exceptions.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/base/__init__.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/base/api_response.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/base/client.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/base/config.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/base/credential_provider.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/base/exceptions.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/base/helpers.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/base/marketplaces.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/base/utils.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/shared/__init__.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/ad_api/shared/base_client.py +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/pyproject.toml +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/python_amazon_ad_api.egg-info/dependency_links.txt +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/python_amazon_ad_api.egg-info/requires.txt +0 -0
- {python_amazon_ad_api-2.2.9 → python_amazon_ad_api-2.3.1}/python_amazon_ad_api.egg-info/top_level.txt +0 -0
|
@@ -36,6 +36,18 @@ from .ras_retailer_identity import RasRetailerIdentity
|
|
|
36
36
|
from .ras_campaign_management import RasCampaignManagement
|
|
37
37
|
from .ads_data_manager import AdsDataManager
|
|
38
38
|
from .partner_opportunities import PartnerOpportunities
|
|
39
|
+
from .persona_builder import PersonaBuilder
|
|
40
|
+
from .campaign_diagnostics import CampaignDiagnostics
|
|
41
|
+
from .pre_moderation import PreModeration
|
|
42
|
+
from .moderation import Moderation
|
|
43
|
+
from .ad_library import AdLibrary
|
|
44
|
+
from .targetable_entities import TargetableEntities
|
|
45
|
+
from .locations import Locations
|
|
46
|
+
from .forecast import Forecast
|
|
47
|
+
from .plan_management import MediaPlan
|
|
48
|
+
from .historic_reach import HistoricReach
|
|
49
|
+
from .record_management import RecordManagement
|
|
50
|
+
from .hashed_records import HashedRecords
|
|
39
51
|
|
|
40
52
|
__all__ = [
|
|
41
53
|
"v1",
|
|
@@ -78,5 +90,17 @@ __all__ = [
|
|
|
78
90
|
"RasCampaignManagement",
|
|
79
91
|
"AdsDataManager",
|
|
80
92
|
"PartnerOpportunities",
|
|
93
|
+
"PersonaBuilder",
|
|
94
|
+
"CampaignDiagnostics",
|
|
95
|
+
"PreModeration",
|
|
96
|
+
"Moderation",
|
|
97
|
+
"AdLibrary",
|
|
98
|
+
"TargetableEntities",
|
|
99
|
+
"Locations",
|
|
100
|
+
"Forecast",
|
|
101
|
+
"MediaPlan",
|
|
102
|
+
"HistoricReach",
|
|
103
|
+
"RecordManagement",
|
|
104
|
+
"HashedRecords",
|
|
81
105
|
"Account"
|
|
82
106
|
]
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"""Ad library /adRepository.
|
|
2
|
+
|
|
3
|
+
Contract: Ad Library API 3.0. Two routes and both speak
|
|
4
|
+
``application/vnd.adsrepository.v1.1+json``. This is the public ads library,
|
|
5
|
+
not the ads of one advertiser: the only header it needs is
|
|
6
|
+
``Amazon-Advertising-API-ClientId``, with no scope and no account.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from ad_api.base import Client, sp_endpoint, fill_query_params, ApiResponse, Utils
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class AdLibrary(Client):
|
|
13
|
+
r"""Ad library - /adRepository/ads
|
|
14
|
+
|
|
15
|
+
Documentation: https://advertising.amazon.com/API/docs/en-us/ad-library
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
@sp_endpoint('/adRepository/ads/list', method='POST', headers=[])
|
|
19
|
+
def list_ads(self, version: str = "1.1", **kwargs) -> ApiResponse:
|
|
20
|
+
r"""
|
|
21
|
+
Lists the ads already delivered, with filters. Read only.
|
|
22
|
+
|
|
23
|
+
Request Body, all optional
|
|
24
|
+
| **advertiserName** (str): the advertiser to look for.
|
|
25
|
+
| **nameMatchType** (str): ``CONTAINS`` or ``EXACT_MATCH``. Without
|
|
26
|
+
| it the match is loose: ``Nike`` also returns ``Nikena``.
|
|
27
|
+
| **advertisementPurpose** (str): the product, service or brand
|
|
28
|
+
| inside the ad.
|
|
29
|
+
| **siteName** (str): the Amazon site, such as ``amazon.es``.
|
|
30
|
+
| **isRestricted** (bool): paused, removed or suppressed ads.
|
|
31
|
+
| **deliveryAfterDateUtc** (str): ``YYYY-MM-DD``, UTC.
|
|
32
|
+
| **deliveryBeforeDateUtc** (str): ``YYYY-MM-DD``, UTC.
|
|
33
|
+
| **maxResults** (int): default 10, from 1 to 1000.
|
|
34
|
+
| **nextToken** (str): token from a previous answer.
|
|
35
|
+
|
|
36
|
+
Keyword Args
|
|
37
|
+
|
|
38
|
+
- ``version`` (str): media type version. Defaults to ``1.1``. [optional]
|
|
39
|
+
|
|
40
|
+
Returns
|
|
41
|
+
ApiResponse with ``ads``, ``nextToken`` and ``totalResults``. Each
|
|
42
|
+
ad carries ``id``, ``type`` (``AD`` or
|
|
43
|
+
``AFFILIATE_MARKETING_CONTENT``), ``advertiserName``,
|
|
44
|
+
``advertisementPurpose``, ``contentUrls``, ``contents``,
|
|
45
|
+
``deliveryAfterDateUtc``, ``isRestricted``, ``recipientsBreakdown``
|
|
46
|
+
and ``subjectMatterUrl``. Fields the library does not have arrive
|
|
47
|
+
as ``NOT_AVAILABLE``.
|
|
48
|
+
"""
|
|
49
|
+
media_type = 'application/vnd.adsrepository.v' + version + '+json'
|
|
50
|
+
headers = {'Accept': media_type, 'Content-Type': media_type}
|
|
51
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
52
|
+
return self._request(fill_query_params(kwargs.pop('path')),
|
|
53
|
+
data=body, params=kwargs, headers=headers)
|
|
54
|
+
|
|
55
|
+
@sp_endpoint('/adRepository/ads/{}', method='GET', headers=[])
|
|
56
|
+
def get_ad(self, adId, version: str = "1.1", **kwargs) -> ApiResponse:
|
|
57
|
+
r"""
|
|
58
|
+
Gets one ad of the library by its id. Read only.
|
|
59
|
+
|
|
60
|
+
Path Parameters
|
|
61
|
+
|
|
62
|
+
- ``adId`` (str): the ``id`` a list entry carries, such as
|
|
63
|
+
``amzn1.vse.video.<uuid>``. [required]
|
|
64
|
+
|
|
65
|
+
Keyword Args
|
|
66
|
+
|
|
67
|
+
- ``version`` (str): media type version. Defaults to ``1.1``. [optional]
|
|
68
|
+
|
|
69
|
+
Returns
|
|
70
|
+
ApiResponse with ``ad``, the same shape a list entry has.
|
|
71
|
+
"""
|
|
72
|
+
media_type = 'application/vnd.adsrepository.v' + version + '+json'
|
|
73
|
+
headers = {'Accept': media_type}
|
|
74
|
+
return self._request(fill_query_params(kwargs.pop('path'), adId),
|
|
75
|
+
params=kwargs, headers=headers)
|
|
76
|
+
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"""Campaign diagnostics /diagnostics/campaigns/issues.
|
|
2
|
+
|
|
3
|
+
Contract: Diagnostics 3.0. One route, ``POST``, media type
|
|
4
|
+
``application/vnd.campaigndiagnosticsissues.v1+json`` for both the body and the
|
|
5
|
+
answer. It identifies the caller with ``Amazon-Advertising-API-Scope``.
|
|
6
|
+
|
|
7
|
+
The contract marks the family as deprecated: retired on 1 December 2025, and no
|
|
8
|
+
new callers accepted since 20 June 2025. A live call answers ``401`` with
|
|
9
|
+
``The Campaign Diagnostics API has been deprecated and new callers are not
|
|
10
|
+
allowed to onboard``, which is onboarding being closed, not a broken request.
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
from ad_api.base import Client, sp_endpoint, fill_query_params, ApiResponse, Utils
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class CampaignDiagnostics(Client):
|
|
17
|
+
r"""Campaign diagnostics - /diagnostics/campaigns/issues
|
|
18
|
+
|
|
19
|
+
Documentation: https://advertising.amazon.com/API/docs/en-us/campaign-diagnostics
|
|
20
|
+
|
|
21
|
+
.. deprecated:: 2.3.0
|
|
22
|
+
|
|
23
|
+
Retired on 1 December 2025. New callers cannot onboard since 20 June 2025.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
@sp_endpoint('/diagnostics/campaigns/issues', method='POST',
|
|
27
|
+
headers=['Amazon-Advertising-API-Scope'])
|
|
28
|
+
def post_campaign_issues(self, **kwargs) -> ApiResponse:
|
|
29
|
+
r"""
|
|
30
|
+
Creates the issues that affect a set of campaigns. Read only.
|
|
31
|
+
|
|
32
|
+
Request Body [Required]
|
|
33
|
+
| **campaignIdsList** (list): one to fifty campaign identifiers.
|
|
34
|
+
|
|
35
|
+
Request Body [Optional]
|
|
36
|
+
| **includeOnlyActive** (bool): enabled entities only. Default
|
|
37
|
+
| ``false``, which returns enabled and paused.
|
|
38
|
+
| **issueTypeFilter** (list): up to three issue types; by default
|
|
39
|
+
| every type is returned.
|
|
40
|
+
| **severityFilter** (list): ``CRITICAL`` or ``WARNING``.
|
|
41
|
+
| **locale** (str): language of the messages, ``en_US`` by default.
|
|
42
|
+
| **maxIssuesPerCampaign** (int): default 100, maximum 1000.
|
|
43
|
+
| **nextToken** (str): token from a previous answer.
|
|
44
|
+
|
|
45
|
+
Returns
|
|
46
|
+
ApiResponse with ``campaignDiagnosticsList`` (each entry carries
|
|
47
|
+
``campaignId`` and ``issuesList``), ``errorsList`` and ``nextToken``.
|
|
48
|
+
The success status is ``207``, not ``200``.
|
|
49
|
+
"""
|
|
50
|
+
media_type = 'application/vnd.campaigndiagnosticsissues.v1+json'
|
|
51
|
+
headers = {'Accept': media_type, 'Content-Type': media_type}
|
|
52
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
53
|
+
return self._request(fill_query_params(kwargs.pop('path')),
|
|
54
|
+
data=body, params=kwargs, headers=headers)
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"""Reach and performance forecasting /mediaPlan/v1.
|
|
2
|
+
|
|
3
|
+
Contract: Reach Planning Service 3.0. Five ``POST`` routes, plain
|
|
4
|
+
``application/json`` in body and answer, all of them under ``/mediaPlan/v1``, the
|
|
5
|
+
same prefix *Plan management* uses. It is the second child of *Media Planning*.
|
|
6
|
+
|
|
7
|
+
Three routes create work and answer **207**, not 200: ``reachForecasts``,
|
|
8
|
+
``deduplicatedReachForecasts`` and ``performanceForecasts``. The other two read:
|
|
9
|
+
``reachForecasts/list`` and ``reachForecasts/targets/list``.
|
|
10
|
+
|
|
11
|
+
Only ``Amazon-Advertising-API-ClientId`` is marked required in the contract;
|
|
12
|
+
the scope and the account headers are optional there. The scope is what
|
|
13
|
+
identifies the account in practice.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from ad_api.base import Client, sp_endpoint, fill_query_params, ApiResponse, Utils
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class Forecast(Client):
|
|
20
|
+
r"""Forecast - reach and performance forecasting, /mediaPlan/v1
|
|
21
|
+
|
|
22
|
+
Documentation: https://advertising.amazon.com/API/docs/en-us/reach-and-performance-forecasting
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
@sp_endpoint('/mediaPlan/v1/reachForecasts/list', method='POST',
|
|
26
|
+
headers=['Amazon-Advertising-API-Scope'])
|
|
27
|
+
def list_reach_forecasts(self, **kwargs) -> ApiResponse:
|
|
28
|
+
r"""
|
|
29
|
+
Lists the reach forecasts of the account. Read only.
|
|
30
|
+
|
|
31
|
+
Request Body [Required]
|
|
32
|
+
| **reachForecastIds** (list): one to a hundred UUIDs, from a
|
|
33
|
+
| previous create.
|
|
34
|
+
|
|
35
|
+
Request Body [Optional]
|
|
36
|
+
| **maxResults** (int): default 100, from 1 to 100.
|
|
37
|
+
| **nextToken** (str): token from a previous answer.
|
|
38
|
+
|
|
39
|
+
Returns
|
|
40
|
+
ApiResponse with ``reachForecasts`` and ``nextToken``. An account
|
|
41
|
+
without forecasts answers ``200`` with an empty list.
|
|
42
|
+
"""
|
|
43
|
+
headers = {'Accept': 'application/json',
|
|
44
|
+
'Content-Type': 'application/json'}
|
|
45
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
46
|
+
return self._request(fill_query_params(kwargs.pop('path')),
|
|
47
|
+
data=body, params=kwargs, headers=headers)
|
|
48
|
+
|
|
49
|
+
@sp_endpoint('/mediaPlan/v1/reachForecasts', method='POST',
|
|
50
|
+
headers=['Amazon-Advertising-API-Scope'])
|
|
51
|
+
def create_reach_forecast(self, **kwargs) -> ApiResponse:
|
|
52
|
+
r"""
|
|
53
|
+
Creates one or more reach forecasts. Answers **207**, the multi-status
|
|
54
|
+
code, because each forecast can succeed or fail on its own.
|
|
55
|
+
|
|
56
|
+
Request Body [Required]
|
|
57
|
+
| **reachForecasts** (list): the forecasts to create.
|
|
58
|
+
|
|
59
|
+
Request Body [Optional]
|
|
60
|
+
| **commonTargets** (object): targets shared by every forecast in
|
|
61
|
+
| the request.
|
|
62
|
+
|
|
63
|
+
Returns
|
|
64
|
+
ApiResponse, one entry per forecast.
|
|
65
|
+
"""
|
|
66
|
+
headers = {'Accept': 'application/json',
|
|
67
|
+
'Content-Type': 'application/json'}
|
|
68
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
69
|
+
return self._request(fill_query_params(kwargs.pop('path')),
|
|
70
|
+
data=body, params=kwargs, headers=headers)
|
|
71
|
+
|
|
72
|
+
@sp_endpoint('/mediaPlan/v1/deduplicatedReachForecasts', method='POST',
|
|
73
|
+
headers=['Amazon-Advertising-API-Scope'])
|
|
74
|
+
def create_deduplicated_reach_forecasts(self, **kwargs) -> ApiResponse:
|
|
75
|
+
r"""
|
|
76
|
+
Creates reach forecasts that account for overlap with each other, so the
|
|
77
|
+
combined reach is not double counted. Answers **207**.
|
|
78
|
+
|
|
79
|
+
Request Body [Required]
|
|
80
|
+
| **deduplicatedReachForecasts** (list): the forecasts to create.
|
|
81
|
+
|
|
82
|
+
Returns
|
|
83
|
+
ApiResponse, one entry per forecast.
|
|
84
|
+
"""
|
|
85
|
+
headers = {'Accept': 'application/json',
|
|
86
|
+
'Content-Type': 'application/json'}
|
|
87
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
88
|
+
return self._request(fill_query_params(kwargs.pop('path')),
|
|
89
|
+
data=body, params=kwargs, headers=headers)
|
|
90
|
+
|
|
91
|
+
@sp_endpoint('/mediaPlan/v1/performanceForecasts', method='POST',
|
|
92
|
+
headers=['Amazon-Advertising-API-Scope'])
|
|
93
|
+
def generate_performance_forecasts(self, **kwargs) -> ApiResponse:
|
|
94
|
+
r"""
|
|
95
|
+
Generates the performance forecast of a plan: impressions, clicks and
|
|
96
|
+
the rest. Answers **207**.
|
|
97
|
+
|
|
98
|
+
Request Body [Required]
|
|
99
|
+
| **performanceForecasts** (list): what to forecast.
|
|
100
|
+
|
|
101
|
+
Returns
|
|
102
|
+
ApiResponse, one entry per forecast.
|
|
103
|
+
"""
|
|
104
|
+
headers = {'Accept': 'application/json',
|
|
105
|
+
'Content-Type': 'application/json'}
|
|
106
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
107
|
+
return self._request(fill_query_params(kwargs.pop('path')),
|
|
108
|
+
data=body, params=kwargs, headers=headers)
|
|
109
|
+
|
|
110
|
+
@sp_endpoint('/mediaPlan/v1/reachForecasts/targets/list', method='POST',
|
|
111
|
+
headers=['Amazon-Advertising-API-Scope'])
|
|
112
|
+
def list_reach_forecast_targets(self, **kwargs) -> ApiResponse:
|
|
113
|
+
r"""
|
|
114
|
+
Lists the targets one reach forecast was built from. Read only.
|
|
115
|
+
|
|
116
|
+
Request Body [Required]
|
|
117
|
+
| **reachForecastId** (str): the forecast, a UUID.
|
|
118
|
+
|
|
119
|
+
Request Body [Optional]
|
|
120
|
+
| **maxResults** (int): page size.
|
|
121
|
+
| **nextToken** (str): token from a previous answer.
|
|
122
|
+
|
|
123
|
+
Returns
|
|
124
|
+
ApiResponse with the targets and ``nextToken``.
|
|
125
|
+
"""
|
|
126
|
+
headers = {'Accept': 'application/json',
|
|
127
|
+
'Content-Type': 'application/json'}
|
|
128
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
129
|
+
return self._request(fill_query_params(kwargs.pop('path')),
|
|
130
|
+
data=body, params=kwargs, headers=headers)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"""Hashed records /dp/records/hashed.
|
|
2
|
+
|
|
3
|
+
Contract: Hashed Records 3.0, the *Hashed records* child of *Data provider*.
|
|
4
|
+
One route: ``POST /dp/records/hashed``, plain ``application/json``.
|
|
5
|
+
|
|
6
|
+
It takes records whose identifiers are already hashed, so a data provider never
|
|
7
|
+
ships raw cookies or emails to Amazon.
|
|
8
|
+
|
|
9
|
+
Like its sibling, the contract asks for no identity header: only
|
|
10
|
+
``Authorization``, ``Amazon-Advertising-API-ClientId`` and ``Content-Type``.
|
|
11
|
+
This client is not allowed to call it: the service answers
|
|
12
|
+
``403 Client is not allowed to call this API``.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
from ad_api.base import Client, sp_endpoint, fill_query_params, ApiResponse, Utils
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class HashedRecords(Client):
|
|
19
|
+
r"""Hashed records - /dp/records/hashed
|
|
20
|
+
|
|
21
|
+
Documentation: https://advertising.amazon.com/API/docs/en-us/data-provider/hashed-records
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
@sp_endpoint('/dp/records/hashed', method='POST', headers=[])
|
|
25
|
+
def post_hashed_records(self, **kwargs) -> ApiResponse:
|
|
26
|
+
r"""
|
|
27
|
+
Sends records with hashed identifiers.
|
|
28
|
+
|
|
29
|
+
Request Body [Required]
|
|
30
|
+
The records the contract publishes, with their hashed ids.
|
|
31
|
+
|
|
32
|
+
Returns
|
|
33
|
+
ApiResponse with the outcome. Access denied answers ``403``.
|
|
34
|
+
"""
|
|
35
|
+
headers = {'Accept': 'application/json',
|
|
36
|
+
'Content-Type': 'application/json'}
|
|
37
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
38
|
+
return self._request(fill_query_params(kwargs.pop('path')),
|
|
39
|
+
data=body, params=kwargs, headers=headers)
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"""Historic reach /mediaPlan/historicalReachCurves and /mediaPlan/v2.
|
|
2
|
+
|
|
3
|
+
Contract: Media Insights Hub 3.0, the *Historic reach* family of *Media
|
|
4
|
+
Planning*. Five ``POST`` and ``GET`` routes across two prefixes: the two ``list``
|
|
5
|
+
routes live under ``/mediaPlan/historicalReachCurves`` and speak
|
|
6
|
+
``application/vnd.mediaplanhistoricalreachcurves.v1+json``; the report routes
|
|
7
|
+
live under ``/mediaPlan/v2`` and speak plain ``application/json``. Errors come
|
|
8
|
+
as ``application/vnd.error.v1+json`` on the v1 lists.
|
|
9
|
+
|
|
10
|
+
Header: ``Amazon-Advertising-API-ClientId`` is required; the contract lists
|
|
11
|
+
``Amazon-Ads-AccountId``, the DSP advertiser id, and
|
|
12
|
+
``Amazon-Advertising-API-Scope`` as optional. Both identity headers are
|
|
13
|
+
declared, so a DSP caller can send the account id and a profile caller the
|
|
14
|
+
scope; ``selector`` picks one.
|
|
15
|
+
|
|
16
|
+
The two ``list`` routes require a ``targeting`` object and, inside it,
|
|
17
|
+
``geography``. Sending a body without it answers
|
|
18
|
+
``400 Value null at targeting failed to satisfy constraint``, which reads
|
|
19
|
+
like an access problem and is not one. With it, the route answers ``200``.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
from ad_api.base import Client, sp_endpoint, fill_query_params, ApiResponse, Utils
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class HistoricReach(Client):
|
|
26
|
+
r"""Historic reach - /mediaPlan
|
|
27
|
+
|
|
28
|
+
Documentation: https://advertising.amazon.com/API/docs/en-us/historic-reach
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
@sp_endpoint('/mediaPlan/historicalReachCurves/list', method='POST',
|
|
32
|
+
headers=['Amazon-Advertising-API-Scope',
|
|
33
|
+
'Amazon-Ads-AccountId'])
|
|
34
|
+
def list_historical_reach_curves(self, version: str = "1", **kwargs) -> ApiResponse:
|
|
35
|
+
r"""
|
|
36
|
+
Lists the historic reach curves of the account. Read only.
|
|
37
|
+
|
|
38
|
+
Request Body [Required]
|
|
39
|
+
| **targeting** (dict): at least ``geography``, such as ``ES``.
|
|
40
|
+
| It also takes ``channels``, ``demographics`` and ``reachType``
|
|
41
|
+
| (``INDIVIDUALS`` or ``HOUSEHOLDS``).
|
|
42
|
+
|
|
43
|
+
Request Body [Optional]
|
|
44
|
+
| **month** (str): ``MM/YYYY``. Defaults to the most recent month the
|
|
45
|
+
| geography has.
|
|
46
|
+
| **maxResults** (int): default 1000, from 1 to 1000.
|
|
47
|
+
| **nextToken** (str): token from a previous answer.
|
|
48
|
+
|
|
49
|
+
Keyword Args
|
|
50
|
+
|
|
51
|
+
- ``version`` (str): media type version. Defaults to ``1``. [optional]
|
|
52
|
+
|
|
53
|
+
Returns
|
|
54
|
+
ApiResponse with ``historicalReachCurves`` and ``totalResults``.
|
|
55
|
+
"""
|
|
56
|
+
media_type = ('application/vnd.mediaplanhistoricalreachcurves.v'
|
|
57
|
+
+ version + '+json')
|
|
58
|
+
headers = {'Accept': media_type, 'Content-Type': media_type}
|
|
59
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
60
|
+
return self._request(fill_query_params(kwargs.pop('path')),
|
|
61
|
+
data=body, params=kwargs, headers=headers)
|
|
62
|
+
|
|
63
|
+
@sp_endpoint('/mediaPlan/historicalReachCurvesMetadata/list', method='POST',
|
|
64
|
+
headers=['Amazon-Advertising-API-Scope',
|
|
65
|
+
'Amazon-Ads-AccountId'])
|
|
66
|
+
def list_historical_reach_curve_metadata(self, version: str = "1", **kwargs) -> ApiResponse:
|
|
67
|
+
r"""
|
|
68
|
+
Lists the metadata of the historic reach curves. Read only.
|
|
69
|
+
|
|
70
|
+
Request Body
|
|
71
|
+
The list body the contract publishes for this resource.
|
|
72
|
+
|
|
73
|
+
Keyword Args
|
|
74
|
+
|
|
75
|
+
- ``version`` (str): media type version. Defaults to ``1``. [optional]
|
|
76
|
+
|
|
77
|
+
Returns
|
|
78
|
+
ApiResponse with the metadata.
|
|
79
|
+
"""
|
|
80
|
+
media_type = ('application/vnd.mediaplanhistoricalreachcurves.v'
|
|
81
|
+
+ version + '+json')
|
|
82
|
+
headers = {'Accept': media_type, 'Content-Type': media_type}
|
|
83
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
84
|
+
return self._request(fill_query_params(kwargs.pop('path')),
|
|
85
|
+
data=body, params=kwargs, headers=headers)
|
|
86
|
+
|
|
87
|
+
@sp_endpoint('/mediaPlan/v2/historicalReachCurves', method='POST',
|
|
88
|
+
headers=['Amazon-Advertising-API-Scope',
|
|
89
|
+
'Amazon-Ads-AccountId'])
|
|
90
|
+
def create_historical_reach_curve_report(self, **kwargs) -> ApiResponse:
|
|
91
|
+
r"""
|
|
92
|
+
Asks for a historic reach curve report. It is asynchronous: the answer
|
|
93
|
+
carries a ``reportId`` and its state is read with
|
|
94
|
+
``get_historical_reach_curve_report_status``.
|
|
95
|
+
|
|
96
|
+
Request Body [Required]
|
|
97
|
+
The report body the contract publishes.
|
|
98
|
+
|
|
99
|
+
Returns
|
|
100
|
+
ApiResponse with the created report.
|
|
101
|
+
"""
|
|
102
|
+
headers = {'Accept': 'application/json',
|
|
103
|
+
'Content-Type': 'application/json'}
|
|
104
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
105
|
+
return self._request(fill_query_params(kwargs.pop('path')),
|
|
106
|
+
data=body, params=kwargs, headers=headers)
|
|
107
|
+
|
|
108
|
+
@sp_endpoint('/mediaPlan/v2/historicalReachCurves/{}', method='GET',
|
|
109
|
+
headers=['Amazon-Advertising-API-Scope',
|
|
110
|
+
'Amazon-Ads-AccountId'])
|
|
111
|
+
def get_historical_reach_curve_report(self, reportId, **kwargs) -> ApiResponse:
|
|
112
|
+
r"""
|
|
113
|
+
Reads a historic reach curve report. Read only.
|
|
114
|
+
|
|
115
|
+
Path Parameters
|
|
116
|
+
|
|
117
|
+
- ``reportId`` (str): the report. [required]
|
|
118
|
+
|
|
119
|
+
Keyword Args
|
|
120
|
+
|
|
121
|
+
- ``maxResults`` (int): page size. [optional]
|
|
122
|
+
- ``nextToken`` (str): token from a previous answer. [optional]
|
|
123
|
+
|
|
124
|
+
Returns
|
|
125
|
+
ApiResponse with the report rows.
|
|
126
|
+
"""
|
|
127
|
+
headers = {'Accept': 'application/json'}
|
|
128
|
+
return self._request(fill_query_params(kwargs.pop('path'), reportId),
|
|
129
|
+
params=kwargs, headers=headers)
|
|
130
|
+
|
|
131
|
+
@sp_endpoint('/mediaPlan/v2/historicalReachCurves/{}/status', method='GET',
|
|
132
|
+
headers=['Amazon-Advertising-API-Scope',
|
|
133
|
+
'Amazon-Ads-AccountId'])
|
|
134
|
+
def get_historical_reach_curve_report_status(self, reportId, **kwargs) -> ApiResponse:
|
|
135
|
+
r"""
|
|
136
|
+
Reads the state of a report: whether it is still being built or ready to
|
|
137
|
+
be fetched. Read only.
|
|
138
|
+
|
|
139
|
+
Path Parameters
|
|
140
|
+
|
|
141
|
+
- ``reportId`` (str): the report. [required]
|
|
142
|
+
|
|
143
|
+
Returns
|
|
144
|
+
ApiResponse with the status.
|
|
145
|
+
"""
|
|
146
|
+
headers = {'Accept': 'application/json'}
|
|
147
|
+
return self._request(fill_query_params(kwargs.pop('path'), reportId),
|
|
148
|
+
params=kwargs, headers=headers)
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"""Locations /locations/list.
|
|
2
|
+
|
|
3
|
+
Contract: Locations 3.0. One ``POST`` route, plain ``application/json`` in the
|
|
4
|
+
body and in the answer, so there is no media type version to build here. It is
|
|
5
|
+
the second child of *Discovery*, next to *Targetable entities*.
|
|
6
|
+
|
|
7
|
+
**US only, and that is two things at once.** The route lives in the NA
|
|
8
|
+
partition, so a US profile must go to ``advertising-api.amazon.com``: sent to
|
|
9
|
+
the EU host it answers ``400 Profile not found``. And even in the right
|
|
10
|
+
partition an EU profile, which is legitimate on the EU host, gets ``200`` with
|
|
11
|
+
``{"locations": []}``: the route only carries data for the United States.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
from ad_api.base import Client, sp_endpoint, fill_query_params, ApiResponse, Utils
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class Locations(Client):
|
|
18
|
+
r"""Locations - /locations/list
|
|
19
|
+
|
|
20
|
+
Documentation: https://advertising.amazon.com/API/docs/en-us/locations
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
@sp_endpoint('/locations/list', method='POST',
|
|
24
|
+
headers=['Amazon-Advertising-API-Scope'])
|
|
25
|
+
def list_locations(self, **kwargs) -> ApiResponse:
|
|
26
|
+
r"""
|
|
27
|
+
Lists the locations that match the filters given. Read only.
|
|
28
|
+
|
|
29
|
+
Request Body [Required in practice]
|
|
30
|
+
| **filters** (list): at least one filter. The contract does not
|
|
31
|
+
| mark it required, but sending a body without it answers
|
|
32
|
+
| ``400 Value null at ``filters`` failed to satisfy constraint``.
|
|
33
|
+
|
|
34
|
+
Each filter takes ``field`` and ``values``:
|
|
35
|
+
|
|
36
|
+
- ``field`` (str): ``locationId``, ``name`` or ``category``.
|
|
37
|
+
- ``values`` (list): the values to match. The ``name`` field is a
|
|
38
|
+
fuzzy search; for ``category`` the values are ``CITY``, ``STATE``,
|
|
39
|
+
``DMA``, ``COUNTRY`` or ``POSTAL_CODE``.
|
|
40
|
+
|
|
41
|
+
The filters combine with AND: an item must match all of them.
|
|
42
|
+
|
|
43
|
+
Returns
|
|
44
|
+
ApiResponse with ``locations``, a list of items carrying
|
|
45
|
+
``locationId``, ``name`` and ``category``. There is no pagination
|
|
46
|
+
in the answer.
|
|
47
|
+
|
|
48
|
+
**US only.** A US profile answers on the NA host; on the EU host it is
|
|
49
|
+
``400 Profile not found``. An EU profile on its own host answers ``200``
|
|
50
|
+
with ``locations: []``, because the route only carries data for the
|
|
51
|
+
United States.
|
|
52
|
+
"""
|
|
53
|
+
headers = {'Accept': 'application/json',
|
|
54
|
+
'Content-Type': 'application/json'}
|
|
55
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
56
|
+
return self._request(fill_query_params(kwargs.pop('path')),
|
|
57
|
+
data=body, params=kwargs, headers=headers)
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"""Moderation /moderation/results.
|
|
2
|
+
|
|
3
|
+
Contract: Moderation 3.0. One route, ``POST``, and the two media types do not
|
|
4
|
+
share a number: the request body is
|
|
5
|
+
``application/vnd.moderationresultsrequest.v4.1+json`` and the answer is
|
|
6
|
+
``application/vnd.moderationresultsresponse.v4.0+json``.
|
|
7
|
+
|
|
8
|
+
It returns the moderation status of an ad already created: approved, rejected,
|
|
9
|
+
still in progress or failed, with the policy violations behind a rejection and
|
|
10
|
+
the components they belong to.
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
from ad_api.base import Client, sp_endpoint, fill_query_params, ApiResponse, Utils
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class Moderation(Client):
|
|
17
|
+
r"""Moderation - /moderation/results
|
|
18
|
+
|
|
19
|
+
Documentation: https://advertising.amazon.com/API/docs/en-us/moderation
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
@sp_endpoint('/moderation/results', method='POST',
|
|
23
|
+
headers=['Amazon-Advertising-API-Scope'])
|
|
24
|
+
def post_moderation_results(self, request_version: str = "4.1",
|
|
25
|
+
response_version: str = "4.0",
|
|
26
|
+
**kwargs) -> ApiResponse:
|
|
27
|
+
r"""
|
|
28
|
+
Reads the moderation results of an ad. Read only.
|
|
29
|
+
|
|
30
|
+
Request Body [Required]
|
|
31
|
+
| **adProgramType** (str): ``SB_PRODUCT_COLLECTION``,
|
|
32
|
+
| ``SB_STORE_SPOTLIGHT``, ``SB_VIDEO``, ``SPONSORED_DISPLAY`` or
|
|
33
|
+
| ``SPONSORED_PRODUCTS``.
|
|
34
|
+
| **id** (str): the ad id, from the create routes.
|
|
35
|
+
| **idType** (str): ``AD_ID`` today, the only value the contract has.
|
|
36
|
+
| **maxResults** (int): one to ten.
|
|
37
|
+
|
|
38
|
+
Request Body [Optional]
|
|
39
|
+
| **moderationStatusFilter** (list): ``APPROVED``, ``FAILED``,
|
|
40
|
+
| ``IN_PROGRESS`` or ``REJECTED``.
|
|
41
|
+
| **versionIdFilter** (list): up to 200 versions of the ad. Empty
|
|
42
|
+
| returns every version.
|
|
43
|
+
| **nextToken** (str): token from a previous answer.
|
|
44
|
+
|
|
45
|
+
Keyword Args
|
|
46
|
+
|
|
47
|
+
- ``request_version`` (str): request media type version, ``4.1``.
|
|
48
|
+
[optional]
|
|
49
|
+
- ``response_version`` (str): answer media type version, ``4.0``.
|
|
50
|
+
[optional]
|
|
51
|
+
|
|
52
|
+
Returns
|
|
53
|
+
ApiResponse with ``moderationResults`` and ``nextToken``. Each
|
|
54
|
+
result carries ``id``, ``idType``, ``versionId``,
|
|
55
|
+
``moderationStatus``, ``policyViolations`` and
|
|
56
|
+
``componentModerationResults``, with one list per component type.
|
|
57
|
+
"""
|
|
58
|
+
request_type = ('application/vnd.moderationresultsrequest.v'
|
|
59
|
+
+ request_version + '+json')
|
|
60
|
+
accept = ('application/vnd.moderationresultsresponse.v'
|
|
61
|
+
+ response_version + '+json')
|
|
62
|
+
headers = {'Accept': accept, 'Content-Type': request_type}
|
|
63
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
64
|
+
return self._request(fill_query_params(kwargs.pop('path')),
|
|
65
|
+
data=body, params=kwargs, headers=headers)
|