Activar o desactivar un usuario
curl --request POST \
--url https://app.reinvented.education/api/clients/users/{user_id}/switch-client/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"active": true,
"avoid_send_welcome": true
}
'import requests
url = "https://app.reinvented.education/api/clients/users/{user_id}/switch-client/"
payload = {
"active": True,
"avoid_send_welcome": True
}
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({active: true, avoid_send_welcome: true})
};
fetch('https://app.reinvented.education/api/clients/users/{user_id}/switch-client/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"result": "Action completed successfully"
}{
"active": [
"The user does not have any active module, please assign one before activating it."
]
}{
"detail": "Authentication credentials were not provided."
}{
"detail": "Not found."
}Usuarios
Activar o desactivar un usuario
active: true crea una membresía y vuelve a convertir al usuario en cliente (el usuario debe
tener un módulo activo); se envía un mensaje de bienvenida por WhatsApp a menos que avoid_send_welcome
sea true. active: false marca al usuario como no cliente y hace vencer todas sus membresías.
POST
/
clients
/
users
/
{user_id}
/
switch-client
/
Activar o desactivar un usuario
curl --request POST \
--url https://app.reinvented.education/api/clients/users/{user_id}/switch-client/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"active": true,
"avoid_send_welcome": true
}
'import requests
url = "https://app.reinvented.education/api/clients/users/{user_id}/switch-client/"
payload = {
"active": True,
"avoid_send_welcome": True
}
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({active: true, avoid_send_welcome: true})
};
fetch('https://app.reinvented.education/api/clients/users/{user_id}/switch-client/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"result": "Action completed successfully"
}{
"active": [
"The user does not have any active module, please assign one before activating it."
]
}{
"detail": "Authentication credentials were not provided."
}{
"detail": "Not found."
}Autorizaciones
Parámetros de ruta
Cuerpo
application/json

