> For the complete documentation index, see [llms.txt](https://renewables.docs.helinplatform.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://renewables.docs.helinplatform.com/api-reference/schedules.md).

# Schedules

## Schedule List

> Get Management Schedule for all sites active today.\
> \
> Returns:\
> &#x20;   Schedules active today.

```json
{"openapi":"3.0.3","info":{"title":"POLARIS Curtailment API","version":"0.1"},"security":[{"Auth0HTTPBearer":[]}],"components":{"securitySchemes":{"Auth0HTTPBearer":{"scheme":"bearer","type":"http"}},"schemas":{"SiteScheduleSchema":{"properties":{"category":{"title":"Category","type":"string"},"id":{"format":"uuid","title":"Id","type":"string"},"schedule":{"additionalProperties":{"nullable":true,"type":"number"},"title":"Schedule","type":"object"},"site_id":{"format":"uuid","title":"Site Id","type":"string"},"synchronization_result":{"additionalProperties":{"type":"string"},"nullable":true,"title":"Synchronization Result","type":"object"},"valid_on":{"format":"date","title":"Valid On","type":"string"}},"required":["category","valid_on","schedule","id","site_id","synchronization_result"],"title":"SiteScheduleSchema","type":"object"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/schedules":{"get":{"description":"Get Management Schedule for all sites active today.\n\nReturns:\n    Schedules active today.","operationId":"Schedule_list_api_schedules_get","parameters":[{"in":"header","name":"X-Management-Token","required":false,"schema":{"nullable":true,"title":"X-Management-Token","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SiteScheduleSchema"},"title":"Response Schedule List Api Schedules Get","type":"array"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Schedule List","tags":["schedules"]}}}}
```

## Schedule Create Or Update

> Create Management Schedule.\
> \
> Args:\
> &#x20;   site\_id: Site ID\
> &#x20;   valid\_on: Date in Y-m-d format\
> &#x20;   category: Device Category this schedule should be applied to\
> &#x20;   schedule: Time to value mapping in 15 minute intervals.\
> &#x20;             Example: \`{"12:00": 33.0}\`.\
> \
> Returns:\
> &#x20;   Created or updated Management Schedule.

```json
{"openapi":"3.0.3","info":{"title":"POLARIS Curtailment API","version":"0.1"},"security":[{"Auth0HTTPBearer":[]}],"components":{"securitySchemes":{"Auth0HTTPBearer":{"scheme":"bearer","type":"http"}},"schemas":{"SiteScheduleCreateSchema":{"properties":{"category":{"title":"Category","type":"string"},"schedule":{"additionalProperties":{"nullable":true,"type":"number"},"title":"Schedule","type":"object"},"site_id":{"format":"uuid","title":"Site Id","type":"string"},"valid_on":{"format":"date","title":"Valid On","type":"string"}},"required":["category","valid_on","schedule","site_id"],"title":"SiteScheduleCreateSchema","type":"object"},"SiteScheduleSchema":{"properties":{"category":{"title":"Category","type":"string"},"id":{"format":"uuid","title":"Id","type":"string"},"schedule":{"additionalProperties":{"nullable":true,"type":"number"},"title":"Schedule","type":"object"},"site_id":{"format":"uuid","title":"Site Id","type":"string"},"synchronization_result":{"additionalProperties":{"type":"string"},"nullable":true,"title":"Synchronization Result","type":"object"},"valid_on":{"format":"date","title":"Valid On","type":"string"}},"required":["category","valid_on","schedule","id","site_id","synchronization_result"],"title":"SiteScheduleSchema","type":"object"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/schedules":{"post":{"description":"Create Management Schedule.\n\nArgs:\n    site_id: Site ID\n    valid_on: Date in Y-m-d format\n    category: Device Category this schedule should be applied to\n    schedule: Time to value mapping in 15 minute intervals.\n              Example: `{\"12:00\": 33.0}`.\n\nReturns:\n    Created or updated Management Schedule.","operationId":"Schedule_Create_or_Update_api_schedules_post","parameters":[{"in":"query","name":"site_id","required":false,"schema":{"format":"uuid","nullable":true,"title":"Site Id","type":"string"}},{"in":"header","name":"X-Management-Token","required":false,"schema":{"nullable":true,"title":"X-Management-Token","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteScheduleCreateSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteScheduleSchema"}}},"description":"Successful Response"},"404":{"content":{"application/json":{"schema":{"properties":{"detail":{"items":{"type":"string"},"title":"Detail","type":"array"}},"title":"Object not found","type":"object"}}},"description":"Object not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Schedule Create Or Update","tags":["schedules"]}}}}
```

## Schedule Delete

> Delete Management Schedule on a given date by clearing schedule.\
> \
> Returns:\
> &#x20;   Empty schedule and status of synchronization to edge.

```json
{"openapi":"3.0.3","info":{"title":"POLARIS Curtailment API","version":"0.1"},"security":[{"Auth0HTTPBearer":[]}],"components":{"securitySchemes":{"Auth0HTTPBearer":{"scheme":"bearer","type":"http"}},"schemas":{"SiteScheduleDeleteSchema":{"properties":{"schedule":{"additionalProperties":{"nullable":true,"type":"number"},"title":"Schedule","type":"object"},"synchronization_result":{"additionalProperties":{"type":"string"},"title":"Synchronization Result","type":"object"}},"required":["schedule","synchronization_result"],"title":"SiteScheduleDeleteSchema","type":"object"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/schedules/{schedule_id}":{"delete":{"description":"Delete Management Schedule on a given date by clearing schedule.\n\nReturns:\n    Empty schedule and status of synchronization to edge.","operationId":"Schedule_Delete_api_schedules__schedule_id__delete","parameters":[{"in":"path","name":"schedule_id","required":true,"schema":{"format":"uuid","title":"Schedule Id","type":"string"}},{"in":"header","name":"X-Management-Token","required":false,"schema":{"nullable":true,"title":"X-Management-Token","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteScheduleDeleteSchema"}}},"description":"Successful Response"},"404":{"content":{"application/json":{"schema":{"properties":{"detail":{"items":{"type":"string"},"title":"Detail","type":"array"}},"title":"Object not found","type":"object"}}},"description":"Object not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Schedule Delete","tags":["schedules"]}}}}
```

## Schedule On Date

> List Management Schedules valid on a given date.\
> \
> Args:\
> &#x20;   valid\_on: Date in Y-m-d format\
> \
> Returns:\
> &#x20;   Schedules active on a given date.

```json
{"openapi":"3.0.3","info":{"title":"POLARIS Curtailment API","version":"0.1"},"security":[{"Auth0HTTPBearer":[]}],"components":{"securitySchemes":{"Auth0HTTPBearer":{"scheme":"bearer","type":"http"}},"schemas":{"SiteScheduleSchema":{"properties":{"category":{"title":"Category","type":"string"},"id":{"format":"uuid","title":"Id","type":"string"},"schedule":{"additionalProperties":{"nullable":true,"type":"number"},"title":"Schedule","type":"object"},"site_id":{"format":"uuid","title":"Site Id","type":"string"},"synchronization_result":{"additionalProperties":{"type":"string"},"nullable":true,"title":"Synchronization Result","type":"object"},"valid_on":{"format":"date","title":"Valid On","type":"string"}},"required":["category","valid_on","schedule","id","site_id","synchronization_result"],"title":"SiteScheduleSchema","type":"object"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/schedules/{valid_on}":{"get":{"description":"List Management Schedules valid on a given date.\n\nArgs:\n    valid_on: Date in Y-m-d format\n\nReturns:\n    Schedules active on a given date.","operationId":"Schedule_on_date_api_schedules__valid_on__get","parameters":[{"in":"path","name":"valid_on","required":true,"schema":{"format":"date","title":"Valid On","type":"string"}},{"in":"header","name":"X-Management-Token","required":false,"schema":{"nullable":true,"title":"X-Management-Token","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SiteScheduleSchema"},"title":"Response Schedule On Date Api Schedules  Valid On  Get","type":"array"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Schedule On Date","tags":["schedules"]}}}}
```

## Schedule Update

> Create Management Schedule.\
> \
> Args:\
> &#x20;   valid\_from: Date in Y-m-d format\
> &#x20;   category: Device Category this schedule should be applied to\
> &#x20;   schedule: Time to value mapping in 15 minute intervals.\
> &#x20;             Example: \`{"12:00": 33.0}\`.\
> \
> Returns:\
> &#x20;   Updated schedule.

```json
{"openapi":"3.0.3","info":{"title":"POLARIS Curtailment API","version":"0.1"},"security":[{"Auth0HTTPBearer":[]}],"components":{"securitySchemes":{"Auth0HTTPBearer":{"scheme":"bearer","type":"http"}},"schemas":{"SiteScheduleUpdateSchema":{"properties":{"schedule":{"additionalProperties":{"nullable":true,"type":"number"},"title":"Schedule","type":"object"},"site_id":{"format":"uuid","title":"Site Id","type":"string"}},"required":["site_id","schedule"],"title":"SiteScheduleUpdateSchema","type":"object"},"SiteScheduleSchema":{"properties":{"category":{"title":"Category","type":"string"},"id":{"format":"uuid","title":"Id","type":"string"},"schedule":{"additionalProperties":{"nullable":true,"type":"number"},"title":"Schedule","type":"object"},"site_id":{"format":"uuid","title":"Site Id","type":"string"},"synchronization_result":{"additionalProperties":{"type":"string"},"nullable":true,"title":"Synchronization Result","type":"object"},"valid_on":{"format":"date","title":"Valid On","type":"string"}},"required":["category","valid_on","schedule","id","site_id","synchronization_result"],"title":"SiteScheduleSchema","type":"object"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/schedules/{valid_on}/{category}":{"put":{"description":"Create Management Schedule.\n\nArgs:\n    valid_from: Date in Y-m-d format\n    category: Device Category this schedule should be applied to\n    schedule: Time to value mapping in 15 minute intervals.\n              Example: `{\"12:00\": 33.0}`.\n\nReturns:\n    Updated schedule.","operationId":"Schedule_Update_api_schedules__valid_on___category__put","parameters":[{"in":"path","name":"valid_on","required":true,"schema":{"format":"date","title":"Valid On","type":"string"}},{"in":"path","name":"category","required":true,"schema":{"title":"Category","type":"string"}},{"in":"query","name":"site_id","required":false,"schema":{"format":"uuid","nullable":true,"title":"Site Id","type":"string"}},{"in":"header","name":"X-Management-Token","required":false,"schema":{"nullable":true,"title":"X-Management-Token","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteScheduleUpdateSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteScheduleSchema"}}},"description":"Successful Response"},"404":{"content":{"application/json":{"schema":{"properties":{"detail":{"items":{"type":"string"},"title":"Detail","type":"array"}},"title":"Object not found","type":"object"}}},"description":"Object not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Schedule Update","tags":["schedules"]}}}}
```

## Site Schedules

> Get Management Schedule for site.\
> \
> Returns:\
> &#x20;   Schedules active today.

```json
{"openapi":"3.0.3","info":{"title":"POLARIS Curtailment API","version":"0.1"},"paths":{"/sites/{site_id}/schedules":{"get":{"description":"Get Management Schedule for site.\n\nReturns:\n    Schedules active today.","operationId":"Site_Schedules_api_sites__site_id__schedules_get","parameters":[{"in":"path","name":"site_id","required":true,"schema":{"format":"uuid","title":"Site Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SiteScheduleSchema"},"title":"Response Site Schedules Api Sites  Site Id  Schedules Get","type":"array"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Site Schedules","tags":["schedules"]}}},"components":{"schemas":{"SiteScheduleSchema":{"properties":{"category":{"title":"Category","type":"string"},"id":{"format":"uuid","title":"Id","type":"string"},"schedule":{"additionalProperties":{"nullable":true,"type":"number"},"title":"Schedule","type":"object"},"site_id":{"format":"uuid","title":"Site Id","type":"string"},"synchronization_result":{"additionalProperties":{"type":"string"},"nullable":true,"title":"Synchronization Result","type":"object"},"valid_on":{"format":"date","title":"Valid On","type":"string"}},"required":["category","valid_on","schedule","id","site_id","synchronization_result"],"title":"SiteScheduleSchema","type":"object"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}}}
```

## Site Schedules For Date

> Get Management Schedule for site on a given date.\
> \
> Returns:\
> &#x20;   Schedules active on a given date.

```json
{"openapi":"3.0.3","info":{"title":"POLARIS Curtailment API","version":"0.1"},"paths":{"/sites/{site_id}/schedules/{valid_on}":{"get":{"description":"Get Management Schedule for site on a given date.\n\nReturns:\n    Schedules active on a given date.","operationId":"Site_Schedules_for_date_api_sites__site_id__schedules__valid_on__get","parameters":[{"in":"path","name":"site_id","required":true,"schema":{"format":"uuid","title":"Site Id","type":"string"}},{"in":"path","name":"valid_on","required":true,"schema":{"format":"date","title":"Valid On","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SiteScheduleSchema"},"title":"Response Site Schedules For Date Api Sites  Site Id  Schedules  Valid On  Get","type":"array"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Site Schedules For Date","tags":["schedules"]}}},"components":{"schemas":{"SiteScheduleSchema":{"properties":{"category":{"title":"Category","type":"string"},"id":{"format":"uuid","title":"Id","type":"string"},"schedule":{"additionalProperties":{"nullable":true,"type":"number"},"title":"Schedule","type":"object"},"site_id":{"format":"uuid","title":"Site Id","type":"string"},"synchronization_result":{"additionalProperties":{"type":"string"},"nullable":true,"title":"Synchronization Result","type":"object"},"valid_on":{"format":"date","title":"Valid On","type":"string"}},"required":["category","valid_on","schedule","id","site_id","synchronization_result"],"title":"SiteScheduleSchema","type":"object"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://renewables.docs.helinplatform.com/api-reference/schedules.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
