curl --request POST \
--url https://api.useweve.com/v1/enrollments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"student_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"delivery_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cohort_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expires_at": "2023-11-07T05:31:56Z",
"reason": "<string>"
}
'import requests
url = "https://api.useweve.com/v1/enrollments"
payload = {
"student_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"delivery_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cohort_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expires_at": "2023-11-07T05:31:56Z",
"reason": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
student_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
delivery_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
cohort_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
expires_at: '2023-11-07T05:31:56Z',
reason: '<string>'
})
};
fetch('https://api.useweve.com/v1/enrollments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.useweve.com/v1/enrollments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'student_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'delivery_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'cohort_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'expires_at' => '2023-11-07T05:31:56Z',
'reason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.useweve.com/v1/enrollments"
payload := strings.NewReader("{\n \"student_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"delivery_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cohort_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.useweve.com/v1/enrollments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"student_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"delivery_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cohort_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useweve.com/v1/enrollments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"student_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"delivery_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cohort_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "active",
"source": "purchase",
"student": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "jsmith@example.com",
"created_at": "2023-11-07T05:31:56Z"
},
"delivery": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"cohort": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"product": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"purchase_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subscription_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"starts_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z",
"revoke_reason": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Dar acesso
Matricula o aluno na entrega, com origem manual — a mesma concessão do
painel. Se ele já tem acesso ativo a ela, não nasce outra matrícula: a
que existe recebe o prazo novo.
Conflitos: student_anonymized (o aluno foi removido).
curl --request POST \
--url https://api.useweve.com/v1/enrollments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"student_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"delivery_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cohort_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expires_at": "2023-11-07T05:31:56Z",
"reason": "<string>"
}
'import requests
url = "https://api.useweve.com/v1/enrollments"
payload = {
"student_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"delivery_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cohort_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expires_at": "2023-11-07T05:31:56Z",
"reason": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
student_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
delivery_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
cohort_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
expires_at: '2023-11-07T05:31:56Z',
reason: '<string>'
})
};
fetch('https://api.useweve.com/v1/enrollments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.useweve.com/v1/enrollments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'student_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'delivery_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'cohort_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'expires_at' => '2023-11-07T05:31:56Z',
'reason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.useweve.com/v1/enrollments"
payload := strings.NewReader("{\n \"student_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"delivery_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cohort_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.useweve.com/v1/enrollments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"student_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"delivery_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cohort_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useweve.com/v1/enrollments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"student_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"delivery_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cohort_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "active",
"source": "purchase",
"student": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "jsmith@example.com",
"created_at": "2023-11-07T05:31:56Z"
},
"delivery": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"cohort": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"product": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"purchase_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subscription_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"starts_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z",
"revoke_reason": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
A chave de API do club (weve_sk_…), criada em Ajustes › Chaves de API.
Vale para UM club, age em nome de quem a criou e com o papel dessa
pessoa. O escopo read libera as leituras; write, o resto.
Body
A turma. Ausente é a turma que estiver matriculando agora, se houver;
null é nenhuma turma.
Até quando vale. Ausente é o prazo padrão (o da turma ou o da
entrega); null é vitalício. Uma data precisa estar no futuro.
Fica no histórico de acesso do aluno.
500Response
A matrícula
A matrícula — o direito de um aluno a uma entrega — como está agora.
Show child attributes
Show child attributes