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

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.

This call reads. It changes nothing, and it calls no provider. It answers for every channel, including a channel AdCrunch cannot write to.

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, or null when nobody we integrate with sells it.
  • The line 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 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.

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.

GET/context/campaign-plans/{slug}/line-items/{lineItemId}/readiness
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
lineItemIdstringrequired
matches ^lni_[\s\S]{0,}$
slugstringrequired
Responses
200

The 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. The example shows ready; the schema lists the nine refusals and what each one carries.

One of:
object
advertiserIdstringrequired
budgetnumber | nullrequired
currencystringrequired

The plan’s currency, confirmed equal to the account’s.

endDatestring | nullrequired

A calendar date, YYYY-MM-DD.

providerstringrequired
startDatestring | nullrequired

A calendar date, YYYY-MM-DD.

statusstringrequired
Allowed:ready
unitstringrequired
Allowed:totaldaily
object
statusstringrequired

The gate. Approving the plan, or validating the line, opens it.

Allowed:not_validated
object
channelstringrequired
Allowed:metatiktoksnapchatgoogle_searchgoogle_pmaxgoogle_displayyoutubeprogrammatic_displaylinkedinx
providerstring | nullrequired

Who sells it, when someone does but we cannot write there yet.

statusstringrequired
Allowed:channel_not_executable
object
statusstringrequired
Allowed:no_advertiser
object
statusstringrequired
Allowed:advertiser_not_owned
object
actualstringrequired
expectedstringrequired
statusstringrequired
Allowed:provider_mismatch
object
advertiserIdstringrequired
statusstringrequired

Refresh the provider connection.

Allowed:account_currency_unknown
object
accountCurrencystringrequired
planCurrencystringrequired
statusstringrequired

Never converted. A converted budget is a different plan, and the planner allocated what they allocated.

Allowed:currency_mismatch
object
statusstringrequired
Allowed:no_window
object
endDatestringrequired

A calendar date, YYYY-MM-DD.

startDatestringrequired

A calendar date, YYYY-MM-DD.

statusstringrequired
Allowed:window_inverted
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.

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 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.

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-701.adcrunch.dev/context/campaign-plans/string/line-items/string/readiness" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "advertiserId": "acc_1203456789012345",
  "budget": 2500,
  "currency": "EUR",
  "endDate": "2026-05-31",
  "provider": "meta",
  "startDate": "2026-03-01",
  "status": "ready",
  "unit": "total"
}