python-amazon-ad-api 2.0.0__tar.gz → 2.0.2__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 (146) hide show
  1. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/PKG-INFO +8 -4
  2. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/README.md +7 -3
  3. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/account.py +43 -0
  4. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/billing.py +5 -10
  5. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/eligibility.py +3 -7
  6. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sb/budget_rules.py +2 -4
  7. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sb/campaigns_v4.py +1 -2
  8. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sb/migration.py +1 -2
  9. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sb/optimization_rules.py +1 -2
  10. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sp/__init__.py +6 -0
  11. python_amazon_ad_api-2.0.2/ad_api/api/sp/budget_initial_recommendation.py +47 -0
  12. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sp/budget_rules.py +41 -0
  13. python_amazon_ad_api-2.0.2/ad_api/api/sp/budget_rules_recommendations.py +44 -0
  14. python_amazon_ad_api-2.0.2/ad_api/api/sp/campaign_consolidated_recommendations.py +49 -0
  15. python_amazon_ad_api-2.0.2/ad_api/api/sp/global_recommendations.py +97 -0
  16. python_amazon_ad_api-2.0.2/ad_api/api/sp/keyword_groups_recommendations.py +34 -0
  17. python_amazon_ad_api-2.0.2/ad_api/api/sp/target_promotion_groups.py +141 -0
  18. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/v1/ad_groups.py +5 -7
  19. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/v1/advertiser_accounts.py +3 -3
  20. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/v1/brand_store_edition_publish_versions.py +1 -2
  21. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/v1/brand_store_pages.py +1 -1
  22. python_amazon_ad_api-2.0.2/ad_api/version.py +1 -0
  23. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/python_amazon_ad_api.egg-info/PKG-INFO +8 -4
  24. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/python_amazon_ad_api.egg-info/SOURCES.txt +3 -0
  25. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/setup.cfg +1 -1
  26. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/setup.py +1 -1
  27. python_amazon_ad_api-2.0.0/ad_api/api/sp/budget_initial_recommendation.py +0 -10
  28. python_amazon_ad_api-2.0.0/ad_api/api/sp/budget_rules_recommendations.py +0 -19
  29. python_amazon_ad_api-2.0.0/ad_api/api/sp/campaign_consolidated_recommendations.py +0 -19
  30. python_amazon_ad_api-2.0.0/ad_api/version.py +0 -1
  31. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/LICENSE +0 -0
  32. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/__init__.py +0 -0
  33. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/__init__.py +0 -0
  34. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/account_budgets.py +0 -0
  35. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/advertising_test_account.py +0 -0
  36. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/attribution.py +0 -0
  37. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/audiences.py +0 -0
  38. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/brand_metrics.py +0 -0
  39. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/creative_assets.py +0 -0
  40. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/exports.py +0 -0
  41. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/history.py +0 -0
  42. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/insights.py +0 -0
  43. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/localization.py +0 -0
  44. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/manager_accounts.py +0 -0
  45. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/metadata.py +0 -0
  46. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/portfolios.py +0 -0
  47. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/portfolios_v3.py +0 -0
  48. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/profiles.py +0 -0
  49. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/recommendations.py +0 -0
  50. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/reports.py +0 -0
  51. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sb/__init__.py +0 -0
  52. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sb/ad_creatives_v4.py +0 -0
  53. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sb/ad_groups.py +0 -0
  54. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sb/ad_groups_v4.py +0 -0
  55. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sb/ads_v4.py +0 -0
  56. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sb/benchmarks.py +0 -0
  57. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sb/bid_recommendations.py +0 -0
  58. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sb/brands.py +0 -0
  59. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sb/campaigns.py +0 -0
  60. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sb/forecast.py +0 -0
  61. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sb/keywords.py +0 -0
  62. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sb/keywords_recommendations.py +0 -0
  63. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sb/landing_page_asins.py +0 -0
  64. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sb/media.py +0 -0
  65. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sb/negative_keywords.py +0 -0
  66. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sb/negative_product_targeting.py +0 -0
  67. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sb/product_targeting.py +0 -0
  68. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sb/recommendations.py +0 -0
  69. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sb/reports.py +0 -0
  70. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sb/stores.py +0 -0
  71. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sb/targeting_categories.py +0 -0
  72. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sb/targeting_recommendations.py +0 -0
  73. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sb/themes.py +0 -0
  74. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sd/__init__.py +0 -0
  75. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sd/ad_groups.py +0 -0
  76. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sd/bid_recommendations.py +0 -0
  77. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sd/brand_safety.py +0 -0
  78. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sd/budget_rules.py +0 -0
  79. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sd/campaigns.py +0 -0
  80. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sd/campaigns_budget_usage.py +0 -0
  81. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sd/creatives.py +0 -0
  82. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sd/forecast.py +0 -0
  83. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sd/negative_product_targeting.py +0 -0
  84. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sd/product_ads.py +0 -0
  85. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sd/product_targeting.py +0 -0
  86. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sd/recommendations.py +0 -0
  87. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sd/reports.py +0 -0
  88. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sd/snapshots.py +0 -0
  89. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sd/targeting_recommendations.py +0 -0
  90. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sp/ad_groups_v3.py +0 -0
  91. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sp/bid_recommendations_v3.py +0 -0
  92. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sp/budget_recommendations.py +0 -0
  93. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sp/campaign_negative_keywords_v3.py +0 -0
  94. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sp/campaign_negative_targets.py +0 -0
  95. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sp/campaigns_budget_usage.py +0 -0
  96. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sp/campaigns_v3.py +0 -0
  97. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sp/campaings_optimization.py +0 -0
  98. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sp/keywords_v3.py +0 -0
  99. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sp/negative_keywords_v3.py +0 -0
  100. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sp/negative_product_targeting_v3.py +0 -0
  101. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sp/product_ads_v3.py +0 -0
  102. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sp/product_recommendations.py +0 -0
  103. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sp/product_targeting_v3.py +0 -0
  104. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sp/ranked_keywords_recommendations.py +0 -0
  105. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/sp/schedule_based_bid_optimization.py +0 -0
  106. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/stores.py +0 -0
  107. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/stream.py +0 -0
  108. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/v1/__init__.py +0 -0
  109. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/v1/ad_associations.py +0 -0
  110. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/v1/ad_extensions.py +0 -0
  111. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/v1/ads.py +0 -0
  112. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/v1/brand_store_editions.py +0 -0
  113. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/v1/brand_stores.py +0 -0
  114. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/v1/campaigns.py +0 -0
  115. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/v1/geo_locations.py +0 -0
  116. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/v1/label_object_associations.py +0 -0
  117. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/v1/labels.py +0 -0
  118. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/v1/location_indexes.py +0 -0
  119. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/v1/manager_accounts.py +0 -0
  120. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/v1/portfolios.py +0 -0
  121. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/v1/recommendation_types.py +0 -0
  122. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/v1/recommendations.py +0 -0
  123. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/v1/reports.py +0 -0
  124. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/v1/selling_accounts.py +0 -0
  125. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/v1/targets.py +0 -0
  126. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/api/validation_configurations.py +0 -0
  127. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/auth/__init__.py +0 -0
  128. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/auth/access_token_client.py +0 -0
  129. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/auth/access_token_response.py +0 -0
  130. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/auth/credentials.py +0 -0
  131. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/auth/exceptions.py +0 -0
  132. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/base/__init__.py +0 -0
  133. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/base/api_response.py +0 -0
  134. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/base/client.py +0 -0
  135. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/base/config.py +0 -0
  136. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/base/credential_provider.py +0 -0
  137. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/base/exceptions.py +0 -0
  138. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/base/helpers.py +0 -0
  139. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/base/marketplaces.py +0 -0
  140. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/base/utils.py +0 -0
  141. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/shared/__init__.py +0 -0
  142. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/ad_api/shared/base_client.py +0 -0
  143. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/pyproject.toml +0 -0
  144. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/python_amazon_ad_api.egg-info/dependency_links.txt +0 -0
  145. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/python_amazon_ad_api.egg-info/requires.txt +0 -0
  146. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.2}/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.0.0
