Publicar oportunidade MEI
curl --request PUT \
--url https://services.pref.rio/go/api/v1/oportunidades-mei/{id}/publish \
--header 'Authorization: Bearer <token>'import requests
url = "https://services.pref.rio/go/api/v1/oportunidades-mei/{id}/publish"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://services.pref.rio/go/api/v1/oportunidades-mei/{id}/publish', 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/oportunidades-mei/{id}/publish",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
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/go/api/v1/oportunidades-mei/{id}/publish"
req, _ := http.NewRequest("PUT", 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.put("https://services.pref.rio/go/api/v1/oportunidades-mei/{id}/publish")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.pref.rio/go/api/v1/oportunidades-mei/{id}/publish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"bairro": "Centro",
"cidade": "Rio de Janeiro",
"cnae_ids": [
"8130300",
"8121400"
],
"complemento": "Próximo ao Paço Imperial",
"cover_image": "https://example.com/imagem.jpg",
"created_at": "2024-01-01T10:00:00Z",
"data_expiracao": "2024-12-31T23:59:59Z",
"data_limite_execucao": "2024-12-31T23:59:59Z",
"deleted_at": "2024-12-31T23:59:59Z",
"descricao_servico": "Serviço de poda, jardinagem e manutenção das áreas verdes",
"estado": "RJ",
"forma_pagamento": "PIX",
"gallery_images": [
"https://example.com/img1.jpg",
"https://example.com/img2.jpg"
],
"id": 1,
"logradouro": "Praça XV de Novembro",
"numero": "S/N",
"orgao_id": "SECONSERVA",
"outras_informacoes": "Trabalho a ser realizado nos finais de semana",
"prazo_pagamento": "30 dias após conclusão",
"status": "active",
"titulo": "Manutenção de Jardins da Praça XV",
"updated_at": "2024-01-01T10:00:00Z"
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}oportunidades-mei
Publicar oportunidade MEI
Publica uma oportunidade MEI que estava em rascunho
PUT
/
api
/
v1
/
oportunidades-mei
/
{id}
/
publish
Publicar oportunidade MEI
curl --request PUT \
--url https://services.pref.rio/go/api/v1/oportunidades-mei/{id}/publish \
--header 'Authorization: Bearer <token>'import requests
url = "https://services.pref.rio/go/api/v1/oportunidades-mei/{id}/publish"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://services.pref.rio/go/api/v1/oportunidades-mei/{id}/publish', 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/oportunidades-mei/{id}/publish",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
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/go/api/v1/oportunidades-mei/{id}/publish"
req, _ := http.NewRequest("PUT", 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.put("https://services.pref.rio/go/api/v1/oportunidades-mei/{id}/publish")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.pref.rio/go/api/v1/oportunidades-mei/{id}/publish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"bairro": "Centro",
"cidade": "Rio de Janeiro",
"cnae_ids": [
"8130300",
"8121400"
],
"complemento": "Próximo ao Paço Imperial",
"cover_image": "https://example.com/imagem.jpg",
"created_at": "2024-01-01T10:00:00Z",
"data_expiracao": "2024-12-31T23:59:59Z",
"data_limite_execucao": "2024-12-31T23:59:59Z",
"deleted_at": "2024-12-31T23:59:59Z",
"descricao_servico": "Serviço de poda, jardinagem e manutenção das áreas verdes",
"estado": "RJ",
"forma_pagamento": "PIX",
"gallery_images": [
"https://example.com/img1.jpg",
"https://example.com/img2.jpg"
],
"id": 1,
"logradouro": "Praça XV de Novembro",
"numero": "S/N",
"orgao_id": "SECONSERVA",
"outras_informacoes": "Trabalho a ser realizado nos finais de semana",
"prazo_pagamento": "30 dias após conclusão",
"status": "active",
"titulo": "Manutenção de Jardins da Praça XV",
"updated_at": "2024-01-01T10:00:00Z"
}{
"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
ID da oportunidade
Response
OK
Example:
"Centro"
Example:
"Rio de Janeiro"
Example:
["8130300", "8121400"]
Example:
"Próximo ao Paço Imperial"
Imagens
Example:
"https://example.com/imagem.jpg"
Example:
"2024-01-01T10:00:00Z"
Example:
"2024-12-31T23:59:59Z"
Example:
"2024-12-31T23:59:59Z"
Example:
"2024-12-31T23:59:59Z"
Example:
"Serviço de poda, jardinagem e manutenção das áreas verdes"
Example:
"RJ"
Pagamento e prazos
Available options:
CHEQUE, DINHEIRO, CARTAO, PIX, TRANSFERENCIA, Example:
"PIX"
Example:
[
"https://example.com/img1.jpg",
"https://example.com/img2.jpg"
]
Example:
1
Local de execução
Example:
"Praça XV de Novembro"
Example:
"S/N"
Relacionamentos
Example:
"SECONSERVA"
Example:
"Trabalho a ser realizado nos finais de semana"
Example:
"30 dias após conclusão"
Status e controle
Available options:
draft, active, expired Example:
"active"
Example:
"Manutenção de Jardins da Praça XV"
Example:
"2024-01-01T10:00:00Z"
