Create Product
curl --request POST \
--url https://api.launchmystore.io/api/v1/products.json \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"body_html": "<string>",
"handle": "<string>",
"status": "<string>",
"tags": [
{}
],
"variants": [
{
"title": "<string>",
"price": 123,
"sku": "<string>",
"inventory_quantity": 123,
"weight": 123,
"weight_unit": "<string>",
"option1": "<string>",
"option2": "<string>",
"option3": "<string>"
}
]
}
'import requests
url = "https://api.launchmystore.io/api/v1/products.json"
payload = {
"title": "<string>",
"body_html": "<string>",
"handle": "<string>",
"status": "<string>",
"tags": [{}],
"variants": [
{
"title": "<string>",
"price": 123,
"sku": "<string>",
"inventory_quantity": 123,
"weight": 123,
"weight_unit": "<string>",
"option1": "<string>",
"option2": "<string>",
"option3": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
body_html: '<string>',
handle: '<string>',
status: '<string>',
tags: [{}],
variants: [
{
title: '<string>',
price: 123,
sku: '<string>',
inventory_quantity: 123,
weight: 123,
weight_unit: '<string>',
option1: '<string>',
option2: '<string>',
option3: '<string>'
}
]
})
};
fetch('https://api.launchmystore.io/api/v1/products.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.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'body_html' => '<string>',
'handle' => '<string>',
'status' => '<string>',
'tags' => [
[
]
],
'variants' => [
[
'title' => '<string>',
'price' => 123,
'sku' => '<string>',
'inventory_quantity' => 123,
'weight' => 123,
'weight_unit' => '<string>',
'option1' => '<string>',
'option2' => '<string>',
'option3' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.launchmystore.io/api/v1/products.json"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"body_html\": \"<string>\",\n \"handle\": \"<string>\",\n \"status\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"variants\": [\n {\n \"title\": \"<string>\",\n \"price\": 123,\n \"sku\": \"<string>\",\n \"inventory_quantity\": 123,\n \"weight\": 123,\n \"weight_unit\": \"<string>\",\n \"option1\": \"<string>\",\n \"option2\": \"<string>\",\n \"option3\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.launchmystore.io/api/v1/products.json")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"body_html\": \"<string>\",\n \"handle\": \"<string>\",\n \"status\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"variants\": [\n {\n \"title\": \"<string>\",\n \"price\": 123,\n \"sku\": \"<string>\",\n \"inventory_quantity\": 123,\n \"weight\": 123,\n \"weight_unit\": \"<string>\",\n \"option1\": \"<string>\",\n \"option2\": \"<string>\",\n \"option3\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/products.json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"body_html\": \"<string>\",\n \"handle\": \"<string>\",\n \"status\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"variants\": [\n {\n \"title\": \"<string>\",\n \"price\": 123,\n \"sku\": \"<string>\",\n \"inventory_quantity\": 123,\n \"weight\": 123,\n \"weight_unit\": \"<string>\",\n \"option1\": \"<string>\",\n \"option2\": \"<string>\",\n \"option3\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyProducts
Create Product
Create a new product
POST
/
api
/
v1
/
products.json
Create Product
curl --request POST \
--url https://api.launchmystore.io/api/v1/products.json \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"body_html": "<string>",
"handle": "<string>",
"status": "<string>",
"tags": [
{}
],
"variants": [
{
"title": "<string>",
"price": 123,
"sku": "<string>",
"inventory_quantity": 123,
"weight": 123,
"weight_unit": "<string>",
"option1": "<string>",
"option2": "<string>",
"option3": "<string>"
}
]
}
'import requests
url = "https://api.launchmystore.io/api/v1/products.json"
payload = {
"title": "<string>",
"body_html": "<string>",
"handle": "<string>",
"status": "<string>",
"tags": [{}],
"variants": [
{
"title": "<string>",
"price": 123,
"sku": "<string>",
"inventory_quantity": 123,
"weight": 123,
"weight_unit": "<string>",
"option1": "<string>",
"option2": "<string>",
"option3": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
body_html: '<string>',
handle: '<string>',
status: '<string>',
tags: [{}],
variants: [
{
title: '<string>',
price: 123,
sku: '<string>',
inventory_quantity: 123,
weight: 123,
weight_unit: '<string>',
option1: '<string>',
option2: '<string>',
option3: '<string>'
}
]
})
};
fetch('https://api.launchmystore.io/api/v1/products.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.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'body_html' => '<string>',
'handle' => '<string>',
'status' => '<string>',
'tags' => [
[
]
],
'variants' => [
[
'title' => '<string>',
'price' => 123,
'sku' => '<string>',
'inventory_quantity' => 123,
'weight' => 123,
'weight_unit' => '<string>',
'option1' => '<string>',
'option2' => '<string>',
'option3' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.launchmystore.io/api/v1/products.json"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"body_html\": \"<string>\",\n \"handle\": \"<string>\",\n \"status\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"variants\": [\n {\n \"title\": \"<string>\",\n \"price\": 123,\n \"sku\": \"<string>\",\n \"inventory_quantity\": 123,\n \"weight\": 123,\n \"weight_unit\": \"<string>\",\n \"option1\": \"<string>\",\n \"option2\": \"<string>\",\n \"option3\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.launchmystore.io/api/v1/products.json")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"body_html\": \"<string>\",\n \"handle\": \"<string>\",\n \"status\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"variants\": [\n {\n \"title\": \"<string>\",\n \"price\": 123,\n \"sku\": \"<string>\",\n \"inventory_quantity\": 123,\n \"weight\": 123,\n \"weight_unit\": \"<string>\",\n \"option1\": \"<string>\",\n \"option2\": \"<string>\",\n \"option3\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/products.json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"body_html\": \"<string>\",\n \"handle\": \"<string>\",\n \"status\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"variants\": [\n {\n \"title\": \"<string>\",\n \"price\": 123,\n \"sku\": \"<string>\",\n \"inventory_quantity\": 123,\n \"weight\": 123,\n \"weight_unit\": \"<string>\",\n \"option1\": \"<string>\",\n \"option2\": \"<string>\",\n \"option3\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyCreate Product
Creates a new product in the store.Request
curl -X POST "https://api.launchmystore.io/api/v1/products.json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Classic T-Shirt",
"body_html": "<p>A comfortable cotton t-shirt.</p>",
"status": "draft",
"tags": ["cotton", "casual"],
"variants": [
{
"title": "Small / Black",
"price": 25.00,
"sku": "TSHIRT-S-BLK",
"inventory_quantity": 50
}
]
}'
const response = await fetch('https://api.launchmystore.io/api/v1/products.json', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: 'Classic T-Shirt',
body_html: '<p>A comfortable cotton t-shirt.</p>',
status: 'draft',
tags: ['cotton', 'casual'],
variants: [
{
title: 'Small / Black',
price: 25.00,
sku: 'TSHIRT-S-BLK',
inventory_quantity: 50
}
]
})
});
Body Parameters
string
required
The product title
string
Product description (supports HTML)
string
URL-safe handle. Auto-generated from title if not provided
string
default:"draft"
Product status:
active, draft, archivedarray
Array of tags for organizing and filtering products
array
Array of product variants. When a single variant is supplied, its
pricing and stock are mirrored onto the product.
Show Variant Object
Show Variant Object
string
Variant title. If omitted, it is built from
option1 / option2 /
option3 (falling back to Default).number
Variant price (e.g.,
25.00)string
Stock keeping unit
integer
Initial inventory quantity
number
Weight value
string
Weight unit (e.g.,
kg, g, lb, oz)string
First option value (used to build the variant title)
string
Second option value
string
Third option value
Response
Returns the created product as a bare object under theproduct key
(HTTP 201). Money fields are returned as decimal strings and IDs are
numeric. The header X-LMS-Api-Version advertises the contract version.
Example Response
{
"product": {
"id": 482910,
"title": "Classic T-Shirt",
"handle": "classic-t-shirt",
"body_html": "<p>A comfortable cotton t-shirt.</p>",
"status": "draft",
"tags": ["cotton", "casual"],
"created_at": "2024-01-25T10:00:00.000Z",
"updated_at": "2024-01-25T10:00:00.000Z",
"variants": [
{
"id": 731204,
"title": "Small / Black",
"price": "25.00",
"sku": "TSHIRT-S-BLK",
"inventory_quantity": 50,
"position": 1,
"weight": 0,
"weight_unit": "kg"
}
],
"options": [
{
"id": 1,
"name": "Title",
"position": 1,
"values": ["Small / Black"]
}
],
"images": []
}
}
Error Response
Validation and other errors are returned as a standard{ errors }
body:
{
"errors": {
"base": ["title should not be empty"]
}
}
⌘I