1. Inicio
  2. Documentos
  3. NS CTe (English)
  4. CTe Utility Functions
  5. CT-e Preview

CT-e Preview

Through this method it’s possible to validate the date of the CT-e and obtain the PDF file of the DACTE if no errors are found.

The information that must be sent in this method are the same as that sent in the CT-e issuance method. Click here to verify the issuance method.


CT-e 3.00 Production: POST https://cte.ns.eti.br/util/previa/cte

CT-e OS Production: POST https://cte.ns.eti.br/util/previa/cteos

Returned data
statusProcessing status code
motivoProcessing status literal description
PdfPDF in Base64 of the CT-eOnly when status = 200
Return examples

Successful return

    "status": 200,
    "motivo": "Previa gerada com sucesso",
    "pdf": "JVBERi0xLjQKJeLjz..."

Return with error

    "status": -2,
    "motivo": "CTe invalido de acordo com a validacao contra schema",
    "erros": [
        "O campo 'mod' e de preenchimento obrigatorio e nao foi preenchido..."
Return codes
200Preview generated successfully
-2CT-e not informed or empty
-3infModal not informed or empty
-4Error information according to the data type. Verify the "motivo" field to idenfity the incorrect fields. The errors will be found in the "erros" object, which is an array of string
-5Validation schema not found. Verify the version informed in CTe/infCTe/versao
-10Error getting the QRCode URL

Como podemos ajudar?