SuperAPI AI Directory

linkfox-amazon-store-aplus-content

General & other

View repository

Updated 10-16 00:00

About this skill

Amazon store A+ Content Management

This skill, together with linkfox-amazon-store-auth、linkfox-amazon-store-listings , belongs to the same Amazon Store series: it relies on auth for store selection (sellerId+region); directly POST /spApi/developerProxy pass in sellerId+region, and the server parses the token (do not pass amzAccessToken, unless for compatibility with legacy calls). Forward upstream GET or POST。

Operation Official reference
Search document list searchContentDocuments
Create document createContentDocument
Get document (content/metadata) getContentDocument
Update document updateContentDocument
List ASIN associations listContentDocumentAsinRelations
Replace ASIN associations postContentDocumentAsinRelations
Validate document and ASIN validateContentDocumentAsinRelations
Query publish records by ASIN searchContentPublishRecords
Submit for review/publish postContentDocumentApprovalSubmission
Pause storefront display postContentDocumentSuspendSubmission

How to call

  • API endpoint:POST /spApi/developerProxy(different operations are distinguished by the request body; for complete parameters/responses/error codes see references/api.md)
  • Python script:python scripts/<脚本名>.py '<JSON 参数>' [--inline](available scripts are listed in the script overview above)
  • Cost constraint: this tool consumes compute; on failure/empty results, do not automatically switch keywords, paginate, or repeatedly probe; if you need to continue searching, first explain to the user that additional consumption will be incurred.

