Line Items

Record what a Line Item spawned

Records one provider object that this Line Item created. The caller that created the object writes this record, because only that caller knows which line the object belongs to.

A record is a fact, not an attempt. AdCrunch keeps the attempts in the mutation ledger.

This call refuses almost nothing. The provider object already exists, and a refusal would leave it live and untracked. A draft line records, an edited line records, and a line on a channel AdCrunch cannot write to records. The state of the line does not change, and neither does the state of the Campaign Plan.

The same object recorded again answers 200 with the existing row, and not 201. The same object is the same provider, the same level and the same native id, on the same line.

AdCrunch never removes a record. It can tell you how many objects a line created. It cannot tell you how many objects a line must create, because a Campaign Plan never declares that number.

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

Request

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

Path parameters

lineItemIdstring required
slugstring required

Request body

advertiser_idstring required

The ad account the object was created in.

entity_idstring required

The native provider id, unprefixed — exactly as the Insight entities table holds it, which is what makes the two joinable.

entity_typestring required

The provider’s own word for the level: campaign, adset, ad. Free text, because the vocabulary is the provider’s.

mutation_workflow_idstring

The mutation that performed the write, when known — links this fact to the attempt without either duplicating the other.

Example request

{
  "advertiser_id": "acc_1203456789012345",
  "entity_id": "23861234567890123",
  "entity_type": "campaign",
  "mutation_workflow_id": "b3d1f0c4-6a2e-4a1f-9f77-2c0d1e5a8b94",
  "provider": "meta"
}

Response

This object was already recorded against this line. The existing row comes back unchanged, so the call is idempotent — recording twice does not inflate what the line has spawned.

advertiserIdstring required
createdAtnumber required

Milliseconds since the Unix epoch, UTC.

entityIdstring required

The provider’s own id, unprefixed, so it joins to entities.

entityTypestring required

The provider’s word for the level — campaign, adset, ad.

idstring required
mutationWorkflowIdstring nullable required

The durable execution that performed the write, when known.

providerstring required

Example response

{
  "advertiserId": "acc_1203456789012345",
  "createdAt": 1772409600000,
  "entityId": "120210000000000",
  "entityType": "campaign",
  "id": "exe_7a4c12",
  "mutationWorkflowId": "b3d1f0c4-6a2e-4a1f-9f77-2c0d1e5a8b94",
  "provider": "meta"
}

Changes

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