Skip to main content
PATCH
/
public
/
v1
/
campaign-service
/
campaigns
/
{campaign-id}
/
bids
/
{bid-id}
Update Campaign Bid By Id
curl --request PATCH \
  --url https://api.topsort.com/public/v1/campaign-service/campaigns/{campaign-id}/bids/{bid-id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "amount": 1,
  "isActive": true
}'
{
  "amount": 1,
  "bidId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "bidsBehaviorData": "<string>",
  "campaignId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "formatProperties": {
    "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>"
  },
  "isActive": true,
  "location": "Santiago",
  "state": "active",
  "target": {
    "id": "p_8983",
    "type": "product"
  },
  "trigger": {
    "type": "keyword",
    "value": {
      "matchType": "exact",
      "words": [
        "<string>"
      ]
    }
  },
  "triggers": [
    {
      "type": "keyword",
      "value": {
        "matchType": "exact",
        "words": [
          "<string>"
        ]
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

A valid API key generated in Topsort's UI.

Path Parameters

campaign-id
string<uuid>
required

The ID of the campaign.

bid-id
string<uuid>
required

The ID of the bid.

Body

application/json

The Bid update request body.

amount
integer

Maximum amount of money willing to offer for a sponsored slot in minor units of currency according to ISO 4217.

Required range: x > 0
isActive
boolean

Whether to activate or deactivate the bid.

Response

Successful Response

Represents an auction bid for a specific entity and a specific maximum amount.

bidId
string<uuid>
required

The ID of the bid

campaignId
string<uuid>
required

The ID of the campaign.

isActive
boolean
required

Whether the bid is active.

state
enum<string>
required

The activity state of the bid.

Available options:
active,
deactivated_manually,
inactive_entity,
deleted_entity,
legacy_inactive
target
object
required

The type of entity this bid will be targeting.

triggers
Triggers · array
required

A list of objects that trigger the appearance of this bid on an auction.

  • KeywordTrigger
  • CategoryTrigger
  • CategoriesTrigger
  • ProductTrigger
  • NoContextTrigger
  • KeywordsFromCampaignProductsTrigger
  • CategoriesFromCampaignProductsTrigger
amount
integer

Maximum amount of money willing to offer for a sponsored slot in minor units of currency according to ISO 4217.

Required range: x > 0
bidsBehaviorData
string
deprecated

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

formatProperties
object
location
string

By using this option you will be able to target this campaign to a specific group.You must define the same location as a parameter on the auction request. Products on a specific campaign will have specific conversion rates, considering the context of location, so it will not interfere with the conversion rates for the same product in other campaigns.

Minimum length: 1
Example:

"Santiago"

trigger
object
deprecated

When should this bid participate in an auction. Collection of keywords that match to a product.

Ideal for search results pages.

  • KeywordTrigger
  • CategoryTrigger
  • CategoriesTrigger
  • ProductTrigger
  • NoContextTrigger
  • KeywordsFromCampaignProductsTrigger
  • CategoriesFromCampaignProductsTrigger
I