# 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 |
| --- | --- | --- | --- |
| `resource_id` | string | yes | The resource id. |
| `availability_schedule` | ScheduleIntervalDto[] | no | Availability schedule entries to merge. |
| `curtailment_schedule` | ScheduleIntervalDto[] | 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"
```

### Python

```python
import requests

response = requests.patch(
    "https://api.solcast.com.au/manage/schedules",
    headers={"Authorization": "Bearer API_KEY"},
)
data = response.json()
```

## Example response (200)

```json
{
  "response_status": {
    "error_code": "string",
    "message": "string",
    "stack_trace": "string",
    "errors": [
      {
        "error_code": null,
        "field_name": null,
        "message": null,
        "meta": null
      }
    ],
    "meta": {}
  }
}
```

## Responses

### 200 — OK

Schema: `PatchResourceScheduleResponse`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `response_status` | string | no |  |

Source: /docs/section/premium#patchManageSchedules
