Skip to main content

Create a product or bundle

POST 

/pcm/products

Creates a product or bundle with the attributes that are defined in the body.

Product Types

Product Experience Manager automatically assigns types to the products you create. You can filter on product types. Product types can also be used in catalogs. For example, in your catalog, you can filter on parent so that only your parent products are displayed in your storefront.

See Product Types.

Product Tags

You can use product tags to store or assign a key word against a product or service that you sell in your store. The product tag can then be used to describe or label that product. Product tags represent similarities between products who do not share the same attributes. Using product tags means that you can group your products together, for example, by brand, category, subcategory, colors, types, industries, and so on.

See Product Tags.

Personalizing products

You can allow your shoppers to add custom text to a product when adding product items to their carts. This is useful, for example, if you have a product like a T-shirt that can be personalized or you sell greetings cards that can be printed with your shoppers personalized messages. You can do this by configuring the the custom_inputs attribute.

When configuring the custom_inputs attribute:

  • You can rename input to something more representative of the input that shoppers are adding, for example, message or front.
  • name is the name that is displayed in your storefront.
  • You can add validation rules. For example, the input field must be a string and/or up to 255 characters in length. The limit is 255 characters.
  • You can specify if the input field is required.

Curating Products

You can curate the products in a node. Product curation allows you to promote specific products within each node of your hierarchies, enabling you to create unique product collections in your storefront. For example, you may find you have an abundance of cotton T-Shirts and you want to promote these products to the top of the product list. When a shopper navigates to T-shirts, the cotton T-Shirts are displayed first. See Update a node.

Bundles

With Product Experience Manager, you can use the products API to create and manage bundles. A bundle is a purchasable product, comprising of one or more products that you want to sell together.

See Bundles.

Request

Body

required
    data objectrequired
    type stringrequired

    Possible values: [product]

    This represents the type of resource being returned. Always product.

    attributes objectrequired
    external_ref string

    The unique attribute associated with the product. This could be an external reference from a separate company system, for example. The maximum length is 2048 characters.

    name string

    The product name to display to customers.

    description string

    A description for the product.

    slug string

    The unique slug of the product. A slug can contain A to Z, a to z, 0 to 9, hyphen, underscore, and period. Spaces or other special characters like ^, [], *, and $ are not allowed.

    sku string

    The unique stock keeping unit of the product.

    status string

    Possible values: [live, draft]

    The status for the product, either draft or live. Default is draft.

    commodity_type string

    Possible values: [physical, digital]

    The commodity type, either physical or digital.

    upc_ean string

    The universal product code or european article number of the product.

    mpn string

    The manufacturer part number of the product.

    tags string[]

    You can use product tags to store or assign a key word against a product. The product tag can then be used to describe or label that product. Using product tags means that you can group your products together, for example, by brand, category, subcategory, colors, types, industries, and so on. A product can have up to 20 tags. A product tag can be up to 255 characters. Product tags must not contain any spaces or commas. See Product Tags.

    build_rules object

    You can build a combination of child products associated with a product, based on build rules that you specify. This is useful, for example, if you have a variation option that you do not sell. This makes managing and building your child products quick and easy. See Using Build Rules.

    default string

    Possible values: [include, exclude]

    Specifies the default behaviour, either include or exclude.

    include array[]

    An array of option IDs to include when child products are built. Each combination consists of a nested array of option IDs from one or more variations. Combinations of option IDs in the nested arrays must come from different variations.

    exclude array[]

    An array of option IDs to exclude when child products are built. Each combination consists of a nested array of option IDs from one or more variations. Combinations of option IDs in the nested arrays must come from different variations.

    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 stringrequired

    A localized name for the product.

    description string

    A localized description for the product.

    custom_inputs object

    You use the custom_inputs attribute to allow your shoppers to add custom text to a product when adding product items to their carts. This is useful, for example, if you have a product like a T-shirt that can be personalized or you sell greetings cards that can be printed with your shoppers personalized messages. See Personalizing Products.

    property name* object

    A name for the custom text field. You can rename this to something more representative of the input that shoppers are adding, for example, message or front.

    name string

    A name for the custom text field.

    validation_rules array

    The validation rules for the custom text.

    type string

    This represents the type of the resource being returned.

    options object

    The length of the custom input text field.

    max_length integer

    The number of characters the custom text field can be. You can specify a maximum length up to 255 characters, as the limit is 255 characters.

    required boolean

    true or false depending on whether the custom text is required.

    components object

    With Product Experience Manager, you can create and manage bundles. A bundle is a purchasable product, comprising of one or more products that you want to sell together. You can create multiple components within a bundle. Each component must have at least one or more options. Each option is a product and a quantity. See Bundles.

    property name* object

    The name of the component, such as games. The bundle_configuration uses the component name to reference a component. A component name should be relatively short and must not contain any special characters.

    name string

    The component name. The component name is the name that is displayed in your storefront.

    options object[]

    The product options included in a component. This can be the ID of another bundle.

  • Array [
  • id string

    The unique ID of the product you want to add to a component.

    type string

    This represents the type of object being returned. Always product.

    quantity integer

    The number of this product option that a shopper must purchase.

    sort_order integer

    The sort order of the options. The create a bundle and update a bundle endpoints do not sort the options. You can use the sort_order attribute when programming your storefront to display the options in the order that you want.

    default boolean

    Whether the product option is a default option in a bundle. Shoppers can select a bundle that specifies a default list of product options. See Dynamic Bundles.

  • ]
  • min integer

    The minimum number of product options a shopper can select from this component.

    max integer

    The maximum number of product options a shopper can select from this component.

    sort_order integer

    The sort order of the components. The create a bundle and update a bundle endpoints do not sort the components. You can use the sort_order attribute when programming your storefront to display the components in the order that you want.

    relationships object

    Relationships are established between different product entities.

    variations object
    data object[]
  • Array [
  • id string

    A unique identifier for a resource.

    type string

    This represents the type of resource object being returned.

  • ]

