URL Rewrites
A URL rewrite sends a shopper who requests one path to a different target path — a manual redirect you control. It mirrors the admin Marketing → Search & SEO → URL Rewrites screen.
How a URL rewrite works
A rewrite maps a source path to a target path for a given storefront entity and locale.
- What it points at —
entityTypeties the rewrite to aproduct,category, orcms_page.requestPathis the path a shopper requests;targetPathis where they end up. - How it redirects —
redirectTypeis either301(permanent) or302(temporary). A301tells search engines the move is permanent and transfers ranking; a302signals a temporary detour. - Where it applies —
localescopes the rewrite to a single storefront locale.
Why it matters. When a slug changes — a renamed product, a moved category, an updated CMS page — old bookmarks and search-engine links would otherwise break. A rewrite keeps those links alive by forwarding them to the new path.
Relation to other menus. Bagisto also creates rewrites automatically when a slug changes. The entries here are the ones you add or adjust by hand, complementing those automatic rewrites.
Operations in this menu
| Action | Endpoint |
|---|---|
| List | GET /api/admin/marketing/url-rewrites |
| Detail | GET /api/admin/marketing/url-rewrites/{id} |
| Create | POST /api/admin/marketing/url-rewrites |
| Update | PUT /api/admin/marketing/url-rewrites/{id} |
| Delete | DELETE /api/admin/marketing/url-rewrites/{id} |
| Mass Delete | POST /api/admin/marketing/url-rewrites/mass-delete |
All URL Rewrites endpoints require an admin Bearer token — see Authentication.

