Skip to content
AdCrunch
Esc
navigateopen⌘Jpreview

List the Campaign Plans

Lists the Campaign Plans of your organization. Each row gives the figures you compare plans by: the budget envelope, the allocated sum and whether that sum is comparable, the window, the number of lines, and the channels the plan uses. This call does not give the Line Items. To read them, read one plan. Deleted plans are not in the list.

GET/context/campaign-plans/
Authorization
AuthorizationBearer token · headerrequired

Send Authorization: Bearer <credential>. Two credentials work.

An API key (acr_…) is what a server integration uses. Create one in the AdCrunch console under Settings → API keys — see https://docs.adcrunch.dev/account/api-keys. A key is bound to the organization that was active when you created it, and it keeps acting on that organization whatever you do later. It carries the permissions of the member who created it.

A session issued by the AdCrunch sign-in flow also works, which is how the console calls this service from the browser.

Either way the organization comes from the credential. There is no organization parameter.

Responses
200

Every Campaign Plan in the organization, with its money summarized and its channels named, but without its rows. Where the rows mix totals and daily rates, allocation.comparable is false and allocation.allocated is null — there is no meaningful sum to show.

Array of object
allocationobjectrequired

Derived on every read. Never stored.

Show properties
allocatednumber | nullrequired

The sum of the Line Item budgets. null when the lines mix units, because that sum would be meaningless.

comparablebooleanrequired

False when the lines mix totals and daily rates. A surface must then print "not comparable" rather than a plausible-looking wrong total.

unallocatednumber | nullrequired

The envelope less the allocated, where both are known.

unitstring | nullrequired

The shared unit, when the lines agree on one.

Allowed:totaldaily
brandIdstring | nullrequired
channelsstring[]required

Every channel its Line Items name, deduplicated.

currencystringrequired
descriptionstringrequired
endDatestring | nullrequired

A calendar date, YYYY-MM-DD.

lineItemCountnumberrequired
namestringrequired
revisionnumberrequired

Increments on every write. Send it back as base_revision to edit; a stale one answers 409.

slugstringrequired
startDatestring | nullrequired

A calendar date, YYYY-MM-DD.

statusstringrequired
Allowed:draftapproved
totalBudgetnumber | nullrequired

The envelope. Integer minor units of currency.

401

No credential, or one that does not resolve. Send an API key or a session. See the security scheme. error is unauthorized.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:unauthorized
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

403

The caller does not hold campaign_plan:read. error is forbidden.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:forbidden
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

Request
curl -X GET "https://api.adcrunch.dev/context/campaign-plans/" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
[
  {
    "allocation": {
      "allocated": 0,
      "comparable": true,
      "unallocated": 0,
      "unit": "total"
    },
    "brandId": "string",
    "channels": [
      "meta"
    ],
    "currency": "string",
    "description": "string",
    "endDate": "string",
    "lineItemCount": 0,
    "name": "string",
    "revision": 0,
    "slug": "string",
    "startDate": "string",
    "status": "draft",
    "totalBudget": 0
  }
]