Get Article
curl --request GET \
--url https://api.launchmystore.io/api/v1/articles/:id.json \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.launchmystore.io/api/v1/articles/: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/articles/: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/articles/: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/articles/: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/articles/:id.json")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/articles/: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>",
"data": {
"blogId": "<string>",
"id": "<string>",
"blogsPageId": "<string>",
"name": "<string>",
"title": "<string>",
"handle": "<string>",
"content": "<string>",
"image": "<string>",
"link": "<string>",
"tags": [
{}
],
"templateSuffix": "<string>",
"seoTitle": "<string>",
"seoDesc": "<string>",
"seoImage": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
}Blogs
Get Article
Retrieve a single article
GET
/
api
/
v1
/
articles
/
:id.json
Get Article
curl --request GET \
--url https://api.launchmystore.io/api/v1/articles/:id.json \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.launchmystore.io/api/v1/articles/: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/articles/: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/articles/: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/articles/: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/articles/:id.json")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/articles/: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>",
"data": {
"blogId": "<string>",
"id": "<string>",
"blogsPageId": "<string>",
"name": "<string>",
"title": "<string>",
"handle": "<string>",
"content": "<string>",
"image": "<string>",
"link": "<string>",
"tags": [
{}
],
"templateSuffix": "<string>",
"seoTitle": "<string>",
"seoDesc": "<string>",
"seoImage": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
}Get Article
Returns a single article by its ID.Request
curl -X GET "https://api.launchmystore.io/api/v1/articles/art_xyz789.json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
const response = await fetch('https://api.launchmystore.io/api/v1/articles/art_xyz789.json', {
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}
});
read_content scope.
Path Parameters
The unique article ID
Response
The response uses the standard envelope. The article object is returned underdata.article.
HTTP status code (e.g.
200)Result state, e.g.
successWrapper object containing the article
Show data.article
Show data.article
Unique article ID (UUID)
Short numeric article ID
Parent blog ID
Article name
Article title
URL-safe article handle
Article content (HTML)
Featured image URL
External link (if set)
Tags array
Custom template suffix
SEO title
SEO description
SEO image URL
Creation timestamp (ISO 8601)
Last update timestamp (ISO 8601)
Example Response
{
"status": 200,
"state": "success",
"message": null,
"data": {
"article": {
"blogId": "art_xyz789",
"id": "739204",
"blogsPageId": "blog_abc123",
"name": "Summer Product Launch Announcement",
"title": "Summer Product Launch Announcement",
"handle": "summer-product-launch-announcement",
"content": "<p>We're excited to announce our new summer collection featuring lightweight fabrics and vibrant colors.</p>",
"image": "https://cdn.launchmystore.io/images/summer-launch.jpg",
"link": null,
"tags": ["summer", "announcements", "new-arrivals"],
"templateSuffix": null,
"seoTitle": "Summer Collection Launch | MyStore Blog",
"seoDesc": "Discover our new summer collection with 20% off all new arrivals.",
"seoImage": null,
"createdAt": "2024-03-14T09:00:00.000Z",
"updatedAt": "2024-03-15T10:00:00.000Z"
}
}
}
Error Codes
| Code | Description |
|---|---|
UNAUTHORIZED | Invalid or missing access token |
FORBIDDEN | App doesn’t have read_content scope |
NOT_FOUND | Article with the specified ID does not exist |
⌘I