Obter NFS-e
curl --request GET \
--url https://api.spedy.com.br/v1/service-invoices/{id} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.spedy.com.br/v1/service-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/service-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/service-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/service-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/service-invoices/{id}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spedy.com.br/v1/service-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>",
"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>"
},
"amount": 123,
"number": 123,
"processingDetail": {
"message": "<string>",
"code": "<string>",
"on": "2023-11-07T05:31:56Z"
},
"description": "<string>",
"totals": {
"invoiceAmount": 123,
"netAmount": 123,
"issBaseTax": 123,
"irRate": 123,
"csllRate": 123,
"pisRate": 123,
"cofinsRate": 123,
"inssRate": 123,
"issRate": 123,
"issAmount": 123,
"discountUnconditionedAmount": 123,
"discountConditionedAmount": 123,
"irAmount": 123,
"pisCofinsBaseTax": 123,
"pisAmount": 123,
"cofinsAmount": 123,
"inssAmount": 123,
"csllAmount": 123,
"othersAmount": 123,
"deductionsAmount": 123,
"irWithheld": true,
"issWithheld": true,
"cofinsWithheld": true,
"inssWithheld": true,
"csllWithheld": true,
"pisWithheld": true,
"ibsStateRate": 123,
"ibsCityRate": 123,
"cbsRate": 123,
"ibsCbsBaseTax": 123,
"ibsStateAmount": 123,
"ibsCityAmount": 123,
"ibsAmount": 123,
"cbsAmount": 123,
"receivedAmount": 123
},
"rps": {
"number": 123,
"series": "<string>"
},
"location": {
"code": 123,
"name": "<string>"
},
"ibsCbs": {
"cst": 123,
"classification": 123,
"operationIndicatorCode": "<string>",
"isPersonalUse": true,
"property": {
"fiscalPropertyTaxNumber": "<string>",
"cibCode": "<string>",
"address": {
"street": "<string>",
"district": "<string>",
"postalCode": "<string>",
"number": "<string>",
"additionalInformation": "<string>",
"city": {
"name": "<string>",
"state": "<string>",
"code": 123
},
"country": "<string>"
}
}
},
"nbsCode": "<string>",
"nationalTaxationCode": "<string>",
"batchNumber": 123,
"approximateTaxes": {
"federalAmount": 123,
"federalRate": 123,
"municipalRate": 123,
"municipalAmount": 123,
"stateAmount": 123,
"stateRate": 123,
"amount": 123,
"rate": 123,
"version": "<string>",
"source": "<string>"
}
}NFS-e
Obter NFS-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.
GET
/
v1
/
service-invoices
/
{id}
Obter NFS-e
curl --request GET \
--url https://api.spedy.com.br/v1/service-invoices/{id} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.spedy.com.br/v1/service-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/service-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/service-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/service-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/service-invoices/{id}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spedy.com.br/v1/service-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>",
"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>"
},
"amount": 123,
"number": 123,
"processingDetail": {
"message": "<string>",
"code": "<string>",
"on": "2023-11-07T05:31:56Z"
},
"description": "<string>",
"totals": {
"invoiceAmount": 123,
"netAmount": 123,
"issBaseTax": 123,
"irRate": 123,
"csllRate": 123,
"pisRate": 123,
"cofinsRate": 123,
"inssRate": 123,
"issRate": 123,
"issAmount": 123,
"discountUnconditionedAmount": 123,
"discountConditionedAmount": 123,
"irAmount": 123,
"pisCofinsBaseTax": 123,
"pisAmount": 123,
"cofinsAmount": 123,
"inssAmount": 123,
"csllAmount": 123,
"othersAmount": 123,
"deductionsAmount": 123,
"irWithheld": true,
"issWithheld": true,
"cofinsWithheld": true,
"inssWithheld": true,
"csllWithheld": true,
"pisWithheld": true,
"ibsStateRate": 123,
"ibsCityRate": 123,
"cbsRate": 123,
"ibsCbsBaseTax": 123,
"ibsStateAmount": 123,
"ibsCityAmount": 123,
"ibsAmount": 123,
"cbsAmount": 123,
"receivedAmount": 123
},
"rps": {
"number": 123,
"series": "<string>"
},
"location": {
"code": 123,
"name": "<string>"
},
"ibsCbs": {
"cst": 123,
"classification": 123,
"operationIndicatorCode": "<string>",
"isPersonalUse": true,
"property": {
"fiscalPropertyTaxNumber": "<string>",
"cibCode": "<string>",
"address": {
"street": "<string>",
"district": "<string>",
"postalCode": "<string>",
"number": "<string>",
"additionalInformation": "<string>",
"city": {
"name": "<string>",
"state": "<string>",
"code": 123
},
"country": "<string>"
}
}
},
"nbsCode": "<string>",
"nationalTaxationCode": "<string>",
"batchNumber": 123,
"approximateTaxes": {
"federalAmount": 123,
"federalRate": 123,
"municipalRate": 123,
"municipalAmount": 123,
"stateAmount": 123,
"stateRate": 123,
"amount": 123,
"rate": 123,
"version": "<string>",
"source": "<string>"
}
}Authorizations
Authorization By X-Api-Key inside request's header
Path Parameters
Response
OK
ID da NF
ID de integração
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
Available options:
created, enqueued, received, authorized, inContingent, rejected, canceled, denied, removed, disabled Valores possíveis:
- productInvoice: NF-e
- consumerInvoice: NFC-e
- serviceInvoice: NFS-e
Available options:
productInvoice, consumerInvoice, serviceInvoice Valores possíveis:
- production: Produção
- development: Homologação
- simulation:
Available options:
production, development, simulation Data de emissão
Data de competência
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Dados de autorização da nota fiscal
Show child attributes
Show child attributes
Valor total da NF
Número
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
⌘I