Incluir Aluno a uma Turma

Route (Rota)

Método Rota Descrição
POST /webservice/student/classroom/join/{classroom_id} Vincula aluno a uma turma

Headers (Cabeçalho)

Param Tipo Descrição Obrigatório
Accept String application/json Sim
Content-Type String application/json Sim
secret String *Secret Key Sim
token String **Webservice Token Sim

*Para conseguir a Secret Key acesse sua Plataforma, abra o Menu, vá na área de Usuários e acesse Webservice, lá você terá a lista de usuários com suas respectivas Secret Key

** Token gerado pela rota de autenticação

Route params (Parâmetros na rota)

Param Tipo Descrição Obrigatório
classroom_id String Id da turma Sim

Query params (Parâmetros)

Param Tipo Descrição Obrigatório
student_id String Id do aluno Não
document_type String *Tipo de documento - Ex.: CPF Não
document String Documento do aluno - Ex.: XXX.XXX.XXX-XX Não
* Os tipos de documentos padrões da plataforma são: CPF, RG e CNPJ

Exemplos

cURL

				
					curl --location --request POST 'https://sua.plataforma.com/student/classroom/join/1?student_id=1' \
--header 'Accept: application/json' \
--header 'secret: {{._webservice_secret}}' \
--header 'token: {{._webservice_token}}' \
				
			

Node.js

				
					const axios = require('axios');
let data = '';

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://sua.plataforma.com/student/classroom/join/1?student_id=1',
  headers: { 
    'Accept': 'application/json', 
    'secret': '{{._webservice_secret}}', 
    'token': '{{._webservice_token}}'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

				
			

PHP

				
					<?php
$client = new Client();
$headers = [
  'Accept' => 'application/json',
  'secret' => '{{._webservice_secret}}',
  'token' => '{{._webservice_token}}'
];
$body = '';
$request = new Request('POST', 'https://sua.plataforma.com/student/classroom/join/1?student_id=1', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();

				
			

Request (Requisição)

- Request com ID do Aluno

				
					{
	"student_id": 3
}
				
			

- Request com Documento do Aluno

				
					{
	"document_type": "cpf",
	"document": "999.999.999-99"
}
				
			

Response (Respostas)

- Vinculado (Status: 200)

				
					{
    "message": "Vinculado",
    "status": 200,
    "data": {
        "student": {
            "id": 1,
            "document_type": "CPF",
            "document": "999.999.999-99",
            "geographic_lock": 1,
            "profile": {
                "instagram": null,
                "facebook": null,
                "twitter": null,
                "linkedin": null,
                "website": null,
                "picture": null
            },
            "user": {
                "name": "Aluno",
                "email": "aluno@soujmv.com",
                "expires_at": null
            },
            "secondaries": [],
            "form": null
        },
        "classrooms": [
            {
                "id": 1,
                "status": 1,
                "author": {
                    "id": 1,
                    "name": "admin",
                    "email": "admin@nochalks.com",
                    "email_verified_at": null,
                    "language": "br",
                    "provider": null,
                    "provider_id": null,
                    "status": 1,
                    "created_at": "2022-03-30 13:21:30",
                    "updated_at": "2022-03-30 13:22:29",
                    "expires_at": null,
                    "old_password": null,
                    "has_api": 0
                },
                "translation": {
                    "name": "Turma",
                    "description": "<p>Turma de Teste<\/p>",
                    "language_id": 1
                }
            }
        ]
    }
}
				
			
ESCOLHA UM ATENDIMENTO:
Contato por Chat CHAT
Contato por E-mail E-MAIL
Contato por Telefone TELEFONE
Contato por Whatsapp WHATSAPP
Plataforma EAD para Cursos e Treinamentos Online mais segura do mercado!
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.