v1

latestOpenAPI 3.1.0MIT2026-07-243952451019.0 KB
Products::Collection

Create Collection

Create Collection

post/workspaces/{workspace_id}/products/collections

Path parameters

workspace_idinteger required

Request body

Example request

{
  "products_collection": {
    "products_collection": {
      "name": "Example Collection",
      "description": "Example Description",
      "collection_type": "manual",
      "product_ids": [],
      "sort_method": "manually",
      "image_id": null,
      "visible_in_store": true,
      "seo_title": "Example SEO Title",
      "seo_description": "Example SEO Description",
      "social_image_id": null
    }
  }
}

Response

Created

idinteger

Numeric ID of the collection

public_idstring nullable

Public ID is a string version of the numeric ID

workspace_idinteger

ID reference to the workspace to which the collection belongs

namestring

Name of the products collection

descriptionstring nullable

Description of the collection

collection_typestring nullable

Type of the collection (manual or automatic)

{"stackTrail":"components:schemas:ProductsCollectionAttributes:properties:product_ids","oasType":"schema","type":"unknown","description":"Array of product IDs in the collection. Updating with invalid or non-workspace product IDs will result in an error. If IDs from existing products in the collection are left out, they will be removed from the collection. You can also remove all the products from a collection by providing an empty array."}
sort_method'manually' | 'name_asc' | 'name_desc' | 'price_desc' | 'price_asc' | 'added_at_desc' | 'added_at_asc' | 'created_at_desc' | 'created_at_asc' nullable

Method used to sort the products in the collection

archivedboolean nullable

Whether the collection is archived

image_idstring nullable

Collection image

visible_in_storeboolean nullable

Whether the collection is visible in the online store

current_pathstring nullable

Current path of the collection

seo_titlestring nullable

Title of the collection for SEO purposes

seo_descriptionstring nullable

Description of the collection for SEO purposes

seo_indexablestring nullable

Whether the collection is indexable by search engines

social_image_idstring nullable

Image for social sharing

created_atstring nullable

Date and time the collection was created

updated_atstring nullable

Date and time the collection was last updated

Example response

{
  "id": 1,
  "public_id": "bkDhwu",
  "workspace_id": 42000,
  "name": "Example Collection",
  "description": "Example Description",
  "collection_type": "manual",
  "product_ids": [],
  "sort_method": "manually",
  "archived": false,
  "image_id": null,
  "visible_in_store": true,
  "current_path": null,
  "seo_title": "Example SEO Title",
  "seo_description": "Example SEO Description",
  "seo_indexable": null,
  "social_image_id": null,
  "created_at": null,
  "updated_at": null
}