> For the complete documentation index, see [llms.txt](https://docs.stellic.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stellic.com/stellic-partner-api/catalog-sections/replace-a-section-s-timings.md).

# Replace a section's timings

Use this endpoint when a section's meeting schedule changes. Send the complete schedule: it replaces the section's existing meetings in one step, and if anything fails, the existing schedule stays.

## PUT /catalog/section/timings/{id}

>

```json
{"openapi":"3.0.0","info":{"title":"Stellic for Developers","version":"1.0"},"tags":[{"name":"Catalog Sections"}],"servers":[{"url":"https://{institution}.stellic.com/partnerapi/v1","variables":{"institution":{"default":"{institution}","description":"Your institution's Stellic subdomain: the part before `.stellic.com` in the URL you use to sign in. It becomes the host in every request, as in `https://{institution}.stellic.com/partnerapi/v1/...`. Replace the `{institution}` placeholder with your subdomain before sending."}}}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Personal Access Token issued by your Stellic integration partner. Send it as `Authorization: Bearer <token>` on every request. One token per institution; do not share across environments."}},"schemas":{"UpdateSectionTimingsRequest":{"description":"Meetings that are identical after times, dates, and days are parsed are stored once. For example, otherwise identical meetings with `9:00` and `09:00` start times count as one meeting.","type":"array","items":{"$ref":"#/components/schemas/ClassTimingsWithListDays"}},"ClassTimingsWithListDays":{"type":"object","properties":{"start":{"description":"Start time as `HH:MM` (24-hour), or `TBA` or an empty string for TBA. An invalid time returns a 400 when `start_date` is neither missing nor `TBA`, on both timings endpoints.","type":"string"},"end":{"description":"End time as `HH:MM` (24-hour), or `TBA` or an empty string for TBA. An invalid time returns a 400 when `start_date` is neither missing nor `TBA`, on both timings endpoints.","type":"string"},"day":{"description":"A day can be a string or an array of names (each becomes its own row). `TBA`, an empty string, or an empty array means no weekday; an array can also contain `TBA`. Names are matched case-insensitively after surrounding whitespace is removed and stored lowercase. Unknown names return a 400.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"room":{"description":"Room in which class will be conducted","type":"string"},"building":{"description":"Name of the building where class will be conducted","type":"string"},"start_date":{"description":"Start date as `YYYY-MM-DD`, or `TBA`. If it's missing or `TBA`, the block's times, room, building, and end date are all treated as TBA on both timings endpoints. An unreadable start date returns a 400.","oneOf":[{"type":"string","format":"date"},{"type":"string","enum":["TBA"]}]},"end_date":{"description":"End date of the class timings if the timings are only for specific dates. An unreadable end date returns a 400 when `start_date` is neither missing nor `TBA`.","type":"string","format":"date"}},"required":["start","end","day","room","building"]},"UpdateSectionTimingsResponse":{"type":"object","properties":{"id":{"type":"string","description":"Catalog ID of the section."},"timings":{"type":"array","items":{"$ref":"#/components/schemas/UpdateSectionTimingsResponseTimingItem"}}}},"UpdateSectionTimingsResponseTimingItem":{"type":"object","description":"One grouped meeting block. Rows that share the same start time, end time, start date, and end date are collapsed under one entry with a `days` array, even when their rooms or buildings differ.","properties":{"time":{"type":"object","description":"Start and end of the meeting block. Times are returned in 12-hour format (for example `06:00PM`), not the 24-hour format used on the request, and as `TBA` when the block has no time.","properties":{"start":{"type":"string"},"end":{"type":"string"},"campus_timezone":{"type":"string","description":"Campus timezone abbreviation derived from the campus configuration; may be `null` if no timezone is configured."}}},"days":{"type":"array","description":"Lowercase weekday names that share this slot. May contain `TBA` for rows stored with a null weekday.","items":{"type":"string"}},"building":{"type":"string","description":"Building of the grouped rows. When the rows in a group have different buildings, only one of them is shown."},"room":{"type":"string","description":"Room of the grouped rows. When the rows in a group have different rooms, only one of them is shown."},"start_date":{"type":"string","format":"date","nullable":true},"end_date":{"type":"string","format":"date","nullable":true}}}}},"paths":{"/catalog/section/timings/{id}":{"put":{"tags":["Catalog Sections"],"parameters":[{"name":"id","in":"path","required":true,"description":"Catalog ID of the section.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSectionTimingsRequest"}}}},"responses":{"200":{"description":"Timings replaced in one transaction: the section's existing meetings are cleared and the new set is inserted, and if the insert fails the existing meetings stay. Concurrent requests for the same section run one at a time, so the last one to finish wins. The section's cached data and seat counts are cleared; catalog search updates in the background after the replacement. The response groups rows that share the same start time, end time, start date, and end date under a single entry with a `days` array (even when their rooms or buildings differ), and echoes times in 12-hour format with the campus timezone.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSectionTimingsResponse"}}}},"400":{"description":"Invalid timings or an ambiguous section ID. The section keeps its existing timings.\n\nThe listed message text appears in `errors[].message`, without an extra `['...']` wrapper.\n\nCommon causes:\n- Missing timing field among `start`, `end`, `day`, `room`, `building` - returns `{fields} fields are required for \"timings\" and were not found in request body`\n- One of those fields is null - returns `\"{field}\" is a required field and cannot be null`\n- Unknown day - returns `Invalid day: `{value}`. Expected a weekday name or `TBA``\n- Invalid time in a field that is parsed - returns `Invalid time format: `{value}`. Expected format is `HH:MM``\n- Invalid date in a field that is parsed - returns `Invalid date format: `{value}`. Expected format is `YYYY-MM-DD``\n- More than one section carries `{id}` - returns `Course section id {id} matches more than one section`\n\nWhen `start_date` is missing or `TBA`, the supplied `start`, `end`, and `end_date` values are ignored rather than parsed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"401":{"description":"Missing or invalid Bearer token."},"403":{"description":"Your IP address isn't on the allowlist for this endpoint. Contact Stellic to add it; the response includes the `client_ip` Stellic saw.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"client_ip":{"type":"string"}}}}}},"404":{"description":"Section not found.\n\nCommon causes:\n- Section not found - returns `Course section with id: {id} does not exist`"},"500":{"description":"Unhandled server error. The section keeps its existing timings."}}}}}}
```

#### What happens after the call

* The section's meetings are replaced right away. Pushes for the same section run one at a time, so the last one to finish wins.
* Enrollments aren't affected; only the meeting times change.
* Catalog search updates in the background after the meetings are replaced, so search can still show the old schedule when the call returns.

#### Notes

{% hint style="warning" %}
**This is a replace, not a merge.** A meeting you leave out is removed, and an empty list clears the section's schedule.
{% endhint %}

* **Send `start_date` with every dated meeting.** If it's missing or "TBA", the meeting's times, end date, room, and building are all stored as TBA, whatever you send.
* If a timing is rejected, correct it and resend the complete schedule rather than sending only the corrected meeting.
* **Meetings at the same time in different rooms come back as one entry.** The response groups meetings by time and dates and shows one room; every meeting is still stored.

#### Related APIs

* [`PUT /catalog/section/timings/bulk`](/stellic-partner-api/catalog-sections/bulk-replace-timings-for-multiple-sections.md) to replace schedules on many sections.
* [`POST /catalog/section/{id}`](/stellic-partner-api/catalog-sections/create-a-catalog-section.md) to create a section.
* [`PUT /catalog/section/{id}`](/stellic-partner-api/catalog-sections/update-section-enrollment-caps.md) to update its seat counts.
