curl --location --request GET 'https://api.stateset.com/v1/products/prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30' \
--header 'Authorization: Bearer YOUR_API_KEY'
query GetProduct($id: ID!) {
product(id: $id) {
id
name
sku
description
category
brand
status
price {
amount
currency
compare_at
}
inventory_summary {
total_quantity
available_quantity
reserved_quantity
}
variants {
id
sku
name
options
inventory {
quantity
available
reserved
}
}
images {
url
alt_text
position
}
}
}
const product = await stateset.products.retrieve(
'prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
{
include_inventory: true,
include_variants: true
}
);
product = stateset.products.retrieve(
'prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
include_inventory=True,
include_variants=True
)
{
"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
},
"cost": {
"amount": 7500,
"currency": "USD"
},
"inventory": {
"track_inventory": true,
"low_stock_threshold": 20,
"allow_backorder": false
},
"inventory_summary": {
"total_quantity": 150,
"available_quantity": 145,
"reserved_quantity": 5,
"by_warehouse": {
"wh_001": {
"available": 145,
"reserved": 5
}
}
},
"dimensions": {
"weight": 0.5,
"length": 8,
"width": 7,
"height": 3
},
"variants": [
{
"id": "var_1234567890",
"sku": "WBH-001-BLK",
"name": "Wireless Bluetooth Headphones - Black",
"options": {
"color": "Black"
},
"price": null,
"inventory": {
"quantity": 100,
"available": 97,
"reserved": 3
},
"barcode": null
},
{
"id": "var_0987654321",
"sku": "WBH-001-WHT",
"name": "Wireless Bluetooth Headphones - White",
"options": {
"color": "White"
},
"price": null,
"inventory": {
"quantity": 50,
"available": 48,
"reserved": 2
},
"barcode": null
}
],
"images": [
{
"id": "img_abc123",
"url": "https://example.com/images/headphones-main.jpg",
"alt_text": "Wireless Bluetooth Headphones",
"position": 1,
"variant_ids": []
}
],
"supplier": null,
"tags": ["electronics", "audio", "wireless", "bluetooth"],
"metadata": {}
}
{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Product not found",
"details": {
"resource": "product",
"id": "prod_abc123"
},
"request_id": "req_abc123def456"
}
}
{
"error": {
"code": "INVALID_API_KEY",
"message": "The API key provided is invalid or has been revoked",
"request_id": "req_abc123def456"
}
}
Get Product
Retrieve a single product by ID with full details including variants and inventory
GET
/
v1
/
products
/
:id
curl --location --request GET 'https://api.stateset.com/v1/products/prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30' \
--header 'Authorization: Bearer YOUR_API_KEY'
query GetProduct($id: ID!) {
product(id: $id) {
id
name
sku
description
category
brand
status
price {
amount
currency
compare_at
}
inventory_summary {
total_quantity
available_quantity
reserved_quantity
}
variants {
id
sku
name
options
inventory {
quantity
available
reserved
}
}
images {
url
alt_text
position
}
}
}
const product = await stateset.products.retrieve(
'prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
{
include_inventory: true,
include_variants: true
}
);
product = stateset.products.retrieve(
'prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
include_inventory=True,
include_variants=True
)
{
"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
},
"cost": {
"amount": 7500,
"currency": "USD"
},
"inventory": {
"track_inventory": true,
"low_stock_threshold": 20,
"allow_backorder": false
},
"inventory_summary": {
"total_quantity": 150,
"available_quantity": 145,
"reserved_quantity": 5,
"by_warehouse": {
"wh_001": {
"available": 145,
"reserved": 5
}
}
},
"dimensions": {
"weight": 0.5,
"length": 8,
"width": 7,
"height": 3
},
"variants": [
{
"id": "var_1234567890",
"sku": "WBH-001-BLK",
"name": "Wireless Bluetooth Headphones - Black",
"options": {
"color": "Black"
},
"price": null,
"inventory": {
"quantity": 100,
"available": 97,
"reserved": 3
},
"barcode": null
},
{
"id": "var_0987654321",
"sku": "WBH-001-WHT",
"name": "Wireless Bluetooth Headphones - White",
"options": {
"color": "White"
},
"price": null,
"inventory": {
"quantity": 50,
"available": 48,
"reserved": 2
},
"barcode": null
}
],
"images": [
{
"id": "img_abc123",
"url": "https://example.com/images/headphones-main.jpg",
"alt_text": "Wireless Bluetooth Headphones",
"position": 1,
"variant_ids": []
}
],
"supplier": null,
"tags": ["electronics", "audio", "wireless", "bluetooth"],
"metadata": {}
}
{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Product not found",
"details": {
"resource": "product",
"id": "prod_abc123"
},
"request_id": "req_abc123def456"
}
}
{
"error": {
"code": "INVALID_API_KEY",
"message": "The API key provided is invalid or has been revoked",
"request_id": "req_abc123def456"
}
}
Path Parameters
string
required
The unique identifier of the product to retrieve
Query Parameters
boolean
Include real-time inventory data (default: true)
boolean
Include all product variants (default: true)
string
Filter inventory data by specific warehouse
Response
string
Unique product identifier
string
Always “product”
string
ISO 8601 timestamp of creation
string
ISO 8601 timestamp of last update
string
Product name
string
Product SKU
string
Product description
string
Product category
string
Brand name
object
Pricing information including amount, currency, and compare_at price
object
Cost information for margin calculations
string
Product status: “active”, “draft”, or “archived”
object
Inventory settings and current levels
object
Aggregated inventory data across all variants and warehouses
array
Array of product variants with full details
array
Product images with URLs and metadata
object
Product dimensions for shipping calculations
object
Supplier information if configured
array
Array of product tags
object
Custom metadata fields
curl --location --request GET 'https://api.stateset.com/v1/products/prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30' \
--header 'Authorization: Bearer YOUR_API_KEY'
query GetProduct($id: ID!) {
product(id: $id) {
id
name
sku
description
category
brand
status
price {
amount
currency
compare_at
}
inventory_summary {
total_quantity
available_quantity
reserved_quantity
}
variants {
id
sku
name
options
inventory {
quantity
available
reserved
}
}
images {
url
alt_text
position
}
}
}
const product = await stateset.products.retrieve(
'prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
{
include_inventory: true,
include_variants: true
}
);
product = stateset.products.retrieve(
'prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
include_inventory=True,
include_variants=True
)
{
"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
},
"cost": {
"amount": 7500,
"currency": "USD"
},
"inventory": {
"track_inventory": true,
"low_stock_threshold": 20,
"allow_backorder": false
},
"inventory_summary": {
"total_quantity": 150,
"available_quantity": 145,
"reserved_quantity": 5,
"by_warehouse": {
"wh_001": {
"available": 145,
"reserved": 5
}
}
},
"dimensions": {
"weight": 0.5,
"length": 8,
"width": 7,
"height": 3
},
"variants": [
{
"id": "var_1234567890",
"sku": "WBH-001-BLK",
"name": "Wireless Bluetooth Headphones - Black",
"options": {
"color": "Black"
},
"price": null,
"inventory": {
"quantity": 100,
"available": 97,
"reserved": 3
},
"barcode": null
},
{
"id": "var_0987654321",
"sku": "WBH-001-WHT",
"name": "Wireless Bluetooth Headphones - White",
"options": {
"color": "White"
},
"price": null,
"inventory": {
"quantity": 50,
"available": 48,
"reserved": 2
},
"barcode": null
}
],
"images": [
{
"id": "img_abc123",
"url": "https://example.com/images/headphones-main.jpg",
"alt_text": "Wireless Bluetooth Headphones",
"position": 1,
"variant_ids": []
}
],
"supplier": null,
"tags": ["electronics", "audio", "wireless", "bluetooth"],
"metadata": {}
}
{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Product not found",
"details": {
"resource": "product",
"id": "prod_abc123"
},
"request_id": "req_abc123def456"
}
}
{
"error": {
"code": "INVALID_API_KEY",
"message": "The API key provided is invalid or has been revoked",
"request_id": "req_abc123def456"
}
}
⌘I