- NF-e
- Issue NF-e
NF-e
Issue NF-e
Issues an NF-e model 55 for the organization that owns the API Key
POST
/nfe
curl --request POST \
--url https://api.treeunfe.com.br/api/v1/nfe \
--header 'x-api-key: <api-key>' \
--header 'x-api-key: <x_api_key>' \
--header 'Content-Type: application/json' \
--data '{
"calculateTaxes": true,
"NFe": "<value>"
}'
curl --request POST \
--url https://api.treeunfe.com.br/api/v1/nfe \
--header 'x-api-key: <api-key>' \
--header 'x-api-key: <x_api_key>' \
--header 'Content-Type: application/json' \
--data '{
"calculateTaxes": true,
"NFe": "<value>"
}'Issues an NF-e model 55 for the organization that owns the API Key.
- With tax calculation (
calculateTaxesomitted ortrue, the default): Treeunfe calculates the item taxes and the totals using the organization’s issuing rules. - Without calculation (
calculateTaxes: false): the invoice is transmitted with the values exactly as sent.
The invoice’s environment comes from the API Key: a HOMOLOGACAO key issues in the sandbox and a PRODUCAO key in production. Do not send the environment in the payload.
Authentication
Send the x-api-key header.
x-api-key
string
The organization’s API Key (rawKey).
Body
application/json
calculateTaxes
boolean
true makes Treeunfe calculate the item taxes and the totals (ICMS, ST, DIFAL, FCP, IPI, PIS, COFINS, IBS, and CBS) using the organization’s issuing rules. false uses exactly the values sent. Default: true.
NFe
required
object
infNFe(object) (required): The NF-e groups, with the same tags as the official layout (MOC).
Responses
| Status | Description |
|---|---|
200 | Processed by SEFAZ. Check outcome. |
400 | Invalid body (missing required field, wrong format, or field not allowed). |
401 | Credential missing, invalid, or expired. |
402 | Issuing blocked by the account’s plan or balance. |
403 | Credential not allowed to access the resource, or organization inactive (Organization is inactive). |
422 | Invoice rejected (validation or SEFAZ rejection). |
503 | SEFAZ unavailable. Try again later. |
curl -X POST "https://api.treeunfe.com.br/api/v1/nfe" \
-H "x-api-key: ORGANIZATION_RAW_KEY" \
-H "Content-Type: application/json" \
-d '{
"calculateTaxes": true,
"NFe": {
"infNFe": {
"ide": {
"cUF": 41,
"natOp": "Venda",
"serie": "1",
"nNF": 10,
"dhEmi": "2026-10-20T15:24:48-03:00",
"dhSaiEnt": "2026-10-20T15:24:48-03:00",
"tpNF": 1,
"idDest": 1,
"cMunFG": 4115200,
"tpImp": 1,
"tpEmis": 1,
"finNFe": 1,
"indFinal": 1,
"indPres": 1,
"indIntermed": 0
},
"emit": {
"CNPJCPF": "12345678000195",
"xNome": "EMPRESA EXEMPLO LTDA",
"xFant": "EMPRESA EXEMPLO",
"enderEmit": {
"xLgr": "Avenida Exemplo",
"nro": "5145",
"xBairro": "Zona 07",
"cMun": 4115200,
"xMun": "MARINGA",
"UF": "PR",
"CEP": "87020035",
"cPais": 1058,
"xPais": "Brasil",
"fone": "44999990000"
},
"IE": "9071311225",
"CRT": 3
},
"dest": {
"CNPJCPF": "12345678909",
"xNome": "Consumidor Exemplo",
"enderDest": {
"xLgr": "Rua das Flores",
"nro": "652",
"xBairro": "Centro",
"cMun": 4115200,
"xMun": "MARINGA",
"UF": "PR",
"CEP": "87025500",
"cPais": 1058,
"xPais": "BRASIL",
"fone": "44999991111"
},
"indIEDest": 9,
"email": "consumidor@exemplo.com.br"
},
"det": [
{
"prod": {
"cProd": "30880297",
"cEAN": "SEM GTIN",
"xProd": "BARRA CHATA AC 2 X 1/4 A-36",
"NCM": "72149100",
"CFOP": 5102,
"uCom": "M",
"qCom": 1,
"vUnCom": "16.3100000000",
"vProd": "16.31",
"cEANTrib": "SEM GTIN",
"uTrib": "M",
"qTrib": 1,
"vUnTrib": "16.3100000000",
"indTot": 1
},
"imposto": {
"vTotTrib": "3.23",
"ICMS": {
"ICMS00": {
"orig": 5,
"CST": "00",
"modBC": 0,
"vBC": "16.31",
"pICMS": "19.00",
"vICMS": "3.10",
"pFCP": "2.00",
"vFCP": "0.33"
}
},
"IPI": {
"cEnq": "999",
"IPINT": {
"CST": "53"
}
},
"PIS": {
"PISNT": {
"CST": "07"
}
},
"COFINS": {
"COFINSNT": {
"CST": "07"
}
},
"IBSCBS": {
"CST": "000",
"cClassTrib": "000001",
"gIBSCBS": {
"vBC": "13.21",
"gIBSUF": {
"pIBSUF": "0.10",
"vIBSUF": "0.01"
},
"gIBSMun": {
"pIBSMun": "0.00",
"vIBSMun": "0.00"
},
"vIBS": "0.01",
"gCBS": {
"pCBS": "0.90",
"vCBS": "0.12"
}
}
}
}
}
],
"total": {
"ICMSTot": {
"vBC": "16.31",
"vICMS": "3.10",
"vICMSDeson": "0.00",
"vFCP": "0.33",
"vBCST": "0.00",
"vST": "0.00",
"vFCPST": "0.00",
"vFCPSTRet": "0.00",
"vProd": "16.31",
"vFrete": "0.00",
"vSeg": "0.00",
"vDesc": "0.00",
"vII": "0.00",
"vIPI": "0.00",
"vIPIDevol": "0.00",
"vPIS": "0.00",
"vCOFINS": "0.00",
"vOutro": "0.00",
"vNF": "16.31",
"vTotTrib": "3.23"
},
"IBSCBSTot": {
"vBCIBSCBS": "13.21",
"gIBS": {
"gIBSUF": {
"vDif": "0.00",
"vDevTrib": "0.00",
"vIBSUF": "0.01"
},
"gIBSMun": {
"vDif": "0.00",
"vDevTrib": "0.00",
"vIBSMun": "0.00"
},
"vIBS": "0.01",
"vCredPres": "0.00",
"vCredPresCondSus": "0.00"
},
"gCBS": {
"vDif": "0.00",
"vDevTrib": "0.00",
"vCBS": "0.12",
"vCredPres": "0.00",
"vCredPresCondSus": "0.00"
}
}
},
"transp": {
"modFrete": 9
},
"pag": {
"detPag": {
"indPag": "0",
"tPag": "90",
"vPag": "0.00"
}
},
"infRespTec": {
"CNPJ": "12345678000195",
"xContato": "Responsavel Tecnico",
"email": "suporte@sua-software-house.com.br",
"fone": "4430000000"
}
}
}
}'
{
"outcome": "SUCCESS",
"chaveAcesso": "string",
"protocolo": "string"
}
curl -X POST "https://api.treeunfe.com.br/api/v1/nfe" \
-H "x-api-key: ORGANIZATION_RAW_KEY" \
-H "Content-Type: application/json" \
-d '{
"calculateTaxes": true,
"NFe": {
"infNFe": {
"ide": {
"cUF": 41,
"natOp": "Venda",
"serie": "1",
"nNF": 10,
"dhEmi": "2026-10-20T15:24:48-03:00",
"dhSaiEnt": "2026-10-20T15:24:48-03:00",
"tpNF": 1,
"idDest": 1,
"cMunFG": 4115200,
"tpImp": 1,
"tpEmis": 1,
"finNFe": 1,
"indFinal": 1,
"indPres": 1,
"indIntermed": 0
},
"emit": {
"CNPJCPF": "12345678000195",
"xNome": "EMPRESA EXEMPLO LTDA",
"xFant": "EMPRESA EXEMPLO",
"enderEmit": {
"xLgr": "Avenida Exemplo",
"nro": "5145",
"xBairro": "Zona 07",
"cMun": 4115200,
"xMun": "MARINGA",
"UF": "PR",
"CEP": "87020035",
"cPais": 1058,
"xPais": "Brasil",
"fone": "44999990000"
},
"IE": "9071311225",
"CRT": 3
},
"dest": {
"CNPJCPF": "12345678909",
"xNome": "Consumidor Exemplo",
"enderDest": {
"xLgr": "Rua das Flores",
"nro": "652",
"xBairro": "Centro",
"cMun": 4115200,
"xMun": "MARINGA",
"UF": "PR",
"CEP": "87025500",
"cPais": 1058,
"xPais": "BRASIL",
"fone": "44999991111"
},
"indIEDest": 9,
"email": "consumidor@exemplo.com.br"
},
"det": [
{
"prod": {
"cProd": "30880297",
"cEAN": "SEM GTIN",
"xProd": "BARRA CHATA AC 2 X 1/4 A-36",
"NCM": "72149100",
"CFOP": 5102,
"uCom": "M",
"qCom": 1,
"vUnCom": "16.3100000000",
"vProd": "16.31",
"cEANTrib": "SEM GTIN",
"uTrib": "M",
"qTrib": 1,
"vUnTrib": "16.3100000000",
"indTot": 1
},
"imposto": {
"vTotTrib": "3.23",
"ICMS": {
"ICMS00": {
"orig": 5,
"CST": "00",
"modBC": 0,
"vBC": "16.31",
"pICMS": "19.00",
"vICMS": "3.10",
"pFCP": "2.00",
"vFCP": "0.33"
}
},
"IPI": {
"cEnq": "999",
"IPINT": {
"CST": "53"
}
},
"PIS": {
"PISNT": {
"CST": "07"
}
},
"COFINS": {
"COFINSNT": {
"CST": "07"
}
},
"IBSCBS": {
"CST": "000",
"cClassTrib": "000001",
"gIBSCBS": {
"vBC": "13.21",
"gIBSUF": {
"pIBSUF": "0.10",
"vIBSUF": "0.01"
},
"gIBSMun": {
"pIBSMun": "0.00",
"vIBSMun": "0.00"
},
"vIBS": "0.01",
"gCBS": {
"pCBS": "0.90",
"vCBS": "0.12"
}
}
}
}
}
],
"total": {
"ICMSTot": {
"vBC": "16.31",
"vICMS": "3.10",
"vICMSDeson": "0.00",
"vFCP": "0.33",
"vBCST": "0.00",
"vST": "0.00",
"vFCPST": "0.00",
"vFCPSTRet": "0.00",
"vProd": "16.31",
"vFrete": "0.00",
"vSeg": "0.00",
"vDesc": "0.00",
"vII": "0.00",
"vIPI": "0.00",
"vIPIDevol": "0.00",
"vPIS": "0.00",
"vCOFINS": "0.00",
"vOutro": "0.00",
"vNF": "16.31",
"vTotTrib": "3.23"
},
"IBSCBSTot": {
"vBCIBSCBS": "13.21",
"gIBS": {
"gIBSUF": {
"vDif": "0.00",
"vDevTrib": "0.00",
"vIBSUF": "0.01"
},
"gIBSMun": {
"vDif": "0.00",
"vDevTrib": "0.00",
"vIBSMun": "0.00"
},
"vIBS": "0.01",
"vCredPres": "0.00",
"vCredPresCondSus": "0.00"
},
"gCBS": {
"vDif": "0.00",
"vDevTrib": "0.00",
"vCBS": "0.12",
"vCredPres": "0.00",
"vCredPresCondSus": "0.00"
}
}
},
"transp": {
"modFrete": 9
},
"pag": {
"detPag": {
"indPag": "0",
"tPag": "90",
"vPag": "0.00"
}
},
"infRespTec": {
"CNPJ": "12345678000195",
"xContato": "Responsavel Tecnico",
"email": "suporte@sua-software-house.com.br",
"fone": "4430000000"
}
}
}
}'
curl --request POST \
--url https://api.treeunfe.com.br/api/v1/nfe \
--header 'x-api-key: <api-key>' \
--header 'x-api-key: <x_api_key>' \
--header 'Content-Type: application/json' \
--data '{
"calculateTaxes": true,
"NFe": "<value>"
}'
curl --request POST \
--url https://api.treeunfe.com.br/api/v1/nfe \
--header 'x-api-key: <api-key>' \
--header 'x-api-key: <x_api_key>' \
--header 'Content-Type: application/json' \
--data '{
"calculateTaxes": true,
"NFe": "<value>"
}'{
"outcome": "SUCCESS",
"chaveAcesso": "string",
"protocolo": "string"
}