1. 5. Scheduled Alerts
DUFREI API
  • Raíz
    • 1. Core & Health
      • Health Check
    • 2. AI Agents & MCP
      • Model Context Protocol (Streamable HTTP)
      • Initialize Legacy SSE Stream
      • Send Legacy MCP JSON-RPC Message
    • 3. Financial Documents
      • List Financial Documents
      • Cash Inflow Forecast & Customer Concentration (HHI)
      • Discounts, Demurrage & Shrinkage Recovery Audit
    • 4. Shipments & Fleet
      • List Shipments (Trips)
      • Audit Fleet Utilization and Productivity
      • Audit Dispatch-to-Bill and Invoicing Efficiency
      • Freight Financial Unit Economics ($/km, $/L)
    • 3. Financial & Invoices
      • SAT CFDI 4.0 Monthly Fiscal Ledger & Retention Reconciliation
    • 5. Scheduled Alerts
      • Schedule Alert Rules
        POST
  • Schemas
    • PaginationMeta
    • FinancialDocsResponse
    • ShipmentsResponse
    • FinancialSummary
    • TripSummary
    • ErrorResponse
    • CanceledRecord
    • PaymentRecord
    • FinancialDocument
    • MexicanAddress
    • ShipmentLeg
    • TripDocument
    • ScheduleAlertsRequest
    • ScheduleAlertsSuccessResponse
    • McpJsonRpcRequest
    • McpJsonRpcResponse
    • RouteCatalogDetails
    • FleetUtilizationResponse
    • DispatchToBillResponse
    • CashInflowForecastResponse
    • DiscountsAndShrinkageResponse
    • FinancialUnitEconomicsResponse
  1. 5. Scheduled Alerts

Schedule Alert Rules

POST
/api/alerts/schedule
Schedules alert-processing jobs for multiple users using the internal Agenda scheduler.
One independent Agenda job will be created per user ID in the userIds array.
Tenant isolation is strictly enforced; jobs are automatically assigned to the authenticated tenant RFC (req.tenant.rfc).

Solicitud

Autorización
API Key
Agregar parámetro en header
x-api-key
Ejemplo:
x-api-key: ********************
or
Parámetros del Body application/jsonRequerido

Ejemplos

Respuestas

🟢200
application/json
Alert jobs scheduled successfully.
Encabezados

Bodyapplication/json

🟠400BadRequest
🟠401Unauthorized
🟠403Forbidden
🔴500InternalServerError
Solicitud Ejemplo de Solicitud
Shell
JavaScript
Java
Swift
curl --location 'https://api.dufrei.com/api/alerts/schedule' \
--header 'x-api-key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
    "tenantId": "XAXX010101000",
    "userIds": [
        "USR_10293"
    ],
    "ruleId": "RULE_EXPIRING_DOCUMENTS",
    "cycleKey": "2026-05",
    "nameAlert": "end-trip",
    "extraData": {
        "key1": "value1"
    },
    "dueDate": "2026-05-25T18:00:00Z",
    "individual": true
}'
Respuesta Ejemplo de Respuesta
200 - Ejemplo 1
{
    "success": true,
    "message": "3 alertas individuales programadas en el panel administrativo."
}
Modificado en 2026-09-20 15:05:35
Anterior
SAT CFDI 4.0 Monthly Fiscal Ledger & Retention Reconciliation
Siguiente
PaginationMeta
Built with