curl --request GET \
--url https://api.spedy.com.br/v1/inbound-service-invoices/{id} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.spedy.com.br/v1/inbound-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/inbound-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/inbound-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/inbound-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/inbound-service-invoices/{id}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spedy.com.br/v1/inbound-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",
"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,
"number": 123,
"serviceDescription": "<string>",
"role": "recipient",
"manifestation": {
"status": "none",
"date": "2023-11-07T05:31:56Z",
"justification": "<string>",
"reasonCode": "duplicate"
},
"events": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "cancellation",
"eventCode": "<string>",
"sequenceNumber": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>"
}
],
"creationTime": "2023-11-07T05:31:56Z",
"lastModificationTime": "2023-11-07T05:31:56Z"
}Obter NFS-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 a própria manifestação.
curl --request GET \
--url https://api.spedy.com.br/v1/inbound-service-invoices/{id} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.spedy.com.br/v1/inbound-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/inbound-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/inbound-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/inbound-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/inbound-service-invoices/{id}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spedy.com.br/v1/inbound-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",
"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,
"number": 123,
"serviceDescription": "<string>",
"role": "recipient",
"manifestation": {
"status": "none",
"date": "2023-11-07T05:31:56Z",
"justification": "<string>",
"reasonCode": "duplicate"
},
"events": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "cancellation",
"eventCode": "<string>",
"sequenceNumber": 123,
"date": "2023-11-07T05:31:56Z",
"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 (tomadora ou intermediária, conforme GetNotas.Application.Model.InboundInvoices.InboundServiceInvoiceDetailDto.Role).
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 NFS-e.
NSU do documento na distribuição do Ambiente de Dados Nacional (rastreio).
Sempre verdadeiro na NFS-e: o Ambiente de Dados Nacional entrega o documento autoritativo de uma só vez, sem etapa de resumo como na NF-e.
Situação da nota no Ambiente de Dados Nacional: authorized ou canceled.
Valores possíveis:
- authorized: Nota autorizada no Ambiente de Dados Nacional.
- canceled: Nota cancelada pelo prestador do serviço.
authorized, canceled Prestador do serviço, com endereço.
Show child attributes
Show child attributes
Data de emissão da nota.
Valor total da nota.
Número sequencial da NFS-e no Ambiente de Dados Nacional (nNFSe).
Descrição do serviço prestado (DPS/infDPS/serv/cServ/xDescServ).
Papel da sua empresa nesta nota: recipient quando ela é a tomadora do serviço e
intermediary quando é a intermediária da operação.
Valores possíveis:
- recipient: Sua empresa é a tomadora do serviço.
- intermediary: Sua empresa é a intermediária da operação.
recipient, intermediary Manifestação do tomador registrada para a nota.
Show child attributes
Show child attributes
Eventos vinculados à nota (cancelamento, 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.