{"openapi":"3.1.0","info":{"title":"Inventory Management API","version":"1.0.0","description":"Inventory-management maths as an API, computed locally and deterministically. The eoq endpoint computes the economic order quantity, EOQ = √(2·D·S/H) from the annual demand, the cost per order and the holding cost per unit per year — the order size that minimises total cost — and returns the number of orders per year, the days between orders and the annual ordering, holding and total costs (which are equal at the EOQ). The reorder endpoint computes the reorder point, daily demand × lead time + safety stock, the stock level at which to place the next order. The safety endpoint computes the safety stock for a target service level, Z × σ × √lead_time, where Z is the normal-distribution value for the service level (95 % gives 1.645) found by an exact inverse-normal calculation, so any service level works. Everything is computed locally and deterministically, so it is instant and private. Ideal for e-commerce, retail, warehouse and supply-chain app developers, stock-planning and procurement tools, and operations dashboards. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is inventory optimisation; for break-even and cost-volume-profit use a break-even API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/inventory-api","description":"oanor gateway"}],"tags":[{"name":"Inventory"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/eoq":{"get":{"operationId":"get_v1_eoq","tags":["Inventory"],"summary":"Economic order quantity","description":"","parameters":[{"name":"annual_demand","in":"query","required":true,"description":"Annual demand (units)","schema":{"type":"string"},"example":"10000"},{"name":"ordering_cost","in":"query","required":true,"description":"Cost per order","schema":{"type":"string"},"example":"50"},{"name":"holding_cost","in":"query","required":true,"description":"Holding cost per unit per year","schema":{"type":"string"},"example":"2"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"EOQ = √(2·D·S/H). At the EOQ the annual ordering and holding costs are equal.","inputs":{"holding_cost":2,"annual_demand":10000,"ordering_cost":50},"orders_per_year":14.1421,"total_annual_cost":1414.2136,"annual_holding_cost":707.1068,"days_between_orders":25.8094,"annual_ordering_cost":707.1068,"economic_order_quantity":707.1068},"meta":{"timestamp":"2026-06-04T18:38:18.446Z","request_id":"de332b92-30ad-4831-9954-189cc8cf8f52"},"status":"ok","message":"Economic order quantity","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/reorder":{"get":{"operationId":"get_v1_reorder","tags":["Inventory"],"summary":"Reorder point","description":"","parameters":[{"name":"daily_demand","in":"query","required":true,"description":"Daily demand (units)","schema":{"type":"string"},"example":"40"},{"name":"lead_time_days","in":"query","required":true,"description":"Lead time (days)","schema":{"type":"string"},"example":"7"},{"name":"safety_stock","in":"query","required":false,"description":"Safety stock (units, default 0)","schema":{"type":"string"},"example":"50"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Reorder point = daily demand × lead time + safety stock. Place a new order when stock hits this level.","inputs":{"daily_demand":40,"safety_stock":50,"lead_time_days":7},"reorder_point":330,"demand_during_lead_time":280},"meta":{"timestamp":"2026-06-04T18:38:18.546Z","request_id":"2b821186-fee0-4188-989d-7da3a873a43a"},"status":"ok","message":"Reorder point","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/safety":{"get":{"operationId":"get_v1_safety","tags":["Inventory"],"summary":"Safety stock","description":"","parameters":[{"name":"service_level","in":"query","required":true,"description":"Service level (%)","schema":{"type":"string"},"example":"95"},{"name":"demand_std_dev","in":"query","required":true,"description":"Demand std dev per day","schema":{"type":"string"},"example":"10"},{"name":"lead_time_days","in":"query","required":true,"description":"Lead time (days)","schema":{"type":"string"},"example":"7"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Safety stock = Z × σ × √lead_time. Z is the normal-distribution value for the target service level (95 % → 1.645).","inputs":{"service_level":95,"demand_std_dev":10,"lead_time_days":7},"z_score":1.6449,"safety_stock":43.5187},"meta":{"timestamp":"2026-06-04T18:38:18.643Z","request_id":"04526d05-b77d-48e7-b502-84d92580ac6b"},"status":"ok","message":"Safety stock","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"notes":"Demand in units, costs per order / per unit-year, lead time in days. Service level as a percentage (e.g. 95). Single-item model with normal demand.","service":"inventory-api","formulae":{"eoq":"EOQ = √(2·D·S/H)","safety":"SS = Z × σ × √lead_time","reorder":"ROP = daily_demand × lead_time + safety_stock"},"endpoints":{"GET /v1/eoq":"Economic order quantity √(2DS/H), order frequency and the annual cost breakdown.","GET /v1/meta":"This document.","GET /v1/safety":"Safety stock = Z(service level) × σ × √lead_time.","GET /v1/reorder":"Reorder point = daily demand × lead time + safety stock."},"description":"Inventory-management calculator: economic order quantity (EOQ), reorder point and safety stock."},"meta":{"timestamp":"2026-06-04T18:38:18.749Z","request_id":"ce488d5c-ba09-4ea0-9590-eff1602353ae"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":2000,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":1500,"monthly_call_quota":40000,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":3900,"monthly_call_quota":250000,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":11900,"monthly_call_quota":1526000,"rps_limit":60,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/inventory-api"}