Skip to main content

POST /api/v1/decision-flows/ensure-base

Ensures a default “Base NBA Flow” exists for the tenant. If one already exists, returns its ID without creating a new one. Useful during onboarding or when the tenant needs a guaranteed starting flow.

Response (200 — already exists)

{
  "flowId": "df_001",
  "created": false
}

Response (201 — newly created)

{
  "flowId": "df_002",
  "created": true
}

Roles

admin, editor

GET /api/v1/decision-flows//assembly-log

Returns the auto-assembly history for a decision flow. Each log entry records when the platform automatically rebuilt the flow’s pipeline in response to entity changes (new offers, updated rules, etc.).

Path Parameters

ParameterTypeDescription
idstringDecision flow ID

Response

{
  "decisionFlowId": "df_001",
  "autoAssembly": true,
  "entries": [
    {
      "timestamp": "2026-03-30T10:00:00Z",
      "trigger": "offer_created",
      "entityId": "off_005",
      "entityName": "Holiday Savings Promo",
      "pipelineVersion": 12,
      "nodesAdded": 2,
      "nodesRemoved": 0,
      "durationMs": 45
    },
    {
      "timestamp": "2026-03-29T15:30:00Z",
      "trigger": "qualification_rule_updated",
      "entityId": "qr_003",
      "entityName": "Min Credit Score",
      "pipelineVersion": 11,
      "nodesAdded": 0,
      "nodesRemoved": 0,
      "durationMs": 32
    }
  ],
  "count": 2
}

Response Fields

FieldTypeDescription
autoAssemblybooleanWhether auto-assembly is enabled for this flow
entriesarrayAssembly log entries (newest first)
countintegerTotal number of log entries

Error Codes

CodeReason
404Decision flow not found

Roles

any authenticated See also: Decision Flows