Resolve slug redirect path

View as Markdown
Read-only public-path resolver used before front-end page rendering so changed slug, entity-family, and Business Line parent-family URLs return a permanent HTTP redirect to the current canonical public path, while missing slug URLs return a real 404 before the App Router starts streaming. One profile sub-path segment is preserved across family redirects; the front-end owns the tab inventory. Direct product/service alias paths /companies/products-services/{slug} return 204 for a public Product/Service with a non-hidden eligible provider, with curated alias redirect rows taking precedence; a 404 on a slug-backed path can also mean the record exists but is not yet publicly visible.

Authentication

AuthorizationBearer

User bearer token: Supabase or Clerk session JWT, Clerk OAuth access token, or Clerk personal API key

OR
X-API-Keystring

Admin API key for system-to-system write operations

OR
X-Client-Secretstring

Client secret for read-only service-to-service access (no writes)

Query parameters

pathstringRequired

Public site path, such as /companies/old-slug

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
406
Not Acceptable Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error