List Collections
curl --request GET \
--url https://api.launchmystore.io/api/v1/collections.json \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.launchmystore.io/api/v1/collections.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/collections.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/collections.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/collections.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/collections.json")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/collections.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{
"collections": [
{
"id": 123,
"title": "<string>",
"handle": "<string>",
"body_html": "<string>",
"sort_order": "<string>",
"template_suffix": "<string>",
"image": {},
"products_count": 123,
"updated_at": "<string>"
}
]
}Collections
List Collections
Retrieve a list of collections
GET
/
api
/
v1
/
collections.json
List Collections
curl --request GET \
--url https://api.launchmystore.io/api/v1/collections.json \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.launchmystore.io/api/v1/collections.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/collections.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/collections.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/collections.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/collections.json")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/collections.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{
"collections": [
{
"id": 123,
"title": "<string>",
"handle": "<string>",
"body_html": "<string>",
"sort_order": "<string>",
"template_suffix": "<string>",
"image": {},
"products_count": 123,
"updated_at": "<string>"
}
]
}List Collections
Returns a paginated list of collections in the store, in the standard commerce shape.Request
curl -X GET "https://api.launchmystore.io/api/v1/collections.json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Parameters
Response
Returns a bare object with the collections under thecollections array. Pagination is conveyed via a page-based Link response
header (rel="next" / rel="previous"), not in the body.
Array of collection objects
Show Collection Object
Show Collection Object
Numeric collection ID. The collection’s UUID is accepted too wherever a
collection id is taken.
Example Response
{
"collections": [
{
"id": 339550,
"title": "Summer Collection",
"handle": "summer-collection",
"body_html": "<p>Our latest summer styles.</p>",
"sort_order": "manual",
"template_suffix": null,
"image": {
"alt": "Summer Collection",
"src": "https://cdn.launchmystore.io/images/summer-banner.jpg"
},
"products_count": 24,
"updated_at": "2024-03-15T14:30:00Z"
}
]
}
Link: <https://api.launchmystore.io/api/v1/collections.json?limit=50&page=2>; rel="next"
Errors
Failures return a standard{ errors } body with the appropriate HTTP
status:
{
"errors": {
"base": ["Invalid or missing access token"]
}
}
| Status | Description |
|---|---|
401 | Invalid or missing access token |
403 | App doesn’t have the read_products scope |