python-amazon-ad-api 2.2.8__tar.gz → 2.3.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.
Files changed (168) hide show
  1. {python_amazon_ad_api-2.2.8/python_amazon_ad_api.egg-info → python_amazon_ad_api-2.3.0}/PKG-INFO +1 -1
  2. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/__init__.py +12 -0
  3. python_amazon_ad_api-2.3.0/ad_api/api/ad_library.py +76 -0
  4. python_amazon_ad_api-2.3.0/ad_api/api/campaign_diagnostics.py +54 -0
  5. python_amazon_ad_api-2.3.0/ad_api/api/moderation.py +65 -0
  6. python_amazon_ad_api-2.3.0/ad_api/api/partner_opportunities.py +169 -0
  7. python_amazon_ad_api-2.3.0/ad_api/api/persona_builder.py +174 -0
  8. python_amazon_ad_api-2.3.0/ad_api/api/pre_moderation.py +64 -0
  9. python_amazon_ad_api-2.3.0/ad_api/version.py +1 -0
  10. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0/python_amazon_ad_api.egg-info}/PKG-INFO +1 -1
  11. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/python_amazon_ad_api.egg-info/SOURCES.txt +6 -0
  12. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/setup.cfg +1 -1
  13. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/setup.py +1 -1
  14. python_amazon_ad_api-2.2.8/ad_api/version.py +0 -1
  15. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/LICENSE +0 -0
  16. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/README.md +0 -0
  17. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/__init__.py +0 -0
  18. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/account.py +0 -0
  19. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/account_budgets.py +0 -0
  20. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/ads_data_manager.py +0 -0
  21. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/advertising_invitations.py +0 -0
  22. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/advertising_test_account.py +0 -0
  23. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/advertising_user_permissions.py +0 -0
  24. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/attribution.py +0 -0
  25. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/audiences.py +0 -0
  26. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/billing.py +0 -0
  27. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/brand_benchmarks.py +0 -0
  28. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/brand_home.py +0 -0
  29. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/brand_metrics.py +0 -0
  30. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/creative_assets.py +0 -0
  31. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/dsp_advertiser.py +0 -0
  32. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/eligibility.py +0 -0
  33. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/exports.py +0 -0
  34. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/history.py +0 -0
  35. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/insights.py +0 -0
  36. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/localization.py +0 -0
  37. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/manager_accounts.py +0 -0
  38. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/marketing_mix_modeling.py +0 -0
  39. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/metadata.py +0 -0
  40. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/portfolios.py +0 -0
  41. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/portfolios_v3.py +0 -0
  42. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/profiles.py +0 -0
  43. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/ras_campaign_management.py +0 -0
  44. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/ras_retailer_identity.py +0 -0
  45. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/recommendations.py +0 -0
  46. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/reports.py +0 -0
  47. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sb/__init__.py +0 -0
  48. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sb/ad_creatives_v4.py +0 -0
  49. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sb/ad_groups.py +0 -0
  50. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sb/ad_groups_v4.py +0 -0
  51. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sb/ads_v4.py +0 -0
  52. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sb/benchmarks.py +0 -0
  53. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sb/bid_recommendations.py +0 -0
  54. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sb/brands.py +0 -0
  55. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sb/budget_rules.py +0 -0
  56. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sb/campaigns.py +0 -0
  57. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sb/campaigns_v4.py +0 -0
  58. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sb/forecast.py +0 -0
  59. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sb/keywords.py +0 -0
  60. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sb/keywords_recommendations.py +0 -0
  61. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sb/landing_page_asins.py +0 -0
  62. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sb/media.py +0 -0
  63. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sb/migration.py +0 -0
  64. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sb/negative_keywords.py +0 -0
  65. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sb/negative_product_targeting.py +0 -0
  66. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sb/optimization_rules.py +0 -0
  67. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sb/product_targeting.py +0 -0
  68. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sb/recommendations.py +0 -0
  69. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sb/reports.py +0 -0
  70. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sb/stores.py +0 -0
  71. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sb/targeting_categories.py +0 -0
  72. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sb/targeting_recommendations.py +0 -0
  73. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sb/themes.py +0 -0
  74. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sd/__init__.py +0 -0
  75. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sd/ad_groups.py +0 -0
  76. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sd/bid_recommendations.py +0 -0
  77. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sd/brand_safety.py +0 -0
  78. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sd/budget_rules.py +0 -0
  79. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sd/campaigns.py +0 -0
  80. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sd/campaigns_budget_usage.py +0 -0
  81. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sd/creatives.py +0 -0
  82. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sd/forecast.py +0 -0
  83. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sd/negative_product_targeting.py +0 -0
  84. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sd/product_ads.py +0 -0
  85. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sd/product_targeting.py +0 -0
  86. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sd/recommendations.py +0 -0
  87. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sd/reports.py +0 -0
  88. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sd/snapshots.py +0 -0
  89. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sd/targeting_recommendations.py +0 -0
  90. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sp/__init__.py +0 -0
  91. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sp/ad_groups_v3.py +0 -0
  92. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sp/bid_recommendations_v3.py +0 -0
  93. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sp/budget_initial_recommendation.py +0 -0
  94. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sp/budget_recommendations.py +0 -0
  95. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sp/budget_rules.py +0 -0
  96. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sp/budget_rules_recommendations.py +0 -0
  97. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sp/campaign_consolidated_recommendations.py +0 -0
  98. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sp/campaign_negative_keywords_v3.py +0 -0
  99. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sp/campaign_negative_targets.py +0 -0
  100. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sp/campaigns_budget_usage.py +0 -0
  101. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sp/campaigns_v3.py +0 -0
  102. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sp/campaings_optimization.py +0 -0
  103. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sp/global_recommendations.py +0 -0
  104. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sp/keyword_groups_recommendations.py +0 -0
  105. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sp/keywords_v3.py +0 -0
  106. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sp/negative_keywords_v3.py +0 -0
  107. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sp/negative_product_targeting_v3.py +0 -0
  108. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sp/product_ads_v3.py +0 -0
  109. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sp/product_recommendations.py +0 -0
  110. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sp/product_targeting_v3.py +0 -0
  111. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sp/ranked_keywords_recommendations.py +0 -0
  112. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sp/schedule_based_bid_optimization.py +0 -0
  113. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/sp/target_promotion_groups.py +0 -0
  114. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/st/__init__.py +0 -0
  115. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/st/ad_groups.py +0 -0
  116. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/st/ads.py +0 -0
  117. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/st/campaigns.py +0 -0
  118. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/st/creatives.py +0 -0
  119. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/st/creatives_moderations.py +0 -0
  120. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/st/creatives_preview.py +0 -0
  121. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/st/forecasts.py +0 -0
  122. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/st/locations.py +0 -0
  123. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/st/targets.py +0 -0
  124. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/stores.py +0 -0
  125. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/stream.py +0 -0
  126. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/v1/__init__.py +0 -0
  127. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/v1/ad_associations.py +0 -0
  128. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/v1/ad_extensions.py +0 -0
  129. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/v1/ad_groups.py +0 -0
  130. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/v1/ads.py +0 -0
  131. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/v1/advertiser_accounts.py +0 -0
  132. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/v1/brand_store_edition_publish_versions.py +0 -0
  133. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/v1/brand_store_editions.py +0 -0
  134. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/v1/brand_store_pages.py +0 -0
  135. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/v1/brand_stores.py +0 -0
  136. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/v1/campaigns.py +0 -0
  137. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/v1/geo_locations.py +0 -0
  138. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/v1/label_object_associations.py +0 -0
  139. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/v1/labels.py +0 -0
  140. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/v1/location_indexes.py +0 -0
  141. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/v1/manager_accounts.py +0 -0
  142. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/v1/portfolios.py +0 -0
  143. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/v1/recommendation_types.py +0 -0
  144. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/v1/recommendations.py +0 -0
  145. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/v1/reports.py +0 -0
  146. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/v1/selling_accounts.py +0 -0
  147. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/v1/targets.py +0 -0
  148. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/api/validation_configurations.py +0 -0
  149. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/auth/__init__.py +0 -0
  150. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/auth/access_token_client.py +0 -0
  151. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/auth/access_token_response.py +0 -0
  152. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/auth/credentials.py +0 -0
  153. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/auth/exceptions.py +0 -0
  154. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/base/__init__.py +0 -0
  155. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/base/api_response.py +0 -0
  156. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/base/client.py +0 -0
  157. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/base/config.py +0 -0
  158. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/base/credential_provider.py +0 -0
  159. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/base/exceptions.py +0 -0
  160. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/base/helpers.py +0 -0
  161. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/base/marketplaces.py +0 -0
  162. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/base/utils.py +0 -0
  163. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/shared/__init__.py +0 -0
  164. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/ad_api/shared/base_client.py +0 -0
  165. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/pyproject.toml +0 -0
  166. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/python_amazon_ad_api.egg-info/dependency_links.txt +0 -0
  167. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/python_amazon_ad_api.egg-info/requires.txt +0 -0
  168. {python_amazon_ad_api-2.2.8 → python_amazon_ad_api-2.3.0}/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.2.8
