curl --location --request POST 'https://api.stateset.com/v1/products/bulk-update' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data-raw '{
"updates": [
{
"id": "prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"price": {
"amount": 11999
},
"tags": ["electronics", "audio", "sale", "clearance"]
},
{
"id": "prod_abc123def456",
"price": {
"amount": 6999
},
"inventory": {
"low_stock_threshold": 25
}
},
{
"id": "prod_xyz789ghi012",
"status": "archived"
}
]
}'
{
"updated": [
{
"id": "prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"name": "Wireless Bluetooth Headphones",
"sku": "WBH-001",
"updated_at": "2024-01-15T17:30:00Z"
},
{
"id": "prod_abc123def456",
"name": "Sport Wireless Earbuds",
"sku": "SWE-001",
"updated_at": "2024-01-15T17:30:00Z"
}
],
"errors": [
{
"product_id": "prod_xyz789ghi012",
"error": "Product not found"
}
],
"summary": {
"total": 3,
"successful": 2,
"failed": 1
}
}
Update multiple products in a single request
curl --location --request POST 'https://api.stateset.com/v1/products/bulk-update' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data-raw '{
"updates": [
{
"id": "prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"price": {
"amount": 11999
},
"tags": ["electronics", "audio", "sale", "clearance"]
},
{
"id": "prod_abc123def456",
"price": {
"amount": 6999
},
"inventory": {
"low_stock_threshold": 25
}
},
{
"id": "prod_xyz789ghi012",
"status": "archived"
}
]
}'
{
"updated": [
{
"id": "prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"name": "Wireless Bluetooth Headphones",
"sku": "WBH-001",
"updated_at": "2024-01-15T17:30:00Z"
},
{
"id": "prod_abc123def456",
"name": "Sport Wireless Earbuds",
"sku": "SWE-001",
"updated_at": "2024-01-15T17:30:00Z"
}
],
"errors": [
{
"product_id": "prod_xyz789ghi012",
"error": "Product not found"
}
],
"summary": {
"total": 3,
"successful": 2,
"failed": 1
}
}
curl --location --request POST 'https://api.stateset.com/v1/products/bulk-update' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data-raw '{
"updates": [
{
"id": "prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"price": {
"amount": 11999
},
"tags": ["electronics", "audio", "sale", "clearance"]
},
{
"id": "prod_abc123def456",
"price": {
"amount": 6999
},
"inventory": {
"low_stock_threshold": 25
}
},
{
"id": "prod_xyz789ghi012",
"status": "archived"
}
]
}'
{
"updated": [
{
"id": "prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"name": "Wireless Bluetooth Headphones",
"sku": "WBH-001",
"updated_at": "2024-01-15T17:30:00Z"
},
{
"id": "prod_abc123def456",
"name": "Sport Wireless Earbuds",
"sku": "SWE-001",
"updated_at": "2024-01-15T17:30:00Z"
}
],
"errors": [
{
"product_id": "prod_xyz789ghi012",
"error": "Product not found"
}
],
"summary": {
"total": 3,
"successful": 2,
"failed": 1
}
}