> For the complete documentation index, see [llms.txt](https://docs.xibosignage.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xibosignage.com/developer/integrate/openapi/day-part.md).

# Day Part

Dayparting

## Daypart Search

> Search dayparts

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"dayPart","description":"Dayparting"}],"servers":[{"url":"/api"}],"paths":{"/daypart":{"get":{"tags":["dayPart"],"summary":"Daypart Search","description":"Search dayparts","operationId":"dayPartSearch","parameters":[{"name":"dayPartId","in":"query","description":"The dayPart ID to Search","required":false,"schema":{"type":"integer"}},{"name":"name","in":"query","description":"The name of the dayPart to Search","required":false,"schema":{"type":"string"}},{"name":"embed","in":"query","description":"Embed related data such as exceptions","required":false,"schema":{"type":"string"}},{"name":"sortBy","in":"query","description":"Specifies which field the results are sorted by. Used together with sortDir","required":false,"schema":{"type":"string","enum":["dayPartId","name","startTime","endTime","description"]}},{"name":"sortDir","in":"query","description":"Sort direction","required":false,"schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DayPart"}}}}}}}}},"components":{"schemas":{"DayPart":{"description":"Class DayPart","properties":{"dayPartId":{"description":"The ID of this Daypart","type":"integer"},"isAlways":{"description":"A readonly flag determining whether this DayPart is always","type":"integer"},"isCustom":{"description":"A readonly flag determining whether this DayPart is custom","type":"integer"}},"type":"object"}}}}
```

## Daypart Add

> Add a Daypart

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"dayPart","description":"Dayparting"}],"servers":[{"url":"/api"}],"paths":{"/daypart":{"post":{"tags":["dayPart"],"summary":"Daypart Add","description":"Add a Daypart","operationId":"dayPartAdd","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"required":["name","startTime","endTime"],"properties":{"name":{"description":"The Daypart Name","type":"string"},"description":{"description":"A description for the dayPart","type":"string"},"startTime":{"description":"The start time for this day part","type":"string"},"endTime":{"description":"The end time for this day part","type":"string"},"exceptionDays":{"description":"String array of exception days","type":"array","items":{"type":"string"}},"exceptionStartTimes":{"description":"String array of exception start times to match the exception days","type":"array","items":{"type":"string"}},"exceptionEndTimes":{"description":"String array of exception end times to match the exception days","type":"array","items":{"type":"string"}}},"type":"object"}}}},"responses":{"201":{"description":"successful operation","headers":{"Location":{"description":"Location of the new record","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DayPart"}}}}}}}},"components":{"schemas":{"DayPart":{"description":"Class DayPart","properties":{"dayPartId":{"description":"The ID of this Daypart","type":"integer"},"isAlways":{"description":"A readonly flag determining whether this DayPart is always","type":"integer"},"isCustom":{"description":"A readonly flag determining whether this DayPart is custom","type":"integer"}},"type":"object"}}}}
```

## Daypart Search by ID

> Get the DayPart object specified by the provided daypartId

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"dayPart","description":"Dayparting"}],"servers":[{"url":"/api"}],"paths":{"/daypart/{dayPartId}":{"get":{"tags":["dayPart"],"summary":"Daypart Search by ID","description":"Get the DayPart object specified by the provided daypartId","operationId":"dayPartSearchById","parameters":[{"name":"dayPartId","in":"path","description":"Numeric ID of the DayPart to get","required":true,"schema":{"type":"integer"}},{"name":"embed","in":"query","description":"Embed related data such as exceptions","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DayPart"}}}}}}}},"components":{"schemas":{"DayPart":{"description":"Class DayPart","properties":{"dayPartId":{"description":"The ID of this Daypart","type":"integer"},"isAlways":{"description":"A readonly flag determining whether this DayPart is always","type":"integer"},"isCustom":{"description":"A readonly flag determining whether this DayPart is custom","type":"integer"}},"type":"object"}}}}
```

## Daypart Edit

> Edit a Daypart

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"dayPart","description":"Dayparting"}],"servers":[{"url":"/api"}],"paths":{"/daypart/{dayPartId}":{"put":{"tags":["dayPart"],"summary":"Daypart Edit","description":"Edit a Daypart","operationId":"dayPartEdit","parameters":[{"name":"dayPartId","in":"path","description":"The Daypart Id","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"required":["name","startTime","endTime"],"properties":{"name":{"description":"The Daypart Name","type":"string"},"description":{"description":"A description for the dayPart","type":"string"},"startTime":{"description":"The start time for this day part","type":"string"},"endTime":{"description":"The end time for this day part","type":"string"},"exceptionDays":{"description":"String array of exception days","type":"array","items":{"type":"string"}},"exceptionStartTimes":{"description":"String array of exception start times to match the exception days","type":"array","items":{"type":"string"}},"exceptionEndTimes":{"description":"String array of exception end times to match the exception days","type":"array","items":{"type":"string"}}},"type":"object"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DayPart"}}}}}}}},"components":{"schemas":{"DayPart":{"description":"Class DayPart","properties":{"dayPartId":{"description":"The ID of this Daypart","type":"integer"},"isAlways":{"description":"A readonly flag determining whether this DayPart is always","type":"integer"},"isCustom":{"description":"A readonly flag determining whether this DayPart is custom","type":"integer"}},"type":"object"}}}}
```

## Delete DayPart

> Delete the provided dayPart

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"dayPart","description":"Dayparting"}],"servers":[{"url":"/api"}],"paths":{"/daypart/{dayPartId}":{"delete":{"tags":["dayPart"],"summary":"Delete DayPart","description":"Delete the provided dayPart","operationId":"dayPartDelete","parameters":[{"name":"dayPartId","in":"path","description":"The Daypart Id to Delete","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"successful operation"}}}}}}
```


---

# 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://docs.xibosignage.com/developer/integrate/openapi/day-part.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.
