Update/create a retailer product

PATCH /api/rest/v1/retailer/products/{code}

This endpoint allows you to create/update a new product for a retailer.

Path parameters

  • code string Required

    Code of the resource

Body Required

  • identifier string Required

    Child product identifier, i.e. child sku. A unique value to reference a single product.

  • parent string Required

    Product group identifier, i.e. sku. A unique value to reference a group of products with different sizes.

  • enabled boolean

    Whether the product is enable.

    Default value is true.

  • category string Required

    Category code in which the product is classified

  • values object

    Product attributes values. Valid global product attribute codes are: 'size', 'color', 'retailer', 'ean'. Valid local product attribute codes are: 'manufacturer_product_number' ,'ean'.

    Hide values attribute Show values attribute object
    • attributeCode array[object]
      Hide attributeCode attributes Show attributeCode attributes object
      • locale string

        Locale code of the product value

      • data object

        Product value

  • created string(dateTime)

    Date of creation

  • updated string(dateTime)

    Date of the last update

Responses

  • Created

    Hide headers attribute Show headers attribute
  • No content to return

    Hide headers attribute Show headers attribute
  • Authentication required

    Hide response attributes Show response attributes object
    • code integer

      HTTP status code

    • message string

      Message explaining the error

  • Access forbidden

    Hide response attributes Show response attributes object
    • code integer

      HTTP status code

    • message string

      Message explaining the error

  • Unsupported Media type

    Hide response attributes Show response attributes object
    • code integer

      HTTP status code

    • message string

      Message explaining the error

  • Unprocessable entity

    Hide response attributes Show response attributes object
    • code integer

      HTTP status code

    • message string

      Message explaining the error

PATCH /api/rest/v1/retailer/products/{code}
curl \
 -X PATCH https://content.winkelstraat.nl/api/rest/v1/retailer/products/{code} \
 -d '{"identifier":"top_child_size_m","enabled":true,"category":"120","parent":"top","values":{"name":[{"data":"Top","locale":"en_US"},{"data":"Topje","locale":"nl_NL"}],"description":[{"data":"Summer top","locale":"en_US"},{"data":"Zomer top","locale":"nl_NL"}],"price":[{"data":[{"amount":"15.5","currency":"EUR"}]}],"manufacturer":[{"data":"guess"}],"manufacturer_product_number":[{"data":"G1234"}],"color":[{"data":"black"}],"size":[{"data":"m"}]}}'
Request example
{
  "identifier": "top_child_size_m",
  "enabled": true,
  "category": "120",
  "parent": "top",
  "values": {
    "name": [
      {
        "data": "Top",
        "locale": "en_US"
      },
      {
        "data": "Topje",
        "locale": "nl_NL"
      }
    ],
    "description": [
      {
        "data": "Summer top",
        "locale": "en_US"
      },
      {
        "data": "Zomer top",
        "locale": "nl_NL"
      }
    ],
    "price": [
      {
        "data": [
          {
            "amount": "15.5",
            "currency": "EUR"
          }
        ]
      }
    ],
    "manufacturer": [
      {
        "data": "guess"
      }
    ],
    "manufacturer_product_number": [
      {
        "data": "G1234"
      }
    ],
    "color": [
      {
        "data": "black"
      }
    ],
    "size": [
      {
        "data": "m"
      }
    ]
  }
}
Response examples (401)
401
"Authentication is required"
Response examples (401)
{
  "code": 42,
  "message": "string"
}
Response examples (403)
403
"Access forbidden. You are not allowed to list categories."
Response examples (403)
{
  "code": 42,
  "message": "string"
}
Response examples (415)
415
"‘xxx’ in ‘Content-type’ header is not valid.  Only ‘application/json’ is allowed."
Response examples (415)
{
  "code": 42,
  "message": "string"
}
Response examples (422)
422
"Property \"labels\" expects an array as data, \"NULL\" given. Check the API reference documentation."
{
  "documentation": {
    "href": "http://api.akeneo.com/api-reference.html"
  }
}
Response examples (422)
{
  "code": 42,
  "message": "string"
}