> ## Documentation Index
> Fetch the complete documentation index at: https://docs.truenroll.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Extraction

> Retrieve structured data extracted from academic credentials.

```
GET /partner/v1/cases/{id}/extraction
```

Returns structured data extracted from all education credentials in the case. Returns `409`
if no upload in the case was created with the `extraction` feature.

### Path parameters

<ParamField path="id" type="string" required>
  TruEnroll case ID.
</ParamField>

## Response fields

<ResponseField name="data" type="object">
  <Expandable title="data">
    <ResponseField name="id" type="string">TruEnroll case ID.</ResponseField>
    <ResponseField name="externalId" type="string">Your reference for this case.</ResponseField>

    <ResponseField name="credentials" type="object[]">
      Extracted data for each education credential. One entry per credential identified by
      classification. A single uploaded file can produce multiple credentials.

      <Expandable title="credentials[]">
        <ResponseField name="credentialId" type="string">Unique credential ID.</ResponseField>
        <ResponseField name="uploadId" type="string">ID of the upload this credential belongs to.</ResponseField>

        <ResponseField name="credentialType" type="string">
          Document category assigned by classification, e.g. `Academic Credentials`, `Healthcare & Licensure`.
        </ResponseField>

        <ResponseField name="status" type="string">
          Extraction status: `queued`, `processing`, `completed`, `failed`.
        </ResponseField>

        <ResponseField name="language" type="string | null">
          Human-readable language name of the original document, e.g. `English`.
        </ResponseField>

        <ResponseField name="languageCode" type="string | null">
          ISO 639-1 language code of the original document, e.g. `en`.
        </ResponseField>

        <ResponseField name="candidate" type="object">
          Identity details of the document holder.

          <Expandable title="candidate">
            <ResponseField name="fullName" type="string | null">Full name as it appears on the document.</ResponseField>
            <ResponseField name="firstName" type="string | null">First name.</ResponseField>
            <ResponseField name="lastName" type="string | null">Last name.</ResponseField>
            <ResponseField name="dateOfBirth" type="string | null">Date of birth. Format: `MM/DD/YYYY`.</ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="institution" type="object">
          Details of the issuing institution.

          <Expandable title="institution">
            <ResponseField name="name" type="string | null">Institution name.</ResponseField>
            <ResponseField name="country" type="string | null">Country name.</ResponseField>
            <ResponseField name="countryCode" type="string | null">ISO 3166-1 alpha-2 country code, e.g. `CA`.</ResponseField>
            <ResponseField name="state" type="string | null">State or province name.</ResponseField>
            <ResponseField name="stateCode" type="string | null">State or province code.</ResponseField>

            <ResponseField name="accreditation" type="object | null">
              Accreditation lookup result. `null` if not checked.

              <Expandable title="accreditation">
                <ResponseField name="isAccredited" type="boolean | null">Whether the institution is accredited.</ResponseField>
                <ResponseField name="isRecognized" type="boolean | null">Whether the institution is recognized.</ResponseField>
                <ResponseField name="lastChecked" type="string | null">ISO 8601 timestamp of the last accreditation check.</ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="qualification" type="object">
          Details of the degree or qualification.

          <Expandable title="qualification">
            <ResponseField name="name" type="string | null">Degree name, e.g. `Bachelor of Science`.</ResponseField>
            <ResponseField name="level" type="string | null">Degree level, e.g. `Undergraduate`, `Postgraduate`.</ResponseField>
            <ResponseField name="program" type="string | null">Program name.</ResponseField>
            <ResponseField name="majorOrSpecialization" type="string | null">Major or area of specialization.</ResponseField>
            <ResponseField name="status" type="string | null">Qualification status, e.g. `Completed`, `In Progress`.</ResponseField>
            <ResponseField name="registrationNumber" type="string | null">Student registration or roll number.</ResponseField>
            <ResponseField name="yearOfAdmission" type="number | null">Year the candidate was admitted to the program.</ResponseField>
            <ResponseField name="yearOfCompletion" type="number | null">Year the candidate completed the program.</ResponseField>
            <ResponseField name="programDuration" type="number | null">Duration of the program in years.</ResponseField>
            <ResponseField name="dateOfIssue" type="string | null">Date the credential was issued.</ResponseField>
            <ResponseField name="cgpa" type="number | null">Cumulative GPA as stated on the document.</ResponseField>
            <ResponseField name="totalCreditsOrMarks" type="number | null">Total credits or marks as stated on the document.</ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="courses" type="object[]">
          Course-level records extracted from the transcript.

          <Expandable title="courses[]">
            <ResponseField name="id" type="string">Internal course record ID.</ResponseField>
            <ResponseField name="courseNumber" type="string | null">Course code, e.g. `CSC148`.</ResponseField>
            <ResponseField name="courseName" type="string | null">Course title.</ResponseField>
            <ResponseField name="credit" type="number | null">Credit units for the course.</ResponseField>
            <ResponseField name="grade" type="string | null">Letter or percentage grade.</ResponseField>
            <ResponseField name="alternateGrade" type="string | null">Secondary grade representation if present.</ResponseField>
            <ResponseField name="marksScored" type="number | null">Marks obtained.</ResponseField>
            <ResponseField name="maximumMarks" type="number | null">Maximum marks possible.</ResponseField>
            <ResponseField name="passStatus" type="string | null">Pass/fail status.</ResponseField>
            <ResponseField name="term" type="string | null">Academic term, e.g. `Fall`, `Spring`.</ResponseField>
            <ResponseField name="session" type="number | null">Academic session.</ResponseField>
            <ResponseField name="year" type="number | null">Year the course was taken.</ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

