Match a path against redirects

Returns the redirect that matches `path`. The site's stored rules are tried first and always win. When no stored rule matches, a locale redirect is computed. A leading default-locale segment is dropped (`/en/pricing` to `/pricing` on an English-default site). A source-slug URL goes to its translated URL in that locale. A URL under a locale the site does not enable goes to the same item in the default locale. A computed redirect is a 301 with `preserveQueryString: true`: append the visitor's query string to the target. Returns 404 `REDIRECT_NOT_FOUND` when nothing matches, and 400 when `path` is missing.

Required access
No credentialOptional: publishable keySite access
GET/redirects/match
Base URLhttps://api.lynkow.com/storefront/{siteId}

Query parameters

path
string
required

Source URL path to resolve against the site's active redirect rules.

Feedback

Was this page helpful?