Skip to main content
PUT
/
api
/
v1
/
products
/
:id.json
Update Product
curl --request PUT \
  --url https://api.launchmystore.io/api/v1/products/:id.json \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "description": "<string>",
  "handle": "<string>",
  "vendor": "<string>",
  "product_type": "<string>",
  "categoryId": "<string>",
  "categoryIds": [
    {}
  ],
  "status": "<string>",
  "tags": [
    {}
  ],
  "variants": [
    {
      "id": "<string>",
      "title": "<string>",
      "price": 123,
      "compare_at_price": 123,
      "sku": "<string>",
      "barcode": "<string>",
      "weight": 123,
      "weight_unit": "<string>"
    }
  ],
  "images": [
    {
      "id": "<string>",
      "src": "<string>",
      "alt": "<string>",
      "position": 123
    }
  ]
}
'
{
  "success": true,
  "data": {}
}

Update Product

Updates an existing product. Only include the fields you want to update.

Request

curl -X PUT "https://api.launchmystore.io/api/v1/products/prod_abc123.json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Classic T-Shirt - Updated",
    "status": "active",
    "tags": ["cotton", "casual", "bestseller"]
  }'

Path Parameters

id
string
required
The unique product ID

Body Parameters

All body parameters are optional. Only include the fields you want to update.
title
string
The product title
description
string
Product description (supports HTML)
handle
string
URL-safe handle
vendor
string
Product vendor/brand name
product_type
string
Product type or category
categoryId
string
Primary category ID (legacy single-category FK on the product row). If you set this without categoryIds, the backend auto-mirrors the value into the ProductCategories many-to-many join so the product shows up on /collections/{handle} listings. Safe to send on its own for single-category products.
categoryIds
array
Array of category IDs for the many-to-many ProductCategories join. This is the relation storefront collection pages and the collection.products Liquid drop list from. The first entry (or the one matching categoryId) is stored as the primary association. Use this when a product belongs to multiple categories.Behaviour:
  • If categoryIds is supplied, it fully replaces the existing associations.
  • If only categoryId is supplied, the backend treats it as categoryIds: [categoryId].
  • If both are supplied and categoryId is in categoryIds, it stays the primary; otherwise the first valid id in categoryIds becomes primary.
status
string
Product status: active, draft, archived
tags
array
Array of tags (replaces existing tags)
variants
array
Array of variants to update or create
images
array
Array of images to update or add

Response

success
boolean
Whether the request succeeded
data
object
The updated product object

Example Response

{
  "success": true,
  "data": {
    "id": "prod_abc123",
    "title": "Classic T-Shirt - Updated",
    "handle": "classic-t-shirt",
    "description": "<p>A comfortable cotton t-shirt.</p>",
    "vendor": "MyBrand",
    "product_type": "Apparel",
    "status": "active",
    "tags": ["cotton", "casual", "bestseller"],
    "variants": [
      {
        "id": "var_xyz789",
        "title": "Small / Black",
        "price": 2500,
        "sku": "TSHIRT-S-BLK",
        "inventory_quantity": 50
      }
    ],
    "images": [
      {
        "id": "img_123",
        "src": "https://cdn.launchmystore.io/images/tshirt.jpg",
        "position": 1
      }
    ],
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-25T15:00:00Z"
  }
}

Error Codes

CodeDescription
UNAUTHORIZEDInvalid or missing access token
FORBIDDENApp doesn’t have write_products scope
NOT_FOUNDProduct with the specified ID does not exist
VALIDATION_ERRORInvalid request body
DUPLICATE_HANDLEA product with this handle already exists