{"openapi":"3.0.3","info":{"title":"Warehouse Heatmap API","version":"1.0.0","description":"Two calls to be live: PUT /v1/layout once, then POST /v1/picks whenever. Bearer key auth (hm_live_…). Batches are idempotent via event_id."},"servers":[{"url":"https://heatmap.rightweb.app/api"}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"security":[{"bearer":[]}],"paths":{"/v1/layout":{"put":{"summary":"Describe the warehouse (three numbers)","requestBody":{"content":{"application/json":{"example":{"aisles":"A-J","baysPerAisle":20,"levelsPerBay":4}}}},"responses":{"200":{"description":"Saved layout"}}},"get":{"summary":"Read the layout","responses":{"200":{"description":"Layout"}}}},"/v1/picks":{"post":{"summary":"Send pick events (batch up to 5000)","requestBody":{"content":{"application/json":{"example":{"events":[{"event_id":"o-1001-1","bin":"B-12-3","qty":5,"at":"2026-07-19T09:30:00Z"},{"event_id":"o-1001-2","sku":"SKU-778","qty":2}]}}}},"responses":{"200":{"description":"{ accepted, deduplicated, rejected }"}}}},"/v1/itembins":{"post":{"summary":"Bulk sku→bin map (lets events arrive with only a SKU)","requestBody":{"content":{"application/json":{"example":{"map":[{"sku":"SKU-778","bin":"B-12-3"}]}}}},"responses":{"200":{"description":"{ mapped }"}}}},"/v1/heatmap":{"get":{"summary":"Read the computed heat back","parameters":[{"name":"window","in":"query","schema":{"type":"string","example":"30d"}}],"responses":{"200":{"description":"{ layout, totals, bins, insights }"}}}}}}