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

Get a Campaign Plan

Reads one Campaign Plan. The answer gives the number of its Line Items in lineItemCount, and it does not list them.

To list the Line Items with the provider objects each one created, use GET /campaign-plans/{slug}/line-items. To learn whether AdCrunch can build one Line Item now, read that Line Item with GET /campaign-plans/{slug}/line-items/{lineItemId}: only that read carries the readiness.

The plan has the three money figures. If allocation.comparable is false, the lines do not share one unit. Show “not comparable” in that condition. Do not show a total.

Send revision back as base_revision when you write to the Campaign Plan.

GET/context/campaign-plans/{slug}
Authorization
AuthorizationBearer token · headerrequired

Send Authorization: Bearer <credential>.

Use an API key (acr_…), from the AdCrunch console under Settings → API keys.

The credential names the organization, and no operation takes an organization parameter.

See https://docs.adcrunch.dev/api/authentication.

Path parameters
slugstringrequired
Responses
200

The Campaign Plan, with lineItemCount and without its Line Items.

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
assigneesobject[]required

The current members who are accountable for the record, oldest first, at most 10. An Assignee grants no access. A member who left is not listed.

Show properties
Array of object
idstringrequired

The usr_… id of the member.

namestringrequired

The name of the member.

bodystring | nullrequired

The long document of the Campaign Plan, in markdown, or null when nobody wrote it. The list answers the description, never the body.

brandobject | nullrequired

The name and the slug of the Brand, to show and link it. Null when the plan has no Brand, or when its Brand was deleted.

Show properties
namestringrequired
slugstringrequired
brandIdstring | nullrequired

Nullable and mutable: a plan may precede its brand, cover a portfolio, or be re-pointed. Deleting a Brand leaves its plans standing.

commentCountnumberrequired

The number of live Comments on the plan, replies included. List them with GET /campaign-plans/{slug}/comments.

createdAtnumberrequired

Milliseconds since the Unix epoch, UTC.

createdBystringrequired
currencystringrequired

Editable until the first Line Item budget, and frozen thereafter.

descriptionstringrequired
endDatestring | nullrequired

A calendar date, YYYY-MM-DD.

idstringrequired
lineItemCountnumberrequired

The number of live Line Items of the plan. List them with GET /campaign-plans/{slug}/line-items.

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

The only two stored states. active, closed and "executed" are derived, never stored.

Allowed:draftapproved
totalBudgetnumber | nullrequired
updatedAtnumber | nullrequired

Milliseconds since the Unix epoch, UTC.

400

The request does not match the schema of this operation: a field is missing or has the wrong type, or the body is not valid JSON. error is invalid_request, and issues names each field. Nothing was changed.

issuesobject[]required

One entry for each field that does not match.

Show properties
Array of object
instringrequired

The part of the request that holds the field.

Allowed:bodycookieheadersparamsquery
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.

pathstringrequired

A JSON Pointer into that part of the request, such as /filename. An empty string is the whole part.

errorstringrequired

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

Allowed:invalid_request
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.

401

No API key, or one that does not resolve. 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.

402

The organization has no active subscription. An owner subscribes at paywallUrl. error is organization_unentitled.

paywallUrlstring<uri>required

The page where an owner of the organization subscribes. Show it to the person.

errorstringrequired

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

Allowed:organization_unentitled
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.

404

No Campaign Plan with that slug. error is not_found.

errorstringrequired

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

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.pr-1314.adcrunch.dev/context/campaign-plans/string' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "allocation": {
    "allocated": 2500,
    "comparable": true,
    "unallocated": 2500,
    "unit": "total"
  },
  "assignees": [
    {
      "id": "usr_4d8b12",
      "name": "Maya Lindqvist"
    }
  ],
  "body": "## Why this split\n\nMeta carries the reach. One Line Item keeps the budget in one place.\n\n## How it will be judged\n\nRevenue in the window, against the spring of 2025.",
  "brand": {
    "name": "Acme",
    "slug": "acme"
  },
  "brandId": "brd_6a9c33",
  "commentCount": 2,
  "createdAt": 1768435200000,
  "createdBy": "usr_5d2b71",
  "currency": "EUR",
  "description": "The spring sale of Acme, on Meta, in France and Belgium.",
  "endDate": "2026-05-31",
  "id": "cpl_4e1a08",
  "lineItemCount": 1,
  "name": "Spring Sale 2026",
  "revision": 3,
  "slug": "spring-sale",
  "startDate": "2026-03-01",
  "status": "approved",
  "totalBudget": 5000,
  "updatedAt": 1769040000000
}

Was this page helpful?