Campaign API

Get Campaigns

Endpoint to retrieve campaigns. Campaigns can be filtered by Vendor ID and status.

It is expected to use for getting all campaigns of a marketplace & all campaigns of a vendor in dashboards. Filtering by status is expected to use at review page getting campaigns approved, pending tabs.

get/public/v1/campaign-service/campaigns

Request

  • Base URL: https://api.topsort.com
  • URL: https://api.topsort.com/public/v1/campaign-service/campaigns
  • Auth: HTTP bearer

Query parameters

vendor_idstring nullable

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

'approved' | 'pending' | 'rejected'

Represents the review status of a banner campaign.

OR
AdvancedAPIsCampaignStatus[]
offsetinteger

The pagination offset.

limitinteger

The pagination limit.

is_activeboolean nullable

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_idstring nullable

Filter by external campaign ID.

slot_idstring nullable

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

'listing' | 'banner' | 'sponsored_brand'

Public campaign ad format filter options.

OR
AdvancedAPIsPublicAdFormat[]
sort_by_date'asc' | 'desc'

The direction to order by.

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

order_bystring nullable

A single order by clause, e.g. 'created_at:asc'. Supported dimensions: created_at, start_date, end_date, name, campaign_id.

start_datestring date-time nullable

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

end_datestring date-time nullable

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

Response

Successful Response

hasMoreboolean required

Whether this is the last page of results or not.

Example response

{
  "campaigns": [
    {
      "name": "Bola-Bola Ad campaign",
      "budget": {
        "amount": 1000
      },
      "multiplierConfig": {
        "multipliers": [
          {
            "multiplier": 0.5
          }
        ]
      }
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.