> ## Documentation Index
> Fetch the complete documentation index at: https://gobl-cli-install-gobl-dev.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Brazil NFS-e 1.X

Key: `br-nfse-v1`

Module: [github.com/invopop/gobl.br.nfse](https://github.com/invopop/gobl.br.nfse)

## Extensions

### CNAE code

The CNAE (National Classification of Economic Activities) code for a service.

List of codes from the IBGE (Brazilian Institute of Geography and Statistics):

* [https://www.ibge.gov.br/en/statistics/technical-documents/statistical-lists-and-classifications/17245-national-classification-of-economic-activities.html](https://www.ibge.gov.br/en/statistics/technical-documents/statistical-lists-and-classifications/17245-national-classification-of-economic-activities.html)

<Accordion title="br-nfse-cnae">
  Pattern: `^\d{2}[\s\.\-\/]?\d{2}[\s\.\-\/]?\d[\s\.\-\/]?\d{2}$`
</Accordion>

### NBS code

The NBS (Nomenclatura Brasileira de Serviços, Intangíveis e outras Operações que
produzam Variações no Patrimônio) code for a service. NBS is the Brazilian
classification system for services and intangibles, established by Decreto No.
7.708/2012 and maintained by the MDIC (Ministério do Desenvolvimento, Indústria,
Comércio e Serviços).

Official list of codes from the MDIC:

* [https://www.gov.br/mdic/pt-br/assuntos/sdic/comercio-e-servicos/nbs-nomenclatura-brasileira-de-servicos](https://www.gov.br/mdic/pt-br/assuntos/sdic/comercio-e-servicos/nbs-nomenclatura-brasileira-de-servicos)

<Accordion title="br-nfse-nbs">
  Pattern: `^\d[\.\s]?\d{4}[\.\s]?\d{2}[\.\s]?\d{2}$`
</Accordion>

### Fiscal Incentive

Indicates whether a party benefits from a fiscal incentive.

<Accordion title="br-nfse-fiscal-incentive">
  | Code | Name |
  | - | - |
  | `1` | Has incentive |
  | `2` | Does not have incentive |
</Accordion>

### ISS Liability

Indicates the ISS liability status, i.e., whether the ISS tax is due or not and why.

List of codes from the national NFSe ABRASF (v2.04) model:

* [https://abrasf.org.br/biblioteca/arquivos-publicos/nfs-e-manual-de-orientacao-do-contribuinte-2-04/download](https://abrasf.org.br/biblioteca/arquivos-publicos/nfs-e-manual-de-orientacao-do-contribuinte-2-04/download)
  (Section 10.2, Field B-38)

<Accordion title="br-nfse-iss-liability">
  | Code | Name |
  | - | - |
  | `1` | Liable |
  | `2` | Not subject |
  | `3` | Exempt |
  | `4` | Export |
  | `5` | Immune |
  | `6` | Suspended Judicially |
  | `7` | Suspended Administratively |
</Accordion>

### Service Code

The service code as defined by the municipality. Typically, one of the codes listed
in the Lei Complementar 116/2003, but municipalities can make their own changes.

For further details on the list of possible codes, see:

* [https://www.planalto.gov.br/ccivil\_03/leis/lcp/lcp116.htm](https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp116.htm)

<Accordion title="br-nfse-service" />

### Opting for "Simples Nacional" regime

Indicates whether a party is opting for the "Simples Nacional" (Regime Especial
Unificado de Arrecadação de Tributos e Contribuições devidos pelas Microempresas e
Empresas de Pequeno Porte) tax regime

<Accordion title="br-nfse-simples">
  | Code | Name |
  | - | - |
  | `1` | Opt-in |
  | `2` | Opt-out |
</Accordion>

### Special Tax Regime

Indicates a special tax regime that a party is subject to.

<Accordion title="br-nfse-special-regime">
  | Code | Name |
  | - | - |
  | `1` | Municipal micro-enterprise |
  | `2` | Estimated |
  | `3` | Professional Society |
  | `4` | Cooperative |
  | `5` | Single micro-entrepreneur (MEI) |
  | `6` | Micro-enterprise or Small Business (ME EPP) |
</Accordion>

### Operation Indicator

Indicates the operation type for the determination of the IBS and CBS taxes by the
tax authorities.

Maps to the `cIndOp` field in the NFS-e national layout.

List of possible values:

* [https://www.gov.br/nfse/pt-br/biblioteca/documentacao-tecnica/rtc/anexovii-indop\_ibscbs\_v1-00-00.xlsx](https://www.gov.br/nfse/pt-br/biblioteca/documentacao-tecnica/rtc/anexovii-indop_ibscbs_v1-00-00.xlsx)

<Accordion title="br-nfse-operation">
  Pattern: `^\d{6}$`
</Accordion>

### Tax Status Code (CST)

Indicates the tax status of the operation for the determination of the IBS and CBS
taxes by the tax authorities.

Maps to the `CST` field in the NFS-e national layout.

List of possible values:

* [https://dfe-portal.svrs.rs.gov.br/DFE/ClassificacaoTributaria](https://dfe-portal.svrs.rs.gov.br/DFE/ClassificacaoTributaria)

<Accordion title="br-nfse-tax-status">
  Pattern: `^\d{3}$`
</Accordion>

### Tax Classification Code

Indicates the tax classification code for the determination of the IBS and CBS taxes
by the tax authorities.

Maps to the `cClassTrib` field in the NFS-e national layout.

List of possible values:

* [https://dfe-portal.svrs.rs.gov.br/DFE/ClassificacaoTributaria](https://dfe-portal.svrs.rs.gov.br/DFE/ClassificacaoTributaria)

<Accordion title="br-nfse-tax-class">
  Pattern: `^\d{6}$`
</Accordion>

## Validation Rules

<AccordionGroup>
  <Accordion title="bill.Invoice">
    | Field | Test | Validation Code / Message |
    | - | - | - |
    | <small>Invoice</small> | <ul class="gobl-test"><li>Can convert to \[BRL]</li></ul> | `GOBL-BR-NFSE-BILL-INVOICE-17`<br />Invoice must be in BRL or provide exchange rate for conversion |
    | `series` | <ul class="gobl-test"><li class="gobl-test-present">Present</li></ul> | `GOBL-BR-NFSE-BILL-INVOICE-01`<br />Series is required |
    | `code` | <ul class="gobl-test"><li>Matches ^\[1-9]\[0-9]\*\$</li></ul> | `GOBL-BR-NFSE-BILL-INVOICE-02`<br />Code must be a positive integer |
    | `supplier` | <ul class="gobl-test"><li class="gobl-test-present">Present</li></ul> | `GOBL-BR-NFSE-BILL-INVOICE-03`<br />Supplier is required |
    | `supplier.tax_id` | <ul class="gobl-test"><li class="gobl-test-present">Present</li></ul> | `GOBL-BR-NFSE-BILL-INVOICE-04`<br />Supplier tax ID is required |
    | `supplier.tax_id.code` | <ul class="gobl-test"><li class="gobl-test-present">Present</li></ul> | `GOBL-BR-NFSE-BILL-INVOICE-05`<br />Supplier tax ID code is required |
    | `supplier.name` | <ul class="gobl-test"><li class="gobl-test-present">Present</li></ul> | `GOBL-BR-NFSE-BILL-INVOICE-06`<br />Supplier name is required |
    | `supplier.addresses` | <ul class="gobl-test"><li class="gobl-test-present">Present</li></ul> | `GOBL-BR-NFSE-BILL-INVOICE-07`<br />Supplier must have at least one address |
    | `supplier.addresses[*]` | <ul class="gobl-test"><li class="gobl-test-present">Present</li></ul> | `GOBL-BR-NFSE-BILL-INVOICE-08`<br />Supplier address must not be empty |
    | `supplier.addresses[*].street` | <ul class="gobl-test"><li class="gobl-test-present">Present</li></ul> | `GOBL-BR-NFSE-BILL-INVOICE-09`<br />Supplier address requires a street |
    | `supplier.addresses[*].num` | <ul class="gobl-test"><li class="gobl-test-present">Present</li></ul> | `GOBL-BR-NFSE-BILL-INVOICE-10`<br />Supplier address requires a number |
    | `supplier.addresses[*].locality` | <ul class="gobl-test"><li class="gobl-test-present">Present</li></ul> | `GOBL-BR-NFSE-BILL-INVOICE-11`<br />Supplier address requires a locality |
    | `supplier.addresses[*].state` | <ul class="gobl-test"><li class="gobl-test-present">Present</li></ul> | `GOBL-BR-NFSE-BILL-INVOICE-12`<br />Supplier address requires a state |
    | `supplier.addresses[*].code` | <ul class="gobl-test"><li class="gobl-test-present">Present</li></ul> | `GOBL-BR-NFSE-BILL-INVOICE-13`<br />Supplier address requires a postal code |
    | `supplier.ext` | <ul class="gobl-test"><li>Ext require \[br-ibge-municipality, br-nfse-simples, br-nfse-fiscal-incentive]</li></ul> | `GOBL-BR-NFSE-BILL-INVOICE-14`<br />Supplier requires 'br-ibge-municipality', 'br-nfse-simples', and 'br-nfse-fiscal-incentive' extensions |
    | `charges` | <ul class="gobl-test"><li>Empty</li></ul> | `GOBL-BR-NFSE-BILL-INVOICE-15`<br />Charges are not supported by NFS-e |
    | `discounts` | <ul class="gobl-test"><li>Empty</li></ul> | `GOBL-BR-NFSE-BILL-INVOICE-16`<br />Discounts are not supported by NFS-e |
  </Accordion>

  <Accordion title="bill.Line">
    | Field | Test | Validation Code / Message |
    | - | - | - |
    | <small>Line</small> | <ul class="gobl-test"><li>Line has tax category ISS</li></ul> | `GOBL-BR-NFSE-BILL-LINE-01`<br />Line taxes must include the ISS category |
  </Accordion>

  <Accordion title="org.Item">
    | Field | Test | Validation Code / Message |
    | - | - | - |
    | `ext` | <ul class="gobl-test"><li>Ext require \[br-nfse-service]</li></ul> | `GOBL-BR-NFSE-ORG-ITEM-01`<br />Item requires 'br-nfse-service' extension |
    | `ext` | <ul class="gobl-test"><li>Ext require all or none of \[br-nfse-operation, br-nfse-tax-status, br-nfse-tax-class]</li></ul> | `GOBL-BR-NFSE-ORG-ITEM-02`<br />Item extensions 'br-nfse-operation', 'br-nfse-tax-status', and 'br-nfse-tax-class' must all be present or all absent |
  </Accordion>

  <Accordion title="tax.Combo">
    | Field | Test | Validation Code / Message |
    | - | - | - |
    | `ext` | <ul class="gobl-test"><li>ISS category</li><li>Ext require \[br-nfse-iss-liability]</li></ul> | `GOBL-BR-NFSE-TAX-COMBO-01`<br />ISS tax combo requires 'br-nfse-iss-liability' extension |
  </Accordion>
</AccordionGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.