Get a Line Item
Reads one Line Item with its readiness: whether AdCrunch can build it now, and if not, why. Ask this before any provider call.
This is the one read that carries the readiness. The list of Line Items and the writes of a Line Item return the Line Item without it. The read of a Campaign Plan returns no Line Item. This call reads. It changes nothing, and it calls no provider. It answers for every channel, including a channel AdCrunch cannot write to.
The answer is the Line Item, with the same fields as a row of the list of the Line Items of its Campaign Plan, and two more fields: currency and readiness. currency is the currency of the Campaign Plan. Each amount of the Line Item is in whole units of that currency. status is the status of the Line Item. readiness.status is the verdict.
A Line Item is not ready in these conditions:
- A person has not validated the Line Item in the AdCrunch console. The validation is a record: the provider write tools do not check it.
- AdCrunch cannot write to the channel. The answer names the provider that sells it, or
nullwhen nobody we integrate with sells it. - The Line Item has no ad account.
- The ad account is not connected to this organization.
- The ad account belongs to a different provider than the channel.
- The currency of the ad account is different from the Campaign Plan currency, or AdCrunch does not know that currency yet. To make it known, refresh the provider connection.
- The Line Item and the Campaign Plan give no date at all.
- The resolved start follows the resolved end. Each row is ordered on its own, and only the pair shows this.
AdCrunch never converts a currency. A converted budget is a different plan.
The verdict is advice. The provider write tools do not read it.
When the Line Item is ready, the verdict also gives the dates that apply, and it tells you whether the budget goes to the provider as a lifetime total or as a daily rate.
The MCP tool line_item_get gives the same answer to an agent.
/context/campaign-plans/{slug}/line-items/{lineItemId}AuthorizationBearer token · headerrequiredSend 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.
lineItemIdstringrequiredslugstringrequiredThe Line Item, its readiness and the currency of its Campaign Plan. Every readiness outcome is a 200, ready included. The example shows ready; the schema lists the nine refusals and what each one carries.
advertiserIdstring | nullrequiredageMaxnumber | nullrequiredageMinnumber | nullrequiredEach bound is independently optional, so "35+" is expressible.
budgetnumber | nullrequiredWhole units of the plan’s currency.
campaignPlanIdstringrequiredchannelstringrequiredThe planner’s word for what is being bought, not a provider name. A plan may name a channel we cannot execute.
metatiktoksnapchatgoogle_searchgoogle_pmaxgoogle_displayyoutubeprogrammatic_displaylinkedinxcountriesstring[]requiredcreatedAtnumberrequiredMilliseconds since the Unix epoch, UTC.
createdBystringrequiredeffectiveEndDatestring | nullrequiredThe line’s own bound where it has one, else the plan’s.
effectiveStartDatestring | nullrequiredA calendar date, YYYY-MM-DD.
endDatestring | nullrequiredA calendar date, YYYY-MM-DD.
executablebooleanrequiredWhether this channel could be executed at all today. Derived from our capabilities, never a promise that it will be.
executionsobject[]requiredWhat this line has spawned. Never a claim that it is finished — nobody declared how many objects a line should produce.
Show propertiesHide properties
objectadvertiserIdstringrequiredcreatedAtnumberrequiredMilliseconds since the Unix epoch, UTC.
entityIdstringrequiredThe provider’s own id, unprefixed, so it joins to entities.
entityTypestringrequiredThe provider’s word for the level — campaign, adset, ad.
idstringrequiredmutationIdstring | nullrequiredThe id of the Mutation that performed the write, when known.
providerstringrequiredgenderstring | nullrequiredallmenwomenidstringrequirednamestring | nullrequiredA short label of the Line Item, at most 60 characters after trimming. It is not unique, and it is not a handle: nothing looks a Line Item up by it. A blank name is no name. null for no name.
objectivestringrequiredawarenessengagementleadssalestrafficapp_promotionpersonaIdstring | nullrequiredExplains the targeting; never supplies its values.
providerstring | nullrequiredWho sells this channel, or null when nobody we integrate with does.
revisionnumberrequiredIncrements on every write. Send it back as base_revision to edit; a stale one answers 409.
startDatestring | nullrequiredA calendar date, YYYY-MM-DD.
statusstringrequiredvalidated when a person validated the Line Item. It is a record, not a gate: the provider write tools do not check it. The readiness reads it.
draftvalidatedtargetMetricstring | nullrequiredThe metric of the target, or null for no target. cpa, cpc and cpm are costs: lower is better. roas is a return: higher is better. A target blocks nothing: approval and the readiness do not read it.
cpacpccpmroastargetValuenumber | nullrequiredThe value of the target: whole units of the plan’s currency for cpa, cpc and cpm, a ratio for roas. null for no target.
unitstringrequiredHow budget reads, derived from the effective end date. Present → a total for the period; absent → a daily rate. A surface must print this beside the amount.
totaldailyupdatedAtnumber | nullrequiredMilliseconds since the Unix epoch, UTC.
currencystringrequiredThe currency of the Campaign Plan (ISO 4217). Each amount of the Line Item is in whole units of it.
readinessobjectrequiredWhether AdCrunch can build the Line Item now, and if not, the first reason. The verdict is discriminated on status. AdCrunch derives it on each read and never stores it. It is advice: the provider write tools do not read it.
Show propertiesHide properties
advertiserIdstringrequiredbudgetnumber | nullrequiredcurrencystringrequiredThe plan’s currency, confirmed equal to the account’s.
endDatestring | nullrequiredA calendar date, YYYY-MM-DD.
providerstringrequiredstartDatestring | nullrequiredA calendar date, YYYY-MM-DD.
statusstringrequiredreadyunitstringrequiredtotaldailystatusstringrequiredA person has not validated the Line Item in the AdCrunch console. The validation is a record: the provider write tools do not check it.
not_validatedchannelstringrequiredmetatiktoksnapchatgoogle_searchgoogle_pmaxgoogle_displayyoutubeprogrammatic_displaylinkedinxproviderstring | nullrequiredWho sells it, when someone does but we cannot write there yet.
statusstringrequiredchannel_not_executablestatusstringrequiredno_advertiserstatusstringrequiredadvertiser_not_ownedactualstringrequiredexpectedstringrequiredstatusstringrequiredprovider_mismatchadvertiserIdstringrequiredstatusstringrequiredRefresh the provider connection.
account_currency_unknownaccountCurrencystringrequiredplanCurrencystringrequiredstatusstringrequiredNever converted. A converted budget is a different plan, and the planner allocated what they allocated.
currency_mismatchstatusstringrequiredno_windowendDatestringrequiredA calendar date, YYYY-MM-DD.
startDatestringrequiredA calendar date, YYYY-MM-DD.
statusstringrequiredwindow_invertedThe 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[]requiredOne entry for each field that does not match.
Show propertiesHide properties
objectinstringrequiredThe part of the request that holds the field.
bodycookieheadersparamsquerymessagestringrequiredA sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.
pathstringrequiredA JSON Pointer into that part of the request, such as /filename. An empty string is the whole part.
errorstringrequiredA stable code for the failure. This is the field to branch on. It does not change for a given failure.
invalid_requestmessagestringrequiredA sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.
No API key, or one that does not resolve. See the security scheme. error is unauthorized.
errorstringrequiredA stable code for the failure. This is the field to branch on. It does not change for a given failure.
unauthorizedmessagestringrequiredA sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.
The organization has no active subscription. An owner subscribes at paywallUrl. error is organization_unentitled.
paywallUrlstring<uri>requiredThe page where an owner of the organization subscribes. Show it to the person.
errorstringrequiredA stable code for the failure. This is the field to branch on. It does not change for a given failure.
organization_unentitledmessagestringrequiredA sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.
The caller does not hold campaign_plan:read. error is forbidden.
errorstringrequiredA stable code for the failure. This is the field to branch on. It does not change for a given failure.
forbiddenmessagestringrequiredA sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.
No such Campaign Plan, or no Line Item with that id on it. error is not_found.
errorstringrequiredA stable code for the failure. This is the field to branch on. It does not change for a given failure.
messagestringrequiredA sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.