Para criar um novo aluno na sua escola utilize:
POST /api/v1/students
Enviando os seguintes dados:
Campo | Tipo | Obrigatório |
---|---|---|
name | string | sim |
string | sim | |
phone | string | não |
document | string | não |
Por exemplo:
$client = new Guzzle\Client;
$response = $client->request('POST', 'https://alpaclass.com/api/v1/students', [
'headers' => [
'Accept' => 'application/json',
'Content-Type' => 'application/json',
'Authorization' => 'Bearer seu_token_de_api'
],
'body' => [
'name' => 'Diego Alves Souza',
'email' => '[email protected]',
'phone' => '+5511943033333',
'document' => '02587412111'
]
])->getBody()->getContents();