python-amazon-ad-api 2.2.4__py3-none-any.whl → 2.2.5__py3-none-any.whl

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.
ad_api/api/__init__.py CHANGED
@@ -32,6 +32,7 @@ from .stream import Stream
32
32
  from .exports import Exports
33
33
  from .stores import Stores
34
34
  from .brand_home import BrandHome
35
+ from .ras_retailer_identity import RasRetailerIdentity
35
36
 
36
37
  __all__ = [
37
38
  "v1",
@@ -70,5 +71,6 @@ __all__ = [
70
71
  "Exports",
71
72
  "Stores",
72
73
  "BrandHome",
74
+ "RasRetailerIdentity",
73
75
  "Account"
74
76
  ]
ad_api/api/brand_home.py CHANGED
@@ -29,7 +29,7 @@ class BrandHome(Client):
29
29
  stores/list application/vnd.bhstoreslist.v1+json
30
30
  storePages/list application/vnd.bhstorepageslist.v1+json
31
31
 
32
- Measured against the service (2026-11-30, leadtech_fr)
32
+ Measured against the service (2026-11-30)
33
33
  ---------------------------------------------------------
34
34
  Both routes answer 200. What the service accepts:
35
35
 
@@ -43,13 +43,11 @@ class BrandHome(Client):
43
43
  ``BRAND_AID_ID`` answers 400 "not supported".
44
44
  * **``identifier``**: required on both, and it must match the entity id the
45
45
  service derives from the identity headers. Stores take the advertiser
46
- entity (``ENTITY3412Q8SIECJWW``); pages take the ``storeId`` returned by
47
- stores (``106FD13E-...``).
46
+ entity; pages take the ``storeId`` that ``list_stores`` returns.
48
47
 
49
48
  Getting the advertiser entity id: the service truncates it in the error
50
- ("entityId derived from headers = ENTITY3412Q8SIE" for a 21-char id), so
51
- send a wrong value once and read the next message, which carries the full
52
- one.
49
+ message, so send a wrong value once and read the next answer, which carries
50
+ the full one.
53
51
 
54
52
  ``identifierType``, in the contract and in practice
55
53
  ---------------------------------------------------
@@ -66,7 +64,7 @@ class BrandHome(Client):
66
64
  Amazon Ads API v0 - Brand Home ListStores (operationId: ListStores)
67
65
 
68
66
  Request Body [identifier and identifierType are REQUIRED by the service]
69
- | **identifier** (string) : [required] advertiser entityId, ENTITY3412Q8SIECJWW in leadtech_fr
67
+ | **identifier** (string) : [required] advertiser entityId, as the service derives it from the headers
70
68
  | **identifierType** (string) : [required] ENTITY_ID (the only value the service accepts here)
71
69
  | **maxResults** (int) [optional] : 1..30, default 30
72
70
  | **nextToken** (string) [optional]
@@ -0,0 +1,53 @@
1
+ from ad_api.base import Client, sp_endpoint, ApiResponse, Utils
2
+
3
+
4
+ class RasRetailerIdentity(Client):
5
+ """ """
6
+
7
+ @sp_endpoint('/ras/v1/retailers/list', method='POST',
8
+ headers=['Amazon-Advertising-API-Scope'])
9
+ def list_retailers(self, **kwargs) -> ApiResponse:
10
+ r"""
11
+ headers = {'Accept': 'application/json'}
12
+ list_retailers(body: (dict, str) = None) -> ApiResponse
13
+
14
+ Returns an array of all active retailers. The retailers an advertiser
15
+ can target in Retail Ad Service campaign management bodies.
16
+
17
+ Requires one of these permissions: [] (the contract declares none).
18
+
19
+ Kwargs:
20
+
21
+ **retailerIdFilter**: *dict* (body) [optional]
22
+ | { **include**: *list<string>* [required] 0..100 retailer ids }
23
+
24
+ **countryCodeFilter**: *dict* (body) [optional]
25
+ | { **include**: *list<string>* [required] ISO 3166-1 alpha-2, 0..100 }
26
+
27
+ **maxResults**: *integer* (body) [optional] 1..200, default 10
28
+
29
+ **nextToken**: *string* (body) [optional]
30
+
31
+ **body**: *dict or str* (data) [optional]
32
+ | {
33
+ | "retailerIdFilter": {"include": ["string"]},
34
+ | "countryCodeFilter": {"include": ["US"]},
35
+ | "maxResults": 10,
36
+ | "nextToken": "string"
37
+ | }
38
+
39
+ No member is required: an empty body answers the default page.
40
+ The probe sends ``{"maxResults": 200}`` and gets the whole list.
41
+
42
+ Returns ApiResponse
43
+
44
+ | **retailers**: *list* 0..200
45
+ | **retailerId**, **name**, **domain**, **countryCode**,
46
+ | **status** (ACTIVE | INACTIVE | RETIRED)
47
+ | **nextToken**: *string*
48
+ | **totalResults**: *integer*
49
+
50
+ """
51
+ headers = {'Accept': 'application/json'}
52
+ body = kwargs.pop('body', None)
53
+ return self._request(kwargs.pop('path'), params=kwargs, headers=headers, **({'data': Utils.convert_body(body, False)} if body is not None else {}))
ad_api/api/reports.py CHANGED
@@ -13,10 +13,10 @@ class Reports(Client):
13
13
  The three routes carry ``headers=['Amazon-Advertising-API-Scope']``.
14
14
 
15
15
  ``Amazon-Ads-AccountId`` is declared optional for DSP advertiser accounts and
16
- does not replace the profile: measured on 2026-11-27 with ``leadtech_fr``, every
17
- combination without the profile answers 400 ``profile ID required`` on POST,
18
- GET and DELETE, and adding the account id on top of the profile changes
19
- nothing on a seller account. ``Amazon-Advertising-API-Manager-Account`` is not
16
+ does not replace the profile: measured on 2026-11-27, every combination
17
+ without the profile answers 400 ``profile ID required`` on POST, GET and
18
+ DELETE, and adding the account id on top of the profile changes nothing on
19
+ a seller account. ``Amazon-Advertising-API-Manager-Account`` is not
20
20
  part of this contract.
21
21
 
22
22
  A ``GET`` on a report still being generated answers 404, not a status: the
@@ -138,7 +138,7 @@ class Portfolios(Client):
138
138
  # on the requestBody, and no required member in QueryPortfolioRequest.
139
139
  # The service disagrees. Omitting the body answers 400
140
140
  # "Invalid JSON: input is empty"; sending `{}` answers 200 with the
141
- # default page. Measured 2026-11-22 against leadtech_fr. So an empty
141
+ # default page. Measured 2026-11-22. So an empty
142
142
  # body is sent when the caller passes none, and the caller's body is
143
143
  # sent as-is otherwise.
144
144
  data = Utils.convert_body(body if body is not None else {}, False)
ad_api/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "2.2.4"
1
+ __version__ = "2.2.5"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-amazon-ad-api
3
- Version: 2.2.4
3
+ Version: 2.2.5
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
@@ -1,6 +1,6 @@
1
1
  ad_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- ad_api/version.py,sha256=7vcEgCSkbhT9Gg0A1zz0ATFhMnUIE2MAurmV3fHzG8g,22
3
- ad_api/api/__init__.py,sha256=MS9URuCMvZ7c4T2OOWhJg-ovgZHGaxa8wXruPMqRqlc,2079
2
+ ad_api/version.py,sha256=r1Tn-QXWA9VMrkPdk9c6Clll9uei6qKO7PemQL_uDYI,22
3
+ ad_api/api/__init__.py,sha256=s_mvEUiFt7FHqhgOQYQVKe-DfHmY0P5BAGbQ-G48bBU,2161
4
4
  ad_api/api/account.py,sha256=jNYwfjW8b0HhqP7PjlMev55aXJP3YIuqWhrxri0Pk4Y,4673
5
5
  ad_api/api/account_budgets.py,sha256=jFce5eLWAFK3ydjnYR7_Sv7B0-gHTG5bMTx_TcHyy1A,2319
6
6
  ad_api/api/advertising_invitations.py,sha256=TRwULEFi_HVyfK35ABkuZbFOHAdl4tNnGWanxrvX32A,4629
@@ -10,7 +10,7 @@ ad_api/api/attribution.py,sha256=N7aspRbaVK7y8Q1OZ0P9O3CP7gwnS_NzhmNchISFQAI,748
10
10
  ad_api/api/audiences.py,sha256=WuOmHtXyzF1KUXiE9FayXLvb1GI9Q6Z1Y25G2bA-mjc,3575
11
11
  ad_api/api/billing.py,sha256=C_lFVdnymX3V9bg865Bf5f5DMm31IROxvJNYPhvoR7c,29322
12
12
  ad_api/api/brand_benchmarks.py,sha256=ht5EMvGeIb7MA8U2HfQtOj818T6JxM9nEY_HtsBo2H0,3280
13
- ad_api/api/brand_home.py,sha256=snR-PFT_6NkL_FH_N8liz7Os7DP1I051930pRTzUwvA,5730
13
+ ad_api/api/brand_home.py,sha256=IaKKsw2lo5vsmMHs1-tZviHx63t8_cfRFDyWstS-qME,5618
14
14
  ad_api/api/brand_metrics.py,sha256=zEOSPffq8j-2vAz_z77EcKU2sa9i1WzzBqswTmoL5yA,9321
15
15
  ad_api/api/creative_assets.py,sha256=u0bCnioUFpGOQO5Z_MO0ErSLcAgSZB5GWM5wm2oW6L0,9687
16
16
  ad_api/api/dsp_advertiser.py,sha256=ztSr0s15Z9scQNKElWxRujexsENn84MT-ihNhijLi_M,1427
@@ -25,8 +25,9 @@ ad_api/api/metadata.py,sha256=v-06G_EFmCWA9v4WorEPtIlbLOaYnv-veboXZi95WUo,2472
25
25
  ad_api/api/portfolios.py,sha256=Oe3LS2HsjMJSq1Id8cwOWrH2AiPMcBb7oTkFHjudnTI,7103
26
26
  ad_api/api/portfolios_v3.py,sha256=wSV9XYmdsvUaqLNGLy6NvUTRJJmxGNMO7PMig2zT41c,7608
27
27
  ad_api/api/profiles.py,sha256=g8u3tD7i8DHZ8dKN3cBM-dNLDLeqh8ctXXWlLpw1Arw,4851
28
+ ad_api/api/ras_retailer_identity.py,sha256=jIs0z4Sfy1vtl9SThK_WbdmDEE3DPSj5K0NZB9xBPt8,2020
28
29
  ad_api/api/recommendations.py,sha256=dV9uB8_hmylObZINvUetahc-tL4DBX0s9XMhYLkYFYE,6324
29
- ad_api/api/reports.py,sha256=tfDquuVk0Iz4hjf_-hHcRB_GwZDgzMLxlK7dKw-X9-E,8161
30
+ ad_api/api/reports.py,sha256=u9mYkWOYSBVf8N1NyEc7pxUS04xzberGsCffTHKkFTA,8140
30
31
  ad_api/api/stores.py,sha256=BiwqOldK9zEsNjQzcII1DgBxQkDNsGP20aBx5i5Dmg8,2709
31
32
  ad_api/api/stream.py,sha256=mg_3SD5uXPAYjXVwOs1WsoHvk3AcP-XOXyoS3HhNEhw,3013
32
33
  ad_api/api/validation_configurations.py,sha256=Qaxy_J67Fqw0ecS4f1sK9lGdiOLsq323RXeZO0_2KV0,4092
@@ -123,7 +124,7 @@ ad_api/api/v1/label_object_associations.py,sha256=GdaLkkPcEaqjH1egwF63d8DzT3eta1
123
124
  ad_api/api/v1/labels.py,sha256=jQxbwjsTWEXDyilGdt-_Kam_k9jMS8IBP-eyu6AW70A,2831
124
125
  ad_api/api/v1/location_indexes.py,sha256=xV2g8DuNh6ayNwl55YiLEkbAFPfR6AeM92AH7VWC6dg,7266
125
126
  ad_api/api/v1/manager_accounts.py,sha256=iiW0bjS23rn2R_In3Zisn0mSFQsQ6iy6KgkO_JxT-H4,5101
126
- ad_api/api/v1/portfolios.py,sha256=mDrx3xo72BN_ltk3eefVm9A4kR7g_sbFMr2JTfuJpOM,9647
127
+ ad_api/api/v1/portfolios.py,sha256=nf4norW8hiFLKaV8fxVXKZgVGq1UVzi5cO2yuIV4jbM,9627
127
128
  ad_api/api/v1/recommendation_types.py,sha256=zw546ssLqFwKShZ9MNkG0I7DWKTnQs3yptcCsgHi-pA,2576
128
129
  ad_api/api/v1/recommendations.py,sha256=P01hbXzDoyY6HpyBeFkJTd_CsZAvaKl-EQVMtvQvBdA,5885
129
130
  ad_api/api/v1/reports.py,sha256=vJmWhIsALkX27HeijTsSUz3zrYhUBm4RodTCieJD8Y8,6657
@@ -145,8 +146,8 @@ ad_api/base/marketplaces.py,sha256=44lvCcluXNpqTprWQ80e3weSQmQbJoWL-WDSOWVbCyQ,4
145
146
  ad_api/base/utils.py,sha256=_qnCBOvyJTLgaZjJzUWTi38GGLHkQszXELs79133Rb4,5618
146
147
  ad_api/shared/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
147
148
  ad_api/shared/base_client.py,sha256=zOL_LTh-58URWf3ZDlrwmqXXbd6PX66QF5hrr2p83yY,356
148
- python_amazon_ad_api-2.2.4.dist-info/licenses/LICENSE,sha256=h2rpqlmmLy-4l1tN6KpWAFxx1JEMYeEFrMrZUbx_B_o,1105
149
- python_amazon_ad_api-2.2.4.dist-info/METADATA,sha256=4LuqczC5B4BLwABm3At8dVNOznLmGRV1mMzwpPccfHg,10678
150
- python_amazon_ad_api-2.2.4.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
151
- python_amazon_ad_api-2.2.4.dist-info/top_level.txt,sha256=nN9twUos-8pkP514ZwpvRU9YL9L2XyQyHsMQFfudGTU,7
152
- python_amazon_ad_api-2.2.4.dist-info/RECORD,,
149
+ python_amazon_ad_api-2.2.5.dist-info/licenses/LICENSE,sha256=h2rpqlmmLy-4l1tN6KpWAFxx1JEMYeEFrMrZUbx_B_o,1105
150
+ python_amazon_ad_api-2.2.5.dist-info/METADATA,sha256=yOjYhAE0bZXt6cUIFAwd0Chol2ZiTKhAagkoAz0cPzI,10678
151
+ python_amazon_ad_api-2.2.5.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
152
+ python_amazon_ad_api-2.2.5.dist-info/top_level.txt,sha256=nN9twUos-8pkP514ZwpvRU9YL9L2XyQyHsMQFfudGTU,7
153
+ python_amazon_ad_api-2.2.5.dist-info/RECORD,,