## Field reference

### Credential

| Field            | Type           | Description                                                                                                                                                                                                                        |
| ---------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `credentialId`   | string         | Unique credential ID. 24-character hex string.                                                                                                                                                                                     |
| `uploadId`       | string \| null | ID of the upload that produced this credential. 24-character hex string.                                                                                                                                                           |
| `credentialType` | string \| null | Document category assigned by classification. One of: `Academic Credentials` · `Application` · `Professional` · `Identity` · `Legal` · `Financial` · `Healthcare & Licensure` · `Institutional & Administrative` · `Uncategorized` |
| `status`         | string         | `queued` · `processing` · `completed` · `failed`                                                                                                                                                                                   |
| `language`       | string \| null | Human-readable language name of the original document, e.g. `English`.                                                                                                                                                             |
| `languageCode`   | string \| null | ISO 639-1 two-letter language code, e.g. `en`, `zh`, `ar`.                                                                                                                                                                         |

### Candidate

| Field         | Type           | Description                                                                            |
| ------------- | -------------- | -------------------------------------------------------------------------------------- |
| `fullName`    | string \| null | Full name as it appears on the document. Not normalized; reflects original formatting. |
| `firstName`   | string \| null | First name extracted from the document.                                                |
| `lastName`    | string \| null | Last name extracted from the document.                                                 |
| `dateOfBirth` | string \| null | Date of birth. Format: `MM/DD/YYYY`.                                                   |

### Institution

| Field                        | Type            | Description                                                                         |
| ---------------------------- | --------------- | ----------------------------------------------------------------------------------- |
| `name`                       | string \| null  | Institution name as it appears on the document.                                     |
| `country`                    | string \| null  | Full country name, e.g. `Canada`.                                                   |
| `countryCode`                | string \| null  | ISO 3166-1 alpha-2 two-letter country code, e.g. `CA`.                              |
| `state`                      | string \| null  | Full state or province name, e.g. `Ontario`.                                        |
| `stateCode`                  | string \| null  | ISO 3166-2 subdivision code, e.g. `CA-ON`.                                          |
| `accreditation.isAccredited` | boolean \| null | Whether the institution is accredited per TruEnroll's reference data.               |
| `accreditation.isRecognized` | boolean \| null | Whether the institution is recognized per TruEnroll's reference data.               |
| `accreditation.lastChecked`  | string \| null  | ISO 8601 UTC datetime of the last accreditation check, e.g. `2025-06-01T00:00:00Z`. |

### Qualification

