List

The list endpoint allows you to list pathways and enrolments for a given array of pathway names or IDs. If either name or ID is not provided it will return all pathways and enrollments

Parameters

Key

Type

pathways

Array String (Name or ID of pathway)

DEPRECATED

name

String (Name of a pathway)

ID

String (Pathway SKU)

Example

The example below retrieves a single pathway with related user enrolments. Each user enrolment contains their details and pathway progress.

curl -X POST \
  v1/pathways/list \
  -H 'Authorization: Basic <Your Base64 Encoded Token>' \
  -d '{
	"pathways" : ["Pathway B","Pathway B"]
}'

Success Response

The response will contain an array of pathways. In the enrolment property will be an array of user enrolments. The enrolment object is detailed in the Pathway enrolment webhook.

{
    "status": "success",
    "data": [
        {
            "pathway" : {
                "name": "My Pathway",
                "ID" : "FAPW-GWRG-02HU"
            },
            "enrolments": [
                {
                    "firstname": "Test",
                    "lastname": "User",
                    "email": "test@example.com",
                    "telephone" : "",
                    "country": "South Africa",
                    "city": "Johannesburg",
                    "groups" : ["Group A","Group B"],
                    "status": {
                        "level": 1,
                        "state": "In Progress",
                        "progress": 10,
                        "version": "1.0.1",
                        "timestamp": "2020-10-09T08:43:30+02:00",
                        "joined": "2020-10-09T08:43:30+02:00"
                    }
                },
                ...etc
            ]
        },
        ...etc
    ],
    "hash": "f114aeba57bebe5e53b612d17d24f38d",
    "response_time": 0.10516619682312012
}
pageEnrolments

Last updated