factus-js iconfactus-js
Recepción de documentos

Emitir evento

Emitir eventos RADIAN (030-034) para una factura recibida.

Firma del método

emitEvent(params: EmitEventParams, input: EmitEventInput): Promise<ApiResponse<ReceptionBillEvent[]>>

Endpoint Factus

PATCH /v1/receptions/bills/{bill_id}/radian/events/{event_type}

Fuente oficial: Emitir evento

Parámetros

Prop

Type

Ejemplo

import { EventCode, ClaimConceptCode } from "factus-js";

await factus.reception.emitEvent(
  {
    bill_id: "SETP990000203",
    event_type: EventCode.ReceiptAcknowledgement,
  },
  {
    identification_document_code: "13",
    identification: "12345667",
    first_name: "Pepito",
    last_name: "Perez",
    job_title: "Desarrollador de software",
    organization_department: "Sistemas",
  },
);

await factus.reception.emitEvent(
  {
    bill_id: "SETP990000203",
    event_type: EventCode.InvoiceClaim,
  },
  {
    claim_concept_code: ClaimConceptCode.DocumentInconsistencies,
    identification_document_code: "13",
    identification: "12345667",
    first_name: "Pepito",
    last_name: "Perez",
    job_title: "Desarrollador de software",
    organization_department: "Sistemas",
  },
);

Flujo usual: 030 -> 032 -> 033. El evento 031 (reclamo) altera el flujo, y 034 (aceptación tácita) se genera automáticamente según reglas DIAN.

Es probable que este método no funcione en entorno sandbox. Úsalo en producción o con credenciales autorizadas.

En esta página