| Field                   | Type           | Description                                                                                                                                                               |
| ----------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`                  | string \| null | Degree name as stated on the document, e.g. `Bachelor of Science`.                                                                                                        |
| `level`                 | string \| null | Degree level. Typical values: `SECONDARY` · `HIGHER_SECONDARY` · `BACHELORS` · `MASTERS` · `DOCTORATE` · `POST_DOCTORATE` · `DIPLOMA` · `POST_GRADUATE_DIPLOMA` · `OTHER` |
| `program`               | string \| null | Program or field of study name.                                                                                                                                           |
| `majorOrSpecialization` | string \| null | Major or area of specialization within the program.                                                                                                                       |
| `status`                | string \| null | Qualification status. One of: `PURSUING` · `COMPLETED` · `INCONCLUSIVE` · `WITHDRAWN`                                                                                     |
| `registrationNumber`    | string \| null | Student registration or roll number as on the document.                                                                                                                   |
| `yearOfAdmission`       | number \| null | 4-digit year the candidate was admitted, e.g. `2019`.                                                                                                                     |
| `yearOfCompletion`      | number \| null | 4-digit year the candidate completed the program, e.g. `2023`.                                                                                                            |
| `programDuration`       | number \| null | Nominal duration of the program in years, e.g. `4`.                                                                                                                       |
| `dateOfIssue`           | string \| null | Date the credential was issued. Format: `MM/DD/YYYY`.                                                                                                                     |
| `cgpa`                  | number \| null | Cumulative GPA as stated on the document. Scale varies by institution.                                                                                                    |
| `totalCreditsOrMarks`   | number \| null | Total credits or aggregate marks as stated on the document.                                                                                                               |

### Courses

| Field            | Type           | Description                                                                                  |
| ---------------- | -------------- | -------------------------------------------------------------------------------------------- |
| `id`             | string         | Internal course record ID.                                                                   |
| `courseNumber`   | string \| null | Course code as on the transcript, e.g. `CSC148`.                                             |
| `courseName`     | string \| null | Course title as on the transcript.                                                           |
| `credit`         | number \| null | Credit units assigned to the course.                                                         |
| `grade`          | string \| null | Grade as on the transcript: letter, percentage, or other notation.                           |
| `alternateGrade` | string \| null | Secondary grade representation if the document shows two grading systems.                    |
| `marksScored`    | number \| null | Marks obtained by the candidate.                                                             |
| `maximumMarks`   | number \| null | Maximum marks possible for the course.                                                       |
| `passStatus`     | string \| null | Pass/fail result. One of: `PASS` · `FAIL` · `INCOMPLETE` · `WITHDRAWN` · `AUDIT` · `UNKNOWN` |
| `term`           | string \| null | Academic term label, e.g. `Fall`, `Spring`, `Semester 1`.                                    |
| `session`        | number \| null | Numeric academic session identifier.                                                         |
| `year`           | number \| null | 4-digit year the course was taken, e.g. `2022`.                                              |

## Example

```json theme={null}
{
  "success": true,
  "message": "Extraction retrieved",
  "meta": {},
  "data": {
    "id": "6850abc123def456ghi789",
    "externalId": "applicant-9876",
    "credentials": [
      {
        "credentialId": "6850ghi789abc123def456",
        "uploadId": "6850def456ghi789abc123",
        "credentialType": "Academic Credentials",
        "status": "completed",
        "languageCode": "en",
        "language": "English",
        "candidate": {
          "fullName": "Jane Smith",
          "firstName": "Jane",
          "lastName": "Smith",
          "dateOfBirth": "03/15/1999"
        },
        "institution": {
          "name": "University of Toronto",
          "country": "Canada",
          "countryCode": "CA",
          "state": null,
          "stateCode": null,
          "accreditation": null
        },
        "qualification": {
          "name": "Bachelor of Science",
          "level": "Undergraduate",
          "program": null,
          "majorOrSpecialization": "Computer Science",
          "status": "Completed",
          "yearOfAdmission": 2017,
          "yearOfCompletion": 2021,
          "programDuration": 4,
          "cgpa": 3.72,
          "totalCreditsOrMarks": 120,
          "registrationNumber": null,
          "dateOfIssue": null
        },
        "courses": [
          {
            "id": "course_001",
            "courseNumber": "CSC148",
            "courseName": "Introduction to Computer Science",
            "credit": 0.5,
            "grade": "A",
            "alternateGrade": null,
            "marksScored": null,
            "maximumMarks": null,
            "passStatus": null,
            "term": "Fall",
            "session": null,
            "year": 2017
          }
        ]
      }
    ]
  }
}
```
