tool4seller-cli 1.2.0__tar.gz → 1.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/PKG-INFO +18 -1
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/README.md +17 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/pyproject.toml +1 -1
- tool4seller_cli-1.3.0/src/tool4seller_cli/__init__.py +2 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli/auth/oauth.py +3 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli/cli.py +20 -8
- tool4seller_cli-1.3.0/src/tool4seller_cli/data/openapi-v2.ite-extensions.json +1 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli/data/operation-policies.json +297 -8
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli/dynamic.py +2 -1
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli/http_client.py +7 -2
- tool4seller_cli-1.3.0/src/tool4seller_cli/json_numbers.py +41 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli/schema/registry.py +14 -5
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli/schema/validation.py +48 -4
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli/skills/tool4seller-advertising/SKILL.md +6 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli/skills/tool4seller-advertising-management/SKILL.md +5 -1
- tool4seller_cli-1.3.0/src/tool4seller_cli/skills/tool4seller-category-insights/SKILL.md +21 -0
- tool4seller_cli-1.3.0/src/tool4seller_cli/skills/tool4seller-products/SKILL.md +29 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli/write_safety.py +28 -1
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli.egg-info/PKG-INFO +18 -1
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli.egg-info/SOURCES.txt +6 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/tests/test_auth_oauth.py +3 -2
- tool4seller_cli-1.3.0/tests/test_cli_ite_management.py +171 -0
- tool4seller_cli-1.3.0/tests/test_decimal_requests.py +78 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/tests/test_http_client.py +4 -1
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/tests/test_openapi_refresh.py +15 -0
- tool4seller_cli-1.3.0/tests/test_product_submission_statuses.py +46 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/tests/test_schema_registry.py +4 -3
- tool4seller_cli-1.2.0/src/tool4seller_cli/__init__.py +0 -1
- tool4seller_cli-1.2.0/src/tool4seller_cli/data/openapi-v2.ite-extensions.json +0 -1
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/setup.cfg +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli/auth/__init__.py +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli/auth/login.py +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli/auth/pkce.py +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli/auth/token_store.py +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli/config.py +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli/data/openapi-v2.bundled.json +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli/output.py +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli/schema/__init__.py +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli/schema/normalize.py +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli/schema/policy.py +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli/skills/__init__.py +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli/skills/tool4seller-account/SKILL.md +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli/skills/tool4seller-asin-search-terms/SKILL.md +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli/skills/tool4seller-inventory/SKILL.md +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli/skills/tool4seller-keyword-rankings/SKILL.md +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli/skills/tool4seller-profit/SKILL.md +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli/skills/tool4seller-sales/SKILL.md +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli/skills/tool4seller-shared/SKILL.md +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli/skills/tool4seller-stores/SKILL.md +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli/skills/tool4seller-top-search-terms/SKILL.md +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli/skills_installer.py +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli.egg-info/dependency_links.txt +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli.egg-info/entry_points.txt +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli.egg-info/requires.txt +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/src/tool4seller_cli.egg-info/top_level.txt +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/tests/test_auth_login.py +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/tests/test_cli_api.py +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/tests/test_cli_asin_search_terms.py +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/tests/test_cli_auth.py +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/tests/test_cli_campaigns.py +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/tests/test_cli_core.py +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/tests/test_cli_dynamic.py +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/tests/test_cli_keyword_rankings.py +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/tests/test_cli_schema.py +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/tests/test_cli_top_search_terms.py +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/tests/test_config.py +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/tests/test_dynamic.py +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/tests/test_output.py +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/tests/test_package_metadata.py +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/tests/test_release_scripts.py +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/tests/test_schema_normalize.py +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/tests/test_skills_installer.py +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/tests/test_token_store.py +0 -0
- {tool4seller_cli-1.2.0 → tool4seller_cli-1.3.0}/tests/test_write_safety.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tool4seller-cli
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.0
|
|
4
4
|
Summary: Tool4Seller CLI for sales, advertising, market analysis, keyword rankings, inventory, account usage, and profit workflows
|
|
5
5
|
Project-URL: Homepage, https://www.tool4seller.com/
|
|
6
6
|
Project-URL: API Documentation, https://das-server.tool4seller.com/api/v3/api-docs/v2
|
|
@@ -85,6 +85,23 @@ tool4seller --env test auth login
|
|
|
85
85
|
tool4seller --env test campaigns list --store-id SELLER:MARKETPLACE
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
+
## ITE Development Operations
|
|
89
|
+
|
|
90
|
+
The following commands are available on the ITE endpoint:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
tool4seller --env test products list --store-id SELLER:MARKETPLACE
|
|
94
|
+
tool4seller --env test products get --store-id SELLER:MARKETPLACE --sku SKU-001
|
|
95
|
+
tool4seller --env test products update --data-file request.json
|
|
96
|
+
tool4seller --env test portfolios create --data-file request.json
|
|
97
|
+
tool4seller --env test portfolios update --data-file request.json
|
|
98
|
+
tool4seller --env test category-insights list --marketplace-id ATVPDKIKX0DER
|
|
99
|
+
tool4seller --env test category-insights get --marketplace-id ATVPDKIKX0DER --category-id CATEGORY --root-category-id ROOT --product-type-id TYPE
|
|
100
|
+
tool4seller --env test advertising-search-term-details list --store-id SELLER:MARKETPLACE --dimension campaign --values 123 --start-date 2026-10-01 --end-date 2026-10-02
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Writes require the existing preview and one-time confirmation workflow. Product updates report submission acceptance, not confirmed listing effectiveness. ITE campaign updates additionally support `portfolioId`: omit to preserve, use a positive integer to assign, or use explicit null to remove. Production campaign validation retains the production contract. Use `tool4seller --env test schema show advertising-management.update-campaigns` to inspect the ITE contract.
|
|
104
|
+
|
|
88
105
|
## Account, Orders, Keyword Rankings, and Market Analysis
|
|
89
106
|
|
|
90
107
|
```bash
|
|
@@ -68,6 +68,23 @@ tool4seller --env test auth login
|
|
|
68
68
|
tool4seller --env test campaigns list --store-id SELLER:MARKETPLACE
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
+
## ITE Development Operations
|
|
72
|
+
|
|
73
|
+
The following commands are available on the ITE endpoint:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
tool4seller --env test products list --store-id SELLER:MARKETPLACE
|
|
77
|
+
tool4seller --env test products get --store-id SELLER:MARKETPLACE --sku SKU-001
|
|
78
|
+
tool4seller --env test products update --data-file request.json
|
|
79
|
+
tool4seller --env test portfolios create --data-file request.json
|
|
80
|
+
tool4seller --env test portfolios update --data-file request.json
|
|
81
|
+
tool4seller --env test category-insights list --marketplace-id ATVPDKIKX0DER
|
|
82
|
+
tool4seller --env test category-insights get --marketplace-id ATVPDKIKX0DER --category-id CATEGORY --root-category-id ROOT --product-type-id TYPE
|
|
83
|
+
tool4seller --env test advertising-search-term-details list --store-id SELLER:MARKETPLACE --dimension campaign --values 123 --start-date 2026-10-01 --end-date 2026-10-02
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Writes require the existing preview and one-time confirmation workflow. Product updates report submission acceptance, not confirmed listing effectiveness. ITE campaign updates additionally support `portfolioId`: omit to preserve, use a positive integer to assign, or use explicit null to remove. Production campaign validation retains the production contract. Use `tool4seller --env test schema show advertising-management.update-campaigns` to inspect the ITE contract.
|
|
87
|
+
|
|
71
88
|
## Account, Orders, Keyword Rankings, and Market Analysis
|
|
72
89
|
|
|
73
90
|
```bash
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "tool4seller-cli"
|
|
7
|
-
version = "1.
|
|
7
|
+
version = "1.3.0"
|
|
8
8
|
description = "Tool4Seller CLI for sales, advertising, market analysis, keyword rankings, inventory, account usage, and profit workflows"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -4,6 +4,7 @@ from urllib.parse import urlencode, urlsplit, urlunsplit
|
|
|
4
4
|
|
|
5
5
|
import requests
|
|
6
6
|
|
|
7
|
+
from tool4seller_cli import USER_AGENT
|
|
7
8
|
from tool4seller_cli.auth.token_store import TokenSet
|
|
8
9
|
|
|
9
10
|
|
|
@@ -56,6 +57,7 @@ def exchange_authorization_code(
|
|
|
56
57
|
"redirect_uri": redirect_uri,
|
|
57
58
|
"code_verifier": code_verifier,
|
|
58
59
|
},
|
|
60
|
+
headers={"User-Agent": USER_AGENT},
|
|
59
61
|
timeout=DEFAULT_TIMEOUT,
|
|
60
62
|
)
|
|
61
63
|
return parse_token_response(response, now=now)
|
|
@@ -77,6 +79,7 @@ def refresh_access_token(
|
|
|
77
79
|
"refresh_token": refresh_token,
|
|
78
80
|
"client_id": client_id,
|
|
79
81
|
},
|
|
82
|
+
headers={"User-Agent": USER_AGENT},
|
|
80
83
|
timeout=DEFAULT_TIMEOUT,
|
|
81
84
|
)
|
|
82
85
|
return parse_token_response(response, now=now)
|
|
@@ -12,7 +12,7 @@ import requests
|
|
|
12
12
|
import typer
|
|
13
13
|
from packaging.version import InvalidVersion, Version
|
|
14
14
|
|
|
15
|
-
from tool4seller_cli import __version__
|
|
15
|
+
from tool4seller_cli import __version__, json_numbers
|
|
16
16
|
from tool4seller_cli.auth.login import login_with_browser
|
|
17
17
|
from tool4seller_cli.auth.oauth import CLIENT_ID, refresh_access_token
|
|
18
18
|
from tool4seller_cli.auth.token_store import FileTokenStore, TokenSet
|
|
@@ -201,12 +201,12 @@ def schema_list(
|
|
|
201
201
|
|
|
202
202
|
|
|
203
203
|
@schema_app.command("show")
|
|
204
|
-
def schema_show(ref: str) -> None:
|
|
204
|
+
def schema_show(ctx: typer.Context, ref: str) -> None:
|
|
205
205
|
operation = registry.find(ref)
|
|
206
206
|
if operation is None:
|
|
207
207
|
typer.echo("operation not found")
|
|
208
208
|
raise typer.Exit(code=1)
|
|
209
|
-
_echo_json(_operation_detail(operation))
|
|
209
|
+
_echo_json(_operation_detail(_endpoint_operation(ctx, operation)))
|
|
210
210
|
|
|
211
211
|
|
|
212
212
|
@skills_app.command("install")
|
|
@@ -309,7 +309,7 @@ def api_command(
|
|
|
309
309
|
else:
|
|
310
310
|
parsed_data = _parse_json_option(data, "--data") if data is not None else None
|
|
311
311
|
method = method.upper()
|
|
312
|
-
operation = registry.find_request(method, path)
|
|
312
|
+
operation = _endpoint_operation(ctx, registry.find_request(method, path))
|
|
313
313
|
policy = operation.policy if operation is not None else operation_policy(method, path)
|
|
314
314
|
_require_operation_available(ctx, policy)
|
|
315
315
|
if operation is not None:
|
|
@@ -584,7 +584,7 @@ def _management_write(
|
|
|
584
584
|
raise typer.BadParameter("provide --data or --data-file")
|
|
585
585
|
|
|
586
586
|
path = f"/api/v2/advertising-management/{resource}"
|
|
587
|
-
operation = registry.find_request(method, path)
|
|
587
|
+
operation = _endpoint_operation(ctx, registry.find_request(method, path))
|
|
588
588
|
policy = operation.policy if operation is not None else operation_policy(method, path)
|
|
589
589
|
_require_operation_available(ctx, policy)
|
|
590
590
|
try:
|
|
@@ -647,6 +647,7 @@ def _register_management_write_command(
|
|
|
647
647
|
|
|
648
648
|
|
|
649
649
|
for _group, _resource in (
|
|
650
|
+
(portfolios_app, "portfolios"),
|
|
650
651
|
(campaigns_app, "campaigns"),
|
|
651
652
|
(ad_groups_app, "ad-groups"),
|
|
652
653
|
(ads_app, "ads"),
|
|
@@ -658,6 +659,7 @@ for _group, _resource in (
|
|
|
658
659
|
_register_management_write_command(_group, _resource, "create", "POST")
|
|
659
660
|
|
|
660
661
|
for _group, _resource in (
|
|
662
|
+
(portfolios_app, "portfolios"),
|
|
661
663
|
(campaigns_app, "campaigns"),
|
|
662
664
|
(ad_groups_app, "ad-groups"),
|
|
663
665
|
(ads_app, "ads"),
|
|
@@ -1003,6 +1005,9 @@ def register_dynamic_commands(
|
|
|
1003
1005
|
|
|
1004
1006
|
def _register_dynamic_command(group: typer.Typer, operation: Operation) -> None:
|
|
1005
1007
|
def command(ctx: typer.Context) -> None:
|
|
1008
|
+
selected_command(ctx, _endpoint_operation(ctx, operation))
|
|
1009
|
+
|
|
1010
|
+
def selected_command(ctx: typer.Context, operation: Operation) -> None:
|
|
1006
1011
|
_require_operation_available(ctx, operation.policy)
|
|
1007
1012
|
try:
|
|
1008
1013
|
invocation = parse_dynamic_invocation(operation, list(ctx.args))
|
|
@@ -1187,13 +1192,13 @@ def _to_flag_name(name: str) -> str:
|
|
|
1187
1192
|
|
|
1188
1193
|
def _parse_json_option(value: str, option_name: str) -> Any:
|
|
1189
1194
|
try:
|
|
1190
|
-
return
|
|
1195
|
+
return json_numbers.loads(value)
|
|
1191
1196
|
except json.JSONDecodeError as exc:
|
|
1192
1197
|
raise typer.BadParameter(f"{option_name} must be valid JSON") from exc
|
|
1193
1198
|
|
|
1194
1199
|
|
|
1195
1200
|
def _echo_json(value: Any) -> None:
|
|
1196
|
-
typer.echo(
|
|
1201
|
+
typer.echo(json_numbers.dumps(value, ensure_ascii=False, sort_keys=True))
|
|
1197
1202
|
|
|
1198
1203
|
|
|
1199
1204
|
def _require_write_confirmation(
|
|
@@ -1232,6 +1237,13 @@ def _require_write_confirmation(
|
|
|
1232
1237
|
raise typer.Exit(code=CONFIRMATION_REQUIRED_EXIT_CODE)
|
|
1233
1238
|
|
|
1234
1239
|
|
|
1240
|
+
def _endpoint_operation(ctx: typer.Context, operation: Operation | None) -> Operation | None:
|
|
1241
|
+
if operation is None:
|
|
1242
|
+
return None
|
|
1243
|
+
environment, _ = _environment_and_store(ctx)
|
|
1244
|
+
return operation.for_endpoint(environment.base_url)
|
|
1245
|
+
|
|
1246
|
+
|
|
1235
1247
|
def _require_operation_available(ctx: typer.Context, policy: dict[str, Any]) -> None:
|
|
1236
1248
|
available_base_urls = policy.get("availableBaseUrls")
|
|
1237
1249
|
if not isinstance(available_base_urls, list) or not available_base_urls:
|
|
@@ -1282,7 +1294,7 @@ def _emit_operation_result(
|
|
|
1282
1294
|
_echo_json(output)
|
|
1283
1295
|
return
|
|
1284
1296
|
if is_write:
|
|
1285
|
-
summary = summarize_write_result(result, expected_item_count=expected_item_count)
|
|
1297
|
+
summary = summarize_write_result(result, expected_item_count=expected_item_count, submission=result_mode == "submission")
|
|
1286
1298
|
if summary is not None:
|
|
1287
1299
|
output, requires_review = summary
|
|
1288
1300
|
_echo_json(output)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"x-tool4seller-environment":"ite","openapi":"3.0.1","info":{"title":"Tool4seller ITE-only API extensions","version":"2.0.0"},"servers":[{"url":"/api","description":"API base path"}],"tags":[{"name":"Category Insights","description":"Marketplace category demand, competition and trends. ASIN search selects categories, not the ASIN's own performance."},{"name":"Amazon Ads Campaign Management","description":"Read and manage Amazon Ads portfolios, campaigns, ad groups, ads, keywords, targets, and negative targeting. List operations return the latest data synchronized to Tool4seller and do not include performance metrics. Eligible production writes submit changes to Amazon Ads; Review Sandbox writes return simulated results without changing Amazon. Synchronized query data may update later. Standard state updates accept ENABLED or PAUSED. Negative placements use a restricted lifecycle: legacy PAUSED entities can become ENABLED or ARCHIVED, ENABLED entities can only become ARCHIVED, and ARCHIVED is terminal."}],"paths":{"/v2/advertising-management/search-terms":{"get":{"tags":["advertising-search-term-detail-controller"],"summary":"Query advertising search term details","description":"Date-range metrics by campaign, ad group, triggering keyword/target and search term. Campaign/adGroup supports SP and SB. Product scope selects SP groups, not product-attributed metrics. Names can be resolved through campaign/ad-group queries. The maximum inclusive date range is 31 days.\n\n##### Rate Limits\n\nScope: API user + `storeId`\n\n| Maximum Quota | Restore |\n| --- | --- |\n| 30 requests | 1 request every 5 seconds |","operationId":"queryAdvertisingSearchTermDetails","parameters":[{"name":"storeId","in":"query","required":true,"schema":{"type":"string"}},{"name":"dimension","in":"query","description":"sku, asin, parentAsin, campaign or adGroup","required":true,"schema":{"type":"string"}},{"name":"values","in":"query","description":"1–100 comma-separated product identifiers or canonical campaign/ad-group IDs","required":true,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":true,"schema":{"type":"string"}},{"name":"endDate","in":"query","required":true,"schema":{"type":"string"}},{"name":"searchKey","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"resultType","in":"query","description":"term for text; product for ASIN search terms","required":false,"schema":{"type":"string","default":"term"}},{"name":"filters","in":"query","description":"JSON object, e.g. {\"metrics\":{\"adOrders\":{\"eq\":0},\"adSpend\":{\"gte\":20}}}. Applied after aggregation and before pagination. Operators eq/gt/gte/lt/lte; percentage values are decimal ratios. Positive numerator with zero denominator is unbounded for comparisons.","required":false,"schema":{"type":"string"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string","default":"adOrders"}},{"name":"sortOrder","in":"query","required":false,"schema":{"type":"string","default":"desc"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":100}}],"responses":{"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid or missing request parameter.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authenticated but missing a required OAuth scope or package permission.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized API key or store.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","headers":{"TS-Rate-Limit-Name":{"description":"Rate limit bucket name.","schema":{"type":"string"}},"TS-Rate-Limit-Maximum-Quota":{"description":"Maximum request quota for this rate limit bucket.","schema":{"type":"integer","format":"int32"}},"TS-Rate-Limit-Remaining":{"description":"Remaining request quota in the current bucket.","schema":{"type":"integer","format":"int32"}},"TS-Rate-Limit-Retry-After-Seconds":{"description":"Seconds to wait before retrying after the bucket is exhausted.","schema":{"type":"integer","format":"int32"}}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AdvertisingSearchTermDetailListResponse"}}}}},"x-rate-limit":{"name":"V2.AdvertisingManagement.SearchTermDetails","capacity":30,"restoreSecondsPerRequest":5,"scope":"apiUser+storeId"}}},"/v2/market-analysis/category-insights":{"get":{"tags":["Category Insights"],"summary":"Query category insights","description":"Search categories by name or ASIN, or browse the marketplace. Defaults to last 30 days, search volume descending. Uses offset/limit pagination capped at 10000 rows, without a total count. Requires market-analysis:read.\n\n##### Rate Limits\n\nScope: API user\n\n| Maximum Quota | Restore |\n| --- | --- |\n| 20 requests | 1 request every 4 seconds |","operationId":"list_1","parameters":[{"name":"marketplaceId","in":"query","required":true,"schema":{"type":"string"}},{"name":"searchKey","in":"query","required":false,"schema":{"type":"string"}},{"name":"rootCategoryId","in":"query","required":false,"schema":{"type":"string"}},{"name":"productTypeId","in":"query","required":false,"schema":{"type":"string"}},{"name":"period","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortOrder","in":"query","required":false,"schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid or missing request parameter.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authenticated but missing a required OAuth scope or package permission.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized API key or store.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","headers":{"TS-Rate-Limit-Name":{"description":"Rate limit bucket name.","schema":{"type":"string"}},"TS-Rate-Limit-Maximum-Quota":{"description":"Maximum request quota for this rate limit bucket.","schema":{"type":"integer","format":"int32"}},"TS-Rate-Limit-Remaining":{"description":"Remaining request quota in the current bucket.","schema":{"type":"integer","format":"int32"}},"TS-Rate-Limit-Retry-After-Seconds":{"description":"Seconds to wait before retrying after the bucket is exhausted.","schema":{"type":"integer","format":"int32"}}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Category summaries","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CategoryInsightListResponse"}}}}},"x-rate-limit":{"name":"V2.CategoryInsights.List","capacity":20,"restoreSecondsPerRequest":4,"scope":"apiUser"}}},"/v2/market-analysis/category-insights/detail":{"get":{"tags":["Category Insights"],"summary":"Query category insight detail","description":"Reads one complete category identity returned by the list. Returns category metrics, product-type benchmarks, source trends and features. Ratios are decimals. Feature scores are comparable only within a group. Requires market-analysis:read.\n\n##### Rate Limits\n\nScope: API user\n\n| Maximum Quota | Restore |\n| --- | --- |\n| 20 requests | 1 request every 4 seconds |","operationId":"detail","parameters":[{"name":"marketplaceId","in":"query","required":true,"schema":{"type":"string"}},{"name":"categoryId","in":"query","required":true,"schema":{"type":"string"}},{"name":"rootCategoryId","in":"query","required":true,"schema":{"type":"string"}},{"name":"productTypeId","in":"query","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid or missing request parameter.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authenticated but missing a required OAuth scope or package permission.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized API key or store.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","headers":{"TS-Rate-Limit-Name":{"description":"Rate limit bucket name.","schema":{"type":"string"}},"TS-Rate-Limit-Maximum-Quota":{"description":"Maximum request quota for this rate limit bucket.","schema":{"type":"integer","format":"int32"}},"TS-Rate-Limit-Remaining":{"description":"Remaining request quota in the current bucket.","schema":{"type":"integer","format":"int32"}},"TS-Rate-Limit-Retry-After-Seconds":{"description":"Seconds to wait before retrying after the bucket is exhausted.","schema":{"type":"integer","format":"int32"}}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Category detail","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CategoryInsightDetailResponse"}}}}},"x-rate-limit":{"name":"V2.CategoryInsights.Detail","capacity":20,"restoreSecondsPerRequest":4,"scope":"apiUser"}}},"/v2/products":{"get":{"tags":["product-controller"],"summary":"Query products","description":"Returns synchronized non-parent SKU listings with positive Amazon status. Identifiers are exact filters; title is a literal contains filter. Different filters intersect. Parent ASIN filters return child listings. No date range applies.\n\n##### Rate Limits\n\nScope: API user + `storeId`\n\n| Maximum Quota | Restore |\n| --- | --- |\n| 30 requests | 1 request every 3 seconds |","operationId":"list","parameters":[{"name":"storeId","in":"query","required":true,"schema":{"type":"string"}},{"name":"skus","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"asins","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"parentAsins","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"title","in":"query","required":false,"schema":{"type":"string"}},{"name":"fulfillmentChannel","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","description":"Listing status; omit for all non-deleted statuses.","required":false,"schema":{"type":"string","enum":["ACTIVE","INACTIVE","INCOMPLETE"]}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":100}}],"responses":{"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"TS-Rate-Limit-Name":{"description":"Rate limit bucket name.","schema":{"type":"string"}},"TS-Rate-Limit-Maximum-Quota":{"description":"Maximum request quota for this rate limit bucket.","schema":{"type":"integer","format":"int32"}},"TS-Rate-Limit-Remaining":{"description":"Remaining request quota in the current bucket.","schema":{"type":"integer","format":"int32"}},"TS-Rate-Limit-Retry-After-Seconds":{"description":"Seconds to wait before retrying after the bucket is exhausted.","schema":{"type":"integer","format":"int32"}}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProductListResponse"}}}}},"x-rate-limit":{"name":"V2.Products.List","capacity":30,"restoreSecondsPerRequest":3,"scope":"apiUser+storeId"}},"patch":{"tags":["product-controller"],"summary":"Update products","description":"Updates ordinary prices, titles, item highlights, generic keywords, bullet points or descriptions for 1-5 distinct SKUs in one store. Omitted fields are unchanged; nulls are rejected. Bullet points replace the complete selected-language set. Success means submission accepted, not confirmed effective. Each item has an independent outcome. This REST endpoint submits changes directly and does not require an MCP confirmation receipt; clients must obtain approval before calling it.","operationId":"update","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductUpdateRequest"},"example":{"storeId":"SELLER:ATVPDKIKX0DER","items":[{"sku":"SKU-001","price":19.99,"title":"New product title","itemHighlights":"Soft cotton, lightweight, easy to clean","genericKeywords":"cotton lightweight everyday comfort","bulletPoints":["First feature","Second feature"],"description":"New product description"}]}}},"required":true},"responses":{"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProductUpdateResponse"}}}}}}},"/v2/products/detail":{"get":{"tags":["product-detail-controller"],"summary":"Get product detail","description":"Reads one exact seller SKU from Amazon Listings Items, including title, item highlights, generic keywords, bullet points and product description. Returns listing attributes, not guaranteed retail detail-page content. Multiple languages within a text attribute are rejected.\n\n##### Rate Limits\n\nScope: API user + `storeId`\n\n| Maximum Quota | Restore |\n| --- | --- |\n| 10 requests | 1 request every 1 seconds |","operationId":"get","parameters":[{"name":"storeId","in":"query","required":true,"schema":{"type":"string"}},{"name":"sku","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"TS-Rate-Limit-Name":{"description":"Rate limit bucket name.","schema":{"type":"string"}},"TS-Rate-Limit-Maximum-Quota":{"description":"Maximum request quota for this rate limit bucket.","schema":{"type":"integer","format":"int32"}},"TS-Rate-Limit-Remaining":{"description":"Remaining request quota in the current bucket.","schema":{"type":"integer","format":"int32"}},"TS-Rate-Limit-Retry-After-Seconds":{"description":"Seconds to wait before retrying after the bucket is exhausted.","schema":{"type":"integer","format":"int32"}}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProductDetailResponse"}}}}},"x-rate-limit":{"name":"V2.Products.Detail","capacity":10,"restoreSecondsPerRequest":1,"scope":"apiUser+storeId"}}},"/v2/advertising-management/campaigns":{"patch":{"tags":["Amazon Ads Campaign Management"],"summary":"Update campaigns","description":"Submits name, state, daily budget, and/or portfolio changes for 1 to 100 existing campaigns. Omit portfolioId to preserve the current portfolio; pass a positive existing portfolio ID from the same store to assign or move the campaign, or explicit null to remove it from its portfolio. A request may mix Sponsored Products, Sponsored Brands, and Sponsored Display campaigns; the service sends separate Amazon Ads writes per ad product and preserves each item's original index. One ad product group can fail without preventing later groups from running, so the response may contain both successful and failed items. State accepts ENABLED or PAUSED; ARCHIVED is not supported. For each successful item, only the submitted fields are immediately synchronized to the local campaign row. Batch writes are not transactional.\n\n##### Rate Limits\n\nScope: API user + `storeId`\n\n| Maximum Quota | Restore |\n| --- | --- |\n| 10 requests | 1 request every 2 seconds |","operationId":"updateCampaigns","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvertisingCampaignUpdateRequest"}}},"required":true},"responses":{"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid or missing request parameter.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authenticated but missing a required OAuth scope or package permission.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized API key or store.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","headers":{"TS-Rate-Limit-Name":{"description":"Rate limit bucket name.","schema":{"type":"string"}},"TS-Rate-Limit-Maximum-Quota":{"description":"Maximum request quota for this rate limit bucket.","schema":{"type":"integer","format":"int32"}},"TS-Rate-Limit-Remaining":{"description":"Remaining request quota in the current bucket.","schema":{"type":"integer","format":"int32"}},"TS-Rate-Limit-Retry-After-Seconds":{"description":"Seconds to wait before retrying after the bucket is exhausted.","schema":{"type":"integer","format":"int32"}}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AdvertisingEntityUpdateResponse"}}}}},"x-rate-limit":{"name":"V2.AdvertisingManagement.Campaigns.Update","capacity":10,"restoreSecondsPerRequest":2,"scope":"apiUser+storeId"}}},"/v2/advertising-management/portfolios":{"patch":{"tags":["Amazon Ads Campaign Management"],"summary":"Update advertising portfolios","description":"Updates names and partial budgets for 1–100 portfolios. Omitted fields are preserved; NO_CAP clears amount and dates. Returns the standard per-item update result.\n\n##### Rate Limits\n\nScope: API user + `storeId`\n\n| Maximum Quota | Restore |\n| --- | --- |\n| 10 requests | 1 request every 2 seconds |","operationId":"updatePortfolios","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvertisingPortfolioUpdateRequest"}}},"required":true},"responses":{"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid or missing request parameter.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authenticated but missing a required OAuth scope or package permission.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized API key or store.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","headers":{"TS-Rate-Limit-Name":{"description":"Rate limit bucket name.","schema":{"type":"string"}},"TS-Rate-Limit-Maximum-Quota":{"description":"Maximum request quota for this rate limit bucket.","schema":{"type":"integer","format":"int32"}},"TS-Rate-Limit-Remaining":{"description":"Remaining request quota in the current bucket.","schema":{"type":"integer","format":"int32"}},"TS-Rate-Limit-Retry-After-Seconds":{"description":"Seconds to wait before retrying after the bucket is exhausted.","schema":{"type":"integer","format":"int32"}}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AdvertisingEntityUpdateResponse"}}}}},"x-rate-limit":{"name":"V2.AdvertisingManagement.Portfolios.Update","capacity":10,"restoreSecondsPerRequest":2,"scope":"apiUser+storeId"}},"post":{"tags":["Amazon Ads Campaign Management"],"summary":"Create advertising portfolios","description":"Creates 1–100 ENABLED portfolios with optional budgets. Currency follows the authorized Profile. Returns per-item Amazon results; local synchronization may complete later.\n\n##### Rate Limits\n\nScope: API user + `storeId`\n\n| Maximum Quota | Restore |\n| --- | --- |\n| 10 requests | 1 request every 2 seconds |","operationId":"createPortfolios","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvertisingPortfolioCreateRequest"}}},"required":true},"responses":{"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid or missing request parameter.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authenticated but missing a required OAuth scope or package permission.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized API key or store.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","headers":{"TS-Rate-Limit-Name":{"description":"Rate limit bucket name.","schema":{"type":"string"}},"TS-Rate-Limit-Maximum-Quota":{"description":"Maximum request quota for this rate limit bucket.","schema":{"type":"integer","format":"int32"}},"TS-Rate-Limit-Remaining":{"description":"Remaining request quota in the current bucket.","schema":{"type":"integer","format":"int32"}},"TS-Rate-Limit-Retry-After-Seconds":{"description":"Seconds to wait before retrying after the bucket is exhausted.","schema":{"type":"integer","format":"int32"}}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AdvertisingPortfolioCreateResponse"}}}}},"x-rate-limit":{"name":"V2.AdvertisingManagement.Portfolios.Create","capacity":10,"restoreSecondsPerRequest":2,"scope":"apiUser+storeId"}}}},"components":{"schemas":{"AdvertisingCampaignUpdateItemRequest":{"required":["campaignId"],"type":"object","properties":{"campaignId":{"type":"integer","description":"Amazon Ads campaign ID.","format":"int64"},"name":{"type":"string","description":"New campaign name. Must not be blank when supplied."},"state":{"type":"string","description":"Mutable advertising entity state. ARCHIVED is not supported.","enum":["ENABLED","PAUSED","ENABLED","PAUSED"]},"dailyBudget":{"type":"number","description":"New daily monetary budget. Must be greater than zero."},"portfolioId":{"type":"integer","description":"Existing portfolio ID in the same store. Omit to keep the current portfolio; explicitly pass null to remove the campaign from its portfolio. Also accepts portfolio_id as an input alias.","format":"int64","nullable":true}},"description":"Campaign updates. A request can contain 1 to 100 items."},"AdvertisingCampaignUpdateRequest":{"required":["items","storeId"],"type":"object","properties":{"storeId":{"type":"string","description":"Store ID in sellerId:marketplaceId format."},"items":{"type":"array","description":"Campaign updates. A request can contain 1 to 100 items.","items":{"$ref":"#/components/schemas/AdvertisingCampaignUpdateItemRequest"}}}},"AdvertisingCreateErrorResponse":{"type":"object","properties":{"code":{"type":"string"},"details":{"type":"string"},"fieldLocation":{"type":"string"}}},"AdvertisingEntityUpdateResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AdvertisingEntityUpdateResultResponse"}}}},"AdvertisingEntityUpdateResultResponse":{"type":"object","properties":{"index":{"type":"integer","format":"int32"},"entityId":{"type":"integer","format":"int64"},"status":{"type":"string","enum":["SUCCEEDED","PARTIALLY_SUCCEEDED","FAILED"]},"errors":{"type":"array","items":{"$ref":"#/components/schemas/AdvertisingManagementErrorResponse"}}}},"AdvertisingManagementErrorResponse":{"type":"object","properties":{"code":{"type":"string"},"details":{"type":"string"},"fieldLocation":{"type":"string"},"upstreamStatus":{"type":"integer","description":"HTTP status returned by Amazon Ads for a failed write group, when available.","format":"int32"},"upstreamResponse":{"type":"string","description":"Sanitized Amazon Ads response body for a failed write group, when available."}}},"AdvertisingPortfolioBudgetRequest":{"type":"object","properties":{"policy":{"type":"string","enum":["DATE_RANGE","MONTHLY_RECURRING","NO_CAP"]},"amount":{"type":"number","description":"Positive amount in the Profile currency. Omit to preserve on update."},"startDate":{"type":"string","description":"ISO date yyyy-MM-dd; null explicitly clears the date.","nullable":true},"endDate":{"type":"string","description":"ISO date yyyy-MM-dd; null explicitly clears the date.","nullable":true}},"description":"Optional budget. Omit to create without a budget cap."},"AdvertisingPortfolioCreateItemRequest":{"required":["name"],"type":"object","properties":{"name":{"type":"string","description":"Nonblank portfolio name."},"budget":{"$ref":"#/components/schemas/AdvertisingPortfolioBudgetRequest"}},"description":"One to one hundred portfolio create items."},"AdvertisingPortfolioCreateRequest":{"required":["portfolios","storeId"],"type":"object","properties":{"storeId":{"type":"string","description":"Store ID in sellerId:marketplaceId format."},"portfolios":{"type":"array","description":"One to one hundred portfolio create items.","items":{"$ref":"#/components/schemas/AdvertisingPortfolioCreateItemRequest"}}}},"AdvertisingPortfolioCreateResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AdvertisingPortfolioCreateResultResponse"}}}},"AdvertisingPortfolioCreateResultResponse":{"type":"object","properties":{"index":{"type":"integer","format":"int32"},"portfolioId":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["SUCCEEDED","PARTIALLY_SUCCEEDED","FAILED"]},"errors":{"type":"array","items":{"$ref":"#/components/schemas/AdvertisingCreateErrorResponse"}}}},"AdvertisingPortfolioUpdateItemRequest":{"required":["portfolioId"],"type":"object","properties":{"portfolioId":{"type":"string","description":"Positive canonical portfolio ID as a string."},"name":{"type":"string","description":"New nonblank name. Omit to preserve the current name."},"budget":{"$ref":"#/components/schemas/AdvertisingPortfolioBudgetRequest"}},"description":"One to one hundred portfolio update items."},"AdvertisingPortfolioUpdateRequest":{"required":["items","storeId"],"type":"object","properties":{"storeId":{"type":"string","description":"Store ID in sellerId:marketplaceId format."},"items":{"type":"array","description":"One to one hundred portfolio update items.","items":{"$ref":"#/components/schemas/AdvertisingPortfolioUpdateItemRequest"}}}},"AdvertisingSearchTermAssociatedProduct":{"type":"object","properties":{"campaignId":{"type":"string"},"adGroupId":{"type":"string"},"advertisedSku":{"type":"string"},"advertisedAsin":{"type":"string"},"parentAsin":{"type":"string"}},"description":"A product associated with the selected advertising group, not product-attributed search term metrics."},"AdvertisingSearchTermDetailListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AdvertisingSearchTermDetailResponse"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"resolvedProducts":{"type":"array","description":"Matched SP product/group associations for product-scoped detail queries, including the resolved child scope of parent ASINs. Returned once per response; match detail rows by campaignId and adGroupId. Empty for campaign/adGroup queries.","items":{"$ref":"#/components/schemas/AdvertisingSearchTermAssociatedProduct"}}}},"AdvertisingSearchTermDetailResponse":{"type":"object","properties":{"storeId":{"type":"string"},"adOrders":{"type":"integer","format":"int64"},"adSales":{"$ref":"#/components/schemas/Money"},"adSpend":{"$ref":"#/components/schemas/Money"},"impressions":{"type":"integer","format":"int64"},"clicks":{"type":"integer","format":"int64"},"conversionRate":{"type":"number"},"ctr":{"type":"number"},"acos":{"type":"number","description":"Advertising cost of sales as a decimal ratio. Null when advertising sales are zero.","nullable":true},"roas":{"type":"number","description":"Return on advertising spend. Null when advertising spend is zero.","nullable":true},"cpc":{"$ref":"#/components/schemas/Money"},"cpa":{"$ref":"#/components/schemas/Money"},"resultType":{"type":"string"},"searchTerm":{"type":"string"},"searchTermAsin":{"type":"string"},"campaignId":{"type":"string"},"campaignName":{"type":"string"},"adGroupId":{"type":"string"},"adGroupName":{"type":"string"},"triggerType":{"type":"string","enum":["keyword","target"]},"triggerId":{"type":"string"},"triggerText":{"type":"string"},"matchType":{"type":"string"}},"description":"Date-range metrics for one campaign, ad group, triggering keyword/target and search term. Metrics are not attributable to each associated product."},"CategoryInsightBenchmark":{"type":"object","properties":{"searchToPurchaseRatio":{"type":"number","description":"Product-type average search-to-purchase ratio as a decimal, not an average of the returned curve."},"returnRatio":{"type":"number","description":"Product-type average return ratio as a decimal."}},"description":"Product type averages for comparison with category metrics."},"CategoryInsightCategory":{"type":"object","properties":{"categoryId":{"type":"string","description":"Amazon browse-node/category ID, never an advertising keyword ID."},"categoryName":{"type":"string"},"rootCategoryId":{"type":"string"},"rootCategoryName":{"type":"string"},"productTypeId":{"type":"string"},"productTypeName":{"type":"string"}}},"CategoryInsightComparison":{"type":"object","properties":{"current":{"$ref":"#/components/schemas/CategoryInsightSeries"},"previous":{"$ref":"#/components/schemas/CategoryInsightSeries"}}},"CategoryInsightDetailResponse":{"type":"object","properties":{"marketplaceId":{"type":"string"},"period":{"type":"string"},"status":{"type":"string","description":"MATCHED or NO_MATCH. A missing detail does not imply zero market demand."},"category":{"$ref":"#/components/schemas/CategoryInsightCategory"},"metrics":{"$ref":"#/components/schemas/CategoryInsightMetrics"},"productTypeAverage":{"$ref":"#/components/schemas/CategoryInsightBenchmark"},"trends":{"$ref":"#/components/schemas/CategoryInsightTrends"},"yearOverYear":{"$ref":"#/components/schemas/CategoryInsightYearOverYear"},"popularSearchTerms":{"type":"array","description":"Most popular search terms and source search-volume values; not advertising keywords or category IDs.","items":{"$ref":"#/components/schemas/CategoryInsightLabelValue"}},"returnReasons":{"type":"array","description":"Return reasons and decimal shares (0.23 means 23%). Selected reasons need not sum to one.","items":{"$ref":"#/components/schemas/CategoryInsightLabelValue"}},"starRatings":{"type":"array","description":"Source rating-bucket weights/counts, not percentages or confirmed review counts. 4+ is a grouped bucket.","items":{"$ref":"#/components/schemas/CategoryInsightLabelValue"}},"productFeatures":{"type":"array","description":"Source feature snapshot; no period selector exists for these scores. Do not attribute it to the selected reporting window.","items":{"$ref":"#/components/schemas/CategoryInsightFeature"}}}},"CategoryInsightFeature":{"type":"object","properties":{"name":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/CategoryInsightFeatureOption"}}},"description":"Source feature snapshot; no period selector exists for these scores. Do not attribute it to the selected reporting window."},"CategoryInsightFeatureOption":{"type":"object","properties":{"id":{"type":"string","description":"Opaque source feature-option identifier."},"name":{"type":"string"},"score":{"type":"number","description":"Source popularity/demand score. Compare only within this feature group; not sales, conversion rate or market share."}}},"CategoryInsightItem":{"type":"object","properties":{"category":{"$ref":"#/components/schemas/CategoryInsightCategory"},"metrics":{"$ref":"#/components/schemas/CategoryInsightMetrics"}}},"CategoryInsightLabelValue":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"number","description":"Source distribution value. See enclosing field for units; never assume percentage."}},"description":"Source rating-bucket weights/counts, not percentages or confirmed review counts. 4+ is a grouped bucket."},"CategoryInsightListResponse":{"type":"object","properties":{"marketplaceId":{"type":"string"},"period":{"type":"string"},"sortBy":{"type":"string"},"sortOrder":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/CategoryInsightItem"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"CategoryInsightMetrics":{"type":"object","properties":{"unitsSold":{"type":"number","description":"Precomputed category units sold, not sales of the searched ASIN. Summary snapshots may include a boundary bucket omitted from 12-month displayed curves."},"netSales":{"type":"number","description":"Category net sales in currencyCode from the same summary snapshot used for sorting. Negative values are preserved. Detail falls back to source buckets only when the summary record is absent; displayed 12-month curves may omit a boundary bucket included in the summary."},"currencyCode":{"type":"string"},"glanceViews":{"type":"number","description":"Combined product detail-page glance views."},"searchVolume":{"type":"number","description":"Combined keyword search volume for the category."},"clickCount":{"type":"number"},"searchToPurchaseRatio":{"type":"number","description":"Decimal ratio: 0.002 means 2 per mille. Source per-mille values are divided by 1000."},"returnRatio":{"type":"number","description":"Decimal ratio: 0.06 means 6 percent. Source percent values are divided by 100."},"asinCount":{"type":"number"},"newAsinCount":{"type":"number"},"newBrandCount":{"type":"number"},"sellerCount":{"type":"string","description":"Source seller count range, e.g. >1000. Not an exact count; null means unavailable."}}},"CategoryInsightPoint":{"type":"object","properties":{"date":{"type":"string","description":"Source bucket date (YYYY-MM-DD); not necessarily an individual day."},"value":{"type":"number"}},"description":"Date-sorted source buckets. Missing buckets are not fabricated; 12-month series exclude the latest source bucket as on PC. Boundary buckets may be partial."},"CategoryInsightSeries":{"type":"object","properties":{"granularity":{"type":"string","description":"DAY, WEEK, or MONTH according to the source reporting window."},"unit":{"type":"string","description":"UNITS, CURRENCY, VIEWS, SEARCHES, or CLICKS."},"currencyCode":{"type":"string","description":"Currency code for CURRENCY series, otherwise null."},"points":{"type":"array","description":"Date-sorted source buckets. Missing buckets are not fabricated; 12-month series exclude the latest source bucket as on PC. Boundary buckets may be partial.","items":{"$ref":"#/components/schemas/CategoryInsightPoint"}}},"description":"Source prior-year monthly series, retained with original dates; compare aligned months, not array positions."},"CategoryInsightTrends":{"type":"object","properties":{"unitsSold":{"$ref":"#/components/schemas/CategoryInsightSeries"},"netSales":{"$ref":"#/components/schemas/CategoryInsightSeries"},"glanceViews":{"$ref":"#/components/schemas/CategoryInsightSeries"},"searchVolume":{"$ref":"#/components/schemas/CategoryInsightSeries"},"clickCount":{"$ref":"#/components/schemas/CategoryInsightSeries"}}},"CategoryInsightYearOverYear":{"type":"object","properties":{"unitsSold":{"$ref":"#/components/schemas/CategoryInsightComparison"},"glanceViews":{"$ref":"#/components/schemas/CategoryInsightComparison"}}},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string"},"details":{"type":"string"},"upstreamStatus":{"type":"integer","description":"HTTP status returned by an upstream service, when available.","format":"int32"},"upstreamResponse":{"type":"string","description":"Sanitized upstream response body, when available."},"requiredScopes":{"type":"array","description":"OAuth scopes required by the requested operation, when authorization is insufficient.","items":{"type":"string","description":"OAuth scopes required by the requested operation, when authorization is insufficient."}},"missingScopes":{"type":"array","description":"OAuth scopes missing from the access token, when authorization is insufficient.","items":{"type":"string","description":"OAuth scopes missing from the access token, when authorization is insufficient."}},"reauthorizationRequired":{"type":"boolean","description":"Whether the client must ask the user to authorize additional OAuth permissions."}}},"Money":{"type":"object","properties":{"currencyAmount":{"type":"number","description":"Amount in the specified currency."},"currencyCode":{"type":"string","description":"ISO 4217 currency code."}}},"Pagination":{"type":"object","properties":{"offset":{"type":"integer","description":"Zero-based offset of the current page.","format":"int32"},"limit":{"type":"integer","description":"Maximum number of items requested.","format":"int32"}}},"ProductDetailResponse":{"type":"object","properties":{"storeId":{"type":"string","description":"Authorized store identifier in sellerId:marketplaceId format."},"sku":{"type":"string","description":"Exact seller SKU of this listing; commas are literal characters."},"productType":{"type":"string","description":"Amazon product type from the listing summary for the requested marketplace."},"title":{"type":"string","description":"Seller-submitted listing title from item_name for the requested marketplace; absent when unavailable. May differ from the retail detail-page title."},"itemHighlights":{"type":"string","description":"Item Highlights displayed with the title, distinct from bullet points. Amazon title_differentiation attribute; absent when unavailable. Shoppers only see Item Highlights when the item name is 75 characters or fewer; a returned value does not guarantee retail visibility."},"genericKeywords":{"type":"string","description":"Seller-submitted Generic Keywords (backend search terms), from generic_keyword; absent when unavailable. Not shopper-visible content."},"bulletPoints":{"type":"array","description":"Seller-submitted bullet points from bullet_point for the requested marketplace, in returned order. Empty array when unavailable.","items":{"type":"string","description":"Seller-submitted bullet points from bullet_point for the requested marketplace, in returned order. Empty array when unavailable."}},"description":{"type":"string","description":"Seller-submitted product description from product_description; preserves original text and HTML. Absent when unavailable. Does not include A+ content."},"mainImageUrl":{"type":"string","description":"Main image URL from the requested marketplace listing attributes, falling back to its listing summary. Absent when unavailable; retail page display may differ."},"otherImageUrls":{"type":"array","description":"Additional image URLs from listing image slots 1-9 in slot order, deduplicated and excluding the main image. Empty array when unavailable.","items":{"type":"string","description":"Additional image URLs from listing image slots 1-9 in slot order, deduplicated and excluding the main image. Empty array when unavailable."}}}},"ProductIssueResponse":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string"}}},"ProductListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ProductResponse"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"ProductResponse":{"type":"object","properties":{"sku":{"type":"string"},"asin":{"type":"string"},"parentAsin":{"type":"string"},"title":{"type":"string"},"imageUrl":{"type":"string"},"fulfillmentChannel":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","INACTIVE","INCOMPLETE","UNKNOWN"]},"price":{"type":"number"},"currencyCode":{"type":"string"},"updatedAt":{"type":"string"}}},"ProductUpdateItem":{"minProperties":2,"required":["sku"],"type":"object","properties":{"sku":{"maxLength":200,"minLength":1,"type":"string","description":"Exact seller SKU; commas are literal characters.","example":"SKU-001"},"price":{"maximum":1000000000000,"minimum":0,"exclusiveMinimum":true,"type":"number","description":"Ordinary selling price in the store currency. JSON number only; at most 18 significant digits, 12 integer digits and 6 decimal places. Promotional price is unchanged. Omit to preserve.","example":19.99},"title":{"maxLength":2000,"minLength":1,"type":"string","description":"Replacement title in the listing's existing language. Omit to preserve."},"itemHighlights":{"maxLength":125,"minLength":1,"type":"string","description":"Replacement Item Highlights, distinct from bullet points, in the listing's existing language. Maps to title_differentiation. Omit to preserve; null or blank cannot clear it. Shoppers only see Item Highlights when the item name is 75 characters or fewer. This is display guidance, not a local submission limit; Amazon validates whether an update is accepted. Titles are never automatically shortened."},"genericKeywords":{"maxLength":10000,"minLength":1,"type":"string","description":"Replacement Generic Keywords (backend search terms) in the listing's existing language. Replaces the complete text, not an append. Omit to preserve; null or blank cannot clear it. 10000 characters is a request-size guard, not Amazon's limit; Amazon marketplace/product-type byte limits and acceptance rules apply."},"bulletPoints":{"maxItems":10,"minItems":1,"type":"array","description":"Replaces the complete bullet-point set in the listing's existing language. Omit to preserve; an empty array cannot clear it.","items":{"maxLength":4000,"minLength":1,"type":"string","description":"Nonempty bullet text."}},"description":{"maxLength":10000,"minLength":1,"type":"string","description":"Replacement product description in the listing's existing language. Omit to preserve."}},"additionalProperties":false,"description":"Requires sku and at least one of price, title, bulletPoints, description, itemHighlights or genericKeywords. Explicit null and unknown fields are rejected. Text must contain non-whitespace characters. Amazon product-type constraints also apply."},"ProductUpdateRequest":{"required":["items","storeId"],"type":"object","properties":{"storeId":{"minLength":1,"type":"string","description":"Authorized sellerId:marketplaceId.","example":"SELLER:ATVPDKIKX0DER"},"items":{"maxItems":5,"minItems":1,"type":"array","description":"Distinct seller SKUs; duplicate SKU values are rejected, even if their requested changes differ.","items":{"$ref":"#/components/schemas/ProductUpdateItem"}}},"additionalProperties":false,"description":"Direct update of 1-5 distinct seller SKUs in one authorized store. Unknown fields and explicit null values are rejected. Omitted change fields are preserved."},"ProductUpdateResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ProductUpdateResultResponse"}}}},"ProductUpdateResultResponse":{"type":"object","properties":{"index":{"type":"integer","format":"int32"},"sku":{"type":"string"},"status":{"type":"string","description":"REST item outcome: ACCEPTED means Amazon accepted the submission, not verified live; FAILED means validation/preflight failed or Amazon rejected the submission (see errorCode/issues); INDETERMINATE means the write outcome is unknown and must be reconciled before retrying; SKIPPED_STALE means attributes changed after preparation, so no update was submitted. This REST endpoint does not simulate execution.","enum":["ACCEPTED","FAILED","INDETERMINATE","SKIPPED_STALE"]},"submissionId":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"issues":{"type":"array","items":{"$ref":"#/components/schemas/ProductIssueResponse"}}}}}}}
|