campaign_plan_get
Fetch one campaign plan with its line items in full, the money figures, and whatever each line has already created.
On this page
Fetches a single Campaign Plan and everything on it.
Warning
A Campaign Plan is not a provider campaign
It is AdCrunch’s own planning document — written before anything is bought,
and possibly executed into several campaigns, or none. For campaigns that
exist on Meta or Google, use list_entities and
get_entity.
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,
// } }
Note
Echo `revision` back when you write
Every write takes base_revision. If the plan moved since you read it, the
write is refused and tells you the current revision — read again, check the
change is compatible with yours, and retry.
Requires the campaign_plan:read scope.