• Gets URL mapping information for a URL that a shopper clicked or typed in.

    The mapping information is based on URL rules and redirects set up in Business Manager. For more information about prerequisites and sample usage, see URL Resolution. You can customize the behavior of this endpoint by using hooks.

    Parameters

    • apiOptions: NullableParameters<{
          headers?: {
              [key: string]: string;
          };
          parameters?: {
              locale?: string;
              organizationId?: string;
              siteId?: string;
              urlSegment?: string;
          };
      }>
    • queryOptions: ApiQueryOptions<{
          (options?): Promise<UrlMapping>;
          <T>(options?, rawResponse?): Promise<T extends true
              ? Response
              : UrlMapping>;
      }> = {}

    Returns UseQueryResult<UrlMapping, unknown>

    A TanStack Query query hook with data from the Shopper Seo getUrlMapping endpoint.

    Parameter

    apiOptions - Options to pass through to commerce-sdk-isomorphic, with null accepted for unset API parameters.

    Parameter

    queryOptions - TanStack Query query options, with enabled by default set to check that all required API parameters have been set.

    See