# API - Cancelar/Inutilizar NFC-e por ID Empresa

## API - Cancelar/Inutilizar NFC-e por ID Empresa

<mark style="color:green;">`POST`</mark> `https://sandbox-api.invoisys.com.br/api/nfce/cancelarnfce`

API utilizada para realizar o cancelamento de uma NFC-e, baseado no ID Empresa

#### Headers

| Name          | Type   | Description                           |
| ------------- | ------ | ------------------------------------- |
| Content-type  | string | `application/x-www-form-urlencoded​​` |
| Accept        | string | `application/json​​​`                 |
| Authorization | string | `bearer <valor>`                      |

#### Request Body

| Name                    | Type    | Description                                       |
| ----------------------- | ------- | ------------------------------------------------- |
| ambiente                | integer | Informa se será em produção ou homologação&#xD;   |
| idEmpresaEmitente       | integer | Identificador da empresa&#xD;                     |
| numeroNFe               | integer | Numeração da NFC-e                                |
| serie                   | integer | Série da NFC-e                                    |
| justificativa           | string  | Texto explicando o motivo do cancelamento&#xD;    |
| chaveDeAcessoSubstituta | integer | Chave de Acesso da NFC-e que acobertou esta not​a |

{% tabs %}
{% tab title="201 " %}

```javascript
{
  "dadosDoDocumento": {
    "id": 1668629,
    "chaveDeAcesso": "13191117921427000125650010000219241123412344",
    "dataHoraEmissao": "2019-11-21T09:15:00",
    "dataDeAutorizacao": "2019-11-21T09:25:50Z",
    "documentoComErro": false,
    "codigoStatusSEFAZ": "101",
    "descricaoStatusSEFAZ": "Cancelamento de NF-e homologado",
    "protocoloSEFAZ": "113190007609986",
    "urlConsultaViaQRCode": "http://homnfce.sefaz.am.gov.br/nfceweb/formConsulta.do?p=13191117921427000125650010000219241123412344|2|2|1|782CA82922C0EC6FB621432E0747277952E820A9",
    "urlConsultaViaChaveDeAcesso": "http://www.sefaz.am.gov.br/nfce/consulta",
    "documentoJaEmitidoAnteriormente": false,
    "status": {
      "key": 1,
      "value": "Cancelado"
    }
  },
  "acoes": {
    "corrigirDocumento": false,
    "cancelar": false,
    "enviarContingencia": false,
    "tentarNovamenteMaisTarde": false,
    "entrarEmContatoComSuporteImediatamente": false,
    "emitirProximoDocumentoNormal": true
  },
  "excecao": null
}
```

{% endtab %}
{% endtabs %}

## APIs Relacionadas 🎈

* [Ambiente para Emissão](/invoisys/endpoints/outras-consultas/enumeradores/api-tipo-de-ambiente.md)
* [Consultar Lista de Empresas](/invoisys/endpoints/cadastros-basicos/empresa-1/api-consultar-lista-de-empresas.md)
* [Consulta NFC-e por Número e Série](/invoisys/endpoints/emissao-notas/nfc-e-1/api-consulta-nfc-e-por-numero-e-serie.md)
* [Consulta NFC-e por Chave de Acesso](/invoisys/endpoints/emissao-notas/nfc-e-1/api-consulta-nfc-e-por-chave-de-acesso.md)
* [Consulta Paginada de NFC-es](/invoisys/endpoints/emissao-notas/nfc-e-1/api-consulta-paginada-de-nfc-es.md)&#x20;

## Referências à API 📌

* [Passo-a-Passo da NFC-e](/invoisys/getting-started/documentos-fiscais/emissao/nfc-e/passo-a-passo.md)
* [Fluxograma - Envio Contigência SEFAZ​](/invoisys/getting-started/documentos-fiscais/emissao/nfc-e/fluxo-operacional/envio-contingencia-sefaz-nfc-e-flux.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://integracao.gitbook.io/invoisys/endpoints/emissao-notas/nfc-e-1/api-cancelar-inutilizar-nfc-e.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
