python-amazon-ad-api 2.0.0__tar.gz → 2.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/PKG-INFO +1 -1
  2. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/billing.py +5 -10
  3. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/eligibility.py +3 -7
  4. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sb/budget_rules.py +2 -4
  5. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sb/campaigns_v4.py +1 -2
  6. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sb/migration.py +1 -2
  7. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sb/optimization_rules.py +1 -2
  8. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sp/__init__.py +6 -0
  9. python_amazon_ad_api-2.0.1/ad_api/api/sp/budget_initial_recommendation.py +47 -0
  10. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sp/budget_rules.py +41 -0
  11. python_amazon_ad_api-2.0.1/ad_api/api/sp/budget_rules_recommendations.py +44 -0
  12. python_amazon_ad_api-2.0.1/ad_api/api/sp/campaign_consolidated_recommendations.py +49 -0
  13. python_amazon_ad_api-2.0.1/ad_api/api/sp/global_recommendations.py +97 -0
  14. python_amazon_ad_api-2.0.1/ad_api/api/sp/keyword_groups_recommendations.py +34 -0
  15. python_amazon_ad_api-2.0.1/ad_api/api/sp/target_promotion_groups.py +141 -0
  16. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/v1/ad_groups.py +5 -7
  17. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/v1/advertiser_accounts.py +3 -3
  18. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/v1/brand_store_edition_publish_versions.py +1 -2
  19. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/v1/brand_store_pages.py +1 -1
  20. python_amazon_ad_api-2.0.1/ad_api/version.py +1 -0
  21. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/python_amazon_ad_api.egg-info/PKG-INFO +1 -1
  22. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/python_amazon_ad_api.egg-info/SOURCES.txt +3 -0
  23. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/setup.cfg +1 -1
  24. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/setup.py +1 -1
  25. python_amazon_ad_api-2.0.0/ad_api/api/sp/budget_initial_recommendation.py +0 -10
  26. python_amazon_ad_api-2.0.0/ad_api/api/sp/budget_rules_recommendations.py +0 -19
  27. python_amazon_ad_api-2.0.0/ad_api/api/sp/campaign_consolidated_recommendations.py +0 -19
  28. python_amazon_ad_api-2.0.0/ad_api/version.py +0 -1
  29. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/LICENSE +0 -0
  30. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/README.md +0 -0
  31. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/__init__.py +0 -0
  32. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/__init__.py +0 -0
  33. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/account.py +0 -0
  34. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/account_budgets.py +0 -0
  35. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/advertising_test_account.py +0 -0
  36. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/attribution.py +0 -0
  37. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/audiences.py +0 -0
  38. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/brand_metrics.py +0 -0
  39. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/creative_assets.py +0 -0
  40. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/exports.py +0 -0
  41. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/history.py +0 -0
  42. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/insights.py +0 -0
  43. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/localization.py +0 -0
  44. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/manager_accounts.py +0 -0
  45. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/metadata.py +0 -0
  46. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/portfolios.py +0 -0
  47. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/portfolios_v3.py +0 -0
  48. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/profiles.py +0 -0
  49. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/recommendations.py +0 -0
  50. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/reports.py +0 -0
  51. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sb/__init__.py +0 -0
  52. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sb/ad_creatives_v4.py +0 -0
  53. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sb/ad_groups.py +0 -0
  54. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sb/ad_groups_v4.py +0 -0
  55. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sb/ads_v4.py +0 -0
  56. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sb/benchmarks.py +0 -0
  57. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sb/bid_recommendations.py +0 -0
  58. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sb/brands.py +0 -0
  59. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sb/campaigns.py +0 -0
  60. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sb/forecast.py +0 -0
  61. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sb/keywords.py +0 -0
  62. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sb/keywords_recommendations.py +0 -0
  63. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sb/landing_page_asins.py +0 -0
  64. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sb/media.py +0 -0
  65. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sb/negative_keywords.py +0 -0
  66. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sb/negative_product_targeting.py +0 -0
  67. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sb/product_targeting.py +0 -0
  68. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sb/recommendations.py +0 -0
  69. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sb/reports.py +0 -0
  70. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sb/stores.py +0 -0
  71. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sb/targeting_categories.py +0 -0
  72. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sb/targeting_recommendations.py +0 -0
  73. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sb/themes.py +0 -0
  74. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sd/__init__.py +0 -0
  75. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sd/ad_groups.py +0 -0
  76. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sd/bid_recommendations.py +0 -0
  77. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sd/brand_safety.py +0 -0
  78. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sd/budget_rules.py +0 -0
  79. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sd/campaigns.py +0 -0
  80. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sd/campaigns_budget_usage.py +0 -0
  81. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sd/creatives.py +0 -0
  82. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sd/forecast.py +0 -0
  83. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sd/negative_product_targeting.py +0 -0
  84. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sd/product_ads.py +0 -0
  85. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sd/product_targeting.py +0 -0
  86. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sd/recommendations.py +0 -0
  87. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sd/reports.py +0 -0
  88. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sd/snapshots.py +0 -0
  89. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sd/targeting_recommendations.py +0 -0
  90. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sp/ad_groups_v3.py +0 -0
  91. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sp/bid_recommendations_v3.py +0 -0
  92. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sp/budget_recommendations.py +0 -0
  93. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/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.1}/ad_api/api/sp/campaign_negative_targets.py +0 -0
  95. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sp/campaigns_budget_usage.py +0 -0
  96. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sp/campaigns_v3.py +0 -0
  97. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sp/campaings_optimization.py +0 -0
  98. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sp/keywords_v3.py +0 -0
  99. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sp/negative_keywords_v3.py +0 -0
  100. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/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.1}/ad_api/api/sp/product_ads_v3.py +0 -0
  102. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sp/product_recommendations.py +0 -0
  103. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sp/product_targeting_v3.py +0 -0
  104. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/sp/ranked_keywords_recommendations.py +0 -0
  105. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/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.1}/ad_api/api/stores.py +0 -0
  107. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/stream.py +0 -0
  108. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/v1/__init__.py +0 -0
  109. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/v1/ad_associations.py +0 -0
  110. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/v1/ad_extensions.py +0 -0
  111. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/v1/ads.py +0 -0
  112. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/v1/brand_store_editions.py +0 -0
  113. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/v1/brand_stores.py +0 -0
  114. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/v1/campaigns.py +0 -0
  115. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/v1/geo_locations.py +0 -0
  116. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/v1/label_object_associations.py +0 -0
  117. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/v1/labels.py +0 -0
  118. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/v1/location_indexes.py +0 -0
  119. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/v1/manager_accounts.py +0 -0
  120. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/v1/portfolios.py +0 -0
  121. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/v1/recommendation_types.py +0 -0
  122. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/v1/recommendations.py +0 -0
  123. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/v1/reports.py +0 -0
  124. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/v1/selling_accounts.py +0 -0
  125. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/v1/targets.py +0 -0
  126. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/api/validation_configurations.py +0 -0
  127. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/auth/__init__.py +0 -0
  128. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/auth/access_token_client.py +0 -0
  129. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/auth/access_token_response.py +0 -0
  130. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/auth/credentials.py +0 -0
  131. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/auth/exceptions.py +0 -0
  132. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/base/__init__.py +0 -0
  133. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/base/api_response.py +0 -0
  134. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/base/client.py +0 -0
  135. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/base/config.py +0 -0
  136. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/base/credential_provider.py +0 -0
  137. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/base/exceptions.py +0 -0
  138. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/base/helpers.py +0 -0
  139. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/base/marketplaces.py +0 -0
  140. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/base/utils.py +0 -0
  141. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/shared/__init__.py +0 -0
  142. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/ad_api/shared/base_client.py +0 -0
  143. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/pyproject.toml +0 -0
  144. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/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.1}/python_amazon_ad_api.egg-info/requires.txt +0 -0
  146. {python_amazon_ad_api-2.0.0 → python_amazon_ad_api-2.0.1}/python_amazon_ad_api.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-amazon-ad-api
