Get Campaigns
GET https://services.leadconnectorhq.com/emails/schedule
Autorización
Bearer token generado desde el portal Leadway. Ver Autenticación .
Version
string
default: "2021-07-28"
required
Versión de la API.
Query parameters
locationId
string
default: "ohjiah0wdg3bzmzacvd6"
required
Account ID to fetch campaigns from
Maximum number of campaigns to return. Defaults to 10, maximum is 100
Number of campaigns to skip for pagination
Filter by schedule status
Filter by email delivery status
name
string
default: "Black Friday Campaign"
Filter campaigns by name
parentId
string
default: "folder123"
Filter campaigns by parent folder ID
When true, returns only essential campaign fields like id, templateDataDownloadUrl, updatedAt, type, templateType, templateId, downloadUrl and isPlainText. When false, returns complete campaign data including meta information, bulkRequestStatusInfo, ABTestInfo, resendScheduleInfo and all other campaign properties
Filter archived campaigns
Return only campaigns, excluding folders
When true, returns campaign statistics including delivered count, opened count, clicked count and revenue if available for the campaign. When false, returns campaign data without statistics.
Respuestas
The list of campaigns name
string
default: "Untitled new campaign"
required
The total number of campaigns
{
"schedules" : [
{
"name" : "Untitled new campaign" ,
"repeatAfter" : "string" ,
"id" : "string" ,
"parentId" : "string" ,
"childCount" : 0 ,
"campaignType" : "string" ,
"bulkActionVersion" : "string" ,
"_id" : "string" ,
"status" : "string" ,
"sendDays" : [
"string"
],
"deleted" : true ,
"migrated" : true ,
"archived" : true ,
"hasTracking" : true ,
"isPlainText" : true ,
"hasUtmTracking" : true ,
"enableResendToUnopened" : true ,
"locationId" : "string" ,
"templateId" : "string" ,
"templateType" : "string" ,
"createdAt" : "string" ,
"updatedAt" : "string" ,
"__v" : 0 ,
"documentId" : "string" ,
"downloadUrl" : "string" ,
"templateDataDownloadUrl" : "string" ,
"child" : [
"string"
]
}
],
"total" : [
"string"
],
// truncado: 2 lineas mas
}
403 - The token does not have access to this account
message
string
default: "The token does not have access to this account"
{
"statusCode" : 403 ,
"message" : "The token does not have access to this account"
}
message
string
default: "Not Found"
error
string
default: "The requested resource was not found"
{
"statusCode" : 404 ,
"message" : "Not Found" ,
"error" : "The requested resource was not found"
}
422 - Unprocessable Entity
Ejemplo
curl -X GET 'https://services.leadconnectorhq.com/emails/schedule' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
const response = await fetch ( 'https://services.leadconnectorhq.com/emails/schedule' , {
method: 'GET' ,
headers: {
Authorization: `Bearer ${ process . env . LEADWAY_TOKEN } ` ,
Version: '2021-07-28' ,
},
});
const data = await response . json ();
import os, requests
response = requests.request(
'GET' ,
'https://services.leadconnectorhq.com/emails/schedule' ,
headers = {
'Authorization' : f "Bearer { os.environ[ 'LEADWAY_TOKEN' ] } " ,
'Version' : '2021-07-28' ,
},
)
data = response.json()
<? php
$ch = curl_init ( 'https://services.leadconnectorhq.com/emails/schedule' );
curl_setopt_array ( $ch , [
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_CUSTOMREQUEST => 'GET' ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv ( 'LEADWAY_TOKEN' ),
'Version: 2021-07-28' ,
],
]);
$data = json_decode ( curl_exec ( $ch ), true );