> 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/exports/export-prospective-students.md).

# Export prospective students

Use this endpoint to export your prospective students, as a file in the response or, for more than 5,000 matching students (490 on sandbox institutions), as a background export you download with [`GET /get_export_url/`](/stellic-partner-api/exports/poll-an-async-export-and-fetch-its-presigned-url.md). Each row has `username`, `userid`, `first_name`, `last_name`, and `email`. Set any of `levels`, `domestic_or_international`, `programs`, `pathways`, `last_login`, `account_creation_date`, `all_planned_courses`, or `potential_transfer_courses` to `true` to add those columns, and repeat `usernames` to export only some students.

## GET /exports/prospective\_students

>

```json
{"openapi":"3.0.0","info":{"title":"Stellic for Developers","version":"1.0"},"tags":[{"name":"Exports","description":"Institution-wide datasets as CSV or JSON. Small datasets come back inline; large ones run in the background and return a `file_name` you poll with `GET /get_export_url/` for a download link."}],"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."}}},"paths":{"/exports/prospective_students":{"get":{"tags":["Exports"],"parameters":[{"name":"usernames","in":"query","required":false,"description":"Optional filter: restrict the export to specific student usernames.\nProvide multiple usernames by repeating the query param, e.g. `?usernames=jdoe&usernames=msmith`.\n","schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true},{"name":"levels","in":"query","required":false,"description":"When true, include prospective academic level column.","schema":{"type":"string"}},{"name":"domestic_or_international","in":"query","required":false,"description":"When true, include region status (domestic vs international) column.","schema":{"type":"string"}},{"name":"programs","in":"query","required":false,"description":"When true, include programs (inline) column.","schema":{"type":"string"}},{"name":"pathways","in":"query","required":false,"description":"When true, include pathways (inline) column.","schema":{"type":"string"}},{"name":"all_planned_courses","in":"query","required":false,"description":"When true, include **all planned courses** columns.\nMutually exclusive with `potential_transfer_courses`.\n","schema":{"type":"string"}},{"name":"potential_transfer_courses","in":"query","required":false,"description":"When true, include **potential transfer courses** columns.\nMutually exclusive with `all_planned_courses`.\n","schema":{"type":"string"}},{"name":"last_login","in":"query","required":false,"description":"When true, include last login date column.","schema":{"type":"string"}},{"name":"account_creation_date","in":"query","required":false,"description":"When true, include account creation date column.","schema":{"type":"string"}},{"name":"output_format","in":"query","required":false,"description":"File format for the download. Default: csv. If you omit it and send the header `Accept: application/json` (exactly that value), the export is produced as `json`; an explicit `output_format` always wins.","schema":{"type":"string","enum":["csv","json"]}},{"name":"delivery_channel","in":"query","required":false,"description":"`http_file` returns the file in the response, `http_response` returns the same content without the attachment header, and `s3` runs the export in the background (poll `GET /get_export_url/` with the returned `data.file_name`). Omit it and the export runs in the background when more than 5,000 students match (490 on sandbox institutions).","schema":{"type":"string","enum":["http_file","http_response","s3"]}}],"responses":{"200":{"description":"The rows, in the response as CSV or, with `output_format=json`, as a JSON array of row objects keyed by column name. Over 5,000 matching students (490 on sandbox institutions), or with `delivery_channel=s3`, the export runs in the background and the response is the job object with `data.file_name` to poll on `GET /get_export_url/`.","content":{"application/json":{"schema":{"oneOf":[{"type":"array","items":{"type":"object"}},{"type":"object"}]}},"text/csv":{"schema":{"type":"string","format":"csv","description":"One row per prospective student the account behind your token can see in search (more with the course columns, below). Test accounts are excluded. A value that account can't view shows `[no access]`. Base columns (always present):\n- `username` - the student's login username.\n- `userid` - the student's SIS ID.\n- `first_name` - the student's first name.\n- `last_name` - the student's last name.\n- `email` - the student's email address.\n\nOptional columns (present only when the matching query param is set to `true`, `1`, or `yes`, case-insensitive), headed by their field name:\n- `levels=true` adds `prostu_academic_level`, the prospective academic level.\n- `domestic_or_international=true` adds `prostu_region_status`, domestic or international.\n- `programs=true` adds `prostu_program_inline`, the programs on all of the student's plans.\n- `pathways=true` adds `prostu_pathway_inline`, the pathways on all of the student's plans.\n- `all_planned_courses=true` adds the planned course columns, one row per course (mutually exclusive with `potential_transfer_courses`).\n- `potential_transfer_courses=true` adds the potential transfer course columns, one row per course (mutually exclusive with `all_planned_courses`).\n- `last_login=true` adds `last_log_in`.\n- `account_creation_date=true` adds `account_created`.\n\nWhen more than 5,000 students match (490 on sandbox institutions) the response is the background-export JSON envelope (see the `application/json` example) instead; poll `GET /get_export_url/` to fetch the file, whose name starts with `search_advisee-`.\n"}}}},"400":{"description":"Both `all_planned_courses` and `potential_transfer_courses` are set, which returns `{\"errors\": [{\"message\": \"The parameters 'all_planned_courses' and 'potential_transfer_courses' are mutually exclusive. Only one can be set to true at a time.\"}]}`. An unsupported `output_format` or `delivery_channel` returns `{\"errors\": [\"Output format provided is currently not supported\"]}` or `{\"errors\": [\"Delivery channel provided is currently not supported\"]}`."},"401":{"description":"Unauthorized"},"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"}}}}}}}}}}}
```

#### Notes

* **The export lists the prospective students the token's account can see in search.** Test accounts aren't included, and a column the account can't view shows `[no access]`. Values come from search, so a change can take a moment to appear.
* **The course columns add one row per course.** `all_planned_courses` and `potential_transfer_courses` repeat each student once per course, and you can set only one of them; both returns a 400.
* **Most added columns are headed by their field name**, for example `prostu_academic_level` or `last_log_in`. `programs` and `pathways` list those on all of a student's plans.
* **The file name starts with `search_advisee-`,** not `prospective_students-`.

#### Related APIs

* [`GET /get_export_url/`](/stellic-partner-api/exports/poll-an-async-export-and-fetch-its-presigned-url.md) to download a background export.
* [`GET /exports/{property}`](/stellic-partner-api/exports/bulk-export-dispatcher.md) for formats, delivery, and errors.