3
- Version: 2.0.0
3
+ Version: 2.0.1
4
4
  Summary: Python wrapper for the Amazon Advertising API
5
5
  Home-page: https://github.com/denisneuf/python-amazon-ad-api
6
6
  Author: Daniel Alvaro
@@ -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)
@@ -0,0 +1,141 @@
1
+ from ad_api.base import Client, sp_endpoint, ApiResponse, Utils
2
+
3
+
4
+ class TargetPromotionGroups(Client):
5
+ r"""
6
+ Amazon Ads API - Sponsored Products target promotion groups.
7
+
8
+ A target promotion group ties one auto-targeting ad group to the manual
9
+ ad groups that receive the targets promoted out of it: one keyword
10
+ targeting ad group and one product targeting ad group. The auto ad group
11
+ discovers search terms, the manual ad groups carry the promoted targets.
12
+ """
13
+
14
+ @sp_endpoint('/sp/targetPromotionGroups/list', method='POST')
15
+ def list_target_promotion_groups(self, version: int = 1, **kwargs) -> ApiResponse:
16
+ r"""
17
+ list_target_promotion_groups(body: (dict, str)) -> ApiResponse
18
+
19
+ Returns the target promotion groups of an advertiser, and optionally
20
+ of one ad group or one target promotion group.
21
+
22
+ Request Body [optional]
23
+ | **adGroupIdFilter** (object): Ad group identifiers to filter by.
24
+ | **include** (array of string)
25
+ | **targetPromotionGroupIdFilter** (object): Target promotion group identifiers.
26
+ | **include** (array of string)
27
+ | **maxResults** (int): 1 to 1000. Defaults to 1000.
28
+ | **nextToken** (string): Token for the next page.
29
+
30
+ Returns:
31
+ ApiResponse
32
+ """
33
+
34
+ json_version = "application/vnd.sptargetpromotiongroup.v" + str(version) + "+json"
35
+
36
+ headers = {"Accept": json_version, "Content-Type": json_version}
37
+
38
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body', {}), False), params=kwargs, headers=headers)
39
+
40
+ @sp_endpoint('/sp/targetPromotionGroups/targets/list', method='POST')
41
+ def list_target_promotion_group_targets(self, version: int = 1, **kwargs) -> ApiResponse:
42
+ r"""
43
+ list_target_promotion_group_targets(body: (dict, str)) -> ApiResponse
44
+
45
+ Returns the targets created through target promotion groups, for an
46
+ advertiser and optionally for one target promotion group.
47
+
48
+ Request Body [optional]
49
+ | **adGroupIdFilter** (object)
50
+ | **include** (array of string)
51
+ | **targetPromotionGroupIdFilter** (object)
52
+ | **include** (array of string)
53
+ | **maxResults** (int): 1 to 1000. Defaults to 1000.
54
+ | **nextToken** (string): Token for the next page.
55
+
56
+ Returns:
57
+ ApiResponse
58
+ """
59
+
60
+ json_version = "application/vnd.sptargetpromotiongrouptarget.v" + str(version) + "+json"
61
+
62
+ headers = {"Accept": json_version, "Content-Type": json_version}
63
+
64
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body', {}), False), params=kwargs, headers=headers)
65
+
66
+ @sp_endpoint('/sp/targetPromotionGroups/recommendations', method='POST')
67
+ def get_target_promotion_groups_recommendations(self, **kwargs) -> ApiResponse:
68
+ r"""
69
+ get_target_promotion_groups_recommendations(body: (dict, str)) -> ApiResponse
70
+
71
+ Retrieves keyword and product targets of an auto-targeting campaign as
72
+ recommendations for promoting them to a manual-targeting campaign, based
73
+ on performance heuristics of those targets.
74
+
75
+ Request Body [optional]
76
+ | **adGroupIdFilter** (object)
77
+ | **include** (array of string)
78
+ | **adIdFilter** (object)
79
+ | **include** (array of string)
80
+ | **campaignIdFilter** (object)
81
+ | **include** (array of string)
82
+ | **maxResults** (int): 1 to 1000. Defaults to 1000.
83
+ | **nextToken** (string): Token for the next page.
84
+
85
+ Returns:
86
+ ApiResponse
87
+ """
88
+
89
+ json_version = "application/vnd.spTargetPromotionGroupsRecommendations.v1+json"
90
+
91
+ headers = {"Accept": json_version, "Content-Type": json_version}
92
+
93
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body', {}), False), params=kwargs, headers=headers)
94
+
95
+ @sp_endpoint('/sp/targetPromotionGroups', method='POST')
96
+ def create_target_promotion_groups(self, version: int = 1, **kwargs) -> ApiResponse:
97
+ r"""
98
+ create_target_promotion_groups(body: (dict, str)) -> ApiResponse
99
+
100
+ Creates a target promotion group, grouping the auto-targeting ad group
101
+ with the manual keyword targeting ad group and the manual product
102
+ targeting ad group.
103
+
104
+ Request Body [required]
105
+ | **adGroupId** (string): Source ad group of the auto-targeting campaign.
106
+ | **adIds** (array of string): Product ads of that ad group. All the
107
+ | product ads are used when the list is omitted.
108
+ | **existingCampaignDetails** (object): Existing manual ad groups.
109
+ | **newCampaignDetails** (object): Manual campaigns and ad groups to create.
110
+
111
+ Returns:
112
+ ApiResponse
113
+ """
114
+
115
+ json_version = "application/vnd.sptargetpromotiongroup.v" + str(version) + "+json"
116
+
117
+ headers = {"Accept": json_version, "Content-Type": json_version}
118
+
119
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
120
+
121
+ @sp_endpoint('/sp/targetPromotionGroups/targets', method='POST')
122
+ def create_target_promotion_group_targets(self, version: int = 1, **kwargs) -> ApiResponse:
123
+ r"""
124
+ create_target_promotion_group_targets(body: (dict, str)) -> ApiResponse
125
+
126
+ Creates keyword and/or product targets in the manual ad group that is
127
+ part of the target promotion group.
128
+
129
+ Request Body [required]
130
+ | **targetPromotionGroupId** (string): Where the targets are added.
131
+ | **targets** (array): Up to 1000 targets.
132
+
133
+ Returns:
134
+ ApiResponse
135
+ """
136
+
137
+ json_version = "application/vnd.sptargetpromotiongrouptarget.v" + str(version) + "+json"
138
+
139
+ headers = {"Accept": json_version, "Content-Type": json_version}
140
+
141
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
@@ -47,13 +47,11 @@ class AdGroups(Client):
47
47
 
