Passer au contenu principal
GET
/
public
/
v1
/
campaign-service
/
sponsored-products
Get Sponsored Products
curl --request GET \
  --url https://api.topsort.com/public/v1/campaign-service/sponsored-products \
  --header 'Authorization: Bearer <token>'
{
  "hasMore": true,
  "sponsoredProducts": [
    "<string>"
  ],
  "next": {
    "offset": 123,
    "limit": 123
  }
}

Autorisations

Authorization
string
header
requis

A valid API key generated in Topsort's UI.

Paramètres de requête

vendor_id
string
requis

The ID of the vendor to get sponsored products.

offset
integer
défaut:0

The pagination offset.

Plage requise: x >= 0
limit
integer
défaut:100

The pagination limit.

Plage requise: 0 <= x <= 100
fetch_active_products
boolean
défaut:false

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

Réponse

Successful Response

Paginated response for sponsored products in a vendor.

hasMore
boolean
requis

Whether this is the last page of results or not.

sponsoredProducts
string[]
requis

List of sponsored product ids.

next
Next · object

The parameters that should be used to fetch the next page.