python-amazon-ad-api 2.3.1__tar.gz → 2.4.0__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.3.1 → python_amazon_ad_api-2.4.0}/PKG-INFO +1 -1
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/__init__.py +62 -0
- python_amazon_ad_api-2.4.0/ad_api/api/dsp_ad_group_and_campaign.py +139 -0
- python_amazon_ad_api-2.4.0/ad_api/api/dsp_audience_create.py +53 -0
- python_amazon_ad_api-2.4.0/ad_api/api/dsp_bid_adjustments.py +193 -0
- python_amazon_ad_api-2.4.0/ad_api/api/dsp_campaign_flights.py +119 -0
- python_amazon_ad_api-2.4.0/ad_api/api/dsp_campaign_insights.py +59 -0
- python_amazon_ad_api-2.4.0/ad_api/api/dsp_combined_audiences.py +83 -0
- python_amazon_ad_api-2.4.0/ad_api/api/dsp_conversion_tracking_products.py +92 -0
- python_amazon_ad_api-2.4.0/ad_api/api/dsp_conversions.py +442 -0
- python_amazon_ad_api-2.4.0/ad_api/api/dsp_creatives.py +114 -0
- python_amazon_ad_api-2.4.0/ad_api/api/dsp_deal_permissions.py +170 -0
- python_amazon_ad_api-2.4.0/ad_api/api/dsp_deal_proposals.py +440 -0
- python_amazon_ad_api-2.4.0/ad_api/api/dsp_deals.py +204 -0
- python_amazon_ad_api-2.4.0/ad_api/api/dsp_deals_management.py +66 -0
- python_amazon_ad_api-2.4.0/ad_api/api/dsp_discovery_advertised_product_categories.py +35 -0
- python_amazon_ad_api-2.4.0/ad_api/api/dsp_discovery_apps.py +36 -0
- python_amazon_ad_api-2.4.0/ad_api/api/dsp_discovery_domain_lists.py +36 -0
- python_amazon_ad_api-2.4.0/ad_api/api/dsp_discovery_geo_locations.py +42 -0
- python_amazon_ad_api-2.4.0/ad_api/api/dsp_discovery_iab_content.py +37 -0
- python_amazon_ad_api-2.4.0/ad_api/api/dsp_discovery_inventory_source_exchanges.py +36 -0
- python_amazon_ad_api-2.4.0/ad_api/api/dsp_discovery_products.py +102 -0
- python_amazon_ad_api-2.4.0/ad_api/api/dsp_discovery_third_party_target_segments.py +36 -0
- python_amazon_ad_api-2.4.0/ad_api/api/dsp_frequency_associations.py +138 -0
- python_amazon_ad_api-2.4.0/ad_api/api/dsp_frequency_groups.py +112 -0
- python_amazon_ad_api-2.4.0/ad_api/api/dsp_frequency_insights.py +85 -0
- python_amazon_ad_api-2.4.0/ad_api/api/dsp_guidance.py +111 -0
- python_amazon_ad_api-2.4.0/ad_api/api/dsp_inherited_settings.py +133 -0
- python_amazon_ad_api-2.4.0/ad_api/api/dsp_inventory_groups.py +209 -0
- python_amazon_ad_api-2.4.0/ad_api/api/dsp_measurement.py +693 -0
- python_amazon_ad_api-2.4.0/ad_api/api/dsp_seats.py +43 -0
- python_amazon_ad_api-2.4.0/ad_api/api/dsp_target_kpi_recommendations.py +44 -0
- python_amazon_ad_api-2.4.0/ad_api/api/dsp_targeting.py +98 -0
- python_amazon_ad_api-2.4.0/ad_api/version.py +1 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/python_amazon_ad_api.egg-info/PKG-INFO +1 -1
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/python_amazon_ad_api.egg-info/SOURCES.txt +31 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/setup.cfg +1 -1
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/setup.py +1 -1
- python_amazon_ad_api-2.3.1/ad_api/version.py +0 -1
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/LICENSE +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/README.md +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/__init__.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/account.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/account_budgets.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/ad_library.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/ads_data_manager.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/advertising_invitations.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/advertising_test_account.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/advertising_user_permissions.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/attribution.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/audiences.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/billing.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/brand_benchmarks.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/brand_home.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/brand_metrics.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/campaign_diagnostics.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/creative_assets.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/dsp_advertiser.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/eligibility.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/exports.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/forecast.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/hashed_records.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/historic_reach.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/history.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/insights.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/localization.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/locations.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/manager_accounts.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/marketing_mix_modeling.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/metadata.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/moderation.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/partner_opportunities.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/persona_builder.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/plan_management.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/portfolios.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/portfolios_v3.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/pre_moderation.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/profiles.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/ras_campaign_management.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/ras_retailer_identity.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/recommendations.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/record_management.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/reports.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sb/__init__.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sb/ad_creatives_v4.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sb/ad_groups.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sb/ad_groups_v4.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sb/ads_v4.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sb/benchmarks.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sb/bid_recommendations.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sb/brands.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sb/budget_rules.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sb/campaigns.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sb/campaigns_v4.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sb/forecast.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sb/keywords.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sb/keywords_recommendations.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sb/landing_page_asins.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sb/media.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sb/migration.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sb/negative_keywords.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sb/negative_product_targeting.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sb/optimization_rules.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sb/product_targeting.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sb/recommendations.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sb/reports.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sb/stores.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sb/targeting_categories.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sb/targeting_recommendations.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sb/themes.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sd/__init__.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sd/ad_groups.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sd/bid_recommendations.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sd/brand_safety.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sd/budget_rules.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sd/campaigns.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sd/campaigns_budget_usage.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sd/creatives.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sd/forecast.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sd/negative_product_targeting.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sd/product_ads.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sd/product_targeting.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sd/recommendations.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sd/reports.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sd/snapshots.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sd/targeting_recommendations.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sp/__init__.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sp/ad_groups_v3.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sp/bid_recommendations_v3.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sp/budget_initial_recommendation.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sp/budget_recommendations.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sp/budget_rules.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sp/budget_rules_recommendations.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sp/campaign_consolidated_recommendations.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sp/campaign_negative_keywords_v3.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sp/campaign_negative_targets.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sp/campaigns_budget_usage.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sp/campaigns_v3.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sp/campaings_optimization.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sp/global_recommendations.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sp/keyword_groups_recommendations.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sp/keywords_v3.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sp/negative_keywords_v3.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sp/negative_product_targeting_v3.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sp/product_ads_v3.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sp/product_recommendations.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sp/product_targeting_v3.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sp/ranked_keywords_recommendations.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sp/schedule_based_bid_optimization.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/sp/target_promotion_groups.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/st/__init__.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/st/ad_groups.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/st/ads.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/st/campaigns.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/st/creatives.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/st/creatives_moderations.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/st/creatives_preview.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/st/forecasts.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/st/locations.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/st/targets.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/stores.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/stream.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/targetable_entities.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/v1/__init__.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/v1/ad_associations.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/v1/ad_extensions.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/v1/ad_groups.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/v1/ads.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/v1/advertiser_accounts.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/v1/brand_store_edition_publish_versions.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/v1/brand_store_editions.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/v1/brand_store_pages.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/v1/brand_stores.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/v1/campaigns.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/v1/geo_locations.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/v1/label_object_associations.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/v1/labels.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/v1/location_indexes.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/v1/manager_accounts.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/v1/portfolios.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/v1/recommendation_types.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/v1/recommendations.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/v1/reports.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/v1/selling_accounts.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/v1/targets.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/api/validation_configurations.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/auth/__init__.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/auth/access_token_client.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/auth/access_token_response.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/auth/credentials.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/auth/exceptions.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/base/__init__.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/base/api_response.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/base/client.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/base/config.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/base/credential_provider.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/base/exceptions.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/base/helpers.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/base/marketplaces.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/base/utils.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/shared/__init__.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/ad_api/shared/base_client.py +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/pyproject.toml +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/python_amazon_ad_api.egg-info/dependency_links.txt +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/python_amazon_ad_api.egg-info/requires.txt +0 -0
- {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.0}/python_amazon_ad_api.egg-info/top_level.txt +0 -0
|
@@ -48,6 +48,37 @@ from .plan_management import MediaPlan
|
|
|
48
48
|
from .historic_reach import HistoricReach
|
|
49
49
|
from .record_management import RecordManagement
|
|
50
50
|
from .hashed_records import HashedRecords
|
|
51
|
+
from .dsp_campaign_insights import DspCampaignInsights
|
|
52
|
+
from .dsp_combined_audiences import DspCombinedAudiences
|
|
53
|
+
from .dsp_frequency_insights import DspFrequencyInsights
|
|
54
|
+
from .dsp_frequency_groups import DspFrequencyGroups
|
|
55
|
+
from .dsp_guidance import DspGuidance
|
|
56
|
+
from .dsp_frequency_associations import DspFrequencyAssociations
|
|
57
|
+
from .dsp_conversions import DspConversions
|
|
58
|
+
from .dsp_measurement import DspMeasurement
|
|
59
|
+
from .dsp_ad_group_and_campaign import DspAdGroupAndCampaign
|
|
60
|
+
from .dsp_inherited_settings import DspInheritedSettings
|
|
61
|
+
from .dsp_discovery_third_party_target_segments import DspDiscoveryThirdPartyTargetSegments
|
|
62
|
+
from .dsp_seats import DspSeats
|
|
63
|
+
from .dsp_audience_create import DspAudienceCreate
|
|
64
|
+
from .dsp_deals_management import DspDealsManagement
|
|
65
|
+
from .dsp_inventory_groups import DspInventoryGroups
|
|
66
|
+
from .dsp_deal_permissions import DspDealAdvertiserPermissions
|
|
67
|
+
from .dsp_deal_proposals import DspDealProposals
|
|
68
|
+
from .dsp_deals import DspDeals
|
|
69
|
+
from .dsp_creatives import DspCreatives
|
|
70
|
+
from .dsp_discovery_geo_locations import DspDiscoveryGeoLocations
|
|
71
|
+
from .dsp_discovery_inventory_source_exchanges import DspDiscoveryInventorySourceExchanges
|
|
72
|
+
from .dsp_discovery_iab_content import DspDiscoveryIabContentCategories
|
|
73
|
+
from .dsp_discovery_advertised_product_categories import DspDiscoveryAdvertisedProductCategories
|
|
74
|
+
from .dsp_discovery_domain_lists import DspDiscoveryDomainLists
|
|
75
|
+
from .dsp_discovery_apps import DspDiscoveryApps
|
|
76
|
+
from .dsp_discovery_products import DspDiscoveryProducts
|
|
77
|
+
from .dsp_bid_adjustments import DspBidAdjustments
|
|
78
|
+
from .dsp_target_kpi_recommendations import DspTargetKpiRecommendations
|
|
79
|
+
from .dsp_campaign_flights import DspCampaignFlights
|
|
80
|
+
from .dsp_targeting import DspTargeting
|
|
81
|
+
from .dsp_conversion_tracking_products import DspConversionTrackingProducts
|
|
51
82
|
|
|
52
83
|
__all__ = [
|
|
53
84
|
"v1",
|
|
@@ -102,5 +133,36 @@ __all__ = [
|
|
|
102
133
|
"HistoricReach",
|
|
103
134
|
"RecordManagement",
|
|
104
135
|
"HashedRecords",
|
|
136
|
+
"DspCampaignInsights",
|
|
137
|
+
"DspCombinedAudiences",
|
|
138
|
+
"DspFrequencyInsights",
|
|
139
|
+
"DspFrequencyGroups",
|
|
140
|
+
"DspGuidance",
|
|
141
|
+
"DspFrequencyAssociations",
|
|
142
|
+
"DspConversions",
|
|
143
|
+
"DspMeasurement",
|
|
144
|
+
"DspAdGroupAndCampaign",
|
|
145
|
+
"DspInheritedSettings",
|
|
146
|
+
"DspDiscoveryThirdPartyTargetSegments",
|
|
147
|
+
"DspSeats",
|
|
148
|
+
"DspAudienceCreate",
|
|
149
|
+
"DspDealsManagement",
|
|
150
|
+
"DspInventoryGroups",
|
|
151
|
+
"DspDealAdvertiserPermissions",
|
|
152
|
+
"DspDealProposals",
|
|
153
|
+
"DspDeals",
|
|
154
|
+
"DspCreatives",
|
|
155
|
+
"DspDiscoveryGeoLocations",
|
|
156
|
+
"DspDiscoveryInventorySourceExchanges",
|
|
157
|
+
"DspDiscoveryIabContentCategories",
|
|
158
|
+
"DspDiscoveryAdvertisedProductCategories",
|
|
159
|
+
"DspDiscoveryDomainLists",
|
|
160
|
+
"DspDiscoveryApps",
|
|
161
|
+
"DspDiscoveryProducts",
|
|
162
|
+
"DspBidAdjustments",
|
|
163
|
+
"DspTargetKpiRecommendations",
|
|
164
|
+
"DspCampaignFlights",
|
|
165
|
+
"DspTargeting",
|
|
166
|
+
"DspConversionTrackingProducts",
|
|
105
167
|
"Account"
|
|
106
168
|
]
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"""Ad Group and Campaign /dsp/v1.
|
|
2
|
+
|
|
3
|
+
Contract: Ad Group and Campaign - V1 3.0, the first child of *Campaign
|
|
4
|
+
management* in the vendor tree. Six operations over four paths: the two PATCH
|
|
5
|
+
share their path with the two POST, which is why the tree counts four.
|
|
6
|
+
|
|
7
|
+
Plain ``application/json`` throughout: no ``vnd`` type and no version to build.
|
|
8
|
+
|
|
9
|
+
Headers: ``Amazon-Advertising-API-ClientId`` and ``Amazon-Ads-AccountId`` are
|
|
10
|
+
required, ``Amazon-Advertising-API-Scope`` is optional and ``selector`` decides
|
|
11
|
+
between the last two.
|
|
12
|
+
|
|
13
|
+
**207 is the normal answer** on the four writes, one result per entity. The two
|
|
14
|
+
``list`` routes answer 200, because a read either succeeds or does not.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
from ad_api.base import Client, sp_endpoint, fill_query_params, ApiResponse, Utils
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class DspAdGroupAndCampaign(Client):
|
|
21
|
+
r"""Ad Group and Campaign - /dsp/v1
|
|
22
|
+
|
|
23
|
+
Documentation: https://advertising.amazon.com/API/docs/en-us/dsp-ad-group-and-campaign
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
@sp_endpoint('/dsp/v1/campaigns', method='POST',
|
|
27
|
+
headers=['Amazon-Advertising-API-Scope', 'Amazon-Ads-AccountId'])
|
|
28
|
+
def create_campaigns(self, **kwargs) -> ApiResponse:
|
|
29
|
+
r"""
|
|
30
|
+
Creates campaigns. The body carries a list, which is why the answer is 207:
|
|
31
|
+
one result per campaign, and one failure does not sink the rest.
|
|
32
|
+
|
|
33
|
+
Keyword Args
|
|
34
|
+
|
|
35
|
+
- ``selector`` (str): ``profile_id`` or ``account_id``. [optional]
|
|
36
|
+
|
|
37
|
+
Returns
|
|
38
|
+
ApiResponse, **207** multi-status, one per campaign.
|
|
39
|
+
"""
|
|
40
|
+
headers = {'Accept': 'application/json',
|
|
41
|
+
'Content-Type': 'application/json'}
|
|
42
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
43
|
+
return self._request(kwargs.pop('path'),
|
|
44
|
+
data=body, params=kwargs, headers=headers)
|
|
45
|
+
|
|
46
|
+
@sp_endpoint('/dsp/v1/campaigns', method='PATCH',
|
|
47
|
+
headers=['Amazon-Advertising-API-Scope', 'Amazon-Ads-AccountId'])
|
|
48
|
+
def update_campaigns(self, **kwargs) -> ApiResponse:
|
|
49
|
+
r"""
|
|
50
|
+
Updates campaigns in bulk. Same path as the create; the verb is the difference.
|
|
51
|
+
|
|
52
|
+
Keyword Args
|
|
53
|
+
|
|
54
|
+
- ``selector`` (str): ``profile_id`` or ``account_id``. [optional]
|
|
55
|
+
|
|
56
|
+
Returns
|
|
57
|
+
ApiResponse, **207** multi-status.
|
|
58
|
+
"""
|
|
59
|
+
headers = {'Accept': 'application/json',
|
|
60
|
+
'Content-Type': 'application/json'}
|
|
61
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
62
|
+
return self._request(kwargs.pop('path'),
|
|
63
|
+
data=body, params=kwargs, headers=headers)
|
|
64
|
+
|
|
65
|
+
@sp_endpoint('/dsp/v1/campaigns/list', method='POST',
|
|
66
|
+
headers=['Amazon-Advertising-API-Scope', 'Amazon-Ads-AccountId'])
|
|
67
|
+
def list_campaigns(self, **kwargs) -> ApiResponse:
|
|
68
|
+
r"""
|
|
69
|
+
Lists campaigns. Read only, `POST` because the filters go in the body.
|
|
70
|
+
|
|
71
|
+
Keyword Args
|
|
72
|
+
|
|
73
|
+
- ``selector`` (str): ``profile_id`` or ``account_id``. [optional]
|
|
74
|
+
|
|
75
|
+
Returns
|
|
76
|
+
ApiResponse, ``200``, with the list and its pagination.
|
|
77
|
+
"""
|
|
78
|
+
headers = {'Accept': 'application/json',
|
|
79
|
+
'Content-Type': 'application/json'}
|
|
80
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
81
|
+
return self._request(kwargs.pop('path'),
|
|
82
|
+
data=body, params=kwargs, headers=headers)
|
|
83
|
+
|
|
84
|
+
@sp_endpoint('/dsp/v1/adGroups', method='POST',
|
|
85
|
+
headers=['Amazon-Advertising-API-Scope', 'Amazon-Ads-AccountId'])
|
|
86
|
+
def create_ad_groups(self, **kwargs) -> ApiResponse:
|
|
87
|
+
r"""
|
|
88
|
+
Creates ad groups.
|
|
89
|
+
|
|
90
|
+
Keyword Args
|
|
91
|
+
|
|
92
|
+
- ``selector`` (str): ``profile_id`` or ``account_id``. [optional]
|
|
93
|
+
|
|
94
|
+
Returns
|
|
95
|
+
ApiResponse, **207** multi-status, one per ad group.
|
|
96
|
+
"""
|
|
97
|
+
headers = {'Accept': 'application/json',
|
|
98
|
+
'Content-Type': 'application/json'}
|
|
99
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
100
|
+
return self._request(kwargs.pop('path'),
|
|
101
|
+
data=body, params=kwargs, headers=headers)
|
|
102
|
+
|
|
103
|
+
@sp_endpoint('/dsp/v1/adGroups', method='PATCH',
|
|
104
|
+
headers=['Amazon-Advertising-API-Scope', 'Amazon-Ads-AccountId'])
|
|
105
|
+
def update_ad_groups(self, **kwargs) -> ApiResponse:
|
|
106
|
+
r"""
|
|
107
|
+
Updates ad groups in bulk.
|
|
108
|
+
|
|
109
|
+
Keyword Args
|
|
110
|
+
|
|
111
|
+
- ``selector`` (str): ``profile_id`` or ``account_id``. [optional]
|
|
112
|
+
|
|
113
|
+
Returns
|
|
114
|
+
ApiResponse, **207** multi-status.
|
|
115
|
+
"""
|
|
116
|
+
headers = {'Accept': 'application/json',
|
|
117
|
+
'Content-Type': 'application/json'}
|
|
118
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
119
|
+
return self._request(kwargs.pop('path'),
|
|
120
|
+
data=body, params=kwargs, headers=headers)
|
|
121
|
+
|
|
122
|
+
@sp_endpoint('/dsp/v1/adGroups/list', method='POST',
|
|
123
|
+
headers=['Amazon-Advertising-API-Scope', 'Amazon-Ads-AccountId'])
|
|
124
|
+
def list_ad_groups(self, **kwargs) -> ApiResponse:
|
|
125
|
+
r"""
|
|
126
|
+
Lists ad groups. Read only.
|
|
127
|
+
|
|
128
|
+
Keyword Args
|
|
129
|
+
|
|
130
|
+
- ``selector`` (str): ``profile_id`` or ``account_id``. [optional]
|
|
131
|
+
|
|
132
|
+
Returns
|
|
133
|
+
ApiResponse, ``200``, with the list and its pagination.
|
|
134
|
+
"""
|
|
135
|
+
headers = {'Accept': 'application/json',
|
|
136
|
+
'Content-Type': 'application/json'}
|
|
137
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
138
|
+
return self._request(kwargs.pop('path'),
|
|
139
|
+
data=body, params=kwargs, headers=headers)
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"""Audience Create /dsp/audiences.
|
|
2
|
+
|
|
3
|
+
Contract: ADSP Audiences 3.0, the *Audience Create* child of *Audiences*. One
|
|
4
|
+
route, a POST that writes.
|
|
5
|
+
|
|
6
|
+
The request and the answer **do not share a name**:
|
|
7
|
+
``vnd.dspaudiences`` goes in, ``vnd.dspaudiencesresponse`` comes back. Both take
|
|
8
|
+
the version, so it is built twice from the same argument.
|
|
9
|
+
|
|
10
|
+
``advertiserId`` is a **required query parameter**, not a header. ``ClientId`` is
|
|
11
|
+
required; ``Scope`` and ``AccountId`` are optional.
|
|
12
|
+
|
|
13
|
+
Success is **207**, one result per audience.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from ad_api.base import Client, sp_endpoint, fill_query_params, ApiResponse, Utils
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class DspAudienceCreate(Client):
|
|
20
|
+
r"""Audience Create - /dsp/audiences
|
|
21
|
+
|
|
22
|
+
Documentation: https://advertising.amazon.com/API/docs/en-us/dsp-audience-create
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
@sp_endpoint('/dsp/audiences', method='POST',
|
|
26
|
+
headers=['Amazon-Advertising-API-Scope', 'Amazon-Ads-AccountId'])
|
|
27
|
+
def create_audiences(self, advertiserId, version: str = "1", **kwargs) -> ApiResponse:
|
|
28
|
+
r"""
|
|
29
|
+
Creates DSP audiences for an advertiser.
|
|
30
|
+
|
|
31
|
+
Query Params
|
|
32
|
+
|
|
33
|
+
- ``advertiserId``: the advertiser the audiences belong to. [required]
|
|
34
|
+
|
|
35
|
+
Keyword Args
|
|
36
|
+
|
|
37
|
+
- ``version`` (str): the version in the media type, ``1``. [optional]
|
|
38
|
+
- ``selector`` (str): ``profile_id`` or ``account_id``. [optional]
|
|
39
|
+
|
|
40
|
+
Returns
|
|
41
|
+
ApiResponse, **207** multi-status, one per audience.
|
|
42
|
+
|
|
43
|
+
Note
|
|
44
|
+
The request speaks ``vnd.dspaudiences`` and the answer speaks
|
|
45
|
+
``vnd.dspaudiencesresponse``: two names, not one.
|
|
46
|
+
"""
|
|
47
|
+
media_type = 'application/vnd.dspaudiences.v' + version + '+json'
|
|
48
|
+
accept = 'application/vnd.dspaudiencesresponse.v' + version + '+json'
|
|
49
|
+
headers = {'Accept': accept, 'Content-Type': media_type}
|
|
50
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
51
|
+
kwargs['advertiserId'] = advertiserId
|
|
52
|
+
return self._request(kwargs.pop('path'),
|
|
53
|
+
data=body, params=kwargs, headers=headers)
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
"""Bid adjustments /dsp/rules/adjustments.
|
|
2
|
+
|
|
3
|
+
Contract: Bid Adjustments 3.0. Eight operations over five paths: the rule, its
|
|
4
|
+
versions, and its ad group associations.
|
|
5
|
+
|
|
6
|
+
Everything but the two body-less association writes speaks
|
|
7
|
+
``vnd.dspbidadjuster.v<n>``, and the version goes in whole.
|
|
8
|
+
|
|
9
|
+
Three success codes: 200 on the create, the read and the list; 202 on the patch
|
|
10
|
+
and the two association writes, which are accepted rather than applied; and 200
|
|
11
|
+
with no body on the DELETE of the rule.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
from ad_api.base import Client, sp_endpoint, fill_query_params, ApiResponse, Utils
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class DspBidAdjustments(Client):
|
|
18
|
+
r"""Bid adjustments - /dsp/rules/adjustments
|
|
19
|
+
|
|
20
|
+
Documentation: https://advertising.amazon.com/API/docs/en-us/dsp-bid-adjustments
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
@sp_endpoint('/dsp/rules/adjustments', method='POST',
|
|
24
|
+
headers=['Amazon-Advertising-API-Scope', 'Amazon-Ads-AccountId'])
|
|
25
|
+
def create_adjustment(self, version: str = "1", **kwargs) -> ApiResponse:
|
|
26
|
+
r"""
|
|
27
|
+
Creates a bid adjustment rule.
|
|
28
|
+
|
|
29
|
+
Keyword Args
|
|
30
|
+
|
|
31
|
+
- ``selector`` (str): ``profile_id`` or ``account_id``. [optional]
|
|
32
|
+
|
|
33
|
+
Returns
|
|
34
|
+
ApiResponse, ``200``, with the created rule.
|
|
35
|
+
"""
|
|
36
|
+
media_type = 'application/vnd.dspbidadjuster.v' + version + '+json'
|
|
37
|
+
headers = {'Accept': media_type}
|
|
38
|
+
headers['Content-Type'] = media_type
|
|
39
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
40
|
+
return self._request(kwargs.pop('path'),
|
|
41
|
+
data=body, params=kwargs, headers=headers)
|
|
42
|
+
|
|
43
|
+
@sp_endpoint('/dsp/rules/adjustments/list', method='POST',
|
|
44
|
+
headers=['Amazon-Advertising-API-Scope', 'Amazon-Ads-AccountId'])
|
|
45
|
+
def list_adjustments(self, version: str = "1", **kwargs) -> ApiResponse:
|
|
46
|
+
r"""
|
|
47
|
+
Lists bid adjustment rules. Read only.
|
|
48
|
+
|
|
49
|
+
Query Params
|
|
50
|
+
|
|
51
|
+
- ``active``, ``adjustmentType``, ``includeRuleExpression``. [optional]
|
|
52
|
+
|
|
53
|
+
Keyword Args
|
|
54
|
+
|
|
55
|
+
- ``selector`` (str): ``profile_id`` or ``account_id``. [optional]
|
|
56
|
+
|
|
57
|
+
Returns
|
|
58
|
+
ApiResponse, ``200``, with the rules.
|
|
59
|
+
"""
|
|
60
|
+
media_type = 'application/vnd.dspbidadjuster.v' + version + '+json'
|
|
61
|
+
headers = {'Accept': media_type}
|
|
62
|
+
headers['Content-Type'] = media_type
|
|
63
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
64
|
+
return self._request(kwargs.pop('path'),
|
|
65
|
+
data=body, params=kwargs, headers=headers)
|
|
66
|
+
|
|
67
|
+
@sp_endpoint('/dsp/rules/adjustments/{}', method='GET',
|
|
68
|
+
headers=['Amazon-Advertising-API-Scope', 'Amazon-Ads-AccountId'])
|
|
69
|
+
def get_adjustment(self, adjustmentRuleId, version: str = "1", **kwargs) -> ApiResponse:
|
|
70
|
+
r"""
|
|
71
|
+
Reads one rule.
|
|
72
|
+
|
|
73
|
+
Path Parameters
|
|
74
|
+
|
|
75
|
+
- ``adjustmentRuleId`` (str): the rule. [required]
|
|
76
|
+
|
|
77
|
+
Query Params
|
|
78
|
+
|
|
79
|
+
- ``versionId``: read a specific version of the rule. [optional]
|
|
80
|
+
|
|
81
|
+
Keyword Args
|
|
82
|
+
|
|
83
|
+
- ``selector`` (str): ``profile_id`` or ``account_id``. [optional]
|
|
84
|
+
|
|
85
|
+
Returns
|
|
86
|
+
ApiResponse, ``200``, with the rule.
|
|
87
|
+
"""
|
|
88
|
+
media_type = 'application/vnd.dspbidadjuster.v' + version + '+json'
|
|
89
|
+
headers = {'Accept': media_type}
|
|
90
|
+
return self._request(fill_query_params(kwargs.pop('path'), adjustmentRuleId),
|
|
91
|
+
params=kwargs, headers=headers)
|
|
92
|
+
|
|
93
|
+
@sp_endpoint('/dsp/rules/adjustments/{}', method='PATCH',
|
|
94
|
+
headers=['Amazon-Advertising-API-Scope', 'Amazon-Ads-AccountId'])
|
|
95
|
+
def update_adjustment(self, adjustmentRuleId, version: str = "1", **kwargs) -> ApiResponse:
|
|
96
|
+
r"""
|
|
97
|
+
Updates a rule. A PATCH answers 202: the change is accepted and applied
|
|
98
|
+
asynchronously. The answer is ``application/json``, not the adjuster type.
|
|
99
|
+
|
|
100
|
+
Keyword Args
|
|
101
|
+
|
|
102
|
+
- ``selector`` (str): ``profile_id`` or ``account_id``. [optional]
|
|
103
|
+
|
|
104
|
+
Returns
|
|
105
|
+
ApiResponse, **202 accepted**, in ``application/json``, not the adjuster type.
|
|
106
|
+
"""
|
|
107
|
+
media_type = 'application/vnd.dspbidadjuster.v' + version + '+json'
|
|
108
|
+
headers = {'Accept': media_type}
|
|
109
|
+
headers['Content-Type'] = media_type
|
|
110
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
111
|
+
return self._request(fill_query_params(kwargs.pop('path'), adjustmentRuleId),
|
|
112
|
+
data=body, params=kwargs, headers=headers)
|
|
113
|
+
|
|
114
|
+
@sp_endpoint('/dsp/rules/adjustments/{}', method='DELETE',
|
|
115
|
+
headers=['Amazon-Advertising-API-Scope', 'Amazon-Ads-AccountId'])
|
|
116
|
+
def delete_adjustment(self, adjustmentRuleId, version: str = "1", **kwargs) -> ApiResponse:
|
|
117
|
+
r"""
|
|
118
|
+
Deletes a rule. Answers 200 with no body at all.
|
|
119
|
+
|
|
120
|
+
Keyword Args
|
|
121
|
+
|
|
122
|
+
- ``selector`` (str): ``profile_id`` or ``account_id``. [optional]
|
|
123
|
+
|
|
124
|
+
Returns
|
|
125
|
+
ApiResponse, ``200``, with **no body**.
|
|
126
|
+
"""
|
|
127
|
+
headers = {'Accept': 'application/json'}
|
|
128
|
+
return self._request(fill_query_params(kwargs.pop('path'), adjustmentRuleId),
|
|
129
|
+
params=kwargs, headers=headers)
|
|
130
|
+
|
|
131
|
+
@sp_endpoint('/dsp/rules/adjustments/{}/associations', method='PUT',
|
|
132
|
+
headers=['Amazon-Advertising-API-Scope', 'Amazon-Ads-AccountId'])
|
|
133
|
+
def associate_ad_group(self, adjustmentRuleId, version: str = "1", **kwargs) -> ApiResponse:
|
|
134
|
+
r"""
|
|
135
|
+
Associates the rule with an ad group.
|
|
136
|
+
|
|
137
|
+
Query Params
|
|
138
|
+
|
|
139
|
+
- ``adGroupId``. [optional]
|
|
140
|
+
|
|
141
|
+
Answers 202: the association is queued.
|
|
142
|
+
|
|
143
|
+
Keyword Args
|
|
144
|
+
|
|
145
|
+
- ``selector`` (str): ``profile_id`` or ``account_id``. [optional]
|
|
146
|
+
|
|
147
|
+
Returns
|
|
148
|
+
ApiResponse, **202 accepted**, with **no body**.
|
|
149
|
+
"""
|
|
150
|
+
headers = {'Accept': 'application/json'}
|
|
151
|
+
return self._request(fill_query_params(kwargs.pop('path'), adjustmentRuleId),
|
|
152
|
+
params=kwargs, headers=headers)
|
|
153
|
+
|
|
154
|
+
@sp_endpoint('/dsp/rules/adjustments/{}/associations', method='DELETE',
|
|
155
|
+
headers=['Amazon-Advertising-API-Scope', 'Amazon-Ads-AccountId'])
|
|
156
|
+
def disassociate_ad_group(self, adjustmentRuleId, version: str = "1", **kwargs) -> ApiResponse:
|
|
157
|
+
r"""
|
|
158
|
+
Removes the rule from an ad group.
|
|
159
|
+
|
|
160
|
+
Query Params
|
|
161
|
+
|
|
162
|
+
- ``adGroupId``. [optional]
|
|
163
|
+
|
|
164
|
+
Keyword Args
|
|
165
|
+
|
|
166
|
+
- ``selector`` (str): ``profile_id`` or ``account_id``. [optional]
|
|
167
|
+
|
|
168
|
+
Returns
|
|
169
|
+
ApiResponse, **202 accepted**, with **no body**.
|
|
170
|
+
"""
|
|
171
|
+
headers = {'Accept': 'application/json'}
|
|
172
|
+
return self._request(fill_query_params(kwargs.pop('path'), adjustmentRuleId),
|
|
173
|
+
params=kwargs, headers=headers)
|
|
174
|
+
|
|
175
|
+
@sp_endpoint('/dsp/rules/adjustments/{}/associations/list', method='POST',
|
|
176
|
+
headers=['Amazon-Advertising-API-Scope', 'Amazon-Ads-AccountId'])
|
|
177
|
+
def list_associations(self, adjustmentRuleId, version: str = "1", **kwargs) -> ApiResponse:
|
|
178
|
+
r"""
|
|
179
|
+
Lists the ad groups a rule is associated with. Read only.
|
|
180
|
+
|
|
181
|
+
Keyword Args
|
|
182
|
+
|
|
183
|
+
- ``selector`` (str): ``profile_id`` or ``account_id``. [optional]
|
|
184
|
+
|
|
185
|
+
Returns
|
|
186
|
+
ApiResponse, ``200``, with the associations.
|
|
187
|
+
"""
|
|
188
|
+
media_type = 'application/vnd.dspbidadjuster.v' + version + '+json'
|
|
189
|
+
headers = {'Accept': media_type}
|
|
190
|
+
headers['Content-Type'] = media_type
|
|
191
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
192
|
+
return self._request(fill_query_params(kwargs.pop('path'), adjustmentRuleId),
|
|
193
|
+
data=body, params=kwargs, headers=headers)
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"""Campaign flights /dsp/v1/campaigns/{campaignId}/flights.
|
|
2
|
+
|
|
3
|
+
Contract: Campaign Flights - V1 3.0. The flights of a campaign: the windows in
|
|
4
|
+
which it delivers, always scoped to one campaign through the path.
|
|
5
|
+
|
|
6
|
+
Plain ``application/json``. Two things to watch:
|
|
7
|
+
|
|
8
|
+
- **204 is the usual answer**, with no body, on the create, the delete and the
|
|
9
|
+
patch. The create can also answer 200; the contract declares both.
|
|
10
|
+
- The list is a POST that answers 200.
|
|
11
|
+
|
|
12
|
+
``Amazon-Advertising-API-ClientId`` and ``Amazon-Ads-AccountId`` are required,
|
|
13
|
+
``Scope`` is optional.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from ad_api.base import Client, sp_endpoint, fill_query_params, ApiResponse, Utils
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class DspCampaignFlights(Client):
|
|
20
|
+
r"""Campaign flights - /dsp/v1/campaigns/{campaignId}/flights
|
|
21
|
+
|
|
22
|
+
Documentation: https://advertising.amazon.com/API/docs/en-us/dsp-ad-group-campaign-flights
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
@sp_endpoint('/dsp/v1/campaigns/{}/flights', method='POST',
|
|
26
|
+
headers=['Amazon-Advertising-API-Scope', 'Amazon-Ads-AccountId'])
|
|
27
|
+
def create_flights(self, campaignId, **kwargs) -> ApiResponse:
|
|
28
|
+
r"""
|
|
29
|
+
Creates flights on a campaign.
|
|
30
|
+
|
|
31
|
+
Path Parameters
|
|
32
|
+
|
|
33
|
+
- ``campaignId`` (str): the campaign. [required]
|
|
34
|
+
|
|
35
|
+
Keyword Args
|
|
36
|
+
|
|
37
|
+
- ``selector`` (str): ``profile_id`` or ``account_id``. [optional]
|
|
38
|
+
|
|
39
|
+
Returns
|
|
40
|
+
ApiResponse, **204** with no body, or ``200``. The contract declares both.
|
|
41
|
+
"""
|
|
42
|
+
headers = {'Accept': 'application/json'}
|
|
43
|
+
headers['Content-Type'] = 'application/json'
|
|
44
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
45
|
+
return self._request(fill_query_params(kwargs.pop('path'), campaignId),
|
|
46
|
+
data=body, params=kwargs, headers=headers)
|
|
47
|
+
|
|
48
|
+
@sp_endpoint('/dsp/v1/campaigns/{}/flights', method='PATCH',
|
|
49
|
+
headers=['Amazon-Advertising-API-Scope', 'Amazon-Ads-AccountId'])
|
|
50
|
+
def update_flights(self, campaignId, **kwargs) -> ApiResponse:
|
|
51
|
+
r"""
|
|
52
|
+
Updates the flights of a campaign. Same path as the create.
|
|
53
|
+
|
|
54
|
+
Path Parameters
|
|
55
|
+
|
|
56
|
+
- ``campaignId`` (str): the campaign. [required]
|
|
57
|
+
|
|
58
|
+
Keyword Args
|
|
59
|
+
|
|
60
|
+
- ``selector`` (str): ``profile_id`` or ``account_id``. [optional]
|
|
61
|
+
|
|
62
|
+
Returns
|
|
63
|
+
ApiResponse, **204**, with **no body**. Do not read the payload.
|
|
64
|
+
"""
|
|
65
|
+
headers = {'Accept': 'application/json'}
|
|
66
|
+
headers['Content-Type'] = 'application/json'
|
|
67
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
68
|
+
return self._request(fill_query_params(kwargs.pop('path'), campaignId),
|
|
69
|
+
data=body, params=kwargs, headers=headers)
|
|
70
|
+
|
|
71
|
+
@sp_endpoint('/dsp/v1/campaigns/{}/flights/delete', method='POST',
|
|
72
|
+
headers=['Amazon-Advertising-API-Scope', 'Amazon-Ads-AccountId'])
|
|
73
|
+
def delete_flights(self, campaignId, **kwargs) -> ApiResponse:
|
|
74
|
+
r"""
|
|
75
|
+
Deletes flights from a campaign.
|
|
76
|
+
|
|
77
|
+
Path Parameters
|
|
78
|
+
|
|
79
|
+
- ``campaignId`` (str): the campaign. [required]
|
|
80
|
+
|
|
81
|
+
Keyword Args
|
|
82
|
+
|
|
83
|
+
- ``selector`` (str): ``profile_id`` or ``account_id``. [optional]
|
|
84
|
+
|
|
85
|
+
Returns
|
|
86
|
+
ApiResponse, **204**, with **no body**.
|
|
87
|
+
"""
|
|
88
|
+
headers = {'Accept': 'application/json'}
|
|
89
|
+
headers['Content-Type'] = 'application/json'
|
|
90
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
91
|
+
return self._request(fill_query_params(kwargs.pop('path'), campaignId),
|
|
92
|
+
data=body, params=kwargs, headers=headers)
|
|
93
|
+
|
|
94
|
+
@sp_endpoint('/dsp/v1/campaigns/{}/flights/list', method='POST',
|
|
95
|
+
headers=['Amazon-Advertising-API-Scope', 'Amazon-Ads-AccountId'])
|
|
96
|
+
def list_flights(self, campaignId, **kwargs) -> ApiResponse:
|
|
97
|
+
r"""
|
|
98
|
+
Lists the flights of a campaign. Read only.
|
|
99
|
+
|
|
100
|
+
Path Parameters
|
|
101
|
+
|
|
102
|
+
- ``campaignId`` (str): the campaign. [required]
|
|
103
|
+
|
|
104
|
+
Query Params
|
|
105
|
+
|
|
106
|
+
- ``maxResults``, ``nextToken``. [optional]
|
|
107
|
+
|
|
108
|
+
Keyword Args
|
|
109
|
+
|
|
110
|
+
- ``selector`` (str): ``profile_id`` or ``account_id``. [optional]
|
|
111
|
+
|
|
112
|
+
Returns
|
|
113
|
+
ApiResponse, ``200``, with the flights.
|
|
114
|
+
"""
|
|
115
|
+
headers = {'Accept': 'application/json'}
|
|
116
|
+
headers['Content-Type'] = 'application/json'
|
|
117
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
118
|
+
return self._request(fill_query_params(kwargs.pop('path'), campaignId),
|
|
119
|
+
data=body, params=kwargs, headers=headers)
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"""Performance+ campaign insights /dsp/v1/campaign/insights.
|
|
2
|
+
|
|
3
|
+
Contract: D16GDspApiCampaignInsightsV1 3.0, the *Performance+ insights (beta)*
|
|
4
|
+
entry at the first level of *Amazon DSP*. One route, ``POST``, and it does not
|
|
5
|
+
create anything: it reads the campaign and ad group performance insights for the
|
|
6
|
+
ids given. Amazon uses ``POST`` because the request body carries a list.
|
|
7
|
+
|
|
8
|
+
Media type ``application/vnd.dspDspCampaignInsights.v1+json`` for the body and
|
|
9
|
+
for the answer, and the success status is **207**, not 200.
|
|
10
|
+
|
|
11
|
+
Headers: the contract marks ``Amazon-Advertising-API-ClientId``,
|
|
12
|
+
``Amazon-Advertising-API-Scope`` and ``Amazon-Advertising-AccountId`` as
|
|
13
|
+
required, and its operation page names ``Amazon-Advertising-AccountId`` as the
|
|
14
|
+
identity parameter. The client knows that header as ``Amazon-Ads-AccountId``, so
|
|
15
|
+
that is the one declared; a caller picks between it and the scope with
|
|
16
|
+
``selector``.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
from ad_api.base import Client, sp_endpoint, fill_query_params, ApiResponse, Utils
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class DspCampaignInsights(Client):
|
|
23
|
+
r"""Performance+ insights - /dsp/v1/campaign/insights
|
|
24
|
+
|
|
25
|
+
Documentation: https://advertising.amazon.com/API/docs/en-us/dsp-campaign-insights
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
@sp_endpoint('/dsp/v1/campaign/insights', method='POST',
|
|
29
|
+
headers=['Amazon-Advertising-API-Scope',
|
|
30
|
+
'Amazon-Ads-AccountId'])
|
|
31
|
+
def get_campaign_insights(self, version: str = "1", **kwargs) -> ApiResponse:
|
|
32
|
+
r"""
|
|
33
|
+
Reads the campaign and ad group performance insights for the ids given.
|
|
34
|
+
Read only, despite the ``POST``.
|
|
35
|
+
|
|
36
|
+
Request Body [Required]
|
|
37
|
+
| **requests** (list): one to twenty-five entries. Each one takes
|
|
38
|
+
| ``campaignId`` (required), ``insightType`` (required) and,
|
|
39
|
+
| optionally, ``adGroupId``.
|
|
40
|
+
|
|
41
|
+
``insightType`` is ``PERFORMANCE_PLUS_SHOPPER_TRAIT``, ``PERSONA`` or
|
|
42
|
+
``TARGETING_PERFORMANCE``.
|
|
43
|
+
|
|
44
|
+
Keyword Args
|
|
45
|
+
|
|
46
|
+
- ``version`` (str): media type version. Defaults to ``1``. [optional]
|
|
47
|
+
- ``selector`` (str): ``'profile_id'`` or ``'account_id'``; decides
|
|
48
|
+
which identity header travels. [optional]
|
|
49
|
+
|
|
50
|
+
Returns
|
|
51
|
+
ApiResponse, **207** multi-status: each request can answer or fail on
|
|
52
|
+
its own. Requires ``campaign_view``.
|
|
53
|
+
"""
|
|
54
|
+
media_type = ('application/vnd.dspDspCampaignInsights.v'
|
|
55
|
+
+ version + '+json')
|
|
56
|
+
headers = {'Accept': media_type, 'Content-Type': media_type}
|
|
57
|
+
body = Utils.convert_body(kwargs.pop('body'), False)
|
|
58
|
+
return self._request(fill_query_params(kwargs.pop('path')),
|
|
59
|
+
data=body, params=kwargs, headers=headers)
|