Skip to main content

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.

Required scope: purchase-orders:write

Grant 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​

OK

Response Headers
    Content-Type