Connections
List Ad Platform Connections
Returns one entry per supported ad platform (amazon_ads, ebay, google_ads, walmart_connect, meta_ads, tiktok_ads), whether or not the tenant has connected it, with the platform's access level, whether a connector is available, the overall connection `state`, account counts and every connection (integration instance) the tenant has for it.
Get Ad Platform Authorization URL
Starts connecting an ad platform and returns the URL to send the user to. For OAuth platforms this is the platform's consent page; after the user approves, the platform redirects back to SKU.io, which stores the tokens and discovers the ad accounts (they arrive unselected; select them with Update Ad Account).
Get Meta Ads Authorization URL
Returns the Facebook Login consent URL that connects (or re-authorizes) a Meta Ads connection. After the user approves, Meta redirects back to SKU.io, which stores the token and discovers the Meta ad accounts. The pending sign-in expires if not completed in time; start again to get a fresh URL. Equivalent to Get Ad Platform Authorization URL with `platform=meta_ads`, except that this endpoint does not check whether Meta has approved SKU.io's API access yet.
Get TikTok Ads Authorization URL
Returns the TikTok API for Business consent URL that connects (or re-authorizes) a TikTok Ads connection. After the user approves, TikTok redirects back to SKU.io with an auth code, and SKU.io stores the token and discovers the advertiser accounts. Equivalent to Get Ad Platform Authorization URL with `platform=tiktok_ads`, except that this endpoint does not check whether TikTok has approved SKU.io's API access yet.
Connect Walmart Connect
Connects Walmart Connect (Walmart's sponsored-products platform). Walmart Connect has no OAuth sign-in: the advertiser first adds SKU.io as an API partner in Walmart Ad Center, then this call creates the connection and claims the advertiser ids it names. Walmart lists the advertisers that granted SKU.io access only through an asynchronous snapshot, so the call answers at once with `discovery_status: pending` and the id of the background job (`discovery_tracked_job_log_id`) that asks Walmart which of those advertisers granted access and creates an ad account for each (unselected; select them with Update Ad Account). List the connection's ad accounts once that job completes; each account's `access_level` is the access Walmart granted (`full` needs Campaign Manager with Edit permission, otherwise `reporting_only`). If none of the named advertisers has granted SKU.io access, the job fails and a new connection is removed. Re-running it for an advertiser that already has an account updates that account.
Disconnect Ad Platform Connection
Disconnects an ad platform connection. Every ad account on it is deselected, set to `disabled` and has its automation mode switched to `off`, and automatic syncing is turned off for the connection. Historical performance, change history and cost entries are kept. Returns the number of accounts disabled.
List Ad Accounts
Lists the ad accounts discovered on every connection, ordered by platform then name.
Get Ad Account
Returns one ad account. Also returns `merge_candidate_ids`: other ad accounts for the same platform account id on a different connection (typically left behind after reconnecting with a new connection), which can be folded into this one with Merge Ad Accounts.
Update Ad Account
Selects or deselects an ad account, maps it to a sales channel, and sets its automation mode and cost options. Every field is optional; only the fields sent are changed.
Sync Ad Account
Queues an immediate sync of the account's structure (campaigns, ad groups, targets, items) and recent performance. Runs in the background; the response carries `structure_tracked_job_log_id` and `performance_tracked_job_log_id` to follow progress (either may be null when that sync is turned off for the connection).
Merge Ad Accounts
Folds an older copy of the same platform account (`from_ad_account_id`, usually from a connection that was replaced by reconnecting) into this account's connection, so performance history, holds and change sets carry over. The older record is kept and moved onto this account's connection, the record at `:adAccount` is deleted, and the result is `active` and selected if either was selected. Find candidates in `merge_candidate_ids` from Get Ad Account.
List Unmapped Ad Items
Lists advertised items (ASINs, listings, offers) on selected ad accounts that SKU.io could not match to a product and that had spend in the last 30 days, highest spend first by default. Their spend cannot be attributed to a product until mapped with Map Ad Item to Product.
Map Ad Item to Product
Maps an advertised item to a SKU.io product. The manual mapping takes precedence over automatic matching on every later sync, and the item's past spend and sales are restated onto the product in the background.