Create or update a line item
18 min
use case for this api create or update a line item in cadent ad manager api endpoint curl location 'https //api cadent app/dsp/v1/lineitem/save' \\ \ header 'x api key insert api key here' \\ \ header 'content type application/json' \\ \ data '{ "adchannelid" 2, "budget" 200000, "campaignid" 1007222, "cpm" null, "dailygoalimpressions" 0, "dailygoalspend" 0, "flightpacingid" 2, "flightpacingtypeid" 1, "flights" \[ { "enddate" "2025 06 30t00 00 00 000z", "id" 0, "impressioncap" 450, "impressiongoal" null, "name" "flight 1", "spendcap" 98360 66, "startdate" "2025 06 01t00 00 00 000z" }, { "enddate" "2025 07 31t00 00 00 000z", "id" 0, "impressioncap" null, "impressiongoal" null, "name" "flight 2", "spendcap" 101639 34, "startdate" "2025 07 01t00 00 00 000z" } ], "frequencycappingenabled" true, "frequencytimingid" 3, "frequencytypeid" 1, "pacingtowardsid" 1, "id" 0, "impressioncapmultiplier" null, "impressionlimit" 12, "name" "line item api test", "status" 1, "totalimpressiongoal" null }'{ "status" { "code" 200, "message" "success", "errorarray" null, "haserror" false }, "data" { "campaignid" 1007222, "frequencycappingenabled" true, "impressionlimit" 12, "adchannelid" 2, "frequencytypeid" 1, "frequencytimingid" 3, "pacingtowardsid" 1, "flightpacingid" 2, "flightpacingtypeid" 1, "budget" 200000 000000, "cpm" null, "totalimpressiongoal" null, "impressioncapmultiplier" null, "aheadpercent" 115, "dailygoalimpressions" 0, "dailygoalspend" 0 000000, "marginamount" null, "status" 1, "flights" \[ { "lineitemid" 1000013176, "startdate" "2025 06 01t00 00 00", "enddate" "2025 06 30t00 00 00", "impressiongoal" null, "impressioncap" 450 000000, "spendcap" 98360 660000, "id" 17739, "name" "" }, { "lineitemid" 1000013176, "startdate" "2025 07 01t00 00 00", "enddate" "2025 07 31t00 00 00", "impressiongoal" null, "impressioncap" null, "spendcap" 101639 340000, "id" 17740, "name" "" } ], "id" 1000013176, "name" "line item api test" "status" 1 } } parameters adchannelid integer, required the channel that the line item's ad groups will use 1 = display 2 = video 3 = ctv 4 = native 5 = audio 6 = dooh aheadpercent integer, required if flightpacingtypeid = 1 (automatic) and flightpacingid = 2 (ahead) multiplier percentage for pacing ahead on flights 1 250 = percentage range 115 (default) required if flightpacingtypeid = 1 (automatic) and flightpacingid = 2 (ahead) budget integer, required the line item's budget 1 99999 = quantity in campaign's transactcurrencyid campaignid integer, required id of the parent campaign cpm integer, required if pacingtowardsid = 2 (impressions) cost per mille for the line item's impressions dailygoalimpressions integer, required daily target for the line item's impression count required if flightpacingtypeid = 2 (manual) and pacingtowardsid = 2 (impressions) dailygoalspend integer, required if flightpacingtypeid = 2 (manual) and pacingtowardsid = 1 (spend) daily target for the line item's budget flightpacingid integer, required type of pacing for the line item 1 = even 2 = ahead (default) flightpacingtypeid integer, required how line item pacing is calculated 1 = automatic (default) 2 = manual flights array of flight objects \<font color="#3366ae">,\</font> required time intervals and budgets for the line item frequencycap integer, required if frequencycappingenabled = true number of impressions used for frequency capping frequencycappingenabled boolean determines whether or not a campaign has frequency capping true = enables frequency capping false = frequency capping is not enabled (default) frequencytimingid integer, required if frequencycappingenabled = true time unit used for frequency capping 1 = hour (default) 2 = day 3 = week 4 = month 5 = lifetime frequencytypeid \<font color="#808080b5"> \</font> integer, required if frequencycappingenabled = true type of id used for frequency capping 1 = adtheorent id (default) 2 = ip address 3 = property 4 = cookie id 5 = maid id \<font color="#808080b5"> \</font> integer, required id of line item 0 = creating a new line item impressioncapmultiplier \<font color="#880000"> \</font> integer, required pacingtowardsid = 2 (impressions) multiplier (as a percentage) of the impression pacing goal impressionlimit integer, required if frequencycappingenabled = true maximum number of impressions per the selected frequencytimingid period name \<font color="#808080b5"> \</font> string, required line item name maximum of 128 characters only a z , 0 9 , characters allowed isn't required to be unique pacingtowardsid \<font color="#808080b5"> \</font> integer, required determines whether line item pacing is for spend or impressions 1 = spend 2 = impressions status integer, required determines whether the ad group is active or disabled 1 = active 2 = disabled totalimpressiongoal integer, required \<font color="#880000">\</font> pacingtowardsid = 2 (impressions) line item impression goal across all flights flight object enddate \<font color="#808080b5"> \</font> date, required date and time (gmt) the flight ends impressioncap integer, required if pacing towards id = 2 (impressions) flight's upper limit for impressions impressiongoal integer, required if pacing towards id = 2 (impressions) flight's target number of impressions id integer, required id of line item 0 = creating a new line item spendcap integer, required if pacing towards id = 1 (spend) flight's upper limit for budget startdate \<font color="#808080b5"> \</font> date, required date and time (gmt) the flight starts


