Products

Campaign prep: price, stock, COGS, fees and break-even ROAS per SKU

Changed on

Prepares one shop's products for a TikTok platform campaign or flash sale. Per SKU: current price, warehouse stock, cost of goods, TikTok fees, the margin left for ad spend and the break-even ROAS = selling price / (selling price - COGS - fees), where the selling price is the price less discount_pct (rounded to the cent) and fees are fee_rate of it. Read-only: it registers nothing with TikTok.

COGS comes from the shop's stored costs; SKUs without one fall back to this request's cogs rows, then to margin_pct (cogs_source); cogs rows not applied to any SKU are listed in caller_cogs_unused. Fees are measured from the shop's P&L order lines over fee_window_days (TikTok's own total expense per line — referral, affiliate commission, shipping — as a share of net sales, on the SKU or else across its product; ad spend is not included), or taken from fee_rate when given (fees_source). Nothing missing is assumed: break_even_roas is null and status says why — no_price (a multi-variant product whose only current price is its range), no_cogs (no stored, caller or margin COGS), no_fee_data (no usable P&L fee data and no fee_rate) or no_break_even (costs meet or exceed the selling price). missing_inputs lists every missing input, and the skus_with_* counts say how much of skus_scanned each input covers. Single-shop only.

post/product-insights/campaign-prep

Request

  • Base URL
    https://api.reacherapp.com/public/v1
  • URL
    https://api.reacherapp.com/public/v1/product-insights/campaign-prep
  • Auth
    API key in header x-api-key and API key in header x-shop-id

Request body

product_idsstring[] nullable

Restrict to these TikTok product ids; every listed product when omitted.

discount_pctnumber

The campaign discount being considered, in percent of the current price (0-90). The discounted price is rounded half-up to the cent.

fee_ratenumber nullable

Override the observed fee rate: TikTok fees as a fraction of the selling price (e.g. 0.18). When omitted, the rate is measured from the shop's P&L order lines over fee_window_days; a SKU whose product has no P&L lines then gets no break-even.

fee_window_daysinteger

Trailing days of P&L order lines the fee rate is measured over, ending yesterday.

margin_pctnumber nullable

Shop-wide gross margin in percent of the pre-discount price, used as COGS = price x (1 - margin_pct/100) for SKUs with neither a stored nor a cogs row.

pageinteger

1-based page over the SKUs.

page_sizeinteger

SKUs per page.

Response

Successful Response

shop_idinteger required
discount_pctnumber required
cogs_as_ofstring required

The date COGS was resolved for (YYYY-MM-DD).

fee_window_startstring nullable
fee_window_endstring nullable
currency_mismatched_costsinteger required

The shop's stored COGS rows skipped because their currency differs from the catalog's; they are never converted.

skus_scannedinteger required
skus_with_priceinteger required
skus_with_cogsinteger required
skus_with_feesinteger required
skus_with_break_eveninteger required

Changes