ao utilizar o xml de exemplo abaixo, estou obtendo error 400:
let axios_fiscal = axios.create({
// baseURL: "https://api.nuvemfiscal.com.br/", // Produção
baseURL: "https://api.sandbox.nuvemfiscal.com.br/", // sandbox
headers: {
Authorization: tokenFiscal ? `Bearer ${tokenFiscal.access_token}` : "",
Accept: "application/json",
"Content-Type": "application/json",
},
});
let infNFe = {
versao: "4.00",
ide: {
cUF: 41,
cNF: "97617475",
natOp: "Venda de Mercadoria",
mod: 65,
serie: 1,
nNF: 50250,
dhEmi: "2023-05-25T16:54:11.7655731",
dhSaiEnt: "2023-05-25T16:54:11.7655731",
tpNF: 1,
idDest: 1,
cMunFG: "4109609",
tpImp: 4,
tpEmis: 1,
tpAmb: 2,
finNFe: 1,
indFinal: 1,
indPres: 1,
indIntermed: 99,
procEmi: 0,
verProc: "1.0",
NFref: [],
},
emit: {
CNPJ: "13007512000121",
xNome: "Kero Ótica Inc.",
xFant: "Kero Ótica",
enderEmit: {
xLgr: "Testetest",
nro: "12345",
xBairro: "Zona 1",
cMun: "4109609",
xMun: "Guaratuba",
UF: "PR",
CEP: "87200000",
cPais: "1058",
xPais: "Brasil",
fone: "36296203",
},
IE: "9054324607",
CRT: 1,
},
dest: {
xNome: "Consumidor",
enderDest: {
xLgr: "Sem logradouro",
nro: "S/N",
xBairro: "Sem bairro",
cMun: "4109609",
xMun: "Guaratuba",
UF: "PR",
CEP: "00000000",
cPais: "1058",
xPais: "Brasil",
},
indIEDest: 9,
},
autXML: [],
det: [
{
nItem: 1,
prod: {
cProd: "05049385352",
cEAN: "5695546982566",
cBarra: "5695546982566",
xProd: "Lustroso Borracha Frango",
NCM: "00000000",
CFOP: "5102",
uCom: "PAR",
qCom: 1.0,
vUnCom: 10.0,
vProd: 10.0,
cEANTrib: "5695546982566",
cBarraTrib: "5695546982566",
uTrib: "PAR",
qTrib: 1.0,
vUnTrib: 10.0,
indTot: 1,
},
imposto: {
ICMS: {
ICMS00: {
orig: 0,
CST: "0",
modBC: 0,
vBC: 0.0,
pICMS: 0.0,
vICMS: 0.0,
},
},
IPI: {
cEnq: "99",
IPITrib: {
CST: "99",
vIPI: 0.0,
},
},
PIS: {
PISOutr: {
CST: "99",
vPIS: 0.0,
},
},
PISST: {
vPIS: 0.0,
},
COFINS: {
COFINSOutr: {
CST: "99",
vCOFINS: 0.0,
},
},
COFINSST: {
vCOFINS: 0.0,
},
ICMSUFDest: {
vBCUFDest: 0.0,
pICMSUFDest: 0.0,
pICMSInter: 0.0,
pICMSInterPart: 0.0,
vICMSUFDest: 0.0,
vICMSUFRemet: 0.0,
},
},
impostoDevol: {
pDevol: 0.0,
IPI: {
vIPIDevol: 0.0,
},
},
},
],
total: {
ICMSTot: {
vBC: 0.0,
vICMS: 0.0,
vICMSDeson: 0.0,
vFCP: 0.0,
vBCST: 0.0,
vST: 0.0,
vFCPST: 0.0,
vFCPSTRet: 0.0,
vProd: 10.0,
vFrete: 0.0,
vSeg: 0.0,
vDesc: 0.0,
vII: 0.0,
vIPI: 0.0,
vIPIDevol: 0.0,
vPIS: 0.0,
vCOFINS: 0.0,
vOutro: 0.0,
vNF: 10.0,
},
},
transp: {
modFrete: 9,
transporta: {},
retTransp: {
vServ: 0.0,
vBCRet: 0.0,
pICMSRet: 0.0,
vICMSRet: 0.0,
CFOP: "5102",
cMunFG: "4109609",
},
},
pag: {
detPag: [
{
tPag: "1",
vPag: 10.0,
},
],
},
infAdic: {},
infRespTec: {
CNPJ: "XXXX",
xContato: "XXX",
email: "XXX",
fone: "XXXX",
},
};
console.log(infNFe);
this.$axios_fiscal
.post("/nfe", {
infNFe: infNFe,
ambiente: "homologacao",
referencia: "216073",
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.log(error);
console.log(error.message);
});