Set Route Lead Time
PUT/api/amazon/:integrationInstance/fba-route-lead-times
Set a manual lead-time override for one route row, optionally make that route the region's primary route, and/or switch the account's "plan with p80" toggle.
This endpoint currently requires session authentication; Personal Access Token scope support is in progress.
Body fields:
- region_code (string, required unless only plan_with_p80 is sent): an FBA region of the account (country code, or EU)
- route_type (required with region_code): supplier | own_warehouse | third_party_warehouse | awd
- source_id (nullable, integer): supplier id (supplier route) or warehouse id; null = the all-sources row. Must exist (422 Supplier not found / Warehouse not found)
- manual_days (optional, nullable, integer 1–365): the override; null clears it; omit to leave it unchanged. On the all-sources row (source_id null) it applies only to sources of the route with no measurement (3+ samples) or override of their own
- make_primary (optional, boolean): make this route the region's primary route (used by days-of-cover floors and FBA replenishment)
- plan_with_p80 (optional, boolean): plan with the 80th percentile instead of the median for every route of the account
Returns the updated row (null data when only plan_with_p80 was sent) and the account's current meta (plan_with_p80, primary_routes).
Requires the fba_stock_floors.update permission.
Authentication: Bearer token.
The FBA minimums of the affected region (every region when plan_with_p80 changes) are re-evaluated immediately, without sending alerts.
Request
Responses
- 200
- 401
- 403
- 404
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.