Create or update Google Ads creative assets
POST https://services.leadconnectorhq.com/ad-publishing/google/assets
Autorización
Bearer token generado desde el portal Leadway. Ver Autenticación.
Version
string
default:"2021-07-28"
required
Versión de la API.
Body
locationId
string
default:"loc_abc123"
required
Account identifier
type
string
default:"CALL"
required
Asset type to create or update Posibles valores: ‘CALL’, ‘SITELINK’, ‘LEAD_FORM’
Asset payload — shape depends on the type field: CallAssetPayload (CALL), SitelinkAssetPayload (SITELINK), or LeadFormAssetPayload (LEAD_FORM)
Respuestas
422 - Unprocessable Entity
Ejemplo
curl -X POST 'https://services.leadconnectorhq.com/ad-publishing/google/assets' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "loc_abc123",
"type": "CALL"
}'
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/assets', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "loc_abc123", "type": "CALL"}),
});
const data = await response.json();
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/ad-publishing/google/assets',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "loc_abc123", "type": "CALL"},
)
data = response.json()
<?php
$ch = curl_init('https://services.leadconnectorhq.com/ad-publishing/google/assets');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'loc_abc123', 'type': 'CALL'}),
]);
$data = json_decode(curl_exec($ch), true);