Skip to main content

GET /api/v1/campaigns/:campaign_id

Purpose

GET /api/v1/campaigns/:campaign_id returns one campaign detail object in the same shape as a campaign list row, plus detail-only fields:

  • description
  • offering
  • players_engaged
  • associations for CRM bonus campaigns

Query parameters

Query paramMeaningNotes
campaign_idRequired path parameterSynthetic campaign ID such as crm_bonus:<bonus_id> or crm_reactive:<flow_id>
tenant_idOptional tenant scopeNarrows the in-memory campaign lookup to the tenant-scoped record set

Data sources

Campaign detail does not hit a special detail table. It rebuilds the same merged campaign record set used by the list endpoint, then returns the matching record.

That means detail data comes from the same sources as the list:

  • CRM lifecycle_pools
  • CRM content_pools
  • CRM bonuses
  • CRM content
  • CRM reward_log
  • CRM actions_log
  • Notify Triggers flows_v2
  • Notify Triggers flow_versions_v2
  • Notify Triggers flow_runs_v2
  • Notify Triggers flow_working_copies_v2
  • Notify Triggers flow_release_attempts_v2
  • Spark Bonus dispatches

If no matching record is found, the endpoint returns 404.

Shared fields

Every field described for GET /api/v1/campaigns row items also applies here:

  • identity
  • title
  • status
  • type
  • benefits
  • scope
  • channels
  • campaign_origin
  • ui_status

Detail-only fields

FieldHow it is filledSource or derivation
descriptionHuman-readable detail textCRM text placeholders or wager/title fallbacks; trigger flow description or name
offeringLightweight name/kind objectCRM uses {name, kind:"bonus"}; trigger uses {name, kind:"automation"}
players_engagedActivated-player countUnique activated-player attribution derived from CRM reward usage or Spark dispatches
associationsCRM lifecycle route metadataStage, content-pool ID, scope, type, channels, and lifecycle readiness for each route

CRM detail mapping

For CRM-backed campaigns, each detail record represents exactly one bonus ID:

  • title prefers localized bonus_component.component.art_bundle.title
  • offering.name prefers bonus_available.title, then bonus_available.internal_name
  • description prefers cleaned text placeholders like email subject/body, then wager art/title fallbacks
  • image_url comes from content placeholders such as hero_banner_image_url
  • start_at and end_at come from that bonus, not from an aggregate across its content pool
  • associations preserves every lifecycle stage and content pool that references the bonus

Trigger detail mapping

For trigger-backed campaigns:

  • title comes from flows_v2.name
  • description comes from flows_v2.description, then name
  • offering.name mirrors the flow name
  • channels come from notification action refs on the selected flow version

The selected flow version is:

  • the released version, when it exists and contains notification actions
  • otherwise the newest version that contains notification actions

Truth gaps to keep in mind

  • offering is currently a minimal map, not a richer typed model.
  • CRM titles and descriptions use fallback heuristics across localized bonus and content metadata.