{"openapi":"3.1.0","info":{"title":"LMN Open API","version":"1.0.0","description":"Partner-facing API for LMN inventory and orders. Phase 1: foundation (auth + health). Full endpoint surface lands in Phase 2 + 3."},"servers":[{"url":"https://api.lmnauto.com/v1","description":"Production"},{"url":"https://sandbox-api.lmnauto.com/v1","description":"Sandbox"}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string","pattern":"^req_[0-9a-f]{24}$"},"details":{"type":"object","additionalProperties":true}}}}}}},"security":[{"ApiKey":[]}],"paths":{"/health":{"get":{"summary":"Health check (DB + BQ connectivity)","responses":{"200":{"description":"All systems healthy","content":{"application/json":{"schema":{"type":"object","required":["status","db","bq"],"properties":{"status":{"type":"string","enum":["ok"]},"db":{"type":"string","enum":["ok"]},"bq":{"type":"string","enum":["ok"]}}}}}},"401":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"IP not in allowlist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Degraded — DB or BQ unreachable","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["degraded"]},"db":{"type":"string","enum":["ok","fail"]},"bq":{"type":"string","enum":["ok","fail"]}}}}}}}}}}}