Skip to main content

Get Expiry & Shelf-Life Report (POST, Advanced Filters)

POST 

/api/inventory-expiry

POST variant of the expiry report. Mirrors every GET filter and additionally carries the larger product advanced-filter tree (filter_groups) in the request body.

Authentication: Requires Bearer token. Scope: reports:read.

Product advanced-filter tree (GroupedFilterSupport). POSTed in the body to carry larger filter sets than the query string allows; bridged into the report via a products.id subquery.

Structure: { conjunction: 'and'|'or', children: [ { type: 'condition', condition: { column, operator, value } } | { type: 'group', group: {…} } ] } (groups may nest).

Allowed columns: sku, name, barcode, mpn, type (text); brand_name, supplier_name, category, tag (relationship text); shelf_life_days, near_expiry_threshold_days (numeric). Text operators: 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 operators: is, is_not, is_one_of, greater_than, less_than, greater_than_or_equal, less_than_or_equal, between, is_empty, is_not_empty. Legacy { filters: { conjunction, filterSet } } format is also accepted for backward compatibility.

Required scope: reports:read

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Request

Responses

OK

Response Headers
    Content-Type