> 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-constraint.md).

# Replace a section constraint

Use this endpoint to correct a section constraint: change its requirement group, action, section, note, or dates. It replaces the whole record, so read it with [`GET /catalog/section/constraint/{sis_id}`](/stellic-partner-api/catalog-sections/read-a-section-constraint.md), change what you need, and send the result back. As with `POST`, add the correction to your data sync before the next sync, which removes constraints it doesn't carry.

## PUT /catalog/section/constraint/{sis\_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":{"SectionConstraintRequest":{"type":"object","description":"Writable fields of a section constraint. Mirrors a schedule feed constraint row minus `section_constraint_id`, which the URL carries.","required":["section_id"],"properties":{"section_id":{"type":"string","description":"Catalog ID (`uni_id`) of the section the constraint applies to. Must match exactly one section."},"requirement_id":{"type":"string","default":"","description":"Identifier of a requirement group already ingested from your schedule feed's constraint rows. Blank or omitted creates a record with no requirement group; only one record without a group per section and action is allowed. A group the platform has not ingested returns 400."},"action":{"type":"string","default":"show","enum":["add","change_credit","change_grading_option","department_consent","disallow_drop","disallow_register","drop","full_refund","hide","instructor_consent","late_add","late_drop","reserved_seats","show","warn","withdraw"],"description":"Action the constraint applies. Use `reserved_seats`; the feed spelling `reserve_seats` is rejected."},"note":{"type":"string","default":"","description":"Free text stored with the record, kept exactly as sent (whitespace included)."},"start_timestamp":{"type":"string","nullable":true,"description":"`YYYY-MM-DD` (read as midnight UTC) or an ISO-8601 timestamp. `null`, an empty string, or omission stores no start."},"end_timestamp":{"type":"string","nullable":true,"description":"`YYYY-MM-DD` (read as midnight UTC) or an ISO-8601 timestamp. `null`, an empty string, or omission stores no end."}}},"SectionConstraintResponse":{"type":"object","description":"A section constraint record.","properties":{"sis_id":{"type":"string","description":"The record's identifier (the `{sis_id}` in the URL)."},"section_id":{"type":"string","description":"Catalog ID (`uni_id`) of the section the constraint applies to."},"requirement_id":{"type":"string","description":"Requirement group identifier, or an empty string when the record has no requirement group."},"action":{"type":"string","description":"Action the constraint applies."},"note":{"type":"string","description":"Free text stored with the record; an empty string when none was sent."},"start_timestamp":{"type":"string","format":"date-time","nullable":true,"description":"ISO-8601 timestamp in UTC (for example `2025-12-02T00:00:00Z`), or `null`."},"end_timestamp":{"type":"string","format":"date-time","nullable":true,"description":"ISO-8601 timestamp in UTC (for example `2026-01-15T00:00:00Z`), or `null`."}}},"SectionConstraintValidationError":{"type":"object","description":"Error body for 400 responses on the section constraint endpoints. Keys are field names (`section_id`, `requirement_id`, `action`, `note`, `start_timestamp`, `end_timestamp`, or `sis_id`), or `non_field_errors` when the body isn't a JSON object; each value is a list of messages.","additionalProperties":{"type":"array","items":{"type":"string"}}},"SectionConstraintErrorDetail":{"type":"object","description":"Error body for 404 and 409 responses on the section constraint endpoints.","properties":{"detail":{"type":"string","description":"Human-readable reason."}}}}},"paths":{"/catalog/section/constraint/{sis_id}":{"put":{"tags":["Catalog Sections"],"parameters":[{"name":"sis_id","in":"path","required":true,"description":"Identifier of the constraint record to replace: the `section_constraint_id` your schedule feed carries for feed-loaded records, or the value you chose on POST. The identifier itself cannot be changed here.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SectionConstraintRequest"}}}},"responses":{"200":{"description":"Constraint replaced. Every writable field now reflects the body; optional fields you omitted are reset to their defaults, and omitting `requirement_id` removes the requirement group.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SectionConstraintResponse"}}}},"400":{"description":"Validation failure. The body is an object keyed by field name; each value is a list of messages. Nothing is written.\n\nCommon causes:\n- `section_id` missing: returns `This field is required.`\n- `section_id` unknown: returns `No course section found for id {section_id}`\n- `section_id` shared by more than one section: returns `Course section id {section_id} matches more than one section`\n- `requirement_id` not yet ingested from your schedule feed: returns `No ingested requirement found for id {requirement_id}`\n- `action` outside the accepted list, including the feed spelling `reserve_seats`\n- `start_timestamp` or `end_timestamp` not `YYYY-MM-DD` or ISO-8601\n- `requirement_id` or `note` sent as `null`: returns `This field may not be null.`\n- Body is not a JSON object: returns `Invalid data. Expected a dictionary, but got {type}.` under the `non_field_errors` key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SectionConstraintValidationError"}}}},"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":"No constraint record matches `{sis_id}`.\n\nCommon causes:\n- Unknown `{sis_id}`: returns `No section constraint found for sis_id {sis_id}`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SectionConstraintErrorDetail"}}}},"409":{"description":"The replacement would collide with another record, or `{sis_id}` is ambiguous. Nothing is written.\n\nCommon causes:\n- Another record already pairs the requested section, action, and requirement group: returns `A section constraint already exists on section {section_id} with action {action} and requirement_id {requirement_id}`\n- Duplicate identifiers in your schedule feed: returns `sis_id {sis_id} matches {count} section constraints`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SectionConstraintErrorDetail"}}}}}}}}}
```

#### What happens after the call

* Every field is replaced right away. Omitted fields return to their defaults, and omitting `requirement_id` removes the requirement group.
* If the requirement group changed, or its rules changed in your data sync since the constraint was written, the constraint's copy of the rules is rebuilt.
* A `reserved_seats` change applies from the next seat-availability check.

#### Notes

* **Omitted fields are reset.** Sending only `section_id` clears the action, note, dates, and requirement group.
* **`{sis_id}` can't be changed here.** To rename a constraint, delete it and create it again under the new identifier.
* **The pairing rule still applies.** A change that would pair the same section, action, and requirement group as another constraint returns a 409 and nothing is saved.

#### Related APIs

* [`GET /catalog/section/constraint/{sis_id}`](/stellic-partner-api/catalog-sections/read-a-section-constraint.md) to read the constraint first.
* [`POST /catalog/section/constraint/{sis_id}`](/stellic-partner-api/catalog-sections/create-a-section-constraint.md) for the field rules this endpoint shares.
* [`DELETE /catalog/section/constraint/{sis_id}`](/stellic-partner-api/catalog-sections/remove-a-section-constraint.md) to remove a constraint.
