Obter nota fiscal
curl --request GET \
--url https://api.tiny.com.br/public-api/v3/notas/{idNota} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tiny.com.br/public-api/v3/notas/{idNota}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tiny.com.br/public-api/v3/notas/{idNota}', 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.tiny.com.br/public-api/v3/notas/{idNota}",
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://api.tiny.com.br/public-api/v3/notas/{idNota}"
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://api.tiny.com.br/public-api/v3/notas/{idNota}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tiny.com.br/public-api/v3/notas/{idNota}")
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{
"situacao": 1,
"tipo": "E",
"numero": "<string>",
"serie": "<string>",
"chaveAcesso": "<string>",
"dataEmissao": "<string>",
"dataPrevista": "<string>",
"cliente": {
"nome": "<string>",
"codigo": "<string>",
"fantasia": "<string>",
"tipoPessoa": "J",
"cpfCnpj": "<string>",
"inscricaoEstadual": "<string>",
"rg": "<string>",
"telefone": "<string>",
"celular": "<string>",
"email": "<string>",
"endereco": {
"endereco": "<string>",
"numero": "<string>",
"complemento": "<string>",
"bairro": "<string>",
"municipio": "<string>",
"cep": "<string>",
"uf": "<string>",
"pais": "<string>"
},
"id": 123
},
"enderecoEntrega": {
"endereco": "<string>",
"numero": "<string>",
"complemento": "<string>",
"bairro": "<string>",
"municipio": "<string>",
"cep": "<string>",
"uf": "<string>",
"pais": "<string>",
"nomeDestinatario": "<string>",
"cpfCnpj": "<string>",
"tipoPessoa": "<string>",
"telefone": "<string>",
"inscricaoEstadual": "<string>"
},
"valor": 123,
"valorProdutos": 123,
"valorFrete": 123,
"vendedor": {
"id": 123,
"nome": "<string>"
},
"idFormaEnvio": 123,
"idFormaFrete": 123,
"codigoRastreamento": "<string>",
"urlRastreamento": "<string>",
"fretePorConta": "<string>",
"qtdVolumes": 123,
"pesoBruto": 123,
"pesoLiquido": 123,
"id": 123,
"finalidade": 1,
"regimeTributario": 1,
"dataInclusao": "<string>",
"baseIcms": 123,
"valorIcms": 123,
"baseIcmsSt": 123,
"valorIcmsSt": 123,
"valorServicos": 123,
"valorSeguro": 123,
"valorOutras": 123,
"valorIpi": 123,
"valorIssqn": 123,
"valorDesconto": 123,
"valorFaturado": 123,
"idIntermediador": 123,
"idNaturezaOperacao": 123,
"idFormaPagamento": 123,
"idMeioPagamento": 123,
"observacoes": "<string>",
"condicaoPagamento": "<string>",
"valorNotaComImpostos": 123,
"valorBaseDiferimento": 123,
"percentualICMSPartilhaDestino": 123,
"valorTotalICMSFCPDestino": 123,
"valorIPIDevolvido": 123,
"tipoNotaCredito": "<string>",
"tipoNotaDebito": "<string>",
"valorTotalBCIBSCBS": 123,
"valorTotalIBSUF": 123,
"valorTotalCBS": 123,
"itens": [
{
"idItem": 123,
"idProduto": 123,
"codigo": "<string>",
"ncm": "<string>",
"descricao": "<string>",
"unidade": "<string>",
"quantidade": 123,
"valorUnitario": 123,
"valorTotal": 123,
"cfop": "<string>",
"naturezaOperacao": "<string>"
}
],
"parcelas": [
{
"dias": 123,
"data": "<string>",
"valor": 123,
"observacoes": "<string>",
"idFormaPagamento": "<string>",
"idMeioPagamento": "<string>"
}
],
"pagamentosIntegrados": [
{
"valor": 123,
"tipoPagamento": 123,
"cnpjIntermediador": "<string>",
"codigoAutorizacao": "<string>",
"codigoBandeira": 123
}
],
"ecommerce": {
"id": 123,
"nome": "<string>",
"numeroPedidoEcommerce": "<string>",
"numeroPedidoCanalVenda": "<string>",
"canalVenda": "<string>"
},
"marcadores": [
{
"descricao": "<string>",
"cor": "<string>"
}
],
"transportador": {
"nome": "<string>",
"cpfCnpj": "<string>",
"ie": "<string>",
"endereco": "<string>",
"municipio": "<string>",
"uf": "<string>"
},
"origem": {
"id": "<string>",
"tipo": "pedido_compra"
}
}{
"mensagem": "Ocorreram erros de validação",
"detalhes": [
{
"campo": "codigo",
"mensagem": "O campo código é obrigatório"
}
]
}Notas
Obter nota fiscal
GET
/
notas
/
{idNota}
Obter nota fiscal
curl --request GET \
--url https://api.tiny.com.br/public-api/v3/notas/{idNota} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tiny.com.br/public-api/v3/notas/{idNota}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tiny.com.br/public-api/v3/notas/{idNota}', 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.tiny.com.br/public-api/v3/notas/{idNota}",
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://api.tiny.com.br/public-api/v3/notas/{idNota}"
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://api.tiny.com.br/public-api/v3/notas/{idNota}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tiny.com.br/public-api/v3/notas/{idNota}")
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{
"situacao": 1,
"tipo": "E",
"numero": "<string>",
"serie": "<string>",
"chaveAcesso": "<string>",
"dataEmissao": "<string>",
"dataPrevista": "<string>",
"cliente": {
"nome": "<string>",
"codigo": "<string>",
"fantasia": "<string>",
"tipoPessoa": "J",
"cpfCnpj": "<string>",
"inscricaoEstadual": "<string>",
"rg": "<string>",
"telefone": "<string>",
"celular": "<string>",
"email": "<string>",
"endereco": {
"endereco": "<string>",
"numero": "<string>",
"complemento": "<string>",
"bairro": "<string>",
"municipio": "<string>",
"cep": "<string>",
"uf": "<string>",
"pais": "<string>"
},
"id": 123
},
"enderecoEntrega": {
"endereco": "<string>",
"numero": "<string>",
"complemento": "<string>",
"bairro": "<string>",
"municipio": "<string>",
"cep": "<string>",
"uf": "<string>",
"pais": "<string>",
"nomeDestinatario": "<string>",
"cpfCnpj": "<string>",
"tipoPessoa": "<string>",
"telefone": "<string>",
"inscricaoEstadual": "<string>"
},
"valor": 123,
"valorProdutos": 123,
"valorFrete": 123,
"vendedor": {
"id": 123,
"nome": "<string>"
},
"idFormaEnvio": 123,
"idFormaFrete": 123,
"codigoRastreamento": "<string>",
"urlRastreamento": "<string>",
"fretePorConta": "<string>",
"qtdVolumes": 123,
"pesoBruto": 123,
"pesoLiquido": 123,
"id": 123,
"finalidade": 1,
"regimeTributario": 1,
"dataInclusao": "<string>",
"baseIcms": 123,
"valorIcms": 123,
"baseIcmsSt": 123,
"valorIcmsSt": 123,
"valorServicos": 123,
"valorSeguro": 123,
"valorOutras": 123,
"valorIpi": 123,
"valorIssqn": 123,
"valorDesconto": 123,
"valorFaturado": 123,
"idIntermediador": 123,
"idNaturezaOperacao": 123,
"idFormaPagamento": 123,
"idMeioPagamento": 123,
"observacoes": "<string>",
"condicaoPagamento": "<string>",
"valorNotaComImpostos": 123,
"valorBaseDiferimento": 123,
"percentualICMSPartilhaDestino": 123,
"valorTotalICMSFCPDestino": 123,
"valorIPIDevolvido": 123,
"tipoNotaCredito": "<string>",
"tipoNotaDebito": "<string>",
"valorTotalBCIBSCBS": 123,
"valorTotalIBSUF": 123,
"valorTotalCBS": 123,
"itens": [
{
"idItem": 123,
"idProduto": 123,
"codigo": "<string>",
"ncm": "<string>",
"descricao": "<string>",
"unidade": "<string>",
"quantidade": 123,
"valorUnitario": 123,
"valorTotal": 123,
"cfop": "<string>",
"naturezaOperacao": "<string>"
}
],
"parcelas": [
{
"dias": 123,
"data": "<string>",
"valor": 123,
"observacoes": "<string>",
"idFormaPagamento": "<string>",
"idMeioPagamento": "<string>"
}
],
"pagamentosIntegrados": [
{
"valor": 123,
"tipoPagamento": 123,
"cnpjIntermediador": "<string>",
"codigoAutorizacao": "<string>",
"codigoBandeira": 123
}
],
"ecommerce": {
"id": 123,
"nome": "<string>",
"numeroPedidoEcommerce": "<string>",
"numeroPedidoCanalVenda": "<string>",
"canalVenda": "<string>"
},
"marcadores": [
{
"descricao": "<string>",
"cor": "<string>"
}
],
"transportador": {
"nome": "<string>",
"cpfCnpj": "<string>",
"ie": "<string>",
"endereco": "<string>",
"municipio": "<string>",
"uf": "<string>"
},
"origem": {
"id": "<string>",
"tipo": "pedido_compra"
}
}{
"mensagem": "Ocorreram erros de validação",
"detalhes": [
{
"campo": "codigo",
"mensagem": "O campo código é obrigatório"
}
]
}Path Parameters
Identificador da nota fiscal
Response
OK
- 1 - Pendente
- 2 - Emitida
- 3 - Cancelada
- 4 - Enviada Aguardando Recibo
- 5 - Rejeitada
- 6 - Autorizada
- 7 - Emitida Danfe
- 8 - Registrada
- 9 - Enviada Aguardando Protocolo
- 10 - Denegada
Available options:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10 - E - Entrada
- S - Saida
Available options:
E, S Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
- 1 - Nfe Normal
- 2 - Nfe Complementar
- 3 - Nfe Ajuste
- 4 - Devolucao Retorno
- 5 - Credito
- 6 - Debito
- 7 - Nfe Cupom Referenciado
- 8 - Devolucao Retorno Sem Nfe
- 9 - Nfe Chave Acesso Referenciada
Available options:
1, 2, 3, 4, 5, 6, 7, 8, 9 - 1 - Simples Nacional
- 2 - Simples Nacional Excesso Receita
- 3 - Regime Normal
- 4 - Mei
Available options:
1, 2, 3, 4 Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
