Class ShopperSEO<ConfigParameters>

Shopper SEO

*# API Overview

The Shopper SEO API Provides access to SEO-related information, such as URL mapping information.

Authentication & Authorization

The Shopper SEO API requires a shopper access token from the Shopper Login and API Access Service (SLAS).

You must include the relevant scope(s) in the client ID used to generate the SLAS token. For details, see Authorization Scopes Catalog.

Use Cases

URL Resolution

For information on setting up URL rules and URL redirects in Business Manager, see URL Resolution.

Caching

Caching capabilities are available for the Shopper SEO API. For details, see Server-Side Web-Tier Caching.

Using Hooks

For details working with hooks, see Extensibility with Hooks.*

Simple example:

  import { ShopperSEO } from "commerce-sdk-isomorphic";

const clientConfig = {
parameters: {
clientId: "XXXXXX",
organizationId: "XXXX",
shortCode: "XXX",
siteId: "XX"
}
};
const shopperSEOClient = new ShopperSEO(clientConfig);
API Version: 0.0.33
Last Updated:

Type Parameters

Hierarchy

  • ShopperSEO

Constructors

Methods

  • The mapping information is based on URL rules and redirects that are 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. For details, refer to the Hook List.

    If you would like to get a raw Response object use the other getUrlMapping function.

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{
          headers?: {
              [key: string]: string;
          };
          parameters?: {
              [K in string | number]: (Omit<{
                  locale?: string;
                  organizationId: string;
                  siteId: string;
                  urlSegment: string;
              } & QueryParameters, keyof ConfigParameters> & Partial<{
                  locale?: string;
                  organizationId: string;
                  siteId: string;
                  urlSegment: string;
              } & QueryParameters>)[K]
          };
      }>

      An object containing the options for this method.

    Returns Promise<UrlMapping>

    A promise of type UrlMapping.

  • The mapping information is based on URL rules and redirects that are 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. For details, refer to the Hook List.

    Type Parameters

    • T extends boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{
          headers?: {
              [key: string]: string;
          };
          parameters?: {
              [K in string | number]: (Omit<{
                  locale?: string;
                  organizationId: string;
                  siteId: string;
                  urlSegment: string;
              } & QueryParameters, keyof ConfigParameters> & Partial<{
                  locale?: string;
                  organizationId: string;
                  siteId: string;
                  urlSegment: string;
              } & QueryParameters>)[K]
          };
      }>

      An object containing the options for this method.

    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true
        ? Response
        : UrlMapping>

    A promise of type Response if rawResponse is true, a promise of type UrlMapping otherwise.

Properties

clientConfig: ClientConfig<ConfigParameters> & {
    baseUri: string;
}

Type declaration

  • baseUri: string
apiPaths: {
    getUrlMapping: string;
}

Type declaration

  • getUrlMapping: string
defaultBaseUri: "https://{shortCode}.api.commercecloud.salesforce.com/site/shopper-seo/v1" = "https://{shortCode}.api.commercecloud.salesforce.com/site/shopper-seo/v1"
paramKeys: {
    getUrlMapping: readonly ["organizationId", "urlSegment", "siteId", "locale"];
    getUrlMappingRequired: readonly ["organizationId", "urlSegment", "siteId"];
}

Type declaration

  • Readonly getUrlMapping: readonly ["organizationId", "urlSegment", "siteId", "locale"]
  • Readonly getUrlMappingRequired: readonly ["organizationId", "urlSegment", "siteId"]