Skip to main content

Create a hierarchy

POST 

/pcm/hierarchies

Creates a hierarchy with a name, description, and slug to organize products in your catalog.

Custom Attributes

Custom attributes allow you to extend the data model with your own key-value data.

You can define up to 100 custom attributes in each group (shopper_attributes and admin_attributes). Both keys and values must be strings.

  • shopper_attributes are visible in shopper-facing catalogs and accessible to both shoppers and administrators. Ideal for customer-facing data, such as promotional labels or product tags.
  • admin_attributes are private and not visible in catalogs. Best suited for internal operational data, such as cost tracking or workflow metadata.

See Custom Attributes.

Request

Body

required
    data objectrequired
    type stringrequired

    Possible values: [hierarchy]

    This represents the type of resource object being returned. Always hierarchy.

    attributes objectrequired
    name string

    The name of the hierarchy, such as Major Appliances.

    description string

    A description of the hierarchy.

    slug string

    A unique slug for the hierarchy.

    admin_attributes object

    admin_attributes are not displayed in catalogs. This means admin_attributes can only be viewed by administrators. If you want a custom attribute to be displayed in a catalog, you must add it to shopper_attributes.

    admin_attributes are structured as key-value pairs. Both the keys and values are strings. You can have up to 100 keys.

    property name* stringnullable
    shopper_attributes object

    shopper_attributes are displayed in catalogs. This means shopper_attributes can be viewed by both shoppers and administrators. If you do not want a custom attribute to be displayed in a catalog, you must add it to admin_attributes.

    shopper_attributes are structured as key-value pairs. Both the keys and values are strings. You can have up to 100 keys.

    property name* stringnullable
    locales object

    Product Experience Manager supports localization of products and hierarchies. If your store supports multiple languages, you can localize product names and descriptions. You can have as many locales as you want.

    property name* object

    A three-letter language code that represents the name of language you have used.

    name string

    A localized name for the hierarchy.

    description string

    A localized description for the hierarchy.

Responses

Returns a created hierarchy with the following attributes.

Schema
    data objectrequired
    id stringrequired

    A unique identifier generated when a hierarchy is created.

    type stringrequired

    Possible values: [hierarchy]

    This represents the type of resource object being returned. Always hierarchy.

    attributes objectrequired
    name string

    The name of a hierarchy, such as Major Appliances.

    description string

    A description for a hierarchy.

    slug string

    A unique slug for a hierarchy.

    admin_attributes object

    admin_attributes are not displayed in catalogs. This means admin_attributes can only be viewed by administrators. If you want a custom attribute to be displayed in a catalog, you must add it to shopper_attributes.

    admin_attributes are structured as key-value pairs. Both the keys and values are strings. You can have up to 100 keys.

    property name* stringnullable
    shopper_attributes object

    shopper_attributes are displayed in catalogs. This means shopper_attributes can be viewed by both shoppers and administrators. If you do not want a custom attribute to be displayed in a catalog, you must add it to admin_attributes.

    shopper_attributes are structured as key-value pairs. Both the keys and values are strings. You can have up to 100 keys.

    property name* stringnullable
    locales object

    Product Experience Manager supports localization of hierarchies and nodes. If you store supports multiple languages, you can localize hierarchy and node names and descriptions.

    property name* object

    A three-letter language code that represents the name of language you have used.

    name string

    A localized hierarchy or node name.

    description string

    A localized hierarchy or node description.

    relationships objectrequired
    children object

    The child nodes related to the hierarchy.

    data array

    An array of child nodes.

    links object

    Links allow you to move between requests.

    related string

    A link to a related resource.

    meta objectrequired
    created_at date-time

    The date and time a hierarchy is created.

    updated_at date-time

    The date and time a hierarchy is updated.

    owner string

    Possible values: [store, organization]

    The owner of a resource, either organization or store.

Loading...