Skip to main content

Revalue FIFO Layer

POST 

/api/cogs-revaluation/101/revalue

Revalues a specific FIFO layer with a new unit cost. Creates an InventoryRevaluation record and updates the layer cost.

Authentication: Requires Bearer token.

Path params:

  • fifoLayer: FIFO Layer ID

Body fields:

  • cogs_source (required): Source of the COGS value (e.g. purchase_order, manual, vendor_quote)
  • new_unit_cost (required): New unit cost as float
  • reason (optional): Reason enum value (e.g. purchase_cost_update, data_correction)
  • reason_notes (optional): Free-text explanation
  • effective_at (optional, ISO 8601 datetime): Date the cost change takes effect; drives the point-in-time valuation overlay and the GL revaluation period. Defaults to now(); moved to the first open day if the period is locked.
  • posted_at (optional, ISO 8601 datetime): GL posting timestamp. Defaults to now().
  • old_unit_cost (optional, float): Explicit prior per-unit cost; defaults to the layer's current average cost.
  • old_total_cost (optional, float): Explicit prior total cost for the layer.
  • new_total_cost (optional, float): Explicit new total cost for the layer.

Request

Responses

Successful response