Processar Ordem de Serviço
curl --request POST \
--url https://api.gestio.com.br/v2/faturamento/ordem/processar/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gestio.com.br/v2/faturamento/ordem/processar/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gestio.com.br/v2/faturamento/ordem/processar/{id}', 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.gestio.com.br/v2/faturamento/ordem/processar/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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://api.gestio.com.br/v2/faturamento/ordem/processar/{id}"
req, _ := http.NewRequest("POST", 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.post("https://api.gestio.com.br/v2/faturamento/ordem/processar/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gestio.com.br/v2/faturamento/ordem/processar/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"numeroDaOrdem": 123,
"codigoDaNotaFiscal": 123,
"codigoDaFilial": 123,
"dataDaOrdem": "2023-11-07T05:31:56Z",
"dataDeProcessamento": "2023-11-07T05:31:56Z",
"dataDeCancelamento": "2023-11-07T05:31:56Z",
"codigoDoCliente": 123,
"nomeDoCliente": "<string>",
"nomeDoClienteFmt": "<string>",
"naturezaJuridica": "<string>",
"cnpjcpf": "<string>",
"cep": "<string>",
"logradouro": "<string>",
"numero": "<string>",
"complemento": "<string>",
"bairro": "<string>",
"cidade": "<string>",
"uf": "<string>",
"codigoDoMunicipio": "<string>",
"contato": "<string>",
"telefone": "<string>",
"email": "<string>",
"codigoDoServico": 123,
"codigoDoServicoPrestado": "<string>",
"descricaoDosServicos": "<string>",
"valorDoServico": 123,
"tipoDePagamento": 123,
"codigoDaCondicaoDePagamento": 123,
"codigoDaFormaDePagamento": 123,
"faturamentoNotaFiscalUnica": true,
"servicos": [
{
"numeroDaOrdem": 123,
"seq": 123,
"descricaoDoServico": "<string>",
"quantidade": 123,
"valorDesconto": 123,
"valorDescontoPercentual": 123,
"valorUnitario": 123,
"valorTotal": 123,
"quantidadeProcessadaParcial": 123,
"valorProcessadoParcial": 123,
"quantidadeDisponivelParaProcessamento": 123,
"valorDisponivelParaProcessamento": 123,
"disponivelParaProcessamentoParcial": true
}
],
"parcelas": [
{
"numeroDaParcela": 123,
"dataDeVencimento": "2023-11-07T05:31:56Z",
"percentual": 123,
"valor": 123,
"numeroDoPedido": 123,
"totalDoPedido": 123,
"existeLancamentoCR": true,
"codigoDoExercicioCR": 123,
"codigoDaFilialCR": 123,
"numeroDaMovimentacaoCR": 123,
"sequenciaDaMovimentacaoCR": 123
}
],
"quantidadeDeParcelas": 123,
"consolidado": true,
"pendente": true,
"processado": true,
"cancelado": true,
"idNF": 123,
"avisos": [
"<string>"
],
"ultimaAtualizacao": "<string>"
}
}{
"success": false,
"errors": [
{
"key": "<string>",
"value": "<string>",
"dateOccurred": "2023-11-07T05:31:56Z"
}
]
}Ordem de Serviço
Processar Ordem de Serviço
Processa a Ordem de Serviço identificada pelo número informado, gerando a Nota Fiscal de Serviço quando aplicável.
POST
/
v2
/
faturamento
/
ordem
/
processar
/
{id}
Processar Ordem de Serviço
curl --request POST \
--url https://api.gestio.com.br/v2/faturamento/ordem/processar/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gestio.com.br/v2/faturamento/ordem/processar/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gestio.com.br/v2/faturamento/ordem/processar/{id}', 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.gestio.com.br/v2/faturamento/ordem/processar/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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://api.gestio.com.br/v2/faturamento/ordem/processar/{id}"
req, _ := http.NewRequest("POST", 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.post("https://api.gestio.com.br/v2/faturamento/ordem/processar/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gestio.com.br/v2/faturamento/ordem/processar/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"numeroDaOrdem": 123,
"codigoDaNotaFiscal": 123,
"codigoDaFilial": 123,
"dataDaOrdem": "2023-11-07T05:31:56Z",
"dataDeProcessamento": "2023-11-07T05:31:56Z",
"dataDeCancelamento": "2023-11-07T05:31:56Z",
"codigoDoCliente": 123,
"nomeDoCliente": "<string>",
"nomeDoClienteFmt": "<string>",
"naturezaJuridica": "<string>",
"cnpjcpf": "<string>",
"cep": "<string>",
"logradouro": "<string>",
"numero": "<string>",
"complemento": "<string>",
"bairro": "<string>",
"cidade": "<string>",
"uf": "<string>",
"codigoDoMunicipio": "<string>",
"contato": "<string>",
"telefone": "<string>",
"email": "<string>",
"codigoDoServico": 123,
"codigoDoServicoPrestado": "<string>",
"descricaoDosServicos": "<string>",
"valorDoServico": 123,
"tipoDePagamento": 123,
"codigoDaCondicaoDePagamento": 123,
"codigoDaFormaDePagamento": 123,
"faturamentoNotaFiscalUnica": true,
"servicos": [
{
"numeroDaOrdem": 123,
"seq": 123,
"descricaoDoServico": "<string>",
"quantidade": 123,
"valorDesconto": 123,
"valorDescontoPercentual": 123,
"valorUnitario": 123,
"valorTotal": 123,
"quantidadeProcessadaParcial": 123,
"valorProcessadoParcial": 123,
"quantidadeDisponivelParaProcessamento": 123,
"valorDisponivelParaProcessamento": 123,
"disponivelParaProcessamentoParcial": true
}
],
"parcelas": [
{
"numeroDaParcela": 123,
"dataDeVencimento": "2023-11-07T05:31:56Z",
"percentual": 123,
"valor": 123,
"numeroDoPedido": 123,
"totalDoPedido": 123,
"existeLancamentoCR": true,
"codigoDoExercicioCR": 123,
"codigoDaFilialCR": 123,
"numeroDaMovimentacaoCR": 123,
"sequenciaDaMovimentacaoCR": 123
}
],
"quantidadeDeParcelas": 123,
"consolidado": true,
"pendente": true,
"processado": true,
"cancelado": true,
"idNF": 123,
"avisos": [
"<string>"
],
"ultimaAtualizacao": "<string>"
}
}{
"success": false,
"errors": [
{
"key": "<string>",
"value": "<string>",
"dateOccurred": "2023-11-07T05:31:56Z"
}
]
}Esta rota emite/processa a Ordem de Serviço de forma definitiva. Garanta que os dados foram conferidos — o documento passa a valer perante a SEFAZ/prefeitura e o cancelamento segue regras fiscais próprias.
Authorizations
Envie o token retornado por /v2/autenticar no header Authorization, no formato Bearer {token}.
Path Parameters
Número da Ordem de Serviço.
