{
  "info": {
    "name": "teFacturo API (Sandbox/Prod)",
    "description": "Coleccion para probar teFacturo API (facturacion electronica SUNAT). Configura variables: baseUrl, token, ruc, serie, numero.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://jarvis.tefacturo.pe"
    },
    {
      "key": "token",
      "value": ""
    },
    {
      "key": "usuario",
      "value": ""
    },
    {
      "key": "clave",
      "value": ""
    },
    {
      "key": "ruc",
      "value": "20123456789"
    },
    {
      "key": "serie",
      "value": "FFA6"
    },
    {
      "key": "numero",
      "value": "1"
    },
    {
      "key": "tipoComprobante",
      "value": "01"
    }
  ],
  "item": [
    {
      "name": "Auth",
      "item": [
        {
          "name": "Generate token",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "try {",
                  "  const j = pm.response.json();",
                  "  if (j && j.c2uToken) {",
                  "    pm.collectionVariables.set(\"token\", j.c2uToken);",
                  "    console.log(\"Token guardado en {{token}}\");",
                  "  }",
                  "} catch (e) {",
                  "  console.log(\"No se pudo leer c2uToken:\", e);",
                  "}"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/tokenapi/secure/v2/login/token",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "tokenapi",
                "secure",
                "v2",
                "login",
                "token"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"aplicacion\": { \"codigo\": \"1\" },\n  \"clave\": \"{{clave}}\",\n  \"mail\": \"{{usuario}}\",\n  \"ruc\": \"{{ruc}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Genera JWT (c2uToken). La coleccion lo guarda automaticamente en la variable {{token}}."
          }
        }
      ]
    },
    {
      "name": "Emitir",
      "item": [
        {
          "name": "Emitir Factura",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/factura-api/invoice2u/integracion/factura/{{ruc}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "factura-api",
                "invoice2u",
                "integracion",
                "factura",
                "{{ruc}}"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"close2u\": { \"tipoIntegracion\": \"OFFLINE\", \"tipoPlantilla\": \"01\", \"tipoRegistro\": \"PRECIOS_SIN_IGV\" },\n  \"datosDocumento\": { \"serie\": \"{{serie}}\", \"numero\": {{numero}}, \"moneda\": \"PEN\", \"fechaEmision\": \"2025-04-16\", \"horaEmision\": null, \"formaPago\": \"CONTADO\", \"medioPago\": \"EFECTIVO\", \"condicionPago\": \"CONTADO\", \"ordencompra\": null, \"glosa\": \"Venta al contado\" },\n  \"detalleDocumento\": [\n    { \"codigoProducto\": \"PROD001\", \"descripcion\": \"PRODUCTO GRAVADO A\", \"tipoAfectacion\": \"GRAVADO_OPERACION_ONEROSA\", \"unidadMedida\": \"UNIDAD_BIENES\", \"cantidad\": \"1\", \"valorVentaUnitarioItem\": 100 }\n  ],\n  \"emisor\": { \"correo\": \"empresa@gmail.com\", \"nombreComercial\": \"MI EMPRESA SAC\", \"nombreLegal\": \"MI EMPRESA S.A.C.\", \"numeroDocumentoIdentidad\": \"{{ruc}}\", \"tipoDocumentoIdentidad\": \"RUC\" },\n  \"informacionAdicional\": { \"tipoOperacion\": \"VENTA_INTERNA\" },\n  \"receptor\": { \"correo\": \"cliente@gmail.com\", \"nombreComercial\": \"CLIENTE\", \"nombreLegal\": \"CLIENTE SAC\", \"numeroDocumentoIdentidad\": \"20987654321\", \"tipoDocumentoIdentidad\": \"RUC\" }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Emitir Boleta",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/boleta-api/invoice2u/integracion/boleta/{{ruc}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "boleta-api",
                "invoice2u",
                "integracion",
                "boleta",
                "{{ruc}}"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"close2u\": { \"tipoIntegracion\": \"OFFLINE\", \"tipoPlantilla\": \"01\", \"tipoRegistro\": \"PRECIOS_SIN_IGV\" },\n  \"datosDocumento\": { \"serie\": \"BBV5\", \"numero\": {{numero}}, \"moneda\": \"PEN\", \"fechaEmision\": \"2025-04-16\", \"horaEmision\": null, \"formaPago\": \"CONTADO\", \"medioPago\": \"EFECTIVO\", \"condicionPago\": \"CONTADO\", \"ordencompra\": null, \"glosa\": \"Venta al contado\" },\n  \"detalleDocumento\": [\n    { \"codigoProducto\": \"PROD001\", \"descripcion\": \"SERVICIO DE CONSULTORIA\", \"tipoAfectacion\": \"GRAVADO_OPERACION_ONEROSA\", \"unidadMedida\": \"SERVICIO\", \"cantidad\": \"1\", \"valorVentaUnitarioItem\": 250 }\n  ],\n  \"emisor\": { \"correo\": \"empresa@gmail.com\", \"nombreComercial\": \"MI EMPRESA SAC\", \"nombreLegal\": \"MI EMPRESA S.A.C.\", \"numeroDocumentoIdentidad\": \"{{ruc}}\", \"tipoDocumentoIdentidad\": \"RUC\" },\n  \"informacionAdicional\": { \"tipoOperacion\": \"VENTA_INTERNA\" },\n  \"receptor\": { \"correo\": \"cliente@gmail.com\", \"domicilioFiscal\": { \"direccion\": \"JR. EJEMPLO NRO. 456 - LIMA\", \"ubigeo\": \"150101\" }, \"nombreComercial\": \"JUAN PEREZ\", \"nombreLegal\": \"JUAN PEREZ GARCIA\", \"numeroDocumentoIdentidad\": \"12345678\", \"tipoDocumentoIdentidad\": \"DNI\" }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Nota de Credito",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/notacredito-api/invoice2u/integracion/nota-credito/{{ruc}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "notacredito-api",
                "invoice2u",
                "integracion",
                "nota-credito",
                "{{ruc}}"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"close2u\": { \"tipoIntegracion\": \"OFFLINE\", \"tipoPlantilla\": \"01\", \"tipoRegistro\": \"PRECIOS_SIN_IGV\" },\n  \"datosDocumento\": { \"serie\": \"FNC1\", \"numero\": {{numero}}, \"moneda\": \"PEN\", \"fechaEmision\": \"2025-04-16\", \"horaEmision\": null, \"formaPago\": \"CONTADO\" },\n  \"documentoModifica\": { \"tipoComprobanteModifica\": \"01\", \"serie\": \"{{serie}}\", \"numero\": {{numero}} },\n  \"motivo\": { \"codigo\": \"01\", \"descripcion\": \"Anulacion de la operacion\" },\n  \"detalleDocumento\": [\n    { \"codigoProducto\": \"PROD001\", \"descripcion\": \"ANULACION\", \"tipoAfectacion\": \"GRAVADO_OPERACION_ONEROSA\", \"unidadMedida\": \"UNIDAD_BIENES\", \"cantidad\": \"1\", \"valorVentaUnitarioItem\": 100 }\n  ],\n  \"emisor\": { \"correo\": \"empresa@gmail.com\", \"nombreComercial\": \"MI EMPRESA SAC\", \"nombreLegal\": \"MI EMPRESA S.A.C.\", \"numeroDocumentoIdentidad\": \"{{ruc}}\", \"tipoDocumentoIdentidad\": \"RUC\" },\n  \"receptor\": { \"correo\": \"cliente@gmail.com\", \"nombreComercial\": \"CLIENTE\", \"nombreLegal\": \"CLIENTE SAC\", \"numeroDocumentoIdentidad\": \"20987654321\", \"tipoDocumentoIdentidad\": \"RUC\" }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Nota de Debito",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/notadebito-api/invoice2u/integracion/nota-debito/{{ruc}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "notadebito-api",
                "invoice2u",
                "integracion",
                "nota-debito",
                "{{ruc}}"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"close2u\": { \"tipoIntegracion\": \"OFFLINE\", \"tipoPlantilla\": \"01\", \"tipoRegistro\": \"PRECIOS_SIN_IGV\" },\n  \"datosDocumento\": { \"serie\": \"FND1\", \"numero\": {{numero}}, \"moneda\": \"PEN\", \"fechaEmision\": \"2025-04-16\", \"horaEmision\": null, \"formaPago\": \"CONTADO\" },\n  \"documentoModifica\": { \"tipoComprobanteModifica\": \"01\", \"serie\": \"{{serie}}\", \"numero\": {{numero}} },\n  \"motivo\": { \"codigo\": \"02\", \"descripcion\": \"Intereses por mora\" },\n  \"detalleDocumento\": [\n    { \"codigoProducto\": \"PROD001\", \"descripcion\": \"CARGO\", \"tipoAfectacion\": \"GRAVADO_OPERACION_ONEROSA\", \"unidadMedida\": \"UNIDAD_BIENES\", \"cantidad\": \"1\", \"valorVentaUnitarioItem\": 10 }\n  ],\n  \"emisor\": { \"correo\": \"empresa@gmail.com\", \"nombreComercial\": \"MI EMPRESA SAC\", \"nombreLegal\": \"MI EMPRESA S.A.C.\", \"numeroDocumentoIdentidad\": \"{{ruc}}\", \"tipoDocumentoIdentidad\": \"RUC\" },\n  \"receptor\": { \"correo\": \"cliente@gmail.com\", \"nombreComercial\": \"CLIENTE\", \"nombreLegal\": \"CLIENTE SAC\", \"numeroDocumentoIdentidad\": \"20987654321\", \"tipoDocumentoIdentidad\": \"RUC\" }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Guia Remitente",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/guiaremitente-api/invoice2u/integracion/guia-remision/{{ruc}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "guiaremitente-api",
                "invoice2u",
                "integracion",
                "guia-remision",
                "{{ruc}}"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"close2u\": { \"tipoIntegracion\": \"OFFLINE\", \"tipoPlantilla\": \"01\" },\n  \"datosDocumento\": { \"serie\": \"T001\", \"numero\": 1, \"fechaEmision\": \"2025-04-16\" },\n  \"remitente\": { \"ruc\": \"{{ruc}}\", \"razonSocial\": \"MI EMPRESA S.A.C.\" },\n  \"destinatario\": { \"tipoDoc\": \"6\", \"numDoc\": \"20987654321\", \"razonSocial\": \"CLIENTE SAC\" },\n  \"traslado\": { \"motivo\": \"VENTA\", \"modalidad\": \"TRANSPORTE_PUBLICO\", \"fechaInicio\": \"2025-04-16\" },\n  \"detalle\": [ { \"codigo\": \"PROD001\", \"descripcion\": \"PRODUCTO\", \"unidad\": \"NIU\", \"cantidad\": 1 } ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Guia Transportista",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/guiatransportista-api/invoice2u/integracion/guia-remision/transportista/{{ruc}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "guiatransportista-api",
                "invoice2u",
                "integracion",
                "guia-remision",
                "transportista",
                "{{ruc}}"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"close2u\": { \"tipoIntegracion\": \"OFFLINE\", \"tipoPlantilla\": \"01\" },\n  \"datosDocumento\": { \"serie\": \"T002\", \"numero\": 1, \"fechaEmision\": \"2025-04-16\" },\n  \"transportista\": { \"tipoDoc\": \"6\", \"numDoc\": \"20999999999\", \"razonSocial\": \"TRANSPORTES SAC\" },\n  \"vehiculo\": { \"placa\": \"ABC-123\" },\n  \"conductor\": { \"tipoDoc\": \"1\", \"numDoc\": \"12345678\", \"nombres\": \"CONDUCTOR\" },\n  \"detalle\": [ { \"codigo\": \"PROD001\", \"descripcion\": \"PRODUCTO\", \"unidad\": \"NIU\", \"cantidad\": 1 } ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Resumen de Baja",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/resumen-api/invoice2u/integracion/resumen-baja/{{ruc}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "resumen-api",
                "invoice2u",
                "integracion",
                "resumen-baja",
                "{{ruc}}"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"close2u\": { \"tipoIntegracion\": \"OFFLINE\" },\n  \"emisor\": { \"correo\": \"empresa@gmail.com\", \"nombreComercial\": \"MI EMPRESA SAC\", \"nombreLegal\": \"MI EMPRESA S.A.C.\", \"numeroDocumentoIdentidad\": \"{{ruc}}\", \"tipoDocumentoIdentidad\": \"RUC\" },\n  \"fechaGeneracion\": \"2025-04-17\",\n  \"fechaDocumentoBaja\": \"2025-04-16\",\n  \"resumenBajaItemList\": [\n    { \"serie\": \"{{serie}}\", \"numero\": {{numero}}, \"tipoComprobante\": \"{{tipoComprobante}}\", \"motivo\": \"Error en datos\" }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Consultas",
      "item": [
        {
          "name": "Consultar PDF",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/pdfapi/pdfapi/consultarPdf/{{ruc}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "pdfapi",
                "pdfapi",
                "consultarPdf",
                "{{ruc}}"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"emisor\": \"{{ruc}}\",\n  \"numero\": {{numero}},\n  \"serie\": \"{{serie}}\",\n  \"tipoComprobante\": \"{{tipoComprobante}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Consultar XML",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consulta-api/invoice2u/integracion/consultarXml/{{ruc}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consulta-api",
                "invoice2u",
                "integracion",
                "consultarXml",
                "{{ruc}}"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"emisor\": \"{{ruc}}\",\n  \"numero\": {{numero}},\n  \"serie\": \"{{serie}}\",\n  \"tipoComprobante\": \"{{tipoComprobante}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Consultar CDR (GET)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/comprobantesapi/comprobante/emisor/{{ruc}}/comprobante/{{serie}}/{{numero}}/{{tipoComprobante}}/archivo?tipo-archivo=4",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "comprobantesapi",
                "comprobante",
                "emisor",
                "{{ruc}}",
                "comprobante",
                "{{serie}}",
                "{{numero}}",
                "{{tipoComprobante}}",
                "archivo"
              ],
              "query": [
                {
                  "key": "tipo-archivo",
                  "value": "4"
                }
              ]
            }
          }
        },
        {
          "name": "Consultar Estados",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consulta-api/invoice2u/integracion/consultarEstado/{{ruc}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consulta-api",
                "invoice2u",
                "integracion",
                "consultarEstado",
                "{{ruc}}"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"emisor\": \"{{ruc}}\",\n  \"numero\": {{numero}},\n  \"serie\": \"{{serie}}\",\n  \"tipoComprobante\": \"{{tipoComprobante}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Herramientas",
      "item": [
        {
          "name": "Vista Previa (Factura)",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/preview-api/factura/{{ruc}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "preview-api",
                "factura",
                "{{ruc}}"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"close2u\": { \"tipoIntegracion\": \"OFFLINE\", \"tipoPlantilla\": \"01\", \"tipoRegistro\": \"PRECIOS_SIN_IGV\" },\n  \"datosDocumento\": { \"serie\": \"{{serie}}\", \"numero\": 0, \"moneda\": \"PEN\", \"fechaEmision\": \"2025-04-16\", \"horaEmision\": null, \"formaPago\": \"CONTADO\", \"medioPago\": \"DEPOSITO_CUENTA\", \"condicionPago\": \"CONTADO\", \"ordencompra\": null, \"glosa\": \"Vista previa de factura\" },\n  \"detalleDocumento\": [ { \"codigoProducto\": \"ABC123\", \"descripcion\": \"PRODUCTO GRAVADO A\", \"tipoAfectacion\": \"GRAVADO_OPERACION_ONEROSA\", \"unidadMedida\": \"UNIDAD_BIENES\", \"cantidad\": \"1\", \"valorVentaUnitarioItem\": 100 } ],\n  \"emisor\": { \"correo\": \"empresa@gmail.com\", \"nombreComercial\": \"MI EMPRESA SAC\", \"nombreLegal\": \"MI EMPRESA S.A.C.\", \"numeroDocumentoIdentidad\": \"{{ruc}}\", \"tipoDocumentoIdentidad\": \"RUC\" },\n  \"informacionAdicional\": { \"tipoOperacion\": \"VENTA_INTERNA\" },\n  \"receptor\": { \"correo\": \"cliente@gmail.com\", \"correoCopia\": null, \"domicilioFiscal\": { \"direccion\": \"AV. EJEMPLO NRO. 123 - LIMA\", \"ubigeo\": \"150101\" }, \"nombreComercial\": \"CLIENTE EMPRESA\", \"nombreLegal\": \"CLIENTE EMPRESA E.I.R.L.\", \"numeroDocumentoIdentidad\": \"20987654321\", \"tipoDocumentoIdentidad\": \"RUC\" }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Vista Previa (Boleta)",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/preview-api/boleta/{{ruc}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "preview-api",
                "boleta",
                "{{ruc}}"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"close2u\": { \"tipoIntegracion\": \"OFFLINE\", \"tipoPlantilla\": \"01\", \"tipoRegistro\": \"PRECIOS_SIN_IGV\" },\n  \"datosDocumento\": { \"serie\": \"BBV5\", \"numero\": 0, \"moneda\": \"PEN\", \"fechaEmision\": \"2025-04-16\", \"horaEmision\": null, \"formaPago\": \"CONTADO\", \"medioPago\": \"EFECTIVO\", \"condicionPago\": \"CONTADO\", \"ordencompra\": null, \"glosa\": \"Vista previa de boleta\" },\n  \"detalleDocumento\": [ { \"codigoProducto\": \"PROD001\", \"descripcion\": \"SERVICIO DE CONSULTORIA\", \"tipoAfectacion\": \"GRAVADO_OPERACION_ONEROSA\", \"unidadMedida\": \"SERVICIO\", \"cantidad\": \"1\", \"valorVentaUnitarioItem\": 250 } ],\n  \"emisor\": { \"correo\": \"empresa@gmail.com\", \"nombreComercial\": \"MI EMPRESA SAC\", \"nombreLegal\": \"MI EMPRESA S.A.C.\", \"numeroDocumentoIdentidad\": \"{{ruc}}\", \"tipoDocumentoIdentidad\": \"RUC\" },\n  \"informacionAdicional\": { \"tipoOperacion\": \"VENTA_INTERNA\" },\n  \"receptor\": { \"correo\": \"cliente@gmail.com\", \"nombreComercial\": \"JUAN PEREZ\", \"nombreLegal\": \"JUAN PEREZ GARCIA\", \"numeroDocumentoIdentidad\": \"12345678\", \"tipoDocumentoIdentidad\": \"DNI\" }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Vista Previa (Nota de Credito)",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/preview-api/nota-credito/{{ruc}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "preview-api",
                "nota-credito",
                "{{ruc}}"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"close2u\": { \"tipoIntegracion\": \"OFFLINE\", \"tipoPlantilla\": \"01\", \"tipoRegistro\": \"PRECIOS_SIN_IGV\" },\n  \"comprobanteAjustado\": { \"serie\": \"{{serie}}\", \"numero\": {{numero}}, \"tipoComprobante\": \"{{tipoComprobante}}\", \"fechaEmision\": \"2025-04-16\" },\n  \"datosDocumento\": { \"serie\": \"FNC1\", \"numero\": 0, \"moneda\": \"PEN\", \"fechaEmision\": \"2025-04-17\", \"horaEmision\": null, \"motivo\": \"ANULACION_OPERACION\", \"glosa\": \"Vista previa de NC\" },\n  \"detalleDocumento\": [ { \"codigoProducto\": \"ABC123\", \"descripcion\": \"ANULACION\", \"tipoAfectacion\": \"GRAVADO_OPERACION_ONEROSA\", \"unidadMedida\": \"UNIDAD_BIENES\", \"cantidad\": \"1\", \"valorVentaUnitarioItem\": 100 } ],\n  \"emisor\": { \"correo\": \"empresa@gmail.com\", \"nombreComercial\": \"MI EMPRESA SAC\", \"nombreLegal\": \"MI EMPRESA S.A.C.\", \"numeroDocumentoIdentidad\": \"{{ruc}}\", \"tipoDocumentoIdentidad\": \"RUC\" },\n  \"informacionAdicional\": { \"tipoOperacion\": \"VENTA_INTERNA\" },\n  \"receptor\": { \"correo\": \"cliente@gmail.com\", \"nombreComercial\": \"CLIENTE\", \"nombreLegal\": \"CLIENTE SAC\", \"numeroDocumentoIdentidad\": \"20987654321\", \"tipoDocumentoIdentidad\": \"RUC\" }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Vista Previa (Nota de Debito)",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{token}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/preview-api/nota-debito/{{ruc}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "preview-api",
                "nota-debito",
                "{{ruc}}"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"close2u\": { \"tipoIntegracion\": \"OFFLINE\", \"tipoPlantilla\": \"01\", \"tipoRegistro\": \"PRECIOS_SIN_IGV\" },\n  \"comprobanteAjustado\": { \"serie\": \"{{serie}}\", \"numero\": {{numero}}, \"tipoComprobante\": \"{{tipoComprobante}}\", \"fechaEmision\": \"2025-04-16\" },\n  \"datosDocumento\": { \"serie\": \"FND1\", \"numero\": 0, \"moneda\": \"PEN\", \"fechaEmision\": \"2025-04-17\", \"horaEmision\": null, \"motivo\": \"AUMENTO_EN_EL_VALOR\", \"glosa\": \"Vista previa de ND\" },\n  \"detalleDocumento\": [ { \"codigoProducto\": \"ABC123\", \"descripcion\": \"CARGO\", \"tipoAfectacion\": \"GRAVADO_OPERACION_ONEROSA\", \"unidadMedida\": \"SERVICIO\", \"cantidad\": \"1\", \"valorVentaUnitarioItem\": 10 } ],\n  \"emisor\": { \"correo\": \"empresa@gmail.com\", \"nombreComercial\": \"MI EMPRESA SAC\", \"nombreLegal\": \"MI EMPRESA S.A.C.\", \"numeroDocumentoIdentidad\": \"{{ruc}}\", \"tipoDocumentoIdentidad\": \"RUC\" },\n  \"informacionAdicional\": { \"tipoOperacion\": \"VENTA_INTERNA\" },\n  \"receptor\": { \"correo\": \"cliente@gmail.com\", \"nombreComercial\": \"CLIENTE\", \"nombreLegal\": \"CLIENTE SAC\", \"numeroDocumentoIdentidad\": \"20987654321\", \"tipoDocumentoIdentidad\": \"RUC\" }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    }
  ]
}