# Run RPL from your own app through the API

> For developers. Your app judges RPL; RTObase releases the work the learner has covered, trims assessments to the gaps and records the unit outcome.

Source: https://rtobase.com.au/docs/rpl-api-integration
Last updated: 2026-11-17

This guide is for developers whose app runs recognition of prior learning (RPL) itself: collecting evidence, the competency conversation and the assessor's judgement. Your app writes the judgement into RTObase through the REST API. RTObase then releases the course work the learner has covered, trims assessments to the gaps, gives the learner only the gap work in the learner portal, and records the unit outcome when you ask. Read [API keys and Connected AI](/docs/api-and-connected-ai) first for keys, paging, `Idempotency-Key` and errors.

## Access required

| Task | Required access |
| --- | --- |
| Create the API key for your app | **Administrator** |
| Run RPL with the key | The key's member needs **Students: Edit**, **Enrolments: Edit**, **Assessments and marking: Edit** and **Courses and units: View** |

Create a staff member for your app, for example "RPL app", with a custom role holding exactly those permissions, and create the key as that member with **Read and change**. That member is recorded as the writer of every change. It is never recorded as the assessor.

## Before you start

- **One course per unit set.** RTObase takes an enrolment's units from its course. Set up one course for each set of units you assess, for example one per package of a qualification.
- **Requirement mappings.** Work is released and assessments are trimmed only where the course has **accepted** requirement mappings on its lessons and assessments (Course design). A unit with no accepted mappings releases nothing, and the learner does its whole assessment.
- **Assessors as trainers.** Every assessor your app names needs a trainer record in RTObase: Active, credentials Current or Expiring, and approved to assess the unit on their own (a unit approval with Can assess, not under direction). They need an RTObase login only if they also mark gap work in RTObase.

## The journey

| Step | Your app | Endpoint |
| --- | --- | --- |
| 1 | Find or create the learner | `GET /students?external_id=`, `POST /students` with `external_id` |
| 2 | Create the RPL enrolment | `POST /enrolments` with `course_id`, `enrolment_type: "RPL"`, `external_id` (your case id) and `notify_student` |
| 3 | Read units, requirements and the course work under each | `POST /enrolments/{id}/rpl` |
| 4 | Set each unit to RPL or Study | `POST /rpl-pre-assessments/set` |
| 5 | Send the evidence files and tie them to units | `POST /rpl-evidence/upload`, or `POST /rpl-evidence/attach` for a file already on the enrolment |
| 6 | Write Met or Not met per requirement, naming the assessor and citing the evidence | `POST /rpl-results/set-unit` (clear with `POST /rpl-results/clear`) |
| 7 | RTObase releases covered work and trims assessments | Nothing to call |
| 8 | The learner does the gap work in the learner portal | Nothing to call |
| 9 | Follow progress | See Following progress below |
| 10 | Record the outcome | `POST /enrolments/{id}/record-rpl-outcome` |
| 11 | Read the outcome back | `GET /enrolment-units?enrolment_id=`, or `POST /enrolments/{id}/rpl` |
| 12 | Withdraw | Whole case: `PATCH /enrolments/{id}` with `completion_status: "WITHDRAWN"`. One unit back to training: set it to Study |

`external_id` on an enrolment is unique in the organisation. A second enrolment with the same one is refused with 409 and names the first, so a retry after the 24 hour `Idempotency-Key` window cannot create a duplicate. Find it again with `GET /enrolments?external_id=`. With a `class_id`, if the student already has an open enrolment in the course, the request is refused with 409 (`enrolment_exists`) and names it, before anything is placed or sent: set `external_id` on that enrolment with `PATCH /enrolments/{id}`.

A qualification delivered through unit courses has one qualification enrolment and one unit course enrolment under it per unit course. RPL is recorded on the **qualification enrolment**. Calling an RPL endpoint with a unit course enrolment is refused with 409 and names the qualification enrolment.

## Reading an enrolment's RPL

`POST /enrolments/{id}/rpl` with an empty body changes nothing and returns what the enrolment's RPL tab shows:

- `units`: each unit with `pre_assessment` (`RPL`, `STUDY` or null for not assessed), `outcome_id`, counts (`met_count`, `gap_count`, `filled_gap_count`, `training_gap_count`) and `record_as`.
- `requirements` per unit: `requirement_id`, `item_type`, `source_key` (such as `PE.1` or `KE.3`), `text`, `heading`, `lead_in_requirement_id`, `status`, the stored `result`, `note`, `assessor_trainer_id`, `result_at`, `filled_by` and `work`.
- `lead_ins` per unit (and `lead_ins_without_unit`): lead-in lines such as "In doing this, a candidate must:", each with `requirement_id`, `source_key`, `text`, `status` and `lead_in_requirement_id` when one sits under another. A lead-in is not judged and is never a gap: it is Met when every point under it is. A point names its lead-in in `lead_in_requirement_id` and carries its text in `heading`. Read the heading with the point, because some carry a condition, such as "on at least two occasions".
- `work` per requirement: each mapped course item (`item_type`, `item_id`, `title`), the enrolment it is delivered on, its `assignment_id` once handed out, and the learner's `status`: `NOT_STARTED`, `IN_PROGRESS`, `SUBMITTED`, `NOT_SATISFACTORY`, `COMPLETED` or `NOT_REQUIRED`.
- `released_items`, `evidence` and `changed_at`, the latest change the reading saw. Use `changed_at` only to decide whether to read again. It is rounded to milliseconds, and a cleared result leaves no stamp, so never send it as `if_unchanged_since`.

Match your own requirement list on the unit code, `item_type` and `source_key`, and compare `text`. A unit release that differs from yours shows as text that does not match: flag it for a person rather than guess.

`status` is `MET`, `NOT_MET`, `NO_EVIDENCE` (no result yet) or `AWAITING_REVIEW` (evidence in RTObase to look at). A **gap** is a requirement on a unit set to RPL that is not Met. A gap is **filled** (`filled_by`) once every assessment, lesson, SCORM package and trainer-led activity mapped to it is completed: `ASSESSMENT` when only assessments filled it, `TRAINING` when a lesson, SCORM package or trainer-led activity did.

`record_as` is set once a unit set to RPL has every requirement Met or filled: `RPL` when no filled gap needed training, `INITIAL` when one did. It is null while any gap is open.

## Setting RPL or Study

`POST /rpl-pre-assessments/set` sets up to 200 units at once, all or nothing:

```json
{
  "enrolment_id": "2e4f6a8b-1c3d-4e5f-9a0b-c1d2e3f4a5b6",
  "units": [
    { "unit_id": "9d8c7b6a-5f4e-4d3c-8b2a-1f0e9a8b7c6d", "decision": "RPL", "note": "Ten years as a site supervisor." },
    { "unit_id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d", "decision": "STUDY" }
  ]
}
```

A unit not on the enrolment's course refuses the whole request. Setting a unit to RPL releases nothing until its requirements are Met. A unit set to Study is done in training and gets its outcome the usual way.

## Sending evidence

Send each file your assessor relied on, so an auditor can see in RTObase what each Met cited. A file is an enrolment document: it shows on the enrolment's **Documents** tab, and on the RPL tab with your app's member named as who added it.

```json
POST /api/v1/rpl-evidence/upload
{
  "enrolment_id": "2e4f6a8b-1c3d-4e5f-9a0b-c1d2e3f4a5b6",
  "file_name": "employer-reference.pdf",
  "content_type": "application/pdf",
  "content_base64": "JVBERi0xLjQK",
  "label": "Employer reference",
  "unit_ids": ["9d8c7b6a-5f4e-4d3c-8b2a-1f0e9a8b7c6d"]
}
```