48
48
  Measured on 2026-11-15 against a global advertiser (eleven
49
49
  marketplaces). The Scope header this client already sends filters the
50
- results by marketplace, and neither of the two above improves on it:
51
-
52
- no account header 200, same page as manager
53
- manager_account_id 200, identical answer
54
- account_id 400 "Multi marketplace query requests only
55
- support query by primary resource id"
56
- both 400, the same as account_id alone
50
+ results by marketplace, and neither of the two above improves on it.
51
+ Sending no account header answers 200 with the same page as sending
52
+ manager_account_id, which is identical. Sending account_id answers 400
53
+ "Multi marketplace query requests only support query by primary resource
54
+ id", and sending both answers the same 400 as account_id alone.
57
55
 
58
56
  So on a global account pass manager_account_id or nothing: account_id
59
57
  breaks the call. Adding campaignIdFilter does not fix it, the refusal
@@ -15,7 +15,7 @@ class AdvertiserAccounts(Client):
15
15
  mutable: currency, time zone, display name, industry, manager link.
16
16
 
17
17
  Unlike Ads, Targets or AdExtensions this is not an ad-product resource, so
18
- there is no ``adProductFilter```; querying is by ``advertiserAccountIdFilter``
18
+ there is no ``adProductFilter``; querying is by ``advertiserAccountIdFilter``
19
19
  or ``isGlobalAccountFilter``.
20
20
 
21
21
  ``managerAccountId`` decides what the account can run: without it the account
@@ -62,9 +62,9 @@ class AdvertiserAccounts(Client):
62
62
  | **businessDetails** (list, exactly 1) [required]
63
63
  Carries either ``addressToken`` for an existing selling account
64
64
  address, or ``address`` when that account has none. Also accepts
65
- ``businessRegistrationNumber`` and ``website`.
65
+ ``businessRegistrationNumber`` and ``website``.
66
66
  | **currencyCode** (string) [optional] Enum of 34 ISO codes,
67
- including ``EUR``, ``USD``, ``GBP`
67
+ including ``EUR``, ``USD``, ``GBP``
68
68
  | **displayName** (string) [optional] name shown for the account
69
69
  | **industryVertical** (string) [optional] Enum of 19 sectors
70
70
  | **isGlobalAccount** (boolean) [optional]