3
+ Version: 2.3.0
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
@@ -35,6 +35,12 @@ from .brand_home import BrandHome
35
35
  from .ras_retailer_identity import RasRetailerIdentity
36
36
  from .ras_campaign_management import RasCampaignManagement
37
37
  from .ads_data_manager import AdsDataManager
38
+ from .partner_opportunities import PartnerOpportunities
39
+ from .persona_builder import PersonaBuilder
40
+ from .campaign_diagnostics import CampaignDiagnostics
41
+ from .pre_moderation import PreModeration
42
+ from .moderation import Moderation
43
+ from .ad_library import AdLibrary
38
44
 
39
45
  __all__ = [
40
46
  "v1",
@@ -76,5 +82,11 @@ __all__ = [
76
82
  "RasRetailerIdentity",
77
83
  "RasCampaignManagement",
78
84
  "AdsDataManager",
85
+ "PartnerOpportunities",
86
+ "PersonaBuilder",
87
+ "CampaignDiagnostics",
88
+ "PreModeration",
89
+ "Moderation",
90
+ "AdLibrary",
79
91
  "Account"
80
92
  ]
@@ -0,0 +1,76 @@
1
+ """Ad library /adRepository.
2
+
3
+ Contract: Ad Library API 3.0. Two routes and both speak
4
+ ``application/vnd.adsrepository.v1.1+json``. This is the public ads library,
5
+ not the ads of one advertiser: the only header it needs is
6
+ ``Amazon-Advertising-API-ClientId``, with no scope and no account.
7
+ """
8
+
9
+ from ad_api.base import Client, sp_endpoint, fill_query_params, ApiResponse, Utils
10
+
11
+
12
+ class AdLibrary(Client):
13
+ r"""Ad library - /adRepository/ads
14
+
15
+ Documentation: https://advertising.amazon.com/API/docs/en-us/ad-library
16
+ """
17
+
18
+ @sp_endpoint('/adRepository/ads/list', method='POST', headers=[])
19
+ def list_ads(self, version: str = "1.1", **kwargs) -> ApiResponse:
20
+ r"""
21
+ Lists the ads already delivered, with filters. Read only.
22
+
23
+ Request Body, all optional
24
+ | **advertiserName** (str): the advertiser to look for.
25
+ | **nameMatchType** (str): ``CONTAINS`` or ``EXACT_MATCH``. Without
26
+ | it the match is loose: ``Nike`` also returns ``Nikena``.
27
+ | **advertisementPurpose** (str): the product, service or brand
28
+ | inside the ad.
29
+ | **siteName** (str): the Amazon site, such as ``amazon.es``.
30
+ | **isRestricted** (bool): paused, removed or suppressed ads.
31
+ | **deliveryAfterDateUtc** (str): ``YYYY-MM-DD``, UTC.
32
+ | **deliveryBeforeDateUtc** (str): ``YYYY-MM-DD``, UTC.
33
+ | **maxResults** (int): default 10, from 1 to 1000.
34
+ | **nextToken** (str): token from a previous answer.
35
+
36
+ Keyword Args
37
+
38
+ - ``version`` (str): media type version. Defaults to ``1.1``. [optional]
39
+
40
+ Returns
41
+ ApiResponse with ``ads``, ``nextToken`` and ``totalResults``. Each
42
+ ad carries ``id``, ``type`` (``AD`` or
43
+ ``AFFILIATE_MARKETING_CONTENT``), ``advertiserName``,
44
+ ``advertisementPurpose``, ``contentUrls``, ``contents``,
45
+ ``deliveryAfterDateUtc``, ``isRestricted``, ``recipientsBreakdown``
46
+ and ``subjectMatterUrl``. Fields the library does not have arrive
47
+ as ``NOT_AVAILABLE``.
48
+ """
49
+ media_type = 'application/vnd.adsrepository.v' + version + '+json'
50
+ headers = {'Accept': media_type, 'Content-Type': media_type}
51
+ body = Utils.convert_body(kwargs.pop('body'), False)
52
+ return self._request(fill_query_params(kwargs.pop('path')),
53
+ data=body, params=kwargs, headers=headers)
54
+
55
+ @sp_endpoint('/adRepository/ads/{}', method='GET', headers=[])
56
+ def get_ad(self, adId, version: str = "1.1", **kwargs) -> ApiResponse:
57
+ r"""
58
+ Gets one ad of the library by its id. Read only.
59
+
60
+ Path Parameters
61
+
62
+ - ``adId`` (str): the ``id`` a list entry carries, such as
63
+ ``amzn1.vse.video.<uuid>``. [required]
64
+
65
+ Keyword Args
66
+
67
+ - ``version`` (str): media type version. Defaults to ``1.1``. [optional]
68
+
69
+ Returns
70
+ ApiResponse with ``ad``, the same shape a list entry has.
71
+ """
72
+ media_type = 'application/vnd.adsrepository.v' + version + '+json'
73
+ headers = {'Accept': media_type}
74
+ return self._request(fill_query_params(kwargs.pop('path'), adId),
75
+ params=kwargs, headers=headers)
76
+
@@ -0,0 +1,54 @@
1
+ """Campaign diagnostics /diagnostics/campaigns/issues.
2
+
3
+ Contract: Diagnostics 3.0. One route, ``POST``, media type
4
+ ``application/vnd.campaigndiagnosticsissues.v1+json`` for both the body and the
5
+ answer. It identifies the caller with ``Amazon-Advertising-API-Scope``.
6
+
7
+ The contract marks the family as deprecated: retired on 1 December 2025, and no
8
+ new callers accepted since 20 June 2025. A live call answers ``401`` with
9
+ ``The Campaign Diagnostics API has been deprecated and new callers are not
10
+ allowed to onboard``, which is onboarding being closed, not a broken request.
11
+ """
12
+
13
+ from ad_api.base import Client, sp_endpoint, fill_query_params, ApiResponse, Utils
14
+
15
+
16
+ class CampaignDiagnostics(Client):
17
+ r"""Campaign diagnostics - /diagnostics/campaigns/issues
18
+
19
+ Documentation: https://advertising.amazon.com/API/docs/en-us/campaign-diagnostics
20
+
21
+ .. deprecated::
22
+
23
+ Retired on 1 December 2025. New callers cannot onboard since 20 June 2025.
24
+ """
25
+
26
+ @sp_endpoint('/diagnostics/campaigns/issues', method='POST',
27
+ headers=['Amazon-Advertising-API-Scope'])
28
+ def post_campaign_issues(self, **kwargs) -> ApiResponse:
29
+ r"""
30
+ Creates the issues that affect a set of campaigns. Read only.
31
+
32
+ Request Body [Required]
33
+ | **campaignIdsList** (list): one to fifty campaign identifiers.
34
+
35
+ Request Body [Optional]
36
+ | **includeOnlyActive** (bool): enabled entities only. Default
37
+ | ``false``, which returns enabled and paused.
38
+ | **issueTypeFilter** (list): up to three issue types; by default
39
+ | every type is returned.
40
+ | **severityFilter** (list): ``CRITICAL`` or ``WARNING``.
41
+ | **locale** (str): language of the messages, ``en_US`` by default.
42
+ | **maxIssuesPerCampaign** (int): default 100, maximum 1000.
43
+ | **nextToken** (str): token from a previous answer.
44
+
45
+ Returns
46
+ ApiResponse with ``campaignDiagnosticsList`` (each entry carries
47
+ ``campaignId`` and ``issuesList``), ``errorsList`` and ``nextToken``.
48
+ The success status is ``207``, not ``200``.
49
+ """
50
+ media_type = 'application/vnd.campaigndiagnosticsissues.v1+json'
51
+ headers = {'Accept': media_type, 'Content-Type': media_type}
52
+ body = Utils.convert_body(kwargs.pop('body'), False)
53
+ return self._request(fill_query_params(kwargs.pop('path')),
54
+ data=body, params=kwargs, headers=headers)
@@ -0,0 +1,65 @@
1
+ """Moderation /moderation/results.
2
+
3
+ Contract: Moderation 3.0. One route, ``POST``, and the two media types do not
4
+ share a number: the request body is
5
+ ``application/vnd.moderationresultsrequest.v4.1+json`` and the answer is
6
+ ``application/vnd.moderationresultsresponse.v4.0+json``.
7
+
8
+ It returns the moderation status of an ad already created: approved, rejected,
9
+ still in progress or failed, with the policy violations behind a rejection and
10
+ the components they belong to.
11
+ """
12
+
13
+ from ad_api.base import Client, sp_endpoint, fill_query_params, ApiResponse, Utils
14
+
15
+
16
+ class Moderation(Client):
17
+ r"""Moderation - /moderation/results
18
+
19
+ Documentation: https://advertising.amazon.com/API/docs/en-us/moderation
20
+ """
21
+
22
+ @sp_endpoint('/moderation/results', method='POST',
23
+ headers=['Amazon-Advertising-API-Scope'])
24
+ def post_moderation_results(self, request_version: str = "4.1",
25
+ response_version: str = "4.0",
26
+ **kwargs) -> ApiResponse:
27
+ r"""
28
+ Reads the moderation results of an ad. Read only.
29
+
30
+ Request Body [Required]
31
+ | **adProgramType** (str): ``SB_PRODUCT_COLLECTION``,
32
+ | ``SB_STORE_SPOTLIGHT``, ``SB_VIDEO``, ``SPONSORED_DISPLAY`` or
33
+ | ``SPONSORED_PRODUCTS``.
34
+ | **id** (str): the ad id, from the create routes.
35
+ | **idType** (str): ``AD_ID`` today, the only value the contract has.
36
+ | **maxResults** (int): one to ten.
37
+
38
+ Request Body [Optional]
39
+ | **moderationStatusFilter** (list): ``APPROVED``, ``FAILED``,
40
+ | ``IN_PROGRESS`` or ``REJECTED``.
41
+ | **versionIdFilter** (list): up to 200 versions of the ad. Empty
42
+ | returns every version.
43
+ | **nextToken** (str): token from a previous answer.
44
+
45
+ Keyword Args
46
+
47
+ - ``request_version`` (str): request media type version, ``4.1``.
48
+ [optional]
49
+ - ``response_version`` (str): answer media type version, ``4.0``.
50
+ [optional]
51
+
52
+ Returns
53
+ ApiResponse with ``moderationResults`` and ``nextToken``. Each
54
+ result carries ``id``, ``idType``, ``versionId``,
55
+ ``moderationStatus``, ``policyViolations`` and
56
+ ``componentModerationResults``, with one list per component type.
57
+ """
58
+ request_type = ('application/vnd.moderationresultsrequest.v'
59
+ + request_version + '+json')
60
+ accept = ('application/vnd.moderationresultsresponse.v'
61
+ + response_version + '+json')
62
+ headers = {'Accept': accept, 'Content-Type': request_type}
63
+ body = Utils.convert_body(kwargs.pop('body'), False)
64
+ return self._request(fill_query_params(kwargs.pop('path')),
65
+ data=body, params=kwargs, headers=headers)
@@ -0,0 +1,169 @@
1
+ """Partner Opportunities /partnerOpportunities.
2
+
3
+ Contract: Partner Opportunities 3.0. Five routes, all of them identifying the
4
+ caller with ``Amazon-Advertising-API-Manager-Account``, the header the client
5
+ already sends from ``manager_account_id``.
6
+
7
+ Every response and every request body uses
8
+ ``application/vnd.partneropportunity.v<n>+json``. The contract publishes v1,
9
+ v1.1 and v1.2; the media type is built in the method body from the ``version``
10
+ argument, and ``/partnerOpportunities/summary`` only exists from v1.1 on.
11
+
12
+ ``/partnerOpportunities/{partnerOpportunityId}/apply`` is asynchronous: it
13
+ answers 202 and the result is read through ``applicationStatus``. Both take the
14
+ same body, and the contract says its members come from the opportunity data file.
15
+ """
16
+
17
+ from ad_api.base import Client, sp_endpoint, fill_query_params, ApiResponse, Utils
18
+
19
+
20
+ class PartnerOpportunities(Client):
21
+ r"""Partner Opportunities - /partnerOpportunities
22
+
23
+ Documentation: https://advertising.amazon.com/API/docs/en-us/partner-opportunities
24
+ """
25
+
26
+ @sp_endpoint('/partnerOpportunities', method='GET',
27
+ headers=['Amazon-Advertising-API-Manager-Account'])
28
+ def list_opportunities(self, version: float = 1, **kwargs) -> ApiResponse:
29
+ r"""
30
+ Lists the opportunities for the partner making the request. Read only.
31
+
32
+ Keyword Args
33
+
34
+ - ``version`` (float): media type version, 1, 1.1 or 1.2. Defaults to 1.
35
+ - ``maxResults`` (int): page size. [optional]
36
+ - ``nextToken`` (str): pagination token. [optional]
37
+ - ``locale`` (str): e.g. ``en_US``. [optional]
38
+ - ``retrieveTranslationKeys`` (bool): also return translation keys. [optional]
39
+ - ``advertiserId`` (str): narrow to one advertiser. [optional]
40
+ - ``profileId`` (str): narrow to one profile. [optional]
41
+ - ``audience`` (str): ``PARTNER``, ``PARTNER_MANAGED_ADVERTISERS`` or
42
+ ``PARTNER_MANAGED_AD_BUSINESS``. [optional]
43
+ - ``objectiveType`` (str): filter by objective. [optional]
44
+ - ``product`` (str): filter by product. [optional]
45
+ - ``selector`` (str): ``'manager_account_id'``. [optional]
46
+
47
+ Returns
48
+ ApiResponse with ``opportunities``, ``totalResults``, ``nextToken``,
49
+ ``prevToken``, ``firstToken`` and ``lastToken``.
50
+ """
51
+ schema = 'application/vnd.partneropportunity.v' + str(version) + '+json'
52
+ headers = {'Accept': schema}
53
+ return self._request(kwargs.pop('path'), params=kwargs, headers=headers)
54
+
55
+ @sp_endpoint('/partnerOpportunities/summary', method='GET',
56
+ headers=['Amazon-Advertising-API-Manager-Account'])
57
+ def summarize_opportunities(self, version: float = 1, **kwargs) -> ApiResponse:
58
+ r"""
59
+ Gets aggregated information about every opportunity of the partner.
60
+ Read only. Supported from v1.1 of the media type on.
61
+
62
+ Keyword Args
63
+
64
+ - ``version`` (float): media type version, 1, 1.1 or 1.2. Defaults to 1.
65
+ - ``audience`` (str): the same filter as the list. [optional]
66
+ - ``objectiveType`` (str): filter by objective. [optional]
67
+ - ``product`` (str): filter by product. [optional]
68
+ - ``selector`` (str): ``'manager_account_id'``. [optional]
69
+
70
+ Returns
71
+ ApiResponse with ``opportunitiesCount``,
72
+ ``opportunitiesWithDataCount``, ``uniqueAdvertiserApproximateCount``
73
+ and the three available-filter lists.
74
+ """
75
+ schema = 'application/vnd.partneropportunity.v' + str(version) + '+json'
76
+ headers = {'Accept': schema}
77
+ return self._request(kwargs.pop('path'), params=kwargs, headers=headers)
78
+
79
+ @sp_endpoint('/partnerOpportunities/{}/apply', method='POST',
80
+ headers=['Amazon-Advertising-API-Manager-Account'])
81
+ def apply_opportunity(self, partnerOpportunityId, version: float = 1, **kwargs) -> ApiResponse:
82
+ r"""
83
+ Applies a set of recommendations from one opportunity. It is
84
+ asynchronous: answers 202, and the result is read with
85
+ ``get_application_status``.
86
+
87
+ Path Parameters
88
+
89
+ - ``partnerOpportunityId`` (str): the opportunity. [required]
90
+
91
+ Request Body [Required]
92
+ | **advertiserType** (str): ``SELLER`` or ``VENDOR``.
93
+ | **encryptedAdvertiserId** (str).
94
+ | **entityId** (str).
95
+ | **marketplace** (str): e.g. ``ES``, ``US``, ``UK``.
96
+ | **recommendationIds** (list): the recommendations to apply.
97
+ | All five come from the opportunity data file.
98
+
99
+ Keyword Args
100
+
101
+ - ``version`` (float): media type version, 1, 1.1 or 1.2. Defaults to 1.
102
+ - ``selector`` (str): ``'manager_account_id'``. [optional]
103
+
104
+ Returns
105
+ ApiResponse, 202 accepted. On 400 or 422 the body names the failures.
106
+ """
107
+ schema = 'application/vnd.partneropportunity.v' + str(version) + '+json'
108
+ headers = {'Accept': schema, 'Content-Type': schema}
109
+ body = Utils.convert_body(kwargs.pop('body'), False)
110
+ return self._request(fill_query_params(kwargs.pop('path'), partnerOpportunityId),
111
+ data=body, params=kwargs, headers=headers)
112
+
113
+ @sp_endpoint('/partnerOpportunities/{}/applicationStatus', method='POST',
114
+ headers=['Amazon-Advertising-API-Manager-Account'])
115
+ def get_application_status(self, partnerOpportunityId, version: float = 1, **kwargs) -> ApiResponse:
116
+ r"""
117
+ Reads the status of recommendations already applied from one
118
+ opportunity.
119
+
120
+ Path Parameters
121
+
122
+ - ``partnerOpportunityId`` (str): the opportunity. [required]
123
+
124
+ Request Body [Required]
125
+ | The same five members as ``apply_opportunity``:
126
+ | **advertiserType**, **encryptedAdvertiserId**, **entityId**,
127
+ | **marketplace** and **recommendationIds**.
128
+
129
+ Keyword Args
130
+
131
+ - ``version`` (float): media type version, 1, 1.1 or 1.2. Defaults to 1.
132
+ - ``selector`` (str): ``'manager_account_id'``. [optional]
133
+
134
+ Returns
135
+ ApiResponse with ``statuses``: each entry has ``campaignId``,
136
+ ``recommendationId`` and ``status`` (``FAILED``, ``IN_PROGRESS``,
137
+ ``PUBLISHED``, ``REJECTED``, ``SUCCESS``).
138
+ """
139
+ schema = 'application/vnd.partneropportunity.v' + str(version) + '+json'
140
+ headers = {'Accept': schema, 'Content-Type': schema}
141
+ body = Utils.convert_body(kwargs.pop('body'), False)
142
+ return self._request(fill_query_params(kwargs.pop('path'), partnerOpportunityId),
143
+ data=body, params=kwargs, headers=headers)
144
+
145
+ @sp_endpoint('/partnerOpportunities/{}/file', method='GET',
146
+ headers=['Amazon-Advertising-API-Manager-Account'])
147
+ def get_opportunity_file(self, partnerOpportunityId, version: float = 1, **kwargs) -> ApiResponse:
148
+ r"""
149
+ Gets a 307 redirect to the opportunity data file, as CSV. The redirect
150
+ goes to a presigned URL that expires in 15 minutes.
151
+
152
+ Path Parameters
153
+
154
+ - ``partnerOpportunityId`` (str): the opportunity. [required]
155
+
156
+ Keyword Args
157
+
158
+ - ``version`` (float): media type version, 1, 1.1 or 1.2. Defaults to 1.
159
+ - ``fileFormat`` (str): the format asked for. [optional]
160
+ - ``selector`` (str): ``'manager_account_id'``. [optional]
161
+
162
+ Returns
163
+ ApiResponse. The redirect is in the headers; ``dataUrl`` inside an
164
+ opportunity carries the same link.
165
+ """
166
+ schema = 'application/vnd.partneropportunity.v' + str(version) + '+json'
167
+ headers = {'Accept': schema}
168
+ return self._request(fill_query_params(kwargs.pop('path'), partnerOpportunityId),
169
+ params=kwargs, headers=headers)
@@ -0,0 +1,174 @@
1
+ """Persona Builder API /insights.
2
+
3
+ Contract: Persona Builder API 3.0. Five routes, all of them ``POST`` and all of
4
+ them under ``/insights``. Each one takes an audience expression, a persona, and
5
+ returns aggregated insights for it. An advertiser can then save that expression
6
+ to DSP as a combined audience.
7
+
8
+ The parent is *Recommendations & insights*, next to *Partner opportunities* and
9
+ *Overlapping audiences*.
10
+
11
+ Every route has its **own pair** of media types: the request body one names the
12
+ input expression and the response one names the insights. They are not a single
13
+ ``vnd.<family>.v<n>`` pair, so each method builds both from its own strings.
14
+ """
15
+
16
+ from ad_api.base import Client, sp_endpoint, fill_query_params, ApiResponse, Utils
17
+
18
+
19
+ class PersonaBuilder(Client):
20
+ r"""Persona Builder API - /insights
21
+
22
+ Documentation: https://advertising.amazon.com/API/docs/en-us/persona-builder
23
+ """
24
+
25
+ @sp_endpoint('/insights/bandedSize', method='POST',
26
+ headers=['Amazon-Advertising-AccountId'])
27
+ def post_banded_size(self, version: int = 1, **kwargs) -> ApiResponse:
28
+ r"""
29
+ Gets the banded size of the number of unique customers inside the expression.
30
+ Read only.
31
+
32
+ Request Body [Required]
33
+ | **audienceTargetingExpression** (dict): the persona, groups of
34
+ | audiences joined by an intersection and each group by a union.
35
+ | Up to 10 included groups, only 1 excluded, up to 500 ids per group.
36
+ | **countryCodes** (list): ISO alpha-2, one country per request. It
37
+ | is required when the advertiser has no associated country.
38
+
39
+ Keyword Args
40
+
41
+ - ``advertiserId`` (str): the advertiser, from ``/dsp/advertisers``. [required]
42
+ - ``version`` (int): media type version. Defaults to 1. [optional]
43
+
44
+ Returns
45
+ ApiResponse with ``estimatedSize`` (``min`` and ``max``) and ``lastUpdatedAt``.
46
+ """
47
+ request_type = 'application/vnd.bandedsizeinputexpression.v' + str(version) + '+json'
48
+ accept = 'application/vnd.bandedsizeinsights.v' + str(version) + '+json'
49
+ headers = {'Accept': accept, 'Content-Type': request_type}
50
+ body = Utils.convert_body(kwargs.pop('body'), False)
51
+ return self._request(fill_query_params(kwargs.pop('path')),
52
+ data=body, params=kwargs, headers=headers)
53
+
54
+ @sp_endpoint('/insights/demographics', method='POST',
55
+ headers=['Amazon-Advertising-AccountId'])
56
+ def post_demographics(self, version: int = 1, **kwargs) -> ApiResponse:
57
+ r"""
58
+ Gets the demographic composition of the customers inside the expression.
59
+ Read only.
60
+
61
+ Request Body [Required]
62
+ | **audienceTargetingExpression** (dict): the persona, groups of
63
+ | audiences joined by an intersection and each group by a union.
64
+ | Up to 10 included groups, only 1 excluded, up to 500 ids per group.
65
+ | **countryCodes** (list): ISO alpha-2, one country per request. It
66
+ | is required when the advertiser has no associated country.
67
+
68
+ Keyword Args
69
+
70
+ - ``advertiserId`` (str): the advertiser, from ``/dsp/advertisers``. [required]
71
+ - ``version`` (int): media type version. Defaults to 1. [optional]
72
+
73
+ Returns
74
+ ApiResponse with the age ranges, education, gender, income and the rest of ``DemographicsResponseContent``.
75
+ """
76
+ request_type = 'application/vnd.demographicinputexpressions.v' + str(version) + '+json'
77
+ accept = 'application/vnd.demographicinsights.v' + str(version) + '+json'
78
+ headers = {'Accept': accept, 'Content-Type': request_type}
79
+ body = Utils.convert_body(kwargs.pop('body'), False)
80
+ return self._request(fill_query_params(kwargs.pop('path')),
81
+ data=body, params=kwargs, headers=headers)
82
+
83
+ @sp_endpoint('/insights/primeVideo', method='POST',
84
+ headers=['Amazon-Advertising-AccountId'])
85
+ def post_prime_video(self, version: int = 1, **kwargs) -> ApiResponse:
86
+ r"""
87
+ Gets the Prime Video consumption of the customers inside the expression: genres, actors and directors.
88
+ Read only.
89
+
90
+ Request Body [Required]
91
+ | **audienceTargetingExpression** (dict): the persona, groups of
92
+ | audiences joined by an intersection and each group by a union.
93
+ | Up to 10 included groups, only 1 excluded, up to 500 ids per group.
94
+ | **countryCodes** (list): ISO alpha-2, one country per request. It
95
+ | is required when the advertiser has no associated country.
96
+
97
+ Keyword Args
98
+
99
+ - ``advertiserId`` (str): the advertiser, from ``/dsp/advertisers``. [required]
100
+ - ``version`` (int): media type version. Defaults to 1. [optional]
101
+
102
+ Returns
103
+ ApiResponse with ``PrimeVideoResponseContent``.
104
+ """
105
+ request_type = 'application/vnd.primevideoinputexpressions.v' + str(version) + '+json'
106
+ accept = 'application/vnd.primevideoinsights.v' + str(version) + '+json'
107
+ headers = {'Accept': accept, 'Content-Type': request_type}
108
+ body = Utils.convert_body(kwargs.pop('body'), False)
109
+ return self._request(fill_query_params(kwargs.pop('path')),
110
+ data=body, params=kwargs, headers=headers)
111
+
112
+ @sp_endpoint('/insights/topCategoriesPurchased', method='POST',
113
+ headers=['Amazon-Advertising-AccountId'])
114
+ def post_top_categories_purchased(self, version: int = 1, **kwargs) -> ApiResponse:
115
+ r"""
116
+ Gets the product categories the customers inside the expression buy the most, with pagination.
117
+ Read only.
118
+
119
+ Request Body [Required]
120
+ | **audienceTargetingExpression** (dict): the persona, groups of
121
+ | audiences joined by an intersection and each group by a union.
122
+ | Up to 10 included groups, only 1 excluded, up to 500 ids per group.
123
+ | **countryCodes** (list): ISO alpha-2, one country per request. It
124
+ | is required when the advertiser has no associated country.
125
+
126
+ Keyword Args
127
+
128
+ - ``advertiserId`` (str): the advertiser, from ``/dsp/advertisers``. [required]
129
+
130
+ - ``maxResults`` (int): page size. [optional]
131
+ - ``nextToken`` (str): token from a previous answer. [optional]
132
+ - ``version`` (int): media type version. Defaults to 1. [optional]
133
+
134
+ Returns
135
+ ApiResponse with the ranked categories and ``nextToken``.
136
+ """
137
+ request_type = 'application/vnd.topcategoriespurchasedinputexpression.v' + str(version) + '+json'
138
+ accept = 'application/vnd.topcategoriespurchasedinsights.v' + str(version) + '+json'
139
+ headers = {'Accept': accept, 'Content-Type': request_type}
140
+ body = Utils.convert_body(kwargs.pop('body'), False)
141
+ return self._request(fill_query_params(kwargs.pop('path')),
142
+ data=body, params=kwargs, headers=headers)
143
+
144
+ @sp_endpoint('/insights/topOverlappingAudiences', method='POST',
145
+ headers=['Amazon-Advertising-AccountId'])
146
+ def post_top_overlapping_audiences(self, version: int = 1, **kwargs) -> ApiResponse:
147
+ r"""
148
+ Gets the audiences that overlap the expression the most, ranked by affinity, with pagination.
149
+ Read only.
150
+
151
+ Request Body [Required]
152
+ | **audienceTargetingExpression** (dict): the persona, groups of
153
+ | audiences joined by an intersection and each group by a union.
154
+ | Up to 10 included groups, only 1 excluded, up to 500 ids per group.
155
+ | **countryCodes** (list): ISO alpha-2, one country per request. It
156
+ | is required when the advertiser has no associated country.
157
+
158
+ Keyword Args
159
+
160
+ - ``advertiserId`` (str): the advertiser, from ``/dsp/advertisers``. [required]
161
+
162
+ - ``maxResults`` (int): page size. [optional]
163
+ - ``nextToken`` (str): token from a previous answer. [optional]
164
+ - ``version`` (int): media type version. Defaults to 1. [optional]
165
+
166
+ Returns
167
+ ApiResponse with the overlapping audiences and ``nextToken``.
168
+ """
169
+ request_type = 'application/vnd.topoverlappingaudiencesinputexpression.v' + str(version) + '+json'
170
+ accept = 'application/vnd.topoverlappingaudiencesinsights.v' + str(version) + '+json'
171
+ headers = {'Accept': accept, 'Content-Type': request_type}
172
+ body = Utils.convert_body(kwargs.pop('body'), False)
173
+ return self._request(fill_query_params(kwargs.pop('path')),
174
+ data=body, params=kwargs, headers=headers)
@@ -0,0 +1,64 @@
1
+ """Pre-moderation /preModeration.
2
+
3
+ Contract: PreModeration 3.0. One route, ``POST``, plain ``application/json`` in
4
+ the body and in the answer. There is no vendor media type to build here.
5
+
6
+ It takes the pieces of an ad, a headline, an image, a landing page, and answers
7
+ whether each one passes Amazon policy and, when it does not, which rule it
8
+ breaks and which words triggered it.
9
+
10
+ ``adProgram`` and ``locale`` are required. ``locale`` uses a hyphen, such as
11
+ ``fr-FR`` or ``es-ES``; sending one that does not match the account returns
12
+ ``200`` with a ``LANGUAGE_UNSUPPORTED`` violation instead of an error.
13
+ """
14
+
15
+ from ad_api.base import Client, sp_endpoint, fill_query_params, ApiResponse, Utils
16
+
17
+
18
+ class PreModeration(Client):
19
+ r"""Pre-moderation - /preModeration
20
+
21
+ Documentation: https://advertising.amazon.com/API/docs/en-us/pre-moderation
22
+ """
23
+
24
+ @sp_endpoint('/preModeration', method='POST',
25
+ headers=['Amazon-Advertising-API-Scope'])
26
+ def post_pre_moderation(self, **kwargs) -> ApiResponse:
27
+ r"""
28
+ Pre-moderates the components of an ad and returns the policy violations
29
+ found. Read only.
30
+
31
+ Request Body [Required]
32
+ | **adProgram** (str): ``DSP``, ``SPONSORED_BRANDS``,
33
+ | ``SPONSORED_DISPLAY``, ``SPONSORED_TV``, ``STORES`` and the rest
34
+ | of the enum the contract publishes.
35
+ | **locale** (str): language of the answer, hyphenated, such as
36
+ | ``fr-FR``. It also drives the language check of the text.
37
+
38
+ Request Body [Optional]
39
+ | Up to ten of each: **textComponents**, **imageComponents**,
40
+ | **videoComponents**, **asinComponents**, **dateComponents**,
41
+ | **urlComponents**, **thirdPartyComponents**.
42
+ | **recordId** (str): your own id for the request.
43
+ | **targetLanguage** (str): language the ad is written in.
44
+
45
+ Each text component takes ``componentType`` (``BRAND_NAME``,
46
+ ``HEADLINE`` or ``OTHER_TEXT``), ``id`` and ``text``. An image component
47
+ takes ``componentType``, ``id`` and ``url``, and optionally
48
+ ``landingPage``. The ``id`` comes back in the answer, which is how one
49
+ tells which component failed.
50
+
51
+ Returns
52
+ ApiResponse with ``preModerationId``, ``adProgram``, ``locale`` and
53
+ one list per component sent. Each entry carries
54
+ ``preModerationStatus`` (``APPROVED`` or ``REJECTED``),
55
+ ``policyViolations``, ``corrections`` and the ``id`` of the
56
+ component. A violation names the rule, a human readable
57
+ ``policyDescription``, its ``type`` and the ``textEvidences``, with
58
+ the offending text and where it sits.
59
+ """
60
+ headers = {'Accept': 'application/json',
61
+ 'Content-Type': 'application/json'}
62
+ body = Utils.convert_body(kwargs.pop('body'), False)
63
+ return self._request(fill_query_params(kwargs.pop('path')),
64
+ data=body, params=kwargs, headers=headers)
@@ -0,0 +1 @@
1
+ __version__ = "2.3.0"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-amazon-ad-api
3
- Version: 2.2.8
3
+ Version: 2.3.0
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