Skip to content
API

Get Products In Campaign

GET
/v1/campaign-service/products-in-campaign

This endpoint returns paginated product ids currently in active campaigns.You can filter by vendor_id, fetching only from active campaigns and bids.

Authentication

Topsort’s APIs are authenticated via bearer tokens. Requests must include an authorization header containing your private API key.

Don't have an API key yet? Learn how to generate one.

Authorization
required
string

The header containing a private API key. Format this header as follows:

Authorization: Bearer <YOUR-API-KEY>

Query Parameters

object
vendor_id

The ID of the vendor to get sponsored products.

string

The ID of the vendor to get sponsored products.

next_page

A token provided in a previous response. If not empty, it is used to retrieve the page that follows.

string

A token provided in a previous response. If not empty, it is used to retrieve the page that follows.

limit

The pagination limit.

integer
default: 100 <= 100

The pagination limit.

look_ahead_hours

Include products whose campaigns are scheduled to start within the N next given hours.

integer

Include products whose campaigns are scheduled to start within the N next given hours.

fetch_active_products

Whether to fetch only active products. If false, all products will be fetched even if the campaign or the bid are inactive.

boolean

Whether to fetch only active products. If false, all products will be fetched even if the campaign or the bid are inactive.

Responses

Successful Response

Scrolled response for products in campaign.

application/json
object
hasMore
required

Whether this is the last page of results or not.

boolean
nextPage

A token to retrieve the next page of results.

string
>= 1 characters
productsInCampaign
required

List of sponsored product ids.

Array<string>