curl --request GET \
--url https://api.spedy.com.br/v1/inbound-product-invoices \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.spedy.com.br/v1/inbound-product-invoices"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.spedy.com.br/v1/inbound-product-invoices', 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.spedy.com.br/v1/inbound-product-invoices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$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.spedy.com.br/v1/inbound-product-invoices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
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.spedy.com.br/v1/inbound-product-invoices")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spedy.com.br/v1/inbound-product-invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model": "productInvoice",
"environmentType": "production",
"accessKey": "<string>",
"nsu": 123,
"isComplete": true,
"status": "authorized",
"issuedOn": "2023-11-07T05:31:56Z",
"amount": 123,
"operationType": "incoming",
"issuer": {
"name": "<string>",
"legalName": "<string>",
"federalTaxNumber": "<string>"
},
"manifestation": {
"status": "none",
"date": "2023-11-07T05:31:56Z",
"protocol": "<string>",
"justification": "<string>"
},
"creationTime": "2023-11-07T05:31:56Z",
"lastModificationTime": "2023-11-07T05:31:56Z"
}
],
"nextCursor": "<string>",
"hasNext": true
}Listar NF-e Recebidas
Lista as notas emitidas contra o CNPJ da empresa, da mais recente para a mais antiga.
A paginação é por cursor: envie em cursor o nextCursor devolvido na resposta anterior.
Quando nextCursor vier nulo, não há mais páginas.
curl --request GET \
--url https://api.spedy.com.br/v1/inbound-product-invoices \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.spedy.com.br/v1/inbound-product-invoices"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.spedy.com.br/v1/inbound-product-invoices', 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.spedy.com.br/v1/inbound-product-invoices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$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.spedy.com.br/v1/inbound-product-invoices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
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.spedy.com.br/v1/inbound-product-invoices")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spedy.com.br/v1/inbound-product-invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model": "productInvoice",
"environmentType": "production",
"accessKey": "<string>",
"nsu": 123,
"isComplete": true,
"status": "authorized",
"issuedOn": "2023-11-07T05:31:56Z",
"amount": 123,
"operationType": "incoming",
"issuer": {
"name": "<string>",
"legalName": "<string>",
"federalTaxNumber": "<string>"
},
"manifestation": {
"status": "none",
"date": "2023-11-07T05:31:56Z",
"protocol": "<string>",
"justification": "<string>"
},
"creationTime": "2023-11-07T05:31:56Z",
"lastModificationTime": "2023-11-07T05:31:56Z"
}
],
"nextCursor": "<string>",
"hasNext": true
}Authorizations
Authorization By X-Api-Key inside request's header
Query Parameters
Filtra pela chave de acesso da NF-e (44 dígitos).
Filtra pela situação da nota na SEFAZ (Authorized, Denied, Canceled). Aceita múltiplos valores.
Valores possíveis:
- authorized: Nota autorizada na SEFAZ.
- denied: Nota denegada pela SEFAZ (emitente com pendência cadastral ou tributária).
- canceled: Nota cancelada pelo emitente.
authorized, denied, canceled Filtra pelo status de manifestação do destinatário.
Valores possíveis:
- none:
- acknowledged:
- confirmed:
- unknown:
- notPerformed:
- rejected:
none, acknowledged, confirmed, unknown, notPerformed, rejected Filtra pelo tipo de operação (tpNF) na ótica do emitente. Tipo de operação da nota fiscal
Valores possíveis:
- incoming: Entrada
- outgoing: Saída
incoming, outgoing Ambiente das notas (produção ou homologação). Opcional — se omitido, retorna notas de todos os ambientes.
Valores possíveis:
- production: Produção
- development: Homologação
- simulation:
production, development, simulation Data de emissão inicial do período (inclusive).
Data de emissão final do período (inclusive).
Envie o nextCursor recebido na resposta anterior para obter a próxima página. Vazio ou ausente retorna a primeira. Não interprete o conteúdo: o formato pode mudar sem aviso.
Quantidade de itens por página (padrão 20, máximo 200).
Response
OK
Resposta de listagem paginada por cursor. Substitui o padrão de offset (page/pageSize/totalCount): em vez de pedir uma página por número, o cliente devolve o GetNotas.Application.Model.CursorPage`1.NextCursor recebido na requisição anterior.