Get Blog
curl --request GET \
--url https://api.launchmystore.io/api/v1/blogs/:id.json \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.launchmystore.io/api/v1/blogs/:id.json"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.launchmystore.io/api/v1/blogs/:id.json', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.launchmystore.io/api/v1/blogs/:id.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.launchmystore.io/api/v1/blogs/:id.json"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.launchmystore.io/api/v1/blogs/:id.json")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/blogs/:id.json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": 123,
"state": "<string>",
"message": "<string>",
"data": {
"blogsPageId": "<string>",
"id": "<string>",
"name": "<string>",
"title": "<string>",
"handle": "<string>",
"templateSuffix": "<string>",
"seoTitle": "<string>",
"seoDesc": "<string>",
"seoImage": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
}Blogs
Get Blog
Retrieve a single blog
GET
/
api
/
v1
/
blogs
/
:id.json
Get Blog
curl --request GET \
--url https://api.launchmystore.io/api/v1/blogs/:id.json \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.launchmystore.io/api/v1/blogs/:id.json"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.launchmystore.io/api/v1/blogs/:id.json', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.launchmystore.io/api/v1/blogs/:id.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.launchmystore.io/api/v1/blogs/:id.json"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.launchmystore.io/api/v1/blogs/:id.json")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/blogs/:id.json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": 123,
"state": "<string>",
"message": "<string>",
"data": {
"blogsPageId": "<string>",
"id": "<string>",
"name": "<string>",
"title": "<string>",
"handle": "<string>",
"templateSuffix": "<string>",
"seoTitle": "<string>",
"seoDesc": "<string>",
"seoImage": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
}Get Blog
Returns a single blog by its ID.Request
curl -X GET "https://api.launchmystore.io/api/v1/blogs/blog_abc123.json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
const response = await fetch('https://api.launchmystore.io/api/v1/blogs/blog_abc123.json', {
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}
});
read_content scope.
Path Parameters
string
required
The unique blog ID
Response
The response uses the standard envelope. The blog object is returned underdata.blog.
integer
HTTP status code (e.g.
200)string
Result state, e.g.
successstring
Optional message,
null on successobject
Wrapper object containing the blog
Show data.blog
Show data.blog
Example Response
{
"status": 200,
"state": "success",
"message": null,
"data": {
"blog": {
"blogsPageId": "blog_abc123",
"id": "482915",
"name": "News",
"title": "News",
"handle": "news",
"templateSuffix": null,
"seoTitle": null,
"seoDesc": null,
"seoImage": null,
"createdAt": "2024-01-01T10:00:00.000Z",
"updatedAt": "2024-03-15T14:30:00.000Z"
}
}
}
Error Codes
| Code | Description |
|---|---|
UNAUTHORIZED | Invalid or missing access token |
FORBIDDEN | App doesn’t have read_content scope |
NOT_FOUND | Blog with the specified ID does not exist |