Skip to main content
POST
/
v1
/
collections
TypeScript SDK
import { Solifyn } from 'solifyn';

const solifyn = new Solifyn({ apiKey: 'your_private_api_key_here' });

// Create a new product collection
const collection = await solifyn.collections.create({
  name: 'Bestsellers',
  description: 'Top performing SaaS and Digital assets'
});
console.log('Collection Created:', collection);
{
  "id": "col_123",
  "name": "Summer Bundle",
  "status": "ACTIVE",
  "businessId": "biz_4r5t6y7u8i9o",
  "isPermanentlyDeleted": false,
  "createdAt": "2025-01-01T12:00:00Z",
  "updatedAt": "2025-01-01T12:00:00Z",
  "description": "Everything you need for summer.",
  "imageUrl": "https://example.com/image.png",
  "products": [
    {
      "id": "prod_NG0mkkz0Awitk",
      "quantity": 1
    }
  ]
}

Authorizations

Authorization
string
header
required

Authenticate requests using your standard bearer API key (e.g. YOUR_API_KEY).

Body

application/json
name
string
required

The friendly name of the collection

Example:

"Winter Course Bundle"

products
object[]
required

List of products to include in this collection. At least one product is required.

description
string

A detailed description of this collection

Example:

"Get all our premium programming courses at a highly discounted price."

imageUrl
string

The display cover image URL for this collection

Example:

"https://images.unsplash.com/photo-123"

status
enum<string>

The collection status

Available options:
ACTIVE,
ARCHIVED
Example:

"ACTIVE"

Response

201 - application/json

Collection created successfully.

id
string<uuid>
required

The collection ID

Example:

"col_123"

name
string
required

The name of the collection

Example:

"Summer Bundle"

status
enum<string>
required

Status of the collection

Available options:
ACTIVE,
ARCHIVED
Example:

"ACTIVE"

businessId
string
required

The unique identifier of the business owning this collection.

Example:

"biz_4r5t6y7u8i9o"

isPermanentlyDeleted
boolean
required

Indicates if the collection has been permanently deleted.

Example:

false

createdAt
string<date-time>
required

Timestamp when the collection was created

Example:

"2025-01-01T12:00:00Z"

updatedAt
string<date-time>
required

Timestamp when the collection was last updated

Example:

"2025-01-01T12:00:00Z"

description
string | null

A brief description of the collection

Example:

"Everything you need for summer."

imageUrl
string | null

URL of the collection image

Example:

"https://example.com/image.png"

products
object[]

List of product references (id + quantity). Full product details are available via GET /products/:id.