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

Authorizations

Authorization
string
header
required

A valid API key generated in Topsort's UI.

Query Parameters

vendor_id
string

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

Minimum length: 1
status
enum<string>

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

Filter by active/inactive campaigns.

external_campaign_id
string

Filter by external campaign ID.

sort_by_date
enum<string>
deprecated

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

Available options:
asc,
desc
order_by
string

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.

campaigns
PublicCampaign · object[]
required

An array of campaigns.

hasMore
boolean
required

Whether this is the last page of results or not.

next
object

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