curl --request GET \
--url https://api.spedy.com.br/v1/inbound-product-invoices/{id} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.spedy.com.br/v1/inbound-product-invoices/{id}"
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/{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.spedy.com.br/v1/inbound-product-invoices/{id}",
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/{id}"
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/{id}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spedy.com.br/v1/inbound-product-invoices/{id}")
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{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model": "productInvoice",
"company": {
"name": "<string>",
"legalName": "<string>",
"federalTaxNumber": "<string>",
"stateTaxNumber": "<string>",
"cityTaxNumber": "<string>"
},
"environmentType": "production",
"accessKey": "<string>",
"nsu": 123,
"isComplete": true,
"status": "authorized",
"issuer": {
"name": "<string>",
"legalName": "<string>",
"federalTaxNumber": "<string>",
"stateTaxNumber": "<string>",
"cityTaxNumber": "<string>",
"address": {
"street": "<string>",
"district": "<string>",
"postalCode": "<string>",
"number": "<string>",
"additionalInformation": "<string>",
"city": {
"code": "<string>",
"name": "<string>",
"state": "ro"
},
"country": {
"name": "<string>",
"code": 123
},
"cityName": "<string>"
}
},
"issuedOn": "2023-11-07T05:31:56Z",
"amount": 123,
"operationType": "incoming",
"manifestation": {
"status": "none",
"date": "2023-11-07T05:31:56Z",
"protocol": "<string>",
"justification": "<string>"
},
"events": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "cancellation",
"eventCode": "<string>",
"sequenceNumber": 123,
"date": "2023-11-07T05:31:56Z",
"protocol": "<string>",
"description": "<string>"
}
],
"creationTime": "2023-11-07T05:31:56Z",
"lastModificationTime": "2023-11-07T05:31:56Z"
}Obter NF-e Recebida
Retorna os dados completos de uma nota recebida: emissor com endereço, a manifestação registrada e todos os eventos vinculados à nota, como cancelamento e carta de correção.
curl --request GET \
--url https://api.spedy.com.br/v1/inbound-product-invoices/{id} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.spedy.com.br/v1/inbound-product-invoices/{id}"
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/{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.spedy.com.br/v1/inbound-product-invoices/{id}",
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/{id}"
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/{id}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spedy.com.br/v1/inbound-product-invoices/{id}")
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{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model": "productInvoice",
"company": {
"name": "<string>",
"legalName": "<string>",
"federalTaxNumber": "<string>",
"stateTaxNumber": "<string>",
"cityTaxNumber": "<string>"
},
"environmentType": "production",
"accessKey": "<string>",
"nsu": 123,
"isComplete": true,
"status": "authorized",
"issuer": {
"name": "<string>",
"legalName": "<string>",
"federalTaxNumber": "<string>",
"stateTaxNumber": "<string>",
"cityTaxNumber": "<string>",
"address": {
"street": "<string>",
"district": "<string>",
"postalCode": "<string>",
"number": "<string>",
"additionalInformation": "<string>",
"city": {
"code": "<string>",
"name": "<string>",
"state": "ro"
},
"country": {
"name": "<string>",
"code": 123
},
"cityName": "<string>"
}
},
"issuedOn": "2023-11-07T05:31:56Z",
"amount": 123,
"operationType": "incoming",
"manifestation": {
"status": "none",
"date": "2023-11-07T05:31:56Z",
"protocol": "<string>",
"justification": "<string>"
},
"events": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "cancellation",
"eventCode": "<string>",
"sequenceNumber": 123,
"date": "2023-11-07T05:31:56Z",
"protocol": "<string>",
"description": "<string>"
}
],
"creationTime": "2023-11-07T05:31:56Z",
"lastModificationTime": "2023-11-07T05:31:56Z"
}Authorizations
Authorization By X-Api-Key inside request's header
Path Parameters
Response
OK
Identificador da nota recebida no Spedy.
Modelo do documento recebido: productInvoice para NF-e e serviceInvoice para NFS-e.
Os webhooks de nota recebida são os mesmos para os dois modelos, então este campo é o
que identifica o que chegou.
Valores possíveis:
- productInvoice: NF-e
- consumerInvoice: NFC-e
- serviceInvoice: NFS-e
productInvoice, consumerInvoice, serviceInvoice Sua empresa (destinatária).
Show child attributes
Show child attributes
Ambiente (produção ou homologação).
Valores possíveis:
- production: Produção
- development: Homologação
- simulation:
production, development, simulation Chave de acesso da NF-e (44 dígitos).
NSU do documento na distribuição da SEFAZ (rastreio).
Indica se o XML completo (autorizado) já está disponível. Fica verdadeiro após a manifestação.
Situação da nota na SEFAZ: Authorized, Denied ou Canceled.
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 Emissor (fornecedor) da nota, com endereço.
Show child attributes
Show child attributes
Data de emissão da nota.
Valor total da nota.
Tipo de operação (tpNF) na ótica do emitente: Incoming (entrada) ou Outgoing (saída).
Valores possíveis:
- incoming: Entrada
- outgoing: Saída
incoming, outgoing Manifestação do destinatário registrada para a nota.
Show child attributes
Show child attributes
Eventos vinculados à nota (cancelamento, carta de correção de terceiros, a própria manifestação, etc.).
Show child attributes
Show child attributes
Data em que a nota foi detectada/criada no Spedy.
Data da última atualização da nota.