Saltar al contenido 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"
}

Autorizaciones

Authorization
string
header
requerido

A valid API key generated in Topsort's UI.

Parámetros de ruta

campaign-id
string<uuid>
requerido

The ID of the campaign to update.

Parámetros de consulta

vendor_id
string
requerido

The ID of the vendor to update the campaign for.

Cuerpo

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

Opciones 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
Ejemplo:
["123456"]

Respuesta

Successful Response

jobId
string<uuid>
requerido

The unique identifier for the queued job.