v1

latestSwagger 2.02026-07-13137761.0 MB
Product [uuid]

Update/create several products

This endpoint allows you to update and/or create several products at once. Learn more about <a href="/documentation/update.html#update-behavior">Update behavior</a>. Note that if no product exists for the given uuid, it creates it. In the Enterprise Edition, permissions based on your user groups are applied to the products you try to update. It may result in the creation of drafts if you only have edit rights through the product's categories.

patch/api/rest/v1/products-uuid

Request body

uuidstring

Product UUID

enabledboolean

Whether the product is enabled

familystring

<a href='api-reference-paas.html#Family'>Family</a> code from which the product inherits its attributes and attributes requirements.

categoriesstring[]

Codes of the <a href='api-reference-paas.html#Category'>categories</a> in which the product is classified

groupsstring[]

Codes of the groups to which the product belong

parentstring

Code of the parent <a href='api-reference-paas.html#Productmodel'>product model</a> when the product is a variant (only available since the 2.0). This parent can be modified since the 2.3.

valuesobject

Product attributes values, see <a href='/concepts/products.html#focus-on-the-product-values'>Product values</a> section for more details

createdstring dateTime

Date of creation

updatedstring dateTime

Date of the last update

quality_scoresobject

Product quality scores for each channel/locale combination (only available since the 5.0 and when the "with_quality_scores" query parameter is set to "true")

Example request

{
  "uuid": "25566245-55c3-42ce-86d9-8610ac459fa8",
  "enabled": true,
  "family": "tshirt",
  "categories": [
    "summer_collection"
  ],
  "groups": [],
  "parent": null,
  "values": {
    "name": [
      {
        "data": "Top",
        "locale": "en_US",
        "scope": null,
        "attribute_type": "pim_catalog_text"
      },
      {
        "data": "Débardeur",
        "locale": "fr_FR",
        "scope": null,
        "attribute_type": "pim_catalog_text"
      }
    ],
    "description": [
      {
        "data": "Summer top",
        "locale": "en_US",
        "scope": "ecommerce",
        "attribute_type": "pim_catalog_textarea"
      },
      {
        "data": "Top",
        "locale": "en_US",
        "scope": "tablet",
        "attribute_type": "pim_catalog_textarea"
      },
      {
        "data": "Débardeur pour l'été",
        "locale": "fr_FR",
        "scope": "ecommerce",
        "attribute_type": "pim_catalog_textarea"
      },
      {
        "data": "Débardeur",
        "locale": "fr_FR",
        "scope": "tablet",
        "attribute_type": "pim_catalog_textarea"
      }
    ],
    "price": [
      {
        "locale": null,
        "scope": null,
        "data": [
          {
            "amount": "15.5",
            "currency": "EUR"
          },
          {
            "amount": "15",
            "currency": "USD"
          }
        ],
        "attribute_type": "pim_catalog_price_collection"
      }
    ],
    "color": [
      {
        "locale": null,
        "scope": null,
        "data": "black",
        "linked_data": {
          "attribute": "color",
          "code": "black",
          "labels": {
            "en_US": "Black",
            "fr_FR": "Noir"
          }
        },
        "attribute_type": "pim_catalog_simpleselect"
      }
    ],
    "size": [
      {
        "locale": null,
        "scope": null,
        "data": "m",
        "linked_data": {
          "attribute": "size",
          "code": "m",
          "labels": {
            "en_US": "M",
            "fr_FR": "M"
          }
        },
        "attribute_type": "pim_catalog_simpleselect"
      }
    ],
    "collection": [
      {
        "locale": null,
        "scope": null,
        "data": [
          "winter_2016"
        ],
        "linked_data": {
          "winter_2016": {
            "attribute": "collection",
            "code": "winter_2016",
            "labels": {
              "en_US": "Winter 2016",
              "fr_FR": "Hiver 2016"
            }
          }
        },
        "attribute_type": "pim_catalog_multiselect"
      }
    ]
  },
  "created": "2016-06-23T18:24:44+02:00",
  "updated": "2016-06-25T17:56:12+02:00",
  "associations": {
    "PACK": {
      "products": [
        "sunglass"
      ],
      "product_models": [],
      "groups": []
    }
  },
  "quantified_associations": {
    "PRODUCT_SET": {
      "products": [
        {
          "identifier": "cap",
          "quantity": 2
        },
        {
          "identifier": "shoes",
          "quantity": 1
        }
      ],
      "product_models": [
        {
          "identifier": "model-biker-jacket-leather",
          "quantity": 2
        }
      ]
    }
  },
  "quality_scores": [
    {
      "scope": "ecommerce",
      "locale": "en_US",
      "data": "A"
    },
    {
      "scope": "ecommerce",
      "locale": "fr_FR",
      "data": "B"
    },
    {
      "scope": "tablet",
      "locale": "en_US",
      "data": "D"
    },
    {
      "scope": "tablet",
      "locale": "fr_FR",
      "data": "E"
    }
  ],
  "completenesses": [
    {
      "scope": "ecommerce",
      "locale": "en_US",
      "data": 10
    },
    {
      "scope": "ecommerce",
      "locale": "fr_FR",
      "data": 20
    },
    {
      "scope": "tablet",
      "locale": "en_US",
      "data": 30
    },
    {
      "scope": "tablet",
      "locale": "fr_FR",
      "data": 40
    }
  ]
}

Response

OK

lineinteger

Line number

uuidstring

Product uuid

status_codeinteger

HTTP status code, see <a href="/documentation/responses.html#client-errors">Client errors</a> to understand the meaning of each code

messagestring

Message explaining the error