Skip to content

SifenEnviarLote

Sends a batch of up to 50 Electronic Documents (DE) to SIFEN asynchronously (siRecepLoteDE). The node signs each DE individually with the .p12 certificate from the credential, groups them (compressed and base64-encoded), and sends them in a single call. DNIT returns a query protocol (dProtConsLote) used later with the SifenConsultarLote node to check the outcome of each document.

This is the recommended option over SifenEmitirDE when several vouchers need to be issued at once, since it avoids one synchronous call per document.

FieldTypeRequiredDescription
credentials_idcredentialsYesSIFEN credential
documentosjsonNoList of DE (JSON array), maximum 50. If left empty, the input data is used (an array or an object with documentos)

This module requires a sifen credential (.p12 certificate, RUC, establishment, expedition point and environment). See the full field list in SifenEmitirDE.

{
"success": true,
"protocolo": "987654321",
"count": 3,
"codigo": "0260",
"mensaje": "Lote recibido",
"cdcs": [
"01800123456001001000001234567890123456789012",
"01800123456001001000001234567890123456789013",
"01800123456001001000001234567890123456789014"
]
}
{
"credentials_id": "cred-sifen-prod",
"documentos": [
{
"tipoDE": 1,
"numero": 2,
"receptor": { "ruc": "80012345-6", "razonSocial": "Empresa Cliente S.A." },
"items": [{ "descripcion": "Product A", "cantidad": 2, "precioUnitario": 150000, "ivaTipo": 10 }]
},
{
"tipoDE": 1,
"numero": 3,
"receptor": { "ruc": "80098765-4", "razonSocial": "Otro Cliente S.R.L." },
"items": [{ "descripcion": "Product B", "cantidad": 1, "precioUnitario": 300000, "ivaTipo": 10 }]
}
]
}
  • The batch accepts a maximum of 50 documents; if exceeded, the node rejects the request before contacting SIFEN
  • Each DE is persisted in “signed” state before sending, for traceability even if the call fails
  • The outcome does not arrive in this call: query the returned protocol with SifenConsultarLote
  • Every DE in the batch shares the same issuer (RUC, establishment and expedition point from the credential), unless a different one is set per document