Lista serviços de uma subcategoria específica
curl --request GET \
--url https://services.pref.rio/app-busca-search/api/v1/subcategories/{subcategory}/services \
--header 'Authorization: Bearer <token>'import requests
url = "https://services.pref.rio/app-busca-search/api/v1/subcategories/{subcategory}/services"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://services.pref.rio/app-busca-search/api/v1/subcategories/{subcategory}/services', 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/app-busca-search/api/v1/subcategories/{subcategory}/services",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://services.pref.rio/app-busca-search/api/v1/subcategories/{subcategory}/services"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://services.pref.rio/app-busca-search/api/v1/subcategories/{subcategory}/services")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.pref.rio/app-busca-search/api/v1/subcategories/{subcategory}/services")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"metadata": {},
"page": 123,
"per_page": 123,
"services": [
{
"category": "<string>",
"created_at": 123,
"description": "<string>",
"id": "<string>",
"metadata": {},
"slug": "<string>",
"status": 123,
"subcategory": "<string>",
"title": "<string>",
"updated_at": 123
}
],
"subcategory": "<string>",
"total_services": 123
}{}{}subcategories
Lista serviços de uma subcategoria específica
Retorna serviços filtrados por subcategoria, com paginação. Serviços são ordenados por última atualização (mais recentes primeiro).
Casos de Uso:
- Listar serviços: GET /api/v1/subcategories/Ensino%20Fundamental/services
- Paginar resultados: GET /api/v1/subcategories/Ensino%20Fundamental/services?page=2&per_page=20
- Incluir inativos: GET /api/v1/subcategories/Ensino%20Fundamental/services?include_inactive=true
- Filtrar por categoria pai: GET /api/v1/subcategories/Certidões/services?category=Documentos
GET
/
api
/
v1
/
subcategories
/
{subcategory}
/
services
Lista serviços de uma subcategoria específica
curl --request GET \
--url https://services.pref.rio/app-busca-search/api/v1/subcategories/{subcategory}/services \
--header 'Authorization: Bearer <token>'import requests
url = "https://services.pref.rio/app-busca-search/api/v1/subcategories/{subcategory}/services"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://services.pref.rio/app-busca-search/api/v1/subcategories/{subcategory}/services', 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/app-busca-search/api/v1/subcategories/{subcategory}/services",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://services.pref.rio/app-busca-search/api/v1/subcategories/{subcategory}/services"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://services.pref.rio/app-busca-search/api/v1/subcategories/{subcategory}/services")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.pref.rio/app-busca-search/api/v1/subcategories/{subcategory}/services")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"metadata": {},
"page": 123,
"per_page": 123,
"services": [
{
"category": "<string>",
"created_at": 123,
"description": "<string>",
"id": "<string>",
"metadata": {},
"slug": "<string>",
"status": 123,
"subcategory": "<string>",
"title": "<string>",
"updated_at": 123
}
],
"subcategory": "<string>",
"total_services": 123
}{}{}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Nome da subcategoria (ex: Ensino Fundamental, Vacinação)
Query Parameters
Nome da categoria pai para desambiguar subcategorias com nomes iguais (ex: Documentos, Educação)
Número da página (mínimo: 1)
Required range:
x >= 1Quantidade de serviços por página (máximo: 100)
Required range:
1 <= x <= 100Incluir serviços inativos/rascunhos (status != 1)
