curl --request GET \
--url https://api.spedy.com.br/v1/product-invoices/{id} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.spedy.com.br/v1/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/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/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/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/product-invoices/{id}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spedy.com.br/v1/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",
"integrationId": "<string>",
"status": "created",
"model": "productInvoice",
"environmentType": "production",
"issuedOn": "2023-11-07T05:31:56Z",
"effectiveDate": "2023-11-07T05:31:56Z",
"receiver": {
"name": "<string>",
"federalTaxNumber": "<string>",
"stateTaxNumber": "<string>",
"suframaTaxNumber": "<string>",
"cityTaxNumber": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"address": {
"street": "<string>",
"district": "<string>",
"postalCode": "<string>",
"number": "<string>",
"additionalInformation": "<string>",
"city": {
"name": "<string>",
"state": "<string>",
"code": 123
},
"country": "<string>"
}
},
"company": {
"name": "<string>",
"legalName": "<string>",
"federalTaxNumber": "<string>",
"stateTaxNumber": "<string>",
"cityTaxNumber": "<string>"
},
"order": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"date": "2023-11-07T05:31:56Z",
"transactionId": "<string>"
},
"authorization": {
"date": "2023-11-07T05:31:56Z",
"protocol": "<string>",
"digestValue": "<string>"
},
"cancellation": {
"date": "2023-11-07T05:31:56Z",
"protocol": "<string>",
"justification": "<string>"
},
"amount": 123,
"number": 123,
"processingDetail": {
"status": "processing",
"message": "<string>",
"code": "<string>",
"on": "2023-11-07T05:31:56Z"
},
"isFromApi": true,
"accessKey": "<string>",
"series": "<string>",
"operationType": "incoming",
"printingType": "none",
"issueType": "normal",
"purposeType": "normal",
"pickup": {
"name": "<string>",
"federalTaxNumber": "<string>",
"stateTaxNumber": "<string>",
"cityTaxNumber": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"address": {
"street": "<string>",
"district": "<string>",
"postalCode": "<string>",
"number": "<string>",
"additionalInformation": "<string>",
"city": {
"name": "<string>",
"state": "<string>",
"code": 123
},
"country": "<string>"
}
},
"delivery": {
"name": "<string>",
"federalTaxNumber": "<string>",
"stateTaxNumber": "<string>",
"cityTaxNumber": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"address": {
"street": "<string>",
"district": "<string>",
"postalCode": "<string>",
"number": "<string>",
"additionalInformation": "<string>",
"city": {
"name": "<string>",
"state": "<string>",
"code": 123
},
"country": "<string>"
}
},
"debitType": "creditTransferToCooperatives",
"creditType": "finesAndInterest",
"govPurchase": {
"type": "union",
"rate": 123
},
"govOperationType": "supply",
"contingency": {
"date": "2023-11-07T05:31:56Z",
"reason": "<string>"
},
"authorizedPersons": [
"<string>"
]
}Obter NF-e
Retorna a nota pelo id, com o status atual e o resultado do último processamento
(processingDetail). Use para acompanhar o status quando não usa webhooks.
curl --request GET \
--url https://api.spedy.com.br/v1/product-invoices/{id} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.spedy.com.br/v1/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/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/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/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/product-invoices/{id}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spedy.com.br/v1/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",
"integrationId": "<string>",
"status": "created",
"model": "productInvoice",
"environmentType": "production",
"issuedOn": "2023-11-07T05:31:56Z",
"effectiveDate": "2023-11-07T05:31:56Z",
"receiver": {
"name": "<string>",
"federalTaxNumber": "<string>",
"stateTaxNumber": "<string>",
"suframaTaxNumber": "<string>",
"cityTaxNumber": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"address": {
"street": "<string>",
"district": "<string>",
"postalCode": "<string>",
"number": "<string>",
"additionalInformation": "<string>",
"city": {
"name": "<string>",
"state": "<string>",
"code": 123
},
"country": "<string>"
}
},
"company": {
"name": "<string>",
"legalName": "<string>",
"federalTaxNumber": "<string>",
"stateTaxNumber": "<string>",
"cityTaxNumber": "<string>"
},
"order": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"date": "2023-11-07T05:31:56Z",
"transactionId": "<string>"
},
"authorization": {
"date": "2023-11-07T05:31:56Z",
"protocol": "<string>",
"digestValue": "<string>"
},
"cancellation": {
"date": "2023-11-07T05:31:56Z",
"protocol": "<string>",
"justification": "<string>"
},
"amount": 123,
"number": 123,
"processingDetail": {
"status": "processing",
"message": "<string>",
"code": "<string>",
"on": "2023-11-07T05:31:56Z"
},
"isFromApi": true,
"accessKey": "<string>",
"series": "<string>",
"operationType": "incoming",
"printingType": "none",
"issueType": "normal",
"purposeType": "normal",
"pickup": {
"name": "<string>",
"federalTaxNumber": "<string>",
"stateTaxNumber": "<string>",
"cityTaxNumber": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"address": {
"street": "<string>",
"district": "<string>",
"postalCode": "<string>",
"number": "<string>",
"additionalInformation": "<string>",
"city": {
"name": "<string>",
"state": "<string>",
"code": 123
},
"country": "<string>"
}
},
"delivery": {
"name": "<string>",
"federalTaxNumber": "<string>",
"stateTaxNumber": "<string>",
"cityTaxNumber": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"address": {
"street": "<string>",
"district": "<string>",
"postalCode": "<string>",
"number": "<string>",
"additionalInformation": "<string>",
"city": {
"name": "<string>",
"state": "<string>",
"code": 123
},
"country": "<string>"
}
},
"debitType": "creditTransferToCooperatives",
"creditType": "finesAndInterest",
"govPurchase": {
"type": "union",
"rate": 123
},
"govOperationType": "supply",
"contingency": {
"date": "2023-11-07T05:31:56Z",
"reason": "<string>"
},
"authorizedPersons": [
"<string>"
]
}Authorizations
Authorization By X-Api-Key inside request's header
Path Parameters
Response
OK
ID da NF
ID de integração
Status
Valores possíveis:
- created: Criada — aguarda emissão explícita via issue ou gatilho automático (ex: afterPayment)
- enqueued: Enfileirada para processamento junto à SEFAZ ou Prefeitura
- received: Recebido
- authorized: Autorizado
- inContingent: Em contingência
- rejected: Rejeitado
- canceled: Cancelado
- denied: Denegado
- removed: Removido
- disabled: Inutilizado
created, enqueued, received, authorized, inContingent, rejected, canceled, denied, removed, disabled Modelo
Valores possíveis:
- productInvoice: NF-e
- consumerInvoice: NFC-e
- serviceInvoice: NFS-e
productInvoice, consumerInvoice, serviceInvoice Ambiente
Valores possíveis:
- production: Produção
- development: Homologação
- simulation:
production, development, simulation Data de emissão [dhEmi]
Data usada como emissão da nota. Após a emissão, tem o mesmo valor de issuedOn.
Cliente
Show child attributes
Show child attributes
Empresa
Show child attributes
Show child attributes
Dados da venda
Show child attributes
Show child attributes
Dados da autorização
Show child attributes
Show child attributes
Dados do cancelamento
Show child attributes
Show child attributes
Valor total da NF
Número
Detalhes do processamento
Show child attributes
Show child attributes
Emitida via API pública
Tipo de operação da nota fiscal
Valores possíveis:
- incoming: Entrada
- outgoing: Saída
incoming, outgoing Formato de impressão do DANFE
Valores possíveis:
- none: Sem geração de DANFE
- portrait: Retrato (orientação vertical)
- landscape: Paisagem (orientação horizontal)
- simplified: Simplificado
- consumerInvoice: DANFE NFC-e (cupom fiscal eletrônico)
- electronicMessage: Mensagem eletrônica
none, portrait, landscape, simplified, consumerInvoice, electronicMessage Forma de emissão da NF-e
Valores possíveis:
- normal: Emissão normal (não em contingência)
- fSIA: Contingência FS-IA — DANFE em formulário de segurança com impressão no verso
- sCAN: Contingência SCAN — Sistema de Contingência do Ambiente Nacional (desativado)
- ePEC: Contingência EPEC — Declaração Prévia de Emissão em Contingência
- fSDA: Contingência FS-DA — DANFE em formulário de segurança sem impressão no verso
- sVCAN: Contingência SVC-AN — SEFAZ Virtual de Contingência do Ambiente Nacional
- sVCRS: Contingência SVC-RS — SEFAZ Virtual de Contingência do Rio Grande do Sul
- offLine: Contingência off-line
- website: Website do provedor (NFS-e)
- aNNFS: Ambiente Nacional da NFS-e
- alt: Ambiente alternativo do provedor (NFS-e)
normal, fsia, scan, epec, fsda, svcan, svcrs, offLine, website, annfs, alt Valores possíveis:
- normal: Normal
- complement: Complemento
- adjustment: Ajustamento
- devolution: Devolução
- credit: Crédito
- debit: Débito
normal, complement, adjustment, devolution, credit, debit Show child attributes
Show child attributes
Show child attributes
Show child attributes
Valores possíveis:
- creditTransferToCooperatives: Transferência de créditos para Cooperativas
- creditReversalForExemptOrImmuneOutputs: Anulação de crédito por saídas imunes/isentas
- unprocessedInvoiceDebitInAssessment: Débitos de notas fiscais não processadas na apuração
- penaltyAndInterest: Multa e juros
- creditTransferBySuccession: Transferência de crédito de sucessão
- advancePayment: Pagamento antecipado
- inventoryLoss: Perda em estoque
creditTransferToCooperatives, creditReversalForExemptOrImmuneOutputs, unprocessedInvoiceDebitInAssessment, penaltyAndInterest, creditTransferBySuccession, advancePayment, inventoryLoss Valores possíveis:
- finesAndInterest: Multa e juros
- appropriation: Apropriação de crédito presumido de IBS sobre o saldo devedor na ZFM (art. 450, § 1º, LC 214/25)
finesAndInterest, appropriation Show child attributes
Show child attributes
Valores possíveis:
- supply: Fornecimento
- receipt: Recebimento do pagamento, conforme fato gerador do IBS/CBS (Art. 10 § 2º)
supply, receipt Show child attributes
Show child attributes