- PDF, Word, Excel, JPEG, PNG, WebP, plain text (.txt) or a WebVTT transcript (.vtt), up to 20 MB, Base64 encoded. A request body over the limit is refused with 413 before it is read.
- Send an `Idempotency-Key` on every upload. RTObase does not spot an identical file sent twice without one: it stores it twice. Use `sha256` to check in your app.
- `label` says what the file is, for example "Competency conversation, 16 Nov 2026". `unit_ids` are the units it supports, from the RPL reading; empty ties it to the requirements that belong to no unit, and a unit sent twice counts once. RTObase checks the enrolment and the units before it stores the file: an enrolment that is not RPL, a unit course enrolment or a unit not on the learner's course is refused with 409 and nothing is stored.
- The response is the evidence (`id`, `document_id`, `label`, `unit_ids`, `sorted_at`) with `sha256`, the SHA-256 of the stored bytes, so your app can match its own fingerprint.
- A file already on the enrolment, for example from `POST /enrolment-documents/upload`, becomes evidence with `POST /rpl-evidence/attach` and `{ enrolment_id, document_id, label, unit_ids }`. A file is evidence once: a second attach is refused with 409, and so is a file on another enrolment or a unit not on the learner's course.
- List evidence with `GET /rpl-evidence?enrolment_id=`. Evidence the learner sent from the learner portal has `sorted_at` null and no units until an assessor ties it on the RPL tab. Download a file with `POST /enrolment-documents/{document_id}/download-url`.
- Cite evidence in a result with its `id` in `evidence_ids`. Evidence tied to a unit after a result shows on the RPL tab as new evidence for that unit.

## Writing results

`POST /rpl-results/set-unit` writes Met or Not met for up to 300 requirements of **one unit**, all or nothing, and names the trainer who judged them:

```json
{
  "enrolment_id": "2e4f6a8b-1c3d-4e5f-9a0b-c1d2e3f4a5b6",
  "unit_id": "9d8c7b6a-5f4e-4d3c-8b2a-1f0e9a8b7c6d",
  "assessor_trainer_id": "3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f",
  "if_unchanged_since": "2026-11-16T01:00:00Z",
  "results": [
    { "requirement_id": "6d7e8f90-1a2b-4c3d-9e4f-5a6b7c8d9e0f", "result": "MET", "note": "Observed in the conversation." },
    { "requirement_id": "7e8f9a0b-2c3d-4e4f-8a5b-6c7d8e9f0a1b", "result": "NOT_MET", "note": "No evidence of reading a site plan." }
  ]
}
```

- `assessor_trainer_id` is required. The trainer must be Active, with credentials Current or Expiring, and approved to assess the unit on their own; otherwise the request is refused with 403. A result written with a key never takes the key's member as the assessor.
- Requirements you do not send stay as they are. To take a result back, use `POST /rpl-results/clear` with `enrolment_id` and `requirement_ids`. Once the unit holds a recorded RPL outcome (51, 52, or 20 on a unit set to RPL), its results cannot be cleared, cannot change between `MET` and `NOT_MET`, no new result can be added, and they keep the evidence they cite: the request is refused with 409. Change the outcome first. A note can still change.
- `if_unchanged_since` is optional. Send the latest `result_at` your assessor saw, exactly as you read it: the request is refused with 409 if a result on the unit changed after it. A cleared result is not caught by this check.
- A requirement from another unit refuses the whole request with 400.
- A lead-in (from `lead_ins`) is not judged: a result sent for one refuses the whole request with 409. Send its points instead.
- `note` on Not met is what the learner is asked for. `evidence_ids` cites evidence on the enrolment (see Sending evidence); evidence on another enrolment, or evidence that was removed, is refused with 409. Evidence that a recorded result cites, or that is tied to a unit with a recorded RPL outcome, cannot be removed until the result or outcome changes.

The response returns the unit as the RPL reading shows it, with `released_item_count`. Check `flagged_skips` on each requirement: it lists assessments already marked Satisfactory that skipped parts for a requirement that is no longer Met.

## What RTObase does next

Work mapped only to Met requirements on units set to RPL becomes Not required for the learner. Assessments mapped partly to them are trimmed: the learner answers only the parts that are left, and the marker sees which parts were skipped and why. The learner signs in to the learner portal and sees what is covered, what is left and the course work that fills each gap.

