The “Get Blog posts by Blog ID” API allows you get blog posts for any given blog site using blog ID.Please use blogs/posts.readonly
GET https://services.leadconnectorhq.com/blogs/posts/all
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:"ve9EPM428h8vShlRW1KT"
required
blogId
string
default:"66f429b8afdce84227a4610d"
required
limit
number
default:"4"
required
search for any post by name
status
string
default:"PUBLISHED"
Respuestas
200 - Successful response
Object containing response data of blog posts
Array of category IDs associated with the blog post
Array of tags associated with the blog post
archived
boolean
default:"False"
required
Indicates whether the blog post is archived
_id
string
default:"66c381b38be80858b9af62b6"
required
Unique identifier of the blog post
title
string
default:"Banana is good source of energy"
required
Title of the blog post
description
string
default:"Description"
required
Description of the blog post
URL of the image associated with the blog post
status
string
default:"PUBLISHED"
required
Publication status of the blog post
imageAltText
string
default:"alt"
required
Alternative text for the blog post image
urlSlug
string
default:"banana-good-energy"
required
URL slug for the blog post
canonicalLink
string
default:"https://blog.chatgpts.agency/post/test-8384"
Canonical link of the blog post
author
string
default:"659ec9634a3796e4e47cc360"
Identifier of the author of the blog post
publishedAt
string
default:"2024-08-19T17:14:57.000Z"
required
Timestamp when the blog post was published
updatedAt
string
default:"2024-08-19T17:32:36.182Z"
required
Timestamp when the blog post was last updated
{
"blogs": [
{
"categories": [
"659ecabc4a37969a2b7cc370",
"6683abde331c041f32c07aee"
],
"tags": [
"Apple",
"Banana"
],
"archived": false,
"_id": "66c381b38be80858b9af62b6",
"title": "Banana is good source of energy",
"description": "Description",
"imageUrl": "https://storage.googleapis.com/ghl-test/fACm0Ojm5oC70G3DcFmE/media/66b5aa3b1745b2713a8d033f.jpeg",
"status": "PUBLISHED",
"imageAltText": "alt",
"urlSlug": "banana-good-energy",
"canonicalLink": "https://blog.chatgpts.agency/post/test-8384",
"author": "659ec9634a3796e4e47cc360",
"publishedAt": "2024-08-19T17:14:57.000Z",
"updatedAt": "2024-08-19T17:32:36.182Z"
}
]
}
422 - Unprocessable Entity
Ejemplo
curl -X GET 'https://services.leadconnectorhq.com/blogs/posts/all' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
const response = await fetch('https://services.leadconnectorhq.com/blogs/posts/all', {
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/blogs/posts/all',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
<?php
$ch = curl_init('https://services.leadconnectorhq.com/blogs/posts/all');
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);