- NF-e
- NF-e DANFE
NF-e
NF-e DANFE
Generates the DANFE (NF-e PDF) of an authorized invoice
GET
Generates the DANFE, the auxiliary PDF document of the NF-e, for an authorized invoice. By default, it returns the PDF file in the response. To get only the link, send format=url.
Authentication
x-enterprise-key
required
string
Enterprise key with permission for this route. See Authentication.
x-organization-id
required
string
ID of the organization (issuing company) the operation runs in.
Path parameters
nfeId
required
string
NF-e ID (UUID) in Treeunfe.
Query parameters
format
string
Send url to receive the PDF link as JSON instead of the file. Without this parameter, the response is the PDF itself.
Responses
| Status | Description |
|---|---|
200 | DANFE PDF file (application/pdf). With format=url: JSON with the PDF link. |
400 | The NF-e cannot generate a DANFE (for example, it is not authorized). |
401 | Missing, invalid, or expired credential. |
404 | NF-e not found. |
curl -X GET "https://api.treeunfe.com.br/api/v1/nfe/006f917a-21a5-491d-90b4-f745d96385e7/danfe" \
-H "x-enterprise-key: YOUR_ENTERPRISE_KEY" \
-H "x-organization-id: ORGANIZATION_ID" \
-o danfe.pdf
curl -X GET "https://api.treeunfe.com.br/api/v1/nfe/006f917a-21a5-491d-90b4-f745d96385e7/danfe" \
-H "x-enterprise-key: YOUR_ENTERPRISE_KEY" \
-H "x-organization-id: ORGANIZATION_ID" \
-o danfe.pdf