List Inventory Levels
curl --request GET \
--url https://api.launchmystore.io/api/v1/inventory_levels.json \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.launchmystore.io/api/v1/inventory_levels.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/inventory_levels.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/inventory_levels.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/inventory_levels.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/inventory_levels.json")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/inventory_levels.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{
"data.inventory_levels": [
{
"inventory_item_id": "<string>",
"available": 123
}
],
"data.total": 123
}Inventory
List Inventory Levels
Retrieve inventory levels for products
GET
/
api
/
v1
/
inventory_levels.json
List Inventory Levels
curl --request GET \
--url https://api.launchmystore.io/api/v1/inventory_levels.json \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.launchmystore.io/api/v1/inventory_levels.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/inventory_levels.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/inventory_levels.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/inventory_levels.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/inventory_levels.json")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/inventory_levels.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{
"data.inventory_levels": [
{
"inventory_item_id": "<string>",
"available": 123
}
],
"data.total": 123
}List Inventory Levels
Returns inventory levels for product variants. Each inventory item maps to a product variant (or to a product when it has no variants);inventory_item_id
is the variant ID (or product ID for variant-less products).
Request
curl -X GET "https://api.launchmystore.io/api/v1/inventory_levels.json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Parameters
integer
default:"1"
Page number for pagination
integer
default:"50"
Number of items per page
string
Return inventory levels for all variants of this product (returns the
product-level stock when the product has no variants)
string
Return the inventory level for a single variant
Response
Returns the standard response envelope. Thedata object contains an
inventory_levels array. When listing all items (no product_id /
variant_id filter), data also includes flat total, page, and limit
fields.
array
integer
Total number of inventory items (only present when listing all items)
Example Response
{
"status": 200,
"state": "success",
"message": null,
"data": {
"inventory_levels": [
{
"inventory_item_id": "var_xyz789",
"available": 45
},
{
"inventory_item_id": "var_abc123",
"available": 30
}
],
"total": 500,
"page": 1,
"limit": 50
},
"count": null,
"pagination": null
}
product_id or variant_id, the total, page, and
limit fields are omitted:
{
"status": 200,
"state": "success",
"message": null,
"data": {
"inventory_levels": [
{
"inventory_item_id": "var_xyz789",
"available": 45
}
]
},
"count": null,
"pagination": null
}
Error Response
If aproduct_id or variant_id filter is supplied and no matching record
exists:
{
"status": 404,
"state": "error",
"message": "Variant not found",
"data": null
}