Redirect Events
Documentation for redirect-related webhook events
This section covers all webhook events related to redirects, including redirect creation, updates, and deletions.
Event Types
The following redirect-related events are available:
redirect.upsert- Triggered when a redirect is created or updatedredirect.delete- Triggered when a redirect is deleted
Redirect Upsert Event
The redirect.upsert event is triggered when a redirect is created or updated.
Event Structure
{
"event_type": "redirect.upsert",
"payload": {
"redirect_id": "123e4567-e89b-12d3-a456-426614174000",
"item_id": "223e4567-e89b-12d3-a456-426614174001",
"locale": "en",
"old_uri": "/old-path",
"new_uri": "/new-path"
}
}
Field Descriptions
| Field | Type | Description |
|---|---|---|
redirect_id |
string | Unique identifier for the redirect |
item_id |
string | Optional identifier of the product, category, or collection item the redirect is linked to. Omitted when the redirect is not linked to an item. |
locale |
string | Locale of the redirect |
old_uri |
string | The original URI being redirected |
new_uri |
string | The target URI to redirect to |
Redirect Delete Event
The redirect.delete event is triggered when a redirect is removed from the system.
Event Structure
{
"event_type": "redirect.delete",
"payload": {
"redirect_id": "123e4567-e89b-12d3-a456-426614174000"
}
}
Field Descriptions
| Field | Type | Description |
|---|---|---|
redirect_id |
string | Unique identifier of the deleted redirect |