Pin Forecast Run Line
PATCH/api/forecast-runs/:run/lines/:line/cash-pin
Pin a line to fits or waits, or send null to clear the pin. The run is re-cut with the weights, weekly strip and supplier minimums it was built with; a line pinned to fits is paid even when it exceeds the headroom (over_headroom then lists the breached weeks). Every change is logged.
purchase-orders:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Body: pin (fits | waits | null, required).
Permission: cash_buying.override. Token scope: purchase-orders:write.
Without cash_buying.view_balances each week also omits capacity, spendable and spendable_after (see Get Weekly Headroom).
sized_unit_cost (on each line): the unit cost, in the line's pricing currency (as the purchase order carries it), that the line's cash was sized at. Compare it with the product's current cost to tell a plan ranked at old costs from the current ones; null on plans saved before it was recorded.
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
Response Headers
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Content
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.