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,
  "next": {
    "offset": 123,
    "limit": 123
  },
  "campaigns": [
    {
      "campaignId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "marketplaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "Bola-Bola Ad campaign",
      "budget": {
        "amount": 1000,
        "amountRemaining": 123,
        "amountCarryover": 123,
        "amountUsed": 123,
        "type": "daily"
      },
      "startDate": "2023-11-07T05:31:56Z",
      "endDate": "2023-11-07T05:31:56Z",
      "isActive": true,
      "isSmart": true,
      "campaignType": "manual",
      "status": "approved",
      "statusUpdatedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "campaignBehaviorData": "<string>",
      "campaignBehaviorDataByDay": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "chargeType": "CPM",
      "exclusivityPrice": 123,
      "targetRoas": 123,
      "externalCampaignId": "<string>",
      "externalVendorId": "<string>",
      "adFormat": "listing",
      "isAutoTrigger": true,
      "autobiddingObjective": "impressions",
      "vendorId": "<string>",
      "walletId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "multiplierConfig": {
        "isActive": true,
        "multipliers": [
          {
            "type": "<string>",
            "segmentId": 123,
            "multiplier": 2
          }
        ]
      },
      "targetingFilters": {
        "isActive": true,
        "targetingFilters": [
          {
            "type": "<string>",
            "segmentId": 123
          }
        ]
      },
      "exclusionFilters": {
        "isActive": true,
        "exclusionFilters": [
          {
            "type": "<string>",
            "segmentId": 123
          }
        ]
      },
      "promotionType": {
        "bannerAssets": [
          {
            "url": "<string>",
            "contentType": "image/png",
            "dimensions": {
              "width": 1920,
              "height": 1080
            },
            "size": 123,
            "assetId": "asset_01j713j64yfsvtj4bs3ccpy5ca",
            "content": {},
            "jsonTemplateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
          }
        ],
        "slotId": "<string>",
        "deviceType": "desktop",
        "adFormat": "<string>"
      },
      "bidCount": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

A valid API key generated in Topsort's UI.

Query Parameters

vendor_id
string | null

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

Minimum length: 1
status
enum<string> | null

Filter by the approval status of banner campaigns. Represents the review status of a banner campaign.

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.

external_campaign_id
string | null

Filter by external campaign ID.

sort_by_date
enum<string> | null
deprecated

Optional sort by date of campaign creation. Deprecated. Use order_by instead. The direction to order by.

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.

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
object | null

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