# Create Sub-Unit Site Measurements

`POST /resources/pv_power_site_measurements/sub_units`

Submit sub-unit measurement data for a Premium PV Power site. A sub-unit represents a subsection of the site, such as an individual inverter or a subset of inverters. Each measurement must include a 'sub_unit' label. Maximum 1000 measurements per request. Power units (AC) are measured in MW.

## Request Body

| Name | Type | Required | Description | Accepted Values |
| --- | --- | --- | --- | --- |
| `resource_id` | string | yes | The unique identifier of the Premium PV Power resource. |  |
| `measurements` | PvSubUnitSiteMeasurementRequest[] | no | List of sub-unit measurement records (1-1000). |  |

## Example request

### cURL

```bash
curl -X POST "https://api.solcast.com.au/resources/pv_power_site_measurements/sub_units" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "measurements": [
    {
      "period": "PT5M",
      "period_end": "2026-01-01T00:05:00.0000000Z",
      "period_start": "2026-01-01T00:00:00.0000000Z",
      "power": 1,
      "sub_unit": "inverter_1"
    }
  ],
  "resource_id": "0000-0000-0000-0000"
}'
```

### Python

```python
import requests

response = requests.post(
    "https://api.solcast.com.au/resources/pv_power_site_measurements/sub_units",
    json={
        "measurements": [
            {
                "period": "PT5M",
                "period_end": "2026-01-01T00:05:00.0000000Z",
                "period_start": "2026-01-01T00:00:00.0000000Z",
                "power": 1,
                "sub_unit": "inverter_1"
            }
        ],
        "resource_id": "0000-0000-0000-0000"
    },
    headers={"Authorization": "Bearer API_KEY"},
)
data = response.json()
```

## Example response (200)

```json
{
  "resource_id": "0000-0000-0000-0000",
  "accepted": 42
}
```

## Responses

### 200 — OK

Schema: `CreateSiteMeasurementsResponse`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `accepted` | integer (int32) | no |  |
| `resource_id` | string | no |  |

Source: /docs/section/premium#postResourcesPvPowerSiteMeasurementsSubUnits
