Todas as URIs relativas a https://api.nuvemfiscal.com.br
Método | Endpoint | Descrição |
---|---|---|
BaixarEscPosNfce | GET /nfce/{id}/escpos | Comandos ESC/POS para impressão do DANFCE |
BaixarPdfCancelamentoNfce | GET /nfce/{id}/cancelamento/pdf | Baixar PDF do cancelamento |
BaixarPdfEventoNfce | GET /nfce/eventos/{id}/pdf | Baixar PDF do evento |
BaixarPdfInutilizacaoNfce | GET /nfce/inutilizacoes/{id}/pdf | Baixar PDF da inutilização |
BaixarPdfNfce | GET /nfce/{id}/pdf | Baixar PDF do DANFCE |
BaixarPreviaPdfNfce | POST /nfce/previa/pdf | Prévia do PDF do DANFCE |
BaixarPreviaXmlNfce | POST /nfce/previa/xml | Prévia do XML da NFC-e |
BaixarXmlCancelamentoNfce | GET /nfce/{id}/cancelamento/xml | Baixar XML do cancelamento |
BaixarXmlEventoNfce | GET /nfce/eventos/{id}/xml | Baixar XML do evento |
BaixarXmlInutilizacaoNfce | GET /nfce/inutilizacoes/{id}/xml | Baixar XML da inutilização |
BaixarXmlNfce | GET /nfce/{id}/xml | Baixar XML da NFC-e processada |
BaixarXmlNfceNota | GET /nfce/{id}/xml/nota | Baixar XML da NFC-e |
BaixarXmlNfceProtocolo | GET /nfce/{id}/xml/protocolo | Baixar XML do Protocolo da SEFAZ |
CancelarNfce | POST /nfce/{id}/cancelamento | Cancelar uma NFC-e autorizada |
ConsultarCancelamentoNfce | GET /nfce/{id}/cancelamento | Consultar o cancelamento da NFC-e |
ConsultarEventoNfce | GET /nfce/eventos/{id} | Consultar evento |
ConsultarInutilizacaoNfce | GET /nfce/inutilizacoes/{id} | Consultar a inutilização de sequência de numeração |
ConsultarLoteNfce | GET /nfce/lotes/{id} | Consultar lote de NFC-e |
ConsultarNfce | GET /nfce/{id} | Consultar NFC-e |
ConsultarStatusSefazNfce | GET /nfce/sefaz/status | Consulta do Status do Serviço na SEFAZ Autorizadora |
EmitirLoteNfce | POST /nfce/lotes | Emitir lote de NFC-e |
EmitirNfce | POST /nfce | Emitir NFC-e |
InutilizarNumeracaoNfce | POST /nfce/inutilizacoes | Inutilizar uma sequência de numeração de NFC-e |
ListarEventosNfce | GET /nfce/eventos | Listar eventos |
ListarLotesNfce | GET /nfce/lotes | Listar lotes de NFC-e |
ListarNfce | GET /nfce | Listar NFC-e |
SincronizarNfce | POST /nfce/{id}/sincronizar | Sincroniza dados na NFC-e a partir da SEFAZ |
FileParameter BaixarEscPosNfce (string id, int? modelo = null, int? colunas = null, bool? qrcodeLateral = null)
Comandos ESC/POS para impressão do DANFCE
ESC/POS é um sistema de comando criado pela Epson usado em diversos sistemas de impressoras POS. Com o formato ESC/POS, você poderá imprimir nativamente em uma vasta quantidade de modelos de impressora térmicas utilizadas no Brasil e no mundo. Com ela, você consegue fazer o envio de comandos em ESC/POS direto para a porta da impressora.
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using NuvemFiscal.Sdk.Api;
using NuvemFiscal.Sdk.Client;
using NuvemFiscal.Sdk.Model;
namespace Example
{
public class BaixarEscPosNfceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.nuvemfiscal.com.br";
// Configure API key authorization: jwt
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new NfceApi(httpClient, config, httpClientHandler);
var id = "id_example"; // string | ID único da NFC-e gerado pela Nuvem Fiscal.
var modelo = 1; // int? | Modelo da impressora: * `0` - Texto * `1` - Epson * `2` - Bematech * `3` - Daruma * `4` - Vox * `5` - Diebold * `6` - Epson P2 * `7` - CustomPos * `8` - Star * `9` - Zjiang * `10` - GPrinter * `11` - Datecs * `12` - Sunmi * `13` - Externo (optional) (default to 1)
var colunas = 48; // int? | Define o máximo de caracteres, em uma linha, usando a fonte normal. Ex: 40, 42, 48, 58, 80. (optional) (default to 48)
var qrcodeLateral = false; // bool? | Imprime o QRCode na lateral do DANFCe. OBS: não suportado por alguns modelos de impressora. (optional) (default to false)
try
{
// Comandos ESC/POS para impressão do DANFCE
FileParameter result = apiInstance.BaixarEscPosNfce(id, modelo, colunas, qrcodeLateral);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NfceApi.BaixarEscPosNfce: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Esses métodos retornam um objeto ApiResponse que contêm os dados da resposta, o código de status e os headers HTTP.
try
{
// Comandos ESC/POS para impressão do DANFCE
ApiResponse<FileParameter> response = apiInstance.BaixarEscPosNfceWithHttpInfo(id, modelo, colunas, qrcodeLateral);
Debug.Write("Código de status: " + response.StatusCode);
Debug.Write("Headers da resposta: " + response.Headers);
Debug.Write("Conteúdo da resposta: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exceção ao chamar NfceApi.BaixarEscPosNfceWithHttpInfo: " + e.Message);
Debug.Print("Código de status: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Nome | Tipo | Descrição | Comentários |
---|---|---|---|
id | string | ID único da NFC-e gerado pela Nuvem Fiscal. | |
modelo | int? | Modelo da impressora: * `0` - Texto * `1` - Epson * `2` - Bematech * `3` - Daruma * `4` - Vox * `5` - Diebold * `6` - Epson P2 * `7` - CustomPos * `8` - Star * `9` - Zjiang * `10` - GPrinter * `11` - Datecs * `12` - Sunmi * `13` - Externo | [optional] [default to 1] |
colunas | int? | Define o máximo de caracteres, em uma linha, usando a fonte normal. Ex: 40, 42, 48, 58, 80. | [optional] [default to 48] |
qrcodeLateral | bool? | Imprime o QRCode na lateral do DANFCe. OBS: não suportado por alguns modelos de impressora. | [optional] [default to false] |
- Content-Type: Não especificado
- Accept: /
Código status | Descrição | Headers da resposta |
---|---|---|
200 | Successful response | - |
[Voltar ao topo] [Voltar à listagem da API] [Voltar à lista de DTOs] [Voltar ao README]
FileParameter BaixarPdfCancelamentoNfce (string id)
Baixar PDF do cancelamento
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using NuvemFiscal.Sdk.Api;
using NuvemFiscal.Sdk.Client;
using NuvemFiscal.Sdk.Model;
namespace Example
{
public class BaixarPdfCancelamentoNfceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.nuvemfiscal.com.br";
// Configure API key authorization: jwt
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new NfceApi(httpClient, config, httpClientHandler);
var id = "id_example"; // string | ID único da NFC-e gerado pela Nuvem Fiscal.
try
{
// Baixar PDF do cancelamento
FileParameter result = apiInstance.BaixarPdfCancelamentoNfce(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NfceApi.BaixarPdfCancelamentoNfce: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Esses métodos retornam um objeto ApiResponse que contêm os dados da resposta, o código de status e os headers HTTP.
try
{
// Baixar PDF do cancelamento
ApiResponse<FileParameter> response = apiInstance.BaixarPdfCancelamentoNfceWithHttpInfo(id);
Debug.Write("Código de status: " + response.StatusCode);
Debug.Write("Headers da resposta: " + response.Headers);
Debug.Write("Conteúdo da resposta: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exceção ao chamar NfceApi.BaixarPdfCancelamentoNfceWithHttpInfo: " + e.Message);
Debug.Print("Código de status: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Nome | Tipo | Descrição | Comentários |
---|---|---|---|
id | string | ID único da NFC-e gerado pela Nuvem Fiscal. |
- Content-Type: Não especificado
- Accept: /
Código status | Descrição | Headers da resposta |
---|---|---|
200 | Successful response | - |
[Voltar ao topo] [Voltar à listagem da API] [Voltar à lista de DTOs] [Voltar ao README]
FileParameter BaixarPdfEventoNfce (string id)
Baixar PDF do evento
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using NuvemFiscal.Sdk.Api;
using NuvemFiscal.Sdk.Client;
using NuvemFiscal.Sdk.Model;
namespace Example
{
public class BaixarPdfEventoNfceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.nuvemfiscal.com.br";
// Configure API key authorization: jwt
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new NfceApi(httpClient, config, httpClientHandler);
var id = "id_example"; // string | ID único do evento gerado pela Nuvem Fiscal.
try
{
// Baixar PDF do evento
FileParameter result = apiInstance.BaixarPdfEventoNfce(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NfceApi.BaixarPdfEventoNfce: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Esses métodos retornam um objeto ApiResponse que contêm os dados da resposta, o código de status e os headers HTTP.
try
{
// Baixar PDF do evento
ApiResponse<FileParameter> response = apiInstance.BaixarPdfEventoNfceWithHttpInfo(id);
Debug.Write("Código de status: " + response.StatusCode);
Debug.Write("Headers da resposta: " + response.Headers);
Debug.Write("Conteúdo da resposta: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exceção ao chamar NfceApi.BaixarPdfEventoNfceWithHttpInfo: " + e.Message);
Debug.Print("Código de status: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Nome | Tipo | Descrição | Comentários |
---|---|---|---|
id | string | ID único do evento gerado pela Nuvem Fiscal. |
- Content-Type: Não especificado
- Accept: /
Código status | Descrição | Headers da resposta |
---|---|---|
200 | Successful response | - |
[Voltar ao topo] [Voltar à listagem da API] [Voltar à lista de DTOs] [Voltar ao README]
FileParameter BaixarPdfInutilizacaoNfce (string id)
Baixar PDF da inutilização
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using NuvemFiscal.Sdk.Api;
using NuvemFiscal.Sdk.Client;
using NuvemFiscal.Sdk.Model;
namespace Example
{
public class BaixarPdfInutilizacaoNfceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.nuvemfiscal.com.br";
// Configure API key authorization: jwt
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new NfceApi(httpClient, config, httpClientHandler);
var id = "id_example"; // string | ID único do evento gerado pela Nuvem Fiscal.
try
{
// Baixar PDF da inutilização
FileParameter result = apiInstance.BaixarPdfInutilizacaoNfce(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NfceApi.BaixarPdfInutilizacaoNfce: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Esses métodos retornam um objeto ApiResponse que contêm os dados da resposta, o código de status e os headers HTTP.
try
{
// Baixar PDF da inutilização
ApiResponse<FileParameter> response = apiInstance.BaixarPdfInutilizacaoNfceWithHttpInfo(id);
Debug.Write("Código de status: " + response.StatusCode);
Debug.Write("Headers da resposta: " + response.Headers);
Debug.Write("Conteúdo da resposta: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exceção ao chamar NfceApi.BaixarPdfInutilizacaoNfceWithHttpInfo: " + e.Message);
Debug.Print("Código de status: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Nome | Tipo | Descrição | Comentários |
---|---|---|---|
id | string | ID único do evento gerado pela Nuvem Fiscal. |
- Content-Type: Não especificado
- Accept: /
Código status | Descrição | Headers da resposta |
---|---|---|
200 | Successful response | - |
[Voltar ao topo] [Voltar à listagem da API] [Voltar à lista de DTOs] [Voltar ao README]
FileParameter BaixarPdfNfce (string id, bool? logotipo = null, bool? nomeFantasia = null, string mensagemRodape = null, bool? resumido = null, bool? qrcodeLateral = null, int? largura = null, string margem = null)
Baixar PDF do DANFCE
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using NuvemFiscal.Sdk.Api;
using NuvemFiscal.Sdk.Client;
using NuvemFiscal.Sdk.Model;
namespace Example
{
public class BaixarPdfNfceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.nuvemfiscal.com.br";
// Configure API key authorization: jwt
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new NfceApi(httpClient, config, httpClientHandler);
var id = "id_example"; // string | ID único da NFC-e gerado pela Nuvem Fiscal.
var logotipo = false; // bool? | Imprime o documento com logotipo, desde que esteja cadastrado na empresa. (optional) (default to false)
var nomeFantasia = false; // bool? | Exibe o nome fantasia do emitente, desde que esteja presente no XML da nota. (optional) (default to false)
var mensagemRodape = "mensagemRodape_example"; // string | Imprime mensagem no rodapé do documento. O caractere `|` (pipe) poderá ser utilizado para definir a quantidade e o alinhamento das mensagens. **Exemplos de Uso:** * `\"esquerda\"` * `\"esquerda|centro\"` * `\"esquerda|centro|direita\"` * `\"|centro\"`, `\"|centro|\"` * `\"|centro|direita\"` * `\"||direita\"` * `\"esquerda||direita\"` (optional)
var resumido = false; // bool? | Poderá ser impresso apenas o DANFE NFC-e resumido ou ecológico, sem o detalhamento dos itens da venda, desde que a Unidade Federada permita esta opção em sua legislação e o consumidor assim o solicite. (optional) (default to false)
var qrcodeLateral = false; // bool? | Imprime o QRCode na lateral do DANFE NFC-e. *Disponível apenas para DANFE com 80 milímetros de largura*. (optional) (default to false)
var largura = 80; // int? | Largura do DANFE NFC-e (em milímetros). (optional) (default to 80)
var margem = "\"2\""; // string | Define as margens do DANFE NFC-e (em milímetros). Essa propriedade pode ser especificada usando um, dois, três ou quatro valores (separados por vírgulas). Cada valor deve ser um número entre `0` e `9`. * Quando **um** valor é especificado, a mesma margem é aplicada para **todos os quatro lados**. * Quando **dois** valores são especificados, a primeira margem é aplicada aos **lados esquerdo e direito**, e a segunda aos **lados superior e inferior**. * Quando **três** valores são especificados, a primeira margem é aplicada ao **lado esquerdo**, a segunda aos **lados superior e inferior**, e a terceira ao **lado direito**. * Quando **quatro** valores são especificados, as margens são aplicadas aos lados **esquerdo**, **superior**, **direito** e **inferior**, nesta ordem (sentido horário). **Exemplos de uso**: * `margem=1` - Margem esquerda: 1mm - Margem superior: 1mm - Margem direita: 1mm - Margem inferior: 1mm * `margem=1,2` - Margem esquerda: 1mm - Margem superior: 2mm - Margem direita: 1mm - Margem inferior: 2mm * `margem=1,2,3` - Margem esquerda: 1mm - Margem superior: 2mm - Margem direita: 3mm - Margem inferior: 2mm * `margem=1,2,3,4` - Margem esquerda: 1mm - Margem superior: 2mm - Margem direita: 3mm - Margem inferior: 4mm (optional) (default to "2")
try
{
// Baixar PDF do DANFCE
FileParameter result = apiInstance.BaixarPdfNfce(id, logotipo, nomeFantasia, mensagemRodape, resumido, qrcodeLateral, largura, margem);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NfceApi.BaixarPdfNfce: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Esses métodos retornam um objeto ApiResponse que contêm os dados da resposta, o código de status e os headers HTTP.
try
{
// Baixar PDF do DANFCE
ApiResponse<FileParameter> response = apiInstance.BaixarPdfNfceWithHttpInfo(id, logotipo, nomeFantasia, mensagemRodape, resumido, qrcodeLateral, largura, margem);
Debug.Write("Código de status: " + response.StatusCode);
Debug.Write("Headers da resposta: " + response.Headers);
Debug.Write("Conteúdo da resposta: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exceção ao chamar NfceApi.BaixarPdfNfceWithHttpInfo: " + e.Message);
Debug.Print("Código de status: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Nome | Tipo | Descrição | Comentários |
---|---|---|---|
id | string | ID único da NFC-e gerado pela Nuvem Fiscal. | |
logotipo | bool? | Imprime o documento com logotipo, desde que esteja cadastrado na empresa. | [optional] [default to false] |
nomeFantasia | bool? | Exibe o nome fantasia do emitente, desde que esteja presente no XML da nota. | [optional] [default to false] |
mensagemRodape | string | Imprime mensagem no rodapé do documento. O caractere ` | ` (pipe) poderá ser utilizado para definir a quantidade e o alinhamento das mensagens. Exemplos de Uso: * `"esquerda"` * `"esquerda |
resumido | bool? | Poderá ser impresso apenas o DANFE NFC-e resumido ou ecológico, sem o detalhamento dos itens da venda, desde que a Unidade Federada permita esta opção em sua legislação e o consumidor assim o solicite. | [optional] [default to false] |
qrcodeLateral | bool? | Imprime o QRCode na lateral do DANFE NFC-e. Disponível apenas para DANFE com 80 milímetros de largura. | [optional] [default to false] |
largura | int? | Largura do DANFE NFC-e (em milímetros). | [optional] [default to 80] |
margem | string | Define as margens do DANFE NFC-e (em milímetros). Essa propriedade pode ser especificada usando um, dois, três ou quatro valores (separados por vírgulas). Cada valor deve ser um número entre `0` e `9`. * Quando um valor é especificado, a mesma margem é aplicada para todos os quatro lados. * Quando dois valores são especificados, a primeira margem é aplicada aos lados esquerdo e direito, e a segunda aos lados superior e inferior. * Quando três valores são especificados, a primeira margem é aplicada ao lado esquerdo, a segunda aos lados superior e inferior, e a terceira ao lado direito. * Quando quatro valores são especificados, as margens são aplicadas aos lados esquerdo, superior, direito e inferior, nesta ordem (sentido horário). Exemplos de uso: * `margem=1` - Margem esquerda: 1mm - Margem superior: 1mm - Margem direita: 1mm - Margem inferior: 1mm * `margem=1,2` - Margem esquerda: 1mm - Margem superior: 2mm - Margem direita: 1mm - Margem inferior: 2mm * `margem=1,2,3` - Margem esquerda: 1mm - Margem superior: 2mm - Margem direita: 3mm - Margem inferior: 2mm * `margem=1,2,3,4` - Margem esquerda: 1mm - Margem superior: 2mm - Margem direita: 3mm - Margem inferior: 4mm | [optional] [default to "2"] |
- Content-Type: Não especificado
- Accept: /
Código status | Descrição | Headers da resposta |
---|---|---|
200 | Successful response | - |
[Voltar ao topo] [Voltar à listagem da API] [Voltar à lista de DTOs] [Voltar ao README]
FileParameter BaixarPreviaPdfNfce (NfePedidoEmissao body, bool? logotipo = null, bool? nomeFantasia = null, string mensagemRodape = null, bool? resumido = null, bool? qrcodeLateral = null, int? largura = null, string margem = null)
Prévia do PDF do DANFCE
Através desse endpoint, é possível enviar os dados de uma NFC-e e gerar uma prévia do DANFCE. Os dados de entrada são os mesmos do endpoint de emissão de NFC-e (POST /nfce
). Atenção: O DANFE gerado por este endpoint é apenas para fins de visualização e não possui valor fiscal. Para a emissão de uma NF-e com valor fiscal, utilize o processo de emissão padrão descrito na documentação.
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using NuvemFiscal.Sdk.Api;
using NuvemFiscal.Sdk.Client;
using NuvemFiscal.Sdk.Model;
namespace Example
{
public class BaixarPreviaPdfNfceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.nuvemfiscal.com.br";
// Configure API key authorization: jwt
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new NfceApi(httpClient, config, httpClientHandler);
var body = new NfePedidoEmissao(); // NfePedidoEmissao |
var logotipo = false; // bool? | Imprime o documento com logotipo, desde que esteja cadastrado na empresa. (optional) (default to false)
var nomeFantasia = false; // bool? | Exibe o nome fantasia do emitente, desde que esteja presente no XML da nota. (optional) (default to false)
var mensagemRodape = "mensagemRodape_example"; // string | Imprime mensagem no rodapé do documento. O caractere `|` (pipe) poderá ser utilizado para definir a quantidade e o alinhamento das mensagens. **Exemplos de Uso:** * `\"esquerda\"` * `\"esquerda|centro\"` * `\"esquerda|centro|direita\"` * `\"|centro\"`, `\"|centro|\"` * `\"|centro|direita\"` * `\"||direita\"` * `\"esquerda||direita\"` (optional)
var resumido = false; // bool? | Poderá ser impresso apenas o DANFE NFC-e resumido ou ecológico, sem o detalhamento dos itens da venda, desde que a Unidade Federada permita esta opção em sua legislação e o consumidor assim o solicite. (optional) (default to false)
var qrcodeLateral = false; // bool? | Imprime o QRCode na lateral do DANFE NFC-e. *Disponível apenas para DANFE com 80 milímetros de largura*. (optional) (default to false)
var largura = 80; // int? | Largura do DANFE NFC-e (em milímetros). (optional) (default to 80)
var margem = "\"2\""; // string | Define as margens do DANFE NFC-e (em milímetros). Essa propriedade pode ser especificada usando um, dois, três ou quatro valores (separados por vírgulas). Cada valor deve ser um número entre `0` e `9`. * Quando **um** valor é especificado, a mesma margem é aplicada para **todos os quatro lados**. * Quando **dois** valores são especificados, a primeira margem é aplicada aos **lados esquerdo e direito**, e a segunda aos **lados superior e inferior**. * Quando **três** valores são especificados, a primeira margem é aplicada ao **lado esquerdo**, a segunda aos **lados superior e inferior**, e a terceira ao **lado direito**. * Quando **quatro** valores são especificados, as margens são aplicadas aos lados **esquerdo**, **superior**, **direito** e **inferior**, nesta ordem (sentido horário). **Exemplos de uso**: * `margem=1` - Margem esquerda: 1mm - Margem superior: 1mm - Margem direita: 1mm - Margem inferior: 1mm * `margem=1,2` - Margem esquerda: 1mm - Margem superior: 2mm - Margem direita: 1mm - Margem inferior: 2mm * `margem=1,2,3` - Margem esquerda: 1mm - Margem superior: 2mm - Margem direita: 3mm - Margem inferior: 2mm * `margem=1,2,3,4` - Margem esquerda: 1mm - Margem superior: 2mm - Margem direita: 3mm - Margem inferior: 4mm (optional) (default to "2")
try
{
// Prévia do PDF do DANFCE
FileParameter result = apiInstance.BaixarPreviaPdfNfce(body, logotipo, nomeFantasia, mensagemRodape, resumido, qrcodeLateral, largura, margem);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NfceApi.BaixarPreviaPdfNfce: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Esses métodos retornam um objeto ApiResponse que contêm os dados da resposta, o código de status e os headers HTTP.
try
{
// Prévia do PDF do DANFCE
ApiResponse<FileParameter> response = apiInstance.BaixarPreviaPdfNfceWithHttpInfo(body, logotipo, nomeFantasia, mensagemRodape, resumido, qrcodeLateral, largura, margem);
Debug.Write("Código de status: " + response.StatusCode);
Debug.Write("Headers da resposta: " + response.Headers);
Debug.Write("Conteúdo da resposta: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exceção ao chamar NfceApi.BaixarPreviaPdfNfceWithHttpInfo: " + e.Message);
Debug.Print("Código de status: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Nome | Tipo | Descrição | Comentários |
---|---|---|---|
body | NfePedidoEmissao | ||
logotipo | bool? | Imprime o documento com logotipo, desde que esteja cadastrado na empresa. | [optional] [default to false] |
nomeFantasia | bool? | Exibe o nome fantasia do emitente, desde que esteja presente no XML da nota. | [optional] [default to false] |
mensagemRodape | string | Imprime mensagem no rodapé do documento. O caractere ` | ` (pipe) poderá ser utilizado para definir a quantidade e o alinhamento das mensagens. Exemplos de Uso: * `"esquerda"` * `"esquerda |
resumido | bool? | Poderá ser impresso apenas o DANFE NFC-e resumido ou ecológico, sem o detalhamento dos itens da venda, desde que a Unidade Federada permita esta opção em sua legislação e o consumidor assim o solicite. | [optional] [default to false] |
qrcodeLateral | bool? | Imprime o QRCode na lateral do DANFE NFC-e. Disponível apenas para DANFE com 80 milímetros de largura. | [optional] [default to false] |
largura | int? | Largura do DANFE NFC-e (em milímetros). | [optional] [default to 80] |
margem | string | Define as margens do DANFE NFC-e (em milímetros). Essa propriedade pode ser especificada usando um, dois, três ou quatro valores (separados por vírgulas). Cada valor deve ser um número entre `0` e `9`. * Quando um valor é especificado, a mesma margem é aplicada para todos os quatro lados. * Quando dois valores são especificados, a primeira margem é aplicada aos lados esquerdo e direito, e a segunda aos lados superior e inferior. * Quando três valores são especificados, a primeira margem é aplicada ao lado esquerdo, a segunda aos lados superior e inferior, e a terceira ao lado direito. * Quando quatro valores são especificados, as margens são aplicadas aos lados esquerdo, superior, direito e inferior, nesta ordem (sentido horário). Exemplos de uso: * `margem=1` - Margem esquerda: 1mm - Margem superior: 1mm - Margem direita: 1mm - Margem inferior: 1mm * `margem=1,2` - Margem esquerda: 1mm - Margem superior: 2mm - Margem direita: 1mm - Margem inferior: 2mm * `margem=1,2,3` - Margem esquerda: 1mm - Margem superior: 2mm - Margem direita: 3mm - Margem inferior: 2mm * `margem=1,2,3,4` - Margem esquerda: 1mm - Margem superior: 2mm - Margem direita: 3mm - Margem inferior: 4mm | [optional] [default to "2"] |
- Content-Type: application/json
- Accept: /
Código status | Descrição | Headers da resposta |
---|---|---|
200 | Successful response | - |
[Voltar ao topo] [Voltar à listagem da API] [Voltar à lista de DTOs] [Voltar ao README]
FileParameter BaixarPreviaXmlNfce (NfePedidoEmissao body)
Prévia do XML da NFC-e
Através desse endpoint, é possível enviar os dados de uma NFC-e e gerar uma prévia do XML, sem a assinatura digital. Os dados de entrada são os mesmos do endpoint de emissão de NFC-e (POST /nfce
). Atenção: O XML gerado por este endpoint é apenas para fins de visualização e não possui valor fiscal. Para a emissão de uma NF-e com valor fiscal, utilize o processo de emissão padrão descrito na documentação.
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using NuvemFiscal.Sdk.Api;
using NuvemFiscal.Sdk.Client;
using NuvemFiscal.Sdk.Model;
namespace Example
{
public class BaixarPreviaXmlNfceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.nuvemfiscal.com.br";
// Configure API key authorization: jwt
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new NfceApi(httpClient, config, httpClientHandler);
var body = new NfePedidoEmissao(); // NfePedidoEmissao |
try
{
// Prévia do XML da NFC-e
FileParameter result = apiInstance.BaixarPreviaXmlNfce(body);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NfceApi.BaixarPreviaXmlNfce: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Esses métodos retornam um objeto ApiResponse que contêm os dados da resposta, o código de status e os headers HTTP.
try
{
// Prévia do XML da NFC-e
ApiResponse<FileParameter> response = apiInstance.BaixarPreviaXmlNfceWithHttpInfo(body);
Debug.Write("Código de status: " + response.StatusCode);
Debug.Write("Headers da resposta: " + response.Headers);
Debug.Write("Conteúdo da resposta: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exceção ao chamar NfceApi.BaixarPreviaXmlNfceWithHttpInfo: " + e.Message);
Debug.Print("Código de status: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Nome | Tipo | Descrição | Comentários |
---|---|---|---|
body | NfePedidoEmissao |
- Content-Type: application/json
- Accept: /
Código status | Descrição | Headers da resposta |
---|---|---|
200 | Successful response | - |
[Voltar ao topo] [Voltar à listagem da API] [Voltar à lista de DTOs] [Voltar ao README]
FileParameter BaixarXmlCancelamentoNfce (string id)
Baixar XML do cancelamento
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using NuvemFiscal.Sdk.Api;
using NuvemFiscal.Sdk.Client;
using NuvemFiscal.Sdk.Model;
namespace Example
{
public class BaixarXmlCancelamentoNfceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.nuvemfiscal.com.br";
// Configure API key authorization: jwt
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new NfceApi(httpClient, config, httpClientHandler);
var id = "id_example"; // string | ID único da NFC-e gerado pela Nuvem Fiscal.
try
{
// Baixar XML do cancelamento
FileParameter result = apiInstance.BaixarXmlCancelamentoNfce(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NfceApi.BaixarXmlCancelamentoNfce: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Esses métodos retornam um objeto ApiResponse que contêm os dados da resposta, o código de status e os headers HTTP.
try
{
// Baixar XML do cancelamento
ApiResponse<FileParameter> response = apiInstance.BaixarXmlCancelamentoNfceWithHttpInfo(id);
Debug.Write("Código de status: " + response.StatusCode);
Debug.Write("Headers da resposta: " + response.Headers);
Debug.Write("Conteúdo da resposta: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exceção ao chamar NfceApi.BaixarXmlCancelamentoNfceWithHttpInfo: " + e.Message);
Debug.Print("Código de status: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Nome | Tipo | Descrição | Comentários |
---|---|---|---|
id | string | ID único da NFC-e gerado pela Nuvem Fiscal. |
- Content-Type: Não especificado
- Accept: /
Código status | Descrição | Headers da resposta |
---|---|---|
200 | Successful response | - |
[Voltar ao topo] [Voltar à listagem da API] [Voltar à lista de DTOs] [Voltar ao README]
FileParameter BaixarXmlEventoNfce (string id)
Baixar XML do evento
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using NuvemFiscal.Sdk.Api;
using NuvemFiscal.Sdk.Client;
using NuvemFiscal.Sdk.Model;
namespace Example
{
public class BaixarXmlEventoNfceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.nuvemfiscal.com.br";
// Configure API key authorization: jwt
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new NfceApi(httpClient, config, httpClientHandler);
var id = "id_example"; // string | ID único do evento gerado pela Nuvem Fiscal.
try
{
// Baixar XML do evento
FileParameter result = apiInstance.BaixarXmlEventoNfce(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NfceApi.BaixarXmlEventoNfce: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Esses métodos retornam um objeto ApiResponse que contêm os dados da resposta, o código de status e os headers HTTP.
try
{
// Baixar XML do evento
ApiResponse<FileParameter> response = apiInstance.BaixarXmlEventoNfceWithHttpInfo(id);
Debug.Write("Código de status: " + response.StatusCode);
Debug.Write("Headers da resposta: " + response.Headers);
Debug.Write("Conteúdo da resposta: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exceção ao chamar NfceApi.BaixarXmlEventoNfceWithHttpInfo: " + e.Message);
Debug.Print("Código de status: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Nome | Tipo | Descrição | Comentários |
---|---|---|---|
id | string | ID único do evento gerado pela Nuvem Fiscal. |
- Content-Type: Não especificado
- Accept: /
Código status | Descrição | Headers da resposta |
---|---|---|
200 | Successful response | - |
[Voltar ao topo] [Voltar à listagem da API] [Voltar à lista de DTOs] [Voltar ao README]
FileParameter BaixarXmlInutilizacaoNfce (string id)
Baixar XML da inutilização
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using NuvemFiscal.Sdk.Api;
using NuvemFiscal.Sdk.Client;
using NuvemFiscal.Sdk.Model;
namespace Example
{
public class BaixarXmlInutilizacaoNfceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.nuvemfiscal.com.br";
// Configure API key authorization: jwt
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new NfceApi(httpClient, config, httpClientHandler);
var id = "id_example"; // string | ID único do evento gerado pela Nuvem Fiscal.
try
{
// Baixar XML da inutilização
FileParameter result = apiInstance.BaixarXmlInutilizacaoNfce(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NfceApi.BaixarXmlInutilizacaoNfce: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Esses métodos retornam um objeto ApiResponse que contêm os dados da resposta, o código de status e os headers HTTP.
try
{
// Baixar XML da inutilização
ApiResponse<FileParameter> response = apiInstance.BaixarXmlInutilizacaoNfceWithHttpInfo(id);
Debug.Write("Código de status: " + response.StatusCode);
Debug.Write("Headers da resposta: " + response.Headers);
Debug.Write("Conteúdo da resposta: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exceção ao chamar NfceApi.BaixarXmlInutilizacaoNfceWithHttpInfo: " + e.Message);
Debug.Print("Código de status: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Nome | Tipo | Descrição | Comentários |
---|---|---|---|
id | string | ID único do evento gerado pela Nuvem Fiscal. |
- Content-Type: Não especificado
- Accept: /
Código status | Descrição | Headers da resposta |
---|---|---|
200 | Successful response | - |
[Voltar ao topo] [Voltar à listagem da API] [Voltar à lista de DTOs] [Voltar ao README]
FileParameter BaixarXmlNfce (string id)
Baixar XML da NFC-e processada
Utilize esse endpoint para obter o XML da nota enviado para a SEFAZ, complementado com a informação do protocolo de autorização ou denegação de uso (TAG raiz nfeProc
). O XML só estará disponível nesse endpoint caso a nota tenha sido autorizada ou denegada pela SEFAZ. Para obter o XML nos demais casos, utilize o endpoint GET /nfce/{id}/xml/nota
.
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using NuvemFiscal.Sdk.Api;
using NuvemFiscal.Sdk.Client;
using NuvemFiscal.Sdk.Model;
namespace Example
{
public class BaixarXmlNfceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.nuvemfiscal.com.br";
// Configure API key authorization: jwt
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new NfceApi(httpClient, config, httpClientHandler);
var id = "id_example"; // string | ID único da NFC-e gerado pela Nuvem Fiscal.
try
{
// Baixar XML da NFC-e processada
FileParameter result = apiInstance.BaixarXmlNfce(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NfceApi.BaixarXmlNfce: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Esses métodos retornam um objeto ApiResponse que contêm os dados da resposta, o código de status e os headers HTTP.
try
{
// Baixar XML da NFC-e processada
ApiResponse<FileParameter> response = apiInstance.BaixarXmlNfceWithHttpInfo(id);
Debug.Write("Código de status: " + response.StatusCode);
Debug.Write("Headers da resposta: " + response.Headers);
Debug.Write("Conteúdo da resposta: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exceção ao chamar NfceApi.BaixarXmlNfceWithHttpInfo: " + e.Message);
Debug.Print("Código de status: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Nome | Tipo | Descrição | Comentários |
---|---|---|---|
id | string | ID único da NFC-e gerado pela Nuvem Fiscal. |
- Content-Type: Não especificado
- Accept: /
Código status | Descrição | Headers da resposta |
---|---|---|
200 | Successful response | - |
[Voltar ao topo] [Voltar à listagem da API] [Voltar à lista de DTOs] [Voltar ao README]
FileParameter BaixarXmlNfceNota (string id)
Baixar XML da NFC-e
Utilize esse endpoint para obter o XML da nota enviado para a SEFAZ. O XML estará disponível nesse endpoint mesmo em casos que a nota tenha sido rejeitada.
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using NuvemFiscal.Sdk.Api;
using NuvemFiscal.Sdk.Client;
using NuvemFiscal.Sdk.Model;
namespace Example
{
public class BaixarXmlNfceNotaExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.nuvemfiscal.com.br";
// Configure API key authorization: jwt
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new NfceApi(httpClient, config, httpClientHandler);
var id = "id_example"; // string | ID único da NFC-e gerado pela Nuvem Fiscal.
try
{
// Baixar XML da NFC-e
FileParameter result = apiInstance.BaixarXmlNfceNota(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NfceApi.BaixarXmlNfceNota: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Esses métodos retornam um objeto ApiResponse que contêm os dados da resposta, o código de status e os headers HTTP.
try
{
// Baixar XML da NFC-e
ApiResponse<FileParameter> response = apiInstance.BaixarXmlNfceNotaWithHttpInfo(id);
Debug.Write("Código de status: " + response.StatusCode);
Debug.Write("Headers da resposta: " + response.Headers);
Debug.Write("Conteúdo da resposta: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exceção ao chamar NfceApi.BaixarXmlNfceNotaWithHttpInfo: " + e.Message);
Debug.Print("Código de status: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Nome | Tipo | Descrição | Comentários |
---|---|---|---|
id | string | ID único da NFC-e gerado pela Nuvem Fiscal. |
- Content-Type: Não especificado
- Accept: /
Código status | Descrição | Headers da resposta |
---|---|---|
200 | Successful response | - |
[Voltar ao topo] [Voltar à listagem da API] [Voltar à lista de DTOs] [Voltar ao README]
FileParameter BaixarXmlNfceProtocolo (string id)
Baixar XML do Protocolo da SEFAZ
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using NuvemFiscal.Sdk.Api;
using NuvemFiscal.Sdk.Client;
using NuvemFiscal.Sdk.Model;
namespace Example
{
public class BaixarXmlNfceProtocoloExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.nuvemfiscal.com.br";
// Configure API key authorization: jwt
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new NfceApi(httpClient, config, httpClientHandler);
var id = "id_example"; // string | ID único da NFC-e gerado pela Nuvem Fiscal.
try
{
// Baixar XML do Protocolo da SEFAZ
FileParameter result = apiInstance.BaixarXmlNfceProtocolo(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NfceApi.BaixarXmlNfceProtocolo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Esses métodos retornam um objeto ApiResponse que contêm os dados da resposta, o código de status e os headers HTTP.
try
{
// Baixar XML do Protocolo da SEFAZ
ApiResponse<FileParameter> response = apiInstance.BaixarXmlNfceProtocoloWithHttpInfo(id);
Debug.Write("Código de status: " + response.StatusCode);
Debug.Write("Headers da resposta: " + response.Headers);
Debug.Write("Conteúdo da resposta: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exceção ao chamar NfceApi.BaixarXmlNfceProtocoloWithHttpInfo: " + e.Message);
Debug.Print("Código de status: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Nome | Tipo | Descrição | Comentários |
---|---|---|---|
id | string | ID único da NFC-e gerado pela Nuvem Fiscal. |
- Content-Type: Não especificado
- Accept: /
Código status | Descrição | Headers da resposta |
---|---|---|
200 | Successful response | - |
[Voltar ao topo] [Voltar à listagem da API] [Voltar à lista de DTOs] [Voltar ao README]
DfeCancelamento CancelarNfce (string id, NfePedidoCancelamento body = null)
Cancelar uma NFC-e autorizada
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using NuvemFiscal.Sdk.Api;
using NuvemFiscal.Sdk.Client;
using NuvemFiscal.Sdk.Model;
namespace Example
{
public class CancelarNfceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.nuvemfiscal.com.br";
// Configure API key authorization: jwt
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new NfceApi(httpClient, config, httpClientHandler);
var id = "id_example"; // string | ID único da NFC-e gerado pela Nuvem Fiscal.
var body = new NfePedidoCancelamento(); // NfePedidoCancelamento | (optional)
try
{
// Cancelar uma NFC-e autorizada
DfeCancelamento result = apiInstance.CancelarNfce(id, body);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NfceApi.CancelarNfce: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Esses métodos retornam um objeto ApiResponse que contêm os dados da resposta, o código de status e os headers HTTP.
try
{
// Cancelar uma NFC-e autorizada
ApiResponse<DfeCancelamento> response = apiInstance.CancelarNfceWithHttpInfo(id, body);
Debug.Write("Código de status: " + response.StatusCode);
Debug.Write("Headers da resposta: " + response.Headers);
Debug.Write("Conteúdo da resposta: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exceção ao chamar NfceApi.CancelarNfceWithHttpInfo: " + e.Message);
Debug.Print("Código de status: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Nome | Tipo | Descrição | Comentários |
---|---|---|---|
id | string | ID único da NFC-e gerado pela Nuvem Fiscal. | |
body | NfePedidoCancelamento | [optional] |
- Content-Type: application/json
- Accept: application/json
Código status | Descrição | Headers da resposta |
---|---|---|
200 | Successful response | - |
[Voltar ao topo] [Voltar à listagem da API] [Voltar à lista de DTOs] [Voltar ao README]
DfeCancelamento ConsultarCancelamentoNfce (string id)
Consultar o cancelamento da NFC-e
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using NuvemFiscal.Sdk.Api;
using NuvemFiscal.Sdk.Client;
using NuvemFiscal.Sdk.Model;
namespace Example
{
public class ConsultarCancelamentoNfceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.nuvemfiscal.com.br";
// Configure API key authorization: jwt
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new NfceApi(httpClient, config, httpClientHandler);
var id = "id_example"; // string | ID único da NFC-e gerado pela Nuvem Fiscal.
try
{
// Consultar o cancelamento da NFC-e
DfeCancelamento result = apiInstance.ConsultarCancelamentoNfce(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NfceApi.ConsultarCancelamentoNfce: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Esses métodos retornam um objeto ApiResponse que contêm os dados da resposta, o código de status e os headers HTTP.
try
{
// Consultar o cancelamento da NFC-e
ApiResponse<DfeCancelamento> response = apiInstance.ConsultarCancelamentoNfceWithHttpInfo(id);
Debug.Write("Código de status: " + response.StatusCode);
Debug.Write("Headers da resposta: " + response.Headers);
Debug.Write("Conteúdo da resposta: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exceção ao chamar NfceApi.ConsultarCancelamentoNfceWithHttpInfo: " + e.Message);
Debug.Print("Código de status: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Nome | Tipo | Descrição | Comentários |
---|---|---|---|
id | string | ID único da NFC-e gerado pela Nuvem Fiscal. |
- Content-Type: Não especificado
- Accept: application/json
Código status | Descrição | Headers da resposta |
---|---|---|
200 | Successful response | - |
[Voltar ao topo] [Voltar à listagem da API] [Voltar à lista de DTOs] [Voltar ao README]
DfeEvento ConsultarEventoNfce (string id)
Consultar evento
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using NuvemFiscal.Sdk.Api;
using NuvemFiscal.Sdk.Client;
using NuvemFiscal.Sdk.Model;
namespace Example
{
public class ConsultarEventoNfceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.nuvemfiscal.com.br";
// Configure API key authorization: jwt
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new NfceApi(httpClient, config, httpClientHandler);
var id = "id_example"; // string | ID único do evento gerado pela Nuvem Fiscal.
try
{
// Consultar evento
DfeEvento result = apiInstance.ConsultarEventoNfce(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NfceApi.ConsultarEventoNfce: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Esses métodos retornam um objeto ApiResponse que contêm os dados da resposta, o código de status e os headers HTTP.
try
{
// Consultar evento
ApiResponse<DfeEvento> response = apiInstance.ConsultarEventoNfceWithHttpInfo(id);
Debug.Write("Código de status: " + response.StatusCode);
Debug.Write("Headers da resposta: " + response.Headers);
Debug.Write("Conteúdo da resposta: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exceção ao chamar NfceApi.ConsultarEventoNfceWithHttpInfo: " + e.Message);
Debug.Print("Código de status: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Nome | Tipo | Descrição | Comentários |
---|---|---|---|
id | string | ID único do evento gerado pela Nuvem Fiscal. |
- Content-Type: Não especificado
- Accept: application/json
Código status | Descrição | Headers da resposta |
---|---|---|
200 | Successful response | - |
[Voltar ao topo] [Voltar à listagem da API] [Voltar à lista de DTOs] [Voltar ao README]
DfeInutilizacao ConsultarInutilizacaoNfce (string id)
Consultar a inutilização de sequência de numeração
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using NuvemFiscal.Sdk.Api;
using NuvemFiscal.Sdk.Client;
using NuvemFiscal.Sdk.Model;
namespace Example
{
public class ConsultarInutilizacaoNfceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.nuvemfiscal.com.br";
// Configure API key authorization: jwt
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new NfceApi(httpClient, config, httpClientHandler);
var id = "id_example"; // string | ID único do evento gerado pela Nuvem Fiscal.
try
{
// Consultar a inutilização de sequência de numeração
DfeInutilizacao result = apiInstance.ConsultarInutilizacaoNfce(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NfceApi.ConsultarInutilizacaoNfce: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Esses métodos retornam um objeto ApiResponse que contêm os dados da resposta, o código de status e os headers HTTP.
try
{
// Consultar a inutilização de sequência de numeração
ApiResponse<DfeInutilizacao> response = apiInstance.ConsultarInutilizacaoNfceWithHttpInfo(id);
Debug.Write("Código de status: " + response.StatusCode);
Debug.Write("Headers da resposta: " + response.Headers);
Debug.Write("Conteúdo da resposta: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exceção ao chamar NfceApi.ConsultarInutilizacaoNfceWithHttpInfo: " + e.Message);
Debug.Print("Código de status: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Nome | Tipo | Descrição | Comentários |
---|---|---|---|
id | string | ID único do evento gerado pela Nuvem Fiscal. |
- Content-Type: Não especificado
- Accept: application/json
Código status | Descrição | Headers da resposta |
---|---|---|
200 | Successful response | - |
[Voltar ao topo] [Voltar à listagem da API] [Voltar à lista de DTOs] [Voltar ao README]
DfeLote ConsultarLoteNfce (string id)
Consultar lote de NFC-e
Consulta os detalhes de um lote já existente. Forneça o ID único obtido de uma requisição de emissão ou de listagem de lotes e a Nuvem Fiscal irá retornar as informações do lote correspondente.
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using NuvemFiscal.Sdk.Api;
using NuvemFiscal.Sdk.Client;
using NuvemFiscal.Sdk.Model;
namespace Example
{
public class ConsultarLoteNfceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.nuvemfiscal.com.br";
// Configure API key authorization: jwt
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new NfceApi(httpClient, config, httpClientHandler);
var id = "id_example"; // string | ID único do lote gerado pela Nuvem Fiscal.
try
{
// Consultar lote de NFC-e
DfeLote result = apiInstance.ConsultarLoteNfce(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NfceApi.ConsultarLoteNfce: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Esses métodos retornam um objeto ApiResponse que contêm os dados da resposta, o código de status e os headers HTTP.
try
{
// Consultar lote de NFC-e
ApiResponse<DfeLote> response = apiInstance.ConsultarLoteNfceWithHttpInfo(id);
Debug.Write("Código de status: " + response.StatusCode);
Debug.Write("Headers da resposta: " + response.Headers);
Debug.Write("Conteúdo da resposta: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exceção ao chamar NfceApi.ConsultarLoteNfceWithHttpInfo: " + e.Message);
Debug.Print("Código de status: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Nome | Tipo | Descrição | Comentários |
---|---|---|---|
id | string | ID único do lote gerado pela Nuvem Fiscal. |
- Content-Type: Não especificado
- Accept: application/json
Código status | Descrição | Headers da resposta |
---|---|---|
200 | Successful response | - |
[Voltar ao topo] [Voltar à listagem da API] [Voltar à lista de DTOs] [Voltar ao README]
Dfe ConsultarNfce (string id)
Consultar NFC-e
Consulta os detalhes de uma NFC-e já existente. Forneça o ID único obtido de uma requisição de emissão ou de listagem de notas e a Nuvem Fiscal irá retornar as informações da nota correspondente.
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using NuvemFiscal.Sdk.Api;
using NuvemFiscal.Sdk.Client;
using NuvemFiscal.Sdk.Model;
namespace Example
{
public class ConsultarNfceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.nuvemfiscal.com.br";
// Configure API key authorization: jwt
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new NfceApi(httpClient, config, httpClientHandler);
var id = "id_example"; // string | ID único da NFC-e gerado pela Nuvem Fiscal.
try
{
// Consultar NFC-e
Dfe result = apiInstance.ConsultarNfce(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NfceApi.ConsultarNfce: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Esses métodos retornam um objeto ApiResponse que contêm os dados da resposta, o código de status e os headers HTTP.
try
{
// Consultar NFC-e
ApiResponse<Dfe> response = apiInstance.ConsultarNfceWithHttpInfo(id);
Debug.Write("Código de status: " + response.StatusCode);
Debug.Write("Headers da resposta: " + response.Headers);
Debug.Write("Conteúdo da resposta: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exceção ao chamar NfceApi.ConsultarNfceWithHttpInfo: " + e.Message);
Debug.Print("Código de status: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Nome | Tipo | Descrição | Comentários |
---|---|---|---|
id | string | ID único da NFC-e gerado pela Nuvem Fiscal. |
- Content-Type: Não especificado
- Accept: application/json
Código status | Descrição | Headers da resposta |
---|---|---|
200 | Successful response | - |
[Voltar ao topo] [Voltar à listagem da API] [Voltar à lista de DTOs] [Voltar ao README]
DfeSefazStatus ConsultarStatusSefazNfce (string cpfCnpj, string autorizador = null)
Consulta do Status do Serviço na SEFAZ Autorizadora
Consulta do status do serviço prestado pelo Portal da Secretaria de Fazenda Estadual. A Nuvem Fiscal mantém a última consulta em cache por 5 minutos, evitando sobrecarregar desnecessariamente os servidores da SEFAZ (conforme orientação do MOC - versão 7.0, item 5.5.3). Dessa forma, você poderá chamar esse endpoint quantas vezes quiser, sem preocupar-se em ter o seu CNPJ bloqueado por consumo indevido (Rejeição 656).
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using NuvemFiscal.Sdk.Api;
using NuvemFiscal.Sdk.Client;
using NuvemFiscal.Sdk.Model;
namespace Example
{
public class ConsultarStatusSefazNfceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.nuvemfiscal.com.br";
// Configure API key authorization: jwt
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new NfceApi(httpClient, config, httpClientHandler);
var cpfCnpj = "cpfCnpj_example"; // string | CPF/CNPJ do emitente. Utilize o valor sem máscara.
var autorizador = "autorizador_example"; // string | Ambiente Autorizador. Autorizadores disponíveis: `AM`, `BA`, `CE`, `GO`, `MG`, `MS`, `MT`, `PE`, `PR`, `RS`, `SP`, `SVRS`. *Caso não seja informado, será utilizado o ambiente autorizador da UF do emitente.* (optional)
try
{
// Consulta do Status do Serviço na SEFAZ Autorizadora
DfeSefazStatus result = apiInstance.ConsultarStatusSefazNfce(cpfCnpj, autorizador);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NfceApi.ConsultarStatusSefazNfce: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Esses métodos retornam um objeto ApiResponse que contêm os dados da resposta, o código de status e os headers HTTP.
try
{
// Consulta do Status do Serviço na SEFAZ Autorizadora
ApiResponse<DfeSefazStatus> response = apiInstance.ConsultarStatusSefazNfceWithHttpInfo(cpfCnpj, autorizador);
Debug.Write("Código de status: " + response.StatusCode);
Debug.Write("Headers da resposta: " + response.Headers);
Debug.Write("Conteúdo da resposta: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exceção ao chamar NfceApi.ConsultarStatusSefazNfceWithHttpInfo: " + e.Message);
Debug.Print("Código de status: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Nome | Tipo | Descrição | Comentários |
---|---|---|---|
cpfCnpj | string | CPF/CNPJ do emitente. Utilize o valor sem máscara. | |
autorizador | string | Ambiente Autorizador. Autorizadores disponíveis: `AM`, `BA`, `CE`, `GO`, `MG`, `MS`, `MT`, `PE`, `PR`, `RS`, `SP`, `SVRS`. Caso não seja informado, será utilizado o ambiente autorizador da UF do emitente. | [optional] |
- Content-Type: Não especificado
- Accept: application/json
Código status | Descrição | Headers da resposta |
---|---|---|
200 | Successful response | - |
[Voltar ao topo] [Voltar à listagem da API] [Voltar à lista de DTOs] [Voltar ao README]
DfeLote EmitirLoteNfce (NfePedidoEmissaoLote body)
Emitir lote de NFC-e
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using NuvemFiscal.Sdk.Api;
using NuvemFiscal.Sdk.Client;
using NuvemFiscal.Sdk.Model;
namespace Example
{
public class EmitirLoteNfceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.nuvemfiscal.com.br";
// Configure API key authorization: jwt
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new NfceApi(httpClient, config, httpClientHandler);
var body = new NfePedidoEmissaoLote(); // NfePedidoEmissaoLote |
try
{
// Emitir lote de NFC-e
DfeLote result = apiInstance.EmitirLoteNfce(body);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NfceApi.EmitirLoteNfce: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Esses métodos retornam um objeto ApiResponse que contêm os dados da resposta, o código de status e os headers HTTP.
try
{
// Emitir lote de NFC-e
ApiResponse<DfeLote> response = apiInstance.EmitirLoteNfceWithHttpInfo(body);
Debug.Write("Código de status: " + response.StatusCode);
Debug.Write("Headers da resposta: " + response.Headers);
Debug.Write("Conteúdo da resposta: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exceção ao chamar NfceApi.EmitirLoteNfceWithHttpInfo: " + e.Message);
Debug.Print("Código de status: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Nome | Tipo | Descrição | Comentários |
---|---|---|---|
body | NfePedidoEmissaoLote |
- Content-Type: application/json
- Accept: application/json
Código status | Descrição | Headers da resposta |
---|---|---|
200 | Successful response | - |
[Voltar ao topo] [Voltar à listagem da API] [Voltar à lista de DTOs] [Voltar ao README]
Dfe EmitirNfce (NfePedidoEmissao body)
Emitir NFC-e
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using NuvemFiscal.Sdk.Api;
using NuvemFiscal.Sdk.Client;
using NuvemFiscal.Sdk.Model;
namespace Example
{
public class EmitirNfceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.nuvemfiscal.com.br";
// Configure API key authorization: jwt
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new NfceApi(httpClient, config, httpClientHandler);
var body = new NfePedidoEmissao(); // NfePedidoEmissao |
try
{
// Emitir NFC-e
Dfe result = apiInstance.EmitirNfce(body);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NfceApi.EmitirNfce: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Esses métodos retornam um objeto ApiResponse que contêm os dados da resposta, o código de status e os headers HTTP.
try
{
// Emitir NFC-e
ApiResponse<Dfe> response = apiInstance.EmitirNfceWithHttpInfo(body);
Debug.Write("Código de status: " + response.StatusCode);
Debug.Write("Headers da resposta: " + response.Headers);
Debug.Write("Conteúdo da resposta: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exceção ao chamar NfceApi.EmitirNfceWithHttpInfo: " + e.Message);
Debug.Print("Código de status: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Nome | Tipo | Descrição | Comentários |
---|---|---|---|
body | NfePedidoEmissao |
- Content-Type: application/json
- Accept: application/json
Código status | Descrição | Headers da resposta |
---|---|---|
200 | Successful response | - |
[Voltar ao topo] [Voltar à listagem da API] [Voltar à lista de DTOs] [Voltar ao README]
DfeInutilizacao InutilizarNumeracaoNfce (DfePedidoInutilizacao body)
Inutilizar uma sequência de numeração de NFC-e
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using NuvemFiscal.Sdk.Api;
using NuvemFiscal.Sdk.Client;
using NuvemFiscal.Sdk.Model;
namespace Example
{
public class InutilizarNumeracaoNfceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.nuvemfiscal.com.br";
// Configure API key authorization: jwt
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new NfceApi(httpClient, config, httpClientHandler);
var body = new DfePedidoInutilizacao(); // DfePedidoInutilizacao |
try
{
// Inutilizar uma sequência de numeração de NFC-e
DfeInutilizacao result = apiInstance.InutilizarNumeracaoNfce(body);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NfceApi.InutilizarNumeracaoNfce: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Esses métodos retornam um objeto ApiResponse que contêm os dados da resposta, o código de status e os headers HTTP.
try
{
// Inutilizar uma sequência de numeração de NFC-e
ApiResponse<DfeInutilizacao> response = apiInstance.InutilizarNumeracaoNfceWithHttpInfo(body);
Debug.Write("Código de status: " + response.StatusCode);
Debug.Write("Headers da resposta: " + response.Headers);
Debug.Write("Conteúdo da resposta: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exceção ao chamar NfceApi.InutilizarNumeracaoNfceWithHttpInfo: " + e.Message);
Debug.Print("Código de status: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Nome | Tipo | Descrição | Comentários |
---|---|---|---|
body | DfePedidoInutilizacao |
- Content-Type: application/json
- Accept: application/json
Código status | Descrição | Headers da resposta |
---|---|---|
200 | Successful response | - |
[Voltar ao topo] [Voltar à listagem da API] [Voltar à lista de DTOs] [Voltar ao README]
DfeEventoListagem ListarEventosNfce (string dfeId, int? top = null, int? skip = null, bool? inlinecount = null)
Listar eventos
Retorna a lista de eventos vinculados a um documento fiscal de acordo com os critérios de busca utilizados. Os eventos são retornados ordenados pela data da criação, com as mais recentes aparecendo primeiro.
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using NuvemFiscal.Sdk.Api;
using NuvemFiscal.Sdk.Client;
using NuvemFiscal.Sdk.Model;
namespace Example
{
public class ListarEventosNfceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.nuvemfiscal.com.br";
// Configure API key authorization: jwt
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new NfceApi(httpClient, config, httpClientHandler);
var dfeId = "dfeId_example"; // string | ID único gerado pela Nuvem Fiscal para o documento fiscal.
var top = 10; // int? | Limite no número de objetos a serem retornados pela API, entre 1 e 100. (optional) (default to 10)
var skip = 0; // int? | Quantidade de objetos que serão ignorados antes da lista começar a ser retornada. (optional) (default to 0)
var inlinecount = false; // bool? | Inclui no JSON de resposta, na propriedade `@count`, o número total de registros que o filtro retornaria, independente dos filtros de paginação. (optional) (default to false)
try
{
// Listar eventos
DfeEventoListagem result = apiInstance.ListarEventosNfce(dfeId, top, skip, inlinecount);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NfceApi.ListarEventosNfce: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Esses métodos retornam um objeto ApiResponse que contêm os dados da resposta, o código de status e os headers HTTP.
try
{
// Listar eventos
ApiResponse<DfeEventoListagem> response = apiInstance.ListarEventosNfceWithHttpInfo(dfeId, top, skip, inlinecount);
Debug.Write("Código de status: " + response.StatusCode);
Debug.Write("Headers da resposta: " + response.Headers);
Debug.Write("Conteúdo da resposta: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exceção ao chamar NfceApi.ListarEventosNfceWithHttpInfo: " + e.Message);
Debug.Print("Código de status: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Nome | Tipo | Descrição | Comentários |
---|---|---|---|
dfeId | string | ID único gerado pela Nuvem Fiscal para o documento fiscal. | |
top | int? | Limite no número de objetos a serem retornados pela API, entre 1 e 100. | [optional] [default to 10] |
skip | int? | Quantidade de objetos que serão ignorados antes da lista começar a ser retornada. | [optional] [default to 0] |
inlinecount | bool? | Inclui no JSON de resposta, na propriedade `@count`, o número total de registros que o filtro retornaria, independente dos filtros de paginação. | [optional] [default to false] |
- Content-Type: Não especificado
- Accept: application/json
Código status | Descrição | Headers da resposta |
---|---|---|
200 | Successful response | - |
[Voltar ao topo] [Voltar à listagem da API] [Voltar à lista de DTOs] [Voltar ao README]
DfeLoteListagem ListarLotesNfce (string cpfCnpj, string ambiente, int? top = null, int? skip = null, bool? inlinecount = null, string referencia = null)
Listar lotes de NFC-e
Retorna a lista dos lotes de acordo com os critérios de busca utilizados. Os lotes são retornados ordenados pela data da criação, com os mais recentes aparecendo primeiro.
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using NuvemFiscal.Sdk.Api;
using NuvemFiscal.Sdk.Client;
using NuvemFiscal.Sdk.Model;
namespace Example
{
public class ListarLotesNfceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.nuvemfiscal.com.br";
// Configure API key authorization: jwt
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new NfceApi(httpClient, config, httpClientHandler);
var cpfCnpj = "cpfCnpj_example"; // string | Filtrar pelo CPF ou CNPJ do emitente. Utilize o valor sem máscara.
var ambiente = "ambiente_example"; // string | Identificação do Ambiente. Valores aceitos: homologacao, producao
var top = 10; // int? | Limite no número de objetos a serem retornados pela API, entre 1 e 100. (optional) (default to 10)
var skip = 0; // int? | Quantidade de objetos que serão ignorados antes da lista começar a ser retornada. (optional) (default to 0)
var inlinecount = false; // bool? | Inclui no JSON de resposta, na propriedade `@count`, o número total de registros que o filtro retornaria, independente dos filtros de paginação. (optional) (default to false)
var referencia = "referencia_example"; // string | (optional)
try
{
// Listar lotes de NFC-e
DfeLoteListagem result = apiInstance.ListarLotesNfce(cpfCnpj, ambiente, top, skip, inlinecount, referencia);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NfceApi.ListarLotesNfce: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Esses métodos retornam um objeto ApiResponse que contêm os dados da resposta, o código de status e os headers HTTP.
try
{
// Listar lotes de NFC-e
ApiResponse<DfeLoteListagem> response = apiInstance.ListarLotesNfceWithHttpInfo(cpfCnpj, ambiente, top, skip, inlinecount, referencia);
Debug.Write("Código de status: " + response.StatusCode);
Debug.Write("Headers da resposta: " + response.Headers);
Debug.Write("Conteúdo da resposta: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exceção ao chamar NfceApi.ListarLotesNfceWithHttpInfo: " + e.Message);
Debug.Print("Código de status: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Nome | Tipo | Descrição | Comentários |
---|---|---|---|
cpfCnpj | string | Filtrar pelo CPF ou CNPJ do emitente. Utilize o valor sem máscara. | |
ambiente | string | Identificação do Ambiente. Valores aceitos: homologacao, producao | |
top | int? | Limite no número de objetos a serem retornados pela API, entre 1 e 100. | [optional] [default to 10] |
skip | int? | Quantidade de objetos que serão ignorados antes da lista começar a ser retornada. | [optional] [default to 0] |
inlinecount | bool? | Inclui no JSON de resposta, na propriedade `@count`, o número total de registros que o filtro retornaria, independente dos filtros de paginação. | [optional] [default to false] |
referencia | string | [optional] |
- Content-Type: Não especificado
- Accept: application/json
Código status | Descrição | Headers da resposta |
---|---|---|
200 | Successful response | - |
[Voltar ao topo] [Voltar à listagem da API] [Voltar à lista de DTOs] [Voltar ao README]
DfeListagem ListarNfce (string cpfCnpj, string ambiente, int? top = null, int? skip = null, bool? inlinecount = null, string referencia = null, string chave = null, string serie = null)
Listar NFC-e
Retorna a lista de notas de acordo com os critérios de busca utilizados. As notas são retornadas ordenadas pela data da criação, com as mais recentes aparecendo primeiro.
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using NuvemFiscal.Sdk.Api;
using NuvemFiscal.Sdk.Client;
using NuvemFiscal.Sdk.Model;
namespace Example
{
public class ListarNfceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.nuvemfiscal.com.br";
// Configure API key authorization: jwt
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new NfceApi(httpClient, config, httpClientHandler);
var cpfCnpj = "cpfCnpj_example"; // string | Filtrar pelo CPF ou CNPJ do emitente. Utilize o valor sem máscara.
var ambiente = "ambiente_example"; // string | Identificação do Ambiente. Valores aceitos: homologacao, producao
var top = 10; // int? | Limite no número de objetos a serem retornados pela API, entre 1 e 100. (optional) (default to 10)
var skip = 0; // int? | Quantidade de objetos que serão ignorados antes da lista começar a ser retornada. (optional) (default to 0)
var inlinecount = false; // bool? | Inclui no JSON de resposta, na propriedade `@count`, o número total de registros que o filtro retornaria, independente dos filtros de paginação. (optional) (default to false)
var referencia = "referencia_example"; // string | Seu identificador único para o documento. (optional)
var chave = "chave_example"; // string | Chave de acesso do DF-e. (optional)
var serie = "serie_example"; // string | Série do DF-e. (optional)
try
{
// Listar NFC-e
DfeListagem result = apiInstance.ListarNfce(cpfCnpj, ambiente, top, skip, inlinecount, referencia, chave, serie);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NfceApi.ListarNfce: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Esses métodos retornam um objeto ApiResponse que contêm os dados da resposta, o código de status e os headers HTTP.
try
{
// Listar NFC-e
ApiResponse<DfeListagem> response = apiInstance.ListarNfceWithHttpInfo(cpfCnpj, ambiente, top, skip, inlinecount, referencia, chave, serie);
Debug.Write("Código de status: " + response.StatusCode);
Debug.Write("Headers da resposta: " + response.Headers);
Debug.Write("Conteúdo da resposta: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exceção ao chamar NfceApi.ListarNfceWithHttpInfo: " + e.Message);
Debug.Print("Código de status: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Nome | Tipo | Descrição | Comentários |
---|---|---|---|
cpfCnpj | string | Filtrar pelo CPF ou CNPJ do emitente. Utilize o valor sem máscara. | |
ambiente | string | Identificação do Ambiente. Valores aceitos: homologacao, producao | |
top | int? | Limite no número de objetos a serem retornados pela API, entre 1 e 100. | [optional] [default to 10] |
skip | int? | Quantidade de objetos que serão ignorados antes da lista começar a ser retornada. | [optional] [default to 0] |
inlinecount | bool? | Inclui no JSON de resposta, na propriedade `@count`, o número total de registros que o filtro retornaria, independente dos filtros de paginação. | [optional] [default to false] |
referencia | string | Seu identificador único para o documento. | [optional] |
chave | string | Chave de acesso do DF-e. | [optional] |
serie | string | Série do DF-e. | [optional] |
- Content-Type: Não especificado
- Accept: application/json
Código status | Descrição | Headers da resposta |
---|---|---|
200 | Successful response | - |
[Voltar ao topo] [Voltar à listagem da API] [Voltar à lista de DTOs] [Voltar ao README]
DfeSincronizacao SincronizarNfce (string id)
Sincroniza dados na NFC-e a partir da SEFAZ
Realiza a sincronização dos dados a partir da consulta da situação atual da NFC-e na Base de Dados do Portal da Secretaria de Fazenda Estadual. Cenários de uso: * Sincronizar uma nota que se encontra com o status erro
na Nuvem Fiscal, mas está autorizada na SEFAZ (útil em casos de erros de transmissão com a SEFAZ, como instabilidades e timeouts). * Sincronizar uma nota que se encontra com o status autorizado
na Nuvem Fiscal, mas está cancelada na SEFAZ. * Sincronizar todos os eventos de Cancelamento, Carta de Correção e EPEC de uma nota que porventura não tenham sido feitos a partir da Nuvem Fiscal.
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using NuvemFiscal.Sdk.Api;
using NuvemFiscal.Sdk.Client;
using NuvemFiscal.Sdk.Model;
namespace Example
{
public class SincronizarNfceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.nuvemfiscal.com.br";
// Configure API key authorization: jwt
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new NfceApi(httpClient, config, httpClientHandler);
var id = "id_example"; // string | ID único da NFC-e gerado pela Nuvem Fiscal.
try
{
// Sincroniza dados na NFC-e a partir da SEFAZ
DfeSincronizacao result = apiInstance.SincronizarNfce(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NfceApi.SincronizarNfce: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Esses métodos retornam um objeto ApiResponse que contêm os dados da resposta, o código de status e os headers HTTP.
try
{
// Sincroniza dados na NFC-e a partir da SEFAZ
ApiResponse<DfeSincronizacao> response = apiInstance.SincronizarNfceWithHttpInfo(id);
Debug.Write("Código de status: " + response.StatusCode);
Debug.Write("Headers da resposta: " + response.Headers);
Debug.Write("Conteúdo da resposta: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exceção ao chamar NfceApi.SincronizarNfceWithHttpInfo: " + e.Message);
Debug.Print("Código de status: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Nome | Tipo | Descrição | Comentários |
---|---|---|---|
id | string | ID único da NFC-e gerado pela Nuvem Fiscal. |
- Content-Type: Não especificado
- Accept: application/json
Código status | Descrição | Headers da resposta |
---|---|---|
200 | Successful response | - |
[Voltar ao topo] [Voltar à listagem da API] [Voltar à lista de DTOs] [Voltar ao README]