{"swagger":"2.0","host":"api.enphaseenergy.com","schemes":["https"],"info":{"title":"Commissioning API","version":"v4"},"paths":{"/api/v4/activations/{activation_id}/battery_mode":{"get":{"summary":"API endpoint to get battery charge/discharge setting.","description":"This endpoint can be used to get the CFG and DTG settings of the site.","parameters":[{"name":"activation_id","in":"path","type":"integer","description":"The Enlighten ID of the activation(system). System-generated.","required":true}],"tags":["Activations"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"CFG_allowed":{"type":"boolean"},"DTG_allowed":{"type":"boolean"}}},"examples":{"application/json":{"CFG_allowed":true,"DTG_allowed":false}}},"401":{"description":"Unauthorized","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"401","message":["Not authorized to access requested resource.","API Key missing in url/headers!"]}}},"404":{"description":"Not found","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"404","message":["System not found"]}}},"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. The body contains error information in a hash of errorMessages and an optional errorCode","schema":{"type":"object","properties":{"errorMessages":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"errorMessages":["This is a PV only site. Battery mode can only be fetched for sites with Enphase battery systems"]}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"reason":{"type":"string","description":"Response code"},"message":{"type":"array","items":{"type":"string","description":"Error Messages"}}}},"examples":{"application/json":{"reason":"429","message":["Usage limit exceeded for plan Partner (custom)"]}}},"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":"API endpoint to update battery charge/discharge setting.","description":"This endpoint can be used to setup/update the CFG and DTG settings of the site.","parameters":[{"name":"activation_id","in":"path","type":"integer","description":"The Enlighten ID of the activation(system). System-generated.","required":true},{"name":"battery_mode","in":"body","schema":{"type":"object","properties":{"CFG_allowed":{"type":"boolean","description":"true or false"},"DTG_allowed":{"type":"boolean","description":"true or false"}},"required":["CFG_allowed","DTG_allowed"]}}],"tags":["Activations"],"consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"message":{"type":"string"}}},"examples":{"application/json":{"message":"Battery mode updated successfully"}}},"401":{"description":"Unauthorized","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"401","message":["Not authorized to access requested resource.","API Key missing in url/headers!"]}}},"404":{"description":"Not found","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"404","message":["System not found"]}}},"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. The body contains error information in a hash of errorMessages and an optional errorCode","schema":{"type":"object","properties":{"errorMessages":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"errorMessages":["This is a PV only site. Battery mode can only be updated for sites with Enphase battery systems"]}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"reason":{"type":"string","description":"Response code"},"message":{"type":"array","items":{"type":"string","description":"Error Messages"}}}},"examples":{"application/json":{"reason":"429","message":["Usage limit exceeded for plan Partner (custom)"]}}},"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/partner/activations":{"get":{"summary":"List of Activations","description":"Returns a list of activations for which the user can make API requests. There is a limit to the number of activations which can be returned at one time. If the first request does not return a full list, use the 'next' attribute in the response body to request the next page. By default, activations are returned in batches of 100. The maximum page size is 1000. Provide only valid filters. During filter the activations empty and invalid filter fields are ignored. In case the installer ID doesn’t exist, API will return an empty array.","parameters":[{"name":"next","in":"query","type":"string","description":"If the first request does not return a full list, use the 'next' attribute in the response body to request the next page. By default, activations are returned in batches of 100. The maximum page size is 1000. If the returned list below the limit, then response does not include the 'next' field."},{"name":"limit","in":"query","type":"integer","description":"There is a limit to the number of activations which can be returned at one time"},{"name":"stage","in":"query","type":"string","enum":[1,2,3,4,5,"in_progress"],"description":"Filter activations by stage. Passing in_progress alone will consider as you have passed all the 1,2,3,4 stages. Passing multiple stage values using comma to filter. E.g. stage=1,2,3. Paasing in_progress with any other combination will give you empty systems. This parameter searches for an exact match of the input value."},{"name":"reference","in":"query","type":"string","description":"Filter activations by company reference. This parameter searches for an exact match of the input value and is not case-sensitive."},{"name":"installer_id","in":"query","type":"integer","description":"Filter activations by installer id. This parameter searches for an exact match of the input value."},{"name":"system_name","in":"query","type":"string","description":"Filter activations by system name. This parameter searches for an exact match of the input value and is not case-sensitive."},{"name":"city","in":"query","type":"string","description":"Filter activations by city. This parameter searches for an exact match of the input value and is not case-sensitive."},{"name":"state","in":"query","type":"string","description":"Filter activations by state. This parameter searches for an exact match of the input value and is not case-sensitive."},{"name":"country","in":"query","type":"string","description":"Filter activations by country. This parameter searches for an exact match of the input value and is not case-sensitive."},{"name":"postal_code","in":"query","type":"string","description":"Filter activations by zipcode. This parameter searches for an exact match of the input value."},{"name":"street1","in":"query","type":"string","description":"Filter activations by street1. This parameter searches for an exact match of the input value and is not case-sensitive."},{"name":"street2","in":"query","type":"string","description":"Filter activations by street2. This parameter searches for an exact match of the input value and is not case-sensitive."},{"name":"host_id","in":"query","type":"integer","description":"Filter activations by host_id. This parameter searches for an exact match of the input value. In addition to Integers, the filter will support null values too"},{"name":"owner_id","in":"query","type":"integer","description":"Filter activations by owner_id. This parameter searches for an exact match of the input value. In addition to Integers, the filter will support null values too"}],"tags":["Activations"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"systems":{"type":"array","description":"Zero or more activations","items":{"type":"object","properties":{"system_id":{"type":"integer","description":"The Enlighten ID of this system. System-generated"},"system_name":{"type":"string","description":"The name of the system."},"system_type":{"type":"string","description":"The type of the system. One of 'residential', 'commercial', or 'other'. Default 'residential'. Cannot be null."},"status":{"type":"string","description":"System's status."},"timezone":{"type":"string","description":"System's timezone."},"stage":{"type":"integer","description":"What stage of the activation process this activation is in. System-generated."},"internet_connection":{"type":"string","description":"How the system's Envoys connect to the Internet. Possible values are none, cellular, broadband, dialup. Use 'dialup' if the Internet connection is satellite or dial-up"},"lease":{"type":"boolean","description":"Whether the system is leased. Possible values true, false. Default false"},"operational":{"type":"boolean","description":"Whether this system is permitted to operate. Possible values true, false. Default true"},"owner":{"type":"string","description":"Name of the system owner. Owner must be an Enlighten user. If the user of the API is a self-installer, the owner must be himself"},"owner_id":{"type":"integer","description":"The Enlighten ID of this system owner. System-generated"},"host":{"type":"string","description":"Name of the system host. Please see “Specifying an Owner and Lease Arrangement”, above, for more information."},"host_id":{"type":"integer","description":"The Enlighten ID of this system host. System-generated"},"installer_name":{"type":"string","description":"Name of the installer."},"installer_id":{"type":"integer","description":"The Enlighten ID of the installer of this system"},"maintainer_name":{"type":"string","description":"Name of the maintainer."},"maintainer_id":{"type":"integer","description":"The Enlighten ID of the maintainer of this system"},"authorized_subcontractors":{"type":"array","description":"List of sub-contractors of this system.","items":{"type":"object","properties":{"authorized_subcontractor_id":{"type":"integer","description":"The Enlighten ID of the sub-contractor of this system. System-generated."},"authorized_subcontractor_name":{"type":"string","description":"Name of the sub-contractor of this system."},"status":{"type":"string","description":"Current status of the subcontractor for the site. This field will be shown only for pending and rejected sub-contractors."}}}},"grid_connection_type":{"type":"object","description":"Possible values for parameter: 1 – Net Billing Tariff (NEM 3.0), 2 – Net Metering, 3 – Net Feed-in tariff, 4 – Gross Feed-in tariff","properties":{"type":{"type":"integer"},"value":{"type":"string"}}},"battery_grid_mode":{"type":"string","description":"Battery grid mode can be of two types - Export Only, Import Only"},"third_party_storage_device_installed":{"type":"boolean","description":"If third party storage device is installed on the site."},"third_party_storage_device_manufacturer":{"type":"string","description":"Manufacturer name of the third party storage device."},"interconnection_application_date":{"type":"integer","description":"Date in epoch format"},"permission_to_operate":{"type":"boolean","description":"boolean (true / false)"},"uri":{"type":"string","description":"URI for this activation"},"updated_at":{"type":"integer","description":"Activation last updated timestamp"},"reference":{"type":"string","description":"The identifier of this system as provided by the calling user's company. This attribute is not present if the calling user's company does not have a reference for this system."},"other_references":{"type":"array","description":"The identifiers assigned to this activation by other companies which have access to it. This attribute is not present if there are no other references for this system.","items":{"type":"string","description":"Name of the reference"}},"address":{"type":"object","description":"The location of the system. Use the ISO 3166-1 2-letter code for the country. Latitude and longitude are calculated by Enlighten, not provided by the client","properties":{"street1":{"type":"string","description":"Street line 1"},"city":{"type":"string","description":"City"},"state":{"type":"string","description":"State"},"postal_code":{"type":"string","description":"Postal code"},"country":{"type":"string","description":"Country"},"latitude":{"type":"integer","description":"Latitude"},"longitude":{"type":"integer","description":"Longitude"},"street2":{"type":"string","description":"Street line 2. This field is Optional"}}}}}},"next":{"type":"string","description":"If the first request does not return a full list, use the 'next' attribute in the response body to request the next page. By default, activations are returned in batches of 10. The maximum page size is 1000"}}},"examples":{"application/json":{"systems":[{"system_id":12345,"system_name":"System name","system_type":"residential","status":"Normal","timezone":"US/Pacific","stage":5,"internet_connection":"dialup","lease":false,"operational":true,"owner":"Test User","owner_id":123,"host":321,"host_id":"Host name","installer_name":"Enphase \u0026 Energy","installer_id":1,"maintainer_name":"Enphase \u0026 Energy","maintainer_id":5,"authorized_subcontractors":[{"authorized_subcontractor_id":67,"authorized_subcontractor_name":"Enphase India"},{"authorized_subcontractor_id":68,"authorized_subcontractor_name":"Enphase India","status":"Pending for system owner approval"}],"grid_connection_type":{"type":1,"value":"Net Billing Tariff (NEM 3.0)"},"battery_grid_mode":"Export Only","third_party_storage_device_installed":true,"third_party_storage_device_manufacturer":"Franklin","interconnection_application_date":1727156880,"permission_to_operate":true,"uri":"/api/v4/partner/activations/12345.json","updated_at":1628153151,"reference":"ENPH123","other_references":["OTHER1234"],"address":{"street1":"Bangalore Lane","city":"San Diego","state":"CA","postal_code":"92126","country":"US","latitude":32.912785,"longitude":-117.153778,"street2":"2nd Street"}}],"next":"4e6a6b344f5445774d446b350a"}}},"401":{"description":"Unauthorized","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"401","message":["Not authorized to access requested resource.","API Key missing in url/headers!"]}}},"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. The body contains error information in a hash of errorMessages and an optional errorCode","schema":{"type":"object","properties":{"errorCode":{"type":"integer"},"errorMessages":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"errorMessages":["Invalid stage option 11"]}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"reason":{"type":"string","description":"Response code"},"message":{"type":"array","items":{"type":"string","description":"Error Messages"}},"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":{"reason":"429","message":["Usage limit exceeded for plan Partner (custom)"],"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"]}}}}},"post":{"summary":"Create new activation.","description":"Create new activation. Address is mandatory if users company belongs to US.","tags":["Activations"],"consumes":["application/x-www-form-urlencoded"],"parameters":[{"name":"system","in":"body","schema":{"type":"object","properties":{"system_name":{"type":"string","description":"The name of the system. Limit 255 characters."},"system_type":{"type":"string","description":"The type of the system. Possible values are 'residential', 'commercial', 'other'. Default 'residential'."},"internet_connection":{"type":"string","description":"How the system's Envoys connect to the Internet. Possible values are none, cellular, broadband, dialup. Use 'dialup' if the Internet connection is satellite or dial-up"},"lease":{"type":"boolean","description":"Whether the system is leased. Possible values true, false. Default false"},"operational":{"type":"boolean","description":"Whether this system is permitted to operate. Possible values true, false. Default true"},"owner_id":{"type":"integer","description":"Enlighten ID of the system owner. Owner must be an Enlighten user. Optional. If the user of the API is a self-installer, the owner must be himself. If the user of the API is an installer then use the Search user API to get the owner user id. If the owner not exist in the enlighten then use Create home owner API to create it newly."},"host_id":{"type":"integer","description":"Enlighten ID of the system host. System host must be an Enlighten user. Optional. If the user of the API is an installer then use the Search user API to get the host user id. If the host not exist in the enlighten then use Create home owner API to create it newly."},"authorized_subcontractor_id":{"type":"integer","description":"Enlighten ID of the sub-contractor you want to add to the system. Optional."},"installer_id":{"type":"integer","description":"The Enlighten ID of the installer of this system. Defaults to current user's company ID"},"maintainer_id":{"type":"integer","description":"The Enlighten ID of the maintainer of this system. Defaults to current user's company ID"},"allow_public_access":{"type":"boolean","description":"When true, the system will be eligible to appear in the public systems lists of Enphase and the system's installer. Default true"},"interconnect_date":{"type":"integer","description":"When the system was approved to connect to the grid. Epoch in seconds format"},"source":{"type":"string","description":"The source of production measurements taken on the system. Possible values 'meter', 'microinverters'. When 'meter', production values come from a revenue-grade meter on the system. When 'microinverters', production values come from the microinverters on the system."},"array_type":{"type":"string","enum":["fixed_open_rack","fixed_roof_mount","single_axis_tracking","single_axis_backtracking","dual_axis_tracking"],"description":"The type of array installed. Possible values are fixed_open_rack, fixed_roof_mount, single_axis_tracking, single_axis_backtracking, dual_axis_tracking. All other values will be ignored. To unset array_type, pass null"},"attachment_type":{"type":"string","enum":["rack_mount","zep","acm","bipv","frame_mount","railless_mount"],"description":"How the microinverters are attached to the panels. Possible values are acm (AC Module), rack_mount (rack- or rail-mounted), zep (Zep Solar compatible), bipv (Building Integrated PV), frame_mount (Enphase Frame Mount), railless_mount (Other Railless Mount)"},"ensemble_envoy":{"type":"string","description":"Specifies serial number of ensemble envoy in multi envoy system"},"grid_profile":{"type":"string","description":"The grid profile to set on this system's microinverters. See GridProfiles API for how to retrieve a list of known profiles."},"requested_profile":{"type":"string","description":""},"requested_report_freq":{"type":"string","description":""},"voltage":{"type":"string","description":"The supported voltage/phase associated with a commercial system inside North America. If system type is not commercial, or if the installer exists \u0026 installer's country is not inside North America, or if the system's country is not inside North America, then the voltage value would be null"},"envoy_serial_numbers":{"type":"array","items":{"type":"string"},"description":"A list of Envoys installed on this system"},"pv_manufacturer":{"type":"integer","description":"Enlighten ID of the PV manufacturer associated with the PV model installed on the system. See PvManufacturers for how to retrieve PV manufacturer IDs"},"pv_manufacturer_name":{"type":"string","description":"Name of the Custom PV Module Manufacturer associated with the system."},"pv_model":{"type":"integer","description":"Enlighten ID of the PV model installed on the system. See PvManufacturers and PvModels for how to retrieve PV model IDs"},"pv_model_name":{"type":"string","description":"Name of the Custom PV Module Model associated with the system."},"pv_module_power_rating":{"type":"number","format":"float","minimum":0,"description":"Power Rating (in W) of the PV module installed on the system."},"pv_module_type":{"type":"integer","enum":[1,2,3,4],"description":"Type ID of the PV module installed on the system. 1 -\u003e 'Mono-facial', 2 -\u003e 'Bi-facial', 3 -\u003e 'Split cell', 4 -\u003e 'Other'"},"expected_envoy_count":{"type":"integer","description":"Total envoys the system is supposed to have"},"expected_pcu_count":{"type":"integer","description":"Total PCUs the system is supposed to have"},"expected_acb_count":{"type":"integer","description":"Total acbs the system is supposed to have"},"expected_nsr_count":{"type":"integer","description":"Total nsrs the system is supposed to have"},"expected_meter_count":{"type":"integer","description":"Total meters the system is supposed to have"},"expected_encharge_count":{"type":"integer","description":"Total encharges the system is supposed to have"},"expected_enpower_count":{"type":"integer","description":"Total enpowers the system is supposed to have"},"reference":{"type":"string","description":"The identifier of this system as provided by the calling user's company. This attribute is not present if the calling user's company does not have a reference for this system. This value should be alphanumberic"},"encharge":{"type":"array","description":"Encharge detail","items":{"type":"object","properties":{"envoy_serial_number":{"type":"string","description":"Envoy serial number"},"encharge_serial_numbers":{"type":"array","description":"Encharge serial numbers","items":{"type":"string"}}}}},"enpower":{"type":"array","description":"Enpower detail","items":{"type":"object","properties":{"envoy_serial_number":{"type":"string","description":"Envoy serial number"},"enpower_serial_numbers":{"type":"array","description":"Enpower serial numbers","items":{"type":"string"}}}}},"address":{"type":"object","description":"The location of the system. Use a valid two-letter code for state. Use the ISO 3166-1 2-letter code for the country. Latitude and longitude are calculated by Enlighten, not provided by the client. Address is mandatory if users company belongs to US.","properties":{"street1":{"type":"string"},"street2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"postal_code":{"type":"string"}},"required":["street1","city","state","country","postal_code"]},"grid_connection_type":{"type":"integer","description":"This field is mandatory for sites in California, United States. Possible values for parameter: 1 – Net Billing Tariff (NEM 3.0), 2 – Net Metering, 3 – Net Feed-in tariff, 4 – Gross Feed-in tariff"},"battery_grid_mode":{"type":"integer","description":"This field is mandatory for sites with battery in California, United States when grid_connection_type is 1. Battery grid mode must be either 1 (for Import Only) or 2 ( for Export Only)."},"third_party_storage_device_installed":{"type":"boolean","description":"This field is mandatory for sites in California, United States. Whether third party storage device is installed on the site."},"third_party_storage_device_manufacturer":{"type":"string","description":"This field is mandatory for sites in California, United States when the third_party_storage_device_installed field is passed as true. Manufacturer name of the third party storage device."},"interconnection_application_date":{"type":"integer","description":"Date in epoch format"},"permission_to_operate":{"type":"boolean","description":"boolean (true / false)"}},"required":["system_name"]}}],"produces":["application/json"],"responses":{"201":{"description":"Created","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"The Enlighten ID of this system. System-generated"},"system_name":{"type":"string","description":"The name of the system."},"system_type":{"type":"string","description":"The type of the system. One of 'residential', 'commercial', or 'other'. Default 'residential'. Cannot be null."},"status":{"type":"string","description":"System's status."},"stage":{"type":"integer","description":"What stage of the activation process this activation is in. System-generated."},"internet_connection":{"type":"string","description":"How the system's Envoys connect to the Internet. Possible values are none, cellular, broadband, dialup. Use 'dialup' if the Internet connection is satellite or dial-up"},"lease":{"type":"boolean","description":"Whether the system is leased. Possible values true, false. Default false"},"operational":{"type":"boolean","description":"Whether this system is permitted to operate. Possible values true, false. Default true"},"owner":{"type":"object","description":"Name of the system owner. Owner must be an Enlighten user. If the user of the API is a self-installer, the owner must be himself. If the query parameter 'expand=owner' passed in the request owner detail will appear in the response","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"active":{"type":"boolean","description":"Whether the user is allowed to log in to Enlighten. Values true, false. Default true."},"user_id":{"type":"integer"},"user_roles":{"type":"array","items":{"type":"string","description":"Role"},"description":"What type of user this is in Enlighten. Possible values are ['self_installer']. For self installer user user_roles will be ['self_installer']. For other users user_roles will be empty."},"enlighten_emails":{"type":"boolean"},"enlighten_view":{"type":"string"},"uri":{"type":"string"},"updated_at":{"type":"integer"}}},"owner_id":{"type":"integer","description":"The Enlighten ID of this system owner. System-generated. This field is optional."},"host":{"type":"object","description":"Name of the system host. Please see “Specifying an Owner and Lease Arrangement”, above, for more information. If the query parameter 'expand=host' passed in the request host detail will appear in the response","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"active":{"type":"boolean","description":"Whether the user is allowed to log in to Enlighten. Values true, false. Default true."},"user_id":{"type":"integer"},"user_roles":{"type":"array","items":{"type":"string","description":"Role"},"description":"What type of user this is in Enlighten. Possible values are ['self_installer']. For self installer user user_roles will be ['self_installer']. For other users user_roles will be empty."},"enlighten_emails":{"type":"boolean"},"enlighten_view":{"type":"string"},"uri":{"type":"string"},"updated_at":{"type":"integer"}}},"host_id":{"type":"integer","description":"The Enlighten ID of this system host. System-generated. This field is optional."},"installer_name":{"type":"string","description":"Name of the installer."},"installer_id":{"type":"integer","description":"The Enlighten ID of the installer of this system. Defaults to current user's company ID"},"maintainer_name":{"type":"string","description":"Name of the maintainer."},"maintainer_id":{"type":"integer","description":"The Enlighten ID of the maintainer of this system. Defaults to current user's company ID"},"authorized_subcontractors":{"type":"array","description":"List of sub-contractors of this system.","items":{"type":"object","properties":{"authorized_subcontractor_id":{"type":"integer","description":"The Enlighten ID of the sub-contractor of this system. System-generated."},"authorized_subcontractor_name":{"type":"string","description":"Name of the sub-contractor of this system."},"status":{"type":"string","description":"Current status of the subcontractor for the site. This field will be shown only for pending and rejected sub-contractors."}}}},"grid_connection_type":{"type":"object","description":"Possible values for parameter: 1 – Net Billing Tariff (NEM 3.0), 2 – Net Metering, 3 – Net Feed-in tariff, 4 – Gross Feed-in tariff","properties":{"type":{"type":"integer"},"value":{"type":"string"}}},"battery_grid_mode":{"type":"string","description":"Battery grid mode can be of two types - Export Only, Import Only"},"third_party_storage_device_installed":{"type":"boolean","description":"If third party storage device is installed on the site."},"third_party_storage_device_manufacturer":{"type":"string","description":"Manufacturer name of the third party storage device."},"interconnection_application_date":{"type":"integer","description":"Date in epoch format"},"permission_to_operate":{"type":"boolean","description":"boolean (true / false)"},"uri":{"type":"string","description":"URI for this activation"},"updated_at":{"type":"integer","description":"Activation last updated timestamp"},"reference":{"type":"string","description":"The identifier of this system as provided by the calling user's company. This attribute is not present if the calling user's company does not have a reference for this system."},"other_references":{"type":"array","description":"The identifiers assigned to this activation by other companies which have access to it. This attribute is not present if there are no other references for this system.","items":{"type":"string","description":"Name of the reference"}},"allow_public_access":{"type":"boolean","description":"When true, the system will be eligible to appear in the public systems lists of Enphase and the system's installer. Default true"},"interconnect_date":{"type":"integer","description":"When the system was approved to connect to the grid"},"installer_support_email":{"type":"string","description":"Installer support email"},"source":{"type":"string","description":"The source of production measurements taken on the system. Possible values 'meter', 'microinverters'. When 'meter', production values come from a revenue-grade meter on the system. When 'microinverters', production values come from the microinverters on the system"},"array_type":{"type":"string","description":"The type of array installed. Possible values are fixed_open_rack, fixed_roof_mount, single_axis_tracking, single_axis_backtracking, dual_axis_tracking. All other values will be ignored. To unset array_type, pass null"},"attachment_type":{"type":"string","description":"How the microinverters are attached to the panels. Possible values are acm (AC Module), rack_mount (rack- or rail-mounted), zep (Zep Solar compatible), bipv (Building Integrated PV), frame_mount (Enphase Frame Mount), railless_mount (Other Railless Mount)"},"ensemble_envoy":{"type":"string","description":"Specifies serial number of ensemble envoy in multi envoy system"},"production_mode":{"type":"string","description":"Possible value is 'on' and 'off'"},"grid_profile":{"type":"string","description":"The grid profile to set on this system's microinverters. See GridProfiles API for how to retrieve a list of known profiles."},"requested_profile":{"type":"string","description":""},"requested_report_freq":{"type":"string","description":""},"voltage":{"type":"string","description":"The supported voltage/phase associated with a commercial system inside North America. If system type is not commercial, or if the installer exists \u0026 installer's country is not inside North America, or if the system's country is not inside North America, then the voltage value would be null"},"envoy_serial_numbers":{"type":"array","description":"A list of Envoys installed on this system","items":{"type":"string","description":"Envoy serial number"}},"expected_envoy_count":{"type":"integer","description":"Total envoys the system is supposed to have"},"expected_pcu_count":{"type":"integer","description":"Total PCUs the system is supposed to have"},"expected_nsr_count":{"type":"integer","description":"Total nsrs the system is supposed to have"},"expected_meter_count":{"type":"integer","description":"Total meters the system is supposed to have"},"expected_encharge_count":{"type":"integer","description":"Total encharges the system is supposed to have"},"expected_enpower_count":{"type":"integer","description":"Total enpowers the system is supposed to have"},"pv_manufacturer":{"type":"integer","description":"Enlighten ID of the PV manufacturer associated with the PV model installed on the system. See PvManufacturers for how to retrieve PV manufacturer IDs"},"pv_manufacturer_name":{"type":"string","description":"Name of the Custom PV Module Manufacturer associated with the system."},"pv_model":{"type":"integer","description":"Enlighten ID of the PV model installed on the system. See PvManufacturers and PvModels for how to retrieve PV model IDs"},"pv_model_name":{"type":"string","description":"Name of the Custom PV Module Model associated with the system."},"pv_module_power_rating":{"type":"number","format":"float","minimum":0,"description":"Power Rating (in W) of the PV module installed on the system."},"pv_module_type":{"type":"integer","enum":[1,2,3,4],"description":"Type ID of the PV module installed on the system. 1 -\u003e 'Mono-facial', 2 -\u003e 'Bi-facial', 3 -\u003e 'Split cell', 4 -\u003e 'Other'"},"encharge":{"type":"array","description":"Encharge detail","items":{"type":"object","properties":{"envoy_serial_number":{"type":"string","description":"Envoy serial number"},"encharge_serial_numbers":{"type":"array","description":"Encharge serial numbers","items":{"type":"string","description":"Encharge serial number"}}}}},"enpower":{"type":"array","description":"Enpower detail","items":{"type":"object","properties":{"envoy_serial_number":{"type":"string","description":"Envoy serial number"},"enpower_serial_numbers":{"type":"array","description":"Enpower serial numbers","items":{"type":"string","description":"Enpower serial number"}}}}},"address":{"type":"object","description":"The location of the system. Use the ISO 3166-1 2-letter code for the country. Latitude and longitude are calculated by Enlighten, not provided by the client","properties":{"street1":{"type":"string","description":"Street line 1"},"city":{"type":"string","description":"City"},"state":{"type":"string","description":"State"},"postal_code":{"type":"string","description":"Postal code"},"country":{"type":"string","description":"Country"},"latitude":{"type":"integer","description":"Latitude"},"longitude":{"type":"integer","description":"Longitude"},"street2":{"type":"string","description":"Street line 2. This field is Optional"}}}}},"examples":{"application/json":{"system_id":12345,"system_name":"Enphase system","system_type":"residential","status":"Microinverters Not Reporting","stage":5,"internet_connection":"dialup","lease":false,"operational":true,"owner":{"first_name":"Test","last_name":"Owner","email":"testowner@domain.com","phone":"9876543210","active":true,"user_id":246,"user_roles":[],"enlighten_emails":false,"enlighten_view":"manager","uri":"/api/v4/activations/12345/users/246.json","updated_at":1444834807},"owner_id":246,"host":{"first_name":"Test","last_name":"User","email":"testhost@domain.com","phone":"9876543210","active":true,"user_id":248,"user_roles":[],"enlighten_emails":false,"enlighten_view":"manager","uri":"/api/v4/activations/12345/users/248.json","updated_at":1444834807},"host_id":248,"installer_name":"Enphase \u0026 Energy","installer_id":5,"maintainer_name":"Enphase \u0026 Energy","maintainer_id":5,"authorized_subcontractors":[{"authorized_subcontractor_id":67,"authorized_subcontractor_name":"Enphase India"}],"grid_connection_type":{"type":1,"value":"Net Billing Tariff (NEM 3.0)"},"battery_grid_mode":"Export Only","third_party_storage_device_installed":true,"third_party_storage_device_manufacturer":"Franklin","interconnection_application_date":1727156880,"permission_to_operate":true,"uri":"/api/v4/partner/activations/12345.json","updated_at":1628156578,"allow_public_access":true,"interconnect_date":1725284451,"installer_support_email":"","source":"microinverters","array_type":"","attachment_type":"","ensemble_envoy":"","production_mode":"on","grid_profile":"","requested_profile":"","requested_report_freq":"","voltage":"","envoy_serial_numbers":["202040004942"],"expected_envoy_count":1,"expected_pcu_count":4,"expected_acb_count":0,"expected_nsr_count":0,"expected_meter_count":0,"expected_encharge_count":4,"expected_enpower_count":1,"pv_manufacturer":"","pv_manufacturer_name":"","pv_model":"","pv_model_name":"","pv_module_power_rating":"","pv_module_type":"","encharge":[{"envoy_serial_number":"202040004942","encharge_serial_numbers":["122038023664","122038023672","122050050473","122050050474"]}],"enpower":[{"envoy_serial_number":"202040004942","enpower_serial_numbers":["122051103228"]}],"address":{"street1":"Bangalore Lane","city":"San Diego","state":"CA","postal_code":"92126","country":"US","latitude":32.912785,"longitude":-117.153778}}}},"401":{"description":"Unauthorized","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"401","message":["Not authorized to access requested resource.","API Key missing in url/headers!"]}}},"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. The body contains error information in a hash of errorMessages and an optional errorCode","schema":{"type":"object","properties":{"errorCode":{"type":"integer"},"errorMessages":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"errorCode":11,"errorMessages":["The system type must be residential, commercial, or other."]}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"reason":{"type":"string","description":"Response code"},"message":{"type":"array","items":{"type":"string","description":"Error Messages"}},"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":{"reason":"429","message":["Usage limit exceeded for plan Partner (custom)"],"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/partner/activations/{activation_id}":{"get":{"summary":"Retrieves an Activation by id","description":"By default, the body of the response looks like the example below. However, you can choose to retrieve more information about the activation using response expansion, for example: Instead of returning only the owner's name within the system hash, the response includes detailed information about the owner by using expand=owner. You can also expand the owner's company by using expand=owner.company. The response now includes information about the owner and the company he belongs to, if any. By using expand=host will include details about the system host. You can also expand the host's company by using expand=host.company. The response now includes information about the host and the company he belongs to","parameters":[{"name":"activation_id","in":"path","type":"integer","description":"The Enlighten ID of the activation(system). System-generated.","required":true},{"name":"expand","in":"query","type":"string","enum":["owner","owner.company","host","host.company"],"description":"Retrieve more information about the activation. The expand query parameter is a comma-separated list of associations to expand. It may include the following:"}],"tags":["Activations"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"The Enlighten ID of this system. System-generated"},"system_name":{"type":"string","description":"The name of the system."},"system_type":{"type":"string","description":"The type of the system. One of 'residential', 'commercial', or 'other'. Default 'residential'. Cannot be null."},"status":{"type":"string","description":"System's status."},"timezone":{"type":"string","description":"System's timezone."},"stage":{"type":"integer","description":"What stage of the activation process this activation is in. System-generated."},"internet_connection":{"type":"string","description":"How the system's Envoys connect to the Internet. Possible values are none, cellular, broadband, dialup. Use 'dialup' if the Internet connection is satellite or dial-up"},"lease":{"type":"boolean","description":"Whether the system is leased. Possible values true, false. Default false"},"operational":{"type":"boolean","description":"Whether this system is permitted to operate. Possible values true, false. Default true"},"owner":{"type":"object","description":"Name of the system owner. Owner must be an Enlighten user. If the user of the API is a self-installer, the owner must be himself. If the query parameter 'expand=owner' passed in the request owner detail will appear in the response","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"active":{"type":"boolean","description":"Whether the user is allowed to log in to Enlighten. Values true, false. Default true."},"user_id":{"type":"integer"},"user_roles":{"type":"array","items":{"type":"string","description":"Role"},"description":"What type of user this is in Enlighten. Possible values are ['self_installer']. For self installer user user_roles will be ['self_installer']. For other users user_roles will be empty."},"enlighten_emails":{"type":"boolean"},"enlighten_view":{"type":"string"},"uri":{"type":"string"},"updated_at":{"type":"integer"},"company":{"type":"object","description":"A hash of information about the owner's company. Use the query parameter 'expand=owner.company' to get owner company detail","properties":{"company_id":{"type":"integer"},"company_name":{"type":"string"},"location":{"type":"string"},"roles":{"type":"array","items":{"type":"string","description":"Role"},"description":"What type of company this is in Enphase. Possible values are ['installer']. For installer company roles will be ['installer']. For other role roles will be empty."},"uri":{"type":"string"}}}}},"owner_id":{"type":"integer","description":"The Enlighten ID of this system owner. System-generated. This field is optional."},"host":{"type":"object","description":"Name of the system host. Please see “Specifying an Owner and Lease Arrangement”, above, for more information. If the query parameter 'expand=host' passed in the request host detail will appear in the response","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"active":{"type":"boolean","description":"Whether the user is allowed to log in to Enlighten. Values true, false. Default true."},"user_id":{"type":"integer"},"user_roles":{"type":"array","items":{"type":"string","description":"Role"},"description":"What type of user this is in Enlighten. Possible values are ['self_installer']. For self installer user user_roles will be ['self_installer']. For other users user_roles will be empty."},"enlighten_emails":{"type":"boolean"},"enlighten_view":{"type":"string"},"updated_at":{"type":"integer"},"company":{"type":"object","description":"A hash of information about the system host's company. Use the query parameter 'expand=host.company' to get system host company detail","properties":{"company_id":{"type":"integer"},"company_name":{"type":"string"},"location":{"type":"string"},"roles":{"type":"array","items":{"type":"string","description":"Role"},"description":"What type of company this is in Enphase. Possible values are ['installer']. For installer company roles will be ['installer']. For other role roles will be empty."},"uri":{"type":"string"}}},"uri":{"type":"string"}}},"host_id":{"type":"integer","description":"The Enlighten ID of this system host. System-generated. This field is optional."},"authorized_subcontractors":{"type":"array","description":"List of sub-contractors of this system.","items":{"type":"object","properties":{"authorized_subcontractor_id":{"type":"integer","description":"The Enlighten ID of the sub-contractor of this system. System-generated."},"authorized_subcontractor_name":{"type":"string","description":"Name of the sub-contractor of this system."},"status":{"type":"string","description":"Current status of the subcontractor for the site. This field will be shown only for pending and rejected sub-contractors."}}}},"grid_connection_type":{"type":"object","description":"Possible values for parameter: 1 – Net Billing Tariff (NEM 3.0), 2 – Net Metering, 3 – Net Feed-in tariff, 4 – Gross Feed-in tariff","properties":{"type":{"type":"integer"},"value":{"type":"string"}}},"battery_grid_mode":{"type":"string","description":"Battery grid mode can be of two types - Export Only, Import Only"},"third_party_storage_device_installed":{"type":"boolean","description":"If third party storage device is installed on the site."},"third_party_storage_device_manufacturer":{"type":"string","description":"Manufacturer name of the third party storage device."},"interconnection_application_date":{"type":"integer","description":"Date in epoch format"},"permission_to_operate":{"type":"boolean","description":"boolean (true / false)"},"installer_name":{"type":"string","description":"Name of the installer."},"installer_id":{"type":"integer","description":"The Enlighten ID of the installer of this system"},"maintainer_name":{"type":"string","description":"Name of the maintainer."},"maintainer_id":{"type":"integer","description":"The Enlighten ID of the maintainer of this system"},"uri":{"type":"string","description":"URI for this activation"},"updated_at":{"type":"integer","description":"Activation last updated timestamp"},"reference":{"type":"string","description":"The identifier of this system as provided by the calling user's company. This attribute is not present if the calling user's company does not have a reference for this system."},"other_references":{"type":"array","description":"The identifiers assigned to this activation by other companies which have access to it. This attribute is not present if there are no other references for this system.","items":{"type":"string","description":"Name of the reference"}},"allow_public_access":{"type":"boolean","description":"When true, the system will be eligible to appear in the public systems lists of Enphase and the system's installer. Default true"},"interconnect_date":{"type":"integer","description":"When the system was approved to connect to the grid"},"installer_support_email":{"type":"string","description":"Installer support email"},"source":{"type":"string","description":"The source of production measurements taken on the system. Possible values 'meter', 'microinverters'. When 'meter', production values come from a revenue-grade meter on the system. When 'microinverters', production values come from the microinverters on the system"},"array_type":{"type":"string","description":"The type of array installed. Possible values are fixed_open_rack, fixed_roof_mount, single_axis_tracking, single_axis_backtracking, dual_axis_tracking. All other values will be ignored. To unset array_type, pass null"},"attachment_type":{"type":"string","description":"How the microinverters are attached to the panels. Possible values are acm (AC Module), rack_mount (rack- or rail-mounted), zep (Zep Solar compatible), bipv (Building Integrated PV), frame_mount (Enphase Frame Mount), railless_mount (Other Railless Mount)"},"ensemble_envoy":{"type":"string","description":"Specifies serial number of ensemble envoy in multi envoy system"},"production_mode":{"type":"string","description":"Possible value is 'on' and 'off'"},"grid_profile":{"type":"string","description":"The grid profile to set on this system's microinverters. See GridProfiles API for how to retrieve a list of known profiles."},"requested_profile":{"type":"string","description":""},"requested_report_freq":{"type":"string","description":""},"voltage":{"type":"string","description":"The supported voltage/phase associated with a commercial system inside North America. If system type is not commercial, or if the installer exists \u0026 installer's country is not inside North America, or if the system's country is not inside North America, then the voltage value would be null"},"envoy_serial_numbers":{"type":"array","description":"A list of Envoys installed on this system","items":{"type":"string","description":"Envoy serial number"}},"expected_envoy_count":{"type":"integer","description":"Total envoys the system is supposed to have"},"expected_pcu_count":{"type":"integer","description":"Total PCUs the system is supposed to have"},"expected_nsr_count":{"type":"integer","description":"Total nsrs the system is supposed to have"},"expected_meter_count":{"type":"integer","description":"Total meters the system is supposed to have"},"expected_encharge_count":{"type":"integer","description":"Total encharges the system is supposed to have"},"expected_enpower_count":{"type":"integer","description":"Total enpowers the system is supposed to have"},"pv_manufacturer":{"type":"integer","description":"Enlighten ID of the PV manufacturer associated with the PV model installed on the system. See PvManufacturers for how to retrieve PV manufacturer IDs"},"pv_manufacturer_name":{"type":"string","description":"Name of the Custom PV Module Manufacturer associated with the system."},"pv_model":{"type":"integer","description":"Enlighten ID of the PV model installed on the system. See PvManufacturers and PvModels for how to retrieve PV model IDs"},"pv_model_name":{"type":"string","description":"Name of the Custom PV Module Model associated with the system."},"pv_module_power_rating":{"type":"number","format":"float","minimum":0,"description":"Power Rating (in W) of the PV module installed on the system."},"pv_module_type":{"type":"integer","enum":[1,2,3,4],"description":"Type ID of the PV module installed on the system. 1 -\u003e 'Mono-facial', 2 -\u003e 'Bi-facial', 3 -\u003e 'Split cell', 4 -\u003e 'Other'"},"encharge":{"type":"array","description":"Encharge detail","items":{"type":"object","properties":{"envoy_serial_number":{"type":"string","description":"Envoy serial number"},"encharge_serial_numbers":{"type":"array","description":"Encharge serial numbers","items":{"type":"string","description":"Encharge serial number"}}}}},"enpower":{"type":"array","description":"Enpower detail","items":{"type":"object","properties":{"envoy_serial_number":{"type":"string","description":"Envoy serial number"},"enpower_serial_numbers":{"type":"array","description":"Enpower serial numbers","items":{"type":"string","description":"Enpower serial number"}}}}},"address":{"type":"object","description":"The location of the system. Use the ISO 3166-1 2-letter code for the country. Latitude and longitude are calculated by Enlighten, not provided by the client","properties":{"street1":{"type":"string","description":"Street line 1"},"city":{"type":"string","description":"City"},"state":{"type":"string","description":"State"},"postal_code":{"type":"string","description":"Postal code"},"country":{"type":"string","description":"Country"},"latitude":{"type":"integer","description":"Latitude"},"longitude":{"type":"integer","description":"Longitude"},"street2":{"type":"string","description":"Street line 2. This field is Optional"}}}}},"examples":{"application/json":{"system_id":12345,"system_name":"Enphase system","system_type":"residential","status":"Microinverters Not Reporting","timezone":"US/Pacific","stage":5,"internet_connection":"dialup","lease":false,"operational":true,"owner":{"first_name":"Test","last_name":"Owner","email":"testowner@domain.com","phone":"9876543210","active":true,"user_id":246,"user_roles":[],"enlighten_emails":false,"enlighten_view":"manager","uri":"/api/v4/activations/12345/users/246.json","updated_at":1444834807,"company":{"company_id":67,"company_name":"Test Installer","location":"Petaluma, CA - US","roles":["installer"],"uri":"/api/v4/companies/67.json"}},"owner_id":246,"host":{"first_name":"Test","last_name":"User","email":"testhost@domain.com","phone":"9876543210","active":true,"user_id":248,"user_roles":[],"enlighten_emails":false,"enlighten_view":"manager","uri":"/api/v4/activations/12345/users/248.json","updated_at":1444834807,"company":{"company_id":67,"company_name":"Test Installer","location":"Petaluma, CA - US","roles":["installer"],"uri":"/api/v4/companies/67.json"}},"host_id":248,"installer_name":"Enphase \u0026 Energy","installer_id":5,"maintainer_name":"Enphase \u0026 Energy","maintainer_id":5,"authorized_subcontractors":[{"authorized_subcontractor_id":67,"authorized_subcontractor_name":"Enphase India"}],"grid_connection_type":{"type":1,"value":"Net Billing Tariff (NEM 3.0)"},"battery_grid_mode":"Export Only","third_party_storage_device_installed":true,"third_party_storage_device_manufacturer":"Franklin","interconnection_application_date":1727156880,"permission_to_operate":true,"uri":"/api/v4/partner/activations/12345.json","updated_at":1628156578,"allow_public_access":true,"interconnect_date":1725284451,"installer_support_email":"","source":"microinverters","array_type":"","attachment_type":"","ensemble_envoy":"","production_mode":"on","grid_profile":"","requested_profile":"","requested_report_freq":"","voltage":"","envoy_serial_numbers":["202040004942"],"expected_envoy_count":1,"expected_pcu_count":4,"expected_acb_count":0,"expected_nsr_count":0,"expected_meter_count":0,"expected_encharge_count":4,"expected_enpower_count":1,"pv_manufacturer":"","pv_manufacturer_name":"","pv_model":"","pv_model_name":"","pv_module_power_rating":"","pv_module_type":"","encharge":[{"envoy_serial_number":"202040004942","encharge_serial_numbers":["122038023664","122038023672","122050050473","122050050474"]}],"enpower":[{"envoy_serial_number":"202040004942","enpower_serial_numbers":["122051103228"]}],"address":{"street1":"Bangalore Lane","city":"San Diego","state":"CA","postal_code":"92126","country":"US","latitude":32.912785,"longitude":-117.153778}}}},"401":{"description":"Unauthorized","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"401","message":["Not authorized to access requested resource.","API Key missing in url/headers!"]}}},"404":{"description":"Not found","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"404","message":["Couldn't find Site with an out of range value for 'id'"]}}},"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":{"reason":{"type":"string","description":"Response code"},"message":{"type":"array","items":{"type":"string","description":"Error Messages"}},"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":{"reason":"429","message":["Usage limit exceeded for plan Partner (custom)"],"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":"Update an activation.","description":"Update an activation. Address is mandatory if users company belongs to US.","parameters":[{"name":"activation_id","in":"path","type":"integer","description":"The Enlighten ID of the activation(system). System-generated.","required":true},{"name":"system","in":"body","schema":{"type":"object","properties":{"system_name":{"type":"string","description":"The name of the system. Limit 255 characters."},"system_type":{"type":"string","description":"The type of the system. Possible values are 'residential', 'commercial', 'other'. Default 'residential'."},"internet_connection":{"type":"string","description":"How the system's Envoys connect to the Internet. Possible values are none, cellular, broadband, dialup. Use 'dialup' if the Internet connection is satellite or dial-up"},"lease":{"type":"boolean","description":"Whether the system is leased. Possible values true, false. Default false"},"operational":{"type":"boolean","description":"Whether this system is permitted to operate. Possible values true, false. Default true"},"owner_id":{"type":"integer","description":"Enlighten ID of the system owner. Owner must be an Enlighten user. Optional. If the user of the API is a self-installer, the owner must be himself. If the user of the API is an installer then use the Search user API to get the owner user id. If the owner not exist in the enlighten then use Create home owner API to create it newly."},"host_id":{"type":"integer","description":"Enlighten ID of the system host. System host must be an Enlighten user. Optional. If the user of the API is an installer then use the Search user API to get the host user id. If the host not exist in the enlighten then use Create home owner API to create it newly."},"installer_id":{"type":"integer","description":"The Enlighten ID of the installer of this system. Defaults to current user's company ID"},"maintainer_id":{"type":"integer","description":"The Enlighten ID of the maintainer of this system. Defaults to current user's company ID"},"authorized_subcontractor_id":{"type":"integer","description":"Enlighten ID of the sub-contractor you want to add to the system. Optional. If you are the home owner, you cannot add subcontractors for the site."},"allow_public_access":{"type":"boolean","description":"When true, the system will be eligible to appear in the public systems lists of Enphase and the system's installer. Default true"},"interconnect_date":{"type":"integer","description":"When the system was approved to connect to the grid. Epoch in seconds format"},"source":{"type":"string","description":"The source of production measurements taken on the system. Possible values 'meter', 'microinverters'. When 'meter', production values come from a revenue-grade meter on the system. When 'microinverters', production values come from the microinverters on the system."},"array_type":{"type":"string","enum":["fixed_open_rack","fixed_roof_mount","single_axis_tracking","single_axis_backtracking","dual_axis_tracking"],"description":"The type of array installed. Possible values are fixed_open_rack, fixed_roof_mount, single_axis_tracking, single_axis_backtracking, dual_axis_tracking. All other values will be ignored. To unset array_type, pass null"},"attachment_type":{"type":"string","enum":["rack_mount","zep","acm","bipv","frame_mount","railless_mount"],"description":"How the microinverters are attached to the panels. Possible values are acm (AC Module), rack_mount (rack- or rail-mounted), zep (Zep Solar compatible), bipv (Building Integrated PV), frame_mount (Enphase Frame Mount), railless_mount (Other Railless Mount)"},"ensemble_envoy":{"type":"string","description":"Specifies serial number of ensemble envoy in multi envoy system"},"grid_profile":{"type":"string","description":"The grid profile to set on this system's microinverters. See GridProfiles API for how to retrieve a list of known profiles."},"requested_profile":{"type":"string","description":""},"requested_report_freq":{"type":"string","description":""},"voltage":{"type":"string","description":"The supported voltage/phase associated with a commercial system inside North America. If system type is not commercial, or if the installer exists \u0026 installer's country is not inside North America, or if the system's country is not inside North America, then the voltage value would be null"},"envoy_serial_numbers":{"type":"array","items":{"type":"string"},"description":"A list of Envoys installed on this system"},"pv_manufacturer":{"type":"integer","description":"Enlighten ID of the PV manufacturer associated with the PV model installed on the system. See PvManufacturers for how to retrieve PV manufacturer IDs"},"pv_manufacturer_name":{"type":"string","description":"Name of the Custom PV Module Manufacturer associated with the system."},"pv_model":{"type":"integer","description":"Enlighten ID of the PV model installed on the system. See PvManufacturers and PvModels for how to retrieve PV model IDs"},"pv_model_name":{"type":"string","description":"Name of the Custom PV Module Model associated with the system."},"pv_module_power_rating":{"type":"number","format":"float","minimum":0,"description":"Power Rating (in W) of the PV module installed on the system."},"pv_module_type":{"type":"integer","enum":[1,2,3,4],"description":"Type ID of the PV module installed on the system. 1 -\u003e 'Mono-facial', 2 -\u003e 'Bi-facial', 3 -\u003e 'Split cell', 4 -\u003e 'Other'"},"expected_envoy_count":{"type":"integer","description":"Total envoys the system is supposed to have"},"expected_pcu_count":{"type":"integer","description":"Total PCUs the system is supposed to have"},"expected_acb_count":{"type":"integer","description":"Total acbs the system is supposed to have"},"expected_nsr_count":{"type":"integer","description":"Total nsrs the system is supposed to have"},"expected_meter_count":{"type":"integer","description":"Total meters the system is supposed to have"},"expected_encharge_count":{"type":"integer","description":"Total encharges the system is supposed to have"},"expected_enpower_count":{"type":"integer","description":"Total enpowers the system is supposed to have"},"reference":{"type":"string","description":"The identifier of this system as provided by the calling user's company. This attribute is not present if the calling user's company does not have a reference for this system. This value should be alphanumberic"},"encharge":{"type":"array","description":"Encharge detail","items":{"type":"object","properties":{"envoy_serial_number":{"type":"string","description":"Envoy serial number"},"encharge_serial_numbers":{"type":"array","description":"Encharge serial numbers","items":{"type":"string"}}}}},"enpower":{"type":"array","description":"Enpower detail","items":{"type":"object","properties":{"envoy_serial_number":{"type":"string","description":"Envoy serial number"},"enpower_serial_numbers":{"type":"array","description":"Enpower serial numbers","items":{"type":"string"}}}}},"address":{"type":"object","description":"The location of the system. Use the ISO 3166-1 2-letter code for the country. Latitude and longitude are calculated by Enlighten, not provided by the client. Address is mandatory if users company belongs to US.","properties":{"street1":{"type":"string"},"street2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"postal_code":{"type":"string"}},"required":["street1","city","state","country","postal_code"]},"grid_connection_type":{"type":"integer","description":"This field is mandatory for sites in California, United States. Possible values for parameter: 1 – Net Billing Tariff (NEM 3.0), 2 – Net Metering, 3 – Net Feed-in tariff, 4 – Gross Feed-in tariff"},"battery_grid_mode":{"type":"integer","description":"This field is mandatory for sites with battery in California, United States when grid_connection_type is 1. Battery grid mode must be either 1 (for Import Only) or 2 ( for Export Only)."},"third_party_storage_device_installed":{"type":"boolean","description":"This field is mandatory for sites in California, United States. Whether third party storage device is installed on the site."},"third_party_storage_device_manufacturer":{"type":"string","description":"This field is mandatory for sites in California, United States when the third_party_storage_device_installed field is passed as true. Manufacturer name of the third party storage device."},"interconnection_application_date":{"type":"integer","description":"Date in epoch format"},"permission_to_operate":{"type":"boolean","description":"boolean (true / false)"}}}}],"tags":["Activations"],"consumes":["application/x-www-form-urlencoded"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"The Enlighten ID of this system. System-generated"},"system_name":{"type":"string","description":"The name of the system."},"system_type":{"type":"string","description":"The type of the system. One of 'residential', 'commercial', or 'other'. Default 'residential'. Cannot be null."},"status":{"type":"string","description":"System's status."},"stage":{"type":"integer","description":"What stage of the activation process this activation is in. System-generated."},"internet_connection":{"type":"string","description":"How the system's Envoys connect to the Internet. Possible values are none, cellular, broadband, dialup. Use 'dialup' if the Internet connection is satellite or dial-up"},"lease":{"type":"boolean","description":"Whether the system is leased. Possible values true, false. Default false"},"operational":{"type":"boolean","description":"Whether this system is permitted to operate. Possible values true, false. Default true"},"owner":{"type":"object","description":"Name of the system owner. Owner must be an Enlighten user. If the user of the API is a self-installer, the owner must be himself. If the query parameter 'expand=owner' passed in the request owner detail will appear in the response","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"active":{"type":"boolean","description":"Whether the user is allowed to log in to Enlighten. Values true, false. Default true."},"user_id":{"type":"integer"},"user_roles":{"type":"array","items":{"type":"string","description":"Role"},"description":"What type of user this is in Enlighten. Possible values are ['self_installer']. For self installer user user_roles will be ['self_installer']. For other users user_roles will be empty."},"enlighten_emails":{"type":"boolean"},"enlighten_view":{"type":"string"},"uri":{"type":"string"},"updated_at":{"type":"integer"}}},"owner_id":{"type":"integer","description":"The Enlighten ID of this system owner. System-generated. This field is optional."},"host":{"type":"object","description":"Name of the system host. Please see “Specifying an Owner and Lease Arrangement”, above, for more information. If the query parameter 'expand=host' passed in the request host detail will appear in the response","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"active":{"type":"boolean","description":"Whether the user is allowed to log in to Enlighten. Values true, false. Default true."},"user_id":{"type":"integer"},"user_roles":{"type":"array","items":{"type":"string","description":"Role"},"description":"What type of user this is in Enlighten. Possible values are ['self_installer']. For self installer user user_roles will be ['self_installer']. For other users user_roles will be empty."},"enlighten_emails":{"type":"boolean"},"enlighten_view":{"type":"string"},"uri":{"type":"string"},"updated_at":{"type":"integer"}}},"host_id":{"type":"integer","description":"The Enlighten ID of this system host. System-generated. This field is optional."},"installer_name":{"type":"string","description":"Name of the installer."},"installer_id":{"type":"integer","description":"The Enlighten ID of the installer of this system. Defaults to current user's company ID"},"maintainer_name":{"type":"string","description":"Name of the maintainer."},"maintainer_id":{"type":"integer","description":"The Enlighten ID of the maintainer of this system. Defaults to current user's company ID"},"authorized_subcontractors":{"type":"array","description":"List of sub-contractors of this system.","items":{"type":"object","properties":{"authorized_subcontractor_id":{"type":"integer","description":"The Enlighten ID of the sub-contractor of this system. System-generated."},"authorized_subcontractor_name":{"type":"string","description":"Name of the sub-contractor of this system."},"status":{"type":"string","description":"Current status of the subcontractor for the site. This field will be shown only for pending and rejected sub-contractors."}}}},"grid_connection_type":{"type":"object","description":"Possible values for parameter: 1 – Net Billing Tariff (NEM 3.0), 2 – Net Metering, 3 – Net Feed-in tariff, 4 – Gross Feed-in tariff","properties":{"type":{"type":"integer"},"value":{"type":"string"}}},"battery_grid_mode":{"type":"string","description":"Battery grid mode can be of two types - Export Only, Import Only"},"third_party_storage_device_installed":{"type":"boolean","description":"If third party storage device is installed on the site."},"third_party_storage_device_manufacturer":{"type":"string","description":"Manufacturer name of the third party storage device."},"interconnection_application_date":{"type":"integer","description":"Date in epoch format"},"permission_to_operate":{"type":"boolean","description":"boolean (true / false)"},"uri":{"type":"string","description":"URI for this activation"},"updated_at":{"type":"integer","description":"Activation last updated timestamp"},"reference":{"type":"string","description":"The identifier of this system as provided by the calling user's company. This attribute is not present if the calling user's company does not have a reference for this system."},"other_references":{"type":"array","description":"The identifiers assigned to this activation by other companies which have access to it. This attribute is not present if there are no other references for this system.","items":{"type":"string","description":"Name of the reference"}},"allow_public_access":{"type":"boolean","description":"When true, the system will be eligible to appear in the public systems lists of Enphase and the system's installer. Default true"},"interconnect_date":{"type":"integer","description":"When the system was approved to connect to the grid"},"installer_support_email":{"type":"string","description":"Installer support email"},"source":{"type":"string","description":"The source of production measurements taken on the system. Possible values 'meter', 'microinverters'. When 'meter', production values come from a revenue-grade meter on the system. When 'microinverters', production values come from the microinverters on the system"},"array_type":{"type":"string","description":"The type of array installed. Possible values are fixed_open_rack, fixed_roof_mount, single_axis_tracking, single_axis_backtracking, dual_axis_tracking. All other values will be ignored. To unset array_type, pass null"},"attachment_type":{"type":"string","description":"How the microinverters are attached to the panels. Possible values are acm (AC Module), rack_mount (rack- or rail-mounted), zep (Zep Solar compatible), bipv (Building Integrated PV), frame_mount (Enphase Frame Mount), railless_mount (Other Railless Mount)"},"ensemble_envoy":{"type":"string","description":"Specifies serial number of ensemble envoy in multi envoy system"},"production_mode":{"type":"string","description":"Possible value is 'on' and 'off'"},"grid_profile":{"type":"string","description":"The grid profile to set on this system's microinverters. See GridProfiles API for how to retrieve a list of known profiles."},"requested_profile":{"type":"string","description":""},"requested_report_freq":{"type":"string","description":""},"voltage":{"type":"string","description":"The supported voltage/phase associated with a commercial system inside North America. If system type is not commercial, or if the installer exists \u0026 installer's country is not inside North America, or if the system's country is not inside North America, then the voltage value would be null"},"envoy_serial_numbers":{"type":"array","description":"A list of Envoys installed on this system","items":{"type":"string","description":"Envoy serial number"}},"expected_envoy_count":{"type":"integer","description":"Total envoys the system is supposed to have"},"expected_pcu_count":{"type":"integer","description":"Total PCUs the system is supposed to have"},"expected_nsr_count":{"type":"integer","description":"Total nsrs the system is supposed to have"},"expected_meter_count":{"type":"integer","description":"Total meters the system is supposed to have"},"expected_encharge_count":{"type":"integer","description":"Total encharges the system is supposed to have"},"expected_enpower_count":{"type":"integer","description":"Total enpowers the system is supposed to have"},"pv_manufacturer":{"type":"integer","description":"Enlighten ID of the PV manufacturer associated with the PV model installed on the system. See PvManufacturers for how to retrieve PV manufacturer IDs"},"pv_manufacturer_name":{"type":"string","description":"Name of the Custom PV Module Manufacturer associated with the system."},"pv_model":{"type":"integer","description":"Enlighten ID of the PV model installed on the system. See PvManufacturers and PvModels for how to retrieve PV model IDs"},"pv_model_name":{"type":"string","description":"Name of the Custom PV Module Model associated with the system."},"pv_module_power_rating":{"type":"number","format":"float","minimum":0,"description":"Power Rating (in W) of the PV module installed on the system."},"pv_module_type":{"type":"integer","enum":[1,2,3,4],"description":"Type ID of the PV module installed on the system. 1 -\u003e 'Mono-facial', 2 -\u003e 'Bi-facial', 3 -\u003e 'Split cell', 4 -\u003e 'Other'"},"encharge":{"type":"array","description":"Encharge detail","items":{"type":"object","properties":{"envoy_serial_number":{"type":"string","description":"Envoy serial number"},"encharge_serial_numbers":{"type":"array","description":"Encharge serial numbers","items":{"type":"string","description":"Encharge serial number"}}}}},"enpower":{"type":"array","description":"Enpower detail","items":{"type":"object","properties":{"envoy_serial_number":{"type":"string","description":"Envoy serial number"},"enpower_serial_numbers":{"type":"array","description":"Enpower serial numbers","items":{"type":"string","description":"Enpower serial number"}}}}},"address":{"type":"object","description":"The location of the system. Use the ISO 3166-1 2-letter code for the country. Latitude and longitude are calculated by Enlighten, not provided by the client","properties":{"street1":{"type":"string","description":"Street line 1"},"city":{"type":"string","description":"City"},"state":{"type":"string","description":"State"},"postal_code":{"type":"string","description":"Postal code"},"country":{"type":"string","description":"Country"},"latitude":{"type":"integer","description":"Latitude"},"longitude":{"type":"integer","description":"Longitude"},"street2":{"type":"string","description":"Street line 2. This field is Optional"}}}}},"examples":{"application/json":{"system_id":12345,"system_name":"Enphase system","system_type":"residential","status":"Microinverters Not Reporting","stage":5,"internet_connection":"dialup","lease":false,"operational":true,"owner":{"first_name":"Test","last_name":"Owner","email":"testowner@domain.com","phone":"9876543210","active":true,"user_id":246,"user_roles":[],"enlighten_emails":false,"enlighten_view":"manager","uri":"/api/v4/activations/12345/users/246.json","updated_at":1444834807},"owner_id":246,"host":{"first_name":"Test","last_name":"User","email":"testhost@domain.com","phone":"9876543210","active":true,"user_id":248,"user_roles":[],"enlighten_emails":false,"enlighten_view":"manager","uri":"/api/v4/activations/12345/users/248.json","updated_at":1444834807},"host_id":248,"installer_name":"Enphase \u0026 Energy","installer_id":5,"maintainer_name":"Enphase \u0026 Energy","maintainer_id":5,"authorized_subcontractors":[{"authorized_subcontractor_id":67,"authorized_subcontractor_name":"Enphase India"}],"grid_connection_type":{"type":1,"value":"Net Billing Tariff (NEM 3.0)"},"battery_grid_mode":"Export Only","third_party_storage_device_installed":true,"third_party_storage_device_manufacturer":"Franklin","interconnection_application_date":1727156880,"permission_to_operate":true,"uri":"/api/v4/partner/activations/12345.json","updated_at":1628156578,"allow_public_access":true,"interconnect_date":1725284451,"installer_support_email":"","source":"microinverters","array_type":"","attachment_type":"","ensemble_envoy":"","production_mode":"on","grid_profile":"","requested_profile":"","requested_report_freq":"","voltage":"","envoy_serial_numbers":["202040004942"],"expected_envoy_count":1,"expected_pcu_count":4,"expected_nsr_count":0,"expected_meter_count":0,"expected_encharge_count":4,"expected_enpower_count":1,"pv_manufacturer":"","pv_manufacturer_name":"","pv_model":"","pv_model_name":"","pv_module_power_rating":"","pv_module_type":"","encharge":[{"envoy_serial_number":"202040004942","encharge_serial_numbers":["122038023664","122038023672","122050050473","122050050474"]}],"enpower":[{"envoy_serial_number":"202040004942","enpower_serial_numbers":["122051103228"]}],"address":{"street1":"Bangalore Lane","city":"San Diego","state":"CA","postal_code":"92126","country":"US","latitude":32.912785,"longitude":-117.153778}}}},"401":{"description":"Unauthorized","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"401","message":["Not authorized to access requested resource.","API Key missing in url/headers!"]}}},"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. The body contains error information in a hash of errorMessages and an optional errorCode","schema":{"type":"object","properties":{"errorCode":{"type":"integer"},"errorMessages":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"errorCode":11,"errorMessages":["The system type must be residential, commercial, or other."]}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"reason":{"type":"string","description":"Response code"},"message":{"type":"array","items":{"type":"string","description":"Error Messages"}},"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":{"reason":"429","message":["Usage limit exceeded for plan Partner (custom)"],"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"]}}}}},"delete":{"summary":"Delete an activation by id","description":"To delete an activation, the activation stage must be less than 3 and there are no active devices associated with it","parameters":[{"name":"activation_id","in":"path","type":"integer","description":"The Enlighten ID of the activation(system).","required":true}],"tags":["Activations"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"message":{"type":"string"}}},"examples":{"application/json":{"message":"Activation deleted successfully"}}},"401":{"description":"Unauthorized","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"401","message":["Not authorized to access requested resource.","API Key missing in url/headers!"]}}},"404":{"description":"Not found","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"404","message":["Couldn't find Site with an out of range value for 'id'"]}}},"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. The body contains error information in a hash of errorMessages and an optional errorCode","schema":{"type":"object","properties":{"errorCode":{"type":"integer"},"errorMessages":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"errorCode":5,"errorMessages":["Devices are present on this system. Please retry after removing devices"]}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"reason":{"type":"string","description":"Response code"},"message":{"type":"array","items":{"type":"string","description":"Error Messages"}},"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":{"reason":"429","message":["Usage limit exceeded for plan Partner (custom)"],"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/activations/{activation_id}/users/{user_id}":{"post":{"summary":"Grant Access","description":"Gives a user permission to view this system. response status 200 indicates the access was granted. The user must be the owner or the host of an activation the API user can manage (or) Users created by API user (or) Users who belong to your company or its branches. In all other cases you will get 401 response.","parameters":[{"name":"activation_id","in":"path","type":"integer","description":"The Enlighten ID of the activation(system).","required":true},{"name":"user_id","in":"path","type":"integer","description":"The Enlighten ID of the user which you want to grant access.","required":true}],"tags":["Activations"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"message":{"type":"string"}}},"examples":{"application/json":{"message":"User access granted successfully"}}},"401":{"description":"Unauthorized","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"401","message":["Not authorized to access requested resource.","API Key missing in url/headers!"]}}},"404":{"description":"Not found","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"404","message":["System not found"]}}},"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. The body contains error information in a hash of errorMessages and an optional errorCode","schema":{"type":"object","properties":{"errorCode":{"type":"integer"},"errorMessages":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"errorMessages":["Some error messages"]}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"reason":{"type":"string","description":"Response code"},"message":{"type":"array","items":{"type":"string","description":"Error Messages"}},"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":{"reason":"429","message":["Usage limit exceeded for plan Partner (custom)"],"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"]}}}}},"get":{"summary":"Returns the requested user","description":"You must have access to the requested activation and user; otherwise a 401 is returned. The user is requested in the scope of an activation, then it must be the owner or the host of an activation the API user can manage (or) Users created by API user (or) Users who belong to your company or its branches.","parameters":[{"name":"activation_id","in":"path","type":"integer","description":"The Enlighten ID of the activation(system). System-generated.","required":true},{"name":"user_id","in":"path","type":"integer","description":"The Enlighten ID of the user. System-generated.","required":true},{"name":"expand","in":"query","type":"string","enum":["company"],"description":"Passing expand params in the url with valid option, then the response will contain company object fields. Otherwise the company information not include in the response."}],"tags":["Users"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"active":{"type":"boolean","description":"Whether the user is allowed to log in to Enlighten"},"user_roles":{"type":"array","items":{"type":"string","description":"Role"},"description":"What type of user this is in Enlighten. Possible values are ['self_installer']. For self installer user user_roles will be ['self_installer']. For other users user_roles will be empty."},"email":{"type":"string","description":"The email address of the user"},"enlighten_emails":{"type":"boolean","description":"Whether the user receives automated emails from Enlighten"},"enlighten_view":{"type":"string","description":"Which view of Enlighten the user has"},"first_name":{"type":"string","description":"The user's first name"},"last_name":{"type":"string","description":"The user's last name"},"phone":{"type":"string","description":"The telephone number of the user"},"uri":{"type":"string","description":"URI to the show() method for the user. System-generated"},"user_id":{"type":"integer","description":"The Enlighten ID of the user. System-generated"},"updated_at":{"type":"integer","description":"Last updated date and time in Epoch format"},"company":{"type":"object","properties":{"company_id":{"type":"integer","description":"The Enlighten-generated ID of the company to which the user belongs"},"company_name":{"type":"string","description":"Name of the company to which the user belongs"},"location":{"type":"string","description":"Company location"},"roles":{"type":"array","items":{"type":"string","description":"Role"},"description":"What type of company this is in Enphase. Possible values are ['installer']. For installer company roles will be ['installer']. For other role roles will be empty."},"uri":{"type":"string","description":"URI to the show() method for the company. System-generated"}}}}},"examples":{"application/json":{"active":true,"user_roles":[],"email":"username@domain.com","enlighten_emails":false,"enlighten_view":"my","first_name":"Joe","last_name":"User","phone":"1-800-123-1234","uri":"/api/v4/users/123456.json","user_id":123456,"updated_at":1508128974,"company":{"company_id":5,"company_name":"Enphase Energy","location":"Petaluma, CA - US","roles":["installer"],"uri":"/api/v4/companies/5.json"}}}},"401":{"description":"Unauthorized","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"401","message":["Not authorized to access requested resource.","API Key missing in url/headers!"]}}},"404":{"description":"Not found","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"404","message":["User not found."]}}},"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. The body contains error information in a hash of errorMessages and an optional errorCode","schema":{"type":"object","properties":{"errorCode":{"type":"integer"},"errorMessages":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"errorMessages":["Invalid expand option"]}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"reason":{"type":"string","description":"Response code"},"message":{"type":"array","items":{"type":"string","description":"Error Messages"}}}},"examples":{"application/json":{"reason":"429","message":["Usage limit exceeded for plan Partner (custom)"]}}},"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":"Update user","description":"You must have access to the requested activation and user; otherwise a 401 is returned. The user is requested in the scope of an activation, then it must be the owner or the host of an activation the API user can manage (or) Users created by API user (or) Users who belong to your company or its branches. When 'company_id' is passed in the body param or the user company_id is already defined, we will not consider the 'enlighten_view' field value and the user will become an enlighten manager. You may change a user's company if you have access to the user, the old company, and the new company.","parameters":[{"name":"activation_id","in":"path","type":"integer","description":"The Enlighten ID of the activation(system). System-generated.","required":true},{"name":"user_id","in":"path","type":"integer","description":"The Enlighten ID of the user. System-generated.","required":true},{"name":"user","in":"body","schema":{"type":"object","properties":{"company_id":{"type":"integer","description":"The Enlighten-generated ID of the company to which the user belongs, if any. DEPRECATED: Use the 'company' attribute instead, and the query parameter 'expand=company' to get detailed company information."},"email":{"type":"string","description":"The email address of the user. Must be unique within Enlighten. Required."},"enlighten_emails":{"type":"boolean","description":"Whether the user receives automated emails from Enlighten. Default false."},"enlighten_view":{"type":"string","description":"Which view of Enlighten the user has. Options 'my' for MyEnlighten, 'manager' for Enlighten Manager. Default 'my'. Users who do not belong to companies should be set to 'my'. You must have an agreement with Enphase Energy to set a user to 'manager'."},"first_name":{"type":"string","description":"The user's first name. Required."},"last_name":{"type":"string","description":"The user's last name. Required."},"phone":{"type":"string","description":"The telephone number of the user. Optional. Max length 255."}}}}],"tags":["Users"],"consumes":["application/x-www-form-urlencoded"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"active":{"type":"boolean","description":"Whether the user is allowed to log in to Enlighten."},"user_roles":{"type":"array","items":{"type":"string","description":"Role"},"description":"What type of user this is in Enlighten. Possible values are ['self_installer']. For self installer user user_roles will be ['self_installer']. For other users user_roles will be empty."},"email":{"type":"string","description":"The email address of the user"},"enlighten_emails":{"type":"boolean","description":"Whether the user receives automated emails from Enlighten"},"enlighten_view":{"type":"string","description":"Which view of Enlighten the user has"},"first_name":{"type":"string","description":"The user's first name"},"last_name":{"type":"string","description":"The user's last name"},"phone":{"type":"string","description":"The telephone number of the user."},"uri":{"type":"string","description":"URI to the show() method for the user. System-generated."},"user_id":{"type":"integer","description":"The Enlighten ID of the user. System-generated."},"updated_at":{"type":"integer","description":"Last updated date and time in Epoch format."}}},"examples":{"application/json":{"active":true,"user_roles":[],"email":"username@domain.com","enlighten_emails":false,"enlighten_view":"my","first_name":"Joe","last_name":"User","phone":"1-800-123-1234","uri":"/api/v4/users/123456.json","user_id":123456,"updated_at":1565775103}}},"401":{"description":"Unauthorized","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"401","message":["Not authorized to access requested resource.","API Key missing in url/headers!"]}}},"404":{"description":"Not found","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"404","message":["User not found."]}}},"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. The body contains error information in a hash of errorMessages and an optional errorCode","schema":{"type":"object","properties":{"errorCode":{"type":"integer"},"errorMessages":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"errorMessages":["User param are missing at body location"]}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"reason":{"type":"string","description":"Response code"},"message":{"type":"array","items":{"type":"string","description":"Error Messages"}},"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":{"reason":"429","message":["Usage limit exceeded for plan Partner (custom)"],"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"]}}}}},"delete":{"summary":"Revoke Access","description":"Revokes a user's permission to view this system. response status 200 indicates the access was revoked. The user must be the owner or the host of an activation the API user can manage (or) Users created by API user (or) Users who belong to your company or its branches. In all other cases you will get 401 response.","parameters":[{"name":"activation_id","in":"path","type":"integer","description":"The Enlighten ID of the activation(system).","required":true},{"name":"user_id","in":"path","type":"integer","description":"The Enlighten ID of the user which you want to revoke the access.","required":true}],"tags":["Activations"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"message":{"type":"string"}}},"examples":{"application/json":{"message":"User access revoked successfully"}}},"401":{"description":"Unauthorized","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"401","message":["Not authorized to access requested resource.","API Key missing in url/headers!"]}}},"404":{"description":"Not found","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"404","message":["System not found"]}}},"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. The body contains error information in a hash of errorMessages and an optional errorCode","schema":{"type":"object","properties":{"errorCode":{"type":"integer"},"errorMessages":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"errorMessages":["Some error messages"]}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"reason":{"type":"string","description":"Response code"},"message":{"type":"array","items":{"type":"string","description":"Error Messages"}},"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":{"reason":"429","message":["Usage limit exceeded for plan Partner (custom)"],"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/activations/{activation_id}/ops/production_mode":{"post":{"summary":"Set production mode","description":"Enable or Disable production mode for a particular system. For that system stage must be greater than 2, Otherwise you will get 422.","parameters":[{"name":"activation_id","in":"path","type":"integer","description":"The Enlighten ID of the activation(system). System-generated.","required":true},{"name":"production_mode","in":"body","schema":{"type":"object","properties":{"mode":{"type":"string","enum":["on","off"],"description":""}},"required":["mode"]}}],"tags":["Activations"],"consumes":["application/x-www-form-urlencoded"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"message":{"type":"string"}}},"examples":{"application/json":{"message":"Production mode Task sent to envoy Successfully"}}},"401":{"description":"Unauthorized","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"401","message":["Not authorized to access requested resource.","API Key missing in url/headers!"]}}},"404":{"description":"Not found","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"404","message":["System not found"]}}},"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. The body contains error information in a hash of errorMessages and an optional errorCode","schema":{"type":"object","properties":{"errorCode":{"type":"integer"},"errorMessages":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"errorMessages":["No active Envoys present in the site"]}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"reason":{"type":"string","description":"Response code"},"message":{"type":"array","items":{"type":"string","description":"Error Messages"}}}},"examples":{"application/json":{"reason":"429","message":["Usage limit exceeded for plan Partner (custom)"]}}},"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"]}}}}},"get":{"summary":"Get production mode","description":"Get production mode for a particular system. For that system stage must be greater than 2, Otherwise you will get 422.","parameters":[{"name":"activation_id","in":"path","type":"integer","description":"The Enlighten ID of the activation(system). System-generated.","required":true}],"tags":["Activations"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"mode":{"type":"string","description":""},"total_micros":{"type":"integer","description":"Total number of microinverters in the system"},"energy_producing_micros":{"type":"integer","description":"Total number of microinverters producing energy in the system"}}},"examples":{"application/json":{"mode":"on","total_micros":21,"energy_producing_micros":18}}},"401":{"description":"Unauthorized","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"401","message":["Not authorized to access requested resource.","API Key missing in url/headers!"]}}},"404":{"description":"Not found","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"404","message":["System not found"]}}},"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. The body contains error information in a hash of errorMessages and an optional errorCode","schema":{"type":"object","properties":{"errorCode":{"type":"integer"},"errorMessages":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"errorMessages":["System not yet communicated"]}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"reason":{"type":"string","description":"Response code"},"message":{"type":"array","items":{"type":"string","description":"Error Messages"}}}},"examples":{"application/json":{"reason":"429","message":["Usage limit exceeded for plan Partner (custom)"]}}},"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/companies/{company_id}/users":{"get":{"summary":"Get all users with in a company","description":"Returns the users in the given company.","parameters":[{"name":"company_id","in":"path","type":"integer","description":"Company ID","required":true}],"tags":["Companies"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"description":"Key is users","additionalProperties":{"type":"array","description":"Zero or more users. Each user is an array. In that first value of the array is Enlighten ID of the user. System-generated. Second value of the array is the email address of the user."}},"examples":{"application/json":{"users":[[6,"test@gmail.com"],[7,"test2@gmail.com"]]}}},"401":{"description":"Unauthorized","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"401","message":["Not authorized to access requested resource.","API Key missing in url/headers!"]}}},"404":{"description":"Not found","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"404","message":["Company not found"]}}},"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":{"reason":{"type":"string","description":"Response code"},"message":{"type":"array","items":{"type":"string","description":"Error Messages"}},"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":{"reason":"429","message":["Usage limit exceeded for plan Partner (custom)"],"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"]}}}}},"post":{"summary":"Create company user","description":"Create a company user. When the user is created in the context of a company, then the user is belongs to that company. Otherwise, the user does not belong to a company.\n Email, First Name, and Last Name are mandatory fields in the user. Any unneeded fields passed in the request parameter will be skipped and not stored.\n Pass body param in 'application/x-www-form-urlencoded' format, in this endpoint, key will be 'user' and value will be a JSON dictionary of user fields.","parameters":[{"name":"company_id","in":"path","type":"integer","description":"Company ID","required":true},{"name":"user","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"The email address of the user. Must be unique within Enlighten. Required"},"enlighten_emails":{"type":"boolean","description":"Whether the user receives automated emails from Enlighten. Default false."},"first_name":{"type":"string","description":"The user's first name. Required"},"last_name":{"type":"string","description":"The user's last name. Required"},"phone":{"type":"string","description":"The telephone number of the user. Optional. Max length 50."}},"required":["email","first_name","last_name"]}}],"tags":["Companies"],"consumes":["application/x-www-form-urlencoded"],"produces":["application/json"],"responses":{"201":{"description":"Created","schema":{"type":"object","properties":{"active":{"type":"boolean","description":"Whether the user is allowed to log in to Enlighten."},"user_roles":{"type":"array","items":{"type":"string","description":"Role"},"description":"What type of user this is in Enlighten. Possible values are ['self_installer']. For self installer user user_roles will be ['self_installer']. For other users user_roles will be empty."},"email":{"type":"string","description":"The email address of the user"},"enlighten_emails":{"type":"boolean","description":"Whether the user receives automated emails from Enlighten"},"enlighten_view":{"type":"string","description":"Which view of Enlighten the user has"},"first_name":{"type":"string","description":"The user's first name"},"last_name":{"type":"string","description":"The user's last name"},"phone":{"type":"string","description":"The telephone number of the user."},"uri":{"type":"string","description":"URI to the show() method for the user. System-generated."},"user_id":{"type":"integer","description":"The Enlighten ID of the user. System-generated."},"updated_at":{"type":"integer","description":"Last updated date and time in Epoch format."}}},"examples":{"application/json":{"active":true,"user_roles":[],"email":"sample@gmail.com","enlighten_emails":true,"enlighten_view":"manager","first_name":"Test","last_name":"User","phone":"1234567890","uri":"/api/v4/users/2020.json","user_id":2020,"updated_at":1565928605}}},"401":{"description":"Unauthorized","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"401","message":["Not authorized to access requested resource.","API Key missing in url/headers!"]}}},"404":{"description":"Not found","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"404","message":["Company not found"]}}},"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. The body contains error information in a hash of errorMessages and an optional errorCode","schema":{"type":"object","properties":{"errorCode":{"type":"integer"},"errorMessages":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"errorMessages":["User param are missing at body location"]}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"reason":{"type":"string","description":"Response code"},"message":{"type":"array","items":{"type":"string","description":"Error Messages"}},"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":{"reason":"429","message":["Usage limit exceeded for plan Partner (custom)"],"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/users":{"post":{"summary":"Create Home owner","description":"Create a home owner user. Email, First Name, and Last Name are mandatory fields in the user. Any unneeded fields passed in the request parameter will be skipped and not stored.\nPass body param in 'application/x-www-form-urlencoded' format, in this endpoint, key will be 'user' and value will be a JSON dictionary of user fields. Using this API to create both homeowner as well as a company user. If you want to create company user, then pass company_id inside the user object.","tags":["Home Owner"],"consumes":["application/x-www-form-urlencoded"],"parameters":[{"name":"user","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"The email address of the user. Must be unique within Enlighten. Required"},"enlighten_emails":{"type":"boolean","description":"Whether the user receives automated emails from Enlighten. Default false."},"enlighten_view":{"type":"string","description":"Which view of Enlighten the user has. Options 'my' for MyEnlighten, 'manager' for Enlighten Manager. Default 'my'. Users who do not belong to companies should be set to 'my'. You must have an agreement with Enphase Energy to set a user to 'manager'. Company id is required when enlighten_view is 'manager'"},"first_name":{"type":"string","description":"The user's first name. Required"},"last_name":{"type":"string","description":"The user's last name. Required"},"phone":{"type":"string","description":"The telephone number of the user. Optional. Max length 255."},"company_id":{"type":"integer","description":"The Enlighten-generated ID of the company to which the user belongs, if any."}},"required":["email","first_name","last_name"]}}],"produces":["application/json"],"responses":{"201":{"description":"Created","schema":{"type":"object","properties":{"active":{"type":"boolean","description":"Whether the user is allowed to log in to Enlighten."},"user_roles":{"type":"array","items":{"type":"string","description":"Role"},"description":"What type of user this is in Enlighten. Possible values are ['self_installer']. For self installer user user_roles will be ['self_installer']. For other users user_roles will be empty."},"email":{"type":"string","description":"The email address of the user"},"enlighten_emails":{"type":"boolean","description":"Whether the user receives automated emails from Enlighten"},"enlighten_view":{"type":"string","description":"Which view of Enlighten the user has"},"first_name":{"type":"string","description":"The user's first name"},"last_name":{"type":"string","description":"The user's last name"},"phone":{"type":"string","description":"The telephone number of the user."},"uri":{"type":"string","description":"URI to the show() method for the user. System-generated."},"user_id":{"type":"integer","description":"The Enlighten ID of the user. System-generated."},"updated_at":{"type":"integer","description":"Last updated date and time in Epoch format."}}},"examples":{"application/json":{"active":true,"user_roles":[],"email":"sample@gmail.com","enlighten_emails":true,"enlighten_view":"my","first_name":"Test","last_name":"User","phone":"1234567890","uri":"/api/v4/users/2020.json","user_id":2020,"updated_at":1565928605}}},"401":{"description":"Unauthorized","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"401","message":["Not authorized to access requested resource.","API Key missing in url/headers!"]}}},"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. The body contains error information in a hash of errorMessages and an optional errorCode","schema":{"type":"object","properties":{"errorCode":{"type":"integer"},"errorMessages":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"errorMessages":["User param are missing at body location"]}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"reason":{"type":"string","description":"Response code"},"message":{"type":"array","items":{"type":"string","description":"Error Messages"}},"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":{"reason":"429","message":["Usage limit exceeded for plan Partner (custom)"],"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/users/search":{"get":{"summary":"Search user","description":"Returns the user id for the given email id only if the user exists.","parameters":[{"name":"email","in":"query","type":"string","description":"The email address of the user."}],"tags":["Users"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"user_id":{"type":"integer","description":"The Enlighten ID of the user"},"company_id":{"type":"integer","description":"The Enlighten ID of the company that the user belongs to. If the user does not belong to a company, this field will not be present in the response."}}},"examples":{"application/json":{"user_id":123,"company_id":1}}},"401":{"description":"Unauthorized","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"401","message":["Not authorized to access requested resource.","API Key missing in url/headers!"]}}},"404":{"description":"Not found","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"404","message":["User not found."]}}},"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. The body contains error information in a hash of errorMessages and an optional errorCode","schema":{"type":"object","properties":{"errorCode":{"type":"integer"},"errorMessages":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"errorMessages":["Email should not be blank"]}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"reason":{"type":"string","description":"Response code"},"message":{"type":"array","items":{"type":"string","description":"Error Messages"}},"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":{"reason":"429","message":["Usage limit exceeded for plan Partner (custom)"],"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/companies/{company_id}/users/{user_id}":{"put":{"summary":"Update company user","description":"Updates a user. You may change a user's company if you have access to the user, the old company, and the new company. The user is requested in the scope of a company, then three conditions apply: 1) You must have access to the requested company; otherwise a 401 is returned. 2) The user must belong to the requested company; otherwise a 401 is returned. 3) Requested user must be created by API user (or) it must belong to your company or its branches.","parameters":[{"name":"company_id","in":"path","type":"integer","description":"Company ID","required":true},{"name":"user_id","in":"path","type":"integer","description":"User ID","required":true},{"name":"user","in":"body","schema":{"type":"object","properties":{"company_id":{"type":"integer","description":"The Enlighten-generated ID of the company to which the user belongs, if any. DEPRECATED: Use the 'company' attribute instead, and the query parameter 'expand=company' to get detailed company information."},"email":{"type":"string","description":"The email address of the user. Must be unique within Enlighten. Cannot be empty string."},"enlighten_emails":{"type":"boolean","description":"Whether the user receives automated emails from Enlighten. Default false."},"first_name":{"type":"string","description":"The user's first name. Cannot be empty string."},"last_name":{"type":"string","description":"The user's last name. Cannot be empty string."},"phone":{"type":"string","description":"The telephone number of the user. Optional. Max length 255."}}}}],"tags":["Companies"],"consumes":["application/x-www-form-urlencoded"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"active":{"type":"boolean","description":"Whether the user is allowed to log in to Enlighten."},"user_roles":{"type":"array","items":{"type":"string","description":"Role"},"description":"What type of user this is in Enlighten. Possible values are ['self_installer']. For self installer user user_roles will be ['self_installer']. For other users user_roles will be empty."},"email":{"type":"string","description":"The email address of the user"},"enlighten_emails":{"type":"boolean","description":"Whether the user receives automated emails from Enlighten"},"enlighten_view":{"type":"string","description":"Which view of Enlighten the user has"},"first_name":{"type":"string","description":"The user's first name"},"last_name":{"type":"string","description":"The user's last name"},"phone":{"type":"string","description":"The telephone number of the user."},"uri":{"type":"string","description":"URI to the show() method for the user. System-generated."},"user_id":{"type":"integer","description":"The Enlighten ID of the user. System-generated."},"updated_at":{"type":"integer","description":"Last updated date and time in Epoch format."}}},"examples":{"application/json":{"active":true,"user_roles":[],"email":"sample@gmail.com","enlighten_emails":true,"enlighten_view":"manager","first_name":"Test","last_name":"User","phone":"1234567890","uri":"/api/v4/users/210071.json","user_id":210071,"updated_at":1565928605}}},"401":{"description":"Unauthorized","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"401","message":["Not authorized to access requested resource.","API Key missing in url/headers!"]}}},"404":{"description":"Not found","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"404","message":["User not found."]}}},"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. The body contains error information in a hash of errorMessages and an optional errorCode","schema":{"type":"object","properties":{"errorCode":{"type":"integer"},"errorMessages":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"errorMessages":["Email has already been registered"]}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"reason":{"type":"string","description":"Response code"},"message":{"type":"array","items":{"type":"string","description":"Error Messages"}},"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":{"reason":"429","message":["Usage limit exceeded for plan Partner (custom)"],"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/partner/users/{user_id}":{"get":{"summary":"Returns the requested user","description":"You must have permission to view the user. You can view yourself, users you created, and users who belong to your company or its branches. In all other cases, a 401 is returned. Company details are provided in the response only if 'expand' parameter is passed in the URL with value as company. Otherwise, company information will not be provided in the response.","parameters":[{"name":"user_id","in":"path","type":"integer","description":"User ID","required":true},{"name":"expand","in":"query","type":"string","enum":["company"],"description":"Passing expand params in the url with valid option, then the response will contain company object fields. Otherwise the company information will not be provided in the response."}],"tags":["Users"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"active":{"type":"boolean","description":"Whether the user is allowed to log in to Enlighten"},"user_roles":{"type":"array","items":{"type":"string","description":"Role"},"description":"What type of user this is in Enlighten. Possible values are ['self_installer']. For self installer user user_roles will be ['self_installer']. For other users user_roles will be empty."},"email":{"type":"string","description":"The email address of the user"},"enlighten_emails":{"type":"boolean","description":"Whether the user receives automated emails from Enlighten"},"enlighten_view":{"type":"string","description":"Which view of Enlighten the user has"},"first_name":{"type":"string","description":"The user's first name"},"last_name":{"type":"string","description":"The user's last name"},"phone":{"type":"string","description":"The telephone number of the user"},"uri":{"type":"string","description":"URI to the show() method for the user. System-generated"},"user_id":{"type":"integer","description":"The Enlighten ID of the user. System-generated"},"updated_at":{"type":"integer","description":"Last updated date and time in Epoch format"},"company":{"type":"object","properties":{"company_id":{"type":"integer","description":"The Enlighten-generated ID of the company to which the user belongs"},"company_name":{"type":"string","description":"Name of the company to which the user belongs"},"location":{"type":"string","description":"Company location"},"roles":{"type":"array","items":{"type":"string"},"description":"What type of company this is in Enphase. Possible values are ['installer']. For installer company roles will be ['installer']. For other role roles will be empty."},"uri":{"type":"string","description":"URI to the show() method for the company. System-generated"}}}}},"examples":{"application/json":{"active":true,"user_roles":[],"email":"username@domain.com","enlighten_emails":false,"enlighten_view":"my","first_name":"Joe","last_name":"User","phone":"1-800-123-1234","uri":"/api/v4/users/123456.json","user_id":123456,"updated_at":1508128974,"company":{"company_id":5,"company_name":"Enphase Energy","location":"Petaluma, CA - US","roles":["installer"],"uri":"/api/v4/companies/5.json"}}}},"401":{"description":"Unauthorized","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"401","message":["Not authorized to access requested resource.","API Key missing in url/headers!"]}}},"404":{"description":"Not found","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"404","message":["User not found."]}}},"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. The body contains error information in a hash of errorMessages and an optional errorCode","schema":{"type":"object","properties":{"errorCode":{"type":"integer"},"errorMessages":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"errorMessages":["Invalid expand option"]}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"reason":{"type":"string","description":"Response code"},"message":{"type":"array","items":{"type":"string","description":"Error Messages"}},"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":{"reason":"429","message":["Usage limit exceeded for plan Partner (custom)"],"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/partner/users/self":{"get":{"summary":"Return the current logged in user detail","description":"Return the current logged in user detail. Company details are provided in the response only if 'expand' parameter is passed in the URL with value as company. Otherwise, company information will not be provided in the response.","parameters":[{"name":"expand","in":"query","type":"string","enum":["company"],"description":"Passing expand params in the url with valid option, then the response will contain company object fields. Otherwise the company information will not be provided in the response."}],"tags":["Users"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"active":{"type":"boolean","description":"Whether the user is allowed to log in to Enlighten"},"user_roles":{"type":"array","items":{"type":"string","description":"Role"},"description":"What type of user this is in Enlighten. Possible values are ['self_installer']. For self installer user user_roles will be ['self_installer']. For other users user_roles will be empty."},"email":{"type":"string","description":"The email address of the user"},"enlighten_emails":{"type":"boolean","description":"Whether the user receives automated emails from Enlighten"},"enlighten_view":{"type":"string","description":"Which view of Enlighten the user has"},"first_name":{"type":"string","description":"The user's first name"},"last_name":{"type":"string","description":"The user's last name"},"phone":{"type":"string","description":"The telephone number of the user"},"uri":{"type":"string","description":"URI to the show() method for the user. System-generated"},"user_id":{"type":"integer","description":"The Enlighten ID of the user. System-generated"},"updated_at":{"type":"integer","description":"Last updated date and time in Epoch format"},"company":{"type":"object","properties":{"company_id":{"type":"integer","description":"The Enlighten-generated ID of the company to which the user belongs"},"company_name":{"type":"string","description":"Name of the company to which the user belongs"},"location":{"type":"string","description":"Company location"},"roles":{"type":"array","items":{"type":"string","description":"Role"},"description":"What type of company this is in Enphase. Possible values are ['installer']. For installer company roles will be ['installer']. For other role roles will be empty."},"uri":{"type":"string","description":"URI to the show() method for the company. System-generated"}}}}},"examples":{"application/json":{"active":true,"user_roles":[],"email":"username@domain.com","enlighten_emails":false,"enlighten_view":"my","first_name":"Joe","last_name":"User","phone":"1-800-123-1234","uri":"/api/v4/users/123456.json","user_id":123456,"updated_at":1508128974,"company":{"company_id":5,"company_name":"Enphase Energy","location":"Petaluma, CA - US","roles":["installer"],"uri":"/api/v4/companies/5.json"}}}},"401":{"description":"Unauthorized","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"401","message":["Not authorized to access requested resource.","API Key missing in url/headers!"]}}},"404":{"description":"Not found","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"404","message":["User not found."]}}},"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. The body contains error information in a hash of errorMessages and an optional errorCode","schema":{"type":"object","properties":{"errorCode":{"type":"integer"},"errorMessages":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"errorMessages":["Invalid expand option"]}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"reason":{"type":"string","description":"Response code"},"message":{"type":"array","items":{"type":"string","description":"Error Messages"}},"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":{"reason":"429","message":["Usage limit exceeded for plan Partner (custom)"],"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/companies/self/branches":{"get":{"summary":"User's company and its branches","description":"Returns information about the API user's company and its branches, if any","tags":["Companies"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"company_id":{"type":"integer","description":"The Enlighten ID of the API user's company."},"company_name":{"type":"string","description":"The name of the API user's company."},"branches":{"type":"array","description":"A list of branches belonging to the API user's company. May be empty.","items":{"type":"object","properties":{"company_id":{"type":"integer","description":"The Enlighten ID of the company."},"company_name":{"type":"string","description":"The name of the company."},"location":{"type":"string","description":"Company location"},"roles":{"type":"array","items":{"type":"string"},"description":"What type of company this is in Enphase. Possible values are ['installer']. For installer company roles will be ['installer']. For other role roles will be empty."},"uri":{"type":"string","description":"URI to the show() method for the company. System-generated"}}}}}},"examples":{"application/json":{"company_id":9,"company_name":"Super Solar","branches":[{"company_id":81,"company_name":"Super Solar North","location":"Petaluma, CA - US","roles":["installer"],"uri":"/api/v4/companies/81.json"}]}}},"401":{"description":"Unauthorized","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"401","message":["Not authorized to access requested resource.","API Key missing in url/headers!"]}}},"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":{"reason":{"type":"string","description":"Response code"},"message":{"type":"array","items":{"type":"string","description":"Error Messages"}},"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":{"reason":"429","message":["Usage limit exceeded for plan Partner (custom)"],"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/companies/self/authorized_subcontractors":{"get":{"summary":"User's company and its authorized subcontractors.","description":"Returns all the authorized subcontractors of a given company, if any","tags":["Companies"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"company_id":{"type":"integer","description":"The Enlighten ID of the API user's company."},"company_name":{"type":"string","description":"The name of the API user's company."},"authorized_subcontractors":{"type":"array","description":"A list of subcontractors belonging to the API user's company. May be empty.","items":{"type":"object","properties":{"company_id":{"type":"integer","description":"The Enlighten ID of the company."},"company_name":{"type":"string","description":"The name of the company."},"location":{"type":"string","description":"Company location"},"roles":{"type":"array","items":{"type":"string","description":"Company’s role in Enphase. Possible values are ['installer']. For installer companies, roles will be ['installer']. For other companies, roles will be empty"}},"uri":{"type":"string","description":"URI to the show() method for the company. System-generated"},"status":{"type":"string","description":"whether the subcontractor is enabled or disabled"}}}}}},"examples":{"application/json":{"company_id":9,"company_name":"Super Solar","authorized_subcontractors":[{"company_id":81,"company_name":"Super Solar North","location":"Petaluma, CA - US","roles":["installer"],"uri":"/api/v4/companies/81.json","status":"Enabled"}]}}},"401":{"description":"Unauthorized","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"401","message":["Not authorized to access requested resource."]}}},"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":{"reason":{"type":"string","description":"Response code"},"message":{"type":"array","items":{"type":"string","description":"Error Messages"}},"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":{"reason":"429","message":["Usage limit exceeded for plan Partner (custom)"],"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/activations/{activation_id}/estimate":{"get":{"summary":"Returns the estimate for this system.","description":"Provides access to production estimates for a system. An estimate includes the annual degradation factor for the system as well as estimated production, in kWh, for each month. By default degrade_factor value is 0.5 and month_estimates value is an empty array.","parameters":[{"name":"activation_id","in":"path","type":"integer","description":"Activation ID","required":true}],"tags":["Estimate"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"The system this estimate is for."},"degrade_factor":{"type":"string","description":"The annual production degradation factor for the system, from year 0 of the system's life. Must be 0.0% or higher. Default 0.5%."},"month_estimates":{"type":"array","items":{"type":"string"},"description":"The estimated monthly production of the system, in kWh. A value for each month must be provided, and must be greater than 0. Send an empty array if you need to remove monthly estimates. Default empty array"}}},"examples":{"application/json":{"system_id":67,"degrade_factor":"0.4","month_estimates":["3112.0","3248.0","3805.0","4437.0","4266.0","3998.0","4034.0","3840.0","3647.0","3551.0","2926.0","2872.0"]}}},"401":{"description":"Unauthorized","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"401","message":["Not authorized to access requested resource.","API Key missing in url/headers!"]}}},"404":{"description":"Not found","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"404","message":["System not found"]}}},"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":{"reason":{"type":"string","description":"Response code"},"message":{"type":"array","items":{"type":"string","description":"Error Messages"}},"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":{"reason":"429","message":["Usage limit exceeded for plan Partner (custom)"],"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":"Update the estimate for this system.","description":"Updates the estimate for this system.","parameters":[{"name":"activation_id","in":"path","type":"integer","description":"Activation ID","required":true},{"name":"estimate","in":"body","schema":{"type":"object","properties":{"degrade_factor":{"type":"string","description":"The annual production degradation factor for the system, from year 0 of the system's life. Must be 0.0% or higher."},"month_estimates":{"type":"array","items":{"type":"string"},"description":"The estimated monthly production of the system, in kWh. A value for each month must be provided, and must be greater than 0. Send an empty array if you need to remove monthly estimates."}},"required":["degrade_factor","month_estimates"]}}],"tags":["Estimate"],"consumes":["application/x-www-form-urlencoded"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"The system this estimate is for"},"degrade_factor":{"type":"string","description":"The annual production degradation factor for the system"},"month_estimates":{"type":"array","items":{"type":"string"},"description":"The estimated monthly production of the system, in kWh"}}},"examples":{"application/json":{"system_id":67,"degrade_factor":"0.4","month_estimates":["3112.0","3248.0","3805.0","4437.0","4266.0","3998.0","4034.0","3840.0","3647.0","3551.0","2926.0","2872.0"]}}},"401":{"description":"Unauthorized","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"401","message":["Not authorized to access requested resource.","API Key missing in url/headers!"]}}},"404":{"description":"Not found","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"404","message":["System not found"]}}},"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. The body contains error information in a hash of errorMessages and an optional errorCode","schema":{"type":"object","properties":{"errorCode":{"type":"integer","description":"Optional field"},"errorMessages":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"errorCode":11,"errorMessages":["Estimate parameter missing in body"]}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"reason":{"type":"string","description":"Response code"},"message":{"type":"array","items":{"type":"string","description":"Error Messages"}},"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":{"reason":"429","message":["Usage limit exceeded for plan Partner (custom)"],"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/partner/grid_profiles":{"get":{"summary":"Lists the available profiles","description":"Lists the available profiles.","tags":["Grid Profiles"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"grid_profiles":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Grid profile ID. System-generated"},"profile_id":{"type":"string","description":""},"created":{"type":"string","description":"Profile created date and time"},"updated":{"type":"string","description":"Profile last updated date and time"},"name":{"type":"string","description":"Profile name"},"description":{"type":"string","description":"Profile description"},"version":{"type":"string","description":"Profile version"},"envoy_type":{"type":"string","description":"Envoy type"},"countries":{"type":"array","items":{"type":"string"},"description":"Name of the Countries"},"states":{"type":"array","items":{"type":"string"},"description":"States code"},"state_names":{"type":"array","items":{"type":"string"},"description":"Name of the states"},"ensemble_1_compatible":{"type":"boolean","description":""}}}}}},"examples":{"application/json":{"grid_profiles":[{"id":"9d9e749bf64f462fb8b2aac1","profile_id":"agf:5f2299d9f22aad4ae0e15bfd","created":"2017-05-23T17:46:46Z","updated":"2017-05-23T17:46:46Z","name":"Profile Name","description":"Profile Description","version":"1.0.1","envoy_type":"north_america","countries":["US"],"states":["HI"],"state_names":["Hawaii"],"ensemble_1_compatible":false}]}}},"401":{"description":"Unauthorized","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"401","message":["Not authorized to access requested resource.","API Key missing in url/headers!"]}}},"404":{"description":"Not found","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"404","message":["Partner company missing"]}}},"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":{"reason":{"type":"string","description":"Response code"},"message":{"type":"array","items":{"type":"string","description":"Error Messages"}}}},"examples":{"application/json":{"reason":"429","message":["Usage limit exceeded for plan Partner (custom)"]}}},"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}/meters/{serial_number}":{"get":{"summary":"Returns the requested meter detail.","description":"Returns the requested meter by serial number. You must have access to the requested system and meter; otherwise a 401 is returned.","parameters":[{"name":"system_id","in":"path","type":"integer","description":"System ID","required":true},{"name":"serial_number","in":"path","type":"string","description":"Meter serial number","required":true}],"tags":["Meters"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"serial_number":{"type":"string","description":"Meter serial number"},"manufacturer":{"type":"string","description":"Name of the manufacturer"},"model":{"type":"string","description":"Model"},"type":{"type":"string","description":"Meter type"},"operational_date":{"type":"string","description":"Operational date"},"first_report_date":{"type":"string","description":"First report date"},"last_report_date":{"type":"string","description":"Last report date"},"phase":{"type":"string","description":"Phase"},"envoy_serial_number":{"type":"string","description":"Envoy serial number"},"status":{"type":"string","description":"Meter status"},"state":{"type":"string","description":"Meter state"}}},"examples":{"application/json":{"serial_number":"123456789012","manufacturer":"Enphase Energy","model":"Envoy S","type":"production","operational_date":"2017-06-13","first_report_date":"2020-06-11T22:15:00-08:00","last_report_date":"2020-06-14T22:15:00-08:00","phase":"L1(A)","envoy_serial_number":"121832000404","status":"normal","state":"enabled"}}},"401":{"description":"Unauthorized","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"401","message":["Not authorized to access requested resource.","API Key missing in url/headers!"]}}},"404":{"description":"Not found","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"404","message":["Meter not found"]}}},"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":{"reason":{"type":"string","description":"Response code"},"message":{"type":"array","items":{"type":"string","description":"Error Messages"}},"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":{"reason":"429","message":["Usage limit exceeded for plan Partner (custom)"],"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/activations/{activation_id}/meters/{serial_number}/meter_control":{"post":{"summary":"Enable or Disable the meters.","description":"Enable or Disable the meters. You must have access to the requested system and meter; otherwise a 401 is returned.","parameters":[{"name":"activation_id","in":"path","type":"integer","description":"Activation ID","required":true},{"name":"serial_number","in":"path","type":"string","description":"Meter serial number","required":true},{"name":"params","in":"body","schema":{"type":"object","properties":{"status":{"type":"string","enum":["enabled","disabled"],"description":""}}}}],"tags":["Meters"],"consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"200","message":["Enable task sent to meter. Please wait until meter is enabled"]}}},"401":{"description":"Unauthorized","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"401","message":["Not authorized to access requested resource.","API Key missing in url/headers!"]}}},"404":{"description":"Not found","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"404","message":["Meter not found"]}}},"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. The body contains error information in a hash of errorMessages and an optional errorCode","schema":{"type":"object","properties":{"errorCode":{"type":"integer"},"errorMessages":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"errorMessages":["Invalid status, expected status is 'enabled' or 'disabled'"]}}},"429":{"description":"Too Many Requests","schema":{"type":"object","properties":{"reason":{"type":"string","description":"Response code"},"message":{"type":"array","items":{"type":"string","description":"Error Messages"}},"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":{"reason":"429","message":["Usage limit exceeded for plan Partner (custom)"],"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/pv_manufacturers":{"get":{"summary":"Returns PV module manufacturers","description":"Returns information about the PV module manufacturers known in Enlighten.","tags":["PvManufacturers"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"pv_manufacturers":{"type":"array","description":"A list of PV manufacturers. Each element in the list is an array including the model's manufacturer's primary key and name. The list may be empty.","items":{"type":"array","description":"Each item is an array. It contain two values.","items":{"type":"object"}}}}},"examples":{"application/json":{"pv_manufacturers":[[106,"1Soltech"],[107,"AIDE Solar"],[108,"aleo solar AG"],[109,"Alps Technology Inc"]]}}},"401":{"description":"Unauthorized","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"401","message":["Not authorized to access requested resource.","API Key missing in url/headers!"]}}},"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":{"reason":{"type":"string","description":"Response code"},"message":{"type":"array","items":{"type":"string","description":"Error Messages"}},"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":{"reason":"429","message":["Usage limit exceeded for plan Partner (custom)"],"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/pv_manufacturers/{pv_manufacturer_id}/pv_models":{"get":{"summary":"Returns PV module manufacturers","description":"Returns information about the PV modules known in Enlighten.","parameters":[{"name":"pv_manufacturer_id","in":"path","type":"integer","description":"Pv manufacturer ID","required":true}],"tags":["PvModels"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"pv_manufacturers":{"type":"object","description":"Information about the manufacturer whose PV module models are in the response.","properties":{"pv_manufacturer_id":{"type":"integer","description":"Pv manufacturer ID"},"name":{"type":"string","description":"Name of the Pv manufacturer"}}},"pv_models":{"type":"array","description":"A list of PV models for this manufacturer. Each element in the list is an array including the model's primary key and name. The list may be empty.","items":{"type":"array","items":{"type":"object"}}}}},"examples":{"application/json":{"pv_manufacturer":{"pv_manufacturer_id":109,"name":"Alps Technology Inc"},"pv_models":[[1047,"ATI 1650-155"],[1048,"ATI 1650-165"],[1049,"ATI 1650-175"]]}}},"401":{"description":"Unauthorized","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"401","message":["Not authorized to access requested resource.","API Key missing in url/headers!"]}}},"404":{"description":"Not found","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"404","message":["Manufacturer not found"]}}},"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":{"reason":{"type":"string","description":"Response code"},"message":{"type":"array","items":{"type":"string","description":"Error Messages"}},"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":{"reason":"429","message":["Usage limit exceeded for plan Partner (custom)"],"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}/tariff":{"get":{"summary":"Get tariff for a system","description":"Get tariff for a system","parameters":[{"name":"system_id","in":"path","type":"integer","description":"The unique numeric id of the system","required":true}],"tags":["Tariff"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"tariff":{"type":"object","properties":{"currency_type":{"type":"object","description":"Currency type","properties":{"code":{"type":"string","description":"Tariff currency code. e.g='USD'"}}},"single_rate":{"type":"object","description":"Single rate. It will have following fields.","properties":{"rate":{"type":"string","description":"The usage rate. e.g=0.0"},"sell":{"type":"string","description":"FiT rate. e.g=0.0"}}},"seasons":{"type":"array","description":"ToU seasons. It will have following fields.","items":{"type":"object","properties":{"id":{"type":"string","description":"Tou year id. e.g='all_year_long'"},"start":{"type":"string","description":"Start of Season. e.g='1/1'"},"days":{"type":"array","description":"ToU seasons. It will have following fields","items":{"type":"object","properties":{"id":{"type":"string","description":"ToU days id. e.g='all_days'"},"days":{"type":"string","description":"Comma separated days. e.g='Sun,Mon,Tue,Wed,Thu,Fri,Sat'"},"must_charge_start":{"type":"integer","description":"Must charge start field. e.g=0"},"must_charge_duration":{"type":"integer","description":"Must charge duration field. e.g=0"},"periods":{"type":"array","description":"Periods. It will have following fields","items":{"type":"object","properties":{"id":{"type":"string","description":"Period id. e.g='period_1'"},"start":{"type":"string","description":"Period start. e.g=0"},"rate":{"type":"string","description":"Period rate. e.g=0.0"},"error":{"type":"object","description":"Dynamic fields will appear."}}}}}}},"enable_charge_from_grid":{"type":"boolean"},"enable_discharge_to_grid":{"type":"boolean"}}}},"seasons_sell":{"type":"array","description":"ToU seasons sell. It will have following fields.","items":{"type":"object","properties":{"id":{"type":"string","description":"Tou year id. e.g='all_year_long'"},"start":{"type":"string","description":"Start of Season. e.g='1/1'"},"days":{"type":"array","description":"ToU seasons. It will have following fields","items":{"type":"object","properties":{"id":{"type":"string","description":"ToU days id. e.g='all_days'"},"days":{"type":"string","description":"Comma separated days. e.g='Sun,Mon,Tue,Wed,Thu,Fri,Sat'"},"must_charge_start":{"type":"integer","description":"Must charge start field. e.g=0"},"must_charge_duration":{"type":"integer","description":"Must charge duration field. e.g=0"},"periods":{"type":"array","description":"Periods. It will have following fields","items":{"type":"object","properties":{"id":{"type":"string","description":"Period id. e.g='period_1'"},"start":{"type":"string","description":"Period start. e.g=0"},"rate":{"type":"string","description":"Period rate. e.g=0.0"},"error":{"type":"object","description":"Dynamic fields will appear."}}}}}}}}}}}},"task":{"type":"object","properties":{"status":{"type":"string","description":"Status of latest tariff update task"},"created_at":{"type":"string","description":"Created time of latest tariff update task"}}}}},"examples":{"application/json":{"tariff":{"storage_settings":{"mode":"backup","reserved_soc":100},"currency":{"code":"AUD"},"single_rate":{"rate":"1","sell":"1"},"seasons":[{"id":"all_year_long","start":"1/1","days":[{"id":"weekdays","days":"Mon,Tue,Wed,Thu,Fri","must_charge_start":0,"must_charge_duration":59,"periods":[{"id":"period_1","start":0,"rate":"10","error":{}},{"id":"period_2","start":240,"rate":"12","error":{}},{"id":"period_3","start":480,"rate":"10","error":{}},{"id":"period_4","start":720,"rate":"12","error":{}},{"id":"period_5","start":960,"rate":"10","error":{}},{"id":"period_6","start":1200,"rate":"12","error":{}}],"enable_charge_from_grid":true,"enable_discharge_to_grid":true},{"id":"weekend","days":"Sun,Sat","must_charge_start":0,"must_charge_duration":0,"periods":[{"id":"period_1","start":0,"rate":"1"}],"enable_charge_from_grid":false,"enable_discharge_to_grid":false}]},{"id":"summer","start":"3/1","days":[{"id":"weekdays","days":"Mon,Tue,Wed,Thu,Fri","must_charge_start":0,"must_charge_duration":0,"periods":[{"id":"period_1","start":0,"rate":"1"}]},{"id":"weekend","days":"Sun,Sat","must_charge_start":0,"must_charge_duration":0,"periods":[{"id":"period_1","start":0,"rate":"1"}]}]},{"id":"fall","start":"6/1","days":[{"id":"weekdays","days":"Mon,Tue,Wed,Thu,Fri","must_charge_start":0,"must_charge_duration":0,"periods":[{"id":"period_1","start":0,"rate":"1"}]},{"id":"weekend","days":"Sun,Sat","must_charge_start":0,"must_charge_duration":0,"periods":[{"id":"period_1","start":0,"rate":"1"}]}]},{"id":"winter","start":"9/1","days":[{"id":"weekdays","days":"Mon,Tue,Wed,Thu,Fri","must_charge_start":0,"must_charge_duration":0,"periods":[{"id":"period_1","start":0,"rate":"1"}]},{"id":"weekend","days":"Sun,Sat","must_charge_start":0,"must_charge_duration":0,"periods":[{"id":"period_1","start":0,"rate":"1"}]}]},{"id":"spring","start":"10/1","days":[{"id":"weekdays","days":"Mon,Tue,Wed,Thu,Fri","must_charge_start":0,"must_charge_duration":0,"periods":[{"id":"period_1","start":0,"rate":"1"}]},{"id":"weekend","days":"Sun,Sat","must_charge_start":0,"must_charge_duration":0,"periods":[{"id":"period_1","start":0,"rate":"1"}]}]}],"seasons_sell":[{"id":"all_year_long","start":"1/1","days":[{"id":"all_days","days":"Sun,Mon,Tue,Wed,Thu,Fri,Sat","must_charge_start":0,"must_charge_duration":0,"periods":[{"id":"period_1","start":0,"rate":"1"}]}]}]},"task":{"status":"pending","created_at":"2021-06-24T13:29:16Z"}}}},"401":{"description":"Unauthorized","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"401","message":["Not authorized to access requested resource.","API Key missing in url/headers!"]}}},"404":{"description":"Not found","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"404","message":["System not found"]}}},"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":{"reason":{"type":"string","description":"Response code"},"message":{"type":"array","items":{"type":"string","description":"Error Messages"}},"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":{"reason":"429","message":["Usage limit exceeded for plan Partner (custom)"],"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/partner/systems/{system_id}/arrays":{"get":{"summary":"Fetch particular system Array details","description":"Fetch particular system Array details","parameters":[{"name":"system_id","in":"path","type":"integer","description":"System ID","required":true}],"tags":["Arrays"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"system_id":{"type":"integer","description":"The system id"},"created_at":{"type":"integer","description":"System created Epoch time"},"updated_at":{"type":"integer","description":"System updated Epoch time"},"angle":{"type":"integer","description":"Angle of the system"},"arrays":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"id of the array"},"label":{"type":"string","description":"Name of the array"},"angle":{"type":"integer","description":"Angle of the array"},"tilt":{"type":"string","description":"Tilt of the array"},"reporting_envoys":{"type":"array","items":{"type":"string"},"description":"List of envoys serial numbers"},"provisioned_envoy":{"type":"string","description":"Provisioned envoy"},"updated_at":{"type":"integer","description":"Last updated Epoch time"},"left":{"type":"integer","description":"Left axis position of array"},"top":{"type":"integer","description":"Top axis position of array"},"modules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Id of the module"},"left":{"type":"integer","description":"Left axis position of module"},"top":{"type":"integer","description":"Top axis position of module"},"angle":{"type":"integer","description":"Angle of the module"},"serial_num":{"type":"string","description":"Inverter serial number mapped with this module"}}}}}}},"inventory":{"type":"array","items":{"type":"string"},"description":"List of active inverter serial numbers"},"inventory_details":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"Device type"},"count":{"type":"integer","description":"Device count"},"serialNum":{"type":"string","description":"Device Serial Number"}}}},"layers":{"type":"array","items":{"type":"object","properties":{"file":{"type":"string","description":"Background image url"},"scale":{"type":"integer","description":"Zoom level"},"angle":{"type":"integer","description":"Angle of the layer"},"opaciy":{"type":"integer","description":"Opacity of the layer"},"width":{"type":"integer","description":"Width of the layer"},"height":{"type":"integer","description":"Height of the layer"},"left":{"type":"integer","description":"Left of the layer"},"top":{"type":"integer","description":"Top of the layer"}}}}}},"examples":{"application/json":{"system_id":698927061,"created_at":1564385055,"updated_at":1567596211,"angle":null,"arrays":[{"id":207359,"label":"First","angle":0,"tilt":"30.0","reporting_envoys":["121625050638"],"provisioned_envoy":null,"updated_at":1500983465,"left":29,"top":-3,"modules":[{"id":4743704,"left":300,"top":202,"angle":0,"serial_num":"121501065212"}]}],"inventory":["121418008963","121338007327"],"inventory_details":[{"type":"Wireless Range Extender","count":1,"serialNum":"212323223351"},{"type":"M215","count":1,"serialNum":"222323223363"}],"layers":[{"file":"","scale":34,"angle":45,"opaciy":56,"width":80,"height":50,"left":40,"top":50}]}}},"401":{"description":"Unauthorized","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"401","message":["Not authorized to access requested resource.","API Key missing in url/headers!"]}}},"404":{"description":"Not found","schema":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"array","items":{"type":"string"}}}},"examples":{"application/json":{"reason":"404","message":["System not found"]}}},"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":{"reason":{"type":"string","description":"Response code"},"message":{"type":"array","items":{"type":"string","description":"Error Messages"}},"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":{"reason":"429","message":["Usage limit exceeded for plan Partner (custom)"],"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"]}}}}}}}}