python-amazon-ad-api 0.9.9__tar.gz → 1.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 (135) hide show
  1. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/PKG-INFO +9 -5
  2. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/README.md +8 -4
  3. python_amazon_ad_api-1.0.1/ad_api/api/v1/__init__.py +7 -0
  4. python_amazon_ad_api-1.0.1/ad_api/api/v1/ad_groups.py +201 -0
  5. python_amazon_ad_api-1.0.1/ad_api/api/v1/campaigns.py +180 -0
  6. python_amazon_ad_api-1.0.1/ad_api/version.py +1 -0
  7. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/python_amazon_ad_api.egg-info/PKG-INFO +9 -5
  8. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/python_amazon_ad_api.egg-info/SOURCES.txt +3 -0
  9. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/setup.cfg +1 -1
  10. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/setup.py +2 -1
  11. python_amazon_ad_api-0.9.9/ad_api/version.py +0 -1
  12. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/LICENSE +0 -0
  13. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/__init__.py +0 -0
  14. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/__init__.py +0 -0
  15. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/account.py +0 -0
  16. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/advertising_test_account.py +0 -0
  17. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/attribution.py +0 -0
  18. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/audiences.py +0 -0
  19. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/billing.py +0 -0
  20. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/brand_metrics.py +0 -0
  21. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/creative_assets.py +0 -0
  22. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/dsp/__init__.py +0 -0
  23. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/dsp/access_token_client.py +0 -0
  24. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/dsp/client.py +0 -0
  25. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/dsp/credential_provider.py +0 -0
  26. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/dsp/reports.py +0 -0
  27. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/eligibility.py +0 -0
  28. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/exports.py +0 -0
  29. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/history.py +0 -0
  30. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/insights.py +0 -0
  31. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/invoices.py +0 -0
  32. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/localization.py +0 -0
  33. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/manager_accounts.py +0 -0
  34. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/metadata.py +0 -0
  35. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/portfolios.py +0 -0
  36. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/portfolios_v3.py +0 -0
  37. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/profiles.py +0 -0
  38. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/recommendations.py +0 -0
  39. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/reports.py +0 -0
  40. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sb/__init__.py +0 -0
  41. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sb/ad_creatives_v4.py +0 -0
  42. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sb/ad_groups.py +0 -0
  43. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sb/ad_groups_v4.py +0 -0
  44. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sb/ads_v4.py +0 -0
  45. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sb/benchmarks.py +0 -0
  46. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sb/bid_recommendations.py +0 -0
  47. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sb/brands.py +0 -0
  48. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sb/campaigns.py +0 -0
  49. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sb/campaigns_v4.py +0 -0
  50. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sb/forecast.py +0 -0
  51. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sb/keywords.py +0 -0
  52. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sb/keywords_recommendations.py +0 -0
  53. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sb/landing_page_asins.py +0 -0
  54. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sb/media.py +0 -0
  55. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sb/moderation.py +0 -0
  56. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sb/negative_keywords.py +0 -0
  57. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sb/negative_product_targeting.py +0 -0
  58. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sb/product_targeting.py +0 -0
  59. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sb/recommendations.py +0 -0
  60. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sb/reports.py +0 -0
  61. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sb/snapshots.py +0 -0
  62. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sb/stores.py +0 -0
  63. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sb/targeting_recommendations.py +0 -0
  64. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sb/themes.py +0 -0
  65. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sd/__init__.py +0 -0
  66. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sd/ad_groups.py +0 -0
  67. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sd/bid_recommendations.py +0 -0
  68. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sd/brand_safety.py +0 -0
  69. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sd/budget_rules.py +0 -0
  70. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sd/campaigns.py +0 -0
  71. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sd/campaigns_budget_usage.py +0 -0
  72. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sd/creatives.py +0 -0
  73. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sd/forecast.py +0 -0
  74. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sd/negative_product_targeting.py +0 -0
  75. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sd/product_ads.py +0 -0
  76. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sd/product_targeting.py +0 -0
  77. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sd/recommendations.py +0 -0
  78. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sd/reports.py +0 -0
  79. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sd/snapshots.py +0 -0
  80. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sd/targeting_recommendations.py +0 -0
  81. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/__init__.py +0 -0
  82. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/ad_groups.py +0 -0
  83. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/ad_groups_v3.py +0 -0
  84. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/bid_recommendations.py +0 -0
  85. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/bid_recommendations_v3.py +0 -0
  86. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/budget_initial_recommendation.py +0 -0
  87. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/budget_recommendations.py +0 -0
  88. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/budget_rules.py +0 -0
  89. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/budget_rules_recommendations.py +0 -0
  90. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/campaign_consolidated_recommendations.py +0 -0
  91. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/campaign_negative_keywords.py +0 -0
  92. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/campaign_negative_keywords_v3.py +0 -0
  93. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/campaign_negative_targets.py +0 -0
  94. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/campaigns.py +0 -0
  95. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/campaigns_budget_usage.py +0 -0
  96. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/campaigns_v3.py +0 -0
  97. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/campaings_optimization.py +0 -0
  98. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/keywords.py +0 -0
  99. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/keywords_v3.py +0 -0
  100. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/negative_keywords.py +0 -0
  101. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/negative_keywords_v3.py +0 -0
  102. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/negative_product_targeting.py +0 -0
  103. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/negative_product_targeting_v3.py +0 -0
  104. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/product_ads.py +0 -0
  105. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/product_ads_v3.py +0 -0
  106. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/product_recommendations.py +0 -0
  107. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/product_targeting.py +0 -0
  108. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/product_targeting_v3.py +0 -0
  109. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/ranked_keywords_recommendations.py +0 -0
  110. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/reports.py +0 -0
  111. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/schedule_based_bid_optimization.py +0 -0
  112. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/snapshots.py +0 -0
  113. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/sp/suggested_keywords.py +0 -0
  114. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/stores.py +0 -0
  115. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/stream.py +0 -0
  116. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/api/validation_configurations.py +0 -0
  117. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/auth/__init__.py +0 -0
  118. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/auth/access_token_client.py +0 -0
  119. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/auth/access_token_response.py +0 -0
  120. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/auth/credentials.py +0 -0
  121. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/auth/exceptions.py +0 -0
  122. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/base/__init__.py +0 -0
  123. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/base/api_response.py +0 -0
  124. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/base/base_client.py +0 -0
  125. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/base/client.py +0 -0
  126. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/base/config.py +0 -0
  127. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/base/credential_provider.py +0 -0
  128. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/base/exceptions.py +0 -0
  129. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/base/helpers.py +0 -0
  130. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/base/marketplaces.py +0 -0
  131. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/ad_api/base/utils.py +0 -0
  132. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/pyproject.toml +0 -0
  133. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/python_amazon_ad_api.egg-info/dependency_links.txt +0 -0
  134. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.0.1}/python_amazon_ad_api.egg-info/requires.txt +0 -0
  135. {python_amazon_ad_api-0.9.9 → python_amazon_ad_api-1.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: 0.9.9
3
+ Version: 1.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
@@ -299,9 +299,13 @@ There is a new version 3 Portfolios API, please check the [migration guide](http
299
299
  * [Get test account information](https://python-amazon-ad-api.readthedocs.io/en/latest/api/advertising_test_account.html#ad_api.api.AdvertisingTestAccount.AdvertisingTestAccount.get_test_account)
300
300
 
301
301
 
302
- ### Sponsored Products v1 (new)
302
+ ### Amazon Ads API v1 (new, unified)
303
303
 
304
- New unified endpoint generation. Campaigns are queried with a single `POST /adsApi/v1/query/campaigns` resource instead of the versioned v2/v3 endpoints.
304
+ The v1 API lives under `/adsApi/v1/` and is **not** split by product: every call targets the same resource and the product is selected in the request body with `adProductFilter`. It supersedes the per-product v2/v3 endpoints.
305
+
306
+ ```python
307
+ from ad_api.api import v1
308
+ ```
305
309
 
306
310
  | Method | Endpoint | Body |
307
311
  |---|---|---|
@@ -313,9 +317,9 @@ New unified endpoint generation. Campaigns are queried with a single `POST /adsA
313
317
  All four return a **207 MultiStatus** response (except `query_campaigns`, which returns 200), so check the payload for per-entity errors.
314
318
 
315
319
  ```python
316
- from ad_api.api import sponsored_products
320
+ from ad_api.api import v1
317
321
 
318
- result = sponsored_products.Campaigns(credentials=credentials, debug=True).query_campaigns(
322
+ result = v1.Campaigns(credentials=credentials, debug=True).query_campaigns(
319
323
  body={
320
324
  "adProductFilter": {"include": ["SPONSORED_PRODUCTS"]},
321
325
  "stateFilter": {"include": ["ENABLED"]},
@@ -271,9 +271,13 @@ There is a new version 3 Portfolios API, please check the [migration guide](http
271
271
  * [Get test account information](https://python-amazon-ad-api.readthedocs.io/en/latest/api/advertising_test_account.html#ad_api.api.AdvertisingTestAccount.AdvertisingTestAccount.get_test_account)
272
272
 
273
273
 
274
- ### Sponsored Products v1 (new)
274
+ ### Amazon Ads API v1 (new, unified)
275
275
 
276
- New unified endpoint generation. Campaigns are queried with a single `POST /adsApi/v1/query/campaigns` resource instead of the versioned v2/v3 endpoints.
276
+ The v1 API lives under `/adsApi/v1/` and is **not** split by product: every call targets the same resource and the product is selected in the request body with `adProductFilter`. It supersedes the per-product v2/v3 endpoints.
277
+
278
+ ```python
279
+ from ad_api.api import v1
280
+ ```
277
281
 
278
282
  | Method | Endpoint | Body |
279
283
  |---|---|---|
@@ -285,9 +289,9 @@ New unified endpoint generation. Campaigns are queried with a single `POST /adsA
285
289
  All four return a **207 MultiStatus** response (except `query_campaigns`, which returns 200), so check the payload for per-entity errors.
286
290
 
287
291
  ```python
288
- from ad_api.api import sponsored_products
292
+ from ad_api.api import v1
289
293
 
290
- result = sponsored_products.Campaigns(credentials=credentials, debug=True).query_campaigns(
294
+ result = v1.Campaigns(credentials=credentials, debug=True).query_campaigns(
291
295
  body={
292
296
  "adProductFilter": {"include": ["SPONSORED_PRODUCTS"]},
293
297
  "stateFilter": {"include": ["ENABLED"]},
@@ -0,0 +1,7 @@
1
+ from .campaigns import Campaigns
2
+ from .ad_groups import AdGroups
3
+
4
+ __all__ = [
5
+ "Campaigns",
6
+ "AdGroups",
7
+ ]
@@ -0,0 +1,201 @@
1
+ from ad_api.base import Client, sp_endpoint, ApiResponse, Utils
2
+
3
+
4
+ class AdGroups(Client):
5
+ r"""
6
+ AdGroups(account='default', marketplace: Marketplaces = Marketplaces.EU, credentials=None, debug=False)
7
+
8
+ Amazon Ads API v1 - unified Ad Groups endpoints
9
+
10
+ The v1 API is not split by product: every call goes to the same resource
11
+ (``/adsApi/v1/...``) and the product is selected in the request body via
12
+ ``adProductFilter``.
13
+
14
+ """
15
+
16
+ @sp_endpoint('/adsApi/v1/query/adGroups', method='POST')
17
+ def query_ad_groups(self, **kwargs) -> ApiResponse:
18
+ r"""
19
+ query_ad_groups(body: dict) -> ApiResponse
20
+
21
+ Amazon Ads API v1 - Query Ad Groups (operationId: QueryAdGroup)
22
+
23
+ Request Body [Required]
24
+ | **adProductFilter** (dict) : [required]
25
+ | **include** (list<AdProduct>) : Enum [ AMAZON_DSP, SPONSORED_BRANDS, SPONSORED_DISPLAY, SPONSORED_PRODUCTS, SPONSORED_TELEVISION ]
26
+ | **adGroupIdFilter** (dict) [optional]
27
+ | **include** (list<string>) : Ad group identifiers
28
+ | **campaignIdFilter** (dict) [optional]
29
+ | **include** (list<string>) : Campaign identifiers
30
+ | **inventoryTypeFilter** (dict) [optional]
31
+ | **include** (list<InventoryType>) : Enum [ AAP_MOBILE_APP, AMAZON_MOBILE_DISPLAY, AUDIO, AUDIO_AMAZON_DEAL, DISPLAY, LIVE_EVENTS, ONLINE_VIDEO, PODCAST, STANDARD_DISPLAY, STREAMING_TV, STREAMING_TV_AMAZON_DEAL, VIDEO ]
32
+ | **marketplaceScopeFilter** (dict) [optional]
33
+ | **include** (list<MarketplaceScope>) : Enum [ GLOBAL, SINGLE_MARKETPLACE ]
34
+ | **nameFilter** (dict) [optional]
35
+ | **include** (list<string>) : Ad group names
36
+ | **queryTermMatchType** (string) : [required] Enum [ BROAD_MATCH, EXACT_MATCH ]
37
+ | **retailerScopeFilter** (dict) [optional]
38
+ | **include** (list<RetailerScope>) : Enum [ AMAZON, OTHER_RETAILERS ]
39
+ | **stateFilter** (dict) [optional]
40
+ | **include** (list<State>) : Enum [ ARCHIVED, DRAFT, ENABLED, PAUSED ]
41
+ | **maxResults** (int) [optional] Maximum number of records in the response
42
+ | **nextToken** (string) [optional] Token to navigate to the next page
43
+
44
+ Headers
45
+ | **Amazon-Ads-AccountId** (string) [optional] Advertiser account identifier
46
+
47
+ Returns
48
+ ApiResponse
49
+ | **adGroups** (list), **nextToken** (string)
50
+
51
+ """
52
+ schema_version = 'application/json'
53
+ headers = {"Accept": schema_version, "Content-Type": schema_version}
54
+ body = kwargs.pop('body', None)
55
+ return self._request(kwargs.pop('path'), params=kwargs, headers=headers,
56
+ **({'data': Utils.convert_body(body, False)} if body is not None else {}))
57
+
58
+ @sp_endpoint('/adsApi/v1/create/adGroups', method='POST')
59
+ def create_ad_groups(self, **kwargs) -> ApiResponse:
60
+ r"""
61
+ create_ad_groups(body: dict) -> ApiResponse
62
+
63
+ Amazon Ads API v1 - Create Ad Groups (operationId: CreateAdGroup)
64
+
65
+ Request Body [Required]
66
+ | **adGroups** (list<dict>) : [required] One or more ad group objects.
67
+ Each object requires **adProduct**, **campaignId**, **name** and **state**.
68
+
69
+ Ad group fields
70
+ | **adProduct** (string) : [required] Enum [ AMAZON_DSP, SPONSORED_BRANDS, SPONSORED_DISPLAY, SPONSORED_PRODUCTS, SPONSORED_TELEVISION ]
71
+ | **campaignId** (string) : [required] Identifier of the parent campaign
72
+ | **name** (string) : [required] Name of the ad group
73
+ | **state** (string) : [required] Enum [ DRAFT, ENABLED, PAUSED ]
74
+ | **bid** (dict) [optional]
75
+ | **baseBid** (number) : Base bid value
76
+ | **defaultBid** (number) : Default bid value
77
+ | **maxAverageBid** (number) : Maximum average bid
78
+ | **marketplaceSettings** (list<dict>) : Per marketplace bids
79
+ | **currencyCode** (string) : [required] Enum CurrencyCode (EUR, USD, GBP, ...)
80
+ | **marketplace** (string) : [required] Marketplace
81
+ | **defaultBid** (number) : Default bid for that marketplace
82
+ | **budgets** (list<dict>) [optional] See Campaigns budget shape:
83
+ ``budgetType``, ``budgetValue.monetaryBudgetValue.monetaryBudget`` (``currencyCode`` + ``value``), ``recurrenceTimePeriod``
84
+ | **optimization** (dict) [optional]
85
+ | **bidStrategy** (string) : Enum [ MANUAL, NEW_TO_BRAND, PRIORITIZE_KPI_TARGET, RULE_BASED, SALES_DOWN_ONLY, SALES_UP_AND_DOWN, SPEND_BUDGET_IN_FULL, USE_CAMPAIGN_STRATEGY ]
86
+ | **budgetSettings** (dict) : ``budgetAllocation`` (Enum AUTO, MANUAL) and ``dailyMinSpendValue`` (number)
87
+ | **goalSettings** (dict) : ``kpi`` (Enum ADD_TO_CART, APPLICATIONS, CHECKOUTS, CLICKS, CLICK_THROUGH_RATE, COMBINED_RETURN_ON_AD_SPEND, CONTACTS, COST_PER_ACTION, COST_PER_CLICK, COST_PER_CONVERSION_OFF_AMAZON, COST_PER_DETAIL_PAGE_VIEW, COST_PER_FIRST_APP_OPEN, COST_PER_INSTALL, COST_PER_SIGN_UP, COST_PER_UNSKIPPED_IMPRESSION, COST_PER_VIDEO_COMPLETION, DETAIL_PAGE_VIEW_RATE, FREQUENCY_AVERAGE, LEADS, OTHER, PAGE_VIEWS, PURCHASES, REACH, RETURN_ON_AD_SPEND, ROAS, ROAS_COMBINED, ROAS_OFF_AMAZON, ROAS_PROMOTED, SEARCH, SIGN_UP, SUBSCRIBE, TOP_OF_SEARCH_IMPRESSION_SHARE, TOTAL_RETURN_ON_AD_SPEND, VIDEO_COMPLETION_RATE)
88
+ | **pacing** (dict) [optional]
89
+ | **deliveryProfile** (string) : [required] Enum [ ASAP, EVEN, PACE_AHEAD ]
90
+ | **targetingSettings** (dict) [optional]
91
+ | **amazonViewability** (dict) : [required in this object]
92
+ | **includeUnmeasurableImpressions** (boolean) : [required]
93
+ | **viewabilityTier** (string) : [required] Enum [ ALL_TIERS, GREATER_THAN_40_PERCENT, GREATER_THAN_50_PERCENT, GREATER_THAN_60_PERCENT, GREATER_THAN_70_PERCENT, LESS_THAN_40_PERCENT ]
94
+ | **automatedTargetingTactic** (string) : Enum [ AWARENESS, CUSTOMER_ACQUISITION, MAXIMIZE_PERFORMANCE, PROSPECTING, REMARKETING, RETENTION, SEARCH ]
95
+ | **defaultAudienceTargetingMatchType** (string) : Enum [ EXACT, SIMILAR ]
96
+ | **enableLanguageTargeting** (boolean)
97
+ | **tacticsConvertersExclusionType** (string) : Enum [ NO_EXCLUSION, RECENT_CONVERTERS ]
98
+ | **targetedPGDealId** (string)
99
+ | **timeZoneType** (string) : Enum [ ADVERTISER_REGION, VIEWER ]
100
+ | **userLocationSignal** (string) : Enum [ CURRENT, MULTIPLE_SIGNALS ]
101
+ | **videoCompletionTier** (string) : Enum [ ALL_TIERS, GREATER_THAN_10_PERCENT, GREATER_THAN_20_PERCENT, GREATER_THAN_30_PERCENT, GREATER_THAN_40_PERCENT, GREATER_THAN_50_PERCENT, GREATER_THAN_60_PERCENT, GREATER_THAN_70_PERCENT, GREATER_THAN_80_PERCENT, GREATER_THAN_90_PERCENT ]
102
+ | **adSettings** (dict) [optional]
103
+ | **productAttributeSetRefinementConfigurationId** (string)
104
+ | **advertisedProductCategoryIds** (list<string>) [optional]
105
+ | **creativeRotationType** (string) : Enum [ RANDOM, WEIGHTED ]
106
+ | **creativeType** (string) : Enum [ IMAGE, VIDEO ]
107
+ | **inventoryType** (string) : Enum [ AAP_MOBILE_APP, AMAZON_MOBILE_DISPLAY, AUDIO, AUDIO_AMAZON_DEAL, DISPLAY, LIVE_EVENTS, ONLINE_VIDEO, PODCAST, STANDARD_DISPLAY, STREAMING_TV, STREAMING_TV_AMAZON_DEAL, VIDEO ]
108
+ | **marketplaceScope** (string) : Enum [ GLOBAL, SINGLE_MARKETPLACE ]
109
+ | **marketplaces** (list<dict>) : Marketplaces where the ad group runs
110
+ | **marketplaceConfigurations** (list<dict>) : Each with **marketplace** and **overrides** (both required)
111
+ | **startDateTime** (string) : Start date and time
112
+ | **endDateTime** (string) : End date and time
113
+ | **fees** (list<dict>) : Each with **addToBudgetSpentAmount**, **feeType**, **feeValue**, **thirdPartyProvider** (all required)
114
+ | **frequencies** (list<dict>) : Frequency cap definitions
115
+ | **purchaseOrderNumber** (string)
116
+ | **retailerId** (string)
117
+ | **tags** (list<dict>) : Each with **key** and **value** (both required)
118
+
119
+ Headers
120
+ | **Amazon-Ads-AccountId** (string) [optional] Advertiser account identifier
121
+
122
+ Returns
123
+ ApiResponse
124
+ | **207** MultiStatus response with partial errors. Inspect the payload
125
+ to know which ad groups were created and which failed.
126
+
127
+ """
128
+ schema_version = 'application/json'
129
+ headers = {"Accept": schema_version, "Content-Type": schema_version}
130
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
131
+
132
+ @sp_endpoint('/adsApi/v1/update/adGroups', method='POST')
133
+ def update_ad_groups(self, **kwargs) -> ApiResponse:
134
+ r"""
135
+ update_ad_groups(body: dict) -> ApiResponse
136
+
137
+ Amazon Ads API v1 - Update Ad Groups (operationId: UpdateAdGroup)
138
+
139
+ Request Body [Required]
140
+ | **adGroups** (list<dict>) : [required] One or more ad group objects.
141
+ Each object requires **adGroupId** and may include any of the fields below.
142
+
143
+ Ad group fields [optional except adGroupId]
144
+ | **adGroupId** (string) : [required] The identifier of the ad group to update.
145
+ | **adProduct** (string) : Enum [ AMAZON_DSP, SPONSORED_BRANDS, SPONSORED_DISPLAY, SPONSORED_PRODUCTS, SPONSORED_TELEVISION ]
146
+ | **name** (string) : Name of the ad group
147
+ | **state** (string) : Enum [ DRAFT, ENABLED, PAUSED ]
148
+ | **bid** (dict) : ``baseBid``, ``defaultBid``, ``maxAverageBid``, ``marketplaceSettings``
149
+ | **budgets** (list<dict>) : Same shape as in create
150
+ | **optimization** (dict) : ``bidStrategy``, ``budgetSettings``, ``goalSettings``
151
+ | **pacing** (dict) : ``deliveryProfile`` Enum [ ASAP, EVEN, PACE_AHEAD ]
152
+ | **targetingSettings** (dict) : ``amazonViewability``, ``defaultAudienceTargetingMatchType``, ``enableLanguageTargeting``, ``tacticsConvertersExclusionType``, ``targetedPGDealId``, ``timeZoneType``, ``userLocationSignal``, ``videoCompletionTier``
153
+ | **adSettings** (dict) : ``productAttributeSetRefinementConfigurationId``
154
+ | **advertisedProductCategoryIds** (list<string>)
155
+ | **creativeRotationType** (string) : Enum [ RANDOM, WEIGHTED ]
156
+ | **creativeType** (string) : Enum [ IMAGE, VIDEO ]
157
+ | **marketplaceScope** (string) : Enum [ GLOBAL, SINGLE_MARKETPLACE ]
158
+ | **marketplaces** (list<dict>)
159
+ | **marketplaceConfigurations** (list<dict>)
160
+ | **startDateTime** (string)
161
+ | **endDateTime** (string)
162
+ | **fees** (list<dict>)
163
+ | **frequencies** (list<dict>)
164
+ | **purchaseOrderNumber** (string)
165
+ | **tags** (list<dict>)
166
+
167
+ Headers
168
+ | **Amazon-Ads-AccountId** (string) [optional] Advertiser account identifier
169
+
170
+ Returns
171
+ ApiResponse
172
+ | **207** MultiStatus response with partial errors. Inspect the payload
173
+ to know which ad groups were updated and which failed.
174
+
175
+ """
176
+ schema_version = 'application/json'
177
+ headers = {"Accept": schema_version, "Content-Type": schema_version}
178
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
179
+
180
+ @sp_endpoint('/adsApi/v1/delete/adGroups', method='POST')
181
+ def delete_ad_groups(self, **kwargs) -> ApiResponse:
182
+ r"""
183
+ delete_ad_groups(body: dict) -> ApiResponse
184
+
185
+ Amazon Ads API v1 - Delete Ad Groups (operationId: DeleteAdGroup)
186
+
187
+ Request Body [Required]
188
+ | **adGroupIds** (list<string>) : [required] Ad group identifiers to delete
189
+
190
+ Headers
191
+ | **Amazon-Ads-AccountId** (string) [optional] Advertiser account identifier
192
+
193
+ Returns
194
+ ApiResponse
195
+ | **207** MultiStatus response with partial errors. Inspect the payload
196
+ to know which ad group ids succeeded and which failed.
197
+
198
+ """
199
+ schema_version = 'application/json'
200
+ headers = {"Accept": schema_version, "Content-Type": schema_version}
201
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
@@ -0,0 +1,180 @@
1
+ from ad_api.base import Client, sp_endpoint, ApiResponse, Utils
2
+
3
+
4
+ class Campaigns(Client):
5
+ r"""
6
+ Campaigns(account='default', marketplace: Marketplaces = Marketplaces.EU, credentials=None, debug=False)
7
+
8
+ Amazon Ads API v1 - unified Campaigns endpoints
9
+
10
+ The v1 API is not split by product: every call goes to the same resource
11
+ (``/adsApi/v1/...``) and the product is selected in the request body via
12
+ ``adProductFilter``.
13
+
14
+ """
15
+
16
+
17
+ @sp_endpoint('/adsApi/v1/query/campaigns', method='POST')
18
+ def query_campaigns(self, **kwargs) -> ApiResponse:
19
+ r"""
20
+ query_campaigns(body: dict) -> ApiResponse
21
+
22
+ Amazon Ads API v1 - Query Campaigns (operationId: QueryCampaign)
23
+
24
+ Request Body [Required]
25
+ | **adProductFilter** (dict): [required]
26
+ | **include** (list<AdProduct>) : Enum [ AMAZON_DSP, SPONSORED_BRANDS, SPONSORED_DISPLAY, SPONSORED_PRODUCTS, SPONSORED_TELEVISION ]
27
+ | **campaignIdFilter** (dict) [optional]
28
+ | **include** (list<string>) : Campaign identifiers
29
+ | **goalFilter** (dict) [optional]
30
+ | **include** (list<Goal>) : Enum [ AWARENESS, CONSIDERATION, CONVERSIONS ]
31
+ | **marketplaceScopeFilter** (dict) [optional]
32
+ | **include** (list<MarketplaceScope>) : Enum [ GLOBAL, SINGLE_MARKETPLACE ]
33
+ | **nameFilter** (dict) [optional]
34
+ | **include** (list<string>) : Campaign names
35
+ | **queryTermMatchType** (string) : [required] Enum [ BROAD_MATCH, EXACT_MATCH ]
36
+ | **portfolioIdFilter** (dict) [optional]
37
+ | **include** (list<string>) : Portfolio identifiers
38
+ | **retailerScopeFilter** (dict) [optional]
39
+ | **include** (list<RetailerScope>) : Enum [ AMAZON, OTHER_RETAILERS ]
40
+ | **stateFilter** (dict) [optional]
41
+ | **include** (list<State>) : Enum [ ARCHIVED, DRAFT, ENABLED, PAUSED ]
42
+ | **maxResults** (int) [optional] Minimum 1, Maximum 1000
43
+ | **nextToken** (string) [optional] Token to navigate to the next page
44
+
45
+ Headers
46
+ | **Amazon-Ads-AccountId** (string) [optional] Advertiser account identifier
47
+
48
+ Returns
49
+ ApiResponse
50
+ | **campaigns** (list), **nextToken** (string)
51
+
52
+ """
53
+ schema_version = 'application/json'
54
+ headers = {"Accept": schema_version, "Content-Type": schema_version}
55
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
56
+
57
+ @sp_endpoint('/adsApi/v1/delete/campaigns', method='POST')
58
+ def delete_campaigns(self, **kwargs) -> ApiResponse:
59
+ r"""
60
+ delete_campaigns(body: dict) -> ApiResponse
61
+
62
+ Amazon Ads API v1 - Delete Campaigns (operationId: DeleteCampaign)
63
+
64
+ Request Body [Required]
65
+ | **campaignIds** (list<string>) : [required] Campaign identifiers to delete
66
+
67
+ Headers
68
+ | **Amazon-Ads-AccountId** (string) [optional] Advertiser account identifier
69
+
70
+ Returns
71
+ ApiResponse
72
+ | **207** MultiStatus response with partial errors. Inspect the payload
73
+ to know which campaign ids succeeded and which failed.
74
+
75
+ """
76
+ schema_version = 'application/json'
77
+ headers = {"Accept": schema_version, "Content-Type": schema_version}
78
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
79
+
80
+ @sp_endpoint('/adsApi/v1/update/campaigns', method='POST')
81
+ def update_campaigns(self, **kwargs) -> ApiResponse:
82
+ r"""
83
+ update_campaigns(body: dict) -> ApiResponse
84
+
85
+ Amazon Ads API v1 - Update Campaigns (operationId: UpdateCampaign)
86
+
87
+ Request Body [Required]
88
+ | **campaigns** (list<dict>) : [required] One or more campaign objects to update.
89
+ Each object requires **campaignId** and may include any of the fields below.
90
+
91
+ Campaign fields [optional except campaignId]
92
+ | **campaignId** (string) : [required] The identifier of the campaign to update.
93
+ | **adProduct** (string) : Enum [ AMAZON_DSP, SPONSORED_BRANDS, SPONSORED_DISPLAY, SPONSORED_PRODUCTS, SPONSORED_TELEVISION ]
94
+ | **name** (string) : The name of the campaign.
95
+ | **state** (string) : Enum [ DRAFT, ENABLED, PAUSED ]
96
+ | **budgets** (list<dict>) : Budget objects for the campaign.
97
+ | **startDateTime** (string) : Campaign start date and time.
98
+ | **endDateTime** (string) : Campaign end date and time.
99
+ | **portfolioId** (string) : The identifier of the portfolio.
100
+ | **purchaseOrderNumber** (string) : Advertiser purchase order number.
101
+ | **tags** (list<dict>) : Advertiser-specified custom identifiers.
102
+ | **marketplaces** (list<dict>) : Marketplaces where the campaign runs.
103
+ | **marketplaceConfigurations** (list<dict>) : Per-marketplace overrides.
104
+ | **countries** (list<string>) : Country codes.
105
+ | **costType** (string) : Enum [ CPC, CPM, FIXED_PRICE, VCPM ]
106
+ | **fees** (list<dict>) : Fee definitions.
107
+ | **flights** (list<dict>) : Flight schedules.
108
+ | **frequencies** (list<dict>) : Frequency cap definitions.
109
+ | **optimizations** (dict) : Campaign optimization settings.
110
+ | **siteRestrictions** (list<dict>) : Site restrictions.
111
+ | **skanAppId** (string) : SKAdNetwork app id.
112
+ | **targetedPGDealId** (string) : Targeted programmatic guaranteed deal id.
113
+ | **adomains** (list<string>) : Ad domains.
114
+
115
+ Headers
116
+ | **Amazon-Ads-AccountId** (string) [optional] Advertiser account identifier
117
+
118
+ Returns
119
+ ApiResponse
120
+ | **207** MultiStatus response with partial errors. Inspect the payload
121
+ to know which campaigns succeeded and which failed.
122
+
123
+ """
124
+ schema_version = 'application/json'
125
+ headers = {"Accept": schema_version, "Content-Type": schema_version}
126
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
127
+
128
+ @sp_endpoint('/adsApi/v1/create/campaigns', method='POST')
129
+ def create_campaigns(self, **kwargs) -> ApiResponse:
130
+ r"""
131
+ create_campaigns(body: dict) -> ApiResponse
132
+
133
+ Amazon Ads API v1 - Create Campaigns (operationId: CreateCampaign)
134
+
135
+ Request Body [Required]
136
+ | **campaigns** (list<dict>) : [required] One or more campaign objects to create.
137
+ Each object requires **adProduct**, **name** and **state**.
138
+
139
+ Campaign fields
140
+ | **adProduct** (string) : [required] Enum [ AMAZON_DSP, SPONSORED_BRANDS, SPONSORED_DISPLAY, SPONSORED_PRODUCTS, SPONSORED_TELEVISION ]
141
+ | **name** (string) : [required] The name of the campaign.
142
+ | **state** (string) : [required] Enum [ DRAFT, ENABLED, PAUSED ]
143
+ | **budgets** (list<dict>) : Budget objects for the campaign.
144
+ | **budgetType** (string) : [required] Budget type.
145
+ | **budgetValue** (dict) : [required] Budget amount.
146
+ | **recurrenceTimePeriod** (string) : [required] Recurrence period.
147
+ | **startDateTime** (string) : Campaign start date and time.
148
+ | **endDateTime** (string) : Campaign end date and time.
149
+ | **portfolioId** (string) : The identifier of the portfolio.
150
+ | **purchaseOrderNumber** (string) : Advertiser purchase order number.
151
+ | **tags** (list<dict>) : [required key+value] Advertiser-specified custom identifiers.
152
+ | **marketplaces** (list<dict>) : Marketplaces where the campaign runs.
153
+ | **marketplaceConfigurations** (list<dict>) : Per-marketplace overrides, each with
154
+ **marketplace** and **overrides** (both required).
155
+ | **countries** (list<string>) : Country codes.
156
+ | **costType** (string) : Enum [ CPC, CPM, FIXED_PRICE, VCPM ]
157
+ | **fees** (list<dict>) : [required feeType+feeValue+feeValueType] Fee definitions.
158
+ | **flights** (list<dict>) : [required budget+startDateTime+endDateTime] Flight schedules.
159
+ | **frequencies** (list<dict>) : [required eventMaxCount+frequencyTargetingSetting+
160
+ timeCount+timeUnit] Frequency cap definitions.
161
+ | **optimizations** (dict) : Campaign optimization settings.
162
+ | **siteRestrictions** (list<dict>) : Site restrictions.
163
+ | **brandId** (string) : Brand identifier.
164
+ | **skanAppId** (string) : SKAdNetwork app id.
165
+ | **targetedPGDealId** (string) : Targeted programmatic guaranteed deal id.
166
+ | **adomains** (list<string>) : Ad domains.
167
+ | **autoCreationSettings** (dict) : Automatic creation settings.
168
+
169
+ Headers
170
+ | **Amazon-Ads-AccountId** (string) [optional] Advertiser account identifier
171
+
172
+ Returns
173
+ ApiResponse
174
+ | **207** MultiStatus response with partial errors. Inspect the payload
175
+ to know which campaigns were created and which failed.
176
+
177
+ """
178
+ schema_version = 'application/json'
179
+ headers = {"Accept": schema_version, "Content-Type": schema_version}
180
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
@@ -0,0 +1 @@
1
+ __version__ = "1.0.1"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-amazon-ad-api
3
- Version: 0.9.9
3
+ Version: 1.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
@@ -299,9 +299,13 @@ There is a new version 3 Portfolios API, please check the [migration guide](http
299
299
  * [Get test account information](https://python-amazon-ad-api.readthedocs.io/en/latest/api/advertising_test_account.html#ad_api.api.AdvertisingTestAccount.AdvertisingTestAccount.get_test_account)
300
300
 
301
301
 
302
- ### Sponsored Products v1 (new)
302
+ ### Amazon Ads API v1 (new, unified)
303
303
 
304
- New unified endpoint generation. Campaigns are queried with a single `POST /adsApi/v1/query/campaigns` resource instead of the versioned v2/v3 endpoints.
304
+ The v1 API lives under `/adsApi/v1/` and is **not** split by product: every call targets the same resource and the product is selected in the request body with `adProductFilter`. It supersedes the per-product v2/v3 endpoints.
305
+
306
+ ```python
307
+ from ad_api.api import v1
308
+ ```
305
309
 
306
310
  | Method | Endpoint | Body |
307
311
  |---|---|---|
@@ -313,9 +317,9 @@ New unified endpoint generation. Campaigns are queried with a single `POST /adsA
313
317
  All four return a **207 MultiStatus** response (except `query_campaigns`, which returns 200), so check the payload for per-entity errors.
314
318
 
315
319
  ```python
316
- from ad_api.api import sponsored_products
320
+ from ad_api.api import v1
317
321
 
318
- result = sponsored_products.Campaigns(credentials=credentials, debug=True).query_campaigns(
322
+ result = v1.Campaigns(credentials=credentials, debug=True).query_campaigns(
319
323
  body={
320
324
  "adProductFilter": {"include": ["SPONSORED_PRODUCTS"]},
321
325
  "stateFilter": {"include": ["ENABLED"]},
@@ -108,6 +108,9 @@ ad_api/api/sp/reports.py
108
108
  ad_api/api/sp/schedule_based_bid_optimization.py
109
109
  ad_api/api/sp/snapshots.py
110
110
  ad_api/api/sp/suggested_keywords.py
111
+ ad_api/api/v1/__init__.py
112
+ ad_api/api/v1/ad_groups.py
113
+ ad_api/api/v1/campaigns.py
111
114
  ad_api/auth/__init__.py
112
115
  ad_api/auth/access_token_client.py
113
116
  ad_api/auth/access_token_response.py
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = python-amazon-ad-api
3
- version = 0.9.9
3
+ version = 1.0.1
4
4
  author = Daniel Alvaro
5
5
  author_email = denisneuf@hotmail.com
6
6
  description = Python wrapper for the Amazon Advertising API
@@ -2,7 +2,7 @@ from setuptools import setup
2
2
 
3
3
  setup(
4
4
  name='python-amazon-ad-api',
5
- version='0.9.9',
5
+ version='1.0.1',
6
6
  install_requires=[
7
7
  "requests>=2.27.1,<2.35.0",
8
8
  "six>=1.16,<1.18",
@@ -20,6 +20,7 @@ setup(
20
20
  'ad_api.api.sb',
21
21
  'ad_api.api.sd',
22
22
  'ad_api.api.dsp',
23
+ 'ad_api.api.v1',
23
24
  ],
24
25
  url='https://github.com/denisneuf/python-amazon-ad-api',
25
26
  license='MIT',
@@ -1 +0,0 @@
1
- __version__ = "0.9.9"