python-amazon-ad-api 2.3.1__tar.gz → 2.4.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.
Files changed (209) hide show
  1. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/PKG-INFO +1 -1
  2. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/__init__.py +68 -0
  3. python_amazon_ad_api-2.4.1/ad_api/api/dsp_ad_creative_association.py +147 -0
  4. python_amazon_ad_api-2.4.1/ad_api/api/dsp_ad_group_and_campaign.py +139 -0
  5. python_amazon_ad_api-2.4.1/ad_api/api/dsp_audience_create.py +53 -0
  6. python_amazon_ad_api-2.4.1/ad_api/api/dsp_bid_adjustments.py +193 -0
  7. python_amazon_ad_api-2.4.1/ad_api/api/dsp_campaign_flights.py +119 -0
  8. python_amazon_ad_api-2.4.1/ad_api/api/dsp_campaign_insights.py +59 -0
  9. python_amazon_ad_api-2.4.1/ad_api/api/dsp_combined_audiences.py +83 -0
  10. python_amazon_ad_api-2.4.1/ad_api/api/dsp_conversion_tracking_products.py +92 -0
  11. python_amazon_ad_api-2.4.1/ad_api/api/dsp_conversions.py +442 -0
  12. python_amazon_ad_api-2.4.1/ad_api/api/dsp_creatives.py +114 -0
  13. python_amazon_ad_api-2.4.1/ad_api/api/dsp_deal_permissions.py +170 -0
  14. python_amazon_ad_api-2.4.1/ad_api/api/dsp_deal_proposals.py +440 -0
  15. python_amazon_ad_api-2.4.1/ad_api/api/dsp_deals.py +204 -0
  16. python_amazon_ad_api-2.4.1/ad_api/api/dsp_deals_management.py +66 -0
  17. python_amazon_ad_api-2.4.1/ad_api/api/dsp_discovery_advertised_product_categories.py +35 -0
  18. python_amazon_ad_api-2.4.1/ad_api/api/dsp_discovery_apps.py +36 -0
  19. python_amazon_ad_api-2.4.1/ad_api/api/dsp_discovery_domain_lists.py +36 -0
  20. python_amazon_ad_api-2.4.1/ad_api/api/dsp_discovery_geo_locations.py +42 -0
  21. python_amazon_ad_api-2.4.1/ad_api/api/dsp_discovery_iab_content.py +37 -0
  22. python_amazon_ad_api-2.4.1/ad_api/api/dsp_discovery_inventory_source_exchanges.py +36 -0
  23. python_amazon_ad_api-2.4.1/ad_api/api/dsp_discovery_products.py +102 -0
  24. python_amazon_ad_api-2.4.1/ad_api/api/dsp_discovery_third_party_target_segments.py +36 -0
  25. python_amazon_ad_api-2.4.1/ad_api/api/dsp_frequency_associations.py +138 -0
  26. python_amazon_ad_api-2.4.1/ad_api/api/dsp_frequency_groups.py +112 -0
  27. python_amazon_ad_api-2.4.1/ad_api/api/dsp_frequency_insights.py +85 -0
  28. python_amazon_ad_api-2.4.1/ad_api/api/dsp_guidance.py +111 -0
  29. python_amazon_ad_api-2.4.1/ad_api/api/dsp_inherited_settings.py +133 -0
  30. python_amazon_ad_api-2.4.1/ad_api/api/dsp_inventory_groups.py +209 -0
  31. python_amazon_ad_api-2.4.1/ad_api/api/dsp_measurement.py +693 -0
  32. python_amazon_ad_api-2.4.1/ad_api/api/dsp_quick_actions.py +177 -0
  33. python_amazon_ad_api-2.4.1/ad_api/api/dsp_seats.py +43 -0
  34. python_amazon_ad_api-2.4.1/ad_api/api/dsp_seats_management.py +84 -0
  35. python_amazon_ad_api-2.4.1/ad_api/api/dsp_target_kpi_recommendations.py +44 -0
  36. python_amazon_ad_api-2.4.1/ad_api/api/dsp_targeting.py +98 -0
  37. python_amazon_ad_api-2.4.1/ad_api/version.py +1 -0
  38. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/python_amazon_ad_api.egg-info/PKG-INFO +1 -1
  39. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/python_amazon_ad_api.egg-info/SOURCES.txt +34 -0
  40. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/setup.cfg +1 -1
  41. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/setup.py +1 -1
  42. python_amazon_ad_api-2.3.1/ad_api/version.py +0 -1
  43. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/LICENSE +0 -0
  44. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/README.md +0 -0
  45. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/__init__.py +0 -0
  46. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/account.py +0 -0
  47. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/account_budgets.py +0 -0
  48. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/ad_library.py +0 -0
  49. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/ads_data_manager.py +0 -0
  50. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/advertising_invitations.py +0 -0
  51. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/advertising_test_account.py +0 -0
  52. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/advertising_user_permissions.py +0 -0
  53. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/attribution.py +0 -0
  54. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/audiences.py +0 -0
  55. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/billing.py +0 -0
  56. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/brand_benchmarks.py +0 -0
  57. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/brand_home.py +0 -0
  58. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/brand_metrics.py +0 -0
  59. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/campaign_diagnostics.py +0 -0
  60. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/creative_assets.py +0 -0
  61. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/dsp_advertiser.py +0 -0
  62. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/eligibility.py +0 -0
  63. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/exports.py +0 -0
  64. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/forecast.py +0 -0
  65. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/hashed_records.py +0 -0
  66. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/historic_reach.py +0 -0
  67. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/history.py +0 -0
  68. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/insights.py +0 -0
  69. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/localization.py +0 -0
  70. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/locations.py +0 -0
  71. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/manager_accounts.py +0 -0
  72. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/marketing_mix_modeling.py +0 -0
  73. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/metadata.py +0 -0
  74. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/moderation.py +0 -0
  75. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/partner_opportunities.py +0 -0
  76. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/persona_builder.py +0 -0
  77. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/plan_management.py +0 -0
  78. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/portfolios.py +0 -0
  79. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/portfolios_v3.py +0 -0
  80. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/pre_moderation.py +0 -0
  81. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/profiles.py +0 -0
  82. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/ras_campaign_management.py +0 -0
  83. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/ras_retailer_identity.py +0 -0
  84. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/recommendations.py +0 -0
  85. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/record_management.py +0 -0
  86. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/reports.py +0 -0
  87. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sb/__init__.py +0 -0
  88. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sb/ad_creatives_v4.py +0 -0
  89. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sb/ad_groups.py +0 -0
  90. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sb/ad_groups_v4.py +0 -0
  91. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sb/ads_v4.py +0 -0
  92. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sb/benchmarks.py +0 -0
  93. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sb/bid_recommendations.py +0 -0
  94. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sb/brands.py +0 -0
  95. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sb/budget_rules.py +0 -0
  96. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sb/campaigns.py +0 -0
  97. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sb/campaigns_v4.py +0 -0
  98. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sb/forecast.py +0 -0
  99. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sb/keywords.py +0 -0
  100. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sb/keywords_recommendations.py +0 -0
  101. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sb/landing_page_asins.py +0 -0
  102. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sb/media.py +0 -0
  103. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sb/migration.py +0 -0
  104. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sb/negative_keywords.py +0 -0
  105. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sb/negative_product_targeting.py +0 -0
  106. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sb/optimization_rules.py +0 -0
  107. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sb/product_targeting.py +0 -0
  108. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sb/recommendations.py +0 -0
  109. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sb/reports.py +0 -0
  110. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sb/stores.py +0 -0
  111. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sb/targeting_categories.py +0 -0
  112. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sb/targeting_recommendations.py +0 -0
  113. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sb/themes.py +0 -0
  114. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sd/__init__.py +0 -0
  115. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sd/ad_groups.py +0 -0
  116. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sd/bid_recommendations.py +0 -0
  117. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sd/brand_safety.py +0 -0
  118. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sd/budget_rules.py +0 -0
  119. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sd/campaigns.py +0 -0
  120. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sd/campaigns_budget_usage.py +0 -0
  121. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sd/creatives.py +0 -0
  122. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sd/forecast.py +0 -0
  123. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sd/negative_product_targeting.py +0 -0
  124. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sd/product_ads.py +0 -0
  125. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sd/product_targeting.py +0 -0
  126. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sd/recommendations.py +0 -0
  127. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sd/reports.py +0 -0
  128. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sd/snapshots.py +0 -0
  129. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sd/targeting_recommendations.py +0 -0
  130. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sp/__init__.py +0 -0
  131. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sp/ad_groups_v3.py +0 -0
  132. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sp/bid_recommendations_v3.py +0 -0
  133. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sp/budget_initial_recommendation.py +0 -0
  134. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sp/budget_recommendations.py +0 -0
  135. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sp/budget_rules.py +0 -0
  136. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sp/budget_rules_recommendations.py +0 -0
  137. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sp/campaign_consolidated_recommendations.py +0 -0
  138. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sp/campaign_negative_keywords_v3.py +0 -0
  139. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sp/campaign_negative_targets.py +0 -0
  140. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sp/campaigns_budget_usage.py +0 -0
  141. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sp/campaigns_v3.py +0 -0
  142. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sp/campaings_optimization.py +0 -0
  143. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sp/global_recommendations.py +0 -0
  144. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sp/keyword_groups_recommendations.py +0 -0
  145. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sp/keywords_v3.py +0 -0
  146. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sp/negative_keywords_v3.py +0 -0
  147. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sp/negative_product_targeting_v3.py +0 -0
  148. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sp/product_ads_v3.py +0 -0
  149. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sp/product_recommendations.py +0 -0
  150. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sp/product_targeting_v3.py +0 -0
  151. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sp/ranked_keywords_recommendations.py +0 -0
  152. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sp/schedule_based_bid_optimization.py +0 -0
  153. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/sp/target_promotion_groups.py +0 -0
  154. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/st/__init__.py +0 -0
  155. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/st/ad_groups.py +0 -0
  156. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/st/ads.py +0 -0
  157. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/st/campaigns.py +0 -0
  158. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/st/creatives.py +0 -0
  159. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/st/creatives_moderations.py +0 -0
  160. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/st/creatives_preview.py +0 -0
  161. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/st/forecasts.py +0 -0
  162. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/st/locations.py +0 -0
  163. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/st/targets.py +0 -0
  164. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/stores.py +0 -0
  165. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/stream.py +0 -0
  166. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/targetable_entities.py +0 -0
  167. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/v1/__init__.py +0 -0
  168. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/v1/ad_associations.py +0 -0
  169. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/v1/ad_extensions.py +0 -0
  170. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/v1/ad_groups.py +0 -0
  171. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/v1/ads.py +0 -0
  172. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/v1/advertiser_accounts.py +0 -0
  173. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/v1/brand_store_edition_publish_versions.py +0 -0
  174. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/v1/brand_store_editions.py +0 -0
  175. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/v1/brand_store_pages.py +0 -0
  176. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/v1/brand_stores.py +0 -0
  177. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/v1/campaigns.py +0 -0
  178. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/v1/geo_locations.py +0 -0
  179. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/v1/label_object_associations.py +0 -0
  180. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/v1/labels.py +0 -0
  181. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/v1/location_indexes.py +0 -0
  182. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/v1/manager_accounts.py +0 -0
  183. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/v1/portfolios.py +0 -0
  184. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/v1/recommendation_types.py +0 -0
  185. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/v1/recommendations.py +0 -0
  186. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/v1/reports.py +0 -0
  187. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/v1/selling_accounts.py +0 -0
  188. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/v1/targets.py +0 -0
  189. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/api/validation_configurations.py +0 -0
  190. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/auth/__init__.py +0 -0
  191. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/auth/access_token_client.py +0 -0
  192. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/auth/access_token_response.py +0 -0
  193. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/auth/credentials.py +0 -0
  194. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/auth/exceptions.py +0 -0
  195. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/base/__init__.py +0 -0
  196. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/base/api_response.py +0 -0
  197. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/base/client.py +0 -0
  198. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/base/config.py +0 -0
  199. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/base/credential_provider.py +0 -0
  200. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/base/exceptions.py +0 -0
  201. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/base/helpers.py +0 -0
  202. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/base/marketplaces.py +0 -0
  203. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/base/utils.py +0 -0
  204. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/shared/__init__.py +0 -0
  205. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/ad_api/shared/base_client.py +0 -0
  206. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/pyproject.toml +0 -0
  207. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/python_amazon_ad_api.egg-info/dependency_links.txt +0 -0
  208. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/python_amazon_ad_api.egg-info/requires.txt +0 -0
  209. {python_amazon_ad_api-2.3.1 → python_amazon_ad_api-2.4.1}/python_amazon_ad_api.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-amazon-ad-api
