Skip to main content

List Inventory Revaluations

GET 

/api/cogs-revaluation

List the inventory revaluation ledger (paginated). Every FIFO-layer cost change writes one dated row here.

Authentication: Requires Bearer token (PAT).

Methods: GET (query params) or POST (same params in the JSON body — use POST when a large filter_groups tree exceeds URL limits).

Searchfilter[search] spans: ID (exact), FIFO Layer ID (exact), product SKU, product name, warehouse name, and reason notes.

Flat filters — every column below also supports operator-suffixed variants (e.g. filter[new_unit_cost.greater_than], filter[effective_at.between], filter[reason.is_one_of]):

  • Text (reason, cogs_source, reason_notes, sku, product_name): contains, does_not_contain, is, is_not, is_one_of, starts_with, does_not_start_with, ends_with, does_not_end_with, is_empty, is_not_empty
  • Numeric (id, fifo_layer_id, old_unit_cost, new_unit_cost, units_on_hand_at_time, product_id, warehouse_id, warehouse): is, is_not, is_one_of, greater_than, less_than, greater_than_or_equal, less_than_or_equal, between, is_empty, is_not_empty
  • Datetime (effective_at, posted_at, created_at): is, is_not, before, after, on_or_before, on_or_after, between, today, yesterday, past_week, past_month, past_year, days_ago, past_days, is_empty, is_not_empty (timezone-aware)
  • Legacy: filter[effective_from] / filter[effective_to] (date bounds on effective_at, kept for backward compatibility)

Grouped filtersfilter_groups accepts a base64-encoded JSON tree with AND/OR conjunctions and nested groups (the Advanced Filters modal format):

{
"conjunction": "and",
"children": [
{"type": "condition", "condition": {"column": "reason", "operator": "is", "value": "landed_cost_added"}},
{"type": "group", "group": {"conjunction": "or", "children": [...]}}
]
}

Via POST, filter_groups may be sent as a plain (non-encoded) JSON object in the body. Unregistered columns return 400.

Reason values: landed_cost_added, vendor_invoice_correction, market_value_adjustment, system_error, other.

Allowed sorts: id, effective_at, posted_at, new_unit_cost, old_unit_cost, reason, cogs_source, created_at, product (by product SKU), warehouse (by warehouse name). Prefix with - for DESC. Default: -effective_at.

Pagination: page + per_page (default 10).

Cross-links: each row carries link_reference, link_type_label, link_route pointing at the FIFO layer detail page. effective_at is the value date (drives the valuation report); posted_at is the booking date.

Request

Responses

OK

Response Headers
    Content-Type