Skip to content

Detach a collection from its model

POST
/collections/{handle}/detach
curl --request POST \
--url 'https://acme.mykreezalid.com/api/v1/collections/example/detach?by=handle' \
--header 'Authorization: Basic <credentials>'

Takes a collection made by a collection model out of it, for good: its value leaves the model’s list of values, so that applying the model again does not make a new collection for it. It keeps the conditions it has and, written into it, every field it took from the model: it shows exactly as before, and from then on its fields and conditions are its own. The model’s last value cannot leave it: delete the model instead, and its collections stay online, detached.

handle
required
string

The handle of the collection, or its id with by=id

by
string
default: handle
Allowed values: handle id

How the path names the collection: handle (the default, which also finds an integrator’s source handle) or id. A handle may be made of digits only, so an id is never guessed.

The collection, detached

Media typeapplication/json
Collection

Represents a logical group of listings, such as construction projects or promotions, or a storefront page presenting listings or users. A collection made by a collection model follows its model’s conditions; its fields left null show the model’s patterns.

object
id

Collection’s unique identifier

integer
handle
required

URL-friendly identifier for the collection (slug)

string
title
required

Human-readable title of the collection

string
metadata

Flexible metadata container for the collection

object
parent_handle

Handle of the parent collection, if this is a sub-collection. It is not returned in responses: list a parent’s sub-collections with GET /collections/{parent_handle}.

string
nullable
storefront_enabled

Whether the collection is a storefront page, at /{handle}

boolean
is_online

Whether its page is online

boolean
type

What it presents: listing or user

string
page_title

The title its page shows. On a collection made by a model: null for the model’s pattern, empty for nothing, or its own

string
nullable
subtitle

Same three states as page_title

string
nullable
description

HTML; same three states as page_title

string
nullable
image_alt

Alternative text of the image (the image itself is uploaded in the back office)

string
nullable
rules

Its conditions: inclusion {type: AND or OR, rules: […]} and exclusion […]. Read-only on a collection made by a model

object
template

Suffix of the theme’s collection template; empty, the default one

string
nullable
thumbnail

Snippet drawing each item; empty, the default card of its type

string
nullable
canonical_url

Full URL; never inherited

string
nullable
meta_title

SEO title

string
nullable
meta_description

SEO description

string
nullable
meta_keywords

SEO keywords

string
nullable
no_index

Kept out of search engines; null on a collection made by a model: as the model

boolean
nullable
no_follow

Links not followed; null on a collection made by a model: as the model

boolean
nullable
sitemap_changefreq

Always, hourly, daily, weekly, monthly, yearly or never

string
nullable
sitemap_priority

From 0 to 1

number
nullable
model_id

The id of the collection model it is made by; read-only

integer
nullable
model_handle

The handle of that model; read-only

string
nullable
pivot_value

The model’s value it stands for; read-only

string
nullable
pivot_label

The label of that value; read-only

string
nullable
model_pivot

The criterion its model varies on: type, field (an attribute’s alias) and a readable name

object
created_at

Collection creation date

string format: date-time
updated_at

Date of last update

string format: date-time

Example

{
"id": 432432,
"handle": "soldes",
"title": "Promotions de Printemps",
"metadata": {
"last_updated_at": "2025-07-01T10:00:00Z",
"theme": "blue"
},
"parent_handle": "promos",
"storefront_enabled": true,
"is_online": true,
"type": "listing",
"page_title": "Voitures électriques",
"subtitle": null,
"description": null,
"image_alt": null,
"rules": null,
"template": null,
"thumbnail": null,
"canonical_url": null,
"meta_title": null,
"meta_description": null,
"meta_keywords": null,
"no_index": false,
"no_follow": false,
"sitemap_changefreq": null,
"sitemap_priority": null,
"model_id": null,
"model_handle": null,
"pivot_value": null,
"pivot_label": null,
"model_pivot": {
"type": "attribute",
"field": "marque",
"name": "Marque"
},
"created_at": "2025-07-20T10:30:00Z",
"updated_at": "2025-07-20T14:45:00Z"
}

The collection is not made by a model, or it is the model’s last one

Media typeapplication/json

Why a collection or collection model request was refused.

object
success
boolean
message
string
errors

The problems found: for a collection, field by field, the rules not met and their messages. Present only when there are some.

Example

{
"success": false,
"message": "Collection handle is required"
}

Collection not found

Media typeapplication/json

Why a collection or collection model request was refused.

object
success
boolean
message
string
errors

The problems found: for a collection, field by field, the rules not met and their messages. Present only when there are some.

Example

{
"success": false,
"message": "Collection handle is required"
}