PATCH
/
public
/
v1
/
toppie
/
campaigns
/
{campaign-id}
curl --request PATCH \
  --url https://api.topsort.com/public/v1/toppie/campaigns/{campaign-id} \
  --header 'Content-Type: application/json' \
  --data '{
  "budget": 10000000000,
  "endDate": "2023-11-07T05:31:56Z",
  "isActive": true,
  "name": "<string>",
  "startDate": "2023-11-07T05:31:56Z",
  "targetRoas": 123,
  "targetsWithBids": {
    "add": [
      {
        "bidAmount": 123,
        "isActive": true,
        "target": "<string>"
      }
    ],
    "remove": [
      "<string>"
    ]
  }
}'
{
  "accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "agencyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "budget": 123,
  "budgetPeriod": "daily",
  "createdAt": "2023-11-07T05:31:56Z",
  "currencyCode": "USD",
  "endDate": "2023-11-07T05:31:56Z",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "isActive": true,
  "name": "<string>",
  "startDate": "2023-11-07T05:31:56Z",
  "targetRoas": 10.25,
  "targetType": "brand"
}

Path Parameters

campaign-id
string
required

The ID of the campaign.

Body

application/json

Agency campaign fields to be updated

budget
integer

Total budget for this campaign, to be distributed across marketplaces

Required range: 0 < x < 20000000000
endDate
string

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.

isActive
boolean

Flag to indicate if the campaign is active or not

name
string

Campaign name, this will be propagated to campaigns in marketplaces

startDate
string

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.

targetRoas
number

Target ROAS for the campaign

targetsWithBids
object

Targets to be included or removed from the campaign

Response

200
application/json
Successful Response
accountId
string
required

Account that owns this campaign

agencyId
string
required

Agency that owns this campaign

budget
integer
required

Total budget for this campaign

budgetPeriod
enum<string>
required

The periodicity of the budget

Available options:
daily,
weekly,
monthly,
total
createdAt
string
required

Date and time when the campaign was created

currencyCode
string
required

Currency code this campaign is working with in ISO 4217 format

Example:

"USD"

id
string
required

Internal identifier for the agency campaign

isActive
boolean
required

Flag to indicate if the campaign is active or not

name
string
required

Campaign name

targetRoas
number
required

Target ROAS for the campaign

Required range: 0.5 <= x <= 20
targetType
enum<string>
required

Type of campaign, can be either 'brand' or 'product'

Available options:
brand,
product
endDate
string

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.

startDate
string

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.