List Variants
curl --request GET \
--url https://api.launchmystore.io/api/v1/products/{id}.json \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.launchmystore.io/api/v1/products/{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/products/{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/products/{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/products/{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/products/{id}.json")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/products/{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": 200,
"state": "success",
"message": null,
"data": {
"product": {
"id": "prod_xyz789",
"name": "Classic Cotton T-Shirt",
"handle": "classic-cotton-t-shirt",
"variants": [
{
"varientId": "var_abc123",
"productId": "prod_xyz789",
"name": "Size",
"value": "Small",
"price": 29.99,
"discountPrice": 39.99,
"stock": 50,
"stockStatus": "in_stock",
"skuId": "TSHIRT-RED-S",
"weight": 0.2,
"weightUnit": "kg"
},
{
"varientId": "var_abc124",
"productId": "prod_xyz789",
"name": "Size",
"value": "Medium",
"price": 29.99,
"discountPrice": 39.99,
"stock": 75,
"stockStatus": "in_stock",
"skuId": "TSHIRT-RED-M",
"weight": 0.22,
"weightUnit": "kg"
}
]
}
}
}
Variants
List Variants
Get the variants for a product
GET
/
api
/
v1
/
products
/
{id}
.json
List Variants
curl --request GET \
--url https://api.launchmystore.io/api/v1/products/{id}.json \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.launchmystore.io/api/v1/products/{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/products/{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/products/{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/products/{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/products/{id}.json")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/products/{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": 200,
"state": "success",
"message": null,
"data": {
"product": {
"id": "prod_xyz789",
"name": "Classic Cotton T-Shirt",
"handle": "classic-cotton-t-shirt",
"variants": [
{
"varientId": "var_abc123",
"productId": "prod_xyz789",
"name": "Size",
"value": "Small",
"price": 29.99,
"discountPrice": 39.99,
"stock": 50,
"stockStatus": "in_stock",
"skuId": "TSHIRT-RED-S",
"weight": 0.2,
"weightUnit": "kg"
},
{
"varientId": "var_abc124",
"productId": "prod_xyz789",
"name": "Size",
"value": "Medium",
"price": 29.99,
"discountPrice": 39.99,
"stock": 75,
"stockStatus": "in_stock",
"skuId": "TSHIRT-RED-M",
"weight": 0.22,
"weightUnit": "kg"
}
]
}
}
}
List Variants
There is no standalone/products/{id}/variants.json route. Variants are
returned embedded under each product, in a variants array.
To get the variants for a single product, fetch the product and read its
variants array:
GET /api/v1/products/{id}.json— one product with its variants.GET /api/v1/products.json— all products, each with their variants.
read_products scope.
Path Parameters
string
required
The product ID (UUID, or the numeric compat id).
Request
curl -X GET "https://api.launchmystore.io/api/v1/products/prod_xyz789.json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
Responses use the platform response envelope:status, state, message,
data. The variants are nested under data.product.variants.
number
HTTP status code.
string
success or error.object
Show properties
Show properties
object
Show product object
Show product object
array
{
"status": 200,
"state": "success",
"message": null,
"data": {
"product": {
"id": "prod_xyz789",
"name": "Classic Cotton T-Shirt",
"handle": "classic-cotton-t-shirt",
"variants": [
{
"varientId": "var_abc123",
"productId": "prod_xyz789",
"name": "Size",
"value": "Small",
"price": 29.99,
"discountPrice": 39.99,
"stock": 50,
"stockStatus": "in_stock",
"skuId": "TSHIRT-RED-S",
"weight": 0.2,
"weightUnit": "kg"
},
{
"varientId": "var_abc124",
"productId": "prod_xyz789",
"name": "Size",
"value": "Medium",
"price": 29.99,
"discountPrice": 39.99,
"stock": 75,
"stockStatus": "in_stock",
"skuId": "TSHIRT-RED-M",
"weight": 0.22,
"weightUnit": "kg"
}
]
}
}
}
Merchant (dashboard) JWT callers can also use
GET /variants/get-all-unique-variants to list the distinct variant options
defined across the store, and GET /variants/get-single-variant/{id} to fetch
one variant by ID.