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.
/context/campaign-plans/{slug}/line-items/{lineItemId}/deliveryAuthorizationBearer token · headerrequiredSend 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.
lineItemIdstringrequiredslugstringrequiredThe spend of the Line Item day by day, and what each object spent.
asOfstring | nullrequiredThe most recent day that the sums include.
budgetnumber | nullrequiredcurrencystringrequiredThe currency of the Campaign Plan.
daysobject[]requiredOne entry for each day from since to until. Empty before the start.
Show propertiesHide properties
objectcumulativeSpendnumber | nullrequiredThe spend from the first day to this day. null from the first day whose spend is not known.
datestringrequiredA calendar date, YYYY-MM-DD.
expectedSpendnumber | nullrequiredThe 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 | nullrequiredThe 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 | nullrequiredThe sums of the counted objects. Each metric comes from the sums, never from a mean of the days. null unless status is delivered.
Show propertiesHide properties
clicksnumberrequiredcomparablebooleanrequiredWhether the money is in the currency of the Campaign Plan. false when an object spent in another currency.
conversionValuenumber | nullrequiredThe sum of the conversion value, in whole units of the Campaign Plan currency. null when comparable is false: AdCrunch never converts a currency.
conversionsnumberrequiredcpanumber | nullrequiredspend / conversions, from the sums, in whole units of the Campaign Plan currency. null when comparable is false: AdCrunch never converts a currency.
cpcnumber | nullrequiredspend / clicks, from the sums, in whole units of the Campaign Plan currency. null when comparable is false: AdCrunch never converts a currency.
cpmnumber | nullrequiredspend × 1000 / impressions, from the sums, in whole units of the Campaign Plan currency. null when comparable is false: AdCrunch never converts a currency.
currenciesstring[]requiredThe account currencies of the counted objects. null is a currency that AdCrunch does not know.
impressionsnumberrequiredroasnumber | nullrequiredconversionValue / spend, from the sums, with two decimals. It needs one account currency, not the currency of the Campaign Plan.
spendnumber | nullrequiredThe sum of the spend, in whole units of the Campaign Plan currency. null when comparable is false: AdCrunch never converts a currency.
lineItemIdstringrequiredobjectsobject[]requiredEach recorded object, in the order of its record.
Show propertiesHide properties
objectcountedboolean | nullrequiredWhether 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.
entityIdstringrequiredThe native provider id.
entityTypestringrequiredproviderstringrequiredstatestringrequiredno_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.
deliveredno_data_yetadvertiser_not_ownedsumsobject | nullrequiredThe sums of the counted objects. Each metric comes from the sums, never from a mean of the days. null unless status is delivered.
Show propertiesHide properties
clicksnumberrequiredcomparablebooleanrequiredWhether the money is in the currency of the Campaign Plan. false when an object spent in another currency.
conversionValuenumber | nullrequiredThe sum of the conversion value, in whole units of the Campaign Plan currency. null when comparable is false: AdCrunch never converts a currency.
conversionsnumberrequiredcpanumber | nullrequiredspend / conversions, from the sums, in whole units of the Campaign Plan currency. null when comparable is false: AdCrunch never converts a currency.
cpcnumber | nullrequiredspend / clicks, from the sums, in whole units of the Campaign Plan currency. null when comparable is false: AdCrunch never converts a currency.
cpmnumber | nullrequiredspend × 1000 / impressions, from the sums, in whole units of the Campaign Plan currency. null when comparable is false: AdCrunch never converts a currency.
currenciesstring[]requiredThe account currencies of the counted objects. null is a currency that AdCrunch does not know.
impressionsnumberrequiredroasnumber | nullrequiredconversionValue / spend, from the sums, with two decimals. It needs one account currency, not the currency of the Campaign Plan.
spendnumber | nullrequiredThe sum of the spend, in whole units of the Campaign Plan currency. null when comparable is false: AdCrunch never converts a currency.
sincestring | nullrequiredThe first day of the series: the start that applies.
statusstringrequirednothing_recordedno_data_yetdeliveredunitstringrequiredtotaldailyuntilstringrequiredThe last day: today, or the end that applies when it is in the past.
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[]requiredOne entry for each field that does not match.
Show propertiesHide properties
objectinstringrequiredThe part of the request that holds the field.
bodycookieheadersparamsquerymessagestringrequiredA sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.
pathstringrequiredA JSON Pointer into that part of the request, such as /filename. An empty string is the whole part.
errorstringrequiredA stable code for the failure. This is the field to branch on. It does not change for a given failure.
invalid_requestmessagestringrequiredA 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 API key, or one that does not resolve. 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 organization has no active subscription. An owner subscribes at paywallUrl. error is organization_unentitled.
paywallUrlstring<uri>requiredThe page where an owner of the organization subscribes. Show it to the person.
errorstringrequiredA stable code for the failure. This is the field to branch on. It does not change for a given failure.
organization_unentitledmessagestringrequiredA 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 and observe: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 Campaign Plan, or no Line Item with that id on it. error is not_found.
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.