> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.erp.olist.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Emitir Nota Fiscal

> Serviço para transmitir nota fiscal para a SEFAZ e obter autorização.

## Endpoint

```
POST https://api.tiny.com.br/api2/nota.fiscal.emitir.php
```

## Parâmetros

| Parâmetro     | Tipo   | Ocorrência  | Descrição                                 |
| ------------- | ------ | ----------- | ----------------------------------------- |
| token         | string | obrigatório | Chave gerada para identificar sua empresa |
| formato       | string | obrigatório | Formato do retorno (json)                 |
| id            | int    | obrigatório | ID da nota fiscal                         |
| enviar\_email | string | opcional    | S ou N (padrão: S)                        |

## Descrição

Este serviço transmite a nota fiscal para a SEFAZ, aguarda a autorização e retorna o resultado. O processo pode levar alguns segundos.

## Exemplo de chamada

```bash theme={null}
curl -X POST https://api.tiny.com.br/api2/nota.fiscal.emitir.php \
  -d "token=SEU_TOKEN&formato=json&id=654321&enviar_email=S"
```

## Retorno

```json theme={null}
{
  "retorno": {
    "status": "OK",
    "chave_acesso": "35240512345678901234550010000123451234567890",
    "numero_protocolo": "135240000123456",
    "situacao": "autorizado"
  }
}
```
