{"openapi":"3.1.0","info":{"title":"Plumbing Code API","version":"1.0.0","description":"Plumbing-code sizing maths as an API, computed locally and deterministically — the fixture-unit and pipe-sizing numbers a plumber, designer or inspector runs from the code book. The dfu endpoint totals drainage fixture units for a set of fixtures (IPC Table 709.1): pass a list like toilet:2,lavatory:3,shower:1,kitchen_sink:1 and it weights each by its discharge — a toilet is 3, a lavatory 1, a tub or shower 2 — for a total of 13, with a grouped full bathroom counting as 6 rather than the sum of its parts. The pipe-size endpoint gives the minimum building-drain size for a DFU load at a slope (IPC Table 710.1(1)): the smallest pipe whose capacity meets the load, so 50 DFU at a quarter-inch-per-foot fall needs a 4-inch drain, with the reminder that any drain carrying a water closet is a 3-inch minimum. The supply-gpm endpoint reads probable peak water demand off the Hunter curve: diversity means 100 supply fixture units draws only about 54 GPM, not the sum of every fixture running at once — the number you size the water service against. Everything is computed locally and deterministically, so it is instant and private. Ideal for plumbing-design and estimating apps, code-check and permit tools, MEP-engineering calculators, and trade-school aids. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 compute endpoints. Based on the IPC — verify against the code adopted in your jurisdiction.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/plumbing-api","description":"oanor gateway"}],"tags":[{"name":"Plumbing"},{"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/dfu":{"get":{"operationId":"get_v1_dfu","tags":["Plumbing"],"summary":"Total drainage fixture units","description":"","parameters":[{"name":"fixtures","in":"query","required":true,"description":"Fixture list type:count,type:count","schema":{"type":"string"},"example":"toilet:2,lavatory:3,shower:1,kitchen_sink:1"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Drainage fixture units (IPC Table 709.1, private use) weight each fixture by its discharge — a toilet is 3, a lavatory 1, a tub or shower 2. Sum them to size drains and vents. A grouped full bathroom counts as 6 rather than the sum of its parts. Public/commercial fixtures carry higher values.","inputs":{"fixtures":"toilet:2,lavatory:3,shower:1,kitchen_sink:1"},"breakdown":{"shower":2,"toilet":6,"lavatory":3,"kitchen_sink":2},"total_dfu":13},"meta":{"timestamp":"2026-06-06T15:30:43.412Z","request_id":"ab649639-7329-4fc8-830c-71c23743d287"},"status":"ok","message":"DFU total","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/pipe-size":{"get":{"operationId":"get_v1_pipe_size","tags":["Plumbing"],"summary":"Minimum building-drain size","description":"","parameters":[{"name":"total_dfu","in":"query","required":true,"description":"Total drainage fixture units","schema":{"type":"string"},"example":"50"},{"name":"slope_in_per_ft","in":"query","required":false,"description":"Slope: 0.125, 0.25 or 0.5 in/ft (default 0.25)","schema":{"type":"string"},"example":"0.25"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Minimum building-drain/sewer size = the smallest pipe whose DFU capacity (IPC Table 710.1(1), at this slope) meets the load. Note: any drain carrying a water closet must be at least 3 inches regardless of DFU. Steeper slope carries more; never undersize, and keep a clean-out at the base of every stack.","inputs":{"total_dfu":50,"slope_in_per_ft":0.25},"capacity_dfu":216,"min_drain_size_in":4},"meta":{"timestamp":"2026-06-06T15:30:43.504Z","request_id":"1b16d98e-83e8-4ef7-895e-fe50c81ebd31"},"status":"ok","message":"Pipe size","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/supply-gpm":{"get":{"operationId":"get_v1_supply_gpm","tags":["Plumbing"],"summary":"Water-supply demand from WSFU","description":"","parameters":[{"name":"wsfu","in":"query","required":true,"description":"Supply fixture units","schema":{"type":"string"},"example":"100"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Probable peak water demand from supply fixture units, read off the Hunter curve (flush-tank predominant) — diversity means 100 WSFU draws only ~54 GPM, not the sum of every fixture at once. Use the demand GPM with the available pressure to size the water-service and distribution piping.","inputs":{"wsfu":100},"demand_gpm":54},"meta":{"timestamp":"2026-06-06T15:30:43.595Z","request_id":"9f1c31b8-9fef-434e-bf7c-e794664d539f"},"status":"ok","message":"Supply GPM","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":"Based on IPC Tables 709.1 / 710.1(1) and the Hunter demand curve. Slopes 0.125/0.25/0.5 in/ft. Estimates — verify against the code adopted in your jurisdiction; water closets need a 3-inch minimum drain.","service":"plumbing-api","endpoints":{"GET /v1/dfu":"Total drainage fixture units from a fixture list (type:count,...).","GET /v1/meta":"This document.","GET /v1/pipe-size":"Minimum building-drain size for a DFU load at a slope.","GET /v1/supply-gpm":"Water-supply demand (GPM) from supply fixture units (Hunter curve)."},"description":"Plumbing-code maths: drainage fixture units for a fixture set, minimum building-drain size at a slope, and water-supply demand (GPM) from the Hunter curve."},"meta":{"timestamp":"2026-06-06T15:30:43.672Z","request_id":"5c7e6bc8-b8d5-4b58-a240-90d23c605304"},"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":400,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":590,"monthly_call_quota":10500,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1830,"monthly_call_quota":70000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":5380,"monthly_call_quota":235000,"rps_limit":36,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/plumbing-api"}