Line Items

Validate a Line Item

Validates one Line Item. Use this call when you want to validate one row, and not to approve the whole plan.

Validation is the gate for execution. It changes nothing on any provider. To execute the line, you also need the mutation:write permission.

This call checks nothing about the content of the line. An incomplete line validates, and execution makes its own checks. Read the readiness of the line to see them.

A call on a line that is already validated succeeds and changes nothing. The Campaign Plan does not move: one validated line does not approve the Campaign Plan.

post/context/campaign-plans/{slug}/line-items/{lineItemId}/validate

Request

  • Base URL: https://api.adcrunch.dev
  • URL: https://api.adcrunch.dev/context/campaign-plans/{slug}/line-items/{lineItemId}/validate
  • Auth: HTTP bearer

Path parameters

lineItemIdstring required
slugstring required

Request body

base_revisioninteger required

The revision last read via GET. This is what makes it a validation of the content that was read.

Example request

{
  "base_revision": 1
}

Response

The Line Item, now validated. Validating an already-validated line is a no-op rather than an error, and the revision stays where it was. executions lists what the line created, the same as a read of its Campaign Plan.

advertiserIdstring nullable required
ageMaxnumber nullable required
ageMinnumber nullable required

Each bound is independently optional, so "35+" is expressible.

budgetnumber nullable required

Whole units of the plan’s currency.

campaignPlanIdstring required
channel'meta' | 'tiktok' | 'snapchat' | 'google_search' | 'google_pmax' | 'google_display' | 'youtube' | 'programmatic_display' | 'linkedin' | 'x' required

The planner’s word for what is being bought, not a provider name. A plan may name a channel we cannot execute.

countriesstring[] required
createdAtnumber required

Milliseconds since the Unix epoch, UTC.

createdBystring required
effectiveEndDatestring nullable required

The line’s own bound where it has one, else the plan’s.

effectiveStartDatestring nullable required

A calendar date, YYYY-MM-DD.

endDatestring nullable required

A calendar date, YYYY-MM-DD.

executableboolean required

Whether this channel could be executed at all today. Derived from our capabilities, never a promise that it will be.

gender'all' | 'men' | 'women' nullable required
idstring required
objective'awareness' | 'engagement' | 'leads' | 'sales' | 'traffic' | 'app_promotion' required
personaIdstring nullable required

Explains the targeting; never supplies its values.

providerstring nullable required

Who sells this channel, or null when nobody we integrate with does.

revisionnumber required

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

startDatestring nullable required

A calendar date, YYYY-MM-DD.

status'draft' | 'validated' required

validated is the gate on execution.

unit'total' | 'daily' required

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

updatedAtnumber nullable required

Milliseconds since the Unix epoch, UTC.

Example response

{
  "advertiserId": "acc_1203456789012345",
  "ageMax": 44,
  "ageMin": 25,
  "budget": 2500,
  "campaignPlanId": "cpl_4e1a08",
  "channel": "meta",
  "countries": [
    "FR",
    "BE"
  ],
  "createdAt": 1768435200000,
  "createdBy": "usr_5d2b71",
  "effectiveEndDate": "2026-05-31",
  "effectiveStartDate": "2026-03-01",
  "endDate": null,
  "executable": true,
  "executions": [],
  "gender": "all",
  "id": "lni_2d9e77",
  "objective": "sales",
  "personaId": "psn_8c4a20",
  "provider": "meta",
  "revision": 2,
  "startDate": null,
  "status": "validated",
  "unit": "total",
  "updatedAt": 1769040000000
}

Changes

No recorded changes to this operation across all 1 revision of this API.