Check a Line Item’s execution readiness
Tells you whether AdCrunch can execute a Line Item now, and if it cannot, why. Ask this before any provider call.
A line is not ready in these conditions:
- Nobody validated the line.
- AdCrunch cannot write to the channel. The answer names the provider that sells it.
- The line has no ad account.
- The ad account belongs to a different provider.
- The currency of the ad account is different from the plan currency, or AdCrunch does not know that currency yet. To make it known, refresh the provider connection.
- The dates do not resolve to a window.
AdCrunch never converts a currency. A converted budget is a different plan.
When the line is ready, the answer also gives the resolved window, and it tells you whether the budget goes to the provider as a lifetime total or as a daily rate.
/context/campaign-plans/{slug}/line-items/{lineItemId}/readinessAuthorizationBearer token · headerrequiredSend 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.
lineItemIdstringrequiredslugstringrequiredThe verdict, discriminated on status. Every outcome is a 200, ready included: "this cannot run, and here is why" is an answer rather than a failed request.
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.
statusstringrequiredreadyunitstringrequiredtotaldailystatusstringrequiredThe gate. Approving the plan, or validating the line, opens 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_invertedNo credential, or one that does not resolve. Send an API key or a session. 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 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 plan, or no Line Item with that id on it. error is not_found. This is the one readiness outcome that is not a 200, because the question itself has no subject.
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.