SuperAPI AI Directory

linkfox-amazon-store-fulfillment-outbound

Office & productivity

View repository

Updated 10-16 09:21

About this skill

Amazon Store Fulfillment Outbound

Use this Skill for Amazon Multi-Channel Fulfillment workflows on Fulfillment Outbound v2026-07-04. It exposes all nine operations in Amazon's current Outbound model plus the overview page's associated getInvoiceHeaders operation from Invoices v2026-06-25, while keeping the existing production linkfox-amazon-store-fba and linkfox-amazon-store-external-fulfillment implementations untouched.

Prerequisites

  1. Require linkfox-amazon-store-auth. Run python scripts/check_auth_dependency.py; exit code 42 means the dependency must be installed or loaded first.
  2. Select one authorized store and obtain its sellerId and region. Accept only NA, EU, or FE.
  3. Never accept or forward amzAccessToken, accessToken, or refreshToken; the server resolves authorization from sellerId + region.
  4. Read references/api.md for operation contracts and references/workflows.md before a create, update, or cancel action.
  5. After explicit user confirmation, pass boolean confirmWrite: true to createOrder, updateOrder, cancelOrder, updateOrderStatus, or updatePackage; the wrappers reject writes without it.
  6. When Amazon assigned a multi-tenant service identifier, pass it only as top-level fulfillmentServiceId (1–40 characters). The proxy maps it to x-amzn-fulfillment-service-id; never put the raw header name in query or body.

Invocation Method

  • API Endpoint:POST /spApi/developerProxy(For complete parameters/responses/error codes see references/api.md)
  • Python Script:python scripts/<operation_script>.py '<JSON 参数>' [--inline] [--no-cache]
  • Invocation Constraints: This tool follows the unified free configuration of Amazon Store Skill; the same parameter combination in the same session is by default invoked only once, and the script has a 24h local cache. On failure/empty results, do not automatically change parameters, paginate, or repeatedly probe; if further invocation is needed, obtain user consent first.

Output Strategy (Script Default Behavior):

  • Alwayswrite the full response to <cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-amazon-store-fulfillment-outbound-<timestamp>.json(<session> taken from SESSION_ID; writing to /tmpis prohibited; if the current directory is not writable, report an error)
  • Response body ≤ 8 KB: after writing to disk, print the full JSON to stdout
  • Response body > 8 KB: after writing to disk, stdout outputs only a summary (top-level fields, common counts, maximum list field length, and first 3 samples)
  • Add --inline to force full printing to stdout (also written to disk)
  • Add --no-cache to force this read/preview operation to access the gateway; use only when the user requests a refresh or has confirmed an external state change

Data Reading Suggestions: look at the summary first; when specific fields are needed, use jq or ConvertFrom-Json to extract on demand from the saved file.

Operation Guide

Stage Operation Script Availability
Quote getOffers get_offers.py Production
Preview getOrderPreview get_order_preview.py Production
Create createOrder create_order.py Production
Read getOrder get_order.py Production
List listOrders list_orders.py Production
Release hold / update updateOrder update_order.py Production
Cancel cancelOrder cancel_order.py Production
Simulate order status updateOrderStatus update_order_status.py Amazon dynamic sandbox only
Simulate package status updatePackage update_package.py Amazon dynamic sandbox only
List invoice headers getInvoiceHeaders get_invoice_headers.py Production, Invoices v2026-06-25

Workflow Rules

  1. Use getOffers for multi-SKU delivery options and expiration times; use getOrderPreview for planned shipments, fees, constraints, and fulfillability.
  2. Show the chosen store, destination, line items, service tier, fees, hold/ship action, and orderId before createOrder.
  3. Treat orderId and every lineItemId as seller-controlled idempotency identifiers. Never invent a replacement ID after an uncertain timeout.
  4. A createOrder response can be HTTP 200 or 202. On 202, use the returned/requested orderId with getOrder; do not automatically poll.
  5. Use updateOrder only to update the supported fulfillment configuration, currently the HOLD/SHIP action. Confirm before releasing a held order.
  6. Confirm before cancelOrder. Amazon only stops fulfillment where cancellation is still possible; do not present 202 as completed cancellation.
  7. Add shipments: "INCLUDE" to getOrder or listOrders when package and tracking details are needed.
  8. Never automatically replay POST/PUT after 429, 500, 503, or a timeout. Recover with getOrder where possible.
  9. Use getInvoiceHeaders only for header-level invoice discovery. Require marketplaceId; provide both issue-date bounds or neither, keep the range within 90 days, and page with nextToken only after user approval.

Important Limitations

  • updateOrderStatus and updatePackage are marked x-amzn-api-sandbox-only: true by Amazon. Consistent with the existing FBA skill, their wrappers use the same /spApi/developerProxy request shape as every other operation and do not accept or send a separate sandbox control field. Use them only with sandbox test data; availability depends on the unified gateway/upstream route.
  • The optional x-amzn-fulfillment-service-id multi-tenant header is exposed only through the typed top-level fulfillmentServiceId parameter. Raw header names, nested aliases, blank values, values over 40 characters, and newline characters are rejected before calling the gateway.
  • Amazon's Outbound overview role list mentions getInvoiceHeaders, but its Reference path is /finances/invoices/2026-06-25/invoices. This Skill exposes it as an explicitly labeled related Invoices operation; it is not counted among the nine Outbound OpenAPI operations and does not accept fulfillmentServiceId.
  • Legacy v2020-07-01 returns, features, and package-tracking operations remain in the production FBA Skill and are not copied into this current-version Skill. Read references/migration.md when migrating.

Display Rules

  • Present Amazon data and identifiers without exposing internal tool names or access tokens.
  • Separate operation success from business completion: show gateway errcode, Amazon httpStatus, order status, constraints, and next action.
  • For offers and previews, show expiration, service tier, delivery interval, currency, price, and item constraints together.
  • For orders, show orderId, status, line items, shipments, packages, tracking, proof of delivery, drop-off/locker details, unit identifiers, and pagination token only when present.

User Expression

Ask: “Check MCF delivery options for these Amazon SKUs to this postal code.”

Do: use getOffers; do not create an order.

Ask: “Preview and then create this MCF order.”

Do: run getOrderPreview, present constraints and fees, obtain confirmation, then run createOrder once.

Ask: “Track my MCF order.”

Do: run getOrder with shipments: "INCLUDE"; do not call the legacy tracking operation.

Feedback

Report issues with skillName: linkfox-amazon-store-fulfillment-outbound, operation, masked IDs, resolved path, gateway status, and Amazon response summary. Never include credentials.

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 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 store APIs More than 2 times within 60 seconds: 5 minutes; more than 4 times within 10 minutes: 30 minutes Stop invoking for 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; preferentially follow retryAfter、blockedUntil, and when unavailable, follow the durations stated in the table.
  • For 450/453/454, first correct the parameters, authorization, or resource identifier, and after the cooldown retry cautiously at most once; if triggered again, stop invoking. During 453, stop all SP-API for that store.
  • Keep existing reportId、feedId Wait for the task ID; when the result of a write operation is uncertain, query the status first instead of replaying it directly.
  • First explain store protection to the user, then give the reason, handling, and waiting time. You can reply: "To protect your Amazon store security, we detected that Amazon SP-API continuously returned {reason}, and a brief protection period has now been activated. Please first {handling action}, and try again after an estimated {waiting time}; this does not mean 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).


More cross-border Skills:LinkFox Skills