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

Get the delivery series of a Line Item

Reads the spend of a Line Item day by day, and what each object that it recorded spent. AdCrunch calculates the answer on each read, and it stores nothing.

days has one entry for each day from the start that applies to today, or to the end that applies when it is in the past. Each day gives the spend of the counted objects, the cumulative spend, and the cumulative spend that the budget expects. A day after asOf has no spend yet: it is null, not 0. A Meta day with no row before asOf spent nothing, so it is 0.

objects gives each recorded object with its own sums. An object with a recorded ancestor is not counted again, because the ancestor holds its spend. AdCrunch never converts a currency, and it reads nothing of an ad account that the organization no longer owns.

GET/context/campaign-plans/{slug}/line-items/{lineItemId}/delivery
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 spend of the Line Item day by day, and what each object spent.

asOfstring | nullrequired

The most recent day that the sums include.

budgetnumber | nullrequired
currencystringrequired

The currency of the Campaign Plan.

daysobject[]required

One entry for each day from since to until. Empty before the start.

Show properties
Array of object
cumulativeSpendnumber | nullrequired

The spend from the first day to this day. null from the first day whose spend is not known.

datestringrequired

A calendar date, YYYY-MM-DD.

expectedSpendnumber | nullrequired

The spend that the budget expects by this day, in whole units of the Campaign Plan currency. null with no budget, or with no start that applies.

spendnumber | nullrequired

The spend of the counted objects that day, in whole units of the Campaign Plan currency. null when it is not known: after asOf, on a day with no row of a provider other than Meta, or when the money is not comparable. A Meta day with no row before asOf spent nothing, so it is 0.

deliveredobject | nullrequired

The sums of the counted objects. Each metric comes from the sums, never from a mean of the days. null unless status is delivered.

Show properties
clicksnumberrequired
comparablebooleanrequired

Whether the money is in the currency of the Campaign Plan. false when an object spent in another currency.

conversionValuenumber | nullrequired

The sum of the conversion value, in whole units of the Campaign Plan currency. null when comparable is false: AdCrunch never converts a currency.

conversionsnumberrequired
cpanumber | nullrequired

spend / conversions, from the sums, in whole units of the Campaign Plan currency. null when comparable is false: AdCrunch never converts a currency.

cpcnumber | nullrequired

spend / clicks, from the sums, in whole units of the Campaign Plan currency. null when comparable is false: AdCrunch never converts a currency.

cpmnumber | nullrequired

spend × 1000 / impressions, from the sums, in whole units of the Campaign Plan currency. null when comparable is false: AdCrunch never converts a currency.

currenciesstring[]required

The account currencies of the counted objects. null is a currency that AdCrunch does not know.

impressionsnumberrequired
roasnumber | nullrequired

conversionValue / spend, from the sums, with two decimals. It needs one account currency, not the currency of the Campaign Plan.

spendnumber | nullrequired

The sum of the spend, in whole units of the Campaign Plan currency. null when comparable is false: AdCrunch never converts a currency.

lineItemIdstringrequired
objectsobject[]required

Each recorded object, in the order of its record.

Show properties
Array of object
countedboolean | nullrequired

Whether the sums of the Line Item count the object. false for an object with a recorded ancestor, which holds its spend. null when the object has no data.

entityIdstringrequired

The native provider id.

entityTypestringrequired
providerstringrequired
statestringrequired

no_data_yet is not a spend of 0. advertiser_not_owned: the organization no longer owns the ad account, and AdCrunch reads nothing of it.

Allowed:deliveredno_data_yetadvertiser_not_owned
sumsobject | nullrequired

The sums of the counted objects. Each metric comes from the sums, never from a mean of the days. null unless status is delivered.

Show properties
clicksnumberrequired
comparablebooleanrequired

Whether the money is in the currency of the Campaign Plan. false when an object spent in another currency.

conversionValuenumber | nullrequired

The sum of the conversion value, in whole units of the Campaign Plan currency. null when comparable is false: AdCrunch never converts a currency.

conversionsnumberrequired
cpanumber | nullrequired

spend / conversions, from the sums, in whole units of the Campaign Plan currency. null when comparable is false: AdCrunch never converts a currency.

cpcnumber | nullrequired

spend / clicks, from the sums, in whole units of the Campaign Plan currency. null when comparable is false: AdCrunch never converts a currency.

cpmnumber | nullrequired

spend × 1000 / impressions, from the sums, in whole units of the Campaign Plan currency. null when comparable is false: AdCrunch never converts a currency.

currenciesstring[]required

The account currencies of the counted objects. null is a currency that AdCrunch does not know.

impressionsnumberrequired
roasnumber | nullrequired

conversionValue / spend, from the sums, with two decimals. It needs one account currency, not the currency of the Campaign Plan.

spendnumber | nullrequired

The sum of the spend, in whole units of the Campaign Plan currency. null when comparable is false: AdCrunch never converts a currency.

sincestring | nullrequired

The first day of the series: the start that applies.

statusstringrequired
Allowed:nothing_recordedno_data_yetdelivered
unitstringrequired
Allowed:totaldaily
untilstringrequired

The last day: today, or the end that applies when it is in the past.

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.

402

The organization has no active subscription. An owner subscribes at paywallUrl. error is organization_unentitled.

paywallUrlstring<uri>required

The page where an owner of the organization subscribes. Show it to the person.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:organization_unentitled
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 and observe: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 Campaign Plan, or no Line Item with that id on it. error is not_found.

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.adcrunch.dev/context/campaign-plans/string/line-items/string/delivery' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "asOf": "2026-03-02",
  "budget": 3100,
  "currency": "EUR",
  "days": [
    {
      "cumulativeSpend": 80,
      "date": "2026-03-01",
      "expectedSpend": 100,
      "spend": 80
    },
    {
      "cumulativeSpend": 200,
      "date": "2026-03-02",
      "expectedSpend": 200,
      "spend": 120
    },
    {
      "cumulativeSpend": null,
      "date": "2026-03-03",
      "expectedSpend": 300,
      "spend": null
    }
  ],
  "delivered": {
    "clicks": 200,
    "comparable": true,
    "conversionValue": 600,
    "conversions": 8,
    "cpa": 25,
    "cpc": 1,
    "cpm": 10,
    "currencies": [
      "EUR"
    ],
    "impressions": 20000,
    "roas": 3,
    "spend": 200
  },
  "lineItemId": "lni_2d9e77",
  "objects": [
    {
      "entityId": "120210000000000",
      "entityType": "campaign",
      "provider": "meta",
      "counted": true,
      "state": "delivered",
      "sums": {
        "clicks": 200,
        "comparable": true,
        "conversionValue": 600,
        "conversions": 8,
        "cpa": 25,
        "cpc": 1,
        "cpm": 10,
        "currencies": [
          "EUR"
        ],
        "impressions": 20000,
        "roas": 3,
        "spend": 200
      }
    }
  ],
  "since": "2026-03-01",
  "status": "delivered",
  "unit": "total",
  "until": "2026-03-03"
}