> For the complete documentation index, see [llms.txt](https://developer.niiw.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.niiw.io/api-reference/nota-fiscal/adicionar-da-nota-fiscal.md).

# Adicionar da Nota Fiscal

## Endpoint

{% openapi src="/files/2eO1gYnXt7AcdgoXX7pS" path="/api/receipt/create" method="post" %}
[api-json.json](https://3852815132-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcDOGtj9A42zj8m3wWapg%2Fuploads%2FuVM4Ddr11ok3IE0p2DEU%2Fapi-json.json?alt=media\&token=2fceb582-a2c0-410c-8878-7b013ce64aaf)
{% endopenapi %}

***

## Exemplo cURL

```bash
curl -X 'POST' \
  'https://apim.niiw.io/api/receipt/create' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer eyJh...........' \
  -H 'Content-Type: application/json' \
  -d '{ "accessCode": "35230306057223024437590001419202251523787109" }'
```

## Exemplo Request Body

Segue abaixo alguns exemplos e formatos permitidos na API

#### Código de Acesso

Somente o código de acesso da nota fiscal

```json
{
  "accessCode":"35230306057223024437590001419202251523787109"
}
```

#### Tipo de input MANUAL&#x20;

Este formato geralmente usado quando não há uma captura pela camera do celular

```json
{
  "input": "MANUAL", 
  "accessCode":"35230306057223024437590001419202251523787109"
}
```

#### Tipo de input QRCODE com URL

Este formato geralmente ocorre pelo captura do QRCode da nota fiscal pela camera do celular

```json
{
  "input": "QRCODE", 
  "qrcode": "https://sat.sef.sc.gov.br/nfce/consulta?p=42230909477652004850651290000241741783194505|2|1|1|7FF3A80467D56F8221C2C3E78506367FAF3236C6"
}
```

**Tipo de input QRCODE com strings concatenadas**

Este formato geralmente ocorre na leitura de notas SAT

```json
{
  "input": "QRCODE", 
  "qrcode": "CFe35230306057223024437590001419202251523787109|20230319100758|958.53||K4r6J2dl6c1GrVcsqdx3OqqwFgz+z3Xr8U5NMAixZM4V0q8I4auMC9jgCwpW/GwCJjyGYYcJx5ihtX321AZ+XVUFs3g57nUGJhLZuda5L1whYBDy+sibSUhio6tWWD1JSFfwXKbj+UvEj/LH5onxDYRBox3nFLobaJN7LksE+EmvnhiHppJgyrQCRe/uzRidwyzbFpFtvglI/rNYxAj1rnoDhJdhkVy6M1CT9h6/1tmczGJ1oe2Mx2gxl6jF0Hc5yYF+teG/k69H32lvVvFyIP1QWDEk14lMdAnVR4Kb1+jwbQnfXIRWLzvDV+4kUAaKKNgqKkd5NVz2N38PCKiXRw=="
}
```

## Exemplo Response Body

```json
{
  "id": "65045.............."
}
```


---

# 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://developer.niiw.io/api-reference/nota-fiscal/adicionar-da-nota-fiscal.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.
