younifyd
Menu

Get Url Mapping

Get URL mapping information for a URL segment.

GET/organizations/{organizationId}/url-mapping

Use it in a workflow

  1. Add a step and choose the Salesforce Commerce Cloud connector.
  2. Pick the Get Url Mapping action (under Shopper SEO).
  3. Fill in the fields below, then reference the result from later steps as {{getUrlMapping.response.data}}.

Request

Path parameters

organizationIdstringrequired

An identifier for the organization the request is being made by

Query parameters

urlSegmentstringrequired

The part of the requested URL that comes after the domain name. For example, the urlSegment for \"www.abc.com/blue/new-arrivals/tops\" is \"blue/new-arrivals/tops\". There's no limit on the length of the urlSegment. However, for this endpoint, the maximum allowed length of the URL (after URL encoding) is 2047 characters. Make this field URL-encoded so that it properly handles special values such as whitespace. If a urlSegment includes a query string, a 404 error code is returned.

siteIdstringrequired

The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.

localeoneOf

A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.

Response

Returns 200 with an object. Read it in later steps with {{getUrlMapping.response.data.<field>}}.

resourceTypeenum

The type of resource that corresponds to the requested URL. If you set up a URL redirect in Business Manager, resourceType returns the corresponding destination type value from the redirect. If there's a URI redirect, resourceType isn't returned. The URL redirect feature is available from B2C Commerce version 24.3.

One ofCATEGORYPRODUCTCONTENT_ASSET

resourceSubTypeenum

If the resourceType is CONTENT_ASSET, this field tells you whether the resource is a standard content asset or a Page Designer content asset. This output is available from B2C Commerce version 24.2.

One ofSTANDARD_CONTENT_ASSETPAGE_DESIGNER_CONTENT_ASSET

resourceIdany

The identifier for the resource that corresponds to the requested URL. If you set up a URL redirect in Business Manager, resourceId returns the corresponding destination ID value from the redirect. If there's a URI redirect, resourceId isn't returned. The URL redirect feature is available from B2C Commerce version 24.3.

refinementsobject

The refinement filters that correspond to the URL and resourceType. Refinements are returned only if all of these conditions are met - a) the resourceType is CATEGORY, b) refinements are included in the urlSegment, and c) the refinements are configured in Business Manager. This field returns a key-value pair of refinement name and refinement value. If there’s a matching URL redirect for the requested URL. the refinements output isn’t returned. The URL redirect feature is available from B2C Commerce version 24.3.

statusCodeinteger (int32)

This field is populated only if you set up a URL redirect in Business Manager. It specifies whether the redirect is temporary (302 or 307) or permanent (301). See [Create a Redirect from a B2C Commerce URL.](https://help.salesforce.com/s/articleView?id=cc.b2c_creating_a_redirect_from_a_digital_url.htm&type=5) This parameter is available from B2C Commerce version 24.3.

destinationUrlstring

This field is populated if the urlSegment resolves to a redirect. Specifies the URL you want to redirect to as an absolute or relative URL. The destinationUrl is based on your configuration in Business Manager. It's either a calculated value indicating the Commerce Cloud object (product, category, or content asset) URL or your specified URL. Note that an object's path may not necessarily match your headless storefront URLs but can be used as a reference for calculating the destinationUrl. See [Create a Redirect from a B2C Commerce URL.](https://help.salesforce.com/s/articleView?id=cc.b2c_creating_a_redirect_from_a_digital_url.htm&type=5). Available from B2C Commerce 24.3.

copySourceParamsboolean

This field is populated only if you set up a URL redirect in Business Manager. It’s a flag that shows whether the parameters of the source URL have been copied to the destination URL. This parameter is available from B2C Commerce version 24.3.

additionalUrlParamsstring

This field is populated only if you set up a URL redirect in Business Manager. It returns the parameters you want to add to the end of the URL. This parameter is available from B2C Commerce version 24.3.

productCategoryIdany

This field is populated only if you set up a URL redirect in Business Manager. It identifies the destination product's category ID. This field is returned only when the destination type is product. This parameter is available from B2C Commerce version 24.3.

json
{
  "resourceType": "CATEGORY",
  "resourceSubType": "STANDARD_CONTENT_ASSET",
  "resourceId": "mens-clothing-shorts",
  "refinements": {},
  "statusCode": 301,
  "destinationUrl": "mens/clothing/shorts",
  "copySourceParams": true,
  "additionalUrlParams": "&cgid=womens-accessories-scarves&prefn1=displaySize",
  "productCategoryId": null
}

Need more? See the Salesforce Commerce Cloud guide for connection setup and behaviour shared by every action.

Was this page helpful?
Get Url Mapping — Salesforce Commerce Cloud — Documentation