younifyd
Menu

Get Category

Get Category

GET/organizations/{organizationId}/categories/{id}

Use it in a workflow

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

Request

Path parameters

idstringrequired

The ID of the requested category.

organizationIdstringrequired

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](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).

Query parameters

levelsinteger (int32)

Specifies how many levels of nested subcategories you want the server to return. The default value is 1. Valid values are 0, 1, or 2. Only online subcategories are returned.

One of012

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.

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.

Response

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

categoriesarray<object>

Array of subcategories. Can be empty.

descriptionstring

The localized description of the category.

idstring

The ID of the category.

imagestring

The URL of the category image.

namestring

The localized name of the category.

onlineSubCategoriesCountinteger (int64)

The total number of online sub-categories. This information will be available from B2C Commerce version 24.5.

pageDescriptionstring

The localized page description of the category.

pageKeywordsstring

The localized page keywords of the category.

pageTitlestring

The localized page title of the category.

parentCategoryIdstring

The ID of the parent category.

parentCategoryTreearray<object>

The List of the parent categories.

idstring

The id of the category path.

namestring

The name of the category path.

thumbnailstring

The URL of the category thumbnail.

json
{
  "id": "mens",
  "categories": [
    {}
  ],
  "description": "Category description for Men's Category",
  "image": "https://example.com/images/large/mens-category.jpg",
  "name": "Mens",
  "onlineSubCategoriesCount": 20,
  "pageDescription": "This category ahs all men's clothing",
  "pageKeywords": "Mens, shirts",
  "pageTitle": "Men's Category",
  "parentCategoryId": "apparel",
  "parentCategoryTree": [
    {
      "id": "mens",
      "name": "mens"
    }
  ],
  "thumbnail": "https://www.exampleimage.com/images/categoryImage.jpg"
}

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

Was this page helpful?