Trocar turma/horário de inscrição
curl --request PUT \
--url https://services.pref.rio/go/api/v1/enrollments/{enrollmentId}/schedule \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enrolled_unit": {
"address": "<string>",
"created_at": "<string>",
"curso_id": 123,
"id": "<string>",
"neighborhood": "<string>",
"neighborhood_zone": "<string>",
"schedules": [
{
"class_days": "<string>",
"class_end_date": "<string>",
"class_start_date": "<string>",
"class_time": "<string>",
"created_at": "<string>",
"id": "<string>",
"location_id": "<string>",
"remaining_vacancies": 123,
"updated_at": "<string>",
"vacancies": 123
}
],
"updated_at": "<string>"
},
"schedule_id": "<string>"
}
'import requests
url = "https://services.pref.rio/go/api/v1/enrollments/{enrollmentId}/schedule"
payload = {
"enrolled_unit": {
"address": "<string>",
"created_at": "<string>",
"curso_id": 123,
"id": "<string>",
"neighborhood": "<string>",
"neighborhood_zone": "<string>",
"schedules": [
{
"class_days": "<string>",
"class_end_date": "<string>",
"class_start_date": "<string>",
"class_time": "<string>",
"created_at": "<string>",
"id": "<string>",
"location_id": "<string>",
"remaining_vacancies": 123,
"updated_at": "<string>",
"vacancies": 123
}
],
"updated_at": "<string>"
},
"schedule_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enrolled_unit: {
address: '<string>',
created_at: '<string>',
curso_id: 123,
id: '<string>',
neighborhood: '<string>',
neighborhood_zone: '<string>',
schedules: [
{
class_days: '<string>',
class_end_date: '<string>',
class_start_date: '<string>',
class_time: '<string>',
created_at: '<string>',
id: '<string>',
location_id: '<string>',
remaining_vacancies: 123,
updated_at: '<string>',
vacancies: 123
}
],
updated_at: '<string>'
},
schedule_id: '<string>'
})
};
fetch('https://services.pref.rio/go/api/v1/enrollments/{enrollmentId}/schedule', 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://services.pref.rio/go/api/v1/enrollments/{enrollmentId}/schedule",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'enrolled_unit' => [
'address' => '<string>',
'created_at' => '<string>',
'curso_id' => 123,
'id' => '<string>',
'neighborhood' => '<string>',
'neighborhood_zone' => '<string>',
'schedules' => [
[
'class_days' => '<string>',
'class_end_date' => '<string>',
'class_start_date' => '<string>',
'class_time' => '<string>',
'created_at' => '<string>',
'id' => '<string>',
'location_id' => '<string>',
'remaining_vacancies' => 123,
'updated_at' => '<string>',
'vacancies' => 123
]
],
'updated_at' => '<string>'
],
'schedule_id' => '<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://services.pref.rio/go/api/v1/enrollments/{enrollmentId}/schedule"
payload := strings.NewReader("{\n \"enrolled_unit\": {\n \"address\": \"<string>\",\n \"created_at\": \"<string>\",\n \"curso_id\": 123,\n \"id\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"neighborhood_zone\": \"<string>\",\n \"schedules\": [\n {\n \"class_days\": \"<string>\",\n \"class_end_date\": \"<string>\",\n \"class_start_date\": \"<string>\",\n \"class_time\": \"<string>\",\n \"created_at\": \"<string>\",\n \"id\": \"<string>\",\n \"location_id\": \"<string>\",\n \"remaining_vacancies\": 123,\n \"updated_at\": \"<string>\",\n \"vacancies\": 123\n }\n ],\n \"updated_at\": \"<string>\"\n },\n \"schedule_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://services.pref.rio/go/api/v1/enrollments/{enrollmentId}/schedule")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enrolled_unit\": {\n \"address\": \"<string>\",\n \"created_at\": \"<string>\",\n \"curso_id\": 123,\n \"id\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"neighborhood_zone\": \"<string>\",\n \"schedules\": [\n {\n \"class_days\": \"<string>\",\n \"class_end_date\": \"<string>\",\n \"class_start_date\": \"<string>\",\n \"class_time\": \"<string>\",\n \"created_at\": \"<string>\",\n \"id\": \"<string>\",\n \"location_id\": \"<string>\",\n \"remaining_vacancies\": 123,\n \"updated_at\": \"<string>\",\n \"vacancies\": 123\n }\n ],\n \"updated_at\": \"<string>\"\n },\n \"schedule_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.pref.rio/go/api/v1/enrollments/{enrollmentId}/schedule")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enrolled_unit\": {\n \"address\": \"<string>\",\n \"created_at\": \"<string>\",\n \"curso_id\": 123,\n \"id\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"neighborhood_zone\": \"<string>\",\n \"schedules\": [\n {\n \"class_days\": \"<string>\",\n \"class_end_date\": \"<string>\",\n \"class_start_date\": \"<string>\",\n \"class_time\": \"<string>\",\n \"created_at\": \"<string>\",\n \"id\": \"<string>\",\n \"location_id\": \"<string>\",\n \"remaining_vacancies\": 123,\n \"updated_at\": \"<string>\",\n \"vacancies\": 123\n }\n ],\n \"updated_at\": \"<string>\"\n },\n \"schedule_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"address": "Rua das Flores, 123",
"admin_notes": "<string>",
"age": 25,
"certificate_url": "<string>",
"concluded_at": "<string>",
"course_id": 123,
"cpf": "<string>",
"curso": {
"accessibility": "<string>",
"auto_approve_enrollments": false,
"carga_horaria": 123,
"certificacao_oferecida": true,
"contato_duvidas": "<string>",
"cover_image": "<string>",
"created_at": "<string>",
"data_inicio": "<string>",
"data_limite_inscricoes": "<string>",
"data_termino": "<string>",
"description": "<string>",
"enrollment_end_date": "<string>",
"enrollment_start_date": "<string>",
"expected_results": "<string>",
"external_partner_contact": "<string>",
"external_partner_logo_url": "<string>",
"external_partner_name": "<string>",
"external_partner_url": "<string>",
"facilitator": "<string>",
"formacao_link": "<string>",
"has_certificate": true,
"id": 123,
"instituicao_id": 123,
"institutional_logo": "<string>",
"is_external_partner": true,
"is_visible": true,
"link_inscricao": "<string>",
"local_realizacao": "<string>",
"material_used": "<string>",
"methodology": "<string>",
"numero_vagas": 123,
"objectives": "<string>",
"organization": "<string>",
"orgao_id": "<string>",
"pre_requisitos": "<string>",
"program_content": "<string>",
"resources_used": "<string>",
"target_audience": "<string>",
"teaching_material": "<string>",
"theme": "<string>",
"title": "<string>",
"updated_at": "<string>",
"workload": "<string>"
},
"custom_fields": {},
"email": "<string>",
"enrolled_at": "<string>",
"enrolled_unit": {
"address": "<string>",
"created_at": "<string>",
"curso_id": 123,
"id": "<string>",
"neighborhood": "<string>",
"neighborhood_zone": "<string>",
"schedules": [
{
"class_days": "<string>",
"class_end_date": "<string>",
"class_start_date": "<string>",
"class_time": "<string>",
"created_at": "<string>",
"id": "<string>",
"location_id": "<string>",
"remaining_vacancies": 123,
"updated_at": "<string>",
"vacancies": 123
}
],
"updated_at": "<string>"
},
"id": "<string>",
"name": "<string>",
"neighborhood": "Centro",
"personal_info": {
"celular": "<string>",
"data_nascimento": "<string>",
"deficiencia": "<string>",
"email": "<string>",
"endereco": {
"bairro": "<string>",
"cep": "<string>",
"complemento": "<string>",
"estado": "<string>",
"logradouro": "<string>",
"municipio": "<string>",
"numero": "<string>",
"tipo_logradouro": "<string>"
},
"escolaridade": "<string>",
"genero": "<string>",
"nome": "<string>",
"nome_social": "<string>",
"raca": "<string>",
"renda_familiar": "<string>"
},
"phone": "<string>",
"reason": "<string>",
"schedule_id": "<string>",
"updated_at": "<string>"
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}enrollments
Trocar turma/horário de inscrição
Permite ao cidadão trocar de turma em uma inscrição existente. Deve ser feito com pelo menos 72h de antecedência do início da aula. Se a inscrição estava aprovada, volta para status pendente.
PUT
/
api
/
v1
/
enrollments
/
{enrollmentId}
/
schedule
Trocar turma/horário de inscrição
curl --request PUT \
--url https://services.pref.rio/go/api/v1/enrollments/{enrollmentId}/schedule \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enrolled_unit": {
"address": "<string>",
"created_at": "<string>",
"curso_id": 123,
"id": "<string>",
"neighborhood": "<string>",
"neighborhood_zone": "<string>",
"schedules": [
{
"class_days": "<string>",
"class_end_date": "<string>",
"class_start_date": "<string>",
"class_time": "<string>",
"created_at": "<string>",
"id": "<string>",
"location_id": "<string>",
"remaining_vacancies": 123,
"updated_at": "<string>",
"vacancies": 123
}
],
"updated_at": "<string>"
},
"schedule_id": "<string>"
}
'import requests
url = "https://services.pref.rio/go/api/v1/enrollments/{enrollmentId}/schedule"
payload = {
"enrolled_unit": {
"address": "<string>",
"created_at": "<string>",
"curso_id": 123,
"id": "<string>",
"neighborhood": "<string>",
"neighborhood_zone": "<string>",
"schedules": [
{
"class_days": "<string>",
"class_end_date": "<string>",
"class_start_date": "<string>",
"class_time": "<string>",
"created_at": "<string>",
"id": "<string>",
"location_id": "<string>",
"remaining_vacancies": 123,
"updated_at": "<string>",
"vacancies": 123
}
],
"updated_at": "<string>"
},
"schedule_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enrolled_unit: {
address: '<string>',
created_at: '<string>',
curso_id: 123,
id: '<string>',
neighborhood: '<string>',
neighborhood_zone: '<string>',
schedules: [
{
class_days: '<string>',
class_end_date: '<string>',
class_start_date: '<string>',
class_time: '<string>',
created_at: '<string>',
id: '<string>',
location_id: '<string>',
remaining_vacancies: 123,
updated_at: '<string>',
vacancies: 123
}
],
updated_at: '<string>'
},
schedule_id: '<string>'
})
};
fetch('https://services.pref.rio/go/api/v1/enrollments/{enrollmentId}/schedule', 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://services.pref.rio/go/api/v1/enrollments/{enrollmentId}/schedule",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'enrolled_unit' => [
'address' => '<string>',
'created_at' => '<string>',
'curso_id' => 123,
'id' => '<string>',
'neighborhood' => '<string>',
'neighborhood_zone' => '<string>',
'schedules' => [
[
'class_days' => '<string>',
'class_end_date' => '<string>',
'class_start_date' => '<string>',
'class_time' => '<string>',
'created_at' => '<string>',
'id' => '<string>',
'location_id' => '<string>',
'remaining_vacancies' => 123,
'updated_at' => '<string>',
'vacancies' => 123
]
],
'updated_at' => '<string>'
],
'schedule_id' => '<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://services.pref.rio/go/api/v1/enrollments/{enrollmentId}/schedule"
payload := strings.NewReader("{\n \"enrolled_unit\": {\n \"address\": \"<string>\",\n \"created_at\": \"<string>\",\n \"curso_id\": 123,\n \"id\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"neighborhood_zone\": \"<string>\",\n \"schedules\": [\n {\n \"class_days\": \"<string>\",\n \"class_end_date\": \"<string>\",\n \"class_start_date\": \"<string>\",\n \"class_time\": \"<string>\",\n \"created_at\": \"<string>\",\n \"id\": \"<string>\",\n \"location_id\": \"<string>\",\n \"remaining_vacancies\": 123,\n \"updated_at\": \"<string>\",\n \"vacancies\": 123\n }\n ],\n \"updated_at\": \"<string>\"\n },\n \"schedule_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://services.pref.rio/go/api/v1/enrollments/{enrollmentId}/schedule")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enrolled_unit\": {\n \"address\": \"<string>\",\n \"created_at\": \"<string>\",\n \"curso_id\": 123,\n \"id\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"neighborhood_zone\": \"<string>\",\n \"schedules\": [\n {\n \"class_days\": \"<string>\",\n \"class_end_date\": \"<string>\",\n \"class_start_date\": \"<string>\",\n \"class_time\": \"<string>\",\n \"created_at\": \"<string>\",\n \"id\": \"<string>\",\n \"location_id\": \"<string>\",\n \"remaining_vacancies\": 123,\n \"updated_at\": \"<string>\",\n \"vacancies\": 123\n }\n ],\n \"updated_at\": \"<string>\"\n },\n \"schedule_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.pref.rio/go/api/v1/enrollments/{enrollmentId}/schedule")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enrolled_unit\": {\n \"address\": \"<string>\",\n \"created_at\": \"<string>\",\n \"curso_id\": 123,\n \"id\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"neighborhood_zone\": \"<string>\",\n \"schedules\": [\n {\n \"class_days\": \"<string>\",\n \"class_end_date\": \"<string>\",\n \"class_start_date\": \"<string>\",\n \"class_time\": \"<string>\",\n \"created_at\": \"<string>\",\n \"id\": \"<string>\",\n \"location_id\": \"<string>\",\n \"remaining_vacancies\": 123,\n \"updated_at\": \"<string>\",\n \"vacancies\": 123\n }\n ],\n \"updated_at\": \"<string>\"\n },\n \"schedule_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"address": "Rua das Flores, 123",
"admin_notes": "<string>",
"age": 25,
"certificate_url": "<string>",
"concluded_at": "<string>",
"course_id": 123,
"cpf": "<string>",
"curso": {
"accessibility": "<string>",
"auto_approve_enrollments": false,
"carga_horaria": 123,
"certificacao_oferecida": true,
"contato_duvidas": "<string>",
"cover_image": "<string>",
"created_at": "<string>",
"data_inicio": "<string>",
"data_limite_inscricoes": "<string>",
"data_termino": "<string>",
"description": "<string>",
"enrollment_end_date": "<string>",
"enrollment_start_date": "<string>",
"expected_results": "<string>",
"external_partner_contact": "<string>",
"external_partner_logo_url": "<string>",
"external_partner_name": "<string>",
"external_partner_url": "<string>",
"facilitator": "<string>",
"formacao_link": "<string>",
"has_certificate": true,
"id": 123,
"instituicao_id": 123,
"institutional_logo": "<string>",
"is_external_partner": true,
"is_visible": true,
"link_inscricao": "<string>",
"local_realizacao": "<string>",
"material_used": "<string>",
"methodology": "<string>",
"numero_vagas": 123,
"objectives": "<string>",
"organization": "<string>",
"orgao_id": "<string>",
"pre_requisitos": "<string>",
"program_content": "<string>",
"resources_used": "<string>",
"target_audience": "<string>",
"teaching_material": "<string>",
"theme": "<string>",
"title": "<string>",
"updated_at": "<string>",
"workload": "<string>"
},
"custom_fields": {},
"email": "<string>",
"enrolled_at": "<string>",
"enrolled_unit": {
"address": "<string>",
"created_at": "<string>",
"curso_id": 123,
"id": "<string>",
"neighborhood": "<string>",
"neighborhood_zone": "<string>",
"schedules": [
{
"class_days": "<string>",
"class_end_date": "<string>",
"class_start_date": "<string>",
"class_time": "<string>",
"created_at": "<string>",
"id": "<string>",
"location_id": "<string>",
"remaining_vacancies": 123,
"updated_at": "<string>",
"vacancies": 123
}
],
"updated_at": "<string>"
},
"id": "<string>",
"name": "<string>",
"neighborhood": "Centro",
"personal_info": {
"celular": "<string>",
"data_nascimento": "<string>",
"deficiencia": "<string>",
"email": "<string>",
"endereco": {
"bairro": "<string>",
"cep": "<string>",
"complemento": "<string>",
"estado": "<string>",
"logradouro": "<string>",
"municipio": "<string>",
"numero": "<string>",
"tipo_logradouro": "<string>"
},
"escolaridade": "<string>",
"genero": "<string>",
"nome": "<string>",
"nome_social": "<string>",
"raca": "<string>",
"renda_familiar": "<string>"
},
"phone": "<string>",
"reason": "<string>",
"schedule_id": "<string>",
"updated_at": "<string>"
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
UUID da inscrição
Body
application/json
Dados da nova turma
Response
OK
Endereço completo
Example:
"Rua das Flores, 123"
Additional enrollment fields for manual/bulk import
Example:
25
Relacionamentos
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Bairro
Example:
"Centro"
Computed field (not stored in DB) - populated from CitizenSnapshot
Show child attributes
Show child attributes
Available options:
pending, approved, rejected, cancelled, concluded ⌘I
