GET Get Page Designer pages.
GET /organizations/{organizationId}/pages
Operation ID: getPages. Security: ShopperToken (sfcc.shopper-experience, sfcc.shopper-experience.pages, sfcc.shopper-standard); ShopperClientContextToken (sfcc.shopper-experience, sfcc.shopper-experience.pages, sfcc.shopper-standard).
Get Page Designer pages. The results apply the visibility rules for each page's components, such as personalization or scheduled visibility.
You must provide the aspectTypeId along with either a categoryId or a productId. Since you can only create one page-to-product or page-to-category assignment per aspect type, the result contains at most one element.
Important:
- Currently, you can't use the Shopper Experience Pages endpoints when the storefront password protection feature is enabled.
- Because this resource uses the GET method, you must not pass sensitive data, for example: payment card information, and must not perform transactional processes within the server-side scripts that are run for the page and components.
- Be aware that pagecache during fingerprint calculation will only be leveraged for pages and their components that don't use visibility rules. Furthermore the pagecaching of the actual response assembly solely depends on the response instrumentation with the serverside page type and component type script implementations. For more details also see the Page Designer Caching Guide.
Parameters
organizationId(path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character realm identifier and a 3-character instance type identifier.Example
f_ecom_zzxy_prdcategoryId(query, string) Category identifier that is used for searching the page assignment. Must be provided if noproductIdis provided.
Maximum length: 256. Example:home-clearance.productId(query, string) Product identifier that is used for searching the page assignment. Must be provided if nocategoryIdis provided.
Maximum length: 100. Example:iphone11.aspectTypeId(query, string, required) Aspect type identifier that is used for searching the page assignment in conjunction with either theproductIdorcategoryId.
Maximum length: 256. Example:pdp.aspectAttributes(query, string) A JSON representation of aspect attributes. Each aspect attribute is a key/value pair. Aspect attributes serve as a runtime parameter contract between caller (for example, this API or the DWScript API) and callee (the page). This parameter must not contain more than 256 characters after URL decoding.
Maximum length: 256. Example:{ "product" : "iphone11", "breadcrumbCategory" : "home-clearance" }.parameters(query, string) A free-form definition of parameters that influences the page rendering according to its implementation. This parameter must not contain more than 256 characters after URL decoding.
Maximum length: 256. Example:refine=color,size;currency=USD;showNavigation=false.siteId(query, SiteId, required) 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.Example: SiteId
RefArchlocale(query, LocaleCode) 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 parameterAccept-Languagefollowing RFC 2616 & RFC 1766. 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.Example: LanguageCountry
en-USExample: CountryCode
USsfdc_usid(header, string (uuid)) A unique shopper identifier (USID) for tracking client context. Used with endpoints secured with ShopperClientContextToken. This header is required for all endpoints secured with ShopperClientContextToken.
Example:550e8400-e29b-41d4-a716-446655440000.personalized(query, string) Controls whether personalization is applied to the response. When set tonone, the server skips applying personalization to the response.
Allowed values:none. Example:none.sfdc_shopper_context(header, string) Shopper context information (for example clientIP, sourceCode, and customQualifiers) passed in from a trusted backend application.
Responses
- 200
Success.
Media type:
application/json. Schema:PageResult.Example: PageResult
{ "data": [ { "id": "homePpage", "typeId": "storePage", "aspectTypeId": "pdpAspect", "name": "Homepage", "description": "Home page of the storefront.", "pageTitle": "Homepage - My Shop", "pageDescription": "Get started shopping", "pageKeywords": "fashion, my shop", "data": { "thumbnail": "myshop.jpg" }, "custom": { "thumbnail_full": "http://static.myshop.com/myshop.jpg" }, "visible": true, "localized": true, "designMetadata": { "id": "storePage", "name": "Store Page", "archType": "headless" }, "regions": [ { "id": "header", "components": [ { "id": "2192f5b9aac0f2af2385f6f6b7", "typeId": "commerce_assets.banner", "name": "Sale Banner", "fragment": false, "embedded": false, "contentLinkUuid": "a7b2c4d8e1f9032a5b6c7d8e9f0", "data": { "title": "Products On Sale", "bannerImage": "sale/topsellerPromo.jpg" }, "localized": true, "visible": true, "custom": { "thumbnail_full": "http://static.myshop.com/sale/topsellerPromo.jpg" }, "designMetadata": { "id": "commerce_assets.banner", "name": "Banner Component", "archType": "headless" } } ] }, { "id": "main", "components": [ { "id": "5c5ebbcd2aee1a67af519c83b5", "typeId": "commerce_assets.carousel", "name": "Topseller Carousel", "fragment": false, "embedded": false, "contentLinkUuid": "3f8e2a1b5c9d7e4f0a2b3c6d8e1", "data": { "title": "Topseller", "category": "topseller" }, "localized": true, "visible": true, "custom": { "detailUrl": "www.myshop.com/topseller" }, "designMetadata": { "id": "commerce_assets.carousel", "name": "Carousel Component", "archType": "headless" }, "regions": [ { "id": "tiles", "components": [ { "id": "d98a30dfe93715e3e6fc22a329", "typeId": "commerce_assets.productTile", "fragment": true, "embedded": false, "contentLinkUuid": "c4d6e8f0a2b4c6d8e0f2a4b6c8d", "data": { "product": "iphone6" }, "localized": false, "visible": true }, { "id": "43aa39896afb9292308181ce14", "typeId": "commerce_assets.productTile", "fragment": false, "embedded": false, "contentLinkUuid": "9e1a3c5d7f0b2e4a6c8d0f2b4e6", "data": { "product": "iphone7" }, "localized": true, "visible": false } ] } ] } ] } ] }, { "id": "detailpage", "typeId": "storePage", "name": "storepage", "description": "A Store page", "pageTitle": "A Store", "pageDescription": "Buy in store", "pageKeywords": "fashion, my shop, store", "data": { "thumbnail": "mystore.jpg" }, "visible": true, "localized": false, "designMetadata": { "id": "storePage", "name": "Store Page", "archType": "headless" } } ] } - 400
Business Object ID Invalid
Media type:
application/problem+json. Schema:ErrorResponse.Example: BusinessObjectIDInvalid
{ "title": "Business Object ID Invalid", "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/business-object-id-invalid", "detail": "At least one provided business object identifier was invalid. This means either none was provided at all or exclusiveness of multiple identifiers wasn't honored or the referenced business object didn't exist." } - 404
Requested Aspect Type Not Found
Media type:
application/problem+json. Schema:ErrorResponse.Example: AspectTypeNotFound
{ "title": "Aspect Type Not Found", "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/aspect-type-not-found", "detail": "No aspect type with ID 'pdp' was found in site 'RefArch'." }