Create, update and archive/unarchive products

How to create and manage products in Management API

The products in Bluestone PIM has a few built-in properties. 

Name

Single line product name that will be visible many places in Bluestone PIM UI. No restrictions on the number or type of characters.

Number

Product number is typically the customer ID for the product. Displayed many places in the UI. Often used as a common identifier between systems when integrating with PIM. No restrictions on the number or type of characters.

Description

Multiline text description of the product. No restrictions on the number or type of characters.

Type

There are four product types in Bluestone PIM. The single product is the most basic type and all the other types have the same properties and features with some additions.  

  • SINGLE: A stand-alone product in Bluestone PIM. Can transform into a 'Variant' product if added to a 'Variant group'.
  • GROUP: A 'Variant group' can contain one/more 'Variant' products. Attributes can be propagated to the 'Variants'.
  • VARIANT: A 'Single' product becomes a 'Variant' once added to a 'Variant group'. Can inherit attributes from the 'Variant group'. 
  • BUNDLE: A 'Bundle' consists of 'Single', 'Variant group' and/or 'Variant' products. The quantity of each product being part of a 'Bundle' must be specified (default 1).

Read more about product types.

Create product

POST https://api.bluestonepim.com/pim/products

Example request body

{
    "type": "SINGLE",
  "name": "Single sample product",
    "number": "123456",
  "description": "Longer text to describe the product.\n Second line of text"
}

Response

If successful, this will result in a '201 - Created' response.

The response headers will include a Resource-Id containing the GUID of the newly created product. 

Try it in readme.io

Update product

Use the GUID from the previous step as the {id} in the request to update the product details.

PATCH https://api.bluestonepim.com/pim/products/{id}

At this point, it is not possible to change the product type directly. 

The endpoint supports partial data, meaning you can send and update only one of the properties.

Example request body:

{    
    "name": {
      "value": "New name for single sample product"
    },
"description": {
    "value": "Longer text to describe the product.\n Second line of text \n Third line of text"
    },
  "number": "654321"
}


Try it in readme.io

Archive products

A set of products can be archived in one operation.

PUT https://api.bluestonepim.com/pim/products/archive/by-ids

Note! Only products in status Draft (in all contexts) can be archived.

Example request body

{
  "ids": [
    "66fd2fkk71ceb21a2b32aa77",
    "66fd2fpp71ceb21a2b32aa88"
  ]
}

Try it in readme.io

Note! When archiving a 'Variant' it will be changed to type 'Single'. Thus, if later restored, it needs to be re-connected to the 'Variant group', if relevant.

Unarchive/restore product

A set of products can be unarchived in one operation.

PUT https://api.bluestonepim.com/pim/products/unarchive/by-ids

Example request body

{
  "ids": [
    "66fd2fkk71ceb21a2b32aa77",
    "66fd2fpp71ceb21a2b32aa88"
  ]
}

Try it in readme.io

Note! When a 'Variant' is archived it is changed to type 'Single'. Thus, if restoring such a product, it needs to be re-connected to the 'Variant group', if relevant. Try it in readme.io

 

Back to the top