> 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/registration/create-a-registration-time-ticket.md).

# Create a registration time ticket

Use this endpoint to give a student a registration window for a term. The ticket lets the student register in Stellic from `timestamp` until `end_timestamp` (or with no end, if you leave it out). Tickets apply only at institutions that register students in Stellic, and only while the term's registration mode matches `registration_type`. `{registration_time_id}` is your identifier for the ticket.

## POST /planner/registration/registration\_time/{registration\_time\_id}

>

```json
{"openapi":"3.0.0","info":{"title":"Stellic for Developers","version":"1.0"},"tags":[{"name":"Registration"}],"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":{"RegistrationTimeRequestPost":{"type":"object","properties":{"student_username":{"type":"string","description":"The student's username, matched exactly."},"registration_type":{"type":"string","enum":["registration","shopping_cart","preregistration"],"description":"The registration mode the ticket applies to. Defaults to `registration`; an unknown value returns 400. The ticket is used only while the term's active mode matches."},"timestamp":{"type":"string","description":"When the window opens, in UTC, as `YYYY-MM-DD HH:MM`. Other formats return 400."},"end_timestamp":{"type":"string","description":"When the window closes, in UTC, as `YYYY-MM-DD HH:MM`. Leave it out for a window with no end; `null` returns a 500."},"semester":{"type":"string","description":"The semester name, for example `fall`. It must exist even when `term` matches; it's used to find the term only when `term` doesn't."},"year":{"type":"integer","description":"The term's year. Used with `semester` only when `term` doesn't match a term."},"term":{"type":"string","description":"The term's SIS term code. If it doesn't match a term, `semester` and `year` are used."}},"required":["term","student_username","timestamp","semester","year"]},"RegistrationTimeResponse":{"type":"object","properties":{"registration_time_id":{"type":"string"},"registration_type":{"type":"string"},"timestamp":{"type":"string","description":"When the window opens, in UTC."},"end_timestamp":{"type":"string","nullable":true,"description":"When the window closes, in UTC, or `null` for a window with no end."},"student":{"type":"string","description":"Username of the student the ticket belongs to."},"usem":{"type":"object","properties":{"semester":{"type":"string"},"year":{"type":"integer"}}},"enrollment_levels":{"type":"array","description":"Enrollment levels the ticket is scoped to; empty when it applies to all levels.","items":{"type":"object","properties":{"name":{"type":"string"},"display_name":{"type":"string"}}}}}}}},"paths":{"/planner/registration/registration_time/{registration_time_id}":{"post":{"tags":["Registration"],"parameters":[{"name":"registration_time_id","in":"path","required":true,"description":"Your identifier for the ticket. It must not match an existing ticket; a deleted ticket's ID can be reused.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrationTimeRequestPost"}}}},"responses":{"200":{"description":"Time ticket created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrationTimeResponse"}}}},"400":{"description":"Validation failure. Body is `{\"success\": false, \"errors\": [{\"message\": \"...\"}]}`.\n\nCommon causes:\n- Duplicate `registration_time_id` - returns `RegistrationTime with id: {id} already exists`\n- Missing required field - returns ``The fields: `{field}`, ... are required but were not found in the payload``\n- Empty required field - returns `` `{field}` cannot be empty ``\n- Invalid `registration_type` - returns `Invalid registration type: {t}`\n- `semester` isn't a string - returns `` `semester` must be a string ``\n- Unknown student - returns `No student exists with username: {username}`\n- Archived student - returns `Student with username {username} is archived`\n- Test account - returns `No student exists with username: {username}`\n- Unknown semester - returns ``Semester: `{semester}` does not exist``\n- Invalid date format - returns ``Invalid datetime format: `{value}`. Expected format is `YYYY-MM-DD HH:MM` ``\n- `end_timestamp` before `timestamp` - returns `End timestamp cannot be before the start timestamp.`\n- No term matches `term`, or `semester` and `year` - returns ``No matching term found for term: `{term}` or semester: `{semester}` and year: `{year}` ``","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"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"}}}}}},"500":{"description":"`end_timestamp` sent as `null`, or a `year` that isn't a number when `term` doesn't match a term."}}}}}}
```

#### What happens after the call

* The ticket applies right away, and advisors can filter on it in search.
* No notification is sent to the student.

#### Notes

* **Send times in UTC as `YYYY-MM-DD HH:MM`.** Other formats, including ISO 8601, return a 400. A local time sent without converting it opens the window at the wrong hour.
* **`term`, `semester`, and `year` are all required.** The ticket is attached to the term whose SIS term code matches `term`; if none matches, `semester` and `year` are used. `semester` must name a real semester (for example `fall`) even when `term` matches.
* **Leave out `end_timestamp` for a window with no end.** Sending `null` returns a 500.
* **A student can hold several tickets for the same term.** They can register while any one of them is open.
* **Your data sync can remove tickets created here.** If your institution's student data sync runs, it replaces each synced student's tickets with the ones it sends. Include API-created tickets in the sync, or expect them to be removed on the next run.
* **Usernames must match exactly.** Archived students return `Student with username {student_username} is archived`.

#### Related APIs

* [`PUT /planner/registration/registration_time/{registration_time_id}`](/stellic-partner-api/registration/update-a-registration-time-ticket.md) to move the window.
* [`DELETE /planner/registration/registration_time/{registration_time_id}`](/stellic-partner-api/registration/delete-a-registration-time-ticket.md) to remove the ticket.
* [`POST /holds/student_holds`](/stellic-partner-api/hold/place-a-hold-on-a-student.md) to block registration with a hold.
