# Get training progress across all partners

`GET https://api.suger.cloud/ai/org/{orgId}/prm/training/partnerProgress`

Tally the courses this organization publishes across every partner, two ways over the same numbers: `courses` (how each course is doing) and `byPartner` (which partners need a nudge, least complete first). Courses run in Fours and in a connected external LMS are counted side by side. `partnerCount` counts partners with at least one enrollment, not every partner. An organization that publishes no courses gets zeros. This organization's own learners are never counted.

With `partnerOrgId`, every number is that one partner's, and each `courses` row also says how many of the partner's learners have not started (`notStarted`), opened, are in progress (`inProgress`), have completed or have failed the course (`failed`: a native course whose quiz attempts are used up); they add up to `enrolled`. Courses no one at the partner is enrolled in are listed with zeros. The numbers are counts, not percentages; derive a ratio from them. An external course reports only not started, opened and completed. `partnerOrgId` is the partner's own Fours organization id: a `byPartner[].partnerOrgId`, or the `partnerOrgId` of its row in ListPrmPartnerships, not the partnership id (empty when the partner does not use Fours, which then has no training data). A wrong id is not refused: it returns zeros for every course. An empty `partnerOrgId` filters nothing.

When `hasExternalCourses` is true and `completionSyncEnabled` is false, Fours is not polling the external LMS for completions, so a zero completed count on an external course may only mean none were reported; do not present it as nobody finishing. Use it for a weekly training summary, and with `partnerOrgId` for one partner's detail. Needs the partners.read permission.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `orgId` | path | string | yes | Organization ID |
| `partnerOrgId` | query | string | no | Only this partner: its own Fours organization id (a `byPartner[].partnerOrgId`, or the `partnerOrgId` of its ListPrmPartnerships row), not the partnership id. Adds each course's per-state counts. |

## Responses

### 200 — Tallies by course and by partner

Content-Type: `application/json` · Schema: `OrgTrainingRollup`

**`OrgTrainingRollup`** fields:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `byPartner` | array<PartnerRollupRow> | no | ByPartner is ordered least-complete first: a dashboard's job here is to surface who is lagging, and sorting by name would bury exactly that. |
| `completed` | integer | no |  |
| `completionSyncEnabled` | boolean | no |  |
| `courses` | array<OrgCourseRollup> | no |  |
| `enrolled` | integer | no |  |
| `hasExternalCourses` | boolean | no |  |
| `partnerCount` | integer | no | PartnerCount counts partners with at least one enrollment, NOT every partner in the org. A completion rate whose denominator silently included partners who were never assigned anything would read as a failing programme rather than an unstarted one. |

**`PartnerRollupRow`** fields:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `completed` | integer | no |  |
| `enrolled` | integer | no |  |
| `partnerName` | string | no |  |
| `partnerOrgId` | string | no |  |

**`OrgCourseRollup`** fields:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `completed` | integer | no |  |
| `courseId` | string | no |  |
| `courseName` | string | no |  |
| `enrolled` | integer | no |  |
| `failed` | integer | no | With partnerOrgId only: the partner's learners who used up a native course's quiz attempts without passing. |
| `inProgress` | integer | no | With partnerOrgId only. |
| `kind` | string | no | Kind is native \| scorm \| external. The per-state counts are not comparable across kinds: an external course only ever reports not started, opened or completed, so a zero inProgress there is a property of the integration, not of the learners. |
| `notStarted` | integer | no | With partnerOrgId only. |
| `opened` | integer | no | With partnerOrgId only. |

## Example

_Generated from this operation's schema. Values are placeholders — substitute your own ids, and set `SUGER_TOKEN` to a bearer token from the [OAuth client-credentials exchange](https://doc.fours.com/settings/oauth-app/)._

### Request

```bash
curl -X GET 'https://api.suger.cloud/ai/org/{orgId}/prm/training/partnerProgress' \
  -H "Authorization: Bearer $SUGER_TOKEN"
```

### Response — 200

```json
{
  "byPartner": [
    {
      "completed": 1,
      "enrolled": 1,
      "partnerName": "Acme Corp",
      "partnerOrgId": "01H0000000000000000000"
    }
  ],
  "completed": 1,
  "completionSyncEnabled": true,
  "courses": [
    {
      "completed": 1,
      "courseId": "01H0000000000000000000",
      "courseName": "Acme Corp",
      "enrolled": 1,
      "failed": 1,
      "inProgress": 1,
      "kind": "string",
      "notStarted": 1,
      "opened": 1
    }
  ],
  "enrolled": 1,
  "hasExternalCourses": true,
  "partnerCount": 1
}
```

---

API reference: https://doc.fours.com/api/