Responses

Creates a product with the following attributes.

Schema
    data object
    id string

    A unique product ID that is generated when you create the product.

    type string

    Possible values: [product]

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

    attributes object
    name string

    A name for the product.

    description string

    A description for the product.

    slug string

    A label for the product that is used in the URL paths. A slug can contain A to Z, a to z, 0 to 9, hyphen, underscore, and period. Spaces or other special characters like ^, [], *, and $ are not allowed. By default, the product name is used as the slug.

    sku string

    The unique stock keeping unit of the product.

    status string

    Possible values: [live, draft]

    The status for the product, either draft or live.

    commodity_type string

    Possible values: [physical, digital]

    The commodity type, either physical or digital.

    upc_ean string

    The universal product code or european article number of the product.

    mpn string

    The manufacturer part number of the product.

    external_ref string

    The unique attribute associated with the product. This could be an external reference from a separate company system, for example. The maximum length is 2048 characters.

    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 stringrequired

    A localized name for the product.

    description string

    A localized description for the product.

    tags string[]

    You can use product tags to store or assign a key word against a product. The product tag can then be used to describe or label that product. Using product tags means that you can group your products together, for example, by brand, category, subcategory, colors, types, industries, and so on. A product can have up to 20 tags. A product tag can be up to 255 characters. Product tags must not contain any spaces or commas.

    extensions object
    property name* object
    oneOf
    custom_inputs object

    You use the custom_inputs attribute to allow your shoppers to add custom text to a product when adding product items to their carts. This is useful, for example, if you have a product like a T-shirt that can be personalized or you sell greetings cards that can be printed with your shoppers personalized messages. See Personalizing Products.

    property name* object

    A name for the custom text field. You can rename this to something more representative of the input that shoppers are adding, for example, message or front.

    name string

    A name for the custom text field.

    validation_rules array

    The validation rules for the custom text.

    type string

    This represents the type of the resource being returned.

    options object

    The length of the custom input text field.

    max_length integer

    The number of characters the custom text field can be. You can specify a maximum length up to 255 characters, as the limit is 255 characters.

    required boolean

    true or false depending on whether the custom text is required.

    build_rules object

    You can build a combination of child products associated with a product, based on build rules that you specify. This is useful, for example, if you have a variation option that you do not sell. This makes managing and building your child products quick and easy. See Using Build Rules.

    default string

    Possible values: [include, exclude]

    Specifies the default behaviour, either include or exclude.

    include array[]

    An array of option IDs to include when child products are built. Each combination consists of a nested array of option IDs from one or more variations. Combinations of option IDs in the nested arrays must come from different variations.

    exclude array[]

    An array of option IDs to exclude when child products are built. Each combination consists of a nested array of option IDs from one or more variations. Combinations of option IDs in the nested arrays must come from different variations.

    components object

    With Product Experience Manager, you can create and manage bundles. A bundle is a purchasable product, comprising of one or more products that you want to sell together. You can create multiple components within a bundle. Each component must have at least one or more options. Each option is a product and a quantity. See Bundles.

    property name* object

    The name of the component, such as games. The bundle_configuration uses the component name to reference a component. A component name should be relatively short and must not contain any special characters.

    name string

    The component name. The component name is the name that is displayed in your storefront.

    options object[]

    The product options included in a component. This can be the ID of another bundle.

  • Array [
  • id string

    The unique ID of the product you want to add to a component.

    type string

    This represents the type of object being returned. Always product.

    quantity integer

    The number of this product option that a shopper must purchase.

    sort_order integer

    The sort order of the options. The create a bundle and update a bundle endpoints do not sort the options. You can use the sort_order attribute when programming your storefront to display the options in the order that you want.

    default boolean

    Whether the product option is a default option in a bundle. Shoppers can select a bundle that specifies a default list of product options. See Dynamic Bundles.

  • ]
  • min integer

    The minimum number of product options a shopper can select from this component.

    max integer

    The maximum number of product options a shopper can select from this component.

    sort_order integer

    The sort order of the components. The create a bundle and update a bundle endpoints do not sort the components. You can use the sort_order attribute when programming your storefront to display the components in the order that you want.

    meta object
    created_at date-time

    The date and time a product is created.

    updated_at date-time

    The date and time a product is updated.

    owner string

    Possible values: [organization, store]

    The resource owner, either organization or store.

    variations object[]

    A product's variations and the options defined for each variation. If you have specified build_rules, only the child products included in the build_rules are specified.

  • Array [
  • id string

    A unique ID generated when a variation is created.

    name string

    The name of a variation.

    options object[]
  • Array [
  • id string

    A unique ID that is generated an option is created.

    name string

    The name of an option.

    description string

    A description of an option.

  • ]
  • ]
  • child_variations object[]nullable

    A child product's variations and the option defined for each variation. This details the variation and options specific to a child product.

  • Array [
  • id string

    A unique ID generated when a variation is created.

    name string

    The name of a variation.

    sort_order integer

    The sort order value is visible when you add the variations and variation options to your catalogs. You can then use the sort_order value to program your storefront to display the variation options in the order that you want. The variation with the highest value of sort_order is displayed first. For example, a variation with a sort_order value of 3 appears before a variation with a sort_order value of 2. You can specify any numbers that you want. You can use 1, 2, 3, or 100, 90, 80, including, zero or negative numbers. You can set sort_order to either null or omit it entirely from the request if you wish to remove an existing sort_order attribute.

    options object[]nullable

    This will be unset for child product variations.

  • Array [
  • id string

    A unique ID that is generated an option is created.

    name string

    The name of an option.

    description string

    A description of an option.

  • ]
  • option object

    The options available for this variation.

    id string

    A unique ID that is generated an option is created.

    name string

    The name of an option.

    description string

    A description of an option.

  • ]
  • product_types string[]

    Possible values: [parent, child, bundle, standard]

    One of the following product types:

    • standard - A standard product is a standalone product.
    • parent - A parent product is a product that has child products that have been built using the Build Child Products endpoint.
    • child - When you configure product variations and variation options for parent products, the child products derived from the parent products are automatically created in Commerce.
    • bundle - A bundle is a purchasable product, comprising one or more standalone products (in other words, components) to be sold together.
    variation_matrix object

    The child products defined for a product. The order of the variations in the variation_matrix is the order of the variations in the array when the variations were linked to the product. For example, the first variation in the variation_matrix corresponds to the first variation in the array, and so on. You can use the sort_orderattribute to sort the order of your variation and variation options in the variation_matrix object. See Sorting the Order of Variations and Options If no variations are defined for a product, the variation_matrix is empty.

    relationships object

    Relationships are established between different product entities. For example, a bundle product and a child product are related to a parent product, as both are associated with it.

    property name* object
    data object
    oneOf
  • Array [
  • id string

    A unique identifier for a resource.

    type string

    This represents the type of resource object being returned.

  • ]
  • links object

    Links are used to allow you to move between requests. Single entities use a self parameter with a link to that specific resource. Sometimes, there are not enough entities for a project to fill multiple pages. In this situation, we return some defaults.

    PropertyDescription
    currentAlways the current page.
    firstAlways the first page.
    lastnull if there is only one page.
    prevnull if the user is on the first page.
    nextnull if there is only one page.
    property name* string
    included object

    Returns a list of component products in a product bundle. If a bundle has no component products (in other words, is not a product bundle), an empty array is returned.

    component_products object[]

    A list of component products in a product bundle. If a bundle has no component products (in other words, is not a product bundle), an empty array is returned.

  • Array [
  • id string

    A unique product ID that is generated when you create the product.

    type string

    Possible values: [product]

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

    attributes object
    name string

    A name for the product.

    description string

    A description for the product.

    slug string

    A label for the product that is used in the URL paths. A slug can contain A to Z, a to z, 0 to 9, hyphen, underscore, and period. Spaces or other special characters like ^, [], *, and $ are not allowed. By default, the product name is used as the slug.

    sku string

    The unique stock keeping unit of the product.

    status string

    Possible values: [live, draft]

    The status for the product, either draft or live.

    commodity_type string

    Possible values: [physical, digital]

    The commodity type, either physical or digital.

    upc_ean string

    The universal product code or european article number of the product.

    mpn string

    The manufacturer part number of the product.

    external_ref string

    The unique attribute associated with the product. This could be an external reference from a separate company system, for example. The maximum length is 2048 characters.

    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 stringrequired

    A localized name for the product.

    description string

    A localized description for the product.

    tags string[]

    You can use product tags to store or assign a key word against a product. The product tag can then be used to describe or label that product. Using product tags means that you can group your products together, for example, by brand, category, subcategory, colors, types, industries, and so on. A product can have up to 20 tags. A product tag can be up to 255 characters. Product tags must not contain any spaces or commas.

    extensions object
    property name* object
    oneOf
    custom_inputs object

    You use the custom_inputs attribute to allow your shoppers to add custom text to a product when adding product items to their carts. This is useful, for example, if you have a product like a T-shirt that can be personalized or you sell greetings cards that can be printed with your shoppers personalized messages. See Personalizing Products.

    property name* object

    A name for the custom text field. You can rename this to something more representative of the input that shoppers are adding, for example, message or front.

    name string

    A name for the custom text field.

    validation_rules array

    The validation rules for the custom text.

    type string

    This represents the type of the resource being returned.

    options object

    The length of the custom input text field.

    max_length integer

    The number of characters the custom text field can be. You can specify a maximum length up to 255 characters, as the limit is 255 characters.

    required boolean

    true or false depending on whether the custom text is required.

    build_rules object

    You can build a combination of child products associated with a product, based on build rules that you specify. This is useful, for example, if you have a variation option that you do not sell. This makes managing and building your child products quick and easy. See Using Build Rules.

    default string

    Possible values: [include, exclude]

    Specifies the default behaviour, either include or exclude.

    include array[]

    An array of option IDs to include when child products are built. Each combination consists of a nested array of option IDs from one or more variations. Combinations of option IDs in the nested arrays must come from different variations.

    exclude array[]

    An array of option IDs to exclude when child products are built. Each combination consists of a nested array of option IDs from one or more variations. Combinations of option IDs in the nested arrays must come from different variations.

    components object

    With Product Experience Manager, you can create and manage bundles. A bundle is a purchasable product, comprising of one or more products that you want to sell together. You can create multiple components within a bundle. Each component must have at least one or more options. Each option is a product and a quantity. See Bundles.

    property name* object

    The name of the component, such as games. The bundle_configuration uses the component name to reference a component. A component name should be relatively short and must not contain any special characters.

    name string

    The component name. The component name is the name that is displayed in your storefront.

    options object[]

    The product options included in a component. This can be the ID of another bundle.

  • Array [
  • id string

    The unique ID of the product you want to add to a component.

    type string

    This represents the type of object being returned. Always product.

    quantity integer

    The number of this product option that a shopper must purchase.

    sort_order integer

    The sort order of the options. The create a bundle and update a bundle endpoints do not sort the options. You can use the sort_order attribute when programming your storefront to display the options in the order that you want.

    default boolean

    Whether the product option is a default option in a bundle. Shoppers can select a bundle that specifies a default list of product options. See Dynamic Bundles.

  • ]
  • min integer

    The minimum number of product options a shopper can select from this component.

    max integer

    The maximum number of product options a shopper can select from this component.

    sort_order integer

    The sort order of the components. The create a bundle and update a bundle endpoints do not sort the components. You can use the sort_order attribute when programming your storefront to display the components in the order that you want.

    meta object
    created_at date-time

    The date and time a product is created.

    updated_at date-time

    The date and time a product is updated.

    owner string

    Possible values: [organization, store]

    The resource owner, either organization or store.

    variations object[]

    A product's variations and the options defined for each variation. If you have specified build_rules, only the child products included in the build_rules are specified.

  • Array [
  • id string

    A unique ID generated when a variation is created.

    name string

    The name of a variation.

    options object[]
  • Array [
  • id string

    A unique ID that is generated an option is created.

    name string

    The name of an option.

    description string

    A description of an option.

  • ]
  • ]
  • child_variations object[]nullable

    A child product's variations and the option defined for each variation. This details the variation and options specific to a child product.

  • Array [
  • id string

    A unique ID generated when a variation is created.

    name string

    The name of a variation.

    sort_order integer

    The sort order value is visible when you add the variations and variation options to your catalogs. You can then use the sort_order value to program your storefront to display the variation options in the order that you want. The variation with the highest value of sort_order is displayed first. For example, a variation with a sort_order value of 3 appears before a variation with a sort_order value of 2. You can specify any numbers that you want. You can use 1, 2, 3, or 100, 90, 80, including, zero or negative numbers. You can set sort_order to either null or omit it entirely from the request if you wish to remove an existing sort_order attribute.

    options object[]nullable

    This will be unset for child product variations.

  • Array [
  • id string

    A unique ID that is generated an option is created.

    name string

    The name of an option.

    description string

    A description of an option.

  • ]
  • option object

    The options available for this variation.

    id string

    A unique ID that is generated an option is created.

    name string

    The name of an option.

    description string

    A description of an option.

  • ]
  • product_types string[]

    Possible values: [parent, child, bundle, standard]

    One of the following product types:

    • standard - A standard product is a standalone product.
    • parent - A parent product is a product that has child products that have been built using the Build Child Products endpoint.
    • child - When you configure product variations and variation options for parent products, the child products derived from the parent products are automatically created in Commerce.
    • bundle - A bundle is a purchasable product, comprising one or more standalone products (in other words, components) to be sold together.
    variation_matrix object

    The child products defined for a product. The order of the variations in the variation_matrix is the order of the variations in the array when the variations were linked to the product. For example, the first variation in the variation_matrix corresponds to the first variation in the array, and so on. You can use the sort_orderattribute to sort the order of your variation and variation options in the variation_matrix object. See Sorting the Order of Variations and Options If no variations are defined for a product, the variation_matrix is empty.

    relationships object

    Relationships are established between different product entities. For example, a bundle product and a child product are related to a parent product, as both are associated with it.

    property name* object
    data object
    oneOf
  • Array [
  • id string

    A unique identifier for a resource.

    type string

    This represents the type of resource object being returned.

  • ]
  • links object

    Links are used to allow you to move between requests. Single entities use a self parameter with a link to that specific resource. Sometimes, there are not enough entities for a project to fill multiple pages. In this situation, we return some defaults.

    PropertyDescription
    currentAlways the current page.
    firstAlways the first page.
    lastnull if there is only one page.
    prevnull if the user is on the first page.
    nextnull if there is only one page.
    property name* string
  • ]
Loading...