> For the complete documentation index, see [llms.txt](https://docs.vrsoft.com.br/vrmaster/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vrsoft.com.br/vrmaster/gestao-do-conhecimento/gestao-do-conhecimento-vr-master/gestao-do-conhecimento-vr-master-fiscal/gestao-do-conhecimento-vr-erp-fiscal-arquivos-magneticos/gestao-do-conhecimento-vr-erp-fiscal-arquivos-magneticos-sped-fiscal/registro-c170-erro-cod-nat-codigo-da-natureza-invalido-informar-codigo-no-registro-0400-antes-de-uti.md).

# Registro C170 - Erro: COD\_NAT - Código da natureza inválido Informar código no "Registro 0400" antes de utilizá-lo

**Ocorre quando é utilizado um CFOP que não consta no Registro 0400, normalmente ocorre quando se trata de nota fiscal de despesa e o mesmo não esta parametrizado na exportação do arquivo do SPED.**

1 - Acesse Fiscal > Arquivos Magnéticos > SPED Fiscal > Configurações > aba Tipo Nota Despesa. 2 - Click no botão adicionar. 3 - Informe o tipo da despesa e informe o tipo nota. 4 - Salve e gere o arquivo novamente.


---

# 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.vrsoft.com.br/vrmaster/gestao-do-conhecimento/gestao-do-conhecimento-vr-master/gestao-do-conhecimento-vr-master-fiscal/gestao-do-conhecimento-vr-erp-fiscal-arquivos-magneticos/gestao-do-conhecimento-vr-erp-fiscal-arquivos-magneticos-sped-fiscal/registro-c170-erro-cod-nat-codigo-da-natureza-invalido-informar-codigo-no-registro-0400-antes-de-uti.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.
