This skill and linkfox-amazon-store-auth both belong to the Amazon Store series: relies on authorized store selection (sellerId+region); forwards SP-API via POST /spApi/developerProxy (do not pass amzAccessToken, unless compatible with legacy calls).
Covers Plan A modules:
- Inbound Eligibility v1(inbound/mixed-SKU eligibility preview)
- FBA Inventory v1(in-warehouse inventory)
- Fulfillment Inbound v2024-03-20(current inbound workflow) + v0 retained queries
- Fulfillment Outbound 2020-07-01(MCF multi-channel fulfillment)
Does not include: FBA Small and Light (deprecated), External Fulfillment (see linkfox-amazon-store-external-fulfillment)、Merchant Fulfillment(MFN)。
How to call
- Unified entry point:
python scripts/fba_api.py '{"api":"<operationId>","sellerId":"...","region":"NA",...}' [--inline] - Single-interface script:
python scripts/<脚本名>.py '<JSON>' [--inline](full comparison seereferences/capabilities.md) - Write operation body: prefer passing
requestBody; business fields can also be flattened in JSON (the script will exclude sellerId/region/path/query and then assemble the body) - Query: declaration fields are passed directly; or use the
queryobject /queryStringoverride - Cost constraints: on failure/empty result, do not automatically paginate or continuously probe; before continuing, first explain that additional consumption may occur
Output strategy: full response is written to disk at linkfox/<date>/<session>/data/linkfox-amazon-store-fba-*.json; >8KB defaults to summary;--inline prints in full.
Resolve authentication and compute issues
When an API Key is not configured, 401/402 occurs, or compute is insufficient, use references/onboarding.md guidance.
Prerequisites
- Depends on
linkfox-amazon-store-auth:python scripts/check_auth_dependency.py(exit 42 → install auth first) - The application needs Amazon Fulfillment and other related roles (subject to the Amazon console)
- The gateway must allow the path prefix:
fba/、inbound/fba/(if encountering 1005 , ask the backend to whitelist it)
Current Capabilities
Total 70 operations. Module table:
| Module | Count | Description |
|---|---|---|
| eligibility | 1 | getItemEligibilityPreview |
| inventory | 4 | summaries / create / delete / add |
| inbound_v0 | 6 | prep / labels / BOL / shipments / items |
| inbound (2024-03-20) | 45 | InboundPlan full workflow |
| outbound (2020-07-01) | 14 | MCF fulfillment |
Full Operation ↔ path ↔ script table: see references/capabilities.md
Machine-readable registry:scripts/_fba_endpoints.py、references/operations.json
Quick Parameters
getItemEligibilityPreview
- Required:
asin、program(INBOUND|COMMINGLING) program=INBOUNDwhenmarketplaceIdsis requiredmarketplaceId(or
python scripts/get_item_eligibility_preview.py '{"sellerId":"A1...","region":"NA","asin":"B0...","program":"INBOUND","marketplaceId":"ATVPDKIKX0DER"}'
getInventorySummaries
- Required:
granularityType(usuallyMarketplace)、granularityId(marketplaceId)、marketplaceIds - Optional:
details、sellerSkus、startDateTime、nextToken
Inbound / Outbound write operations
For complex schemas, use requestBody to pass the full JSON according to the official model; path parameters (such as inboundPlanId、shipmentId、sellerFulfillmentOrderId) are placed alongside query fields in the input parameters.
After asynchronous steps (generate*Options, etc.) return, use getInboundOperationStatus to poll (do not poll frequently without authorization; obtain user consent first).
Scripts
export LINKFOXAGENT_API_KEY="<your-key>"
# 统一入口
python scripts/fba_api.py '{"api":"getItemEligibilityPreview","sellerId":"A1...","region":"NA","asin":"B0...","program":"INBOUND","marketplaceIds":["ATVPDKIKX0DER"]}'
python scripts/fba_api.py '{"api":"getInventorySummaries","sellerId":"A1...","region":"NA","granularityType":"Marketplace","granularityId":"ATVPDKIKX0DER","marketplaceIds":["ATVPDKIKX0DER"],"details":true}'
python scripts/fba_api.py '{"api":"listInboundPlans","sellerId":"A1...","region":"NA","pageSize":10}'
Shared module:_spapi_fba_common.py、_fba_endpoints.py、_fba_runner.py(not a standalone CLI).
Display Rules
- First look at
developerProxy.errcode/httpStatus, then look at parsed fieldspayload - 202/204 may have no body; determine success by status code
- Do not confuse Inbound 2024 with v0's
getShipments/getShipment: the v0 script isget_shipments_v0.py; the 2024 shipment isget_inbound_shipment.py - and
linkfox-amazon-store-orders、linkfox-amazon-store-external-fulfillmentClear boundaries, do not mix usage
Important Limitations
- Outbound 2026-07-04 Not included in this skill (Option A)
- Small and Light is deprecated and not implemented
- The Inbound state machine is complex and must be called in the official workflow order; conflicts are common 409/422
- Rate limits vary by API (Eligibility is about 1 rps), note 429
Amazon SP-API API Protection and Retry Guidelines
When the same store continuously receives 400, 403, 404, or 429 from Amazon SP-API, the gateway returns 450, 453, 454, or 459 and briefly cools down. These custom status codes are not native Amazon statuses and do not indicate account suspension; the purpose is to avoid continuous anomalies or high-frequency calls increasing store risk.
| 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 APIs of the store | 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, and do not bypass protection by switching scripts or repeatedly creating tasks; prioritize following
retryAfter、blockedUntil, and when there is none, follow the durations described 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.
- Keep existing
reportId、feedIdand 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 may 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 indicate account suspension, 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 (subject to actual gateway billing).
Feedback: skillName:linkfox-amazon-store-fba
More cross-border skills:LinkFox Skills