Set active course and module
curl --request POST \
--url https://app.reinvented.education/api/clients/users/{user_id}/set-module/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"module_pk": 5120,
"route_pk": 731
}
'import requests
url = "https://app.reinvented.education/api/clients/users/{user_id}/set-module/"
payload = {
"module_pk": 5120,
"route_pk": 731
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({module_pk: 5120, route_pk: 731})
};
fetch('https://app.reinvented.education/api/clients/users/{user_id}/set-module/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"result": "success"
}{
"email": [
"Enter a valid email address."
],
"selected_days": [
"Day funday is not valid."
]
}{
"detail": "Authentication credentials were not provided."
}{
"detail": "Not found."
}Enrollment
Set active course and module
Makes the given course (route) and module the user’s single active ones: all of the user’s other routes and modules are deactivated first. If a pensum slug is given and the course belongs to it, the user is also enrolled in that pensum.
POST
/
clients
/
users
/
{user_id}
/
set-module
/
Set active course and module
curl --request POST \
--url https://app.reinvented.education/api/clients/users/{user_id}/set-module/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"module_pk": 5120,
"route_pk": 731
}
'import requests
url = "https://app.reinvented.education/api/clients/users/{user_id}/set-module/"
payload = {
"module_pk": 5120,
"route_pk": 731
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({module_pk: 5120, route_pk: 731})
};
fetch('https://app.reinvented.education/api/clients/users/{user_id}/set-module/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"result": "success"
}{
"email": [
"Enter a valid email address."
],
"selected_days": [
"Day funday is not valid."
]
}{
"detail": "Authentication credentials were not provided."
}{
"detail": "Not found."
}Authorizations
Path Parameters
Body
application/json

