Passer au contenu principal
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 '
{
  "name": "<string>",
  "startDate": "2023-11-07T05:31:56Z",
  "endDate": "2023-11-07T05:31:56Z",
  "budget": 123,
  "status": "ENABLED",
  "locationIds": [
    "<string>"
  ],
  "productIds": [
    "<string>"
  ],
  "audienceIds": [
    "123456"
  ]
}
'
{
  "jobId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Autorisations

Authorization
string
header
requis

A valid API key generated in Topsort's UI.

Paramètres de chemin

campaign-id
string<uuid>
requis

The ID of the campaign to update.

Paramètres de requête

vendor_id
string
requis

The ID of the vendor to update the campaign for.

Corps

application/json
name
string | null

The name of the campaign

startDate
string<date-time> | null

The start date of the campaign

endDate
string<date-time> | null

The end date of the campaign

budget
integer | null

The budget of the campaign

status
enum<string> | null

The status of the campaign

Options disponibles:
ENABLED,
PAUSED
locationIds
string[] | null

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 array length: 1
productIds
string[] | null

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.

audienceIds
string[] | null

The audience ids to target. These are the audience ids from each DSP platform. Currently, only one audience is supported. If not provided, no audience won't be updated. If empty, the audience will be removed.

Maximum array length: 1
Exemple:
["123456"]

Réponse

Successful Response

jobId
string<uuid>
requis

The unique identifier for the queued job.