List Ad Campaign Items
GET/ads/campaigns/:campaignId/items
Page through the products a campaign advertises with their window figures and the spend risks that flag wasted spend: low rating, few reviews, a lost Buy Box or low stock.
On a cursor page, pagination.total and totalPages are the counts the first page reported: the total is counted only on the first page, where it is cheap to wait for. The ranking is computed per request, so a cursor resumes after the last row it held by that row's sort values; a row whose figures change while you walk can move across the cursor. With groupBy=parent the read pages by page number only: pagination.nextCursor is null and a cursor is refused.
An item can cover several listings: a Trendyol item keyed on a content id covers every size of one colour that shares it. variantSkus lists what it advertises, itemName is the name they share, and its rating, Buy Box and days of stock read across them: the lowest rating with the rating counts summed, the lowest days of stock, and Losing when any of them loses the Buy Box. Its money is the content's own.
With groupBy=parent the page is made of groups: the items whose products share a parent (one design sold in several sizes or colours) are one group, and every other item is a group of its own. limit and pagination.total count groups; itemCount and atRiskCount count items. A group is on the page when any of its items passes search and atRiskOnly, and its parent's figures sum all its items. Groups sort by the parent's summed spend or attributedSales, or the ROAS of those sums, with nulls last and the lowest product id breaking ties; items inside a group keep the item sort. items holds the page's items, contiguous per group, and parents carries each parent's sums. Each item keeps its own spend risks.
Requires ads.read.
Request and response fields at a glance
- Path parameters:
campaignId(integer, required). - Query parameters:
startDate(string),endDate(string),search(string),atRiskOnly(boolean),sort(string),dir(string),page(integer),limit(integer),groupBy(string). - 200 response (application/json):
items(array, required),parents(array),pagination(object, required),currency(string, required),itemCount(integer, required),atRiskCount(integer, required),spendRiskLines(object, required).