curl --location --request PUT 'https://api.stateset.com/v1/products/prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data-raw '{
"price": {
"amount": 12999,
"compare_at": 14999
},
"inventory": {
"low_stock_threshold": 15
},
"tags": ["electronics", "audio", "wireless", "bluetooth", "sale"]
}'
mutation UpdateProduct($id: ID!, $input: UpdateProductInput!) {
updateProduct(id: $id, input: $input) {
id
name
sku
price {
amount
currency
compare_at
}
inventory {
low_stock_threshold
allow_backorder
}
tags
updated_at
}
}
const product = await stateset.products.update(
'prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
{
price: {
amount: 12999,
compare_at: 14999
},
inventory: {
low_stock_threshold: 15
},
tags: ["electronics", "audio", "wireless", "bluetooth", "sale"]
}
);
product = stateset.products.update(
'prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
price={
"amount": 12999,
"compare_at": 14999
},
inventory={
"low_stock_threshold": 15
},
tags=["electronics", "audio", "wireless", "bluetooth", "sale"]
)
{
"id": "prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"object": "product",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T16:45: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": 12999,
"currency": "USD",
"compare_at": 14999
},
"cost": {
"amount": 7500,
"currency": "USD"
},
"inventory": {
"track_inventory": true,
"low_stock_threshold": 15,
"allow_backorder": false
},
"inventory_summary": {
"total_quantity": 150,
"available_quantity": 145,
"reserved_quantity": 5
},
"dimensions": {
"weight": 0.5,
"length": 8,
"width": 7,
"height": 3
},
"tags": ["electronics", "audio", "wireless", "bluetooth", "sale"],
"metadata": {}
}
Update Product
Update an existing product’s details, pricing, or inventory settings
PUT
/
v1
/
products
/
:id
curl --location --request PUT 'https://api.stateset.com/v1/products/prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data-raw '{
"price": {
"amount": 12999,
"compare_at": 14999
},
"inventory": {
"low_stock_threshold": 15
},
"tags": ["electronics", "audio", "wireless", "bluetooth", "sale"]
}'
mutation UpdateProduct($id: ID!, $input: UpdateProductInput!) {
updateProduct(id: $id, input: $input) {
id
name
sku
price {
amount
currency
compare_at
}
inventory {
low_stock_threshold
allow_backorder
}
tags
updated_at
}
}
const product = await stateset.products.update(
'prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
{
price: {
amount: 12999,
compare_at: 14999
},
inventory: {
low_stock_threshold: 15
},
tags: ["electronics", "audio", "wireless", "bluetooth", "sale"]
}
);
product = stateset.products.update(
'prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
price={
"amount": 12999,
"compare_at": 14999
},
inventory={
"low_stock_threshold": 15
},
tags=["electronics", "audio", "wireless", "bluetooth", "sale"]
)
{
"id": "prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"object": "product",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T16:45: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": 12999,
"currency": "USD",
"compare_at": 14999
},
"cost": {
"amount": 7500,
"currency": "USD"
},
"inventory": {
"track_inventory": true,
"low_stock_threshold": 15,
"allow_backorder": false
},
"inventory_summary": {
"total_quantity": 150,
"available_quantity": 145,
"reserved_quantity": 5
},
"dimensions": {
"weight": 0.5,
"length": 8,
"width": 7,
"height": 3
},
"tags": ["electronics", "audio", "wireless", "bluetooth", "sale"],
"metadata": {}
}
This endpoint supports partial updates. Only include the fields you want to change.
Path Parameters
The unique identifier of the product to update
Request Body
Product name for display
Detailed product description
Product category
Brand or manufacturer name
Product status: “active”, “draft”, or “archived”
Additional custom fields as key-value pairs
Array of string tags for categorization
Response
Returns the updated product object with all fields.curl --location --request PUT 'https://api.stateset.com/v1/products/prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data-raw '{
"price": {
"amount": 12999,
"compare_at": 14999
},
"inventory": {
"low_stock_threshold": 15
},
"tags": ["electronics", "audio", "wireless", "bluetooth", "sale"]
}'
mutation UpdateProduct($id: ID!, $input: UpdateProductInput!) {
updateProduct(id: $id, input: $input) {
id
name
sku
price {
amount
currency
compare_at
}
inventory {
low_stock_threshold
allow_backorder
}
tags
updated_at
}
}
const product = await stateset.products.update(
'prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
{
price: {
amount: 12999,
compare_at: 14999
},
inventory: {
low_stock_threshold: 15
},
tags: ["electronics", "audio", "wireless", "bluetooth", "sale"]
}
);
product = stateset.products.update(
'prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
price={
"amount": 12999,
"compare_at": 14999
},
inventory={
"low_stock_threshold": 15
},
tags=["electronics", "audio", "wireless", "bluetooth", "sale"]
)
{
"id": "prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"object": "product",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T16:45: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": 12999,
"currency": "USD",
"compare_at": 14999
},
"cost": {
"amount": 7500,
"currency": "USD"
},
"inventory": {
"track_inventory": true,
"low_stock_threshold": 15,
"allow_backorder": false
},
"inventory_summary": {
"total_quantity": 150,
"available_quantity": 145,
"reserved_quantity": 5
},
"dimensions": {
"weight": 0.5,
"length": 8,
"width": 7,
"height": 3
},
"tags": ["electronics", "audio", "wireless", "bluetooth", "sale"],
"metadata": {}
}
⌘I