PATCH
/
public
/
v1
/
offsite-ads
/
campaigns
/
{campaign-id}
Update Campaign
curl --request PATCH \
  --url https://api.topsort.com/public/v1/offsite-ads/campaigns/{campaign-id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "budget": 123,
  "endDate": "2023-11-07T05:31:56Z",
  "locationIds": [
    "<string>"
  ],
  "name": "<string>",
  "productIds": [
    "<string>"
  ],
  "startDate": "2023-11-07T05:31:56Z",
  "status": "ENABLED"
}'
{
  "jobId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

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 to update.

Query Parameters

vendor_id
string
required

The ID of the vendor to update the campaign for.

Body

application/json
budget
integer

The budget of the campaign

endDate
string<date-time>

The end date of the campaign

locationIds
string[]

The location ids to target. Google ads geo target ids can be found here: https://developers.google.com/google-ads/api/data/geotargets. Facebook region ids can be found here: https://developers.facebook.com/docs/marketing-api/audiences/reference/targeting-search#regions

Minimum length: 1
name
string

The name of the campaign

productIds
string[]

The product ids to target. These are the product ids from the catalog. When updating product_ids, you must provide at least 5 products. Use an empty list [] to select all products, or None to keep the current selection.

startDate
string<date-time>

The start date of the campaign

status
enum<string>

The status of the campaign

Available options:
ENABLED,
PAUSED

Response

Successful Response

jobId
string<uuid>
required

The unique identifier for the queued job.