Excluir Fornecedor
curl --request DELETE \
--url https://api.gestio.com.br/v2/fornecedor/{codigo} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gestio.com.br/v2/fornecedor/{codigo}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gestio.com.br/v2/fornecedor/{codigo}', 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/fornecedor/{codigo}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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/fornecedor/{codigo}"
req, _ := http.NewRequest("DELETE", 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.delete("https://api.gestio.com.br/v2/fornecedor/{codigo}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gestio.com.br/v2/fornecedor/{codigo}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"nomeFornecedor": "Distribuidora Sul Materiais Ltda",
"codigoDoFornecedor": 3051,
"nomeFantasia": "Distribuidora Sul",
"natureza": "J",
"cnpj": "98765432000188",
"cpf": "98765432155",
"inscricaoEstadual": "<string>",
"inscricaoMunicipal": "<string>",
"endereco": {
"cep": "01311000",
"logradouro": "Av. Paulista",
"numero": "1578",
"complemento": "Conjunto 41",
"bairro": "Bela Vista",
"cidade": "São Paulo",
"uf": "SP",
"codigoDoMunicipio": "3550308"
},
"contato": "Carlos Souza",
"emailContato": "[email protected]",
"telefone": "(51) 3011-2233",
"receberEmailCotacao": true,
"codigoDoTipoDeFornecedor": 123,
"descricaoDoTipoDeFornecedor": "<string>",
"transportadora": true,
"seuCodigo": "<string>",
"idFornecedorWS": "<string>",
"codigoDoRegimeTributario": 123,
"valorPISRetido": 123,
"valorCOFINSRetido": 123,
"valorCSLLRetido": 123,
"valorIRRetido": 123,
"valorISSRetido": 123,
"valorINSSRetido": 123,
"ultimaAtualizacao": "<string>",
"ativo": true
}
}Fornecedor
Excluir Fornecedor
Exclui um Fornecedor pelo seu código.
DELETE
/
v2
/
fornecedor
/
{codigo}
Excluir Fornecedor
curl --request DELETE \
--url https://api.gestio.com.br/v2/fornecedor/{codigo} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gestio.com.br/v2/fornecedor/{codigo}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gestio.com.br/v2/fornecedor/{codigo}', 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/fornecedor/{codigo}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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/fornecedor/{codigo}"
req, _ := http.NewRequest("DELETE", 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.delete("https://api.gestio.com.br/v2/fornecedor/{codigo}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gestio.com.br/v2/fornecedor/{codigo}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"nomeFornecedor": "Distribuidora Sul Materiais Ltda",
"codigoDoFornecedor": 3051,
"nomeFantasia": "Distribuidora Sul",
"natureza": "J",
"cnpj": "98765432000188",
"cpf": "98765432155",
"inscricaoEstadual": "<string>",
"inscricaoMunicipal": "<string>",
"endereco": {
"cep": "01311000",
"logradouro": "Av. Paulista",
"numero": "1578",
"complemento": "Conjunto 41",
"bairro": "Bela Vista",
"cidade": "São Paulo",
"uf": "SP",
"codigoDoMunicipio": "3550308"
},
"contato": "Carlos Souza",
"emailContato": "[email protected]",
"telefone": "(51) 3011-2233",
"receberEmailCotacao": true,
"codigoDoTipoDeFornecedor": 123,
"descricaoDoTipoDeFornecedor": "<string>",
"transportadora": true,
"seuCodigo": "<string>",
"idFornecedorWS": "<string>",
"codigoDoRegimeTributario": 123,
"valorPISRetido": 123,
"valorCOFINSRetido": 123,
"valorCSLLRetido": 123,
"valorIRRetido": 123,
"valorISSRetido": 123,
"valorINSSRetido": 123,
"ultimaAtualizacao": "<string>",
"ativo": true
}
}Exclusão é irreversível. Confirme que o registro correto foi identificado antes de excluir este registro. Registros já movimentados ou vinculados a outros lançamentos podem não permitir exclusão.
Authorizations
Envie o token retornado por /v2/autenticar no header Authorization, no formato Bearer {token}.
Path Parameters
Código do Fornecedor.
