Set whether to allow charging from the grid
<p><strong>Brief Description:</strong> </p>
<ul>
<li>Set whether to allow charging from the grid of the device based on the device type noah and the SN of the device, and the data returned by the interface only returns the device setting result for which the key token has permission to access, and the device without permission will not be set and will not return the result</li>
<li>'Device Type' is the deviceType parameter in the API for obtaining the device list. `</li>
<li>'Current interface frequency 5S once'</li>
<li>Note: Currently, Only supports noah type devices to set whether to allow charging from the power grid. `</li>
</ul>
<p><strong>Request URL:</strong> </p>
<ul>
<li><code>http(s)://openapi.growatt.com/v4/new-api/setGridCharge</code></li>
</ul>
<p><strong>Request method:</strong></p>
<ul>
<li>POST </li>
</ul>
<p><strong>Content-Type:</strong></p>
<ul>
<li>application/x-www-form-urlencoded </li>
</ul>
<p>Http Header Parameters and Description: </p>
<table>
<thead>
<tr>
<th style="text-align: left;">Parameter Name</th>
<th style="text-align: left;">Required</th>
<th style="text-align: left;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;">Yes</td>
<td style="text-align: left;">String</td>
<td>keytoken</td>
</tr>
</tbody>
</table>
<p>Http body parameters and description: </p>
<table>
<thead>
<tr>
<th style="text-align: left;">Parameter Name</th>
<th style="text-align: left;">Required</th>
<th style="text-align: left;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">deviceSn</td>
<td style="text-align: left;">is</td>
<td style="text-align: left;">string</td>
<td>device SN, example: xxxxxxx</td>
</tr>
<tr>
<td style="text-align: left;">deviceType</td>
<td style="text-align: left;">yes</td>
<td style="text-align: left;">string</td>
<td>[Equipment type](<a href="https://www.showdoc.com.cn/p/e9f6e73f251e6364fe1d43e9d4cc1eec">https://www.showdoc.com.cn/p/e9f6e73f251e6364fe1d43e9d4cc1eec</a> "Equipment type")</td>
</tr>
<tr>
<td style="text-align: left;">value</td>
<td style="text-align: left;">yes</td>
<td style="text-align: left;">int</td>
<td>Set whether to allow charging from the grid, 1:allow,0:not allow. example: 1. Note: This API is only applicable to NOAH device types (the lower limit cannot exceed the upper limit).</td>
</tr>
</tbody>
</table>
<p><strong>Call Example</strong></p>
<pre><code>{
&quot;deviceSn&quot;: &quot;FDCJQ00003&quot;,
&quot;deviceType&quot;: &quot;noah&quot;,
&quot;value&quot;: &quot;1&quot;
}</code></pre>
<p><strong>Example of Return</strong></p>
<p>The setup was successful</p>
<pre><code> {
&quot;code&quot;: 0,
&quot;data&quot;: null,
&quot;message&quot;: &quot;PARAMETER_SETTING_SUCCESSFUL&quot;
}
</code></pre>