{"swagger":"2.0","host":"api.enphaseenergy.com","schemes":["https"],"info":{"title":"Monitoring API","version":"v4"},"paths":{"/api/v4/systems":{"get":{"summary":"Fetch systems","description":"Returns a list of systems for which the user can make API requests. By default, systems are returned in batches of 10. The maximum size is 100.","tags":["System Details"],"parameters":[{"name":"page","in":"query","type":"integer","description":"The page to be returned. Default=1, Min=1. For example, if page is set to 2, 2nd page is returned"},{"name":"size","in":"query","type":"integer","description":"Maximum number of records shown per page. Default=10, Min=1, Max=100.  For example, if max is set to 5, 5 records are shown per page"},{"name":"sort_by","in":"query","type":"string","enum":["id","-id"],"description":"Returns list of systems sorted by \u003csort_by\u003e field. To get the ASC order sorted list, user sort_by = id. To get the DESC order sorted list, use sort_by = -id. By default, the list is sorted by ascending order of system ID."}],"produces":["application/json"],"responses":{"200":{"description":"List of Systems","schema":{"type":"object","properties":{"total":{"type":"integer","description":"Total number of systems"},"current_page":{"type":"integer","description":"Number of the current page fetched "},"size":{"type":"integer","description":"Maximum number of records shown per page. Default=10, Min=1, Max=100."},"count":{"type":"integer","description":"Total number of systems actually returned for the current page"},"items":{"type":"string","description":"Named key of the list data. In this endpoint, it is systems"},"systems":{"type":"array","items":{"properties":{"system_id":{"type":"integer","description":"The unique numeric ID of the system"},"name":{"type":"string","description":"Name of the system"},"public_name":{"type":"string","description":"Name displayed on the public system page. Available values are All, Residential System, Commercial etc. Default='Residential System'. Only for systems that allow public access."},"timezone":{"type":"string","description":"Timezone to which the system belongs"},"address":{"type":"object","properties":{"city":{"type":"string","description":"City in which the system is located"},"state":{"type":"string","description":"State in which the system is located"},"country":{"type":"string","description":"Country in which the system is located"},"postal_code":{"type":"string","description":"Postal Code of the system's location"}},"description":"Address object for the system. It can contain the following items"},"connection_type":{"type":"string","description":"Connection Type of the system. Available values are ethernet, Wi-Fi, Cellular"},"energy_lifetime":{"type":"integer","description":"Deprecated field. The API will always return this field as -1"},"energy_today":{"type":"integer","description":"Deprecated field. The API will always return this field as -1"},"system_size":{"type":"number","format":"float","description":"Deprecated field. The API will always return this field as -1"},"status":{"type":"string","description":"System's status. Corresponding Enlighten values can be found in table added at the end of page."},"last_report_at":{"type":"integer","description":"Timestamp (in epoch format) at which the system's Envoy last submitted a report"},"last_energy_at":{"type":"integer","description":"Timestamp (in epoch format) at which the systems's produced energy was last reported. Even if the last produced energy is 0, its timestamp will be returned."},"operational_at":{"type":"integer","description":"Timestamp (in epoch format) at which this system became operational. Corresponds to the system’s interconnect time, if one is specified. Otherwise, it is the system’s first reported interval end time."},"attachment_type":{"type":"string","description":"Micro inverter attachment type. Available values are rack_mount, zep, acm, bipv, frame_mount, railless_mount"},"interconnect_date":{"type":"integer","description":"Date on which the system was approved to connect to the grid"},"reference":{"type":"string","description":"If the calling user belongs to a company and that company has provided its own identifier for a system, that ID is included here. Otherwise, this attribute is not returned."},"other_references":{"type":"array","items":{"type":"string"},"description":"If any other companies have provided their own identifiers for a system, those identifiers are included here. Otherwise, this attribute is not returned."}}},"description":"List of systems. It contains the following:"}}},"examples":{"application/json":{"total":28,"current_page":1,"size":2,"count":2,"items":"systems","systems":[{"system_id":698910067,"name":"Enphase System","public_name":"Residential System","timezone":"Australia/Sydney","address":{"city":"Sydney","state":"NSW","country":"AU","postal_code":"2127"},"connection_type":"ethernet","energy_lifetime":-1,"energy_today":-1,"system_size":-1,"status":"micro","last_report_at":1508174262,"last_energy_at":1508174172,"operational_at":1497445200,"attachment_type":null,"interconnect_date":null,"reference":"106015287","other_references":["106015287"]},{"system_id":698906018,"name":"Enphase Public System","public_name":"Residential System","timezone":"US/Pacific","address":{"city":"Los Angeles","state":"CA","country":"US","postal_code":"94954"},"connection_type":"ethernet","energy_lifetime":-1,"energy_today":-1,"system_size":-1,"status":"normal","last_report_at":1508174262,"last_energy_at":1508174172,"operational_at":1497445200,"attachment_type":null,"interconnect_date":null}]}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"422":{"description":"Unprocessable Entity","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Unprocessable Entity","details":"Invalid request because of 'The sorting parameter is not supported. Please use id for sorting by Asc or -id for sorting by Desc'","code":422}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/search":{"post":{"summary":"Search and filter systems","description":"Search and filter systems. Provide only valid values in request parameters. Empty values will be ignored. Invalid keys will be rejected.","tags":["System Details"],"parameters":[{"name":"page","in":"query","type":"integer","description":"The page to be returned. Default=1, Min=1, e.g=2"},{"name":"size","in":"query","type":"integer","description":"Maximum number of records shown per page. Default=10, Min=1, Max=1000, e.g=5"},{"name":"live_stream","in":"query","type":"boolean","description":"Indicates whether the live_stream field should be included in the response (true to include, false to omit)."},{"name":"params","in":"body","schema":{"type":"object","properties":{"sort_by":{"type":"string","enum":["id","-id"],"description":"Returns list of systems sorted by \u003csort_by\u003e field. To get ASC order sorted list, user sort_by = id. To get DESC order sorted list, use sort_by = -id. By default, the list is sorted by ascending order of system ID."},"system":{"type":"object","properties":{"ids":{"type":"array","description":"Filter system by particular Ids","items":{"type":"integer"}},"name":{"type":"string","description":"Search by name of the System."},"reference":{"type":"string","description":"Search by reference of the System."},"other_reference":{"type":"string","description":"Search by any other_references of the System."},"statuses":{"type":"array","description":"Search by System status.","items":{"type":"string","enum":["normal","comm","micro","power","meter","battery","storage_idle","meter_issue","enpower","encharge","enpower_issue","encharge_issue"]}}}}},"required":["system"]}}],"consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"List of Systems","schema":{"type":"object","properties":{"total":{"type":"integer","description":"Total number of systems available"},"current_page":{"type":"integer","description":"Current page of the systems result. Default is 1"},"size":{"type":"integer","description":"Max number of records from API per page is 100. Default is 10."},"count":{"type":"integer","description":"Total number of systems actually returned for the current page"},"items":{"type":"string","description":"Named key of the list data. In this endpoint, it is systems"},"systems":{"type":"array","items":{"properties":{"system_id":{"type":"integer","description":"The unique numeric ID of the system"},"name":{"type":"string","description":"Name of the system"},"public_name":{"type":"string","description":"Name displayed on the public system page. Available values are All, Residential System, Commercial etc. Default='Residential System'. Only for systems that allow public access."},"timezone":{"type":"string","description":"Timezone to which the system belongs"},"address":{"type":"object","properties":{"state":{"type":"string","description":"State in which the system is located"},"country":{"type":"string","description":"Country in which the system is located"},"postal_code":{"type":"string","description":"Postal Code of the system's location"}},"description":"Address object for the system. It can contain the following items"},"connection_type":{"type":"string","description":"Connection Type of the system. Available values are ethernet, Wi-Fi, Cellular"},"status":{"type":"string","description":"System's status. Corresponding Enlighten values can be found in table added at the end of page."},"last_report_at":{"type":"integer","description":"Timestamp (in epoch format) at which the system's Envoy last submitted a report"},"last_energy_at":{"type":"integer","description":"Timestamp (in epoch format) at which the systems's produced energy was last reported. Even if the last produced energy is 0, its timestamp will be returned."},"operational_at":{"type":"integer","description":"Timestamp (in epoch format) at which this system became operational. Corresponds to the system’s interconnect time, if one is specified. Otherwise, it is the system’s first reported interval end time."},"attachment_type":{"type":"string","description":"Micro inverter attachment type. Available values are rack_mount, zep, acm, bipv, frame_mount, railless_mount"},"interconnect_date":{"type":"integer","description":"Date on which the system was approved to connect to the grid"},"energy_lifetime":{"type":"integer","description":"Deprecated field. The API will always return this field as -1"},"energy_today":{"type":"integer","description":"Deprecated field. The API will always return this field as -1"},"system_size":{"type":"number","format":"float","description":"Deprecated field. The API will always return this field as -1"},"live_stream":{"type":"string","description":"Shows the status live stream via Kafka is enabled or not for the site =\u003e \"enabled\" / \"disabled\""}}},"description":"List of filtered systems. It contains the following items"}}},"examples":{"application/json":{"total":28,"current_page":1,"size":2,"count":2,"items":"systems","systems":[{"system_id":698910067,"name":"Enphase System","public_name":"Residential System","timezone":null,"address":{"state":null,"country":null,"postal_code":null},"connection_type":"ethernet","status":"micro","last_report_at":1557400231,"last_energy_at":null,"operational_at":null,"attachment_type":null,"interconnect_date":null,"energy_lifetime":-1,"energy_today":-1,"system_size":-1,"live_stream":"enabled"},{"system_id":698906018,"name":"Enphase Public System","public_name":"Residential System","timezone":"US/Pacific","address":{"state":"CA","country":"US","postal_code":"94954"},"connection_type":"ethernet","status":"normal","last_report_at":1508174262,"last_energy_at":1508174172,"operational_at":1497445200,"attachment_type":null,"interconnect_date":null,"energy_lifetime":-1,"energy_today":-1,"system_size":-1,"reference":"106015287","other_references":["106015287"],"live_stream":"disabled"}]}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"422":{"description":"Unprocessable Entity","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Unprocessable Entity","details":"system is missing at Json body location","code":422}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/{system_id}":{"get":{"summary":"Retrieves a System by id","description":"Retrieves a System by ID","tags":["System Details"],"produces":["application/json"],"parameters":[{"name":"system_id","in":"path","type":"integer","description":"The unique numeric ID of the system. If an empty value is passed in the ID, this endpoint behaves as Fetch systems endpoint.","required":true}],"responses":{"200":{"description":"System fetched","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"The unique numeric ID of the system"},"name":{"type":"string","description":"Name of the system"},"public_name":{"type":"string","description":"Name displayed on the public system page. Available values are All, Residential System, Commercial etc. Default='Residential System'. Only for systems that allow public access."},"timezone":{"type":"string","description":"Timezone to which the system belongs"},"address":{"type":"object","properties":{"city":{"type":"string","description":"City in which the system is located"},"state":{"type":"string","description":"State in which the system is located"},"country":{"type":"string","description":"Country in which the system is located"},"postal_code":{"type":"string","description":"Postal Code of the system's location"}},"description":"Address object for the system. It can contain the following items"},"connection_type":{"type":"string","description":"Connection Type of the system. Available values are ethernet, Wi-Fi, Cellular"},"energy_lifetime":{"type":"integer","description":"Deprecated field. The API will always return this field as -1"},"energy_today":{"type":"integer","description":"Deprecated field. The API will always return this field as -1"},"system_size":{"type":"number","format":"float","description":"Deprecated field. The API will always return this field as -1"},"status":{"type":"string","description":"System's status. Corresponding Enlighten values can be found in table added at the end of page."},"last_report_at":{"type":"integer","description":"Timestamp (in epoch format) at which the system's Envoy last submitted a report"},"last_energy_at":{"type":"integer","description":"Timestamp (in epoch format) at which the systems's produced energy was last reported. Even if the last produced energy is 0, its timestamp will be returned."},"operational_at":{"type":"integer","description":"Timestamp (in epoch format) at which this system became operational. Corresponds to the system’s interconnect time, if one is specified. Otherwise, it is the system’s first reported interval end time."},"attachment_type":{"type":"string","description":"Micro inverter attachment type. Available values are rack_mount, zep, acm, bipv, frame_mount, railless_mount"},"interconnect_date":{"type":"integer","description":"Date on which the system was approved to connect to the grid"},"reference":{"type":"string","description":"If the calling user belongs to a company and that company has provided its own identifier for a system, that ID is included here. Otherwise, this attribute is not returned."},"other_references":{"type":"array","items":{"type":"string"},"description":"If any other companies have provided their own identifiers for a system, those identifiers are included here. Otherwise, this attribute is not returned."}}},"examples":{"application/json":{"system_id":72,"name":"Enphase System","public_name":"Residential System","timezone":"America/Los_Angeles","address":{"city":"Los Angeles","state":"CA","country":"US","postal_code":"94954"},"connection_type":"cellular","energy_lifetime":-1,"energy_today":-1,"system_size":-1,"status":"normal","last_report_at":1445619615,"last_energy_at":1445619033,"operational_at":1357023600,"attachment_type":"acm","interconnect_date":"2012-10-13","reference":"106015287","other_references":["106015287"]}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"System not found for {:id=\u003e\"1\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/{system_id}/summary":{"get":{"summary":"Retrieves a system summary","description":"Returns system summary based on the specified system ID and summary date. For historical requests i.e summary date is in the past the fields modules, size_w and current_power are returned as zero.","tags":["System Details"],"produces":["application/json"],"parameters":[{"name":"system_id","in":"path","type":"integer","description":"The unique numeric ID of the system","required":true},{"name":"summary_date","in":"query","type":"string","description":"Requested date for the system's summary data. Defaults to the current local date of the system","required":false}],"responses":{"200":{"description":"System summary fetched","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"The unique numeric ID of the system"},"current_power":{"type":"integer","description":"Current power production of the system in Watts"},"energy_lifetime":{"type":"integer","description":"Energy generated by the system during its lifetime till one day before to the requested summary date in Wh"},"energy_today":{"type":"integer","description":"Energy generated by the system on requested summary date in Wh"},"last_interval_end_at":{"type":"integer","description":"The last known time that the system produced energy. When a system has not been communicating for a length of time, the last_report_at can be recent, whereas the last_interval_end_at may be further back."},"last_report_at":{"type":"integer","description":"Timestamp (in epoch format) at which the system's Envoy last submitted a report"},"modules":{"type":"integer","description":"Total number of modules in the system"},"operational_at":{"type":"integer","description":"Timestamp (in epoch format) at which this system became operational. Corresponds to the system’s interconnect time, if one is specified. Otherwise, it is the system’s first reported interval end time."},"size_w":{"type":"integer","description":"System size in watts"},"nmi":{"type":"integer","description":"National Meter Identifier"},"source":{"type":"string","description":"Source of energy measurement"},"status":{"type":"string","description":"Current status of the system"},"summary_date":{"type":"string","description":"Summary date"},"battery_charge_w":{"type":"integer","description":"Maximum charge power of all the batteries of the system in watts"},"battery_discharge_w":{"type":"integer","description":"Maximum discharge power of all the batteries of the system in watts"},"battery_capacity_wh":{"type":"integer","description":"Total capacity of all the batteries of the system in watt-hours"},"evse_power":{"type":"array","description":"This individual object is a Map with key value pair. Key will be individual serial number and value will be object containing evse_max_charge_w and evse_min_charge_w","items":{"type":"object","properties":{"serial_number":{"type":"object","properties":{"evse_max_charge_w":{"type":"integer","description":"evse_max_charge_w"},"evse_min_charge_w":{"type":"integer","description":"evse_min_charge_w"}}}}}}}},"examples":{"application/json":{"system_id":698910067,"current_power":0,"energy_lifetime":0,"energy_today":0,"last_interval_end_at":1557400231,"last_report_at":1557400231,"modules":5,"operational_at":null,"size_w":1250,"nmi":"1213141516","source":"meter","status":"normal","summary_date":"2019-05-12","battery_charge_w":1280,"battery_discharge_w":1280,"battery_capacity_wh":3360,"evse_power":[{"21458935":{"evse_max_charge_w":440,"evse_min_charge_w":2230}},{"12785966":{"evse_max_charge_w":530,"evse_min_charge_w":1200}}]}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"System not found for {:id=\u003e\"1\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"},"period":{"type":"string","description":"Quota exceeded for minute/month"},"period_start":{"type":"integer","description":"Starting period timestamp"},"period_end":{"type":"integer","description":"Ending period timestamp"},"limit":{"type":"integer","description":"Limit count for the period"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429,"period":"minute","period_start":1623825660,"period_end":1623825720,"limit":5}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/{system_id}/devices":{"get":{"summary":"Retrieves devices for a given system","description":"Retrieves devices for a given system. Only devices that are active will be returned in the response.","tags":["System Details"],"produces":["application/json"],"parameters":[{"name":"system_id","in":"path","type":"integer","description":"The unique numeric ID of the system","required":true}],"responses":{"200":{"description":"List of devices","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"System id"},"total_devices":{"type":"integer","description":"Total active devices associated with the System"},"items":{"type":"string","description":"The list key"},"devices":{"type":"object","description":"Hash keys include all the possible device types: micros, meters, gateways, q_relays, ACBs, Encharges, Enpowers, ev_chargers, heat_pump, iq_collars (if the devices of this type are present). For all the device types, the object will contain the serial_number and model with some additional information pertaining to the device type.","additionalProperties":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"last_report_at":{"type":"integer"},"name":{"type":"string"},"serial_number":{"type":"string"},"part_number":{"type":"string"},"emu_sw_version":{"type":"string"},"sku":{"type":"string"},"model":{"type":"string"},"status":{"type":"string"},"active":{"type":"string"},"state":{"type":"string"},"config_type":{"type":"string"},"product_name":{"type":"string"},"feoc_compliant":{"type":"boolean","description":"Foreign Entity of Concern compliant status (only for micros and encharges in US sites)"},"dom_compliant":{"type":"boolean","description":"Domestic Content compliant status (only for micros and encharges in US sites)"}}}}}}},"examples":{"application/json":{"system_id":698910067,"total_devices":11,"items":"devices","devices":{"micros":[{"id":1023273222,"last_report_at":1508174262,"name":"Microinverter 902167438951","serial_number":"902167438951","part_number":"800-01333-r01","sku":"IQ8A-72-2-US","model":"M250","status":"normal","active":true,"product_name":"M250","feoc_compliant":true,"dom_compliant":true},{"id":1023273243,"last_report_at":1508174262,"name":"Microinverter 902372021616","serial_number":"902372021616","part_number":"800-01333-r01","sku":"IQ8A-72-2-US","model":"M250","status":"normal","active":true,"product_name":"M250","feoc_compliant":true,"dom_compliant":true}],"meters":[{"id":1059640322,"last_report_at":1508174262,"name":"production","serial_number":"901553005272EIM1","part_number":"800-00655-r08","sku":null,"model":"Envoy S","status":"normal","active":true,"state":"enabled","config_type":"Net","product_name":"RGM"},{"id":1059640322,"last_report_at":1508174262,"name":"production","serial_number":"901553005272EIM2","part_number":"800-00655-r08","sku":null,"model":"Envoy S","status":"normal","active":true,"state":"enabled","config_type":"Production","product_name":"RGM"}],"gateways":[{"id":1059563029,"last_report_at":1508174262,"name":"Gateway 202323054201","serial_number":"901553005272","part_number":"800-00655-r08","emu_sw_version":"D4.6.11.170403 (799d2d)","sku":"ENV-IQ-AM1-240","model":"Envoy-S-Standard-NA","status":"normal","active":true,"cellular_modem":{"imei":"352009112238477","part_num":"860-00157-r01","sku":"CELLMODEM-M1","plan_start_date":1614796200,"plan_end_date":1772562600},"product_name":"Envoy-S-Metered-EU"}],"q_relays":[{"id":1059640316,"last_report_at":1508174262,"name":"IQ Relay 912158973973","serial_number":"912158973973","part_number":"800-00595-r01","sku":"Q-RELAY-1P-INT","model":"","status":"normal","active":true,"product_name":"IQ Relay"},{"id":1059640326,"last_report_at":1508174262,"name":"IQ Relay 912163603334","serial_number":"912163603334","part_number":"800-00595-r01","sku":"Q-RELAY-1P-INT","model":"","status":"normal","active":true,"product_name":"IQ Relay"}],"acbs":[{"id":1059640321,"last_report_at":1508174262,"name":"AC Battery 911364446952","serial_number":"911364446952","part_number":"800-00560-r03","sku":"IQ7-B1200-LN-I-INT01-RV0","model":"","status":"normal","active":true,"product_name":"ACB"},{"id":1059640321,"last_report_at":1508174262,"name":"AC Battery 911499228280","serial_number":"911499228280","part_number":"800-00560-r03","sku":"IQ7-B1200-LN-I-INT01-RV0","model":"","status":"normal","active":true,"product_name":"ACB"}],"encharges":[{"id":1059640295,"last_report_at":1508174262,"name":"IQ Battery 492312001241","serial_number":"121593621979","part_number":"800-00562-r01","sku":"B03-A01-US00-1-3","model":"","status":"normal","active":true,"product_name":"IQ Battery R3 - 5P","feoc_compliant":true,"dom_compliant":true}],"enpowers":[{"id":1059640294,"last_report_at":1508174262,"name":"IQ System Controller 482218007023","serial_number":"121245173988","part_number":"800-01135-r02","sku":"EP200G101-M240US00","model":"","status":"normal","active":true,"product_name":"IQ System Controller"}],"ev_chargers":[{"id":"","sku":"","status":"normal","serial_number":"25901946","name":"EV Charger_1","model":"Keba_P30","part_number":"","last_report_at":1700074065,"firmware":"","active":true}],"heat_pump":[{"id":"","SKU":"","status":"normal","serial_number":"","name":"Viessmann VitoCal 300G","model":"Expert Net Control 2302","part_number":"","last_report_at":1700074065,"firmware":"","sg_ready_relay":"Expert net control 2302","iq_er":"Nano hub 2","active":true}],"iq_collars":[{"id":1085310043,"last_report_at":1757523711,"name":"IQ Meter Collar 482443008618","serial_number":"482443008618","part_number":"865-00401-r01","sku":"MC-200-011-V01","model":"","status":"normal","active":true,"product_name":"IQ Meter Collar"}]}}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"System not found for {:id=\u003e\"1\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429}}},"500":{"description":"Internal Server Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Internal Server Error","details":"unable to fetch data","code":500}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/retrieve_system_id":{"get":{"summary":"Retrieve system for a given envoy serial number","description":"Get system ID by passing envoy serial number. If the serial number of a retired envoy is passed in the request param, a 404 Not Found response will be returned.","tags":["System Details"],"produces":["application/json"],"parameters":[{"name":"serial_num","in":"query","type":"string","description":"Envoy Serial Number","required":true}],"responses":{"200":{"description":"search_system_id","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"The unique numeric ID of the system"}}},"examples":{"application/json":{"system_id":123}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"Envoy not found with this serial number","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"422":{"description":"Unprocessable Entity","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Unprocessable Entity","details":"Provide envoy serial number","code":422}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"},"period":{"type":"string","description":"Quota exceeded for minute/month"},"period_start":{"type":"integer","description":"Starting period timestamp"},"period_end":{"type":"integer","description":"Ending period timestamp"},"limit":{"type":"integer","description":"Limit count for the period"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429,"period":"minute","period_start":1623825660,"period_end":1623825720,"limit":5}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/{system_id}/events":{"get":{"summary":"To retrieve the list of events for a site","description":"This endpoint is used to retrieve the events for a site. start_time is mandatory and cannot be older than 9 months from the current time.  Maximum 1 week of data can be retrieved in a single call.\n\nAn Event is triggered when a site/device meets a pre-defined set of conditions. Each of these pre-defined set of conditions is called an “Event type”. These conditions are defined at both site and device level, therefore events can be triggered at both site and device level. Each event is associated with an event type.\n\nMost Event types (not all) further have pre-defined configurations. Whenever an Event of a given Event type meets these pre-defined configurations, then the Event triggers an Alarm. An example of pre-defined configuration for an event type is - Event status is “Open” beyond a certain time limit.\n\nEvents are generated when a site or device meets specific, predefined conditions. These conditions are grouped into what we call “Event types.” Each event is always linked to an event type. For example, ‘Gateway not reporting’ is an event type and an event gets created on a site if the gateway stops reporting. Similarly, if a gateway on another site stops reporting, another event is created specific to that site with the same event type.\n\nMany event types (though not all) come with predefined escalation criteria for alarms. When an event meets these configurations, it can trigger an alarm. For example, a common configuration might specify that an event should trigger an alarm if its status remains “Open” beyond a certain time threshold.","tags":["System Details"],"produces":["application/json"],"parameters":[{"name":"system_id","in":"path","type":"integer","description":"The unique numeric ID of the system.","required":true},{"name":"start_time","in":"query","type":"integer","description":"Requested start time of the events data in Epoch time format.","required":true},{"name":"end_time","in":"query","type":"integer","description":"Requested end time of the events data in Epoch time format. Defaults to minimum (start time + 1 day, current time)"}],"responses":{"200":{"description":"List of events","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"The unique numeric ID of the system."},"events":{"type":"object","description":"List of events","additionalProperties":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","description":"Represents the current status of the event. Possible values are: Info, Open, and Closed. Transient events have a status of Info. Stateful events are Open if event_end_time is null, and Closed if event_end_time is not null."},"event_type_id":{"type":"integer","description":"Indicates the type of event to which the current event belongs."},"event_start_time":{"type":"integer","description":"Timestamp when the event started (Unix Epoch)"},"event_end_time":{"type":"integer","description":"Timestamp when the event was cleared (Unix Epoch)"},"serial_number":{"type":"string","description":"Serial number of the impacted device."}}}}}}},"examples":{"application/json":{"events":[{"status":"Closed","event_type_id":28,"event_start_time":1740213328,"event_end_time":1740373425,"serial_number":"202241095486"}],"system_id":701644354}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"System not found for {:id=\u003e\"1\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"422":{"description":"Unprocessable Entity","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Unprocessable Entity","details":"start_time is required","code":422}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/{system_id}/alarms":{"get":{"summary":"To retrieve the list of alarms for a site","description":"This endpoint is used to retrieve the alarms for a site. start_time is mandatory and cannot be older than 9 months from the current time.  Maximum 1 week of data can be retrieved in a single call.\n\nMany event types (though not all) come with predefined escalation criteria for alarms. When an event meets these configurations, it can trigger an alarm. For example, a common configuration might specify that an event should trigger an alarm if its status remains “Open” beyond a certain time threshold.\n\nAn Alarm is always tied to an Event, and the relationship between them can be one-to-one or one-to-many. For instance, if a site has a single battery and its State of Charge (SOC) drops below a predefined threshold, an event is created. If the SOC remains below that threshold for a specified duration, an alarm is triggered for that battery. In another scenario, if a site has multiple batteries and all of them fall below the SOC threshold, individual events are created for each battery. If the low SOC condition persists across all batteries for the defined time period, a single alarm may be triggered for all of them.\n\nThis means:\n\n- An alarm can be associated with multiple events.\n\n- But an event can be associated with only one alarm.","tags":["System Details"],"produces":["application/json"],"parameters":[{"name":"system_id","in":"path","type":"integer","description":"The unique numeric ID of the system.","required":true},{"name":"start_time","in":"query","type":"integer","description":"Requested start time of the alarms data in Epoch time format.","required":true},{"name":"end_time","in":"query","type":"integer","description":"Requested end time of the alarms data in Epoch time format. Defaults to minimum (start time + 1 day, current time)"},{"name":"cleared","in":"query","type":"boolean","description":"Filters alarms based on their status. Set to true to return cleared alarms; defaults to false to return active alarms."}],"responses":{"200":{"description":"List of alarms","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"The unique numeric ID of the system."},"alarms":{"type":"object","description":"List of alarms","additionalProperties":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique alarm identifier."},"event_type_id":{"type":"integer","description":"Associated event type ID"},"cleared":{"type":"boolean","description":"Alarm status (false = not cleared, true = cleared)."},"alarm_start_time":{"type":"integer","description":"Timestamp when the alarm was first triggered (Unix Epoch)."},"alarm_end_time":{"type":"integer","description":"Timestamp when the alarm was cleared (Unix Epoch)"},"severity":{"type":"integer","description":"Severity level of the alarm: FATAL = 1; ERROR = 2; WARNING = 3; INFO = 4; DEBUG = 5; NONE = 6."},"events":{"type":"object","description":"List of devices impacted by the alarm.","additionalProperties":{"type":"array","items":{"type":"object","properties":{"serial_number":{"type":"string","description":"Device serial number."},"start_date":{"type":"integer","description":"Event start timestamp (Unix Epoch)."},"end_date":{"type":"integer","description":"Event cleared timestamp (Unix Epoch)."}}}}}}}}}}},"examples":{"application/json":{"alarms":[{"id":"1082701398","cleared":false,"severity":4,"events":[{"serial_number":"202241095486","start_date":1737750626,"end_date":1737866703}],"event_type_id":28,"alarm_start_time":1737750626,"alarm_end_time":null}],"system_id":701644354}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"System not found for {:id=\u003e\"1\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"422":{"description":"Unprocessable Entity","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Unprocessable Entity","details":"start_time is required","code":422}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/event_types":{"get":{"summary":"To retrieve the list of event_type_id along with event_description and recommended_action","description":"This endpoint is used to retrieve the list of all available event_types. The endpoint will return list of event_type_id along with the event_description and recommended_action. If an event_type_id is passed, this endpoint will return the detail of specific event_type","tags":["System Details"],"produces":["application/json"],"parameters":[{"name":"event_type_id","in":"query","type":"integer","description":"The unique numeric ID of the event type."}],"responses":{"200":{"description":"The list of event_types","schema":{"type":"object","properties":{"event_types":{"type":"object","description":"The list of event_types","additionalProperties":{"type":"array","items":{"type":"object","properties":{"event_type_id":{"type":"integer","description":"Unique identifier of the event type."},"event_type_key":{"type":"integer","description":"Another unique identifier of the event type."},"stateful":{"type":"boolean","description":"Event state (true = stateful, false = transient)"},"event_name":{"type":"string","description":"Name of the event"},"event_description":{"type":"string","description":"Description of the event"},"recommended_action":{"type":"string","description":"Available recommended action for this event"}}}}}}},"examples":{"application/json":{"event_types":[{"event_type_id":28,"event_type_key":"envoy_no_report","stateful":true,"event_name":"Gateway not reporting","event_description":"The broadband Internet connection that the Enphase gateway uses to communicate to the Enphase servers is experiencing a problem.","recommended_action":"Check that your gateway and Internet router are plugged in and that the site's Internet service is not experiencing an outage."},{"event_type_id":4781,"event_type_key":"acb_sleeping","stateful":false,"event_name":"AC Battery Sleeping","event_description":"AC Battery has entered the target state of charge band. Cleared when the battery exits the state of charge target, or sleep mode is removed.","recommended_action":"No action is required."}]}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"Event type not found for {:id=\u003e\"12345\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/{system_id}/open_events":{"get":{"summary":"To retrieve the list of all open events of a site","description":"This endpoint is used to retrieve all the open events of a site.","tags":["System Details"],"produces":["application/json"],"parameters":[{"name":"system_id","in":"path","type":"integer","description":"The unique numeric ID of the system.","required":true}],"responses":{"200":{"description":"List of events","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"The unique numeric ID of the system."},"events":{"type":"object","description":"List of events","additionalProperties":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","description":"Represents the current status of the event. Possible values are: Info, Open, and Closed. Transient events have a status of Info. Stateful events are Open if event_end_time is null, and Closed if event_end_time is not null. Since this API returns only the open events, the value will always be open."},"event_type_id":{"type":"integer","description":"Indicates the type of event to which the current event belongs."},"event_start_time":{"type":"integer","description":"Timestamp when the event started (Unix Epoch)"},"event_end_time":{"type":"integer","description":"Timestamp when the event was cleared (Unix Epoch). Since this API returns only the open events, the value will always be null"},"serial_number":{"type":"string","description":"Serial number of the impacted device."}}}}}}},"examples":{"application/json":{"events":[{"status":"open","event_type_id":28,"event_start_time":1740213328,"event_end_time":null,"serial_number":"202241095486"}],"system_id":701644354}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"System not found for {:id=\u003e\"1\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/{system_id}/open_alarms":{"get":{"summary":"To retrieve the list of all open alarms of a site","description":"This endpoint is used to retrieve all the open alarms of a site.","tags":["System Details"],"produces":["application/json"],"parameters":[{"name":"system_id","in":"path","type":"integer","description":"The unique numeric ID of the system.","required":true}],"responses":{"200":{"description":"List of alarms","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"The unique numeric ID of the system."},"alarms":{"type":"object","description":"List of alarms","additionalProperties":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique alarm identifier."},"event_type_id":{"type":"integer","description":"Associated event type ID"},"alarm_start_time":{"type":"integer","description":"Timestamp when the alarm was first triggered (Unix Epoch)."},"severity":{"type":"integer","description":"Severity level of the alarm: FATAL = 1; ERROR = 2; WARNING = 3; INFO = 4; DEBUG = 5; NONE = 6."},"events":{"type":"object","description":"List of devices impacted by the alarm.","additionalProperties":{"type":"array","items":{"type":"object","properties":{"serial_number":{"type":"string","description":"Device serial number."},"start_date":{"type":"integer","description":"Event start timestamp (Unix Epoch)."},"end_date":{"type":"integer","description":"Event cleared timestamp (Unix Epoch)."}}}}}}}}}}},"examples":{"application/json":{"alarms":[{"id":"698957008.8.1766109572000","severity":2,"events":[{"serial_number":"202241095486","start_date":1737750626,"end_date":null}],"event_type_id":28,"alarm_start_time":1737750626}],"system_id":701644354}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"System not found for {:id=\u003e\"1\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/{system_id}/production_meter_readings":{"get":{"summary":"production_meter_readings","description":"Returns the last known reading of each production meter on the system as of the requested time, regardless of whether the meter is currently in service or retired. \n Read_at is the time at which the reading was taken, and is always less than or equal to the requested end_at. Commonly, the reading will be within 30 minutes of the requested end_at. However, larger deltas can occur and do not necessarily mean there is a problem with the meter or the system. Systems that are configured to report infrequently can show large deltas on all meters, especially when end_at is close to the current time. Meters that have been retired from a system will show an end_at that doesn’t change, and that eventually is far away from the current time.","tags":["Site Level Production Monitoring"],"produces":["application/json"],"parameters":[{"name":"system_id","in":"path","type":"integer","description":"The unique numeric ID of the system","required":true},{"name":"end_at","in":"query","type":"integer","description":"End of reporting period in Unix epoch time. If no end is specified, defaults to the time of the request. If the end is later than the last reported interval the response data ends with the last reported interval"}],"responses":{"200":{"description":"production_meter_readings","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"System id"},"meter_readings":{"type":"array","items":{"properties":{"serial_number":{"type":"string","description":"the serial number of the meter"},"value":{"type":"integer","description":"the meter reading, in Wh"},"read_at":{"type":"integer","description":"the time when the reading was taken, always prior or equal to the requested 'end_at'"}}},"description":"Production Meter Readings"},"meta":{"type":"object","properties":{"status":{"type":"string","description":"System's status. Corresponding Enlighten values can be found in table added at the end of page."},"last_report_at":{"type":"integer","description":"Timestamp (in epoch format) at which the system's Envoy last submitted a report"},"last_energy_at":{"type":"integer","description":"Timestamp (in epoch format) at which the systems's produced energy was last reported. Even if the last produced energy is 0, its timestamp will be returned."},"operational_at":{"type":"integer","description":"Timestamp (in epoch format) at which this system became operational. Corresponds to the system’s interconnect time, if one is specified. Otherwise, it is the system’s first reported interval end time."}},"description":"Information about the system such as its status, when it became operational and last reported to Envoy."}}},"examples":{"application/json":{"system_id":66,"meter_readings":[{"serial_number":"123123123123EIM1","value":6180635,"read_at":1473901200}],"meta":{"status":"normal","last_report_at":1473902079,"last_energy_at":1473901200,"operational_at":1357023600}}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"System not found for {:id=\u003e\"1\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"422":{"description":"Unprocessable Entity","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Unprocessable Entity","details":"Failed to parse date 1613543106","code":422}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"},"period":{"type":"string","description":"Quota exceeded for minute/month"},"period_start":{"type":"integer","description":"Starting period timestamp"},"period_end":{"type":"integer","description":"Ending period timestamp"},"limit":{"type":"integer","description":"Limit count for the period"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429,"period":"minute","period_start":1623825660,"period_end":1623825720,"limit":5}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/{system_id}/consumption_meter_readings":{"get":{"summary":"consumption_meter_readings","description":"Returns the last known reading of each consumption meter on the system as of the requested time, regardless of whether the meter is currently in service or retired. Read_at is the time at which the reading was taken, and is always less than or equal to the requested end_at. Commonly, the reading will be within 30 minutes of the requested end_at. However, larger deltas can occur and do not necessarily mean there is a problem with the meter or the system. Systems that are configured to report infrequently can show large deltas on all meters, especially when end_at is close to the current time. Meters that have been retired from a system will show an end_at that doesn’t change, and that eventually is far away from the current time.","tags":["Site Level Consumption Monitoring"],"produces":["application/json"],"parameters":[{"name":"system_id","in":"path","type":"integer","description":"The unique numeric ID of the system","required":true},{"name":"end_at","in":"query","type":"integer","description":"End of reporting period in Unix epoch time. If no end is specified, defaults to the time of the request. If the end is later than the last reported interval the response data ends with the last reported interval"}],"responses":{"200":{"description":"consumption_meter_readings","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"System id"},"meter_readings":{"type":"array","items":{"properties":{"serial_num":{"type":"string","description":"the serial number of the meter"},"value":{"type":"integer","description":"the meter reading, in Wh"},"read_at":{"type":"integer","description":"the time when the reading was taken, always prior or equal to the requested 'end_at'"}}},"description":"Consumption Meter Readings"},"meta":{"type":"object","properties":{"status":{"type":"string","description":"System's status. Corresponding Enlighten values can be found in table added at the end of page."},"last_report_at":{"type":"integer","description":"Timestamp (in epoch format) at which the system's Envoy last submitted a report"},"last_energy_at":{"type":"integer","description":"Timestamp (in epoch format) at which the systems's produced energy was last reported. Even if the last produced energy is 0, its timestamp will be returned."},"operational_at":{"type":"integer","description":"Timestamp (in epoch format) at which this system became operational. Corresponds to the system’s interconnect time, if one is specified. Otherwise, it is the system’s first reported interval end time."}},"description":"Information about the system such as its status, when it became operational and last reported to Envoy."}}},"examples":{"application/json":{"system_id":66,"meter_readings":[{"serial_num":"123123123123EIM2","value":6180635,"read_at":1473901200}],"meta":{"status":"normal","last_report_at":1473902079,"last_energy_at":1473901200,"operational_at":1357023600}}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"System not found for {:id=\u003e\"1\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"422":{"description":"Unprocessable Entity","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Unprocessable Entity","details":"Failed to parse date 1613543106","code":422}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"},"period":{"type":"string","description":"Quota exceeded for minute/month"},"period_start":{"type":"integer","description":"Starting period timestamp"},"period_end":{"type":"integer","description":"Ending period timestamp"},"limit":{"type":"integer","description":"Limit count for the period"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429,"period":"minute","period_start":1623825660,"period_end":1623825720,"limit":5}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/{system_id}/storage_meter_readings":{"get":{"summary":"storage_meter_readings","description":"Returns the last known reading of each storage meter on the system as of the requested time, regardless of whether the meter is currently in service or retired. Read_at is the time at which the reading was taken, and is always less than or equal to the requested end_at. Commonly, the reading will be within 30 minutes of the requested end_at. However, larger deltas can occur and do not necessarily mean there is a problem with the meter or the system. Systems that are configured to report infrequently can show large deltas on all meters, especially when end_at is close to the current time. Meters that have been retired from a system will show an end_at that doesn’t change, and that eventually is far away from the current time.","tags":["Site Level Consumption Monitoring"],"produces":["application/json"],"parameters":[{"name":"system_id","in":"path","type":"integer","description":"The unique numeric ID of the system","required":true},{"name":"end_at","in":"query","type":"integer","description":"End of reporting period in Unix epoch time. If no end is specified, defaults to the time of the request. If the end is later than the last reported interval the response data ends with the last reported interval"}],"responses":{"200":{"description":"storage_meter_readings","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"System id"},"meter_readings":{"type":"array","items":{"properties":{"serial_num":{"type":"string","description":"the serial number of the meter"},"value_charged":{"type":"integer","description":"the meter reading for energy charged, in Wh"},"value_discharged":{"type":"integer","description":"the meter reading for energy discharged, in Wh"},"read_at":{"type":"integer","description":"the time when the reading was taken, always prior or equal to the requested 'end_at'"}}},"description":"Storage Meter Readings"},"meta":{"type":"object","properties":{"status":{"type":"string","description":"System's status. Corresponding Enlighten values can be found in table added at the end of page."},"last_report_at":{"type":"integer","description":"Timestamp (in epoch format) at which the system's Envoy last submitted a report"},"last_energy_at":{"type":"integer","description":"Timestamp (in epoch format) at which the systems's produced energy was last reported. Even if the last produced energy is 0, its timestamp will be returned."},"operational_at":{"type":"integer","description":"Timestamp (in epoch format) at which this system became operational. Corresponds to the system’s interconnect time, if one is specified. Otherwise, it is the system’s first reported interval end time."}},"description":"Information about the system such as its status, when it became operational and last reported to Envoy."}}},"examples":{"application/json":{"system_id":66,"meter_readings":[{"serial_num":"482520034566EIM4","value_charged":137436,"value_discharged":2689,"read_at":1762753711}],"meta":{"status":"normal","last_report_at":1473902079,"last_energy_at":1473901200,"operational_at":1357023600}}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"System not found for {:id=\u003e\"1\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"422":{"description":"Unprocessable Entity","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Unprocessable Entity","details":"Failed to parse date 1613543106","code":422}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"},"period":{"type":"string","description":"Quota exceeded for minute/month"},"period_start":{"type":"integer","description":"Starting period timestamp"},"period_end":{"type":"integer","description":"Ending period timestamp"},"limit":{"type":"integer","description":"Limit count for the period"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429,"period":"minute","period_start":1623825660,"period_end":1623825720,"limit":5}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/{system_id}/rgm_stats":{"get":{"summary":"rgm_stats","description":"Returns performance statistics as measured by the revenue-grade meters installed on the specified system. If the total duration requested is more than one week, returns one week of intervals. Intervals are 15 minutes in length and start at the top of the hour.\n Requests for times that do not fall on the 15-minute marks are rounded down. For example, a request for 08:01, 08:08, 08:11, or 08:14 (in epoch format) is treated as a request for 08:00 (in epoch format). Intervals are listed by their end times in epoch format.\n The requested date range in one API hit cannot be more than 7 days and the requested start at must be within 2 years from current time. If the start_at specified is earlier than the system’s first reported date, then midnight of the system’s first reported date is considered as start_at. Empty list will be returned if the last interval \u003c requested start time \u003c current time.","tags":["Site Level Production Monitoring"],"produces":["application/json"],"parameters":[{"name":"system_id","in":"path","type":"integer","description":"The numeric id of the system","required":true},{"name":"start_at","in":"query","type":"integer","description":"Start of period to report on in Unix epoch time. If no start is specified, the assumed start is midnight today, in the timezone of the system. If the start is earlier than the system’s operational_date, the response data begins at midnight of the first reported interval date."},{"name":"end_at","in":"query","type":"integer","description":"End of reporting period in Unix epoch time. If no end is specified, default to the time of the request or (start time + 1 week), whichever is earlier. If the end is later than the last reported interval the response data ends with the last reported interval."}],"responses":{"200":{"description":"rgm_stats","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"System id"},"total_devices":{"type":"integer","description":"Number of active production meters for this system."},"meta":{"type":"object","properties":{"status":{"type":"string","description":"System's status. Corresponding Enlighten values can be found in table added at the end of page."},"last_report_at":{"type":"integer","description":"Timestamp (in epoch format) at which the system's Envoy last submitted a report"},"last_energy_at":{"type":"integer","description":"Timestamp (in epoch format) at which the systems's produced energy was last reported. Even if the last produced energy is 0, its timestamp will be returned."},"operational_at":{"type":"integer","description":"Timestamp (in epoch format) at which this system became operational. Corresponds to the system’s interconnect time, if one is specified. Otherwise, it is the system’s first reported interval end time."}},"description":"Information about the system such as its status, when it became operational and last reported to Envoy."},"intervals":{"type":"array","items":{"properties":{"end_at":{"type":"integer","description":"End time of the telemetry interval."},"devices_reporting":{"type":"integer","description":"Number of production meters that reported data for this interval at the time of the request."},"wh_del":{"type":"integer","description":"Energy delivered during this interval, in Wh."}}},"description":"A list of intervals between the requested start and end times."},"meter_intervals":{"type":"array","items":{"properties":{"meter_serial_number":{"type":"string","description":"Meter serial number"},"envoy_serial_number":{"type":"string","description":"Enovy serial number of the system that the meter reports to"},"intervals":{"type":"array","items":{"properties":{"channel":{"type":"integer","description":"The reporting channel id"},"end_at":{"type":"integer","description":"End time of the telemetry interval."},"wh_del":{"type":"integer","description":"Energy delivered during this interval, in Wh (Watt-Hour)."},"curr_w":{"type":"integer","description":"Power delivered during this interval, in W (Watts)."}}},"description":"Individual meter level interval."}}},"description":"A list of intervals of a meter between the requested start and end times."}}},"examples":{"application/json":{"system_id":66,"total_devices":2,"meta":{"status":"normal","last_report_at":1470087000,"last_energy_at":1470086106,"operational_at":1357023600},"intervals":[{"end_at":1384122700,"wh_del":50,"devices_reporting":2},{"end_at":1384123600,"wh_del":100,"devices_reporting":2},{"end_at":1384124500,"wh_del":15,"devices_reporting":2},{"end_at":1384125400,"wh_del":21,"devices_reporting":2},{"end_at":1384126300,"wh_del":34,"devices_reporting":2}],"meter_intervals":[{"meter_serial_number":"1218676784","envoy_serial_number":"1218347675","intervals":[{"channel":1,"end_at":1384122700,"wh_del":30,"curr_w":120},{"channel":1,"end_at":1384123600,"wh_del":50,"curr_w":200},{"channel":1,"end_at":1384124500,"wh_del":10,"curr_w":40},{"channel":1,"end_at":1384125400,"wh_del":10,"curr_w":40},{"channel":1,"end_at":1384126300,"wh_del":20,"curr_w":80}]},{"meter_serial_number":"1218676791","envoy_serial_number":"1218347675","intervals":[{"channel":1,"end_at":1384122700,"wh_del":20,"curr_w":80},{"channel":1,"end_at":1384123600,"wh_del":50,"curr_w":200},{"channel":1,"end_at":1384124500,"wh_del":5,"curr_w":20},{"channel":1,"end_at":1384125400,"wh_del":11,"curr_w":44},{"channel":1,"end_at":1384126300,"wh_del":14,"curr_w":56}]}]}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"System not found for {:id=\u003e\"1\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"422":{"description":"Unprocessable Entity","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Unprocessable Entity","details":"Requested date range is invalid for this system","code":422}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"},"period":{"type":"string","description":"Quota exceeded for minute/month"},"period_start":{"type":"integer","description":"Starting period timestamp"},"period_end":{"type":"integer","description":"Ending period timestamp"},"limit":{"type":"integer","description":"Limit count for the period"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429,"period":"minute","period_start":1623825660,"period_end":1623825720,"limit":5}}},"500":{"description":"Under some conditions, data for a given period may be temporarily unavailable. When this condition is detected, the response code is 500 and the response body is:","schema":{"type":"object","properties":{"errorCode":{"type":"integer","description":"Error Code"},"errorMessages":{"type":"array","description":"Error Messages","items":{"type":"string"}}}},"examples":{"application/json":{"errorCode":7,"errorMessages":["Data is temporarily unavailable"]}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/{system_id}/consumption_lifetime":{"get":{"summary":"consumption_lifetime","description":"Returns a daily time series of energy consumption as measured by the consumption meter installed on the specified system. All measurements are in Watt hours.\n The time series includes one entry for each day from the start_date to the end_date. There are no gaps in the time series. If the response includes trailing zeroes, such as [909, 4970, 0, 0, 0], then no data has been reported for the last three days.","tags":["Site Level Consumption Monitoring"],"produces":["application/json"],"parameters":[{"name":"system_id","in":"path","type":"integer","description":"The unique numeric ID of the system","required":true},{"name":"start_date","in":"query","type":"string","description":"Requested start date of the time series data. Defaults to the system’s operational date. If the start_date is earlier than the system’s operational_date, then the response data begins with the system operational_date as start_date. Pass as String date format YYYY-MM-DD."},{"name":"end_date","in":"query","type":"string","description":"End date of the time series data. Defaults to yesterday if start_date is earlier than the system’s current date; it defaults to today if start_date is the current date. Pass as String date format YYYY-MM-DD."}],"responses":{"200":{"description":"consumption_lifetime","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"The unique numeric ID of the system"},"start_date":{"type":"string","description":"When no start_date parameter is specified on the request, defaults to the operational_date of the system. May be null if system has never produced. When a start_date parameter is included in the request, the same is included in the response"},"consumption":{"type":"array","description":"An array of consumption measurements in Wh, one for each day since consumption metering began, or one for each day of the requested period","items":{"type":"integer"}},"meta":{"type":"object","properties":{"status":{"type":"string","description":"System's status. Corresponding Enlighten values can be found in table added at the end of page."},"last_report_at":{"type":"integer","description":"Timestamp (in epoch format) at which the system's Envoy last submitted a report"},"last_energy_at":{"type":"integer","description":"Timestamp (in epoch format) at which the systems's produced energy was last reported. Even if the last produced energy is 0, its timestamp will be returned."},"operational_at":{"type":"integer","description":"Timestamp (in epoch format) at which this system became operational. Corresponds to the system’s interconnect time, if one is specified. Otherwise, it is the system’s first reported interval end time."}},"description":"Information about the system such as its status, when it became operational and last reported to Envoy."}}},"examples":{"application/json":{"system_id":66,"start_date":"2016-08-01","consumption":[15422,15421,17118,18505,18511,18487],"meta":{"status":"normal","last_report_at":1470087000,"last_energy_at":1470086106,"operational_at":1357023600}}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"System not found for {:id=\u003e\"1\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"422":{"description":"Unprocessable Entity","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Unprocessable Entity","details":"Requested date is in the future","code":422}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/{system_id}/energy_lifetime":{"get":{"summary":"energy_lifetime","description":"Returns a daily time series of energy produced by the system over its lifetime. All measurements are in Watt hours.\n The time series includes one entry for each day from the start_date to the end_date with no gaps in the time series. If the response includes trailing zeroes, such as [909, 4970, 0, 0, 0], then no energy has been reported for the last days in the series.\n If the system has a meter, the time series includes data as measured by the microinverters until the first full day after the meter has been installed. Later, it switches to using the data as measured by the meter. This is called the “merged time series.”  The attribute “meter_start_date” indicates the time when the meter measurements begin to be used. You can retrieve the complete time series from the meter and from the microinverters by adding the parameter production=all to the request.","tags":["Site Level Production Monitoring"],"produces":["application/json"],"parameters":[{"name":"system_id","in":"path","type":"integer","description":"The unique numeric ID of the system","required":true},{"name":"start_date","in":"query","type":"string","description":"Start date of the time series data. Defaults to the system’s operational date. If the start_date is earlier than the system’s operational_date, then the response data begins with the system operational_date as start_date. Pass as String date format YYYY-MM-DD."},{"name":"end_date","in":"query","type":"string","description":"End date of the time series data. Defaults to yesterday if start_date is earlier than the system’s current date; it defaults to today if start_date is the current date. Pass as String date format YYYY-MM-DD."},{"name":"production","in":"query","type":"string","description":"When “all”, returns the merged time series plus the time series as reported by the microinverters and the meter on the system. Other values are ignored."}],"responses":{"200":{"description":"When the query parameters include “production=all”, returns meter and microinverter-measured time series:","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"System id"},"start_date":{"type":"string","description":"When no start_date parameter is specified on the request, this is the operational_date of the system. May be null if system has never produced. When a start_date parameter is included in the request, it is included here in the response."},"meter_start_date":{"type":"integer","description":"The first day in the time series when measurements are taken from a meter instead of from microinverters. This field is not present unless the system has a meter."},"production":{"type":"array","description":"An array of production measurements, one for each day since the system started producing, or one for each day of the requested period. If the system has never produced energy, the array may be empty.","items":{"type":"integer"}},"meta":{"type":"object","properties":{"status":{"type":"string","description":"System's status. Corresponding Enlighten values can be found in table added at the end of page."},"last_report_at":{"type":"integer","description":"Timestamp (in epoch format) at which the system's Envoy last submitted a report"},"last_energy_at":{"type":"integer","description":"Timestamp (in epoch format) at which the systems's produced energy was last reported. Even if the last produced energy is 0, its timestamp will be returned."},"operational_at":{"type":"integer","description":"Timestamp (in epoch format) at which this system became operational. Corresponds to the system’s interconnect time, if one is specified. Otherwise, it is the system’s first reported interval end time."}},"description":"Information about the system such as its status, when it became operational and last reported to Envoy."}}},"examples":{"application/json":{"system_id":66,"start_date":"2013-01-01","meter_start_date":"2013-01-04","production":[15422,15421,17118,18505,18511,18487],"micro_production":[15422,15421,17118,18513,18520,18494],"meter_production":[0,0,11388,18505,18511,18487],"meta":{"status":"normal","last_report_at":1445619615,"last_energy_at":1445619033,"operational_at":1357023600}}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"System not found for {:id=\u003e\"1\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"422":{"description":"Unprocessable Entity","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Unprocessable Entity","details":"Requested date range is invalid for this system","code":422}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"},"period":{"type":"string","description":"Quota exceeded for minute/month"},"period_start":{"type":"integer","description":"Starting period timestamp"},"period_end":{"type":"integer","description":"Ending period timestamp"},"limit":{"type":"integer","description":"Limit count for the period"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429,"period":"minute","period_start":1623825660,"period_end":1623825720,"limit":5}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/{system_id}/battery_lifetime":{"get":{"summary":"battery_lifetime","description":"Returns a daily time series of energy charged into the batteries and energy discharged from the batteries for a system over its lifetime. All measurements are in Watt hours. The time series includes one entry for each day from the start_date to the end_date with no gaps in the time series. If the response includes trailing zeroes, such as [909, 4970, 0, 0, 0], then no energy has been charged/discharged for the last days in the series.","tags":["Site Level Consumption Monitoring"],"produces":["application/json"],"parameters":[{"name":"system_id","in":"path","type":"integer","description":"The unique numeric ID of the system","required":true},{"name":"start_date","in":"query","type":"string","description":"Requested start date of the time series data. Defaults to the system’s operational date. If the start_date is earlier than the system’s operational_date, then the response data begins with the system operational_date as start_date. Pass as String date format YYYY-MM-DD."},{"name":"end_date","in":"query","type":"string","description":"End date of the time series data. Defaults to yesterday if start_date is earlier than the system’s current date; it defaults to today if start_date is the current date. Pass as String date format YYYY-MM-DD."}],"responses":{"200":{"description":"battery_lifetime","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"The unique numeric ID of the system"},"start_date":{"type":"string","description":"When no start_date parameter is specified on the request, defaults to the operational_date of the system. May be null if system has never produced. When a start_date parameter is included in the request, the same is included in the response"},"charge":{"type":"array","description":"An array of charge measurements, one for each day since the system started producing, or one for each day of the requested period. If the system has never produced energy, the array may be empty","items":{"type":"integer"}},"discharge":{"type":"array","description":"An array of dicharge measurements, one for each day since the system started producing, or one for each day of the requested period. If the system has never produced energy, the array may be empty","items":{"type":"integer"}},"meta":{"type":"object","properties":{"status":{"type":"string","description":"System's status. Corresponding Enlighten values can be found in table added at the end of page."},"last_report_at":{"type":"integer","description":"Timestamp (in epoch format) at which the system's Envoy last submitted a report"},"last_energy_at":{"type":"integer","description":"Timestamp (in epoch format) at which the systems's produced energy was last reported. Even if the last produced energy is 0, its timestamp will be returned."},"operational_at":{"type":"integer","description":"Timestamp (in epoch format) at which this system became operational. Corresponds to the system’s interconnect time, if one is specified. Otherwise, it is the system’s first reported interval end time."}},"description":"Information about the system such as its status, when it became operational and last reported to Envoy."}}},"examples":{"application/json":{"system_id":66,"start_date":"2016-08-01","discharge":[15422,15421,17118,18505,18511,18487],"charge":[15422,15421,17118,18505,18511,18487],"meta":{"status":"normal","last_report_at":1470087000,"last_energy_at":1470086106,"operational_at":1357023600}}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"System not found for {:id=\u003e\"1\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"422":{"description":"Unprocessable Entity","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Unprocessable Entity","details":"Requested date is in the future","code":422}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/{system_id}/energy_import_lifetime":{"get":{"summary":"import_lifetime","description":"Returns a daily time series of energy imported to the grid by the system over its lifetime. All measurements are in Watt hours. The time series includes one entry for each day from the start_date to the end_date with no gaps in the time series. If the response contains trailing zeroes, such as [909, 4970, 0, 0, 0], then no energy has been imported for the last days in the series.","tags":["Site Level Consumption Monitoring"],"produces":["application/json"],"parameters":[{"name":"system_id","in":"path","type":"integer","description":"The unique numeric ID of the system","required":true},{"name":"start_date","in":"query","type":"string","description":"Requested start date of the time series data. Defaults to the system’s operational date. If the start_date is earlier than the system’s operational_date, then the response data begins with the system operational_date as start_date. Pass as String date format YYYY-MM-DD."},{"name":"end_date","in":"query","type":"string","description":"End date of the time series data. Defaults to yesterday if start_date is earlier than the system’s current date; it defaults to today if start_date is the current date. Pass as String date format YYYY-MM-DD."}],"responses":{"200":{"description":"import_lifetime","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"The unique numeric ID of the system"},"start_date":{"type":"string","description":"When no start_date parameter is specified on the request, defaults to the operational_date of the system. May be null if system has never produced. When a start_date parameter is included in the request, the same is included in the response"},"import":{"type":"array","description":"An array of import measurements, one for each day since the system started producing, or one for each day of the requested period. If the system has never produced energy, the array may be empty","items":{"type":"integer"}},"meta":{"type":"object","properties":{"status":{"type":"string","description":"System's status. Corresponding Enlighten values can be found in table added at the end of page."},"last_report_at":{"type":"integer","description":"Timestamp (in epoch format) at which the system's Envoy last submitted a report"},"last_energy_at":{"type":"integer","description":"Timestamp (in epoch format) at which the systems's produced energy was last reported. Even if the last produced energy is 0, its timestamp will be returned."},"operational_at":{"type":"integer","description":"Timestamp (in epoch format) at which this system became operational. Corresponds to the system’s interconnect time, if one is specified. Otherwise, it is the system’s first reported interval end time."}},"description":"Information about the system such as its status, when it became operational and last reported to Envoy."}}},"examples":{"application/json":{"system_id":66,"start_date":"2016-08-01","import":[15422,15421,17118,18505,18511,18487],"meta":{"status":"normal","last_report_at":1470087000,"last_energy_at":1470086106,"operational_at":1357023600}}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"System not found for {:id=\u003e\"1\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"422":{"description":"Unprocessable Entity","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Unprocessable Entity","details":"Requested date is in the future","code":422}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/{system_id}/energy_export_lifetime":{"get":{"summary":"export_lifetime","description":"Returns a daily time series of energy exported to the grid by the system over its lifetime. All measurements are in Watt-hours. The time series includes one entry for each day from the start_date to the end_date with no gaps in the time series. If the response contains trailing zeroes, such as [909, 4970, 0, 0, 0], then no energy has been exported for the last days in the series.","tags":["Site Level Consumption Monitoring"],"produces":["application/json"],"parameters":[{"name":"system_id","in":"path","type":"integer","description":"The unique numeric ID of the system","required":true},{"name":"start_date","in":"query","type":"string","description":"Requested start date of the time series data. Defaults to the system’s operational date. If the start_date is earlier than the system’s operational_date, then the response data begins with the system operational_date as start_date. Pass as String date format YYYY-MM-DD."},{"name":"end_date","in":"query","type":"string","description":"End date of the time series data. Defaults to yesterday if start_date is earlier than the system’s current date; it defaults to today if start_date is the current date. Pass as String date format YYYY-MM-DD."}],"responses":{"200":{"description":"export_lifetime","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"The unique numeric ID of the system"},"start_date":{"type":"string","description":"When no start_date parameter is specified on the request, defaults to the operational_date of the system. May be null if system has never produced. When a start_date parameter is included in the request, the same is included in the response"},"export":{"type":"array","description":"An array of export measurements, one for each day since the system started producing, or one for each day of the requested period. If the system has never produced energy, the array may be empty","items":{"type":"integer"}},"meta":{"type":"object","properties":{"status":{"type":"string","description":"System's status. Corresponding Enlighten values can be found in table added at the end of page."},"last_report_at":{"type":"integer","description":"Timestamp (in epoch format) at which the system's Envoy last submitted a report"},"last_energy_at":{"type":"integer","description":"Timestamp (in epoch format) at which the systems's produced energy was last reported. Even if the last produced energy is 0, its timestamp will be returned."},"operational_at":{"type":"integer","description":"Timestamp (in epoch format) at which this system became operational. Corresponds to the system’s interconnect time, if one is specified. Otherwise, it is the system’s first reported interval end time."}},"description":"Information about the system such as its status, when it became operational and last reported to Envoy."}}},"examples":{"application/json":{"system_id":66,"start_date":"2016-08-01","export":[15422,15421,17118,18505,18511,18487],"meta":{"status":"normal","last_report_at":1470087000,"last_energy_at":1470086106,"operational_at":1357023600}}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"System not found for {:id=\u003e\"1\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"422":{"description":"Unprocessable Entity","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Unprocessable Entity","details":"Requested date is in the future","code":422}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/inverters_summary_by_envoy_or_site":{"get":{"summary":"inverters_summary_by_envoy_or_site","description":"Returns the microinverters summary based on the specified active envoy serial number or system. If both envoy_serial_number and site_id are provided, only envoy_serial_number is used to generate the response.","tags":["System Details"],"produces":["application/json"],"parameters":[{"name":"site_id","in":"query","type":"integer","description":"Site id. The response will contain only those microinverters reporting to one of the active envoys of the given site."},{"name":"envoy_serial_number","in":"query","type":"integer","description":"Envoy Serial Number. Only microinverters reporting to the given envoy will be present in the response."},{"name":"page","in":"query","type":"integer","description":"The page to be returned. Default=1, Min=1. For example, if page is set to 2, 2nd page is returned"},{"name":"size","in":"query","type":"integer","description":"Maximum number of records shown per page. Default=10, Min=1, Max=100.  For example, if max is set to 5, 5 records are shown per page"}],"responses":{"200":{"description":"inverters_summary_by_envoy_or_site","schema":{"type":"array","items":{"properties":{"signal_strength":{"type":"integer","description":"Signal Strength"},"micro_inverters":{"type":"array","items":{"properties":{"id":{"type":"integer","description":"Numeric id of the microinverter"},"serial_number":{"type":"string","description":"Serial number of the microinverter"},"model":{"type":"string","description":"Microinverter model type"},"part_number":{"type":"string","description":"Microinverter part number"},"sku":{"type":"string","description":"SKU of the microinverter"},"status":{"type":"string","description":"Current status of the micro inverter"},"power_produced":{"type":"object","properties":{"value":{"type":"integer","description":"Current power produced by the microinverter"},"units":{"type":"string","description":"Power units"},"precision":{"type":"integer","description":""}}},"proc_load":{"type":"string","description":"Processor load"},"param_table":{"type":"string","description":"Parameter table"},"envoy_serial_number":{"type":"string","description":"Enovy serial number of the system that the micro reports to"},"energy":{"type":"object","properties":{"value":{"type":"integer","description":"Lifetime energy produced by the microinverter"},"units":{"type":"string","description":"Energy units"},"precision":{"type":"integer","description":""}}},"grid_profile":{"type":"string","description":"Grid profile ID"},"last_report_date":{"type":"integer","description":"Date on which the microinverter last reported"}}},"description":"Microinverters"}}}},"examples":{"application/json":[{"signal_strength":5,"micro_inverters":[{"id":1059689835,"serial_number":"688346865858","model":"M215","part_number":"800-00107-r01","sku":"M215-60-2LL-S22-NA","status":"normal","power_produced":{"value":96,"units":"W","precision":0},"proc_load":"521-00005-r00-v02.32.01","param_table":"549-00018-r00-v02.32.01","envoy_serial_number":"121842012242","energy":{"value":232,"units":"Wh","precision":0},"grid_profile":"57227c50e4d7973ae602c4e6","last_report_date":1600427843},{"id":1059689836,"serial_number":"686868727227","model":"M215","part_number":"800-00107-r01","sku":"M215-60-2LL-S22-NA","status":"normal","power_produced":20,"proc_load":"521-00005-r00-v02.32.01","param_table":"549-00018-r00-v02.32.01","envoy_serial_number":"121842012242","energy":{"value":120,"units":"Wh","precision":0},"grid_profile":"57227c50e4d7973ae602c4e6","last_report_date":1600427843}]}]}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"422":{"description":"Unprocessable Entity","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Unprocessable Entity","details":"Envoy serial number or Site id mandatory","code":422}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"},"period":{"type":"string","description":"Quota exceeded for minute/month"},"period_start":{"type":"integer","description":"Starting period timestamp"},"period_end":{"type":"integer","description":"Ending period timestamp"},"limit":{"type":"integer","description":"Limit count for the period"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429,"period":"minute","period_start":1623825660,"period_end":1623825720,"limit":5}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/{system_id}/telemetry/production_micro":{"get":{"summary":"Retrieves telemetry for all production micros for a system","description":"Retrieves telemetry for all the production micros of a system. \nIf no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system’s first reported date, then midnight of the system’s first reported date is considered as start_at.\nThe end_at is calculated as the minimum of the time of the request and (start time + granularity). \nThe meaning of granularity is as follow:\n\nIf granularity is 15mins, maximum 3 intervals will appear in response. If granularity is day, maximum 288 intervals will appear in response where each interval is of 5 mins duration.\n \n The requested start date must be within 2 years from current date.\n By default start_at will appear in response. If start_date parameter is passed in the url, then start_date field will appear in response. \nBy default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. Empty list will be returned if the last interval \u003c requested start time \u003c current time.","tags":["Site Level Production Monitoring"],"parameters":[{"name":"system_id","in":"path","type":"integer","description":"The unique numeric ID of the system","required":true},{"name":"start_at","in":"query","type":"integer","description":"Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as String in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url, then start_date field will appear in response."},{"name":"granularity","in":"query","type":"string","enum":["5mins","15mins","day","week"],"description":"The granularity of the telemetry data. Possible values are 'week', 'day', '15mins', '5mins'. Default is 'day'"}],"produces":["application/json"],"responses":{"200":{"description":"Telemetry for all production micros","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"The unique numeric ID of the system"},"granularity":{"type":"string","description":"The granularity of the telemetry data. Possible values are 'week', 'day', '15mins', '5mins'. Default is 'day'"},"total_devices":{"type":"integer","description":"Number of micro inverters in the site"},"start_at":{"type":"integer","description":"Start Time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url, then start_date field will appear in response."},"end_at":{"type":"integer","description":"End Time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response."},"items":{"type":"string","description":"The list key 'intervals'"},"intervals":{"type":"array","description":"An array of telemetry objects. Each object contains","items":{"properties":{"end_at":{"type":"integer","description":"End time of the telemetry interval"},"devices_reporting":{"type":"integer","description":"Number of devices reporting"},"powr":{"type":"integer","description":"Average power (in Watt) produced by all the microinverters during this interval, measured in Watts."},"enwh":{"type":"integer","description":"Energy produced (in Watt-Hours) from all the microinverters combined during that period"}}}},"meta":{"type":"object","properties":{"status":{"type":"string","description":"System's status. Corresponding Enlighten values can be found in table added at the end of page."},"last_report_at":{"type":"integer","description":"Timestamp (in epoch format) at which the system's Envoy last submitted a report"},"last_energy_at":{"type":"integer","description":"Timestamp (in epoch format) at which the systems's produced energy was last reported. Even if the last produced energy is 0, its timestamp will be returned."},"operational_at":{"type":"integer","description":"Timestamp (in epoch format) at which this system became operational. Corresponds to the system’s interconnect time, if one is specified. Otherwise, it is the system’s first reported interval end time."}},"description":"Information about the system such as its status, when it became operational and last reported to Envoy."}}},"examples":{"application/json":{"system_id":698905955,"granularity":"day","total_devices":9,"start_at":1496526300,"end_at":1496528300,"items":"intervals","intervals":[{"end_at":1384122700,"devices_reporting":1,"powr":30,"enwh":40},{"end_at":1384123600,"devices_reporting":1,"powr":20,"enwh":40}],"meta":{"status":"normal","last_report_at":1445619615,"last_energy_at":1445619033,"operational_at":1357023600}}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"System not found for {:id=\u003e\"1\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"422":{"description":"Unprocessable Entity","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Unprocessable Entity","details":"Invalid request because of 'Requested date range is invalid for this system. {:start_at=\u003e1566930600, :end_at=\u003e1565333100, :first_interval=\u003e1565072100, :last_interval=\u003e1565333700}'","code":422}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"},"period":{"type":"string","description":"Quota exceeded for minute/month"},"period_start":{"type":"integer","description":"Starting period timestamp"},"period_end":{"type":"integer","description":"Ending period timestamp"},"limit":{"type":"integer","description":"Limit count for the period"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429,"period":"minute","period_start":1623825660,"period_end":1623825720,"limit":5}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/{system_id}/telemetry/production_meter":{"get":{"summary":"Retrieves telemetry for all production meters for a system","description":"Retrieves telemetry for all the production meters of a system. \nIf no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system’s first reported date, then midnight of the system’s first reported date is considered as start_at.\nThe end_at is calculated as the minimum of the time of the request and (start time + granularity). \nThe meaning of granularity is as follow:\n\nIf granularity is 15mins, maximum 1 intervals will appear in response. If granularity is day, maximum 96 intervals, and if granularity is week, maximum 672 intervals, will appear in response where each interval is of 15 mins duration.\n \n The requested start date must be within 2 years from current date. \n By default start_at will appear in response. If start_date parameter is passed in the url, then start_date field will appear in response. \nBy default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. Empty list will be returned if the last interval \u003c requested start time \u003c current time.","tags":["Site Level Production Monitoring"],"produces":["application/json"],"parameters":[{"name":"system_id","in":"path","type":"integer","description":"The unique numeric ID of the system","required":true},{"name":"start_at","in":"query","type":"integer","description":"Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as String date format YYYY-MM-DD. By default start_at will appear in response. If start_date parameter is passed in the url, then start_date field will appear in response."},{"name":"granularity","in":"query","type":"string","enum":["5mins","15mins","day","week"],"description":"The granularity of the telemetry data. Possible values are 'week', 'day', '15mins', '5mins'. Default is 'day'"}],"responses":{"200":{"description":"Telemetry for all production meters","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"The unique numeric ID of the system"},"granularity":{"type":"string","description":"The granularity of the telemetry data. Possible values are 'week', 'day', '15mins', '5mins'. Default is 'day'"},"total_devices":{"type":"integer","description":"Number of Production meters in the site"},"start_at":{"type":"integer","description":"Start Time of the data series. Either Start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url, then start_date field will appear in response."},"end_at":{"type":"integer","description":"End Time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url, then end_date field will appear in response."},"items":{"type":"string","description":"The list key 'intervals'"},"intervals":{"type":"array","items":{"properties":{"end_at":{"type":"integer","description":"End time of the telemetry interval."},"devices_reporting":{"type":"integer","description":"Number of device reporting"},"wh_del":{"type":"integer","description":"Units produced per interval"}}}}}},"examples":{"application/json":{"system_id":698905955,"granularity":"day","total_devices":9,"start_at":1496526300,"end_at":1496529300,"items":"intervals","intervals":[{"end_at":1384122700,"devices_reporting":1,"wh_del":40},{"end_at":1384123600,"devices_reporting":1,"wh_del":40}]}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"System not found for {:id=\u003e\"1\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"422":{"description":"Unprocessable Entity","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Unprocessable Entity","details":"Invalid request because of 'Requested date range is invalid for this system. {:start_at=\u003e1566930600, :end_at=\u003e1565333100, :first_interval=\u003e1565072100, :last_interval=\u003e1565333700}'","code":422}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"},"period":{"type":"string","description":"Quota exceeded for minute/month"},"period_start":{"type":"integer","description":"Starting period timestamp"},"period_end":{"type":"integer","description":"Ending period timestamp"},"limit":{"type":"integer","description":"Limit count for the period"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429,"period":"minute","period_start":1623825660,"period_end":1623825720,"limit":5}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/{system_id}/telemetry/battery":{"get":{"summary":"Retrieves telemetry for all batteries for a system","description":"Retrieves telemetry for all the batteries of a system. \nIf no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system’s first reported date, then midnight of the system’s first reported date is considered as start_at.\nThe end_at is calculated as the minimum of the time of the request and (start time + granularity). \nThe meaning of granularity is as follow:\n\nIf granularity is 15mins, maximum 1 interval will appear in response. If granularity is day, maximum 96 intervals, and if granularity is week, maximum 672 intervals,  will appear in response where each interval is of 15 mins duration.\n \n The requested start date must be within 2 years from current date. \n By default start_at will appear in response. If start_date parameter is passed in the url, then start_date field will appear in response. \nBy default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. Empty list will be returned if the last interval \u003c requested start time \u003c current time.","tags":["Site Level Consumption Monitoring"],"produces":["application/json"],"parameters":[{"name":"system_id","in":"path","type":"integer","description":"System id","required":true},{"name":"start_at","in":"query","type":"integer","description":"Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as String date format YYYY-MM-DD. By default start_at will appear in response. If start_date parameter is passed in the url, then start_date field will appear in response."},{"name":"granularity","in":"query","type":"string","enum":["5mins","15mins","day","week"],"description":"The granularity of the telemetry data. Possible values are 'week', 'day', '15mins', '5mins'. Default is 'day'"}],"responses":{"200":{"description":"Telemetry for batteries","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"The unique numeric ID of the system"},"granularity":{"type":"string","description":"The granularity of the telemetry data. Possible values are 'week', 'day', '15mins', '5mins'. Default is 'day'"},"total_devices":{"type":"integer","description":"Number of Batteries in the site"},"start_at":{"type":"integer","description":"Start Time of the data series. Either Start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url, then start_date field will appear in response."},"end_at":{"type":"integer","description":"End Time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url, then end_date field will appear in response."},"items":{"type":"string","description":"The list key 'intervals'"},"intervals":{"type":"array","items":{"properties":{"end_at":{"type":"integer","description":"End time of the telemetry interval."},"charge":{"type":"object","properties":{"enwh":{"type":"integer","description":"Energy into the battery during the interval"},"devices_reporting":{"type":"integer","description":"Number of devices reporting"}}},"discharge":{"type":"object","properties":{"enwh":{"type":"integer","description":"Energy discharged from the battery during the interval"},"devices_reporting":{"type":"integer","description":"Number of devices reporting"}}},"soc":{"type":"object","properties":{"percent":{"type":"integer","description":"Battery soc percentage"},"devices_reporting":{"type":"integer","description":"Number of devices reporting"}}}}}},"last_reported_aggregate_soc":{"type":"string","description":"Last reported aggregate soc percentage"}}},"examples":{"application/json":{"system_id":698905955,"granularity":"day","total_devices":9,"start_at":1496526300,"end_at":1496529300,"items":"intervals","intervals":[{"end_at":1384122700,"charge":{"enwh":40,"devices_reporting":1},"discharge":{"enwh":0,"devices_reporting":4},"soc":{"percent":25,"devices_reporting":4}}],"last_reported_aggregate_soc":"97%"}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"System not found for {:id=\u003e\"1\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"422":{"description":"Unprocessable Entity","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Unprocessable Entity","details":"Invalid request because of 'Requested date range is invalid for this system. {:start_at=\u003e1566930600, :end_at=\u003e1565333100, :first_interval=\u003e1565072100, :last_interval=\u003e1565333700}'","code":422}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"},"period":{"type":"string","description":"Quota exceeded for minute/month"},"period_start":{"type":"integer","description":"Starting period timestamp"},"period_end":{"type":"integer","description":"Ending period timestamp"},"limit":{"type":"integer","description":"Limit count for the period"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429,"period":"minute","period_start":1623825660,"period_end":1623825720,"limit":5}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/{system_id}/telemetry/consumption_meter":{"get":{"summary":"Retrieves telemetry for all consumption meters for a system","description":"Retrieves telemetry for all the consumption meters of a system. \nIf the start_at specified is earlier than the system’s first reported date, then midnight of the system’s first reported date is considered as start_at.\nThe end_at is calculated as the minimum of the time of the request and (start time + granularity). \nThe meaning of granularity is as follow:\n If granularity is 15mins, maximum 1 interval will appear in response. If granularity is day, maximum 96 intervals, and if granularity is week, maximum 672 intervals,  will appear in response where each interval is of 15 mins duration.\n \n The requested start date must be within 2 years from current date. \n By default start_at will appear in response. If start_date parameter is passed in the url, then start_date field will appear in response. \nBy default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. Empty list will be returned if the last interval \u003c requested start time \u003c current time.","tags":["Site Level Consumption Monitoring"],"produces":["application/json"],"parameters":[{"name":"system_id","in":"path","type":"integer","description":"The unique numeric ID of the system","required":true},{"name":"start_at","in":"query","type":"integer","description":"Requested start time for telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as String in YYYY-MM-DD format. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system’s first reported date, then the system first reported date is considered as start_at. By default start_at will appear in response. If start_date parameter is passed in the url, then start_date field will appear in response."},{"name":"granularity","in":"query","type":"string","enum":["5mins","15mins","day","week"],"description":"The granularity of the telemetry data. Possible values are 'week', 'day', '15mins', '5mins'. Default is 'day'"}],"responses":{"200":{"description":"Telemetry for all consumption meters","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"The unique numeric ID of the system"},"granularity":{"type":"string","description":"The granularity of the telemetry data. Possible values are 'week', 'day', '15mins', '5mins'. Default is 'day'"},"total_devices":{"type":"integer","description":"Number of non-retired consumption meters in the site"},"start_at":{"type":"integer","description":"Start Time of the data series. Either Start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url, then start_date field will appear in response."},"end_at":{"type":"integer","description":"End Time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url, then end_date field will appear in response."},"items":{"type":"string","description":"The list key 'intervals'"},"intervals":{"type":"array","items":{"properties":{"end_at":{"type":"integer","description":"End time of the telemetry interval"},"devices_reporting":{"type":"integer","description":"Number of devices reporting"},"enwh":{"type":"integer","description":"Units produced per interval"}}}},"meta":{"type":"object","properties":{"status":{"type":"string","description":"System's status. Corresponding Enlighten values can be found in table added at the end of page."},"last_report_at":{"type":"integer","description":"Timestamp (in epoch format) at which the system's Envoy last submitted a report"},"last_energy_at":{"type":"integer","description":"Timestamp (in epoch format) at which the systems's produced energy was last reported. Even if the last produced energy is 0, its timestamp will be returned."},"operational_at":{"type":"integer","description":"Timestamp (in epoch format) at which this system became operational. Corresponds to the system’s interconnect time, if one is specified. Otherwise, it is the system’s first reported interval end time."}},"description":"Information about the system such as its status, when it became operational and last reported to Envoy."}}},"examples":{"application/json":{"system_id":698905955,"granularity":"day","total_devices":9,"start_at":1496526300,"end_at":1496529300,"items":"intervals","intervals":[{"end_at":1384122700,"devices_reporting":1,"enwh":40},{"end_at":1384123600,"devices_reporting":1,"enwh":40}],"meta":{"status":"normal","last_report_at":1445619615,"last_energy_at":1445619033,"operational_at":1357023600}}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"System not found for {:id=\u003e\"1\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"422":{"description":"Unprocessable Entity","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Unprocessable Entity","details":"Invalid request because of 'Requested date range is invalid for this system. {:start_at=\u003e1566930600, :end_at=\u003e1565333100, :first_interval=\u003e1565072100, :last_interval=\u003e1565333700}'","code":422}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"},"period":{"type":"string","description":"Quota exceeded for minute/month"},"period_start":{"type":"integer","description":"Starting period timestamp"},"period_end":{"type":"integer","description":"Ending period timestamp"},"limit":{"type":"integer","description":"Limit count for the period"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429,"period":"minute","period_start":1623825660,"period_end":1623825720,"limit":5}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/{system_id}/devices/micros/{serial_no}/telemetry":{"get":{"summary":"Retrieves telemetry for single micro/pcu.","description":"Retrieves telemetry for single micro/pcu. \nIf no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system’s first reported date, then midnight of the system’s first reported date is considered as start_at.\nThe end_at is calculated as the minimum of the time of the request and (start time + granularity). \nThe meaning of granularity is as follow:\n\nIf granularity is 15mins, maximum 3 intervals will appear in response. If granularity is day, maximum 288 intervals will appear in response where each interval is of 5 mins duration.\n \n The requested start date must be within 2 years from current date. \n By default start_at will appear in response. If start_date parameter is passed in the url, then start_date field will appear in response. \nBy default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. Empty list will be returned if the last interval \u003c requested start time \u003c current time.","parameters":[{"name":"system_id","in":"path","type":"integer","description":"System id","required":true},{"name":"serial_no","in":"path","type":"string","description":"Serial Number of the individual solar Microinverter","required":true},{"name":"start_at","in":"query","type":"integer","description":"Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as String in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url, then start_date field will appear in response."},{"name":"granularity","in":"query","type":"string","enum":["5mins","15mins","day","week"],"description":"The granularity of the telemetry data. Possible values are 'week', 'day', '15mins', '5mins'. Default is 'day'"}],"tags":["Device Level Monitoring"],"produces":["application/json"],"responses":{"200":{"description":"Telemetry for micro","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"The unique numeric ID of the system"},"serial_number":{"type":"string","description":"The device serial number"},"granularity":{"type":"string","description":"The granularity of the telemetry data. Possible values are 'week', 'day', '15mins', '5mins'. Default is 'day'"},"total_devices":{"type":"integer","description":"Shall always be 1 since this is telemetry from individual micros"},"start_at":{"type":"integer","description":"Start Time of the data series. Either Start_date or start_at will be present. By default start_at will appear in response. If start_date parameter passed in the url then start_date field will appear in response."},"end_at":{"type":"integer","description":"End Time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter passed in the url then end_date field will appear in response."},"items":{"type":"string","description":"The list key 'intervals'"},"intervals":{"type":"array","items":{"properties":{"end_at":{"type":"integer","description":"End time of the telemetry interval"},"powr":{"type":"integer","description":"Average power (in Watt) produced by all the microinverters during this interval, measured in Watts."},"enwh":{"type":"integer","description":"Energy produced (in Watt-Hours) from all the microinverters combined during that period"}}}}}},"examples":{"application/json":{"system_id":1765,"serial_number":"12345","granularity":"day","total_devices":1,"start_at":1496526300,"end_at":1496529300,"items":"intervals","intervals":[{"end_at":1496526300,"powr":30,"enwh":40},{"end_at":1496526600,"powr":20,"enwh":40}]}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"Micro not found for {:id=\u003e\"1\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"422":{"description":"Unprocessable Entity","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Unprocessable Entity","details":"Invalid request because of 'Requested date range is invalid for this system. {:start_at=\u003e1566930600, :end_at=\u003e1565333100, :first_interval=\u003e1565072100, :last_interval=\u003e1565333700}'","code":422}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"},"period":{"type":"string","description":"Quota exceeded for minute/month"},"period_start":{"type":"integer","description":"Starting period timestamp"},"period_end":{"type":"integer","description":"Ending period timestamp"},"limit":{"type":"integer","description":"Limit count for the period"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429,"period":"minute","period_start":1623825660,"period_end":1623825720,"limit":5}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/{system_id}/devices/encharges/{serial_no}/telemetry":{"get":{"summary":"Retrieves telemetry for single Encharge","description":"Retrieves telemetry for single Encharge. \nIf no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system’s first reported date, then midnight of the system’s first reported date is considered as start_at.\nThe end_at is calculated as the minimum of the time of the request and (start time + granularity). \nThe meaning of granularity is as follow:\n\nIf granularity is 15mins, maximum 1 interval will appear in response. If granularity is day, maximum 96 intervals, and if granularity is week, maximum 672 intervals,  will appear in response where each interval is of 15 mins duration.\n \n The requested start date must be within 2 years from current date. \n By default start_at will appear in response. If start_date parameter is passed in the url, then start_date field will appear in response. \nBy default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. Empty list will be returned if the last interval \u003c requested start time \u003c current time.","parameters":[{"name":"system_id","in":"path","type":"integer","description":"System id","required":true},{"name":"serial_no","in":"path","type":"string","description":"Serial Number of the encharge","required":true},{"name":"start_at","in":"query","type":"integer","description":"Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as String in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url, then start_date field will appear in response."},{"name":"granularity","in":"query","type":"string","enum":["5mins","15mins","day","week"],"description":"The granularity of the telemetry data. Possible values are 'week', 'day', '15mins', '5mins'. Default is 'day'"}],"tags":["Device Level Monitoring"],"produces":["application/json"],"responses":{"200":{"description":"Telemetry for the Encharge","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"System id"},"serial_number":{"type":"string","description":"The device serial number"},"granularity":{"type":"string","description":"The granularity of the telemetry data. Possible values are 'week', 'day', '15mins', '5mins'. Default is 'day'"},"total_devices":{"type":"integer","description":"Shall always be 1 since this is telemetry from individual micros"},"start_at":{"type":"integer","description":"Start Time of the data series. Either Start_date or start_at will be present. By default start_at will appear in response. If start_date parameter passed in the url then start_date field will appear in response."},"end_at":{"type":"integer","description":"End Time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter passed in the url then end_date field will appear in response."},"items":{"type":"string","description":"The list key 'intervals'"},"intervals":{"type":"array","items":{"properties":{"end_at":{"type":"integer","description":"End time of the telemetry interval."},"charge":{"type":"object","properties":{"enwh":{"type":"integer","description":"Energy into the battery during the interval"}}},"discharge":{"type":"object","properties":{"enwh":{"type":"integer","description":"Energy discharged from the battery during the interval"}}},"soc":{"type":"object","properties":{"percent":{"type":"integer","description":"Battery soc percentage"}}}}}},"last_reported_time":{"type":"integer","description":"Last reported timestamp"},"last_reported_soc":{"type":"string","description":"Last reported soc percentage"}}},"examples":{"application/json":{"system_id":1765,"serial_number":"12345","granularity":"day","total_devices":1,"start_at":1496526300,"end_at":1496529300,"items":"intervals","intervals":[{"end_at":1384122700,"charge":{"enwh":40},"discharge":{"enwh":0},"soc":{"percent":25}}],"last_reported_time":1650349170,"last_reported_soc":"99%"}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"Encharge not found for {:id=\u003e\"1\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"422":{"description":"Unprocessable Entity","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Unprocessable Entity","details":"Invalid request because of 'Requested date range is invalid for this system. {:start_at=\u003e1566930600, :end_at=\u003e1565333100, :first_interval=\u003e1565072100, :last_interval=\u003e1565333700}'","code":422}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"},"period":{"type":"string","description":"Quota exceeded for minute/month"},"period_start":{"type":"integer","description":"Starting period timestamp"},"period_end":{"type":"integer","description":"Ending period timestamp"},"limit":{"type":"integer","description":"Limit count for the period"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429,"period":"minute","period_start":1623825660,"period_end":1623825720,"limit":5}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/{system_id}/{serial_no}/evse_lifetime":{"get":{"summary":"Retrieves daily time-series telemetry data of the 3rd party EVSE charger","description":"Retrieves daily time-series telemetry data of the 3rd party EVSE charger. The number of data points returned in the response corresponds to days spanned between the start_date and end_date parameter mentioned in the request.","parameters":[{"name":"system_id","in":"path","type":"integer","description":"The unique numeric ID of the system","required":true},{"name":"serial_no","in":"path","type":"string","description":"Serial Number of the EV Charger","required":true},{"name":"start_date","in":"query","type":"string","description":"The start_date defaults to the system’s operational date. If the start_date is earlier than the system’s operational_date, then the response data begins with the system operational_date as start_date. Pass as String date format YYYY-MM-DD"},{"name":"end_date","in":"query","type":"string","description":"End date for fetching the daily time-series data. Pass as String date format YYYY-MM-DD. Defaults to today."}],"tags":["Device Level Monitoring"],"produces":["application/json"],"responses":{"200":{"description":"Telemetry for the evse_lifetime","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"The unique numeric ID of the system"},"start_date":{"type":"string","description":"Start Date of the daily time-series data series"},"end_date":{"type":"string","description":"End Date of the daily time-series data series"},"consumption":{"type":"array","description":"Energy units consumed per day (positive will correspond to EV charge, negative will correspond to EV discharge). The time series includes one entry for each day from the start_date to the end_date with no gaps in the time series. If the response contains trailing zeroes, such as [909, 4970, 0, 0, 0], then there is not charge/discharge of the EV during those days.","items":{"type":"integer"}}}},"examples":{"application/json":{"system_id":698905955,"start_date":"2024-11-22","end_date":"2024-11-28","consumption":[40,35,40,20,15,10,2]}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"System not found for {:id=\u003e\"70118390114\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"422":{"description":"Unprocessable Entity","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Unprocessable Entity","details":"Invalid request because of 'Invalid date/time range'","code":422}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"},"period":{"type":"string","description":"Quota exceeded for minute/month"},"period_start":{"type":"integer","description":"Starting period timestamp"},"period_end":{"type":"integer","description":"Ending period timestamp"},"limit":{"type":"integer","description":"Limit count for the period"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429,"period":"minute","period_start":1623825660,"period_end":1623825720,"limit":5}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/{system_id}/hp_lifetime":{"get":{"summary":"Retrieves daily time-series telemetry data of the HP","description":"Retrieves daily time-series telemetry data of the HP. The number of data points returned in the response corresponds to days spanned between the start_date and end_date parameter mentioned in the request.","parameters":[{"name":"system_id","in":"path","type":"integer","description":"The unique numeric ID of the system","required":true},{"name":"start_date","in":"query","type":"string","description":"The start_date defaults to the system’s operational date. If the start_date is earlier than the system’s operational_date, then the response data begins with the system operational_date as start_date. Pass as String date format YYYY-MM-DD"},{"name":"end_date","in":"query","type":"string","description":"End date for fetching the daily time-series data. Pass as String date format YYYY-MM-DD. Defaults to today."}],"tags":["Device Level Monitoring"],"produces":["application/json"],"responses":{"200":{"description":"Telemetry for the hp_lifetime","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"The unique numeric ID of the system"},"start_date":{"type":"string","description":"Start Date of the daily time-series data series"},"end_date":{"type":"string","description":"End Date of the daily time-series data series"},"consumption":{"type":"array","description":"Energy units consumed per day (positive will correspond to energy consumption, negative will correspond to zero consumption). The time series includes one entry for each day from the start_date to the end_date with no gaps in the time series. If the response contains trailing zeroes, such as [909, 4970, 0, 0, 0], then there is no  consumption by the HP","items":{"type":"integer"}}}},"examples":{"application/json":{"system_id":698905955,"start_date":"2024-11-22","end_date":"2024-11-28","consumption":[40,35,40,20,15,0,5]}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"System not found for {:id=\u003e\"70118390114\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"422":{"description":"Unprocessable Entity","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Unprocessable Entity","details":"Invalid request because of 'Invalid date/time range'","code":422}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"},"period":{"type":"string","description":"Quota exceeded for minute/month"},"period_start":{"type":"integer","description":"Starting period timestamp"},"period_end":{"type":"integer","description":"Ending period timestamp"},"limit":{"type":"integer","description":"Limit count for the period"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429,"period":"minute","period_start":1623825660,"period_end":1623825720,"limit":5}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/{system_id}/{serial_no}/evse_telemetry":{"get":{"summary":"Retrieves telemetry data of the EVSE charger at regular intervals.","description":"Retrieves telemetry data of the EVSE charger at regular intervals. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system’s first reported date, then midnight of the system’s first reported date is considered as start_at. The end_at is calculated as the minimum of the time of the request and (start time + granularity). The meaning of granularity is as follow: If granularity is 15mins, maximum 1 intervals will appear in response. If granularity is day, maximum 96 intervals will appear in response where each interval is of 15 mins duration. The requested start date must be within 2 years from current date.","parameters":[{"name":"system_id","in":"path","type":"integer","description":"The unique numeric ID of the system","required":true},{"name":"serial_num","in":"path","type":"string","description":"Serial Number of the EV Charger","required":true},{"name":"start_at","in":"query","type":"integer","description":"Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as String date format YYYY-MM-DD"},{"name":"granularity","in":"query","type":"string","description":"The granularity of the telemetry data. Possible values are 'week', 'day', '15mins', '5mins'. Default is 'day'"},{"name":"interval_duration","in":"query","type":"string","description":"Size of the interval. Can be 5mins, or 15mins. Site must be configured to 5 min telemetry for this to be supported"}],"tags":["Device Level Monitoring"],"produces":["application/json"],"responses":{"200":{"description":"EVSE telemetry in intervals","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"The unique numeric ID of the system"},"granularity":{"type":"string","description":"The granularity of the telemetry data. Possible values are 'week', 'day', '15mins', '5mins'. Default is 'day'"},"interval_duration":{"type":"string","description":"Size of the interval. Can be 5mins, or 15mins. Site must be configured to 5 min telemetry for this to be supported"},"start_at":{"type":"string","description":"Start Time of the data series. Either Start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url, then start_date field will appear in response."},"end_at":{"type":"string","description":"End Time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url, then end_date field will appear in response."},"items":{"type":"string","description":"The list key 'intervals'"},"intervals":{"type":"array","description":"Energy units consumed per day (positive will correspond to energy consumption, negative will correspond to zero consumption). The time series includes one entry for each day from the start_date to the end_date with no gaps in the time series. If the response contains trailing zeroes, such as [909, 4970, 0, 0, 0], then there is no  consumption by the HP","items":{"type":"array","items":{"properties":{"end_at":{"type":"integer","description":"End time of the telemetry interval"},"wh_consumed":{"type":"integer","description":"Energy units consumed per interval (positive will correspond to EV charge, negative will correspond to EV discharge)"}}}}}}},"examples":{"application/json":{"system_id":698905955,"granularity":"day","interval_duration":"5mins","start_at":1496526300,"end_at":1496528100,"items":"intervals","intervals":[{"end_at":1496527200,"wh_consumed":40},{"end_at":1496527260,"wh_consumed":30},{"end_at":1496527320,"wh_consumed":-10}]}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"System not found for {:id=\u003e\"70118390114\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"422":{"description":"Unprocessable Entity","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Unprocessable Entity","details":"Invalid request because of 'Invalid date/time range'","code":422}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"},"period":{"type":"string","description":"Quota exceeded for minute/month"},"period_start":{"type":"integer","description":"Starting period timestamp"},"period_end":{"type":"integer","description":"Ending period timestamp"},"limit":{"type":"integer","description":"Limit count for the period"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429,"period":"minute","period_start":1623825660,"period_end":1623825720,"limit":5}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/{system_id}/hp_telemetry":{"get":{"summary":"Retrieves energy consumed by HP in regular intervals.","description":"Retrieves energy consumed by HP in regular intervals. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system’s first reported date, then midnight of the system’s first reported date is considered as start_at. The end_at is calculated as the minimum of the time of the request and (start time + granularity). The meaning of granularity is as follow: If granularity is 15mins, maximum 1 intervals will appear in response. If granularity is day, maximum 96 intervals will appear in response where each interval is of 15 mins duration. The requested start date must be within 2 years from current date.","parameters":[{"name":"system_id","in":"path","type":"integer","description":"The unique numeric ID of the system","required":true},{"name":"start_at","in":"query","type":"integer","description":"Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as String date format YYYY-MM-DD"},{"name":"start_date","in":"query","type":"string","description":"Start Date in YYYY-MM-DD format"},{"name":"granularity","in":"query","type":"string","description":"The granularity of the telemetry data. Possible values are 'week', 'day', '15mins', '5mins'. Default is 'day'"},{"name":"interval_duration","in":"query","type":"string","description":"Size of the interval. Can be 5mins, or 15mins. Site must be configured to 5 min telemetry for this to be supported"}],"tags":["Device Level Monitoring"],"produces":["application/json"],"responses":{"200":{"description":"HP telemetry in intervals","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"The unique numeric ID of the system"},"granularity":{"type":"string","description":"The granularity of the telemetry data. Possible values are 'week', 'day', '15mins', '5mins'. Default is 'day'"},"interval_duration":{"type":"string","description":"Size of the interval. Can be 5mins, or 15mins. Site must be configured to 5 min telemetry for this to be supported"},"start_at":{"type":"string","description":"Start Time of the data series. Either Start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url, then start_date field will appear in response."},"end_at":{"type":"string","description":"End Time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url, then end_date field will appear in response."},"items":{"type":"string","description":"The list key 'intervals'"},"intervals":{"type":"array","description":"Energy units consumed per day (positive will correspond to energy consumption, negative will correspond to zero consumption). The time series includes one entry for each day from the start_date to the end_date with no gaps in the time series. If the response contains trailing zeroes, such as [909, 4970, 0, 0, 0], then there is no  consumption by the HP","items":{"type":"array","items":{"properties":{"end_at":{"type":"integer","description":"End time of the telemetry interval"},"wh_consumed":{"type":"integer","description":"Units consumed per interval. This value can only be zero or positive"}}}}}}},"examples":{"application/json":{"system_id":698905955,"granularity":"day","interval_duration":"5mins","start_at":1496526300,"end_at":1496528100,"items":"intervals","intervals":[{"end_at":1496526600,"wh_consumed":40},{"end_at":1496526900,"wh_consumed":40},{"end_at":1496527200,"wh_consumed":40}]}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"System not found for {:id=\u003e\"70118390114\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"422":{"description":"Unprocessable Entity","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Unprocessable Entity","details":"Invalid request because of 'Invalid date/time range'","code":422}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"},"period":{"type":"string","description":"Quota exceeded for minute/month"},"period_start":{"type":"integer","description":"Starting period timestamp"},"period_end":{"type":"integer","description":"Ending period timestamp"},"limit":{"type":"integer","description":"Limit count for the period"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429,"period":"minute","period_start":1623825660,"period_end":1623825720,"limit":5}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/config/{system_id}/battery_settings":{"get":{"summary":"Returns the current battery settings of a system","description":"Returns the current battery settings of a system","parameters":[{"name":"system_id","in":"path","type":"string","description":"The unique numeric id of the system","required":true}],"tags":["System Configurations"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"system_id":{"type":"integer"},"battery_mode":{"type":"string","description":"Current battery mode of the system. Possible values are Savings Mode, Full Backup, and Self - Consumption"},"reserve_soc":{"type":"integer","description":"Reserve soc for the current mode"},"energy_independence":{"type":"string","description":"Energy independence after peak hours enabled/disabled . Enabled: Battery will discharge to save money during peak hours when electricity rates are high. Once that is done, energy independence is prioritized. This will increase the energy self-sufficiency until the reserve soc is hit. Battery will charge from solar in the morning to get ready for the next period Disabled: Battery will discharge only during peak hours when electricity rates are high. During other times, battery will be idle or will charge from solar in the morning to get ready for the next period"},"charge_from_grid":{"type":"string","description":"Charge battery from grid enabled/disabled. Enabled: Battery may also charge from the grid when in full backup mode or when battery charge is below the reserve capacity in savings or self-consumption mode"},"battery_shutdown_level":{"type":"integer","description":"Level at which battery shutdowns to conserve energy. Battery restarts by using the conserved energy when the utility grid restores power or solar panels start producing energy"}}},"examples":{"application/json":{"system_id":1765,"battery_mode":"Self - Consumption","reserve_soc":95,"energy_independence":"enabled","charge_from_grid":"disabled","battery_shutdown_level":13}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"System not found for {:id=\u003e\"1\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"422":{"description":"Unprocessable Entity","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Unprocessable Entity","details":"System doesn't have encharges","code":422}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"},"period":{"type":"string","description":"Quota exceeded for minute/month"},"period_start":{"type":"integer","description":"Starting period timestamp"},"period_end":{"type":"integer","description":"Ending period timestamp"},"limit":{"type":"integer","description":"Limit count for the period"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429,"period":"minute","period_start":1623825660,"period_end":1623825720,"limit":5}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}},"put":{"summary":"Updates the current battery settings of a system","description":"Updates the current battery settings of a system.","parameters":[{"name":"system_id","in":"path","type":"string","description":"The unique numeric id of the system","required":true},{"name":"battery_settings","in":"body","schema":{"type":"object","properties":{"battery_mode":{"type":"string","description":"To update battery mode of the system (case sensitive) - \"Savings Mode\" / \"Self-consumption\" / \"Full Backup\""},"reserve_soc":{"type":"integer","description":"Reserve soc for the current mode - cannot be less than vls"},"energy_independence":{"type":"string","description":"Energy independence after peak hours \"enabled\"/\"disabled\" . Enabled: Battery will discharge to save money during peak hours when electricity rates are high. Once that is done, energy independence is prioritized. This will increase the energy self-sufficiency until the reserve soc is hit. Battery will charge from solar in the morning to get ready for the next period Disabled: Battery will discharge only during peak hours when electricity rates are high. During other times, battery will be idle or will charge from solar in the morning to get ready for the next period"}}}}],"tags":["System Configurations"],"consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"system_id":{"type":"integer"},"battery_mode":{"type":"string","description":"Current battery mode of the system"},"reserve_soc":{"type":"integer","description":"Reserve soc for the current mode"},"energy_independence":{"type":"string","description":"Energy independence after peak hours enabled/disabled . Enabled: Battery will discharge to save money during peak hours when electricity rates are high. Once that is done, energy independence is prioritized. This will increase the energy self-sufficiency until the reserve soc is hit. Battery will charge from solar in the morning to get ready for the next period Disabled: Battery will discharge only during peak hours when electricity rates are high. During other times, battery will be idle or will charge from solar in the morning to get ready for the next period"},"charge_from_grid":{"type":"string","description":"Charge battery from grid enabled/disabled. Enabled: Battery may also charge from the grid when in full backup mode or when battery charge is below the reserve capacity in savings or self-consumption mode"},"battery_shutdown_level":{"type":"integer","description":"Level at which battery shutdowns to conserve energy. Battery restarts by using the conserved energy when the utility grid restores power or solar panels start producing energy"}}},"examples":{"application/json":{"system_id":1765,"battery_mode":"self-consumption","reserve_soc":95,"energy_independence":"enabled","charge_from_grid":"disabled","battery_shutdown_level":13}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"System not found for {:id=\u003e\"1\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"422":{"description":"Unprocessable Entity","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Unprocessable Entity","details":"System doesn't have encharge","code":422}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"},"period":{"type":"string","description":"Quota exceeded for minute/month"},"period_start":{"type":"integer","description":"Starting period timestamp"},"period_end":{"type":"integer","description":"Ending period timestamp"},"limit":{"type":"integer","description":"Limit count for the period"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429,"period":"minute","period_start":1623825660,"period_end":1623825720,"limit":5}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/config/{system_id}/storm_guard":{"get":{"summary":"Returns the current storm guard settings of a system","description":"Returns the current storm guard settings of a system","parameters":[{"name":"system_id","in":"path","type":"string","description":"The unique numeric id of the system","required":true}],"tags":["System Configurations"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"system_id":{"type":"integer"},"storm_guard_status":{"type":"string","description":"Overrides your battery profile to full backup mode when a severe weather condition alert is issued in the localitym"},"storm_alert":{"type":"string","description":"True if severe weather condition alert is issued in the locality"}}},"examples":{"application/json":{"system_id":1765,"storm_guard_status":"enabled","storm_alert":"false"}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"System not found for {:id=\u003e\"1\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"422":{"description":"Unprocessable Entity","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Unprocessable Entity","details":"System doesn't have encharges","code":422}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"},"period":{"type":"string","description":"Quota exceeded for minute/month"},"period_start":{"type":"integer","description":"Starting period timestamp"},"period_end":{"type":"integer","description":"Ending period timestamp"},"limit":{"type":"integer","description":"Limit count for the period"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429,"period":"minute","period_start":1623825660,"period_end":1623825720,"limit":5}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/config/{system_id}/grid_status":{"get":{"summary":"Returns the current grid status of a system","description":"Returns the current grid status of a system","parameters":[{"name":"system_id","in":"path","type":"string","description":"The unique numeric id of the system","required":true}],"tags":["System Configurations"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"system_id":{"type":"integer"},"grid_state":{"type":"string","description":"Indicates whether the site is On Grid, Off Grid or grid status of site is Unknown"},"last_report_date":{"type":"integer","description":"Timestamp (in epoch format) at which the system's Envoy last submitted a report"}}},"examples":{"application/json":{"system_id":1765,"grid_state":"On Grid","last_report_date":1676029267}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"System not found for {:id=\u003e\"1\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"422":{"description":"Unprocessable Entity","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Unprocessable Entity","details":"grid_state not available as the site has not reported yet","code":422}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/config/{system_id}/load_control":{"get":{"summary":"Returns the current load control settings of a system","description":"Returns the current load control settings of a system","parameters":[{"name":"system_id","in":"path","type":"string","description":"The unique numeric id of the system","required":true}],"tags":["System Configurations"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"system_id":{"type":"integer"},"load_control_data":{"type":"array","items":{"properties":{"name":{"type":"string","description":"Name of the dry contact"},"load_name":{"type":"string","description":"Name of the load"},"owner_can_override":{"type":"string","description":"HOs ability to override the load control settings"},"mode":{"type":"string","description":"Current load control configuration"},"soc_low":{"type":"integer","description":"Applicable for advanced mode. Load will be powered off when the battery soc reaches this level"},"soc_high":{"type":"integer","description":"Applicable for advanced mode. Load powers off when battery reacheds soc_low. The load will be powered on when the battery soc reaches soc_high"},"status":{"type":"string","description":"enabled/disabled"},"essential_start_time":{"type":"integer","description":"Applicable for scheduled mode. Time in seconds. Load will powered on between essential_start_time and essential_end_time"},"essential_end_time":{"type":"integer","description":"Applicable for scheduled mode. Time in seconds. Load will powered on between essential_start_time and essential_end_time"}}},"description":"load control data for all the configured loads"}}},"examples":{"application/json":{"system_id":1932237,"load_control_data":[{"name":"NC1","load_name":"Downstairs A/C","owner_can_override":true,"mode":"Basic","soc_low":30,"soc_high":50,"status":"enabled","essential_start_time":32400,"essential_end_time":57600},{"name":"NC2","load_name":"Upstairs A/C","owner_can_override":true,"mode":"Basic","soc_low":30,"soc_high":50,"status":"enabled","essential_start_time":32400,"essential_end_time":57600}]}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"System not found for {:id=\u003e\"1\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"},"period":{"type":"string","description":"Quota exceeded for minute/month"},"period_start":{"type":"integer","description":"Starting period timestamp"},"period_end":{"type":"integer","description":"Ending period timestamp"},"limit":{"type":"integer","description":"Limit count for the period"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429,"period":"minute","period_start":1623825660,"period_end":1623825720,"limit":5}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/{system_id}/energy_import_telemetry":{"get":{"summary":"Retrieves energy imported from grid in regular intervals","description":"Retrieves energy imported from grid in regular intervals. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system’s first reported date, then midnight of the system’s first reported date is considered as start_at. The end_at is calculated as the minimum of the time of the request and (start time + granularity). The meaning of granularity is as follow: If granularity is 15mins, maximum 1 intervals will appear in response. If granularity is day, maximum 96 intervals will appear in response where each interval is of 15 mins duration. The requested start date must be within 2 years from current date. Empty list will be returned if the last interval \u003c requested start time \u003c current time.","tags":["Site Level Consumption Monitoring"],"parameters":[{"name":"system_id","in":"path","type":"integer","description":"The unique numeric ID of the system","required":true},{"name":"start_at","in":"query","type":"integer","description":"Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as String in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url, then start_date field will appear in response."},{"name":"granularity","in":"query","type":"string","enum":["5mins","15mins","day","week"],"description":"The granularity of the telemetry data. Possible values are 'week', 'day', '15mins', '5mins'. Default is 'day'"}],"produces":["application/json"],"responses":{"200":{"description":"Energy import telemetry in intervals","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"The unique numeric ID of the system"},"granularity":{"type":"string","description":"The granularity of the telemetry data. Possible values are 'week', 'day', '15mins', '5mins'. Default is 'day'"},"total_devices":{"type":"integer","description":"Total devices will always return 0 for this endpoint"},"start_at":{"type":"integer","description":"Start Time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url, then start_date field will appear in response."},"end_at":{"type":"integer","description":"End Time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response."},"items":{"type":"string","description":"The list key 'intervals'"},"intervals":{"type":"array","description":"An array of telemetry objects. Each object contains","items":{"type":"array","items":{"properties":{"end_at":{"type":"integer","description":"End time of the telemetry interval"},"wh_exported":{"type":"integer","description":"Energy imported (in Watt-Hours) during that period"}}}}},"meta":{"type":"object","properties":{"status":{"type":"string","description":"System's status. Corresponding Enlighten values can be found in table added at the end of page."},"last_report_at":{"type":"integer","description":"Timestamp (in epoch format) at which the system's Envoy last submitted a report"},"last_energy_at":{"type":"integer","description":"Timestamp (in epoch format) at which the systems's produced energy was last reported. Even if the last produced energy is 0, its timestamp will be returned."},"operational_at":{"type":"integer","description":"Timestamp (in epoch format) at which this system became operational. Corresponds to the system’s interconnect time, if one is specified. Otherwise, it is the system’s first reported interval end time."}},"description":"Information about the system such as its status, when it became operational and last reported to Envoy."}}},"examples":{"application/json":{"system_id":698905955,"granularity":"day","total_devices":0,"start_at":1496526300,"end_at":1496528300,"items":"intervals","intervals":[[{"end_at":1384122700,"wh_imported":40},{"end_at":1384123600,"wh_imported":40}]],"meta":{"status":"normal","last_report_at":1445619615,"last_energy_at":1445619033,"operational_at":1357023600}}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"System not found for {:id=\u003e\"1\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"422":{"description":"Unprocessable Entity","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Unprocessable Entity","details":"Invalid request because of 'Requested date range is invalid for this system. {:start_at=\u003e1566930600, :end_at=\u003e1565333100, :first_interval=\u003e1565072100, :last_interval=\u003e1565333700}'","code":422}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/{system_id}/energy_export_telemetry":{"get":{"summary":"Retrieves energy exported to grid in regular intervals","description":"Retrieves energy exported to grid in regular intervals. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system’s first reported date, then midnight of the system’s first reported date is considered as start_at. The end_at is calculated as the minimum of the time of the request and (start time + granularity). The meaning of granularity is as follow: If granularity is 15mins, maximum 1 intervals will appear in response. If granularity is day, maximum 96 intervals will appear in response where each interval is of 15 mins duration. The requested start date must be within 2 years from current date. Empty list will be returned if the last interval \u003c requested start time \u003c current time.","tags":["Site Level Consumption Monitoring"],"parameters":[{"name":"system_id","in":"path","type":"integer","description":"The unique numeric ID of the system","required":true},{"name":"start_at","in":"query","type":"integer","description":"Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as String in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url, then start_date field will appear in response."},{"name":"granularity","in":"query","type":"string","enum":["5mins","15mins","day","week"],"description":"The granularity of the telemetry data. Possible values are 'week', 'day', '15mins', '5mins'. Default is 'day'"}],"produces":["application/json"],"responses":{"200":{"description":"Energy export telemetry in intervals","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"The unique numeric ID of the system"},"granularity":{"type":"string","description":"The granularity of the telemetry data. Possible values are 'week', 'day', '15mins', '5mins'. Default is 'day'"},"total_devices":{"type":"integer","description":"Total devices will always return 0 for this endpoint"},"start_at":{"type":"integer","description":"Start Time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url, then start_date field will appear in response."},"end_at":{"type":"integer","description":"End Time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response."},"items":{"type":"string","description":"The list key 'intervals'"},"intervals":{"type":"array","description":"An array of telemetry objects. Each object contains","items":{"type":"array","items":{"properties":{"end_at":{"type":"integer","description":"End time of the telemetry interval"},"wh_exported":{"type":"integer","description":"Energy exported (in Watt-Hours) during that period"}}}}},"meta":{"type":"object","properties":{"status":{"type":"string","description":"System's status. Corresponding Enlighten values can be found in table added at the end of page."},"last_report_at":{"type":"integer","description":"Timestamp (in epoch format) at which the system's Envoy last submitted a report"},"last_energy_at":{"type":"integer","description":"Timestamp (in epoch format) at which the systems's produced energy was last reported. Even if the last produced energy is 0, its timestamp will be returned."},"operational_at":{"type":"integer","description":"Timestamp (in epoch format) at which this system became operational. Corresponds to the system’s interconnect time, if one is specified. Otherwise, it is the system’s first reported interval end time."}},"description":"Information about the system such as its status, when it became operational and last reported to Envoy."}}},"examples":{"application/json":{"system_id":698905955,"granularity":"day","total_devices":0,"start_at":1496526300,"end_at":1496528300,"items":"intervals","intervals":[[{"end_at":1384122700,"wh_exported":40},{"end_at":1384123600,"wh_exported":40}]],"meta":{"status":"normal","last_report_at":1445619615,"last_energy_at":1445619033,"operational_at":1357023600}}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"System not found for {:id=\u003e\"1\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"422":{"description":"Unprocessable Entity","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Unprocessable Entity","details":"Invalid request because of 'Requested date range is invalid for this system. {:start_at=\u003e1566930600, :end_at=\u003e1565333100, :first_interval=\u003e1565072100, :last_interval=\u003e1565333700}'","code":422}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/{system_id}/live_data":{"get":{"description":"API users can get real time live status data on demand for a given system. User can retrieve real time power for PV Production, Grid Import/Export, Consumption, Battery Charge/Discharge, and Generator. Users can also retrieve Grid Status, Battery Mode, and Battery State of Charge. User will receive the stream for a duration of 30 seconds by default and can configure the time in seconds by passing ‘duration’ as a parameter with a minimum value of 30 and maximum value of 300","operationId":"getLiveData","parameters":[{"description":"The unique numeric ID of the system","in":"path","name":"system_id","required":true,"type":"integer"},{"description":"Duration of the stream in seconds. Default=30, Min=30, Max=300, e.g=30","in":"header","name":"duration","required":false,"type":"integer"}],"produces":["text/event-stream"],"responses":{"200":{"description":"successful operation","examples":{"text/event-stream":{"data":{"data":{"battery_mode":"Savings Mode","battery_power":5,"battery_soc":40,"consumption_power":15,"envoy_serial_number":["1234"],"generator_power":0,"grid_power":-10,"grid_status":"On Grid","pv_power":30,"system_id":123},"timestamp_epoch":1679041508556,"timestamp_utc":"2023-03-17 08:25:08.556","type":"response"}}},"schema":{"properties":{"data":{"properties":{"data":{"properties":{"battery_mode":{"description":"Battery mode of the site; Possible values are Savings Mode, Full Backup, and Self-consumption","type":"string"},"battery_power":{"description":"Battery power in watts; Power will be positive in case of discharge and negative in case of charge","type":"integer"},"battery_soc":{"description":"Battery soc in percentage","type":"integer"},"consumption_power":{"description":"Consumption power in watts","type":"integer"},"envoy_serial_number":{"items":{"description":"Serial number of the envoy; For multi-envoy sites, the data will be returned only for one of the envoys","type":"string"},"type":"array"},"generator_power":{"description":"Generator power in watts","type":"integer"},"grid_power":{"description":"Grid power in watts; Power will be negative in case of export and positive in case of import","type":"integer"},"grid_status":{"description":"Grid state of the site; Possible values are On Grid, Off Grid, Unknown","type":"string"},"pv_power":{"description":"PV power in watts","type":"integer"},"system_id":{"description":"The unique numeric ID of the system","type":"integer"}},"type":"object"},"timestamp_epoch":{"description":"timestamp in epoch format","type":"integer"},"timestamp_utc":{"description":"timestamp in UTC format","type":"string"},"type":{"description":"response","type":"string"}},"type":"object"}},"type":"object"}},"401":{"description":"User will get 401 in the below cases. Response content type is application/json\nNOT_AUTHENTICATED - API key is missing\nUNAUTHORIZED - Access token is invalid\nUNAUTHORIZED - Access token has expired\nNOT_AUTHENTICATED - API Key is invalid\nUNAUTHORIZED - Application is not authorized to access the requested resource\n","examples":{"text/event-stream":{"error":{"code":401,"details":[{}],"message":"API Key is invalid","status":"NOT_AUTHENTICATED"},"timestamp_epoch":1679041508556,"timestamp_utc":"2023-03-17 08:25:08.556","type":"authentication_error"}},"schema":{"properties":{"error":{"properties":{"code":{"description":"401","type":"integer"},"details":{"items":{"type":"object"},"type":"array"},"message":{"description":"API Key is missing","type":"string"},"status":{"description":"NOT_AUTHENTICATED","type":"string"}},"type":"object"},"timestamp_epoch":{"description":"timestamp in epoch format","type":"integer"},"timestamp_utc":{"description":"timestamp in UTC format","type":"string"},"type":{"description":"authentication_error","type":"string"}},"type":"object"}},"403":{"description":"User is not authorized. Response content type is application/json","examples":{"text/event-stream":{"error":{"code":403,"details":[{}],"message":"User is not authorized","status":"FORBIDDEN"},"timestamp_epoch":1679041508556,"timestamp_utc":"2023-03-17 08:25:08.556","type":"authorization_error"}},"schema":{"properties":{"error":{"properties":{"code":{"description":"403","type":"integer"},"details":{"items":{"type":"object"},"type":"array"},"message":{"description":"API Key is invalid","type":"string"},"status":{"description":"FORBIDDEN","type":"string"}},"type":"object"},"timestamp_epoch":{"description":"timestamp in epoch format","type":"integer"},"timestamp_utc":{"description":"timestamp in UTC format","type":"string"},"type":{"description":"authorization_error","type":"string"}},"type":"object"}},"429":{"description":"Too Many Requests. Response content type is application/json","examples":{"text/event-stream":{"error":{"code":429,"details":[{}],"message":"Too Many Requests","status":"TOO_MANY_REQUESTS"},"timestamp_epoch":1679041508556,"timestamp_utc":"2023-03-17 08:25:08.556","type":"request_exceeded_error"}},"schema":{"properties":{"error":{"properties":{"code":{"description":"429","type":"integer"},"details":{"items":{"type":"object"},"type":"array"},"message":{"description":"Too Many Requests","type":"string"},"status":{"description":"TOO_MANY_REQUESTS","type":"string"}},"type":"object"},"timestamp_epoch":{"description":"timestamp in epoch format","type":"integer"},"timestamp_utc":{"description":"timestamp in UTC format","type":"string"},"type":{"description":"request_exceeded_error","type":"string"}},"type":"object"}},"461":{"description":"Duration is less than 30 seconds. Response content type is application/json","examples":{"text/event-stream":{"error":{"code":461,"details":[{}],"message":"Duration cannot be less than 30","status":"INVALID_DURATION"},"timestamp_epoch":1679041508556,"timestamp_utc":"2023-03-17 08:25:08.556","type":"validation_error"}},"schema":{"properties":{"error":{"properties":{"code":{"description":"461","type":"integer"},"details":{"items":{"type":"object"},"type":"array"},"message":{"description":"Duration cannot be less than 30","type":"string"},"status":{"description":"INVALID_DURATION","type":"string"}},"type":"object"},"timestamp_epoch":{"description":"timestamp in epoch format","type":"integer"},"timestamp_utc":{"description":"timestamp in UTC format","type":"string"},"type":{"description":"validation_error","type":"string"}},"type":"object"}},"462":{"description":"Duration is greater then 900 seconds. Response content type is application/json","examples":{"text/event-stream":{"error":{"code":462,"details":[{}],"message":"Duration cannot be greater than 900","status":"INVALID_DURATION"},"timestamp_epoch":1679041508556,"timestamp_utc":"2023-03-17 08:25:08.556","type":"validation_error"}},"schema":{"properties":{"error":{"properties":{"code":{"description":"462","type":"integer"},"details":{"items":{"type":"object"},"type":"array"},"message":{"description":"Duration cannot be greater than 900","type":"string"},"status":{"description":"INVALID_DURATION","type":"string"}},"type":"object"},"timestamp_epoch":{"description":"timestamp in epoch format","type":"integer"},"timestamp_utc":{"description":"timestamp in UTC format","type":"string"},"type":{"description":"validation_error","type":"string"}},"type":"object"}},"463":{"description":"Duration is not integer. Response content type is application/json","examples":{"text/event-stream":{"error":{"code":463,"details":[{}],"message":"Duration must be an integer","status":"INVALID_DURATION"},"timestamp_epoch":1679041508556,"timestamp_utc":"2023-03-17 08:25:08.556","type":"validation_error"}},"schema":{"properties":{"error":{"properties":{"code":{"description":"463","type":"integer"},"details":{"items":{"type":"object"},"type":"array"},"message":{"description":"Duration must be an integer","type":"string"},"status":{"description":"INVALID_DURATION","type":"string"}},"type":"object"},"timestamp_epoch":{"description":"timestamp in epoch format","type":"integer"},"timestamp_utc":{"description":"timestamp in UTC format","type":"string"},"type":{"description":"validation_error","type":"string"}},"type":"object"}},"466":{"description":"Envoy must be active and envoy version must be at least 6.0.0. Response content type is application/json","examples":{"text/event-stream":{"error":{"code":466,"details":[{}],"message":"Envoy must be active and envoy version must be at least 6.0.0","status":"UNSUPPORTED_ENVOY"},"timestamp_epoch":1679041508556,"timestamp_utc":"2023-03-17 08:25:08.556","type":"validation_error"}},"schema":{"properties":{"error":{"properties":{"code":{"description":"466","type":"integer"},"details":{"items":{"type":"object"},"type":"array"},"message":{"description":"Envoy must be active and envoy version must be at least 6.0.0","type":"string"},"status":{"description":"UNSUPPORTED_ENVOY","type":"string"}},"type":"object"},"timestamp_epoch":{"description":"timestamp in epoch format","type":"integer"},"timestamp_utc":{"description":"timestamp in UTC format","type":"string"},"type":{"description":"validation_error","type":"string"}},"type":"object"}},"468":{"description":"System ID does not exist. Response content type is application/json","examples":{"text/event-stream":{"error":{"code":468,"details":[{}],"message":"System ID doesn't exist","status":"INVALID_SYSTEM_ID"},"timestamp_epoch":1677854252,"timestamp_utc":"2023-03-17 08:25:08.556","type":"validation_error"}},"schema":{"properties":{"error":{"properties":{"code":{"description":"468","type":"integer"},"details":{"items":{"type":"object"},"type":"array"},"message":{"description":"System ID doesn't exist","type":"string"},"status":{"description":"INVALID_SYSTEM_ID","type":"string"}},"type":"object"},"timestamp_epoch":{"description":"timestamp in epoch format","type":"integer"},"timestamp_utc":{"description":"timestamp in UTC format","type":"string"},"type":{"description":"validation_error","type":"string"}},"type":"object"}},"472":{"description":"For Ensemble sites, live stream will be supported in the following cases - If site has an active battery or active system controller, then site must have  active production meter and active consumption meter; Otherwise, site must have active production meter. Response content type is application/json","examples":{"text/event-stream":{"error":{"code":472,"details":[{}],"message":"The system doesn’t support live stream","status":"LIVE_STREAM_NOT_SUPPORTED"},"timestamp_epoch":1677854252,"timestamp_utc":"2023-03-17 08:25:08.556","type":"validation_error"}},"schema":{"properties":{"error":{"properties":{"code":{"description":"472","type":"integer"},"details":{"items":{"type":"object"},"type":"array"},"message":{"description":"The system doesn’t support live stream","type":"string"},"status":{"description":"LIVE_STREAM_NOT_SUPPORTED","type":"string"}},"type":"object"},"timestamp_epoch":{"description":"timestamp in epoch format","type":"integer"},"timestamp_utc":{"description":"timestamp in UTC format","type":"string"},"type":{"description":"validation_error","type":"string"}},"type":"object"}},"473":{"description":"IQ gateway is not reporting. Response content type is application/json","examples":{"text/event-stream":{"error":{"code":473,"details":[{}],"message":"IQ gateway is not reporting","status":"IQ_GATEWAY_NOT_REPORTING"},"timestamp_epoch":1677854252,"timestamp_utc":"2023-03-17 08:25:08.556","type":"site_connectivity_error"}},"schema":{"properties":{"error":{"properties":{"code":{"description":"473","type":"integer"},"details":{"items":{"type":"object"},"type":"array"},"message":{"description":"IQ gateway is not reporting","type":"string"},"status":{"description":"IQ_GATEWAY_NOT_REPORTING","type":"string"}},"type":"object"},"timestamp_epoch":{"description":"timestamp in epoch format","type":"integer"},"timestamp_utc":{"description":"timestamp in UTC format","type":"string"},"type":{"description":"site_connectivity_error","type":"string"}},"type":"object"}},"550":{"description":"Service unreachable. Response content type is application/json","examples":{"text/event-stream":{"error":{"code":550,"details":[{}],"message":"Service unreachable, please try again","status":"SERVICE_UNREACHABLE"},"timestamp_epoch":1677854252,"timestamp_utc":"2023-03-17 08:25:08.556","type":"server_error"}},"schema":{"properties":{"error":{"properties":{"code":{"description":"550","type":"integer"},"details":{"items":{"type":"object"},"type":"array"},"message":{"description":"Service unreachable, please try again","type":"string"},"status":{"description":"SERVICE_UNREACHABLE","type":"string"}},"type":"object"},"timestamp_epoch":{"description":"timestamp in epoch format","type":"integer"},"timestamp_utc":{"description":"timestamp in UTC format","type":"string"},"type":{"description":"server_error","type":"string"}},"type":"object"}},"551":{"description":"Service unreachable. Response content type is application/json","examples":{"text/event-stream":{"error":{"code":551,"details":[{}],"message":"Service unreachable, please try again","status":"SERVICE_UNREACHABLE"},"timestamp_epoch":1677854252,"timestamp_utc":"2023-03-17 08:25:08.556","type":"server_error"}},"schema":{"properties":{"error":{"properties":{"code":{"description":"551","type":"integer"},"details":{"items":{"type":"object"},"type":"array"},"message":{"description":"Service unreachable, please try again","type":"string"},"status":{"description":"SERVICE_UNREACHABLE","type":"string"}},"type":"object"},"timestamp_epoch":{"description":"timestamp in epoch format","type":"integer"},"timestamp_utc":{"description":"timestamp in UTC format","type":"string"},"type":{"description":"server_error","type":"string"}},"type":"object"}},"552":{"description":"Unable to connect. Response content type is application/json","examples":{"text/event-stream":{"error":{"code":552,"details":[{}],"message":"Unable to connect, please try again","status":"CONNECTION_NOT_ESTABLISHED"},"timestamp_epoch":1677854252,"timestamp_utc":"2023-03-17 08:25:08.556","type":"server_error"}},"schema":{"properties":{"error":{"properties":{"code":{"description":"552","type":"integer"},"details":{"items":{"type":"object"},"type":"array"},"message":{"description":"Unable to connect, please try again","type":"string"},"status":{"description":"CONNECTION_NOT_ESTABLISHED","type":"string"}},"type":"object"},"timestamp_epoch":{"description":"timestamp in epoch format","type":"integer"},"timestamp_utc":{"description":"timestamp in UTC format","type":"string"},"type":{"description":"server_error","type":"string"}},"type":"object"}}},"summary":"Site Level Live Status","tags":["Streaming APIs"]}},"/api/v4/systems/{system_id}/latest_telemetry":{"get":{"summary":"Returns a system's last reported PV Power, Consumption Power, and Battery Power in Watts. Return’s operational mode for Battery, HP, and EVSE","description":"Returns a system's last reported PV Power, Consumption Power, and Battery Power in Watts. Return’s operational mode for Battery, HP, and EVSE. If the last_report_at is older than 7 days for a specific device, “last_report_at”, “power” and “operational_mode” parameters will be returned in the response with the value as null.\n\nPV + Storage sites will always be configured in Net Config. PV only sites can configured either as Net or Total config.\n\nFor PV only sites configured as Net config (load with solar), consumption power is calculated as: production + grid.\n\nFor PV only sites configured as Total config, consumption power provided as raw value measured by consumption CT (e.g. the home load).\n\nFor PV + Storage sites in Net config, consumption power is calculated as production + grid.\nIt does not include battery.\n\nConsumption - battery = home load (e.g. fixed load)\n\nbattery is not considered fixed load, but can contribute to supplying the fixed load.\n\nThe consumption meter config is available in the /api/v4/system/{system_id}/devices endpoint. Refer to ‘config_type’ parameter.\n\nHP Modes:\n\nMode_1 - Blocked Operation\nMode_2 - Normal Operation\nMode_3 - Power Consumption Recommended\nMode_4 - Power Consumption Enforced\n\nEVSE Modes:\n\nPLUGGED_OUT - EVSE is not plugged in\nIDLE - EVSE is plugged in but, EV is not charging\nCHARGING - EVSE is plugged in and EV is charging\nFAULTED - The EVSE connector is faulted.","tags":["Site Level Consumption Monitoring"],"produces":["application/json"],"parameters":[{"name":"system_id","in":"path","type":"integer","description":"The unique numeric ID of the system","required":true}],"responses":{"200":{"description":"List of devices","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"System id"},"items":{"type":"string","description":"The list key 'devices'"},"devices":{"type":"object","description":"Hash keys include meters, Encharges, heat pumps and EVSEs","additionalProperties":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Device ID"},"serial_number":{"type":"string","description":"Serial number for HP/EVSE devices."},"name":{"type":"string","description":"Device Name"},"channel":{"type":"integer","description":"The reporting channel ID (applicable only in case of meters)"},"last_report_at":{"type":"integer","description":"Timestamp at which the device last reported"},"power":{"type":"integer","description":"Power reading at the last reported time"},"operational_mode":{"type":"string","description":"Battery mode. Possible values are Idle, Charging, Discharging"}}}}}}},"examples":{"application/json":{"system_id":698943141,"items":"devices","devices":{"meters":[{"id":1084690247,"name":"production","channel":1,"last_report_at":1701418500,"power":755},{"id":1084690247,"name":"production","channel":2,"last_report_at":null,"power":null},{"id":1084690247,"name":"production","channel":3,"last_report_at":null,"power":null},{"id":1084690248,"name":"consumption","channel":1,"last_report_at":1701418500,"power":12},{"id":1084690248,"name":"consumption","channel":2,"last_report_at":null,"power":null},{"id":1084690248,"name":"consumption","channel":3,"last_report_at":null,"power":null}],"encharges":[{"id":1084690255,"name":"Encharge 492205005191","channel":1,"last_report_at":1701087429,"power":-15,"operational_mode":"Idle"},{"id":1084690258,"name":"Encharge 492217007127","channel":1,"last_report_at":1701418467,"power":0,"operational_mode":"Idle"}],"heat-pump":[{"serial_number":"","name":"Viessmann VitoCal 300G","last_report_at":1757583826,"operational_mode":"MODE_2"}],"evse":[{"serial_number":"380699","name":"Wallbox","last_report_at":1757583779,"operational_mode":"PLUGGED_OUT"}]}}}},"401":{"description":"Authentication Error","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Authorized","details":"User is not authorized","code":401}}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Forbidden","details":"Not authorized to access this resource","code":403}}},"404":{"description":"Not Found","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Not Found","details":"System not found for {:id=\u003e\"1\"}","code":404}}},"405":{"description":"Method Not Allowed","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"405","message":["Method not allowed"]}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"message":{"type":"string","description":"Error Type"},"details":{"type":"string","description":"Error Details"},"code":{"type":"integer","description":"Error Code"}}},"examples":{"application/json":{"message":"Too Many Requests","details":"Usage limit exceeded for plan Kilowatt","code":429}}},"501":{"description":"Not Implemented","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"501","message":["Not Implemented"]}}}}}},"/api/v4/systems/{system_id}/ev_charger/devices":{"get":{"tags":["EV Charger Monitoring"],"summary":"Fetch active chargers for a system","description":"API to fetch all active EV Chargers for a system","operationId":"fetchChargersSummary","parameters":[{"name":"system_id","in":"path","description":"The unique numeric ID of the system","required":true,"format":"int32","type":"integer","x-example":698989834}],"responses":{"200":{"description":"Active chargers","schema":{"$ref":"#/definitions/ChargerSummaryResponse"}},"400":{"description":"Invalid system_id","examples":{"application/octet-stream":{"message":"Bad request","code":"400","details":"Invalid system_id"}},"schema":{"$ref":"#/definitions/ErrorResponse"}},"401":{"description":"Unauthorised","examples":{"application/octet-stream":{"message":"Not Authorized","code":"401","details":"User is not authorized"}},"schema":{"$ref":"#/definitions/ErrorResponse"}},"403":{"description":"Forbidden","examples":{"application/octet-stream":{"message":"Forbidden","code":"403","details":"Not authorized to access this resource"}},"schema":{"$ref":"#/definitions/ErrorResponse"}},"405":{"description":"Method Not Allowed","schema":{"$ref":"#/definitions/ErrorResponseArray"}},"500":{"description":"Internal Server Error","examples":{"application/octet-stream":{"message":"Internal Server Error","code":"500","details":"Internal Server Error"}},"schema":{"$ref":"#/definitions/ErrorResponse"}}},"produces":["application/octet-stream"]}},"/api/v4/systems/{system_id}/ev_charger/events":{"get":{"tags":["EV Charger Monitoring"],"summary":"Fetch events","description":"API to fetch all the events related to EV Charger","operationId":"fetchEvents","parameters":[{"name":"system_id","in":"path","description":"The unique numeric ID of the system","required":true,"format":"int32","type":"integer","x-example":701052773},{"name":"offset","in":"query","required":false,"format":"int32","default":0,"type":"integer"},{"name":"serial_num","in":"query","description":"Serial Number of the EV Charger","required":false,"type":"string","x-example":202312100006},{"name":"limit","in":"query","description":"Maximum limit: 100","required":false,"format":"int32","default":20,"type":"integer"}],"responses":{"200":{"description":"List of events","schema":{"$ref":"#/definitions/EVEventsResponse"}},"400":{"description":"Possible Bad request reasons","examples":{"application/octet-stream":{"message":"Bad request","code":"400","details":["Invalid system_id","Invalid offset/limit"]}},"schema":{"$ref":"#/definitions/ErrorResponse"}},"401":{"description":"Unauthorised","examples":{"application/octet-stream":{"message":"Not Authorized","code":"401","details":"User is not authorized"}},"schema":{"$ref":"#/definitions/ErrorResponse"}},"403":{"description":"Forbidden","examples":{"application/octet-stream":{"message":"Forbidden","code":"403","details":"Not authorized to access this resource"}},"schema":{"$ref":"#/definitions/ErrorResponse"}},"405":{"description":"Method Not Allowed","schema":{"$ref":"#/definitions/ErrorResponseArray"}},"500":{"description":"Internal Server Error","examples":{"application/octet-stream":{"message":"Internal Server Error","code":"500","details":"Internal Server Error"}},"schema":{"$ref":"#/definitions/ErrorResponse"}}},"produces":["application/octet-stream"]}},"/api/v4/systems/{system_id}/ev_charger/{serial_no}/sessions":{"get":{"tags":["EV Charger Monitoring"],"summary":"Charger session history","description":"Get list of sessions for a single EV Charger","operationId":"fetchChargerSessionHistory","parameters":[{"name":"system_id","in":"path","required":true,"format":"int32","type":"integer","x-example":698989834},{"name":"serial_no","in":"path","required":true,"type":"string","x-example":202320010308},{"name":"offset","in":"query","required":false,"format":"int32","default":0,"type":"integer"},{"name":"limit","in":"query","description":"Maximum limit: 100","required":false,"format":"int32","default":20,"type":"integer"}],"responses":{"200":{"description":"Charger sessions list","schema":{"$ref":"#/definitions/ChargeSessionDetailsResponse"}},"400":{"description":"Possible Bad request reasons","examples":{"application/octet-stream":{"message":"Bad request","code":"400","details":["Invalid system_id or serial_no","Invalid offset/limit"]}},"schema":{"$ref":"#/definitions/ErrorResponse"}},"401":{"description":"Unauthorised","examples":{"application/octet-stream":{"message":"Not Authorized","code":"401","details":"User is not authorized"}},"schema":{"$ref":"#/definitions/ErrorResponse"}},"403":{"description":"Forbidden","examples":{"application/octet-stream":{"message":"Forbidden","code":"403","details":"Not authorized to access this resource"}},"schema":{"$ref":"#/definitions/ErrorResponse"}},"405":{"description":"Method Not Allowed","schema":{"$ref":"#/definitions/ErrorResponseArray"}},"500":{"description":"Internal Server Error","examples":{"application/octet-stream":{"message":"Internal Server Error","code":"500","details":"Internal Server Error"}},"schema":{"$ref":"#/definitions/ErrorResponse"}}},"produces":["application/octet-stream"]}},"/api/v4/systems/{system_id}/ev_charger/{serial_no}/schedules":{"get":{"tags":["EV Charger Monitoring"],"summary":"Get Schedule","description":"API to fetch all EV Charger Schedules for a Device By System id and Serial Number","operationId":"fetchSchedules","parameters":[{"name":"system_id","in":"path","description":"The unique numeric ID of the system","required":true,"format":"int32","type":"integer","x-example":698989834},{"name":"serial_no","in":"path","description":"Serial Number of the EV Charger","required":true,"type":"string","x-example":202320010308}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/SchedulesBodyResponse"}},"400":{"description":"Invalid system_id or serial_no","examples":{"application/octet-stream":{"message":"Bad request","code":"400","details":"Invalid system_id or serial_no"}},"schema":{"$ref":"#/definitions/ErrorResponse"}},"401":{"description":"Unauthorised","examples":{"application/octet-stream":{"message":"Not Authorized","code":"401","details":"User is not authorized"}},"schema":{"$ref":"#/definitions/ErrorResponse"}},"403":{"description":"Forbidden","examples":{"application/octet-stream":{"message":"Forbidden","code":"403","details":"Not authorized to access this resource"}},"schema":{"$ref":"#/definitions/ErrorResponse"}},"405":{"description":"Method Not Allowed","schema":{"$ref":"#/definitions/ErrorResponseArray"}},"500":{"description":"Internal Server Error","examples":{"application/octet-stream":{"message":"Internal Server Error","code":"500","details":"Internal Server Error"}},"schema":{"$ref":"#/definitions/ErrorResponse"}}},"produces":["application/octet-stream"]}},"/api/v4/systems/{system_id}/ev_charger/{serial_no}/lifetime":{"get":{"tags":["EV Charger Monitoring"],"summary":"Daily energy api","description":"Retrieves the daily telemetry for a single EV Charger.\nThe number of data points returned in the response corresponds to\ndays spanned between the start_date and end_date parameter mentioned in the request.","operationId":"fetchDailyEnergyConsumptionData","parameters":[{"name":"system_id","in":"path","description":"The unique numeric ID of the system","required":true,"format":"int32","type":"integer","x-example":698989834},{"name":"serial_no","in":"path","description":"Serial Number of the EV Charger","required":true,"type":"string","x-example":190179855},{"name":"start_date","in":"query","description":"Requested start date of the time series data. If the start_date is not provided, then the response data begins with the previous date as start_date. Pass as String date format YYYYMMDD.","required":true,"type":"string","x-example":20240101},{"name":"end_date","in":"query","description":"End date of the time series data. Defaults to yesterday. Pass as String date format YYYYMMDD.","required":false,"type":"string","x-example":20240106}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/EVEnergyResponse"}},"400":{"description":"Possible Bad request reasons","examples":{"application/octet-stream":{"message":"Bad request","code":"400","details":["Invalid system_id","Invalid start_date/end_date"]}},"schema":{"$ref":"#/definitions/ErrorResponse"}},"401":{"description":"Unauthorised","examples":{"application/octet-stream":{"message":"Not Authorized","code":"401","details":"User is not authorized"}},"schema":{"$ref":"#/definitions/ErrorResponse"}},"403":{"description":"Forbidden","examples":{"application/octet-stream":{"message":"Forbidden","code":"403","details":"Not authorized to access this resource"}},"schema":{"$ref":"#/definitions/ErrorResponse"}},"405":{"description":"Method Not Allowed","schema":{"$ref":"#/definitions/ErrorResponseArray"}},"500":{"description":"Internal Server Error","examples":{"application/octet-stream":{"message":"Internal Server Error","code":"500","details":"Internal Server Error"}},"schema":{"$ref":"#/definitions/ErrorResponse"}}},"produces":["application/octet-stream"]}},"/api/v4/systems/{system_id}/ev_charger/{serial_no}/telemetry":{"get":{"tags":["EV Charger Monitoring"],"summary":"Interval energy api","description":"Retrieves telemetry for single EV Charger.\nIf no start_at is specified, defaults to previous days date, in the timezone of the system.\nThe end_at is calculated as the minimum of the time of the request and (start time + granularity).\nThe meaning of granularity is as follow:\n\nIf granularity is day, maximum 392 intervals will appear in response where each interval is of 15 mins duration. By default start_at will appear in response. If start_date parameter is passed in the url, then start_date field will appear in response.\nBy default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response.","operationId":"fetchEnergyConsumptionData","parameters":[{"name":"system_id","in":"path","description":"The unique numeric ID of the system","required":true,"format":"int32","type":"integer","x-example":700460094},{"name":"serial_no","in":"path","description":"Serial Number of the EV Charger","required":true,"type":"string","x-example":202109116909},{"name":"granularity","in":"query","description":"The granularity of the telemetry data. Possible values are 'week', 'day'. Default is 'day'","required":false,"type":"string","x-example":"day"},{"name":"start_date","in":"query","description":"Requested start date of the time series data. If the start_date and start_at is not provided, then the response data begins with the previous date as start_date. Pass as String date format YYYYMMDD.","required":false,"type":"string","x-example":20240116},{"name":"start_at","in":"query","description":"Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as String in YYYYMMDD format. By default start_at will appear in response. If start_date parameter is passed in the url, then start_date field will appear in response.","required":false,"type":"string","x-example":1705425848}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/EVIntervalEnergyResponse"}},"400":{"description":"Possible Bad request reasons","examples":{"application/octet-stream":{"message":"Bad request","code":"400","details":["Invalid granularity","Invalid system_id","Invalid start_date"]}},"schema":{"$ref":"#/definitions/ErrorResponse"}},"401":{"description":"Unauthorised","examples":{"application/octet-stream":{"message":"Not Authorized","code":"401","details":"User is not authorized"}},"schema":{"$ref":"#/definitions/ErrorResponse"}},"403":{"description":"Forbidden","examples":{"application/octet-stream":{"message":"Forbidden","code":"403","details":"Not authorized to access this resource"}},"schema":{"$ref":"#/definitions/ErrorResponse"}},"405":{"description":"Method Not Allowed","schema":{"$ref":"#/definitions/ErrorResponseArray"}},"500":{"description":"Internal Server Error","examples":{"application/octet-stream":{"message":"Internal Server Error","code":"500","details":"Internal Server Error"}},"schema":{"$ref":"#/definitions/ErrorResponse"}}},"produces":["application/octet-stream"]}},"/api/v4/systems/{system_id}/ev_charger/{serial_no}/start_charging":{"post":{"tags":["EV Charger Control"],"summary":"Start charging. Illustrative only - access via VPP api for partners","description":"API to send start charging command to the EV Charger","operationId":"startCharging","parameters":[{"name":"system_id","in":"path","description":"The unique numeric ID of the system","required":true,"format":"int32","type":"integer","x-example":701052773},{"name":"serial_no","in":"path","description":"Serial Number of the EV Charger","required":true,"type":"string","x-example":202312100006},{"name":"body","in":"body","schema":{"$ref":"#/definitions/StartChargingRequestBody"}}],"responses":{"202":{"description":"Request accepted","schema":{"$ref":"#/definitions/DefaultCommandResponse"}},"400":{"description":"Possible Bad request reasons","examples":{"application/octet-stream":{"message":"Bad request","code":"400","details":["Invalid system_id or serial_no","Connector Id must be greater than 0","Charging level should be in the range [0-100]"]}},"schema":{"$ref":"#/definitions/ErrorResponse"}},"401":{"description":"Unauthorised","examples":{"application/octet-stream":{"message":"Not Authorized","code":"401","details":"User is not authorized"}},"schema":{"$ref":"#/definitions/ErrorResponse"}},"403":{"description":"Forbidden","examples":{"application/octet-stream":{"message":"Forbidden","code":"403","details":"Not authorized to access this resource"}},"schema":{"$ref":"#/definitions/ErrorResponse"}},"405":{"description":"Method Not Allowed","schema":{"$ref":"#/definitions/ErrorResponseArray"}},"500":{"description":"Internal Server Error","examples":{"application/octet-stream":{"message":"Internal Server Error","code":"500","details":"Internal Server Error"}},"schema":{"$ref":"#/definitions/ErrorResponse"}}},"consumes":["application/json"],"produces":["application/octet-stream"]}},"/api/v4/systems/{system_id}/ev_charger/{serial_no}/stop_charging":{"post":{"tags":["EV Charger Control"],"summary":"Stop charging. Illustrative only - access via VPP api for partners","description":"API to send stop charging command to the EV Charger","operationId":"stopCharging","parameters":[{"name":"system_id","in":"path","description":"The unique numeric ID of the system","required":true,"format":"int32","type":"integer","x-example":701052773},{"name":"serial_no","in":"path","description":"Serial Number of the EV Charger","required":true,"type":"string","x-example":202312100006}],"responses":{"202":{"description":"Request accepted","schema":{"$ref":"#/definitions/DefaultCommandResponse"}},"400":{"description":"Invalid system_id or serial_no","examples":{"application/octet-stream":{"message":"Bad request","code":"400","details":"Invalid system_id or serial_no"}},"schema":{"$ref":"#/definitions/ErrorResponse"}},"401":{"description":"Unauthorised","examples":{"application/octet-stream":{"message":"Not Authorized","code":"401","details":"User is not authorized"}},"schema":{"$ref":"#/definitions/ErrorResponse"}},"403":{"description":"Forbidden","examples":{"application/octet-stream":{"message":"Forbidden","code":"403","details":"Not authorized to access this resource"}},"schema":{"$ref":"#/definitions/ErrorResponse"}},"405":{"description":"Method Not Allowed","schema":{"$ref":"#/definitions/ErrorResponseArray"}},"500":{"description":"Internal Server Error","examples":{"application/octet-stream":{"message":"Internal Server Error","code":"500","details":"Internal Server Error"}},"schema":{"$ref":"#/definitions/ErrorResponse"}}},"produces":["application/octet-stream"]}}},"definitions":{"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"details":{"type":"string"}}},"ErrorResponseArray":{"required":["message","reason"],"type":"object","properties":{"message":{"type":"array","description":"message","example":["Method not allowed"],"items":{"type":"string","description":"message","example":"[\"Method not allowed\"]"}},"reason":{"type":"string","description":"statusCode","example":"405"}}},"DefaultCommandResponse":{"type":"object","properties":{"message":{"type":"string","description":"Success message","example":"Request sent successfully"}}},"StartChargingRequestBody":{"type":"object","properties":{"connectorId":{"type":"string","description":"connector id. It Should be a positive integer.","example":"1"},"chargingLevel":{"maximum":100,"minimum":0,"type":"string","description":"Charging current level. It Should be an integer in [0-100].","example":"40"}}},"EVIntervalEnergyResponse":{"type":"object","properties":{"granularity":{"type":"string","example":"day"},"consumption":{"type":"array","example":[{"consumption":0,"end_at":1705385700},{"consumption":0,"end_at":1705386600},{"consumption":0,"end_at":1705387500},{"consumption":0,"end_at":1705388400},{"consumption":0,"end_at":1705389300},{"consumption":0,"end_at":1705390200},{"consumption":0,"end_at":1705391100},{"consumption":0,"end_at":1705392000},{"consumption":0,"end_at":1705392900},{"consumption":0,"end_at":1705393800},{"consumption":0,"end_at":1705394700},{"consumption":0,"end_at":1705395600},{"consumption":0,"end_at":1705396500},{"consumption":0,"end_at":1705397400},{"consumption":0,"end_at":1705398300},{"consumption":0,"end_at":1705399200},{"consumption":38,"end_at":1705400100},{"consumption":201,"end_at":1705401000},{"consumption":202,"end_at":1705401900},{"consumption":202,"end_at":1705402800},{"consumption":202,"end_at":1705403700},{"consumption":202,"end_at":1705404600},{"consumption":202,"end_at":1705405500},{"consumption":202,"end_at":1705406400},{"consumption":202,"end_at":1705407300},{"consumption":202,"end_at":1705408200},{"consumption":202,"end_at":1705409100},{"consumption":202,"end_at":1705410000},{"consumption":202,"end_at":1705410900},{"consumption":202,"end_at":1705411800},{"consumption":202,"end_at":1705412700},{"consumption":202,"end_at":1705413600},{"consumption":202,"end_at":1705414500},{"consumption":202,"end_at":1705415400},{"consumption":202,"end_at":1705416300},{"consumption":202,"end_at":1705417200},{"consumption":202,"end_at":1705418100},{"consumption":202,"end_at":1705419000},{"consumption":202,"end_at":1705419900},{"consumption":202,"end_at":1705420800},{"consumption":202,"end_at":1705421700},{"consumption":202,"end_at":1705422600},{"consumption":202,"end_at":1705423500},{"consumption":202,"end_at":1705424400},{"consumption":202,"end_at":1705425300},{"consumption":202,"end_at":1705426200},{"consumption":202,"end_at":1705427100},{"consumption":202,"end_at":1705428000},{"consumption":202,"end_at":1705428900},{"consumption":202,"end_at":1705429800},{"consumption":202,"end_at":1705430700},{"consumption":202,"end_at":1705431600},{"consumption":202,"end_at":1705432500},{"consumption":202,"end_at":1705433400},{"consumption":202,"end_at":1705434300},{"consumption":202,"end_at":1705435200},{"consumption":203,"end_at":1705436100},{"consumption":202,"end_at":1705437000},{"consumption":202,"end_at":1705437900},{"consumption":202,"end_at":1705438800},{"consumption":202,"end_at":1705439700},{"consumption":202,"end_at":1705440600},{"consumption":202,"end_at":1705441500},{"consumption":202,"end_at":1705442400},{"consumption":202,"end_at":1705443300},{"consumption":202,"end_at":1705444200},{"consumption":202,"end_at":1705445100},{"consumption":202,"end_at":1705446000},{"consumption":202,"end_at":1705446900},{"consumption":202,"end_at":1705447800},{"consumption":202,"end_at":1705448700},{"consumption":202,"end_at":1705449600},{"consumption":202,"end_at":1705450500},{"consumption":202,"end_at":1705451400},{"consumption":202,"end_at":1705452300},{"consumption":202,"end_at":1705453200},{"consumption":202,"end_at":1705454100},{"consumption":202,"end_at":1705455000},{"consumption":202,"end_at":1705455900},{"consumption":202,"end_at":1705456800},{"consumption":202,"end_at":1705457700},{"consumption":202,"end_at":1705458600},{"consumption":202,"end_at":1705459500},{"consumption":202,"end_at":1705460400},{"consumption":202,"end_at":1705461300},{"consumption":202,"end_at":1705462200},{"consumption":202,"end_at":1705463100},{"consumption":202,"end_at":1705464000},{"consumption":202,"end_at":1705464900},{"consumption":202,"end_at":1705465800},{"consumption":202,"end_at":1705466700},{"consumption":202,"end_at":1705467600},{"consumption":104,"end_at":1705468500},{"consumption":0,"end_at":1705469400},{"consumption":0,"end_at":1705470300},{"consumption":0,"end_at":1705471200}],"items":{"$ref":"#/definitions/EnergyConsumption"}},"system_id":{"type":"integer","format":"int32","example":700460094},"start_date":{"type":"string","example":"2024-01-16"},"end_date":{"type":"string","example":"2024-01-16"},"start_at":{"type":"integer","format":"int64"},"end_at":{"type":"integer","format":"int64"}}},"EnergyConsumption":{"type":"object","properties":{"consumption":{"type":"integer","format":"int32"},"end_at":{"type":"integer","format":"int64"}},"example":[{"consumption":0,"end_at":1705385700},{"consumption":0,"end_at":1705386600},{"consumption":0,"end_at":1705387500},{"consumption":0,"end_at":1705388400},{"consumption":0,"end_at":1705389300},{"consumption":0,"end_at":1705390200},{"consumption":0,"end_at":1705391100},{"consumption":0,"end_at":1705392000},{"consumption":0,"end_at":1705392900},{"consumption":0,"end_at":1705393800},{"consumption":0,"end_at":1705394700},{"consumption":0,"end_at":1705395600},{"consumption":0,"end_at":1705396500},{"consumption":0,"end_at":1705397400},{"consumption":0,"end_at":1705398300},{"consumption":0,"end_at":1705399200},{"consumption":38,"end_at":1705400100},{"consumption":201,"end_at":1705401000},{"consumption":202,"end_at":1705401900},{"consumption":202,"end_at":1705402800},{"consumption":202,"end_at":1705403700},{"consumption":202,"end_at":1705404600},{"consumption":202,"end_at":1705405500},{"consumption":202,"end_at":1705406400},{"consumption":202,"end_at":1705407300},{"consumption":202,"end_at":1705408200},{"consumption":202,"end_at":1705409100},{"consumption":202,"end_at":1705410000},{"consumption":202,"end_at":1705410900},{"consumption":202,"end_at":1705411800},{"consumption":202,"end_at":1705412700},{"consumption":202,"end_at":1705413600},{"consumption":202,"end_at":1705414500},{"consumption":202,"end_at":1705415400},{"consumption":202,"end_at":1705416300},{"consumption":202,"end_at":1705417200},{"consumption":202,"end_at":1705418100},{"consumption":202,"end_at":1705419000},{"consumption":202,"end_at":1705419900},{"consumption":202,"end_at":1705420800},{"consumption":202,"end_at":1705421700},{"consumption":202,"end_at":1705422600},{"consumption":202,"end_at":1705423500},{"consumption":202,"end_at":1705424400},{"consumption":202,"end_at":1705425300},{"consumption":202,"end_at":1705426200},{"consumption":202,"end_at":1705427100},{"consumption":202,"end_at":1705428000},{"consumption":202,"end_at":1705428900},{"consumption":202,"end_at":1705429800},{"consumption":202,"end_at":1705430700},{"consumption":202,"end_at":1705431600},{"consumption":202,"end_at":1705432500},{"consumption":202,"end_at":1705433400},{"consumption":202,"end_at":1705434300},{"consumption":202,"end_at":1705435200},{"consumption":203,"end_at":1705436100},{"consumption":202,"end_at":1705437000},{"consumption":202,"end_at":1705437900},{"consumption":202,"end_at":1705438800},{"consumption":202,"end_at":1705439700},{"consumption":202,"end_at":1705440600},{"consumption":202,"end_at":1705441500},{"consumption":202,"end_at":1705442400},{"consumption":202,"end_at":1705443300},{"consumption":202,"end_at":1705444200},{"consumption":202,"end_at":1705445100},{"consumption":202,"end_at":1705446000},{"consumption":202,"end_at":1705446900},{"consumption":202,"end_at":1705447800},{"consumption":202,"end_at":1705448700},{"consumption":202,"end_at":1705449600},{"consumption":202,"end_at":1705450500},{"consumption":202,"end_at":1705451400},{"consumption":202,"end_at":1705452300},{"consumption":202,"end_at":1705453200},{"consumption":202,"end_at":1705454100},{"consumption":202,"end_at":1705455000},{"consumption":202,"end_at":1705455900},{"consumption":202,"end_at":1705456800},{"consumption":202,"end_at":1705457700},{"consumption":202,"end_at":1705458600},{"consumption":202,"end_at":1705459500},{"consumption":202,"end_at":1705460400},{"consumption":202,"end_at":1705461300},{"consumption":202,"end_at":1705462200},{"consumption":202,"end_at":1705463100},{"consumption":202,"end_at":1705464000},{"consumption":202,"end_at":1705464900},{"consumption":202,"end_at":1705465800},{"consumption":202,"end_at":1705466700},{"consumption":202,"end_at":1705467600},{"consumption":104,"end_at":1705468500},{"consumption":0,"end_at":1705469400},{"consumption":0,"end_at":1705470300},{"consumption":0,"end_at":1705471200}]},"ChargeSessionDetail":{"required":["charge_time","cost","duration","end_time","energy_added","miles_added","start_time"],"type":"object","properties":{"start_time":{"type":"integer","description":"session start time","format":"int64","example":1700059683},"end_time":{"type":"integer","description":"session end time","format":"int64","example":1700071180},"duration":{"type":"integer","description":"session duration in seconds","format":"int64","example":11497},"energy_added":{"type":"number","description":"energy added in Wh","format":"double","example":14.83},"charge_time":{"type":"integer","description":"Total charging time","format":"int64","example":7080},"miles_added":{"type":"number","description":"Miles added","format":"double","example":1.2},"cost":{"type":"number","description":"session cost","example":0.5}},"description":"List of sessions"},"ChargeSessionDetailsResponse":{"required":["count","sessions","system_id"],"type":"object","properties":{"count":{"type":"integer","description":"Count of sessions","format":"int32","example":1},"system_id":{"type":"integer","description":"system_id","format":"int32","example":698989834},"sessions":{"type":"array","description":"List of sessions","items":{"$ref":"#/definitions/ChargeSessionDetail"}}}},"Schedule":{"type":"object","properties":{"days":{"type":"array","items":{"type":"integer","format":"int32"}},"start_time":{"type":"string"},"end_time":{"type":"string"},"charging_level":{"type":"integer","format":"int32"}},"example":[{"days":[1,2],"start_time":"1:00","end_time":"2:00","charging_level":70},{"days":[3,4,5,6,7],"start_time":"2:00","end_time":"3:00","charging_level":80}]},"ScheduleList":{"type":"object","properties":{"schedules":{"type":"array","example":[{"days":[1,2],"start_time":"1:00","end_time":"2:00","charging_level":70},{"days":[3,4,5,6,7],"start_time":"2:00","end_time":"3:00","charging_level":80}],"items":{"$ref":"#/definitions/Schedule"}},"type":{"type":"string","example":"Custom"},"is_active":{"type":"boolean","example":false},"reminder_flag":{"type":"boolean","example":true},"reminder_timer":{"type":"integer","format":"int32","example":10}}},"SchedulesBodyResponse":{"type":"object","properties":{"system_id":{"type":"integer","format":"int32","example":698989834},"charger_schedules":{"type":"array","items":{"$ref":"#/definitions/ScheduleList"}}}},"EVEnergyResponse":{"type":"object","properties":{"system_id":{"type":"integer","format":"int64","example":698989834},"start_date":{"type":"string","example":"2024-01-01"},"consumption":{"type":"object","description":"All these values are in Wh","example":[3494,21929,0,0,0,0]}}},"EVEventsResponse":{"type":"object","properties":{"count":{"type":"integer","format":"int32","example":1},"events":{"type":"array","items":{"$ref":"#/definitions/EventDetail"}},"system_id":{"type":"integer","format":"int32","example":701052773}}},"EventDetail":{"type":"object","properties":{"status":{"type":"string","example":"Info"},"triggered_date":{"type":"integer","format":"int64","example":1705399759},"cleared_date":{"type":"integer","format":"int64","example":1705399759},"details":{"type":"string","example":"Charging started on IQ EV Charger (SNo. 202312100006)."}}},"ChargerSummary":{"type":"object","properties":{"id":{"type":"string","example":"202320010308:698989834"},"sku":{"type":"string","example":"IQ-EVSE-NA-1040-0110-0100"},"status":{"type":"string","example":"normal"},"serial_number":{"type":"string","example":"202320010308"},"name":{"type":"string","example":"IQ EV Charger NACS"},"model":{"type":"string","example":"IQ-EVSE-40R"},"part_number":{"type":"string","example":"800-00555 0303"},"firmware":{"type":"string","example":"v0.04.22"},"active":{"type":"boolean","example":true}},"example":{"ev_chargers":[{"id":"202320010308:698989834","sku":"IQ-EVSE-NA-1040-0110-0100","status":"normal","serial_number":"202320010308","name":"IQ EV Charger NACS","model":"IQ-EVSE-40R","part_number":"800-00555 0303","last_report_at":1700074065,"firmware":"v0.04.22","active":true}]}},"ChargerSummaryResponse":{"type":"object","properties":{"items":{"type":"string","example":"devices"},"total_devices":{"type":"integer","format":"int32","example":1},"system_id":{"type":"integer","format":"int32","example":698989834},"devices":{"type":"object","additionalProperties":{"type":"array","example":{"ev_chargers":[{"id":"202320010308:698989834","sku":"IQ-EVSE-NA-1040-0110-0100","status":"normal","serial_number":"202320010308","name":"IQ EV Charger NACS","model":"IQ-EVSE-40R","part_number":"800-00555 0303","last_report_at":1700074065,"firmware":"v0.04.22","active":true}]},"items":{"$ref":"#/definitions/ChargerSummary"}},"example":{"ev_chargers":[{"id":"202320010308:698989834","sku":"IQ-EVSE-NA-1040-0110-0100","status":"normal","serial_number":"202320010308","name":"IQ EV Charger NACS","model":"IQ-EVSE-40R","part_number":"800-00555 0303","last_report_at":1700074065,"firmware":"v0.04.22","active":true}]}}}}}}