Configurações de emissão por município
curl --request GET \
--url https://api.spedy.com.br/v1/service-invoices/cities/{cityCode}/settingsimport requests
url = "https://api.spedy.com.br/v1/service-invoices/cities/{cityCode}/settings"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.spedy.com.br/v1/service-invoices/cities/{cityCode}/settings', 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/cities/{cityCode}/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/cities/{cityCode}/settings"
req, _ := http.NewRequest("GET", url, nil)
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/cities/{cityCode}/settings")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spedy.com.br/v1/service-invoices/cities/{cityCode}/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"code": 123,
"name": "<string>",
"state": "<string>",
"providers": [
{
"code": "issNet",
"name": "<string>",
"appliesTo": "all",
"taxRegimes": [
"simplesNacional"
],
"issueType": "normal",
"options": {
"rps": true,
"series": true,
"batchNumber": true,
"invoiceNumber": true,
"requiresNumberInSequence": true,
"federalServiceCode": true,
"nbsCode": true,
"cnaeCode": true,
"cityServiceCode": true,
"newBatchNumberForEachAttempt": true,
"removeAccents": true,
"supportsTaxReform": true,
"supportsIntermediary": true,
"useNationalLayout": true,
"nationalTaxationCode": true,
"useSimplesNacionalAnnex": true,
"authentication": "certificate",
"requiresDigitalCertificate": true
},
"example": {
"sourceIssuedOn": "2023-11-07T05:31:56Z",
"payload": "<unknown>"
}
}
]
}NFS-e
Configurações de emissão por município
Retorna o que é preciso para emitir NFS-e no município: os provedores, os regimes tributários que emitem por cada um, o método de emissão a configurar na empresa, as configurações de cada provedor e um exemplo de requisição.
Para escolher o provedor, procure o regime tributário da empresa em taxRegimes e configure a empresa com o
issueType daquele provedor. Os provedores vêm sempre nesta ordem: o do município, o Emissor Nacional e, por
último, o canal alternativo do provedor, quando o município tiver um.
GET
/
v1
/
service-invoices
/
cities
/
{cityCode}
/
settings
Configurações de emissão por município
curl --request GET \
--url https://api.spedy.com.br/v1/service-invoices/cities/{cityCode}/settingsimport requests
url = "https://api.spedy.com.br/v1/service-invoices/cities/{cityCode}/settings"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.spedy.com.br/v1/service-invoices/cities/{cityCode}/settings', 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/cities/{cityCode}/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/cities/{cityCode}/settings"
req, _ := http.NewRequest("GET", url, nil)
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/cities/{cityCode}/settings")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spedy.com.br/v1/service-invoices/cities/{cityCode}/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"code": 123,
"name": "<string>",
"state": "<string>",
"providers": [
{
"code": "issNet",
"name": "<string>",
"appliesTo": "all",
"taxRegimes": [
"simplesNacional"
],
"issueType": "normal",
"options": {
"rps": true,
"series": true,
"batchNumber": true,
"invoiceNumber": true,
"requiresNumberInSequence": true,
"federalServiceCode": true,
"nbsCode": true,
"cnaeCode": true,
"cityServiceCode": true,
"newBatchNumberForEachAttempt": true,
"removeAccents": true,
"supportsTaxReform": true,
"supportsIntermediary": true,
"useNationalLayout": true,
"nationalTaxationCode": true,
"useSimplesNacionalAnnex": true,
"authentication": "certificate",
"requiresDigitalCertificate": true
},
"example": {
"sourceIssuedOn": "2023-11-07T05:31:56Z",
"payload": "<unknown>"
}
}
]
}