Pause or resume a LinkedIn ad, campaign, or ad group
PATCH https://services.leadconnectorhq.com/ad-publishing/linkedin/{adId}/status
Autorización
Bearer token generado desde el portal Leadway. Ver Autenticación.
Version
string
default:"2021-07-28"
required
Versión de la API.
Path parameters
adId
string
default:"507f1f77bcf86cd799439011"
required
Ad identifier
Query parameters
locationId
string
default:"HChooFuiyPpVYzeJ4HMe"
required
Account identifier
Body
operationType
string
default:"PAUSED"
required
Update operation Posibles valores: ‘PAUSED’, ‘ARCHIVED’, ‘RESUME’
type
string
default:"adCampaign"
required
Ad object type Posibles valores: ‘adGroup’, ‘adCampaign’, ‘ad’
Respuestas
422 - Unprocessable Entity
Ejemplo
curl -X PATCH 'https://services.leadconnectorhq.com/ad-publishing/linkedin/YOUR_adId/status' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"operationType": "PAUSED",
"type": "adCampaign"
}'
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/linkedin/YOUR_adId/status', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"operationType": "PAUSED", "type": "adCampaign"}),
});
const data = await response.json();
import os, requests
response = requests.request(
'PATCH',
'https://services.leadconnectorhq.com/ad-publishing/linkedin/YOUR_adId/status',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"operationType": "PAUSED", "type": "adCampaign"},
)
data = response.json()
<?php
$ch = curl_init('https://services.leadconnectorhq.com/ad-publishing/linkedin/YOUR_adId/status');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'operationType': 'PAUSED', 'type': 'adCampaign'}),
]);
$data = json_decode(curl_exec($ch), true);