Ativar ou desativar um usuário
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."
}Usuários
Ativar ou desativar um usuário
active: true cria uma assinatura (membership) e torna o usuário cliente novamente (o usuário precisa
ter um módulo ativo); uma mensagem de boas-vindas por WhatsApp é enviada, a menos que avoid_send_welcome
seja true. active: false marca o usuário como não cliente e faz expirar todas as suas assinaturas.
POST
/
clients
/
users
/
{user_id}
/
switch-client
/
Ativar ou desativar um usuário
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."
}Autorizações
Parâmetros de caminho
Corpo
application/json

