{"openapi":"3.1.0","info":{"title":"GET /api/v1/inventory/reports/valuation","version":"1.0.0","description":"Current inventory valuation"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/inventory/reports/valuation":{"get":{"tags":["inventory:reports"],"summary":"Current inventory valuation","description":"Return the current on-hand inventory value (in cents) computed from remaining FIFO cost lots, grouped by location, category, or vendor.","operationId":"get_valuation_api_v1_inventory_reports_valuation_get","parameters":[{"name":"group_by","in":"query","required":false,"schema":{"enum":["location","category","vendor"],"type":"string","description":"Bucketing dimension: 'location' (default), 'category', or 'vendor'.","default":"location","title":"Group By"},"description":"Bucketing dimension: 'location' (default), 'category', or 'vendor'."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-business-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Business-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValuationResponse"}}}},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"example":{"detail":"Not authenticated"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"detail":"Not enough permissions"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ValuationBucket":{"properties":{"key":{"type":"string","title":"Key","description":"Group key (id or label)."},"label":{"type":"string","title":"Label","description":"Human-readable label."},"on_hand_units":{"type":"number","title":"On Hand Units","description":"Sum of `quantity_remaining` across lots."},"total_value_cents":{"type":"integer","title":"Total Value Cents","description":"Sum of `quantity_remaining * unit_cost_cents` across lots."},"lot_count":{"type":"integer","title":"Lot Count","description":"Number of contributing lots."}},"type":"object","required":["key","label","on_hand_units","total_value_cents","lot_count"],"title":"ValuationBucket","description":"One row of a valuation breakdown."},"ValuationResponse":{"properties":{"group_by":{"type":"string","enum":["location","category","vendor"],"title":"Group By"},"total_value_cents":{"type":"integer","title":"Total Value Cents","default":0},"total_on_hand_units":{"type":"number","title":"Total On Hand Units","default":0},"buckets":{"items":{"$ref":"#/components/schemas/ValuationBucket"},"type":"array","title":"Buckets"}},"type":"object","required":["group_by"],"title":"ValuationResponse"}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}