commerce/settings/general/customroutes

Use the Custom Routes resource to manage your custom route settings. Custom routing allows you to display SEO-friendly URLs on your site that map behind-the-scenes to conventional Kibo eCommerce resources such as a product page or a search results page. With custom routing, you gain advanced control over the URL structures on your site and can more visibly highlight the products or categories your shoppers are interested in purchasing.

To learn more about custom routing, refer to the Custom Route Settings topic.

JSON Example

CustomRouteSettings Properties

Property Description
mappings

type: System.String,Mozu.SiteSettings.General.Contracts.General.Routing.Mapping

The mappings configured for the site. Mappings allow you to map the values of URL parameters to other JSON variables or to Kibo eCommerce objects such as facet values.

routes

type: list of route

The routes configured for the site. Routes contain all the information necessary to match incoming URLs to a specific page in Kibo eCommerce.

route.canonical

type: bool

When true, specifies that the route is a canonical route.

route.defaults

type: System.String,System.Object

An array of key-value pairs that provide default values for required route parameters.

route.functionId

type: string

For Arc.js routes, specifies the Arc.js function name to create a route to. For example:

"internalRoute": "Arcjs",
"functionId": "yourFunctionName"

route.internalRoute

type: string

Specifies the internal route to use for a particular URL template. For example, the "ProductDetails" internal route routes matching URLs to a product page.

route.mappings

type: System.String,System.String[]

The list of mappings that a particular route uses.

route.template

type: string

Specifies the pattern of URL constants, variables, and segments that result in a match for a particular route.

route.urlScheme

type: string

Specifies whether a custom route uses an http or https protocol. This allows you to set encryption on a route generated from a non-secure request, or vice-versa.

route.validators

type: System.String,System.String[]

Specifies the validators that a particular route uses.

validators

type: System.String,Mozu.SiteSettings.General.Contracts.General.Routing.Validator

The validators configured for a site. Validators require that URL parameters meet certain conditions before Kibo eCommerce considers the template a match.

Operations

Operation Name Request URI Description
CreateCustomRouteSettings POST customroutes%3fresponseFields%3d%7bresponseFields%7d

Create new custom route settings.

DeleteCustomRouteSettings DELETE customroutes

Deletes all the custom route settings for a site, returning all routes to their Kibo eCommerce defaults.

GetCustomRouteSettings GET customroutes%3fresponseFields%3d%7bresponseFields%7d

Retrieves the custom route settings configured for a site. These are the same settings configured through Admin in the Custom Routing JSON Editor.

UpdateCustomRouteSettings PUT customroutes%3fresponseFields%3d%7bresponseFields%7d

Updates custom route settings.