Campaign API

Create Campaign

Creates a campaign with its associated budget and bids.

Supports all campaign types except exclusive campaigns.

post/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 required

The ID of the vendor.

Request body

namestring required

The name of the campaign.

isActiveboolean

Whether the campaign should be activated upon creation.The campaign will start when this is set and the start_date has passed.

externalCampaignIdstring nullable

The external ID of the campaign in the marketplace. Must be unique per marketplace and format combination.

isAutoTriggerboolean

Whether the campaign is auto-triggered.

startDatestring date-time

Date when to start the campaign, specified in RFC 3339, if not set that campaign will start immediately after the campaign creation. Must include the Timezone definition.If the start date is in the past, it will be set to the current date.

endDatestring date-time

Date when to stop the campaign, specified in RFC 3339, if not set the campaign will never stop. This date must be greater than the start date and must be in the future. Must include the Timezone definition.

targetRoasnumber nullable

Indicates the vendor's goal. For banners, use autobiddingObjective instead. ROAS >12 is rare and depends on product metrics and attribution model.

campaignType'manual' | 'autobidding' | 'exclusive' required

The bidding method for the campaign.

status'approved' | 'pending' | 'rejected'

Represents the review status of a banner campaign.

adFormat'listing' | 'banner' nullable

The ad format of the campaign. Can be listing or banner.

chargeType'CPM' | 'CPC' | 'CPA'

Campaign charge type.

CPM: cost per mille impressions CPC: cost per click CPA: cost per action. CPA reflects the total cost to achieve a conversion.

productIdsstring[]

The product IDs to be used in the banner campaign. This is only allowed for banner campaigns. When provided, the assets will be associated to the given product IDs.

autobiddingObjective'impressions' | 'clicks' | 'conversions' | 'revenue'
mediaType'video'

Media type for banner campaigns. Video campaigns can receive video events.

targetRoasPreference'aggressive' | 'conservative' | 'moderate' | 'custom'
walletIdstring uuid nullable

The uuid of the wallet to be used with this campaign.

fallbackWalletIdstring uuid nullable

The optional fallback wallet to be used with this campaign.

Example request

{
  "name": "Bola-Bola Ad campaign",
  "bids": [
    {
      "location": "Santiago",
      "target": {
        "id": "p_8983"
      },
      "formatProperties": {
        "bannerAssets": [
          {
            "contentType": "image/png",
            "dimensions": {
              "width": 1920,
              "height": 1080
            },
            "assetId": "asset_01j713j64yfsvtj4bs3ccpy5ca"
          }
        ]
      }
    }
  ],
  "adFormat": "listing",
  "budget": {
    "amount": 1000
  },
  "multiplierConfig": {
    "multipliers": [
      {
        "multiplier": 0.5
      }
    ]
  }
}

Response

Successful Response

campaignIdstring uuid required

The ID of the campaign.

marketplaceIdstring uuid required

The ID of the marketplace.

namestring required

The name of the campaign.

startDatestring date-time required

The starting date of the campaign.

endDatestring date-time required

The end date of the campaign.

isActiveboolean required

Whether this campaign is active.

isSmartboolean required

Whether this campaign is "smart".

campaignType'manual' | 'autobidding' | 'exclusive' required

The bidding method for the campaign.

status'approved' | 'pending' | 'rejected' required

Represents the review status of a banner campaign.

statusUpdatedBystring uuid nullable

The ID of the user who reviewed the campaign. If it's null and the status is not "pending" then it means this campaign has autoapproval status.

campaignBehaviorDatastring nullable

Deprecated. This field is always null. For behavioral data use reporting service.

campaignBehaviorDataByDaystring nullable

Deprecated. This field is always null. For behavioral data use reporting service.

createdAtstring date-time required

When was this campaign created.

exclusivityPriceinteger nullable

Daily price for an exclusive campaign, can only be set if a campaign is exclusive

targetRoasnumber nullable

The target return on ad spend (ROAS) for this campaign. This is only applicable for autobidding listing campaigns.

externalCampaignIdstring nullable

The external ID of the campaign in the marketplace. Must be unique per marketplace and format combination.

externalVendorIdstring required

The ID of the vendor. Deprecated. Use vendor_id instead.

adFormat'listing' | 'banner' | 'sponsored_brand' | 'exclusive_listing' | 'exclusive_banner' | 'travel_listing' | 'flight_listing' required

The type of the auction.

isAutoTriggerboolean required

Whether the campaign is auto-triggered.

autobiddingObjective'impressions' | 'clicks' | 'conversions' | 'revenue'
mediaType'video'

Media type for banner campaigns. Video campaigns can receive video events.

vendorIdstring required

The ID of the vendor.

walletIdstring uuid required

The uuid of the wallet to be used with this campaign.

fallbackWalletIdstring uuid nullable

The optional fallback wallet to be used with this campaign.

bidCountinteger required

The amount of active bids associated with this campaign. This field is deprecated and will be set to 0 once the notice period is over.

Example response

{
  "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.