Create a new retailer product

POST /api/rest/v1/retailer/products

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

Body

  • 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
  • Bad request

    Hide response attributes Show response attributes object
    • code integer

      HTTP status code

    • message string

      Message explaining the error

  • 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

POST /api/rest/v1/retailer/products
curl \
 -X POST https://content.winkelstraat.nl/api/rest/v1/retailer/products \
 -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 (400)
400
"Invalid JSON message received"
Response examples (400)
{
  "code": 42,
  "message": "string"
}
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"
}