Skip to main content
GET
/
public
/
v1
/
campaign-service
/
campaigns
Get Campaigns
curl --request GET \
  --url https://api.topsort.com/public/v1/campaign-service/campaigns \
  --header 'Authorization: Bearer <token>'
{
  "hasMore": true,
  "campaigns": [
    {
      "campaignId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "marketplaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "startDate": "2023-11-07T05:31:56Z",
      "endDate": "2023-11-07T05:31:56Z",
      "isActive": true,
      "isSmart": true,
      "campaignType": "manual",
      "status": "approved",
      "createdAt": "2023-11-07T05:31:56Z",
      "chargeType": "CPM",
      "externalVendorId": "<string>",
      "adFormat": "listing",
      "isAutoTrigger": true,
      "vendorId": "<string>",
      "walletId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "bidCount": 123,
      "budget": {
        "amount": 123,
        "amountRemaining": 123,
        "amountCarryover": 123,
        "amountUsed": 123,
        "type": "daily"
      },
      "statusUpdatedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "campaignBehaviorData": "<string>",
      "campaignBehaviorDataByDay": "<string>",
      "exclusivityPrice": 123,
      "targetRoas": 123,
      "externalCampaignId": "<string>",
      "autobiddingObjective": "impressions",
      "promotionType": {
        "bannerAssets": [
          {
            "dimensions": {
              "width": 123,
              "height": 123
            },
            "url": "<string>",
            "contentType": "image/png",
            "size": 123,
            "assetId": "asset_01j713j64yfsvtj4bs3ccpy5ca",
            "content": {},
            "jsonTemplateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
          }
        ],
        "slotId": "<string>",
        "adFormat": "<string>",
        "deviceType": "desktop"
      }
    }
  ],
  "next": {
    "offset": 123,
    "limit": 123
  }
}

Authorizations

Authorization
string
header
required

A valid API key generated in Topsort's UI. Use the TSE API key if calling auctions or events API, otherwise use the TSC API key.

Query Parameters

vendor_id
string | null

The ID of the vendor. Omit to get campaigns for all vendors.

Minimum string length: 1
status
enum<string> | null

Filter by the approval status of banner campaigns.

Available options:
approved,
pending,
rejected
offset
integer
default:0

The pagination offset.

Required range: x >= 0
limit
integer
default:100

The pagination limit.

Required range: 0 <= x <= 100
is_active
boolean | null

Filter by active/inactive campaigns. When start_date or end_date is provided, this reflects the activation flag only, not whether the campaign is currently live.

external_campaign_id
string | null

Filter by external campaign ID.

slot_id
string | null

The ID of the slot. Used to filter banner and sponsored brand campaigns by slot.

ad_format
enum<string> | null

Filter by ad format.

Available options:
listing,
banner
sort_by_date
enum<string> | null
deprecated

Optional sort by date of campaign creation. Deprecated. Use order_by instead.

Available options:
asc,
desc
order_by
string | null

Comma-separated order by clauses, e.g. 'created_at:asc,name:desc'. Supported dimensions: created_at, start_date, end_date, name, campaign_id.

start_date
string<date-time> | null

Filter campaigns that are active on or after this date (campaigns whose end date is on or after this value).

end_date
string<date-time> | null

Filter campaigns that are active on or before this date (campaigns whose start date is on or before this value).

Response

Successful Response

The campaigns response.

hasMore
boolean
required

Whether this is the last page of results or not.

campaigns
PublicCampaign · object[]
required

An array of campaigns.

next
Next · object

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