3
+ Version: 2.0.2
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
@@ -350,15 +350,19 @@ Billing(account=store).list_invoices()
350
350
  | [Product Ads](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/product_ads_v3.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
351
351
  | [Negative Targeting Clauses](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/negative_product_targeting_v3.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
352
352
  | [Campaign Negative Targeting Clauses](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/campaign_negative_targets.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
353
- | [Budget recommendations and missed opportunities](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/product_recommendations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
353
+ | [Product Recommendations](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/product_recommendations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
354
354
  | [Budget Rules Recommendation](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/budget_rules_recommendations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
355
- | [Campaigns](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/campaignsv3.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
355
+ | [Campaigns](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/campaigns_v3.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
356
356
  | [Ad Groups](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/ad_groups_v3.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
357
357
  | [Consolidated Recommendations](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/campaigns_consolidated_recommendations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
358
358
  | [Campaign Negative Keywords](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/campaign_negative_keywords_v3.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
359
- | [Product Recommendations](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/budget_recommendations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
359
+ | [Budget recommendations and missed opportunities](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/budget_recommendations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
360
360
  | [Budget Usage](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/campaign_budget_usage.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
361
361
  | [Reports](https://python-amazon-ad-api.readthedocs.io/en/latest/api/reports.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/offline-report-prod-3p) |
362
+ | [Target Promotion Groups](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/target_promotion_groups.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
363
+ | [Initial Budget Recommendation](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/budget_initial_recommendation.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
364
+ | [Keyword Group Targeting Recommendations](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/keyword_groups_recommendations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
365
+ | [Multi Country Recommendations](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/global_recommendations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
362
366
 
363
367
  ### [Modules Available Sponsored Brands 3.0](https://python-amazon-ad-api.readthedocs.io/en/latest/sb_v3.html)
364
368
 
@@ -322,15 +322,19 @@ Billing(account=store).list_invoices()
322
322
  | [Product Ads](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/product_ads_v3.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
323
323
  | [Negative Targeting Clauses](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/negative_product_targeting_v3.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
324
324
  | [Campaign Negative Targeting Clauses](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/campaign_negative_targets.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
325
- | [Budget recommendations and missed opportunities](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/product_recommendations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
325
+ | [Product Recommendations](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/product_recommendations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
326
326
  | [Budget Rules Recommendation](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/budget_rules_recommendations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
327
- | [Campaigns](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/campaignsv3.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
327
+ | [Campaigns](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/campaigns_v3.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
328
328
  | [Ad Groups](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/ad_groups_v3.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
329
329
  | [Consolidated Recommendations](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/campaigns_consolidated_recommendations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
330
330
  | [Campaign Negative Keywords](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/campaign_negative_keywords_v3.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
331
- | [Product Recommendations](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/budget_recommendations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
331
+ | [Budget recommendations and missed opportunities](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/budget_recommendations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
332
332
  | [Budget Usage](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/campaign_budget_usage.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
333
333
  | [Reports](https://python-amazon-ad-api.readthedocs.io/en/latest/api/reports.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/offline-report-prod-3p) |
334
+ | [Target Promotion Groups](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/target_promotion_groups.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
335
+ | [Initial Budget Recommendation](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/budget_initial_recommendation.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
336
+ | [Keyword Group Targeting Recommendations](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/keyword_groups_recommendations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
337
+ | [Multi Country Recommendations](https://python-amazon-ad-api.readthedocs.io/en/latest/sp/global_recommendations.html) | [contract](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json) | [docs](https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod) |
334
338
 
335
339
  ### [Modules Available Sponsored Brands 3.0](https://python-amazon-ad-api.readthedocs.io/en/latest/sb_v3.html)
336
340
 
@@ -51,3 +51,46 @@ class Account(Client):
51
51
 
52
52
  body = Utils.convert_body(kwargs.pop('body'), wrap=False)
53
53
  return self._request(kwargs.pop('path'), data=body, params=kwargs, headers=headers)
54
+
55
+ @sp_endpoint('/termsTokens', method='POST')
56
+ def create_terms_token(self, **kwargs) -> ApiResponse:
57
+ r"""
58
+ create_terms_token(body: (dict, str)) -> ApiResponse
59
+
60
+ Create a new UUID terms token for the customer to accept advertising terms.
61
+
62
+ body: | Optional
63
+ | **accountId** (string) Optional account ID (Global Account or Manager Account) for accepting terms on existing accounts
64
+ | **termsType** (string) Enum: ADSP, ADVERTISING, MARKETING_CLOUD, PARTNER_NETWORK
65
+
66
+ Returns:
67
+
68
+ ApiResponse
69
+
70
+ """
71
+ schema_request = 'application/vnd.GlobalRegistrationService.TermsTokenResource.v1.0+json'
72
+ schema_response = 'application/vnd.termstokenresource.v1+json'
73
+ headers = {'Accept': schema_response, 'Content-Type': schema_request}
74
+
75
+ body = Utils.convert_body(kwargs.pop('body'), wrap=False)
76
+ return self._request(kwargs.pop('path'), data=body, params=kwargs, headers=headers)
77
+
78
+ @sp_endpoint('/termsTokens/{}', method='GET')
79
+ def get_terms_token(self, termsToken: str, **kwargs) -> ApiResponse:
80
+ r"""
81
+ get_terms_token(termsToken: str) -> ApiResponse
82
+
83
+ Get the terms token status for the customer.
84
+
85
+ path **termsToken**:string | Required. A Terms Token refers to an UUID token used for terms and conditions acceptance.
86
+
87
+ Returns:
88
+
89
+ ApiResponse
90
+
91
+ """
92
+ schema_response = 'application/vnd.termstokenresource.v1+json'
93
+ headers = {'Accept': schema_response, 'Content-Type': 'application/json'}
94
+
95
+ return self._request(fill_query_params(kwargs.pop('path'), termsToken), params=kwargs, headers=headers)
96
+
@@ -64,8 +64,7 @@ class Billing(Client):
64
64
  Query
65
65
 
66
66
  - ``criteriaType`` (string): required. ``PAY_NOW`` or ``AUTO_PAY``. The
67
- service answers ``400 Value null at 'criteriaType' failed to satisfy
68
- constraint`` when it is missing. It does not go in the body; this route
67
+ service answers ``400 Value null at 'criteriaType' failed to satisfy constraint`` when it is missing. It does not go in the body; this route
69
68
  takes no body.
70
69
 
71
70
  Returns
@@ -136,8 +135,7 @@ class Billing(Client):
136
135
  Query
137
136
 
138
137
  - ``agreementType`` (string): required. ``AUTO_PAY`` or ``PAY_NOW``. The
139
- service answers ``400 Value null at 'agreementType' failed to satisfy
140
- constraint`` when it is missing. It does not go in the body; this route
138
+ service answers ``400 Value null at 'agreementType' failed to satisfy constraint`` when it is missing. It does not go in the body; this route
141
139
  takes no body.
142
140
 
143
141
  Returns
@@ -219,8 +217,7 @@ class Billing(Client):
219
217
  - ``sort`` (object): ``attribute`` and ``direction``. The only
220
218
  attributes the service accepts are ``invoiceIssuedDate`` and
221
219
  ``invoiceDueDate``; anything else answers
222
- ``400 Invalid input because of error(s): [sort:attribute field is
223
- invalid]``. Those are the names the answer uses, not the filter names:
220
+ ``400 Invalid input because of error(s): [sort:attribute field is invalid]``. Those are the names the answer uses, not the filter names:
224
221
  ``invoiceDate``, ``issuedDate``, ``dueDate``, ``amountDue`` and
225
222
  ``status`` are all refused.
226
223
  - ``maxResults`` (integer): page size.
@@ -268,8 +265,7 @@ class Billing(Client):
268
265
  .. warning::
269
266
 
270
267
  The service refuses marketplace accounts. Called from a regional
271
- seller account it answers ``400 The API doesnot support marketplace
272
- accounts``. It wants a Global, Manager or Sponsored Ads account.
268
+ seller account it answers ``400 The API doesnot support marketplace accounts``. It wants a Global, Manager or Sponsored Ads account.
273
269
 
274
270
  Returns
275
271
  ApiResponse with the profiles and the token for the next page.
@@ -304,8 +300,7 @@ class Billing(Client):
304
300
  .. warning::
305
301
 
306
302
  Same account restriction as ``list_billing_profiles``, and the
307
- message names what it wants: ``only Global, Manager and Sponsored
308
- Ads marketplace accounts are supported``.
303
+ message names what it wants: ``only Global, Manager and Sponsored Ads marketplace accounts are supported``.
309
304
 
310
305
  Returns
311
306
  ApiResponse with one entry per country and profile pairing.
@@ -74,13 +74,9 @@ class Eligibility(Client):
74
74
  product: Sponsored Products, Sponsored Brands, Sponsored Display,
75
75
  Stores, DirectToConsumer, Amazon Attribution and the rest.
76
76
 
77
- Two media types are declared:
78
-
79
- application/json the default shape, with skipChecks
80
- application/vnd.programeligibility.v2+json
81
- v2, with maxResults and nextToken
82
-
83
- Pass media_type='v2' for the paginated one.
77
+ Two media types are declared: application/json is the default shape, with
78
+ skipChecks, and application/vnd.programeligibility.v2+json is the v2 one,
79
+ with maxResults and nextToken. Pass media_type='v2' for the paginated one.
84
80
  """
85
81
 
86
82
  media_type = kwargs.pop('media_type', None)
@@ -11,8 +11,7 @@ class BudgetRules(Client):
11
11
 
12
12
  .. note::
13
13
  ``budget_recommendations`` only answers with the versioned media type.
14
- Sending ``application/json`` makes the router answer ``404 Could not find
15
- resource``, as if the route did not exist. Amazon routes on media type.
14
+ Sending ``application/json`` makes the router answer ``404 Could not find resource``, as if the route did not exist. Amazon routes on media type.
16
15
 
17
16
  .. note::
18
17
  An unknown ``budgetRuleId`` answers ``400 InvalidParameterValue`` with
@@ -209,8 +208,7 @@ class BudgetRules(Client):
209
208
 
210
209
  .. warning::
211
210
  This route only answers with its versioned media type. With
212
- ``application/json`` the service answers ``404 Could not find
213
- resource``, which reads like a missing route but is only the wrong
211
+ ``application/json`` the service answers ``404 Could not find resource``, which reads like a missing route but is only the wrong
214
212
  media type.
215
213
  """
216
214
  return self._request(kwargs.pop('path'),
@@ -93,8 +93,7 @@ class CampaignsV4(Client):
93
93
 
94
94
  .. note::
95
95
  This route takes ``application/vnd.sbinsights.v4+json``, not the
96
- campaigns media type. With ``application/json`` it answers ``404
97
- Could not find resource``, so the versioned type is what routes it.
96
+ campaigns media type. With ``application/json`` it answers ``404 Could not find resource``, so the versioned type is what routes it.
98
97
 
99
98
  .. note::
100
99
  An empty body answers ``400`` naming ``adGroups``, which is the only
@@ -22,8 +22,7 @@ class Migration(Client):
22
22
  type; a wrong one reads exactly like a missing route.
23
23
 
24
24
  .. note::
25
- ``migration_job_status`` and ``migration_job_results`` answer ``500
26
- INTERNAL_ERROR`` for a job identifier that does not exist, instead of a
25
+ ``migration_job_status`` and ``migration_job_results`` answer ``500 INTERNAL_ERROR`` for a job identifier that does not exist, instead of a
27
26
  400 or a 404. The routes are live; the service trips over an unknown id.
28
27
  """
29
28
 
@@ -10,8 +10,7 @@ class OptimizationRules(Client):
10
10
  service routes on it:
11
11
 
12
12
  .. warning::
13
- With ``application/json`` the router answers ``404 Could not find
14
- resource`` on every route here, which reads like a missing route but is
13
+ With ``application/json`` the router answers ``404 Could not find resource`` on every route here, which reads like a missing route but is
15
14
  only the wrong media type. Verified on ``list`` and ``recommendations``.
16
15
 
17
16
  The two read routes were probed against a live account; the four write routes
@@ -18,6 +18,9 @@ from .budget_rules_recommendations import BudgetRulesRecommendations
18
18
  from .product_recommendations import ProductRecommendations
19
19
  from .campaigns_budget_usage import CampaignsBudgetUsage
20
20
  from .schedule_based_bid_optimization import ScheduleBasedBidOptimizationRules
21
+ from .target_promotion_groups import TargetPromotionGroups
22
+ from .keyword_groups_recommendations import KeywordGroupsRecommendations
23
+ from .global_recommendations import GlobalRecommendations
21
24
 
22
25
  __all__ = [
23
26
  "CampaignsV3",
@@ -40,4 +43,7 @@ __all__ = [
40
43
  "ProductRecommendations",
41
44
  "CampaignsBudgetUsage",
42
45
  "ScheduleBasedBidOptimizationRules",
46
+ "TargetPromotionGroups",
47
+ "KeywordGroupsRecommendations",
48
+ "GlobalRecommendations",
43
49
  ]
@@ -0,0 +1,47 @@
1
+ from ad_api.base import Client, sp_endpoint, ApiResponse, Utils
2
+
3
+
4
+ class InitialBudgetRecommendation(Client):
5
+ @sp_endpoint('/sp/campaigns/initialBudgetRecommendation', method='POST')
6
+ def initial_campaign_budget_recommendation(self, **kwargs) -> ApiResponse:
7
+ r"""
8
+ Creates a daily budget recommendation, with benchmark metrics, while
9
+ creating a new campaign. Nothing is created and nothing is charged.
10
+
11
+ The path carries a capital B: initialBudgetRecommendation. Spelled in
12
+ lower case the gateway does not recognise the route and answers 403
13
+ IncompleteSignatureException, so the case matters here.
14
+
15
+ Request Body [Required]
16
+ | **adGroups** (array): exactly one ad group.
17
+ | **asins** (array): [required] 1 to 50 ASINs.
18
+ | **targetingExpressions** (array): [required] 1 to 100.
19
+ | **type** (string): [required] CLOSE_MATCH, COMPLEMENTS,
20
+ | KEYWORD_BROAD_MATCH, KEYWORD_EXACT_MATCH, KEYWORD_PHRASE_MATCH,
21
+ | LOOSE_MATCH or SUBSTITUTES.
22
+ | **value** (string): [required] must be empty when targetingType
23
+ | is auto. The service rejects a non-empty value with
24
+ | "Targeting expression's value should be empty for auto".
25
+ | **bid** (number): [required] the service rejects a null bid with
26
+ | "TargetingExpression bid cannot be null", even though the
27
+ | contract does not declare it.
28
+ | **bidding** (object): [required]
29
+ | **strategy** (string): [required] AUTO_FOR_SALES,
30
+ | LEGACY_FOR_SALES or MANUAL.
31
+ | **adjustments** (array): up to 2 placement adjustments.
32
+ | **targetingType** (string): [required] auto or manual.
33
+ | **startDate** (string): YYYYMMDD.
34
+ | **endDate** (string): YYYYMMDD.
35
+
36
+ Returns:
37
+ ApiResponse
38
+ dailyBudget, recommendationId, benchmark and specialEvents.
39
+ A dailyBudget of -1 means there is not enough information to
40
+ produce a recommendation.
41
+
42
+ """
43
+
44
+ json_version = 'application/vnd.spinitialbudgetrecommendation.v3.4+json'
45
+
46
+ headers = {"Accept": json_version, "Content-Type": json_version}
47
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
@@ -244,3 +244,44 @@ class BudgetRules(Client):
244
244
 
245
245
  """
246
246
  return self._request(fill_query_params(kwargs.pop('path'), budgetRuleId), params=kwargs)
247
+
248
+ @sp_endpoint('/sp/budgetRulesAssociation', method='POST')
249
+ def associate_budget_rules(self, **kwargs) -> ApiResponse:
250
+ r"""
251
+ Associates budget rules to one or more campaigns.
252
+
253
+ A maximum of 250 rules can be associated to a campaign, and each rule
254
+ name associated to a campaign must be unique.
255
+
256
+ Request Body [Required]
257
+ | **budgetRulesAssociations** (array): up to 50 items.
258
+ | **budgetRuleId** (string): [required] The rule identifier.
259
+ | **campaignId** (string): [required] The campaign identifier.
260
+
261
+ Returns:
262
+
263
+ ApiResponse
264
+
265
+ """
266
+ json_version = 'application/json'
267
+ headers = {"Accept": json_version, "Content-Type": json_version}
268
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
269
+
270
+ @sp_endpoint('/sp/budgetRulesAssociation/delete', method='POST')
271
+ def disassociate_budget_rules(self, **kwargs) -> ApiResponse:
272
+ r"""
273
+ Disassociates budget rules from one or more campaigns.
274
+
275
+ Request Body [Required]
276
+ | **budgetRulesDisAssociations** (array): up to 50 items.
277
+ | **budgetRuleId** (string): [required] The rule identifier.
278
+ | **campaignId** (string): [required] The campaign identifier.
279
+
280
+ Returns:
281
+
282
+ ApiResponse
283
+
284
+ """
285
+ json_version = 'application/json'
286
+ headers = {"Accept": json_version, "Content-Type": json_version}
287
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
@@ -0,0 +1,44 @@
1
+ from ad_api.base import Client, sp_endpoint, ApiResponse, Utils
2
+
3
+
4
+ class BudgetRulesRecommendations(Client):
5
+ @sp_endpoint('/sp/campaigns/budgetRules/recommendations', method='POST')
6
+ def list_campaigns_budget_rules_recommendations(self, version: int = 3, **kwargs) -> ApiResponse:
7
+ r"""
8
+ Gets a list of special events with suggested date range and suggested budget increase for a campaign specified by identifier.
9
+
10
+ Request Body (required)
11
+ | SPBudgetRulesRecommendationEventRequest {
12
+ | **campaignId**\* (string) The campaign identifier.
13
+ | }
14
+ Returns
15
+ ApiResponse
16
+ """
17
+ contentType = 'application/vnd.spbudgetrulesrecommendation.v' + str(version) + '+json'
18
+ headers = {'Content-Type': contentType, "Accept": contentType}
19
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
20
+
21
+ @sp_endpoint('/sp/v1/events', method='POST')
22
+ def list_rule_events(self, **kwargs) -> ApiResponse:
23
+ r"""
24
+ Gets every special event, individual and grouped, with the date range
25
+ suggested for each one.
26
+
27
+ A rule enables an automatic budget increase for a date range or for a
28
+ special event; this route is what tells you which events exist and
29
+ when, so a rule can point at one.
30
+
31
+ The body is empty and, unusually for this resource, the content type is
32
+ plain application/json rather than one of the application/vnd.sp...
33
+ types.
34
+
35
+ Returns:
36
+
37
+ ApiResponse
38
+ events and groupedEvents, each with its suggested date range.
39
+
40
+ """
41
+ json_version = 'application/json'
42
+
43
+ headers = {"Accept": json_version, "Content-Type": json_version}
44
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body', {}), False), params=kwargs, headers=headers)
@@ -0,0 +1,49 @@
1
+ from ad_api.base import Client, sp_endpoint, ApiResponse, Utils
2
+
3
+
4
+ class CampaignsRecommendations(Client):
5
+ @sp_endpoint('/sp/campaign/recommendations', method='GET')
6
+ def list_campaigns_recommendations(self, **kwargs) -> ApiResponse:
7
+ r"""
8
+ Gets the top consolidated recommendations across bid, budget, targeting for SP campaigns given an advertiser profile id. The recommendations are refreshed everyday.
9
+
10
+ Param:
11
+ | query **nextToken** (string). Optional. Token to retrieve subsequent page of results.
12
+ | query **maxResults** (string). Optional. Limits the number of items to return in the response.
13
+
14
+ Returns:
15
+
16
+ ApiResponse
17
+
18
+ """
19
+ return self._request(kwargs.pop('path'), params=kwargs)
20
+
21
+ @sp_endpoint('/sp/campaign/recommendations', method='POST')
22
+ def fetch_campaigns_recommendations(self, **kwargs) -> ApiResponse:
23
+ r"""
24
+ Gets the top consolidated recommendations for the campaigns named in the
25
+ body, one recommendation type per campaign. Refreshed every day.
26
+
27
+ The GET on the same path takes no body and returns every recommendation
28
+ the account has; this POST narrows it to the campaigns and types asked
29
+ for. It uses its own content type, v2, where the GET uses v1.
30
+
31
+ Request Body [Required]
32
+ | **campaigns** (array): 1 to 10 campaigns.
33
+ | **campaignId** (string): [required] The campaign identifier.
34
+ | **recommendationType** (string): [required] one of
35
+ | BIDDING_STRATEGY, BUDGET_STRATEGY, KEYWORD, KEYWORD_GROUP,
36
+ | PLACEMENT_BIDDING, SHOPPER_COHORT.
37
+ | **maxResults** (integer): 1 to 5. Defaults to 1.
38
+ | **nextToken** (string): Token for the next page.
39
+
40
+ Returns:
41
+
42
+ ApiResponse
43
+
44
+ """
45
+ json_version = 'application/vnd.spgetcampaignrecommendationsrequest.v2+json'
46
+ response_version = 'application/vnd.spgetcampaignrecommendationsresponse.v2+json'
47
+
48
+ headers = {"Accept": response_version, "Content-Type": json_version}
49
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
@@ -0,0 +1,97 @@
1
+ from ad_api.base import Client, sp_endpoint, ApiResponse, Utils
2
+
3
+
4
+ class GlobalRecommendations(Client):
5
+ r"""
6
+ Amazon Ads API - Sponsored Products recommendations across marketplaces.
7
+
8
+ These two routes answer for several countries at once, given the same
9
+ product or the same ad group in each of them, where the per-marketplace
10
+ routes answer for one country.
11
+
12
+ Both are version 5 of the same idea and both take a recommendationType
13
+ that decides which of two request shapes is expected:
14
+
15
+ BIDS_FOR_NEW_AD_GROUP / KEYWORDS_FOR_ASINS
16
+ a list of products, one per country
17
+ BIDS_FOR_EXISTING_AD_GROUP / KEYWORDS_FOR_ADGROUP
18
+ a campaign and ad group that already exist
19
+ """
20
+
21
+ @sp_endpoint('/sp/global/targets/bid/recommendations', method='POST')
22
+ def get_multi_country_bid_recommendations(self, **kwargs) -> ApiResponse:
23
+ r"""
24
+ Recommends bids for targets across several countries.
25
+
26
+ Two request shapes, chosen by recommendationType:
27
+
28
+ BIDS_FOR_EXISTING_AD_GROUP
29
+ adGroupId, campaignId, targetingExpressions, countryCodes.
30
+ BIDS_FOR_NEW_AD_GROUP
31
+ bidding, countryCodes, targetingExpressions, products.
32
+ No adGroupId and no campaignId, the ad group does not exist yet.
33
+
34
+ Request Body [Required]
35
+ | **recommendationType** (string): [required] one of the two above.
36
+ | **countryCodes** (array): target countries. Required by the
37
+ | new-ad-group shape.
38
+ | **targetingExpressions** (array): required by both shapes.
39
+ | **includeAnalysis** (boolean): defaults to false. Set it to true to
40
+ | get the estimated impressions for a range of eight bids per
41
+ | target. The contract says the analysis is only available for
42
+ | existing ad groups in the US marketplace.
43
+ | **adGroupId** (string): existing ad group only.
44
+ | **campaignId** (string): existing ad group only.
45
+ | **products** (array): new ad group only, a list of countryProducts.
46
+ | **bidding** (object): new ad group only.
47
+ | **strategy** (string): [required] the bidding strategy.
48
+ | **adjustments** (array): 1 to 3 placement adjustments.
49
+
50
+ A 422 comes back when the marketplace or the target is not supported.
51
+
52
+ Returns:
53
+
54
+ ApiResponse
55
+
56
+ """
57
+ json_version = 'application/json'
58
+ response_version = 'application/vnd.spthemebasedglobalbidrecommendation.v1+json'
59
+
60
+ headers = {"Accept": response_version, "Content-Type": json_version}
61
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
62
+
63
+ @sp_endpoint('/sp/global/targets/keywords/recommendations/list', method='POST')
64
+ def list_multi_country_keyword_recommendations(self, **kwargs) -> ApiResponse:
65
+ r"""
66
+ Recommends keyword targets, with their bids, across several countries.
67
+
68
+ Two request shapes, chosen by recommendationType:
69
+
70
+ KEYWORDS_FOR_ASINS
71
+ products, a list of countryProducts where each item maps a
72
+ two-letter country code to a product.
73
+ KEYWORDS_FOR_ADGROUP
74
+ adGroupId and campaignId of a global campaign and ad group.
75
+
76
+ Request Body [Required]
77
+ | **recommendationType** (string): [required] KEYWORDS_FOR_ASINS or
78
+ | KEYWORDS_FOR_ADGROUP.
79
+ | **products** (array): up to 50 countryProducts.
80
+ | **targets** (array): up to 100 countryTargets. Each one is an
81
+ | object with matchType and countryKeywords, a map from a
82
+ | two-letter country code to a keyword object.
83
+ | **adGroupId** (string): global ad group, second shape only.
84
+ | **campaignId** (string): global campaign, second shape only.
85
+
86
+ Each country is processed in parallel with the rules of version 5 of the
87
+ per-marketplace keyword recommendation route.
88
+
89
+ Returns:
90
+
91
+ ApiResponse
92
+
93
+ """
94
+ json_version = 'application/vnd.spkeywordsrecommendation.v5+json'
95
+
96
+ headers = {"Accept": json_version, "Content-Type": json_version}
97
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
@@ -0,0 +1,34 @@
1
+ from ad_api.base import Client, sp_endpoint, ApiResponse, Utils
2
+
3
+
4
+ class KeywordGroupsRecommendations(Client):
5
+ r"""
6
+ Amazon Ads API - Sponsored Products keyword group recommendations.
7
+
8
+ Keyword Groups is a control for keyword-based campaigns: a collection of
9
+ keywords that reaches a relevant audience as one unit. Once a keyword group
10
+ is created its performance shows up in the search terms report.
11
+
12
+ The route is in beta.
13
+ """
14
+
15
+ @sp_endpoint('/sp/targeting/recommendations/keywordGroups', method='POST')
16
+ def get_keyword_group_recommendations(self, **kwargs) -> ApiResponse:
17
+ r"""
18
+ Recommends keyword group targets for a list of ad ASINs.
19
+
20
+ Request Body [Required]
21
+ | **asins** (array): [required] 1 to 1000 ASINs, 32 characters each.
22
+ | **countryCode** (string): origin country of the ASIN list, used to
23
+ | generate the recommendations.
24
+ | **nextToken** (string): set when the previous answer had more items.
25
+
26
+ Returns:
27
+
28
+ ApiResponse
29
+
30
+ """
31
+ json_version = 'application/vnd.spkeywordgroupsrecommendations.v1.0+json'
32
+
33
+ headers = {"Accept": json_version, "Content-Type": json_version}
34
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)