Skip to main content
Skip table of contents

Inserir CT-e Recebido

POST /api/CTeRecepcao/recepcao 

Através da API é possível inserir na plataforma os conhecimentos de transporte recebidos externamente. 

O layout da string de “Conteudo” deve seguir o layout padrão conforme documentação fornecida pela Secretaria de Fazenda (Sefaz), através dos Schemas XSD distribuídos com os pacotes de liberação (PL).  

A seguir, link para arquivo tipo XML CT-e:  

Portal do Conhecimento de Transporte Eletrônico 

Após acessar o portal, clique no menu Documentos, e na opção Esquemas XML. 

Exemplo de Requisição:

CODE
{ 

  "Header": { 

    "CNPJEmpresa": "99999999999999", 

    "TipoEnvio": 0 

  }, 

  "Body": { 

    "Conteudo": "{\"CTe\":{\"infCte\":{\"ide\":{\"cUF\":\"41\",\"cCT\":\"99999999999\",\"CFOP\":\"5353\",\"natOp\":\"Prest. de Serviço de Transp. Estabelecimento comercial\",\"mod\":\"57\",\"serie\":\"1\",\"nCT\":\"99999\",\"dhEmi\":\"2022-08-02T06:57:00-03:00\",\"tpImp\":\"1\",\"tpEmis\":\"1\",\"cDV\":\"5\",\"tpAmb\":\"1\",\"tpCTe\":\"0\",\"procEmi\":\"0\",\"verProc\":\"e-Login 1.3,2.6\",\"cMunEnv\":\"999999999999\",\"xMunEnv\":\"XXXXXXXXXX\",\"UFEnv\":\"XX\",\"modal\":\"01\",\"tpServ\":\"0\",\"cMunIni\":\"9999999999\",\"xMunIni\":\"XXXXXXXXXXX\",\"UFIni\":\"XX\",\"cMunFim\":\"999999999\",\"xMunFim\":\"XXXXXXXXXX\",\"UFFim\":\"XX\",\"retira\":\"1\",\"indIEToma\":\"1\",\"toma3\":{\"toma\":\"0\"}},\"compl\":{\"xEmi\":\"XXXXXX\",\"Entrega\":{\"semData\":{\"tpPer\":\"0\"},\"semHora\":{\"tpHor\":\"0\"}},\"xObs\":\"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\"},\"emit\":{\"CNPJ\":\"99999999999999999\",\"IE\":\"9022494942\",\"xNome\":\"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXA\",\"xFant\":\"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXA\",\"enderEmit\":{\"xLgr\":\"XXXXXXXXXXXXXXXX\",\"nro\":\"125\",\"xBairro\":\"XXXXXXXXXXXXXXXXXXXXXX\",\"cMun\":\"999999999999\",\"xMun\":\"XXXXXXXXXXXXX\",\"CEP\":\"9999999999\",\"UF\":\"XX\",\"fone\":\"99999999999\"},\"CRT\":\"3\"},\"rem\":{\"CNPJ\":\"9999999999\",\"IE\":\"99999999999999\",\"xNome\":\"XXXXXXXXXXXXXXXXXXXXXXXXX\",\"fone\":\"99999999999999999\",\"enderReme\":{\"xLgr\":\"XXXXXXXXXXXXXXXXXXXXXXXXXXX\",\"nro\":\"S N\",\"xCpl\":\"XXXXXXXXXX\",\"xBairro\":\"XXXXX\",\"cMun\":\"999999999999999\",\"xMun\":\"XXXXXXXXXXXXXXXX\",\"CEP\":\"999999999\",\"UF\":\"XX\",\"cPais\":\"1058\",\"xPais\":\"BRASIL\"}},\"dest\":{\"CNPJ\":\"99999999999999999\",\"IE\":\"999999999999999999\",\"xNome\":\"XXXXXXXXXXXXXXXXXX\",\"fone\":\"999999999999\",\"enderDest\":{\"xLgr\":\"XXXXXXXXXXXXXX\",\"nro\":\"S N\",\"xBairro\":\"XXXXXXXXXXXXXXXXX\",\"cMun\":\"99999999\",\"xMun\":\"XXXXXXXXXXXXX\",\"CEP\":\"9999999999\",\"UF\":\"XX\",\"cPais\":\"1058\",\"xPais\":\"BRASIL\"}},\"vPrest\":{\"vTPrest\":\"7.71\",\"vRec\":\"7.71\",\"Comp\":{\"xNome\":\"FRETE VALOR\",\"vComp\":\"7711.20\"}},\"imp\":{\"ICMS\":{\"ICMS45\":{\"CST\":\"51\"}}},\"infCTeNorm\":{\"infCarga\":{\"vCarga\":\"486801.63\",\"proPred\":\"FRANGO DESOSSADO CONGELADO\",\"infQ\":[{\"cUnid\":\"01\",\"tpMed\":\"PESO BRUTO\",\"qCarga\":\"28350.0000\"},{\"cUnid\":\"03\",\"tpMed\":\"CAIXA\",\"qCarga\":\"2700.0000\"}],\"vCargaAverb\":\"486801.63\"},\"infDoc\":{\"infNFe\":{\"chave\":\"9999999999999999999999999999999999999999\"}},\"infModal\":{\"rodo\":{\"RNTRC\":\"99999999999\"},\"_versaoModal\":\"3.00\"}},\"autXML\":{\"CNPJ\":\"99999999999999999999\"},\"infRespTec\":{\"CNPJ\":\"9999999999999999999999999\",\"xContato\":\"XXXXXXXXXXXXXXXXXX\",\"email\":\"XXXXXXXXXXXXXX\",\"fone\":\"999999999999999\"},\"_Id\":\"CTe99999999999999999999999999999999999\",\"_versao\":\"3.00\"},\"infCTeSupl\":{\"qrCodCTe\":\"http://www.fazenda.pr.gov.br/cte/qrcode?chCTe=499999999999999999999999999999999995&tpAmb=1\"},\"Signature\":{\"SignedInfo\":{\"CanonicalizationMethod\":{\"_Algorithm\":\"http://www.w3.org/TR/2001/REC-xml-c14n-20010315\"},\"SignatureMethod\":{\"_Algorithm\":\"http://www.w3.org/2000/09/xmldsig#rsa-sha1\"},\"Reference\":{\"Transforms\":{\"Transform\":[{\"_Algorithm\":\"http://www.w3.org/2000/09/xmldsig#enveloped-signature\"},{\"_Algorithm\":\"http://www.w3.org/TR/2001/REC-xml-c14n-20010315\"}]},\"DigestMethod\":{\"_Algorithm\":\"http://www.w3.org/2000/09/xmldsig#sha1\"},\"DigestValue\":\"LCGOaa0ecgIzWOSvszhEAAOvcJVB4=\",\"_URI\":\"#CTe41220804195382000107570010000061461200500135\"}},\"SignatureValue\":\"b28eTgCjpLJccVO27NKsmRicFnY/ =\"}},\"_xmlns\":\"http://www.w3.org/2000/09/xmldsig#\"},\"_xmlns\":\"http://www.portalfiscal.inf.br/cte\"},\"protCTe\":{\"infProt\":{\"tpAmb\":\"1\",\"verAplic\":\"PR-v3_3_05\",\"chCTe\":\"999999999999999999999999999999999999\",\"dhRecbto\":\"2022-08-02T06:59:30-03:00\",\"nProt\":\"9999999999999999999999999999\",\"digVal\":\"LCGOaa0ecgXAadSIzWOSvszhEOvcJVB4=\",\"cStat\":\"100\",\"xMotivo\":\"Autorizado o uso do CT-e\",\"_Id\":\"ID19999999999999999\"},\"_versao\":\"3.00\"},\"_xmlns\":\"http://www.portalfiscal.inf.br/cte\",\"_versao\":\"3.00\"}" 

  } 

}

Exemplo de Retorno: 

CODE
{ 

    "tipoRetorno": 11, 

    "processamento": { 

        "message": "Documento enviado para processamento", 

        "protocolo": "5ceaefd3-6464-46ca-8582-d7d761854737" 

    } 

}

{{component-feedback-article}}

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.