Skip to content
AdCrunch
Esc
↑↓navigate↵open⌘Jpreview
On this page

campaign_plan_get

Fetch one campaign plan with its line items in full, the money figures, and whatever each line has already created.

Fetches a single Campaign Plan and everything on it.

Input

Field Type Required Description
campaign_plan_name string yes The plan slug.

Output

The plan, its three money figures, and its Line Items in full — there is no line_item_get, because there would be nothing left to fetch.

Each line carries four facts that are derived rather than stored:

Field What it tells you
provider Which provider sells this channel, or null when none we integrate with does.
executable Whether it could be executed at all today. Only meta can.
effectiveStartDate / effectiveEndDate The window that actually applies, after inheriting the plan’s.
unit total or daily — how to read budget.

executions lists what the line has already created: one row per provider object, each with its native id.

Example

campaign_plan_get({ campaign_plan_name: 'q4-acquisition' });
// → { campaignPlan: {
//      currency: 'EUR', totalBudget: 10000000, status: 'approved',
//      allocation: { allocated: 6000000, unallocated: 4000000, unit: 'total', comparable: true },
//      lineItems: [{ id: 'lni_…', channel: 'meta', unit: 'total', executions: [] }],
//      revision: 4,
//    } }

Requires the campaign_plan:read scope.

Was this page helpful?