> For the complete documentation index, see [llms.txt](https://docs.docbits.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.docbits.com/administration-and-setup/settings/global-settings/document-types/edi/supported-electronic-documents/brazil-nfse.md).

# BRAZIL NFS-E

| Property             | Value                                                                |
| -------------------- | -------------------------------------------------------------------- |
| **Country / Region** | Brazil                                                               |
| **Document Types**   | Service Invoice (Nota Fiscal de Serviços Eletrônica)                 |
| **Format**           | XML                                                                  |
| **Standard**         | NFS-e 2.04 (ABRASF national standard for municipal service invoices) |
| **Locale**           | `pt_BR`                                                              |

NFS-e (Nota Fiscal de Serviços Eletrônica) is the Brazilian electronic invoice for services, issued at the municipal level. DocBits supports the ABRASF (Associação Brasileira das Secretarias de Finanças das Capitais) standard schema. NFS-e documents use a different XML structure than NF-e: the main tax is ISS (Imposto Sobre Serviços) rather than ICMS, and supplier/buyer are called `PrestadorServico` / `TomadorServico`. The `Discriminacao` element contains the free-text service description.

## Support Status

| Component        | Status      |
| ---------------- | ----------- |
| Preview          | ✅ Supported |
| Field Extraction | ✅ Supported |
| Transformation   | ✅ Supported |

## Default Preview

<figure><img src="/files/xs52njXgAqWEiw8VesyS" alt="Brazil NFS-e preview in DocBits"><figcaption><p>Default DocBits preview for a BRAZIL NFS-E document</p></figcaption></figure>

## Field Mapping

### Header Fields

| DocBits Field   | Source XPath                                                          | Notes                       |
| --------------- | --------------------------------------------------------------------- | --------------------------- |
| `invoice_id`    | `//*[local-name()='Numero']`                                          | NFS-e number                |
| `invoice_date`  | `//*[local-name()='DataEmissao']`                                     | ISO 8601 emission date      |
| `currency`      | Fixed: `BRL`                                                          | Always Brazilian Real       |
| `total_amount`  | `//*[local-name()='ValorServicos']`                                   | Gross service value         |
| `net_amount`    | `//*[local-name()='ValorLiquidoNfse']`                                | Net value after deductions  |
| `tax_amount`    | `//*[local-name()='ValorIss']`                                        | ISS (municipal service tax) |
| `supplier_name` | `//*[local-name()='PrestadorServico']//*[local-name()='RazaoSocial']` | Service provider name       |
| `supplier_id`   | `//*[local-name()='PrestadorServico']//*[local-name()='Cnpj']`        | Provider CNPJ               |
| `buyer_name`    | `//*[local-name()='TomadorServico']//*[local-name()='RazaoSocial']`   | Service taker name          |
| `buyer_id`      | `//*[local-name()='TomadorServico']//*[local-name()='Cnpj']`          | Taker CNPJ                  |

> NFS-e describes a single service in the `Discriminacao` element rather than line items. No `INVOICE_TABLE` is extracted.

## Classification Rule

DocBits detects BRAZIL NFS-E documents via the namespace:

```
http://www.abrasf.org.br/nfse.xsd
```

## Related

* [BRAZIL NF-E](/administration-and-setup/settings/global-settings/document-types/edi/supported-electronic-documents/brazil-nfe.md)
* [BRAZIL NFC-E](/administration-and-setup/settings/global-settings/document-types/edi/supported-electronic-documents/brazil-nfce.md)
* [BRAZIL CT-E](/administration-and-setup/settings/global-settings/document-types/edi/supported-electronic-documents/brazil-cte.md)
* [Supported Electronic Documents](/administration-and-setup/settings/global-settings/document-types/edi/supported-electronic-documents.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.docbits.com/administration-and-setup/settings/global-settings/document-types/edi/supported-electronic-documents/brazil-nfse.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
