Get Variant
curl --request GET \
--url https://api.launchmystore.io/variants/get-single-variant/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.launchmystore.io/variants/get-single-variant/{id}"
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/variants/get-single-variant/{id}', 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/variants/get-single-variant/{id}",
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/variants/get-single-variant/{id}"
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/variants/get-single-variant/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/variants/get-single-variant/{id}")
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": {
"varientId": "8f1c2d34-...",
"productId": "prod_xyz789",
"name": "Size",
"value": "Medium",
"price": 29.99,
"discountPrice": 24.99,
"stock": 50,
"stockStatus": "IN_STOCK",
"skuId": "TSHIRT-RED-M",
"weight": 0.2,
"weightUnit": "kg",
"mainImageUrl": "https://assets.launchmystore.io/...",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z"
}
}
Variants
Get Variant
Get a single variant by ID
GET
/
variants
/
get-single-variant
/
{id}
Get Variant
curl --request GET \
--url https://api.launchmystore.io/variants/get-single-variant/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.launchmystore.io/variants/get-single-variant/{id}"
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/variants/get-single-variant/{id}', 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/variants/get-single-variant/{id}",
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/variants/get-single-variant/{id}"
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/variants/get-single-variant/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/variants/get-single-variant/{id}")
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": {
"varientId": "8f1c2d34-...",
"productId": "prod_xyz789",
"name": "Size",
"value": "Medium",
"price": 29.99,
"discountPrice": 24.99,
"stock": 50,
"stockStatus": "IN_STOCK",
"skuId": "TSHIRT-RED-M",
"weight": 0.2,
"weightUnit": "kg",
"mainImageUrl": "https://assets.launchmystore.io/...",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z"
}
}
There is no dedicated variant endpoint on the OAuth App API (
/api/v1/).
Installed apps read variants embedded on their parent product via
GET /api/v1/products/{id}.json — the
response includes a variants[] array.The route documented here is the merchant admin route
(GET /variants/get-single-variant/{id}), authenticated with a merchant
session token (any authenticated store user), not an app access token. It is
also the route the MCP tools and the admin UI use.Authentication
Merchant JWT (Authorization: Bearer <merchant-token>). Any authenticated
user of the store may call it.
Path Parameters
string
required
The variant ID
Response
The platform response envelope is{ status, state, message, data }. The
data object is the raw variant record.
number
HTTP status code (e.g.
200).string
"success" or "error".string
null on success, an error string otherwise.object
Show variant properties
Show variant properties
string
Variant ID
string
Parent product ID
string
Option name (e.g. “Size”)
string
Option value (e.g. “Medium”)
number
Variant price
number
Discounted/sale price
number
Current stock quantity
string
Stock status (e.g.
IN_STOCK)string
SKU
number
Weight
string
Weight unit (e.g.
kg, g, lb, oz)string
Variant image URL
{
"status": 200,
"state": "success",
"message": null,
"data": {
"varientId": "8f1c2d34-...",
"productId": "prod_xyz789",
"name": "Size",
"value": "Medium",
"price": 29.99,
"discountPrice": 24.99,
"stock": 50,
"stockStatus": "IN_STOCK",
"skuId": "TSHIRT-RED-M",
"weight": 0.2,
"weightUnit": "kg",
"mainImageUrl": "https://assets.launchmystore.io/...",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z"
}
}
If the variant does not exist the endpoint returns
status: 400 with
state: "error" and message: "Variant Not Found".