{"openapi":"3.1.0","info":{"title":"Solar Industry Romania API","version":"1.1.0","description":"Romanian power system and PZU prices at 15-minute resolution, from Transelectrica and OPCOM public data. Timestamps are interval starts in Europe/Bucharest; from and to are inclusive calendar dates."},"servers":[{"url":"https://solarindustry.ro"}],"security":[[],{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"message":{"type":"string"},"plan":{"type":"string"},"upgrade":{"type":"string","format":"uri"}}},"Meta":{"type":"object","required":["plan","timezone","citation"],"properties":{"plan":{"type":"string","enum":["free","pro","data","licence"]},"timezone":{"type":"string"},"licence":{"type":"string"},"citation":{"type":"string"},"evidence":{"type":"string"},"weather_source":{"type":"string"}}},"Units":{"type":"object","additionalProperties":{"type":"object","properties":{"unit":{"type":"string"},"source":{"type":"string"},"evidence":{"type":"string","enum":["reported","derived","estimated"]}}}},"SeriesQuery":{"type":"object","required":["metrics","res","requested_res","effective_res","res_adjusted","from","to","clipped_to_plan","points"],"properties":{"metrics":{"type":"array","items":{"type":"string"}},"res":{"type":"string"},"requested_res":{"type":"string"},"effective_res":{"type":"string","enum":["15m","1h","1d"]},"res_adjusted":{"type":"boolean"},"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"},"requested_from":{"type":["string","null"]},"clipped_to_plan":{"type":"boolean"},"points":{"type":"integer"},"time_convention":{"type":"string"}}}}},"paths":{"/api/v1/latest":{"get":{"summary":"Latest 15-minute interval","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"object"},"meta":{"$ref":"#/components/schemas/Meta"},"units":{"$ref":"#/components/schemas/Units"}}}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or per-minute request limit reached; see Retry-After when present","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/series":{"get":{"summary":"Time series. JSON by default; CSV on paid plans","parameters":[{"name":"metrics","in":"query","required":true,"description":"Comma-separated: cons,prod,net,solar,wind,hydro,nuclear,gas,coal,bio,storage,hu,ua,rs,md,bg,price","schema":{"type":"string"}},{"name":"from","in":"query","required":false,"description":"Inclusive start date. Default: 6 days ago","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"description":"Inclusive end date. Default: today","schema":{"type":"string","format":"date"}},{"name":"res","in":"query","required":false,"description":"Requested resolution. Without a paid plan 15m becomes 1h; see query.effective_res","schema":{"type":"string","enum":["15m","1h","1d"],"default":"1h"}},{"name":"format","in":"query","required":false,"description":"json or csv","schema":{"type":"string","enum":["json","csv"],"default":"json"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"type":"object","required":["ts"],"properties":{"ts":{"type":"string","description":"Interval start, YYYY-MM-DD HH:mm:00, Europe/Bucharest"}},"additionalProperties":{"type":["number","null"]}}},"meta":{"$ref":"#/components/schemas/Meta"},"query":{"$ref":"#/components/schemas/SeriesQuery"},"units":{"$ref":"#/components/schemas/Units"}}}}}},"400":{"description":"Unknown metric or range too long","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"CSV requires a paid plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or per-minute request limit reached; see Retry-After when present","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/forecast":{"get":{"summary":"Estimated solar output for today and tomorrow, 15-minute (paid plans)","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"object","properties":{"issued":{"type":["string","null"]},"model":{"type":"string"},"tomorrow":{"type":"object"},"rows":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"string"},"solar_mw":{"type":"number"}}}}}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"402":{"description":"Forecast requires a paid plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or per-minute request limit reached; see Retry-After when present","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/notes":{"get":{"summary":"Automatic daily notes: one by date, or the recent list","parameters":[{"name":"date","in":"query","required":false,"description":"Note date","schema":{"type":"string","format":"date"}},{"name":"lang","in":"query","required":false,"description":"ro or en","schema":{"type":"string","enum":["ro","en"]}},{"name":"limit","in":"query","required":false,"description":"List length on paid plans, up to 365","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"oneOf":[{"type":"object"},{"type":"array","items":{"type":"object"}}]},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"404":{"description":"No note for that date within the plan window","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or per-minute request limit reached; see Retry-After when present","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/metrics":{"get":{"summary":"Definitions of metrics and calculated indicators","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string"},"unit":{"type":"string"},"definition":{"type":"string"},"source":{"type":"string"},"evidence":{"type":"string"}}}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or per-minute request limit reached; see Retry-After when present","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/coverage":{"get":{"summary":"History coverage","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"object"},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"401":{"description":"Invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or per-minute request limit reached; see Retry-After when present","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}