Output strategy (default script behavior):

  • Alwayswrite the complete response to <cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-amazon-store-aplus-content-<timestamp>.json(<cwd> is the working directory when the script runs, which in Claude Code is the current project directory;<session> is taken from the environment variable SESSION_ID, automatically aggregated according to the user's task;writing to /tmp is prohibited, and if the current directory is not writable, report an error)
  • Response body ≤ 8 KB: after writing to disk, print the complete JSON to stdout
  • Response body > 8 KB: after writing to disk, stdout outputs only a summary (top-level fields, common counts such as total/costToken, length of the largest list field + first 3 samples)
  • Add --inline to force full printing to stdout (also written to disk)

Data reading suggestions: first look at the summary to determine whether it is sufficient; when specific fields are needed, prefer jqorConvertFrom-Json to extract on demand from the saved json file, avoiding bringing the entire JSON into context.


Resolve authentication and compute issues

When the following abnormal situations occur, use references/onboarding.md to guide resolution:

Abnormal situations

  • API Key not configured: the environment variable is not configured LINKFOX_AGENT_API_KEY, and LINKFOXAGENT_API_KEY。
  • Response 401 or 402 status code
  • Response indicates insufficient compute or balance: the message contains "insufficient compute balance/insufficient billing/insufficient balance/quota exceeded/insufficient balance/package expired/recharge required/please recharge", or similar meaning.

Prerequisites (must read first)

This skill depends on linkfox-amazon-store-auth。

  1. Run python scripts/check_auth_dependency.py; if exit code 42 and stderr contains DEPENDENCY_MISSING:, please first install linkfox-amazon-store-auth。
  2. Do notBypass dependency implementation authorization or token logic within this skill.

Current Capabilities

Capability Path key points Script
Search A+ documents aplus/2020-11-01/contentDocuments + marketplaceId scripts/search_content_documents.py
Create A+ document Same as above POST + body contentDocument scripts/create_content_document.py
Get a single document .../contentDocuments/{contentReferenceKey} + includedDataSet(required, at least 1 item) scripts/get_content_document.py
Update document Same as above POST + body scripts/update_content_document.py
List associated ASINs .../contentDocuments/{key}/asins scripts/list_content_document_asin_relations.py
Fully replace associated ASINs .../asins POST + body asinSet scripts/post_content_document_asin_relations.py
Validate availability with ASINs .../contentAsinValidations POST scripts/validate_content_document_asin_relations.py
Publish records (by ASIN) .../contentPublishRecords + asin scripts/search_content_publish_records.py
Submit for review .../approvalSubmissions POST scripts/post_content_document_approval_submission.py
Pause display .../suspendSubmissions POST scripts/post_content_document_suspend_submission.py

Note:postContentDocumentAsinRelations is full replacement asinSet; removing an ASIN from the collection will cause the content on that ASIN to be suspend(subject to Amazon behavior). See references/api.md。


Quick Parameters

General

Field Required Description
sellerId Yes Authorized Seller ID (consistent with storeTokens )
region Yes NA / EU / FE
marketplaceId or marketplaceIds Yes Target marketplace; when an array, the script only takes the first

contentReferenceKey

Most operations require contentReferenceKey(from searchContentDocuments , etc.). The official documentation states that this key is not a permanent linkand may change in the future.

getContentDocument

Field Required Description
includedDataSet Yes At least one item;CONTENTS、METADATA(can coexist)

searchContentPublishRecords

Field Required Description
asin Yes Length ≥ 10

Scripts

  • scripts/search_content_documents.py
  • scripts/create_content_document.py
  • scripts/get_content_document.py
  • scripts/update_content_document.py
  • scripts/list_content_document_asin_relations.py
  • scripts/post_content_document_asin_relations.py
  • scripts/validate_content_document_asin_relations.py
  • scripts/search_content_publish_records.py
  • scripts/post_content_document_approval_submission.py
  • scripts/post_content_document_suspend_submission.py
  • scripts/check_auth_dependency.py

Example:

export LINKFOXAGENT_API_KEY="<your-key>"

python scripts/search_content_documents.py '{"sellerId":"A1...","region":"NA","marketplaceId":"ATVPDKIKX0DER"}'

python scripts/get_content_document.py '{"sellerId":"A1...","region":"NA","marketplaceId":"ATVPDKIKX0DER","contentReferenceKey":"YOUR_KEY","includedDataSet":["CONTENTS","METADATA"]}'

python scripts/post_content_document_asin_relations.py '{"sellerId":"A1...","region":"NA","marketplaceId":"ATVPDKIKX0DER","contentReferenceKey":"YOUR_KEY","asinSet":["B0XXXXXXXXXX"]}'

python scripts/search_content_publish_records.py '{"sellerId":"A1...","region":"NA","marketplaceId":"ATVPDKIKX0DER","asin":"B0XXXXXXXXXX"}'

python scripts/post_content_document_approval_submission.py '{"sellerId":"A1...","region":"NA","marketplaceId":"ATVPDKIKX0DER","contentReferenceKey":"YOUR_KEY"}'

Display Rules

  1. First display the gateway errcode / httpStatus; after success, then parse developerProxy.body or the *Response field attached to each script.
  2. Note that contentReferenceKey may not be consistent with the "A+ ID" on the frontend.
  3. Confirm user intent before write operations (create/update/associate/validate/submit/pause);replace ASINs and pause display affect the live detail page.

Important Limitations

  • Application permissions: The Seller Central application must have A+ Content-related roles/permissions; otherwise 403。
  • Whitelist:aplus/2020-11-01/ must be allowed in the gateway developerProxy;1005 requires operations configuration.
  • contentDocument The structure is complex and must conform to the Amazon official model; this skill only passes through and does not include built-in template validation.
  • marketplaceId: The A+ API Query uses the singular marketplaceId(different from Listings' marketplaceIds ).

Amazon SP-API Interface Protection and Retry Guidelines

When the same store continuously receives 400, 403, 404, or 429 from Amazon SP-API, the gateway will return 450, 453, 454, or 459 and briefly cool down. These custom status codes are not native Amazon statuses and do not indicate account suspension; the purpose is to avoid expanding store risk due to continuous anomalies or high-frequency calls.

Status and message Scope Trigger and cooldown Handling
450:400,请求异常,请优化您的参数 Store+API More than 3 times within 60 seconds: 5 minutes; more than 4 times within 10 minutes: 20 minutes Stop retrying with the original parameters; check required fields, marketplace, ID, date, and request body
453:403,店铺未授权,请先授权 All store APIs More than 2 times within 60 seconds: 5 minutes; more than 4 times within 10 minutes: 30 minutes Stop calling this store; check authorization, permissions, store ownership, and region
454:404,资源不存在,请优化您的参数 Store + API More than 3 times within 60 seconds: 5 minutes; more than 4 times within 10 minutes: 30 minutes Confirm the resource ID, owning store/site, resource status, and API path
459:429限流中,请降低频率 Store + API First time: 15 seconds; more than 2 times within 2 minutes: 30 seconds; more than 4 times within 3 minutes: 2 minutes Reduce concurrency, pagination, and polling frequency and back off step by step
  • Immediately stop automatic or concurrent retries; do not bypass protection by switching scripts or repeatedly creating tasks; give priority to following retryAfter、blockedUntil; when there is none, follow the duration description in the table.
  • For 450/453/454, you must first correct the parameters, authorization, or resource identifier, and after cooldown retry cautiously at most once; if triggered again, stop calling. During 453, stop all SP-API for that store.
  • Preserve existing reportId、feedId and other task IDs; when the result of a write operation is uncertain, query the status first and do not directly replay.
  • First explain store protection to the user, then give the reason, handling, and wait time. You can reply: "To protect the security of your Amazon store, it has been detected that Amazon SP-API continuously returned {reason}, and a brief protection period is currently in effect. Please first {handling action}, and try again after an estimated {wait time}; this does not mean the account is banned, nor is it a plan or computing power limit." Do not only say "LinkFox rate limiting" or "server busy".

Computing power consumption rules

No computing power is consumed.

Feedback: See references/api.md,skillName:linkfox-amazon-store-aplus-content。


More cross-border skills:LinkFox Skills