3
- Version: 2.3.1
3
+ Version: 2.4.1
4
4
  Summary: Python wrapper for the Amazon Advertising API
5
5
  Home-page: https://github.com/denisneuf/python-amazon-ad-api
6
6
  Author: Daniel Alvaro
@@ -48,6 +48,40 @@ 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_seats_management import DspSeatsManagement
64
+ from .dsp_quick_actions import DspQuickActions
65
+ from .dsp_ad_creative_association import DspAdCreativeAssociation
66
+ from .dsp_audience_create import DspAudienceCreate
67
+ from .dsp_deals_management import DspDealsManagement
68
+ from .dsp_inventory_groups import DspInventoryGroups
69
+ from .dsp_deal_permissions import DspDealAdvertiserPermissions
70
+ from .dsp_deal_proposals import DspDealProposals
71
+ from .dsp_deals import DspDeals
72
+ from .dsp_creatives import DspCreatives
73
+ from .dsp_discovery_geo_locations import DspDiscoveryGeoLocations
74
+ from .dsp_discovery_inventory_source_exchanges import DspDiscoveryInventorySourceExchanges
75
+ from .dsp_discovery_iab_content import DspDiscoveryIabContentCategories
76
+ from .dsp_discovery_advertised_product_categories import DspDiscoveryAdvertisedProductCategories
77
+ from .dsp_discovery_domain_lists import DspDiscoveryDomainLists
78
+ from .dsp_discovery_apps import DspDiscoveryApps
79
+ from .dsp_discovery_products import DspDiscoveryProducts
80
+ from .dsp_bid_adjustments import DspBidAdjustments
81
+ from .dsp_target_kpi_recommendations import DspTargetKpiRecommendations
82
+ from .dsp_campaign_flights import DspCampaignFlights
83
+ from .dsp_targeting import DspTargeting
84
+ from .dsp_conversion_tracking_products import DspConversionTrackingProducts
51
85
 
