Skip to main content
POST
/
api
/
v1
/
collections.json
Create Collection
curl --request POST \
  --url https://api.launchmystore.io/api/v1/collections.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": {
    "src": "<string>",
    "alt": "<string>"
  },
  "rules": [
    {
      "column": "<string>",
      "relation": "<string>",
      "condition": "<string>"
    }
  ],
  "disjunctive": true,
  "seo": {
    "title": "<string>",
    "description": "<string>"
  }
}
'
{
  "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.

Create Collection

Creates a new collection in the store. Collections can be manual (products added individually) or smart (products added automatically based on rules).

Request

curl -X POST "https://api.launchmystore.io/api/v1/collections.json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Summer Collection",
    "description": "<p>Our latest summer styles.</p>",
    "published": true,
    "sort_order": "best-selling",
    "image": {
      "src": "https://example.com/summer-banner.jpg",
      "alt": "Summer Collection"
    }
  }'

Body Parameters

title
string
required
The collection title
description
string
Collection description (supports HTML)
handle
string
URL-safe handle. Auto-generated from title if not provided
published
boolean
default:"false"
Whether the collection is published and visible on the storefront
sort_order
string
default:"manual"
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 (e.g., summer for collection.summer.liquid)
image
object
Collection featured image
rules
array
Automated collection rules (creates a smart collection)
disjunctive
boolean
default:"false"
If true, products match ANY rule (OR logic). If false, products must match ALL rules (AND logic).
seo
object
SEO metadata

Response

success
boolean
Whether the request succeeded
data
object
The created collection object (same structure as Get Collection response)

Example Response

{
  "success": true,
  "data": {
    "id": "col_new789",
    "title": "Summer Collection",
    "handle": "summer-collection",
    "description": "<p>Our latest summer styles.</p>",
    "published": true,
    "published_at": "2024-03-01T10:00:00Z",
    "sort_order": "best-selling",
    "template_suffix": null,
    "image": {
      "id": "img_new123",
      "src": "https://cdn.launchmystore.io/images/summer-banner.jpg",
      "alt": "Summer Collection"
    },
    "products_count": 0,
    "rules": [],
    "disjunctive": false,
    "seo": {
      "title": null,
      "description": null
    },
    "created_at": "2024-03-01T10:00:00Z",
    "updated_at": "2024-03-01T10:00:00Z"
  }
}

Smart Collection Example

Create a collection that automatically includes all products tagged “summer”:
{
  "title": "Summer Styles",
  "rules": [
    {
      "column": "tag",
      "relation": "equals",
      "condition": "summer"
    }
  ],
  "published": true
}

Error Codes

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