# Patch Schedule Intervals

`PATCH /manage/schedules`

Merge new availability and/or curtailment schedule intervals into the existing stored schedule for a premium resource. Overlapping intervals are replaced (existing intervals are split as needed). The request is all-or-nothing: a validation error in any entry rejects the entire request.

## Request Body

| Name | Type | Required | Description | Accepted Values |
| --- | --- | --- | --- | --- |
| `resource_id` | string | yes | The resource id. |  |
| `availability_schedule` | AvailabilityIntervalDto[] | no | Availability schedule entries to merge. |  |
| `curtailment_schedule` | CurtailmentIntervalDto[] | no | Curtailment schedule entries to merge. |  |

## Example request

### cURL

```bash
curl -X PATCH "https://api.solcast.com.au/manage/schedules" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "resource_id": "0000-0000-0000-0000",
  "availability_schedule": [
    {
      "period_start": "2026-01-01T00:00:00.0000000Z",
      "period_end": "2026-01-01T00:05:00.0000000Z",
      "availability": 100
    }
  ]
}'
```

### Python

```python
import requests

response = requests.patch(
    "https://api.solcast.com.au/manage/schedules",
    json={
        "resource_id": "0000-0000-0000-0000",
        "availability_schedule": [
            {
                "period_start": "2026-01-01T00:00:00.0000000Z",
                "period_end": "2026-01-01T00:05:00.0000000Z",
                "availability": 100
            }
        ]
    },
    headers={"Authorization": "Bearer API_KEY"},
)
data = response.json()
```

## Example response (200)

```json
{}
```

## Responses

### 200 — OK

Schema: `PatchResourceScheduleResponse`

| Field | Type | Required | Description |
| --- | --- | --- | --- |

Source: /docs/section/premium#patchManageSchedules
