Skip to main content
PUT
/
api
/
v1
/
collections
/
{id}
.json
Update Collection
curl --request PUT \
  --url https://api.launchmystore.io/api/v1/collections/{id}.json \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "description": "<string>",
  "handle": "<string>",
  "published": true,
  "sort_order": "<string>",
  "template_suffix": "<string>",
  "image": {},
  "rules": [
    {}
  ],
  "disjunctive": true,
  "seo": {}
}
'
{
  "success": true,
  "data": {}
}

Documentation Index

Fetch the complete documentation index at: https://docs.launchmystore.io/llms.txt

Use this file to discover all available pages before exploring further.

Update Collection

Updates an existing collection. Only provided fields will be updated.

Request

curl -X PUT "https://api.launchmystore.io/api/v1/collections/col_abc123.json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Summer Collection 2024",
    "description": "<p>Updated summer styles for 2024.</p>",
    "sort_order": "price-asc"
  }'

Path Parameters

id
string
required
The unique collection ID to update

Body Parameters

All parameters are optional. Only provided fields will be updated.
title
string
The collection title
description
string
Collection description (supports HTML)
handle
string
URL-safe handle
published
boolean
Whether the collection is published
sort_order
string
Product sort order: manual, best-selling, alpha-asc, alpha-desc, price-asc, price-desc, created-asc, created-desc
template_suffix
string
Custom template suffix for theming
image
object
Collection featured image. Set to null to remove.
rules
array
Automated collection rules. Replacing rules converts between manual and smart collections.
disjunctive
boolean
Rule matching logic (OR vs AND)
seo
object
SEO metadata

Managing Products

To add or remove products from a manual collection, use the dedicated endpoints:
  • POST /api/v1/collections/:id/products.json - Add products
  • DELETE /api/v1/collections/:id/products.json - Remove products

Response

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

Example Response

{
  "success": true,
  "data": {
    "id": "col_abc123",
    "title": "Summer Collection 2024",
    "handle": "summer-collection",
    "description": "<p>Updated summer styles for 2024.</p>",
    "published": true,
    "published_at": "2024-03-01T10:00:00Z",
    "sort_order": "price-asc",
    "template_suffix": null,
    "image": {
      "id": "img_456",
      "src": "https://cdn.launchmystore.io/images/summer-banner.jpg",
      "alt": "Summer Collection"
    },
    "products_count": 24,
    "rules": [],
    "disjunctive": false,
    "seo": {
      "title": null,
      "description": null
    },
    "created_at": "2024-03-01T10:00:00Z",
    "updated_at": "2024-03-20T09:15:00Z"
  }
}

Error Codes

CodeDescription
UNAUTHORIZEDInvalid or missing access token
FORBIDDENApp doesn’t have write_products scope
NOT_FOUNDCollection with the specified ID does not exist
VALIDATION_ERRORInvalid request body (see error details)
DUPLICATE_HANDLEA collection with this handle already exists