Collection Events
Documentation for collection-related webhook events
This section covers all webhook events related to collections, including collection updates, deletions, and product relationships.
Event Types
The following collection-related events are available:
collection.create- Triggered when a collection is createdcollection.update- Triggered when a collection is updatedcollection.deleted- Triggered when a collection is deletedcollection_relationship.created- Triggered when a product is added to a collectioncollection_relationship.deleted- Triggered when a product is removed from a collection
Collection Created/Updated Event
The collection.create and collection.update events are triggered when a collection is created or modified.
Event Structure
{
"event_type": "collection.update",
"payload": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"slug": "new-arrivals",
"title": "New Arrivals",
"full_uri": "new-arrivals",
"status": "active",
"parent_id": null,
"translations": {
"title": [
{
"country_code": "us",
"value": "New Arrivals"
},
{
"country_code": "es",
"value": "Novedades"
}
],
"slug": [
{
"country_code": "es",
"value": "novedades"
}
]
},
"created_at": "2024-02-12T12:00:00Z",
"updated_at": "2024-02-12T12:00:00Z"
}
}
Field Descriptions
| Field | Type | Description |
|---|---|---|
id |
string | Unique identifier for the collection |
slug |
string | URL slug of the collection |
title |
string | Display title of the collection |
full_uri |
string | Full URI of the collection, omitted when empty |
status |
string | Collection status (active, inactive, draft) |
parent_id |
string | null | Identifier of the parent collection, or null for a root collection |
translations |
object | Localized title and slug for the collection |
created_at |
string | Creation timestamp |
updated_at |
string | Last update timestamp |
Collection Deleted Event
The collection.deleted event is triggered when a collection is removed from the system.
Event Structure
{
"event_type": "collection.deleted",
"payload": {
"id": "123e4567-e89b-12d3-a456-426614174000"
}
}
Field Descriptions
| Field | Type | Description |
|---|---|---|
id |
string | Unique identifier of the deleted collection |
Collection Relationship Created Event
The collection_relationship.created event is triggered when a product is added to a collection.
Event Structure
{
"event_type": "collection_relationship.created",
"payload": {
"product_id": "123e4567-e89b-12d3-a456-426614174001",
"collection": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"slug": "new-arrivals",
"title": "New Arrivals",
"full_uri": "new-arrivals",
"status": "active",
"parent_id": null,
"translations": {
"title": [],
"slug": []
},
"created_at": "2024-02-12T12:00:00Z",
"updated_at": "2024-02-12T12:00:00Z"
}
}
}
Field Descriptions
| Field | Type | Description |
|---|---|---|
product_id |
string | Identifier of the product added to the collection |
collection |
object | The collection the product was added to, using the structure above |
Collection Relationship Deleted Event
The collection_relationship.deleted event is triggered when a product is removed from a collection.
Event Structure
{
"event_type": "collection_relationship.deleted",
"payload": {
"product_id": "123e4567-e89b-12d3-a456-426614174001",
"collection_id": "123e4567-e89b-12d3-a456-426614174000"
}
}
Field Descriptions
| Field | Type | Description |
|---|---|---|
product_id |
string | Identifier of the product removed from the collection |
collection_id |
string | Identifier of the collection the product was removed from |