curl --location --request GET 'https://api.stateset.com/api/v1/products?limit=10&status=active&category=Electronics' \
--header 'Authorization: Bearer YOUR_API_KEY'
query ListProducts(
$limit: Int
$offset: Int
$status: ProductStatus
$category: String
$search: String
) {
products(
limit: $limit
offset: $offset
status: $status
category: $category
search: $search
) {
data {
id
name
sku
category
brand
status
price {
amount
currency
}
inventory_summary {
total_quantity
available_quantity
}
}
has_more
total_count
}
}
const products = await stateset.products.list({
limit: 10,
status: 'active',
category: 'Electronics',
in_stock: true,
sort_by: 'price',
sort_order: 'asc'
});
// Iterate through all products
for await (const product of stateset.products.list()) {
console.log(product.id, product.name);
}
products = stateset.products.list(
limit=10,
status='active',
category='Electronics',
in_stock=True,
sort_by='price',
sort_order='asc'
)
# Iterate through all products
for product in stateset.products.list():
print(product.id, product.name)
{
"object": "list",
"data": [
{
"id": "prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"object": "product",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T14:22:00Z",
"name": "Wireless Bluetooth Headphones",
"sku": "WBH-001",
"description": "Premium noise-cancelling wireless headphones with 30-hour battery life",
"category": "Electronics",
"brand": "AudioTech",
"status": "active",
"price": {
"amount": 14999,
"currency": "USD",
"compare_at": 19999
},
"inventory_summary": {
"total_quantity": 150,
"available_quantity": 145,
"reserved_quantity": 5
},
"tags": ["electronics", "audio", "wireless", "bluetooth"]
},
{
"id": "prod_1234567890abcdef",
"object": "product",
"created_at": "2024-01-14T09:15:00Z",
"updated_at": "2024-01-14T09:15:00Z",
"name": "USB-C Charging Cable",
"sku": "USB-C-001",
"description": "Fast charging USB-C cable, 6ft length",
"category": "Electronics",
"brand": "TechConnect",
"status": "active",
"price": {
"amount": 1299,
"currency": "USD",
"compare_at": null
},
"inventory_summary": {
"total_quantity": 500,
"available_quantity": 487,
"reserved_quantity": 13
},
"tags": ["electronics", "cables", "charging"]
}
],
"has_more": true,
"total_count": 42,
"next_cursor": "eyJpZCI6InByb2RfMTIzNDU2Nzg5MGFiY2RlZiJ9"
}
List Products
Retrieve a paginated list of products with filtering and search capabilities
GET
/
api
/
v1
/
products
curl --location --request GET 'https://api.stateset.com/api/v1/products?limit=10&status=active&category=Electronics' \
--header 'Authorization: Bearer YOUR_API_KEY'
query ListProducts(
$limit: Int
$offset: Int
$status: ProductStatus
$category: String
$search: String
) {
products(
limit: $limit
offset: $offset
status: $status
category: $category
search: $search
) {
data {
id
name
sku
category
brand
status
price {
amount
currency
}
inventory_summary {
total_quantity
available_quantity
}
}
has_more
total_count
}
}
const products = await stateset.products.list({
limit: 10,
status: 'active',
category: 'Electronics',
in_stock: true,
sort_by: 'price',
sort_order: 'asc'
});
// Iterate through all products
for await (const product of stateset.products.list()) {
console.log(product.id, product.name);
}
products = stateset.products.list(
limit=10,
status='active',
category='Electronics',
in_stock=True,
sort_by='price',
sort_order='asc'
)
# Iterate through all products
for product in stateset.products.list():
print(product.id, product.name)
{
"object": "list",
"data": [
{
"id": "prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"object": "product",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T14:22:00Z",
"name": "Wireless Bluetooth Headphones",
"sku": "WBH-001",
"description": "Premium noise-cancelling wireless headphones with 30-hour battery life",
"category": "Electronics",
"brand": "AudioTech",
"status": "active",
"price": {
"amount": 14999,
"currency": "USD",
"compare_at": 19999
},
"inventory_summary": {
"total_quantity": 150,
"available_quantity": 145,
"reserved_quantity": 5
},
"tags": ["electronics", "audio", "wireless", "bluetooth"]
},
{
"id": "prod_1234567890abcdef",
"object": "product",
"created_at": "2024-01-14T09:15:00Z",
"updated_at": "2024-01-14T09:15:00Z",
"name": "USB-C Charging Cable",
"sku": "USB-C-001",
"description": "Fast charging USB-C cable, 6ft length",
"category": "Electronics",
"brand": "TechConnect",
"status": "active",
"price": {
"amount": 1299,
"currency": "USD",
"compare_at": null
},
"inventory_summary": {
"total_quantity": 500,
"available_quantity": 487,
"reserved_quantity": 13
},
"tags": ["electronics", "cables", "charging"]
}
],
"has_more": true,
"total_count": 42,
"next_cursor": "eyJpZCI6InByb2RfMTIzNDU2Nzg5MGFiY2RlZiJ9"
}
Query Parameters
integer
Number of products to return (default: 20, max: 100)
integer
Number of products to skip (for pagination)
string
Cursor for pagination (alternative to offset)
string
Filter by status: “active”, “draft”, or “archived”
string
Filter by product category
string
Filter by brand name
string
Search products by name, SKU, or description
string
Filter by exact SKU match
string
Filter by tags (comma-separated)
integer
Minimum price filter (in cents)
integer
Maximum price filter (in cents)
boolean
Filter products with available inventory
boolean
Filter products below low stock threshold
string
Filter products created after this date (ISO 8601)
string
Filter products created before this date (ISO 8601)
string
Filter products updated after this date (ISO 8601)
string
Sort field: “created_at”, “updated_at”, “name”, “price”, “sku” (default: “created_at”)
string
Sort order: “asc” or “desc” (default: “desc”)
boolean
Include variant details in response (default: false)
boolean
Include inventory summary (default: false)
Response
string
Always “list”
array
Array of product objects
boolean
Whether there are more products to retrieve
integer
Total number of products matching the filters
string
Cursor for retrieving the next page
curl --location --request GET 'https://api.stateset.com/api/v1/products?limit=10&status=active&category=Electronics' \
--header 'Authorization: Bearer YOUR_API_KEY'
query ListProducts(
$limit: Int
$offset: Int
$status: ProductStatus
$category: String
$search: String
) {
products(
limit: $limit
offset: $offset
status: $status
category: $category
search: $search
) {
data {
id
name
sku
category
brand
status
price {
amount
currency
}
inventory_summary {
total_quantity
available_quantity
}
}
has_more
total_count
}
}
const products = await stateset.products.list({
limit: 10,
status: 'active',
category: 'Electronics',
in_stock: true,
sort_by: 'price',
sort_order: 'asc'
});
// Iterate through all products
for await (const product of stateset.products.list()) {
console.log(product.id, product.name);
}
products = stateset.products.list(
limit=10,
status='active',
category='Electronics',
in_stock=True,
sort_by='price',
sort_order='asc'
)
# Iterate through all products
for product in stateset.products.list():
print(product.id, product.name)
{
"object": "list",
"data": [
{
"id": "prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"object": "product",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T14:22:00Z",
"name": "Wireless Bluetooth Headphones",
"sku": "WBH-001",
"description": "Premium noise-cancelling wireless headphones with 30-hour battery life",
"category": "Electronics",
"brand": "AudioTech",
"status": "active",
"price": {
"amount": 14999,
"currency": "USD",
"compare_at": 19999
},
"inventory_summary": {
"total_quantity": 150,
"available_quantity": 145,
"reserved_quantity": 5
},
"tags": ["electronics", "audio", "wireless", "bluetooth"]
},
{
"id": "prod_1234567890abcdef",
"object": "product",
"created_at": "2024-01-14T09:15:00Z",
"updated_at": "2024-01-14T09:15:00Z",
"name": "USB-C Charging Cable",
"sku": "USB-C-001",
"description": "Fast charging USB-C cable, 6ft length",
"category": "Electronics",
"brand": "TechConnect",
"status": "active",
"price": {
"amount": 1299,
"currency": "USD",
"compare_at": null
},
"inventory_summary": {
"total_quantity": 500,
"available_quantity": 487,
"reserved_quantity": 13
},
"tags": ["electronics", "cables", "charging"]
}
],
"has_more": true,
"total_count": 42,
"next_cursor": "eyJpZCI6InByb2RfMTIzNDU2Nzg5MGFiY2RlZiJ9"
}
⌘I