52
86
  __all__ = [
53
87
  "v1",
@@ -102,5 +136,39 @@ __all__ = [
102
136
  "HistoricReach",
103
137
  "RecordManagement",
104
138
  "HashedRecords",
139
+ "DspCampaignInsights",
140
+ "DspCombinedAudiences",
141
+ "DspFrequencyInsights",
142
+ "DspFrequencyGroups",
143
+ "DspGuidance",
144
+ "DspFrequencyAssociations",
145
+ "DspConversions",
146
+ "DspMeasurement",
147
+ "DspAdGroupAndCampaign",
148
+ "DspInheritedSettings",
149
+ "DspDiscoveryThirdPartyTargetSegments",
150
+ "DspSeats",
151
+ "DspSeatsManagement",
152
+ "DspQuickActions",
153
+ "DspAdCreativeAssociation",
154
+ "DspAudienceCreate",
155
+ "DspDealsManagement",
156
+ "DspInventoryGroups",
157
+ "DspDealAdvertiserPermissions",
158
+ "DspDealProposals",
159
+ "DspDeals",
160
+ "DspCreatives",
161
+ "DspDiscoveryGeoLocations",
162
+ "DspDiscoveryInventorySourceExchanges",
163
+ "DspDiscoveryIabContentCategories",
164
+ "DspDiscoveryAdvertisedProductCategories",
165
+ "DspDiscoveryDomainLists",
166
+ "DspDiscoveryApps",
167
+ "DspDiscoveryProducts",
168
+ "DspBidAdjustments",
169
+ "DspTargetKpiRecommendations",
170
+ "DspCampaignFlights",
171
+ "DspTargeting",
172
+ "DspConversionTrackingProducts",
105
173
  "Account"
106
174
  ]
@@ -0,0 +1,147 @@
1
+ """DSP ad creative association /dsp/v1/adCreatives/associations/adGroups.
2
+
3
+ Contract: DSP Ad Creative Association API V1 3.0, the second child of
4
+ *Creative management*. Six operations over five paths: the PATCH and the POST
5
+ share one, which is why the vendor tree counts five.
6
+
7
+ **The media types have no version at all.** They are fixed names, and one of them
8
+ carries a typo from the contract itself: ``dspadcreativeassocation...``, with a
9
+ single ``c`` in *association*. It is spelled that way in every route, so it is
10
+ copied verbatim. Do not correct it: the service answers what it answers.
11
+
12
+ The two ``list`` routes use a ``...listeligiblecreatives`` type and a
13
+ ``dspcreativeAssociationModeration.v1`` type, the only one here with a version.
14
+
15
+ ``Amazon-Advertising-API-ClientId`` and ``Amazon-Ads-AccountId`` are required,
16
+ ``Scope`` is optional.
17
+
18
+ 207 on the create, the update and the delete; 200 on the three reads.
19
+ """
20
+
21
+ from ad_api.base import Client, sp_endpoint, fill_query_params, ApiResponse, Utils
22
+
23
+
24
+ class DspAdCreativeAssociation(Client):
25
+ r"""DSP ad creative association - /dsp/v1/adCreatives/associations/adGroups
26
+
27
+ Documentation: https://advertising.amazon.com/API/docs/en-us/dsp-ad-creative-association
28
+ """
29
+
30
+ @sp_endpoint('/dsp/v1/adCreatives/associations/adGroups', method='POST',
31
+ headers=['Amazon-Advertising-API-Scope', 'Amazon-Ads-AccountId'])
32
+ def create_associations(self, **kwargs) -> ApiResponse:
33
+ r"""
34
+ Associates creatives with an ad group.
35
+
36
+ Keyword Args
37
+
38
+ - ``selector`` (str): ``profile_id`` or ``account_id``. [optional]
39
+
40
+ Returns
41
+ ApiResponse, **207** multi-status, one per association.
42
+ """
43
+ media_type = 'application/vnd.dspadcreativeassocationadgroupresource+json'
44
+ headers = {"Accept": media_type, "Content-Type": media_type}
45
+ body = Utils.convert_body(kwargs.pop('body'), False)
46
+ return self._request(kwargs.pop('path'),
47
+ data=body, params=kwargs, headers=headers)
48
+
49
+ @sp_endpoint('/dsp/v1/adCreatives/associations/adGroups', method='PATCH',
50
+ headers=['Amazon-Advertising-API-Scope', 'Amazon-Ads-AccountId'])
51
+ def update_associations(self, **kwargs) -> ApiResponse:
52
+ r"""
53
+ Updates the associations of an ad group. Same path as the create.
54
+
55
+ Keyword Args
56
+
57
+ - ``selector`` (str): ``profile_id`` or ``account_id``. [optional]
58
+
59
+ Returns
60
+ ApiResponse, **207** multi-status.
61
+ """
62
+ media_type = 'application/vnd.dspadcreativeassocationadgroupresource+json'
63
+ headers = {"Accept": media_type, "Content-Type": media_type}
64
+ body = Utils.convert_body(kwargs.pop('body'), False)
65
+ return self._request(kwargs.pop('path'),
66
+ data=body, params=kwargs, headers=headers)
67
+
68
+ @sp_endpoint('/dsp/v1/adCreatives/associations/adGroups/delete', method='POST',
69
+ headers=['Amazon-Advertising-API-Scope', 'Amazon-Ads-AccountId'])
70
+ def delete_associations(self, **kwargs) -> ApiResponse:
71
+ r"""
72
+ Removes associations. A POST with ``/delete``: the list goes in the body.
73
+
74
+ Keyword Args
75
+
76
+ - ``selector`` (str): ``profile_id`` or ``account_id``. [optional]
77
+
78
+ Returns
79
+ ApiResponse, **207** multi-status.
80
+ """
81
+ media_type = 'application/vnd.dspadcreativeassocationadgroupresource+json'
82
+ headers = {"Accept": media_type, "Content-Type": media_type}
83
+ body = Utils.convert_body(kwargs.pop('body'), False)
84
+ return self._request(kwargs.pop('path'),
85
+ data=body, params=kwargs, headers=headers)
86
+
87
+ @sp_endpoint('/dsp/v1/adCreatives/associations/adGroups/list', method='POST',
88
+ headers=['Amazon-Advertising-API-Scope', 'Amazon-Ads-AccountId'])
89
+ def list_associations(self, **kwargs) -> ApiResponse:
90
+ r"""
91
+ Lists the creatives associated with an ad group. Read only.
92
+
93
+ Keyword Args
94
+
95
+ - ``selector`` (str): ``profile_id`` or ``account_id``. [optional]
96
+
97
+ Returns
98
+ ApiResponse, ``200``, with the associations.
99
+ """
100
+ media_type = 'application/vnd.dspadcreativeassocationadgroupresource+json'
101
+ headers = {"Accept": media_type, "Content-Type": media_type}
102
+ body = Utils.convert_body(kwargs.pop('body'), False)
103
+ return self._request(kwargs.pop('path'),
104
+ data=body, params=kwargs, headers=headers)
105
+
106
+ @sp_endpoint('/dsp/v1/adCreatives/associations/adGroups/eligibleCreatives/list', method='POST',
107
+ headers=['Amazon-Advertising-API-Scope', 'Amazon-Ads-AccountId'])
108
+ def list_eligible_creatives(self, **kwargs) -> ApiResponse:
109
+ r"""
110
+ Lists the creatives that can still be associated with an ad group. Read
111
+ only. Its media type is the only one of the family with a different name.
112
+
113
+ Keyword Args
114
+
115
+ - ``selector`` (str): ``profile_id`` or ``account_id``. [optional]
116
+
117
+ Returns
118
+ ApiResponse, ``200``, with the eligible creatives.
119
+ """
120
+ media_type = 'application/vnd.dspadcreativeassocationadgrouplisteligiblecreativesresource+json'
121
+ headers = {"Accept": media_type, "Content-Type": media_type}
122
+ body = Utils.convert_body(kwargs.pop('body'), False)
123
+ return self._request(kwargs.pop('path'),
124
+ data=body, params=kwargs, headers=headers)
125
+
126
+ @sp_endpoint('/dsp/v1/adCreatives/associations/adGroups/moderations/list', method='POST',
127
+ headers=['Amazon-Advertising-API-Scope', 'Amazon-Ads-AccountId'])
128
+ def list_moderations(self, **kwargs) -> ApiResponse:
129
+ r"""
130
+ Lists the moderation status of the creatives on an ad group. Read only.
131
+
132
+ Keyword Args
133
+
134
+ - ``selector`` (str): ``profile_id`` or ``account_id``. [optional]
135
+
136
+ Returns
137
+ ApiResponse, ``200``, with the moderation status.
138
+
139
+ Note
140
+ This is the only route of the family whose media type carries a
141
+ version: ``vnd.dspcreativeAssociationModeration.v1``.
142
+ """
143
+ media_type = 'application/vnd.dspcreativeAssociationModeration.v1+json'
144
+ headers = {"Accept": media_type, "Content-Type": media_type}
145
+ body = Utils.convert_body(kwargs.pop('body'), False)
146
+ return self._request(kwargs.pop('path'),
147
+ data=body, params=kwargs, headers=headers)
@@ -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)