Gap work is marked in RTObase by an assessor with an RTObase login, on the marking screen. Marking through the API is not part of this integration.

## Following progress

There are no webhooks. Poll with `updated_since` every few minutes:

1. `GET /assessment-task-assignments?updated_since=` for gap assessments handed out and their status.
2. `GET /assessment-task-attempts?updated_since=` for attempts submitted and marked.
3. `GET /enrolment-units?updated_since=` for unit outcomes.
4. `GET /rpl-results?updated_since=` and `GET /rpl-pre-assessments?updated_since=` for changes made in RTObase.
5. For each enrolment touched, call `POST /enrolments/{id}/rpl`.

Once a day, read every open case with `POST /enrolments/{id}/rpl` to catch lessons completed, which have no list of their own. A cleared result has no row, so it shows only in the reading.

## Recording the outcome

`POST /enrolments/{id}/record-rpl-outcome` records one unit set to RPL:

```json
{
  "unit_id": "9d8c7b6a-5f4e-4d3c-8b2a-1f0e9a8b7c6d",
  "decision": "GRANTED",
  "assessor_trainer_id": "3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f",
  "assessment_date": "2026-11-16",
  "evidence_notes": "Competency conversation and workplace documents reviewed against every requirement."
}
```

- `GRANTED` records **51** (RPL granted) when no filled gap needed training, and **20** (competent) when training filled a gap. RTObase works this out from `record_as`; you do not choose the type. It is refused with 409 while a requirement is open, checked again when the outcome is written, so a result changed after your last read is caught.
- `NOT_GRANTED` records **52** (RPL not granted).
- The named trainer must pass the same assessor check as for results (403 otherwise).
- The response gives `outcome_id`, what the unit now holds. Calling again for a unit that already holds the same kind of outcome returns it with `already_recorded: true` and writes nothing. A different outcome on a unit that has one is refused with 409.

An RPL assessment record, or an Initial Satisfactory one, through `POST /assessment-records` for a unit set to RPL on an RPL enrolment is refused with 409 (`use_record_rpl_outcome`) and points here, because it would record 51 or 20 with gaps open. Credit transfer (60) stays on `POST /assessment-records` with `assessment_type: "CREDIT_TRANSFER"`.

## Who is recorded as deciding

| Who | Where |
| --- | --- |
| The assessor who judged | `assessor_trainer_id` on each result; `assessor_id` on the outcome's assessment record |
| The member who wrote it | `updated_by_user_id` on each row: your app's staff member |
| The key | The audit log, against the key |

A result changed on the RTObase RPL tab clears `assessor_trainer_id`: the signed-in marker who changed it decided it.

## Errors

| Status | When |
| --- | --- |
| 400 | The body is not valid, or a requirement is not on the unit |
| 413 | The request body is larger than an upload of 20 MB, Base64 encoded |
| 403 | The key lacks a permission, the named assessor cannot judge the unit, or the enrolment in a pre-assessment or result write is not one the key can mark |
| 404 | No enrolment, unit or record with that id for the key, on reads and on `record-rpl-outcome` |
| 409 | A file is already evidence, or is on another enrolment, evidence was removed, a result to clear, change or add sits on a unit with a recorded RPL outcome, a gap is open, the unit is not set to RPL, the unit already holds another outcome, a result changed since `if_unchanged_since`, a result was sent for a lead-in line, the enrolment is a unit course enrolment, the `external_id` is taken (`external_id_taken` on create, `conflict` on update), or the student already has an open enrolment in the class's course (`enrolment_exists`) |

## Not through the API yet

- Video and files over 20 MB. Send a call transcript as a text or .vtt file, or put a link to the recording in the label or a result's note.
- Removing evidence, and tying evidence the learner sent from the portal to units. Both are on the RPL tab.
- Changing or correcting a recorded outcome.
- Connected AI (MCP) can read an enrolment's RPL with `get_rpl_enrolment`. It cannot write results or outcomes.
